From be1a2928d2ba497b61f1e39b0b3bc773687617f8 Mon Sep 17 00:00:00 2001 From: Dots Date: Thu, 15 Aug 2024 20:57:35 +0300 Subject: [PATCH] remove mms --- .gitmodules | 5 +- metamod-source/.github/workflows/ci.yml | 131 - metamod-source/.gitignore | 28 - metamod-source/.gitmodules | 6 - metamod-source/.travis.yml | 85 - metamod-source/AMBuildScript | 374 - metamod-source/LICENSE.txt | 29 - metamod-source/README.md | 57 - metamod-source/appveyor.yml | 18 - metamod-source/configure.py | 38 - metamod-source/core/AMBuilder | 45 - metamod-source/core/IPluginManager.h | 158 - metamod-source/core/ISmmAPI.h | 424 - metamod-source/core/ISmmPlugin.h | 552 - metamod-source/core/ISmmPluginExt.h | 194 - metamod-source/core/gamedll_bridge.cpp | 96 - metamod-source/core/metamod.cpp | 1240 -- metamod-source/core/metamod.h | 135 - metamod-source/core/metamod_console.cpp | 727 - metamod-source/core/metamod_console.h | 36 - metamod-source/core/metamod_oslink.cpp | 114 - metamod-source/core/metamod_oslink.h | 116 - metamod-source/core/metamod_plugins.cpp | 867 -- metamod-source/core/metamod_plugins.h | 170 - metamod-source/core/metamod_provider.h | 333 - metamod-source/core/metamod_util.cpp | 456 - metamod-source/core/metamod_util.h | 109 - .../core/provider/provider_base.cpp | 120 - metamod-source/core/provider/provider_base.h | 105 - .../core/provider/source/provider_source.cpp | 678 - .../core/provider/source/provider_source.h | 127 - .../source/provider_source_console.cpp | 180 - .../provider/source2/provider_source2.cpp | 456 - .../core/provider/source2/provider_source2.h | 84 - metamod-source/core/sourcehook/FastDelegate.h | 1074 -- .../core/sourcehook/generate/generate | 9 - .../core/sourcehook/generate/generate.bat | 8 - .../core/sourcehook/generate/shworker.bin | Bin 50608 -> 0 bytes .../sourcehook/generate/shworker/Makefile | 15 - .../generate/shworker/fd_hopter.cpp | 371 - .../generate/shworker/msvc7/shworker.vcproj | 137 - .../generate/shworker/msvc8/shworker.vcproj | 208 - .../generate/shworker/msvc9/shworker.sln | 20 - .../generate/shworker/msvc9/shworker.vcproj | 207 - .../sourcehook/generate/shworker/shworker.cpp | 768 - .../core/sourcehook/generate/sourcehook.hxx | 1571 --- metamod-source/core/sourcehook/sh_list.h | 321 - .../core/sourcehook/sh_memfuncinfo.h | 327 - metamod-source/core/sourcehook/sh_memory.h | 379 - metamod-source/core/sourcehook/sh_pagealloc.h | 330 - metamod-source/core/sourcehook/sh_stack.h | 232 - metamod-source/core/sourcehook/sh_string.h | 401 - metamod-source/core/sourcehook/sh_tinyhash.h | 534 - metamod-source/core/sourcehook/sh_vector.h | 519 - metamod-source/core/sourcehook/sourcehook.cpp | 871 -- metamod-source/core/sourcehook/sourcehook.h | 4931 ------- .../core/sourcehook/sourcehook_hookmangen.cpp | 2040 --- .../core/sourcehook/sourcehook_hookmangen.h | 299 - .../sourcehook/sourcehook_hookmangen_x86.h | 1611 --- .../core/sourcehook/sourcehook_impl.h | 392 - .../core/sourcehook/sourcehook_impl_chook.h | 106 - .../sourcehook/sourcehook_impl_chookidman.cpp | 111 - .../sourcehook/sourcehook_impl_chookidman.h | 81 - .../sourcehook_impl_chookmaninfo.cpp | 84 - .../sourcehook/sourcehook_impl_chookmaninfo.h | 143 - .../core/sourcehook/sourcehook_impl_ciface.h | 96 - .../sourcehook/sourcehook_impl_cleanuptask.h | 29 - .../sourcehook/sourcehook_impl_cproto.cpp | 145 - .../core/sourcehook/sourcehook_impl_cproto.h | 141 - .../sourcehook/sourcehook_impl_cvfnptr.cpp | 263 - .../core/sourcehook/sourcehook_impl_cvfnptr.h | 91 - .../core/sourcehook/sourcehook_pibuilder.h | 109 - metamod-source/core/sourcehook/test/AMBuilder | 42 - metamod-source/core/sourcehook/test/Makefile | 73 - .../core/sourcehook/test/generate.bat | 6 - metamod-source/core/sourcehook/test/main.cpp | 142 - .../core/sourcehook/test/msvc12/test.sln | 40 - .../core/sourcehook/test/msvc12/test.vcxproj | 461 - .../test/msvc12/test.vcxproj.filters | 191 - .../core/sourcehook/test/msvc7/test.vcproj | 417 - .../core/sourcehook/test/msvc8/test.vcproj | 578 - .../core/sourcehook/test/sourcehook_test.h | 49 - metamod-source/core/sourcehook/test/test.sln | 26 - .../core/sourcehook/test/test.vcproj | 619 - metamod-source/core/sourcehook/test/test1.cpp | 750 - metamod-source/core/sourcehook/test/test2.cpp | 242 - metamod-source/core/sourcehook/test/test3.cpp | 245 - metamod-source/core/sourcehook/test/test4.cpp | 315 - .../core/sourcehook/test/testbail.cpp | 115 - .../core/sourcehook/test/testbail.h | 39 - .../core/sourcehook/test/testbail2.cpp | 36 - .../core/sourcehook/test/testevents.h | 214 - .../core/sourcehook/test/testhookmangen.cpp | 1232 -- .../core/sourcehook/test/testhookmangen.h | 2192 --- .../core/sourcehook/test/testhookmangen.hxx | 584 - .../core/sourcehook/test/testlist.cpp | 282 - .../core/sourcehook/test/testmanual.cpp | 382 - .../core/sourcehook/test/testmulti.cpp | 106 - .../core/sourcehook/test/testoddthunks.cpp | 182 - .../core/sourcehook/test/testrecall.cpp | 231 - .../core/sourcehook/test/testreentr.cpp | 599 - .../core/sourcehook/test/testref.cpp | 227 - .../core/sourcehook/test/testrefret.cpp | 319 - .../core/sourcehook/test/testvphooks.cpp | 274 - metamod-source/core/version.rc | 101 - metamod-source/core/vsp_bridge.cpp | 193 - metamod-source/cruft/installer/Attach.cfg | 38 - metamod-source/cruft/installer/Attach.dpr | 85 - metamod-source/cruft/installer/HL2Launch.cfg | 38 - metamod-source/cruft/installer/HL2Launch.dpr | 189 - .../cruft/installer/MMS_Installer.cfg | 38 - .../cruft/installer/MMS_Installer.dpr | 72 - .../cruft/installer/MMS_Installer.res | Bin 171456 -> 0 bytes .../cruft/installer/UnitFunctions.pas | 126 - .../cruft/installer/UnitInstall.pas | 560 - .../cruft/installer/UnitPackSystem.pas | 222 - .../cruft/installer/UnitSelectModPath.dfm | Bin 1148 -> 0 bytes .../cruft/installer/UnitSelectModPath.pas | 26 - .../cruft/installer/UnitfrmMain.dfm | 11577 ---------------- .../cruft/installer/UnitfrmMain.pas | 804 -- .../cruft/installer/UnitfrmProxy.dfm | Bin 1584 -> 0 bytes .../cruft/installer/UnitfrmProxy.pas | 72 - metamod-source/cruft/installer/del.bat | 15 - .../cruft/installer/files/Readme.txt | 8 - metamod-source/cruft/installer/install.bmp | Bin 154542 -> 0 bytes metamod-source/hl2sdk-manifests/README.md | 5 - .../hl2sdk-manifests/SdkHelpers.ambuild | 212 - .../hl2sdk-manifests/manifests/bgt.json | 35 - .../hl2sdk-manifests/manifests/blade.json | 79 - .../hl2sdk-manifests/manifests/bms.json | 55 - .../hl2sdk-manifests/manifests/contagion.json | 39 - .../hl2sdk-manifests/manifests/cs2.json | 60 - .../hl2sdk-manifests/manifests/csgo.json | 102 - .../hl2sdk-manifests/manifests/css.json | 78 - .../hl2sdk-manifests/manifests/darkm.json | 37 - .../hl2sdk-manifests/manifests/dods.json | 78 - .../hl2sdk-manifests/manifests/doi.json | 73 - .../hl2sdk-manifests/manifests/dota.json | 50 - .../hl2sdk-manifests/manifests/episode1.json | 53 - .../hl2sdk-manifests/manifests/eye.json | 38 - .../hl2sdk-manifests/manifests/hl2dm.json | 78 - .../manifests/insurgency.json | 95 - .../hl2sdk-manifests/manifests/l4d.json | 78 - .../hl2sdk-manifests/manifests/l4d2.json | 78 - .../hl2sdk-manifests/manifests/mcv.json | 56 - .../hl2sdk-manifests/manifests/mock.json | 90 - .../manifests/nucleardawn.json | 78 - .../hl2sdk-manifests/manifests/orangebox.json | 51 - .../hl2sdk-manifests/manifests/portal2.json | 21 - .../hl2sdk-manifests/manifests/pvkii.json | 65 - .../hl2sdk-manifests/manifests/sdk2013.json | 78 - .../hl2sdk-manifests/manifests/swarm.json | 39 - .../hl2sdk-manifests/manifests/tf2.json | 98 - .../hl2sdk-manifests/next-sdk-code.py | 17 - metamod-source/loader/AMBuilder | 29 - metamod-source/loader/gamedll.cpp | 895 -- metamod-source/loader/gamedll.h | 39 - metamod-source/loader/loader.cpp | 430 - metamod-source/loader/loader.h | 134 - metamod-source/loader/loader_bridge.h | 71 - metamod-source/loader/serverplugin.cpp | 308 - metamod-source/loader/serverplugin.h | 39 - metamod-source/loader/utility.cpp | 726 - metamod-source/loader/utility.h | 77 - metamod-source/loader/version.rc | 101 - metamod-source/product.version | 1 - metamod-source/public/metamod_version.h | 66 - metamod-source/pushbuild.txt | 42 - .../samples/s1_sample_mm/AMBuildScript | 444 - metamod-source/samples/s1_sample_mm/README.md | 27 - .../samples/s1_sample_mm/configure.py | 33 - .../samples/s1_sample_mm/engine_wrappers.h | 94 - .../samples/s1_sample_mm/msvc10/sample_mm.sln | 56 - .../s1_sample_mm/msvc10/sample_mm.vcxproj | 1156 -- .../msvc10/sample_mm.vcxproj.filters | 30 - .../samples/s1_sample_mm/msvc8/sample_mm.sln | 57 - .../s1_sample_mm/msvc8/sample_mm.vcproj | 1175 -- .../samples/s1_sample_mm/msvc9/sample_mm.sln | 56 - .../s1_sample_mm/msvc9/sample_mm.vcproj | 1162 -- .../samples/s1_sample_mm/product.version | 1 - .../samples/s1_sample_mm/sample_mm.cpp | 357 - .../samples/s1_sample_mm/sample_mm.h | 78 - .../samples/s1_sample_mm/sample_mm.vdf | 5 - metamod-source/samples/s1_stub_mm/Makefile | 229 - metamod-source/samples/s1_stub_mm/README.md | 4 - .../samples/s1_stub_mm/msvc10/stub_mm.sln | 56 - .../samples/s1_stub_mm/msvc10/stub_mm.vcxproj | 1155 -- .../s1_stub_mm/msvc10/stub_mm.vcxproj.filters | 27 - .../samples/s1_stub_mm/msvc8/stub_mm.sln | 57 - .../samples/s1_stub_mm/msvc8/stub_mm.vcproj | 1171 -- .../samples/s1_stub_mm/msvc9/stub_mm.sln | 56 - .../samples/s1_stub_mm/msvc9/stub_mm.vcproj | 1158 -- metamod-source/samples/s1_stub_mm/stub_mm.cpp | 107 - metamod-source/samples/s1_stub_mm/stub_mm.h | 49 - metamod-source/samples/s1_stub_mm/stub_mm.vdf | 5 - .../samples/s2_sample_mm/AMBuildScript | 311 - metamod-source/samples/s2_sample_mm/AMBuilder | 24 - .../samples/s2_sample_mm/PackageScript | 49 - metamod-source/samples/s2_sample_mm/README.md | 38 - .../samples/s2_sample_mm/configure.py | 41 - .../samples/s2_sample_mm/sample_mm.cpp | 226 - .../samples/s2_sample_mm/sample_mm.h | 61 - metamod-source/support/README.txt | 7 - metamod-source/support/SourceMM.Doxyfile | 257 - .../support/buildbot/BreakpadSymbols | 48 - metamod-source/support/buildbot/PackageScript | 60 - metamod-source/support/buildbot/Versioning | 44 - metamod-source/support/buildbot/bootstrap.py | 105 - metamod-source/support/buildbot/build_type | 1 - .../support/buildbot/buildconfig.json | 10 - .../support/buildbot/generate_headers.py | 86 - metamod-source/support/buildbot/helpers.pm | 174 - metamod-source/support/buildbot/package.pl | 118 - metamod-source/support/buildbot/startbuild.pl | 35 - metamod-source/support/buildbot/symstore.pl | 67 - .../support/buildbot/trigger_full_rebuild | 1 - .../support/buildbot/upload_symbols.py | 114 - metamod-source/support/changelog.txt | 230 - metamod-source/support/checkout-deps.ps1 | 135 - metamod-source/support/checkout-deps.sh | 137 - metamod-source/support/dll2lib.ps1 | 96 - metamod-source/support/metamod.vdf | 5 - metamod-source/support/metamod_linux64.vdf | 5 - metamod-source/support/metamod_osx64.vdf | 5 - metamod-source/support/metamod_win64.vdf | 5 - metamod-source/support/metaplugins.ini | 14 - .../MMSProjectTemplate.2005.vcproj | 160 - .../MMSProjectTemplate.2008.vcproj | 165 - .../VC/VCProjects/MMSProjectTemplate.ico | Bin 5430 -> 0 bytes .../VC/VCProjects/MMSProjectTemplate.vsz | 6 - .../Metamod/MMSProjectTemplate.vsdir | 1 - .../1033/Images/DottedHori.gif | Bin 43 -> 0 bytes .../1033/Images/DottedVert.gif | Bin 43 -> 0 bytes .../MMSProjectTemplate/1033/Images/spacer.gif | Bin 43 -> 0 bytes .../MMSProjectTemplate/1033/NewStyles.css | 782 -- .../MMSProjectTemplate/HTML/1033/default.htm | 571 - .../Images/MMSProjectTemplate.gif | Bin 2115 -> 0 bytes .../Images/MMSProjectTemplate_Background.gif | Bin 811 -> 0 bytes .../Scripts/1033/default.js | 554 - .../Templates/1033/ReadMe.txt | 5 - .../Templates/1033/StdMMS.h | 44 - .../Templates/1033/Templates.inf | 8 - .../Templates/1033/plugin.vcproj | 386 - .../Templates/1033/plugin.vdf | 5 - .../Templates/1033/plugin_engine.h | 127 - .../Templates/1033/plugin_hooks.cpp | 675 - .../Templates/1033/plugin_hooks.h | 278 - .../Templates/1033/plugin_mm.cpp | 197 - .../Templates/1033/plugin_mm.h | 164 - .../third_party/amtl/.appveyor/build.bat | 7 - .../amtl/.appveyor/setup_environment.bat | 7 - metamod-source/third_party/amtl/.clang-format | 60 - metamod-source/third_party/amtl/.gitignore | 2 - metamod-source/third_party/amtl/.gitmodules | 3 - metamod-source/third_party/amtl/.travis.yml | 82 - metamod-source/third_party/amtl/AMBuildScript | 160 - metamod-source/third_party/amtl/README.md | 271 - .../third_party/amtl/amtl/AMBuilder | 32 - .../amtl/amtl/am-allocator-policies.h | 73 - .../third_party/amtl/amtl/am-arithmetic.h | 67 - .../third_party/amtl/amtl/am-assert.h | 46 - .../third_party/amtl/amtl/am-bits.h | 257 - metamod-source/third_party/amtl/amtl/am-cxx.h | 104 - .../third_party/amtl/amtl/am-deque.h | 49 - .../third_party/amtl/amtl/am-enum.h | 92 - .../third_party/amtl/amtl/am-fixedarray.h | 166 - .../third_party/amtl/amtl/am-flags.h | 129 - .../third_party/amtl/amtl/am-float.h | 139 - .../third_party/amtl/amtl/am-function.h | 222 - .../third_party/amtl/amtl/am-hashmap.h | 188 - .../third_party/amtl/amtl/am-hashset.h | 161 - .../third_party/amtl/amtl/am-hashtable.h | 653 - .../third_party/amtl/amtl/am-inlinelist.h | 239 - .../third_party/amtl/amtl/am-linking.h | 45 - .../third_party/amtl/amtl/am-maybe.h | 151 - .../third_party/amtl/amtl/am-mutex.h | 65 - .../third_party/amtl/amtl/am-platform.h | 97 - .../third_party/amtl/amtl/am-priority-queue.h | 168 - .../third_party/amtl/amtl/am-raii.h | 129 - .../amtl/amtl/am-refcounting-threadsafe.h | 206 - .../third_party/amtl/amtl/am-refcounting.h | 323 - .../third_party/amtl/amtl/am-storagebuffer.h | 59 - .../third_party/amtl/amtl/am-string.h | 367 - .../third_party/amtl/amtl/am-thread.h | 113 - .../third_party/amtl/amtl/am-threadlocal.h | 185 - .../third_party/amtl/amtl/am-time.h | 82 - .../third_party/amtl/amtl/am-unused.h | 48 - .../third_party/amtl/amtl/am-utility.h | 83 - .../third_party/amtl/amtl/am-vector.h | 76 - .../amtl/amtl/experimental/am-argparser.cpp | 38 - .../amtl/amtl/experimental/am-argparser.h | 1047 -- .../amtl/amtl/os/am-fsutil-posix.h | 68 - .../amtl/amtl/os/am-fsutil-windows.h | 70 - .../third_party/amtl/amtl/os/am-fsutil.h | 44 - .../third_party/amtl/amtl/os/am-path.h | 67 - .../amtl/amtl/os/am-shared-library.h | 121 - .../amtl/amtl/os/am-system-errors.h | 71 - metamod-source/third_party/amtl/appveyor.yml | 6 - .../third_party/amtl/checkout-deps.sh | 83 - .../third_party/amtl/compat/stdcxx.cpp | 44 - metamod-source/third_party/amtl/configure.py | 27 - .../third_party/amtl/tests/AMBuild.tests | 66 - .../third_party/amtl/tests/main.cpp | 76 - .../third_party/amtl/tests/runner.h | 92 - .../third_party/amtl/tests/test-argparser.cpp | 213 - .../third_party/amtl/tests/test-bits.cpp | 62 - .../third_party/amtl/tests/test-callable.cpp | 178 - .../third_party/amtl/tests/test-deque.cpp | 121 - .../third_party/amtl/tests/test-flags.cpp | 70 - .../third_party/amtl/tests/test-hashmap.cpp | 125 - .../amtl/tests/test-inlinelist.cpp | 106 - .../amtl/tests/test-priority-queue.cpp | 53 - .../third_party/amtl/tests/test-raii.cpp | 67 - .../amtl/tests/test-refcounting.cpp | 119 - .../third_party/amtl/tests/test-string.cpp | 165 - .../third_party/amtl/tests/test-system.cpp | 69 - .../amtl/tests/test-threadlocal-threaded.cpp | 82 - .../tests/test-threadlocal-unthreaded.cpp | 43 - .../third_party/amtl/tests/test-time.cpp | 49 - .../third_party/amtl/tests/test-vector.cpp | 306 - .../amtl/third_party/googletest/.clang-format | 4 - .../amtl/third_party/googletest/.gitignore | 56 - .../amtl/third_party/googletest/.travis.yml | 71 - .../amtl/third_party/googletest/BUILD.bazel | 180 - .../third_party/googletest/CMakeLists.txt | 24 - .../third_party/googletest/CONTRIBUTING.md | 161 - .../amtl/third_party/googletest/LICENSE | 28 - .../amtl/third_party/googletest/Makefile.am | 14 - .../amtl/third_party/googletest/README.md | 128 - .../amtl/third_party/googletest/WORKSPACE | 8 - .../amtl/third_party/googletest/appveyor.yml | 103 - .../googletest/ci/build-linux-autotools.sh | 44 - .../googletest/ci/build-linux-bazel.sh | 36 - .../third_party/googletest/ci/env-linux.sh | 41 - .../amtl/third_party/googletest/ci/env-osx.sh | 41 - .../googletest/ci/get-nprocessors.sh | 48 - .../googletest/ci/install-linux.sh | 49 - .../third_party/googletest/ci/install-osx.sh | 39 - .../third_party/googletest/ci/log-config.sh | 51 - .../amtl/third_party/googletest/ci/travis.sh | 44 - .../amtl/third_party/googletest/configure.ac | 16 - .../googletest/googlemock/CMakeLists.txt | 225 - .../googletest/googlemock/CONTRIBUTORS | 40 - .../third_party/googletest/googlemock/LICENSE | 28 - .../googletest/googlemock/Makefile.am | 224 - .../googletest/googlemock/README.md | 293 - .../googletest/googlemock/cmake/gmock.pc.in | 10 - .../googlemock/cmake/gmock_main.pc.in | 10 - .../googletest/googlemock/configure.ac | 146 - .../googletest/googlemock/docs/CheatSheet.md | 588 - .../googletest/googlemock/docs/CookBook.md | 3660 ----- .../googletest/googlemock/docs/DesignDoc.md | 282 - .../googlemock/docs/Documentation.md | 15 - .../googletest/googlemock/docs/ForDummies.md | 447 - .../docs/FrequentlyAskedQuestions.md | 627 - .../googletest/googlemock/docs/KnownIssues.md | 19 - .../googlemock/include/gmock/gmock-actions.h | 1262 -- .../include/gmock/gmock-cardinalities.h | 153 - .../include/gmock/gmock-generated-actions.h | 2579 ---- .../gmock/gmock-generated-actions.h.pump | 833 -- .../gmock/gmock-generated-function-mockers.h | 1333 -- .../gmock-generated-function-mockers.h.pump | 348 - .../include/gmock/gmock-generated-matchers.h | 1486 -- .../gmock/gmock-generated-matchers.h.pump | 511 - .../gmock/gmock-generated-nice-strict.h | 459 - .../gmock/gmock-generated-nice-strict.h.pump | 179 - .../googlemock/include/gmock/gmock-matchers.h | 5207 ------- .../include/gmock/gmock-more-actions.h | 247 - .../include/gmock/gmock-more-matchers.h | 92 - .../include/gmock/gmock-spec-builders.h | 1919 --- .../googlemock/include/gmock/gmock.h | 96 - .../include/gmock/internal/custom/README.md | 16 - .../internal/custom/gmock-generated-actions.h | 10 - .../custom/gmock-generated-actions.h.pump | 12 - .../gmock/internal/custom/gmock-matchers.h | 36 - .../gmock/internal/custom/gmock-port.h | 39 - .../internal/gmock-generated-internal-utils.h | 278 - .../gmock-generated-internal-utils.h.pump | 137 - .../gmock/internal/gmock-internal-utils.h | 576 - .../include/gmock/internal/gmock-port.h | 88 - .../googletest/googlemock/msvc/2005/gmock.sln | 32 - .../googlemock/msvc/2005/gmock.vcproj | 191 - .../googlemock/msvc/2005/gmock_config.vsprops | 15 - .../googlemock/msvc/2005/gmock_main.vcproj | 187 - .../googlemock/msvc/2005/gmock_test.vcproj | 201 - .../googletest/googlemock/msvc/2010/gmock.sln | 46 - .../googlemock/msvc/2010/gmock.vcxproj | 145 - .../googlemock/msvc/2010/gmock_config.props | 19 - .../googlemock/msvc/2010/gmock_main.vcxproj | 151 - .../googlemock/msvc/2010/gmock_test.vcxproj | 176 - .../googletest/googlemock/msvc/2015/gmock.sln | 46 - .../googlemock/msvc/2015/gmock.vcxproj | 145 - .../googlemock/msvc/2015/gmock_config.props | 19 - .../googlemock/msvc/2015/gmock_main.vcxproj | 151 - .../googlemock/msvc/2015/gmock_test.vcxproj | 176 - .../googlemock/scripts/fuse_gmock_files.py | 240 - .../googlemock/scripts/generator/LICENSE | 203 - .../googlemock/scripts/generator/README | 34 - .../scripts/generator/README.cppclean | 115 - .../scripts/generator/cpp/__init__.py | 0 .../googlemock/scripts/generator/cpp/ast.py | 1736 --- .../scripts/generator/cpp/gmock_class.py | 227 - .../scripts/generator/cpp/gmock_class_test.py | 466 - .../scripts/generator/cpp/keywords.py | 59 - .../scripts/generator/cpp/tokenize.py | 287 - .../googlemock/scripts/generator/cpp/utils.py | 41 - .../googlemock/scripts/generator/gmock_gen.py | 31 - .../googlemock/scripts/gmock-config.in | 303 - .../googlemock/scripts/gmock_doctor.py | 640 - .../googletest/googlemock/scripts/upload.py | 1387 -- .../googlemock/scripts/upload_gmock.py | 78 - .../googletest/googlemock/src/gmock-all.cc | 46 - .../googlemock/src/gmock-cardinalities.cc | 155 - .../googlemock/src/gmock-internal-utils.cc | 203 - .../googlemock/src/gmock-matchers.cc | 572 - .../googlemock/src/gmock-spec-builders.cc | 879 -- .../googletest/googlemock/src/gmock.cc | 204 - .../googletest/googlemock/src/gmock_main.cc | 54 - .../googletest/googlemock/test/BUILD.bazel | 123 - .../googlemock/test/gmock-actions_test.cc | 1372 -- .../test/gmock-cardinalities_test.cc | 427 - .../test/gmock-generated-actions_test.cc | 1228 -- .../gmock-generated-function-mockers_test.cc | 657 - .../gmock-generated-internal-utils_test.cc | 130 - .../test/gmock-generated-matchers_test.cc | 1339 -- .../test/gmock-internal-utils_test.cc | 718 - .../googlemock/test/gmock-matchers_test.cc | 6790 --------- .../test/gmock-more-actions_test.cc | 708 - .../googlemock/test/gmock-nice-strict_test.cc | 510 - .../googlemock/test/gmock-port_test.cc | 42 - .../test/gmock-spec-builders_test.cc | 2770 ---- .../googlemock/test/gmock_all_test.cc | 50 - .../googlemock/test/gmock_ex_test.cc | 80 - .../googlemock/test/gmock_leak_test.py | 104 - .../googlemock/test/gmock_leak_test_.cc | 99 - .../googlemock/test/gmock_link2_test.cc | 39 - .../googlemock/test/gmock_link_test.cc | 39 - .../googlemock/test/gmock_link_test.h | 690 - .../googlemock/test/gmock_output_test.py | 181 - .../googlemock/test/gmock_output_test_.cc | 309 - .../test/gmock_output_test_golden.txt | 317 - .../googlemock/test/gmock_stress_test.cc | 321 - .../googletest/googlemock/test/gmock_test.cc | 181 - .../googlemock/test/gmock_test_utils.py | 108 - .../googletest/googletest/CMakeLists.txt | 319 - .../googletest/googletest/CONTRIBUTORS | 37 - .../third_party/googletest/googletest/LICENSE | 28 - .../googletest/googletest/Makefile.am | 336 - .../googletest/googletest/README.md | 318 - .../googletest/cmake/Config.cmake.in | 9 - .../googletest/googletest/cmake/gtest.pc.in | 9 - .../googletest/cmake/gtest_main.pc.in | 10 - .../googletest/cmake/internal_utils.cmake | 369 - .../googletest/codegear/gtest.cbproj | 138 - .../googletest/codegear/gtest.groupproj | 54 - .../googletest/codegear/gtest_all.cc | 38 - .../googletest/codegear/gtest_link.cc | 40 - .../googletest/codegear/gtest_main.cbproj | 82 - .../googletest/codegear/gtest_unittest.cbproj | 88 - .../googletest/googletest/configure.ac | 68 - .../googletest/googletest/docs/Pkgconfig.md | 146 - .../googletest/googletest/docs/PumpManual.md | 177 - .../googletest/googletest/docs/XcodeGuide.md | 93 - .../googletest/googletest/docs/advanced.md | 2520 ---- .../googletest/googletest/docs/faq.md | 770 - .../googletest/googletest/docs/primer.md | 566 - .../googletest/googletest/docs/samples.md | 22 - .../include/gtest/gtest-death-test.h | 344 - .../googletest/include/gtest/gtest-message.h | 255 - .../include/gtest/gtest-param-test.h | 1430 -- .../include/gtest/gtest-param-test.h.pump | 496 - .../googletest/include/gtest/gtest-printers.h | 953 -- .../googletest/include/gtest/gtest-spi.h | 237 - .../include/gtest/gtest-test-part.h | 184 - .../include/gtest/gtest-typed-test.h | 306 - .../googletest/include/gtest/gtest.h | 2366 ---- .../include/gtest/gtest_pred_impl.h | 359 - .../googletest/include/gtest/gtest_prod.h | 61 - .../include/gtest/internal/custom/README.md | 56 - .../gtest/internal/custom/gtest-port.h | 37 - .../gtest/internal/custom/gtest-printers.h | 42 - .../include/gtest/internal/custom/gtest.h | 37 - .../internal/gtest-death-test-internal.h | 280 - .../include/gtest/internal/gtest-filepath.h | 211 - .../include/gtest/internal/gtest-internal.h | 1320 -- .../include/gtest/internal/gtest-linked_ptr.h | 243 - .../internal/gtest-param-util-generated.h | 5546 -------- .../gtest-param-util-generated.h.pump | 279 - .../include/gtest/internal/gtest-param-util.h | 720 - .../include/gtest/internal/gtest-port-arch.h | 103 - .../include/gtest/internal/gtest-port.h | 2528 ---- .../include/gtest/internal/gtest-string.h | 167 - .../include/gtest/internal/gtest-type-util.h | 3348 ----- .../gtest/internal/gtest-type-util.h.pump | 314 - .../googletest/googletest/m4/acx_pthread.m4 | 363 - .../googletest/googletest/m4/gtest.m4 | 74 - .../googletest/msvc/2010/gtest-md.sln | 55 - .../googletest/msvc/2010/gtest-md.vcxproj | 149 - .../msvc/2010/gtest-md.vcxproj.filters | 18 - .../googletest/googletest/msvc/2010/gtest.sln | 55 - .../googletest/msvc/2010/gtest.vcxproj | 149 - .../msvc/2010/gtest.vcxproj.filters | 18 - .../msvc/2010/gtest_main-md.vcxproj | 154 - .../msvc/2010/gtest_main-md.vcxproj.filters | 18 - .../googletest/msvc/2010/gtest_main.vcxproj | 162 - .../msvc/2010/gtest_main.vcxproj.filters | 18 - .../msvc/2010/gtest_prod_test-md.vcxproj | 199 - .../2010/gtest_prod_test-md.vcxproj.filters | 26 - .../msvc/2010/gtest_prod_test.vcxproj | 191 - .../msvc/2010/gtest_prod_test.vcxproj.filters | 26 - .../msvc/2010/gtest_unittest-md.vcxproj | 188 - .../2010/gtest_unittest-md.vcxproj.filters | 18 - .../msvc/2010/gtest_unittest.vcxproj | 180 - .../msvc/2010/gtest_unittest.vcxproj.filters | 18 - .../googletest/samples/prime_tables.h | 126 - .../googletest/googletest/samples/sample1.cc | 66 - .../googletest/googletest/samples/sample1.h | 41 - .../googletest/samples/sample10_unittest.cc | 139 - .../googletest/samples/sample1_unittest.cc | 151 - .../googletest/googletest/samples/sample2.cc | 54 - .../googletest/googletest/samples/sample2.h | 81 - .../googletest/samples/sample2_unittest.cc | 107 - .../googletest/samples/sample3-inl.h | 172 - .../googletest/samples/sample3_unittest.cc | 149 - .../googletest/googletest/samples/sample4.cc | 54 - .../googletest/googletest/samples/sample4.h | 53 - .../googletest/samples/sample4_unittest.cc | 53 - .../googletest/samples/sample5_unittest.cc | 196 - .../googletest/samples/sample6_unittest.cc | 224 - .../googletest/samples/sample7_unittest.cc | 117 - .../googletest/samples/sample8_unittest.cc | 155 - .../googletest/samples/sample9_unittest.cc | 156 - .../googletest/googletest/scripts/common.py | 83 - .../googletest/scripts/fuse_gtest_files.py | 253 - .../googletest/scripts/gen_gtest_pred_impl.py | 730 - .../googletest/scripts/gtest-config.in | 274 - .../googletest/googletest/scripts/pump.py | 855 -- .../googletest/scripts/release_docs.py | 158 - .../googletest/googletest/scripts/upload.py | 1387 -- .../googletest/scripts/upload_gtest.py | 78 - .../googletest/googletest/src/gtest-all.cc | 47 - .../googletest/src/gtest-death-test.cc | 1573 --- .../googletest/src/gtest-filepath.cc | 385 - .../googletest/src/gtest-internal-inl.h | 1189 -- .../googletest/googletest/src/gtest-port.cc | 1322 -- .../googletest/src/gtest-printers.cc | 457 - .../googletest/src/gtest-test-part.cc | 104 - .../googletest/src/gtest-typed-test.cc | 118 - .../googletest/googletest/src/gtest.cc | 6061 -------- .../googletest/googletest/src/gtest_main.cc | 37 - .../googletest/googletest/test/BUILD.bazel | 524 - .../googletest-break-on-failure-unittest.py | 208 - .../googletest-break-on-failure-unittest_.cc | 86 - .../test/googletest-catch-exceptions-test.py | 233 - .../test/googletest-catch-exceptions-test_.cc | 292 - .../googletest/test/googletest-color-test.py | 127 - .../googletest/test/googletest-color-test_.cc | 62 - .../test/googletest-death-test-test.cc | 1422 -- .../test/googletest-death-test_ex_test.cc | 92 - .../test/googletest-env-var-test.py | 117 - .../test/googletest-env-var-test_.cc | 122 - .../test/googletest-filepath-test.cc | 651 - .../test/googletest-filter-unittest.py | 636 - .../test/googletest-filter-unittest_.cc | 137 - .../test/googletest-json-outfiles-test.py | 162 - .../test/googletest-json-output-unittest.py | 618 - .../test/googletest-linked-ptr-test.cc | 151 - .../test/googletest-list-tests-unittest.py | 205 - .../test/googletest-list-tests-unittest_.cc | 156 - .../test/googletest-listener-test.cc | 311 - .../test/googletest-message-test.cc | 158 - .../test/googletest-options-test.cc | 217 - .../googletest-output-test-golden-lin.txt | 1047 -- .../googletest/test/googletest-output-test.py | 347 - .../test/googletest-output-test_.cc | 1108 -- ...oogletest-param-test-invalid-name1-test.py | 63 - ...ogletest-param-test-invalid-name1-test_.cc | 50 - ...oogletest-param-test-invalid-name2-test.py | 62 - ...ogletest-param-test-invalid-name2-test_.cc | 55 - .../test/googletest-param-test-test.cc | 1050 -- .../test/googletest-param-test-test.h | 51 - .../test/googletest-param-test2-test.cc | 61 - .../googletest/test/googletest-port-test.cc | 1300 -- .../test/googletest-printers-test.cc | 1637 --- .../test/googletest-shuffle-test.py | 323 - .../test/googletest-shuffle-test_.cc | 102 - .../test/googletest-test-part-test.cc | 232 - .../googletest/test/googletest-test2_test.cc | 61 - .../test/googletest-throw-on-failure-test.py | 169 - .../test/googletest-throw-on-failure-test_.cc | 71 - .../test/googletest-uninitialized-test.py | 67 - .../test/googletest-uninitialized-test_.cc | 42 - .../googletest/test/gtest-typed-test2_test.cc | 44 - .../googletest/test/gtest-typed-test_test.cc | 461 - .../googletest/test/gtest-typed-test_test.h | 65 - .../test/gtest-unittest-api_test.cc | 340 - .../googletest/test/gtest_all_test.cc | 47 - .../test/gtest_assert_by_exception_test.cc | 117 - .../googletest/test/gtest_environment_test.cc | 188 - .../googletest/test/gtest_help_test.py | 170 - .../googletest/test/gtest_help_test_.cc | 45 - .../googletest/test/gtest_json_test_utils.py | 60 - .../test/gtest_list_output_unittest.py | 141 - .../test/gtest_list_output_unittest_.cc | 51 - .../googletest/test/gtest_main_unittest.cc | 44 - .../googletest/test/gtest_no_test_unittest.cc | 54 - .../test/gtest_pred_impl_unittest.cc | 2427 ---- .../test/gtest_premature_exit_test.cc | 126 - .../googletest/test/gtest_prod_test.cc | 56 - .../googletest/test/gtest_repeat_test.cc | 234 - .../googletest/test/gtest_skip_test.cc | 38 - .../googletest/test/gtest_sole_header_test.cc | 56 - .../googletest/test/gtest_stress_test.cc | 249 - .../gtest_test_macro_stack_footprint_test.cc | 89 - .../googletest/test/gtest_test_utils.py | 315 - .../googletest/test/gtest_testbridge_test.py | 63 - .../googletest/test/gtest_testbridge_test_.cc | 43 - .../test/gtest_throw_on_failure_ex_test.cc | 90 - .../googletest/test/gtest_unittest.cc | 7499 ---------- .../test/gtest_xml_outfile1_test_.cc | 47 - .../test/gtest_xml_outfile2_test_.cc | 47 - .../test/gtest_xml_outfiles_test.py | 140 - .../test/gtest_xml_output_unittest.py | 383 - .../test/gtest_xml_output_unittest_.cc | 179 - .../googletest/test/gtest_xml_test_utils.py | 196 - .../googletest/googletest/test/production.cc | 35 - .../googletest/googletest/test/production.h | 54 - .../xcode/Config/DebugProject.xcconfig | 30 - .../xcode/Config/FrameworkTarget.xcconfig | 17 - .../googletest/xcode/Config/General.xcconfig | 41 - .../xcode/Config/ReleaseProject.xcconfig | 32 - .../xcode/Config/StaticLibraryTarget.xcconfig | 18 - .../xcode/Config/TestTarget.xcconfig | 8 - .../googletest/xcode/Resources/Info.plist | 30 - .../xcode/Samples/FrameworkSample/Info.plist | 28 - .../WidgetFramework.xcodeproj/project.pbxproj | 457 - .../xcode/Samples/FrameworkSample/runtests.sh | 62 - .../xcode/Samples/FrameworkSample/widget.cc | 63 - .../xcode/Samples/FrameworkSample/widget.h | 59 - .../Samples/FrameworkSample/widget_test.cc | 68 - .../googletest/xcode/Scripts/runtests.sh | 65 - .../xcode/Scripts/versiongenerate.py | 100 - .../xcode/gtest.xcodeproj/project.pbxproj | 1182 -- .../amtl/tools/restyler/.clang-format | 1 - .../amtl/tools/restyler/.gitignore | 1 - .../third_party/amtl/tools/restyler/Makefile | 136 - .../third_party/amtl/tools/restyler/README.md | 18 - .../amtl/tools/restyler/amstyler.cpp | 781 -- .../amtl/tools/restyler/test/amstyler_in.cpp | 62 - .../amtl/tools/restyler/test/amstyler_out.cpp | 69 - metamod-source/versionlib/AMBuildScript | 15 - metamod-source/versionlib/versionlib.cpp | 32 - metamod-source/versionlib/versionlib.h | 47 - 653 files changed, 1 insertion(+), 216741 deletions(-) delete mode 100644 metamod-source/.github/workflows/ci.yml delete mode 100644 metamod-source/.gitignore delete mode 100644 metamod-source/.gitmodules delete mode 100644 metamod-source/.travis.yml delete mode 100644 metamod-source/AMBuildScript delete mode 100644 metamod-source/LICENSE.txt delete mode 100644 metamod-source/README.md delete mode 100644 metamod-source/appveyor.yml delete mode 100644 metamod-source/configure.py delete mode 100644 metamod-source/core/AMBuilder delete mode 100644 metamod-source/core/IPluginManager.h delete mode 100644 metamod-source/core/ISmmAPI.h delete mode 100644 metamod-source/core/ISmmPlugin.h delete mode 100644 metamod-source/core/ISmmPluginExt.h delete mode 100644 metamod-source/core/gamedll_bridge.cpp delete mode 100644 metamod-source/core/metamod.cpp delete mode 100644 metamod-source/core/metamod.h delete mode 100644 metamod-source/core/metamod_console.cpp delete mode 100644 metamod-source/core/metamod_console.h delete mode 100644 metamod-source/core/metamod_oslink.cpp delete mode 100644 metamod-source/core/metamod_oslink.h delete mode 100644 metamod-source/core/metamod_plugins.cpp delete mode 100644 metamod-source/core/metamod_plugins.h delete mode 100644 metamod-source/core/metamod_provider.h delete mode 100644 metamod-source/core/metamod_util.cpp delete mode 100644 metamod-source/core/metamod_util.h delete mode 100644 metamod-source/core/provider/provider_base.cpp delete mode 100644 metamod-source/core/provider/provider_base.h delete mode 100644 metamod-source/core/provider/source/provider_source.cpp delete mode 100644 metamod-source/core/provider/source/provider_source.h delete mode 100644 metamod-source/core/provider/source/provider_source_console.cpp delete mode 100644 metamod-source/core/provider/source2/provider_source2.cpp delete mode 100644 metamod-source/core/provider/source2/provider_source2.h delete mode 100644 metamod-source/core/sourcehook/FastDelegate.h delete mode 100644 metamod-source/core/sourcehook/generate/generate delete mode 100644 metamod-source/core/sourcehook/generate/generate.bat delete mode 100644 metamod-source/core/sourcehook/generate/shworker.bin delete mode 100644 metamod-source/core/sourcehook/generate/shworker/Makefile delete mode 100644 metamod-source/core/sourcehook/generate/shworker/fd_hopter.cpp delete mode 100644 metamod-source/core/sourcehook/generate/shworker/msvc7/shworker.vcproj delete mode 100644 metamod-source/core/sourcehook/generate/shworker/msvc8/shworker.vcproj delete mode 100644 metamod-source/core/sourcehook/generate/shworker/msvc9/shworker.sln delete mode 100644 metamod-source/core/sourcehook/generate/shworker/msvc9/shworker.vcproj delete mode 100644 metamod-source/core/sourcehook/generate/shworker/shworker.cpp delete mode 100644 metamod-source/core/sourcehook/generate/sourcehook.hxx delete mode 100644 metamod-source/core/sourcehook/sh_list.h delete mode 100644 metamod-source/core/sourcehook/sh_memfuncinfo.h delete mode 100644 metamod-source/core/sourcehook/sh_memory.h delete mode 100644 metamod-source/core/sourcehook/sh_pagealloc.h delete mode 100644 metamod-source/core/sourcehook/sh_stack.h delete mode 100644 metamod-source/core/sourcehook/sh_string.h delete mode 100644 metamod-source/core/sourcehook/sh_tinyhash.h delete mode 100644 metamod-source/core/sourcehook/sh_vector.h delete mode 100644 metamod-source/core/sourcehook/sourcehook.cpp delete mode 100644 metamod-source/core/sourcehook/sourcehook.h delete mode 100644 metamod-source/core/sourcehook/sourcehook_hookmangen.cpp delete mode 100644 metamod-source/core/sourcehook/sourcehook_hookmangen.h delete mode 100644 metamod-source/core/sourcehook/sourcehook_hookmangen_x86.h delete mode 100644 metamod-source/core/sourcehook/sourcehook_impl.h delete mode 100644 metamod-source/core/sourcehook/sourcehook_impl_chook.h delete mode 100644 metamod-source/core/sourcehook/sourcehook_impl_chookidman.cpp delete mode 100644 metamod-source/core/sourcehook/sourcehook_impl_chookidman.h delete mode 100644 metamod-source/core/sourcehook/sourcehook_impl_chookmaninfo.cpp delete mode 100644 metamod-source/core/sourcehook/sourcehook_impl_chookmaninfo.h delete mode 100644 metamod-source/core/sourcehook/sourcehook_impl_ciface.h delete mode 100644 metamod-source/core/sourcehook/sourcehook_impl_cleanuptask.h delete mode 100644 metamod-source/core/sourcehook/sourcehook_impl_cproto.cpp delete mode 100644 metamod-source/core/sourcehook/sourcehook_impl_cproto.h delete mode 100644 metamod-source/core/sourcehook/sourcehook_impl_cvfnptr.cpp delete mode 100644 metamod-source/core/sourcehook/sourcehook_impl_cvfnptr.h delete mode 100644 metamod-source/core/sourcehook/sourcehook_pibuilder.h delete mode 100644 metamod-source/core/sourcehook/test/AMBuilder delete mode 100644 metamod-source/core/sourcehook/test/Makefile delete mode 100644 metamod-source/core/sourcehook/test/generate.bat delete mode 100644 metamod-source/core/sourcehook/test/main.cpp delete mode 100644 metamod-source/core/sourcehook/test/msvc12/test.sln delete mode 100644 metamod-source/core/sourcehook/test/msvc12/test.vcxproj delete mode 100644 metamod-source/core/sourcehook/test/msvc12/test.vcxproj.filters delete mode 100644 metamod-source/core/sourcehook/test/msvc7/test.vcproj delete mode 100644 metamod-source/core/sourcehook/test/msvc8/test.vcproj delete mode 100644 metamod-source/core/sourcehook/test/sourcehook_test.h delete mode 100644 metamod-source/core/sourcehook/test/test.sln delete mode 100644 metamod-source/core/sourcehook/test/test.vcproj delete mode 100644 metamod-source/core/sourcehook/test/test1.cpp delete mode 100644 metamod-source/core/sourcehook/test/test2.cpp delete mode 100644 metamod-source/core/sourcehook/test/test3.cpp delete mode 100644 metamod-source/core/sourcehook/test/test4.cpp delete mode 100644 metamod-source/core/sourcehook/test/testbail.cpp delete mode 100644 metamod-source/core/sourcehook/test/testbail.h delete mode 100644 metamod-source/core/sourcehook/test/testbail2.cpp delete mode 100644 metamod-source/core/sourcehook/test/testevents.h delete mode 100644 metamod-source/core/sourcehook/test/testhookmangen.cpp delete mode 100644 metamod-source/core/sourcehook/test/testhookmangen.h delete mode 100644 metamod-source/core/sourcehook/test/testhookmangen.hxx delete mode 100644 metamod-source/core/sourcehook/test/testlist.cpp delete mode 100644 metamod-source/core/sourcehook/test/testmanual.cpp delete mode 100644 metamod-source/core/sourcehook/test/testmulti.cpp delete mode 100644 metamod-source/core/sourcehook/test/testoddthunks.cpp delete mode 100644 metamod-source/core/sourcehook/test/testrecall.cpp delete mode 100644 metamod-source/core/sourcehook/test/testreentr.cpp delete mode 100644 metamod-source/core/sourcehook/test/testref.cpp delete mode 100644 metamod-source/core/sourcehook/test/testrefret.cpp delete mode 100644 metamod-source/core/sourcehook/test/testvphooks.cpp delete mode 100644 metamod-source/core/version.rc delete mode 100644 metamod-source/core/vsp_bridge.cpp delete mode 100644 metamod-source/cruft/installer/Attach.cfg delete mode 100644 metamod-source/cruft/installer/Attach.dpr delete mode 100644 metamod-source/cruft/installer/HL2Launch.cfg delete mode 100644 metamod-source/cruft/installer/HL2Launch.dpr delete mode 100644 metamod-source/cruft/installer/MMS_Installer.cfg delete mode 100644 metamod-source/cruft/installer/MMS_Installer.dpr delete mode 100644 metamod-source/cruft/installer/MMS_Installer.res delete mode 100644 metamod-source/cruft/installer/UnitFunctions.pas delete mode 100644 metamod-source/cruft/installer/UnitInstall.pas delete mode 100644 metamod-source/cruft/installer/UnitPackSystem.pas delete mode 100644 metamod-source/cruft/installer/UnitSelectModPath.dfm delete mode 100644 metamod-source/cruft/installer/UnitSelectModPath.pas delete mode 100644 metamod-source/cruft/installer/UnitfrmMain.dfm delete mode 100644 metamod-source/cruft/installer/UnitfrmMain.pas delete mode 100644 metamod-source/cruft/installer/UnitfrmProxy.dfm delete mode 100644 metamod-source/cruft/installer/UnitfrmProxy.pas delete mode 100644 metamod-source/cruft/installer/del.bat delete mode 100644 metamod-source/cruft/installer/files/Readme.txt delete mode 100644 metamod-source/cruft/installer/install.bmp delete mode 100644 metamod-source/hl2sdk-manifests/README.md delete mode 100644 metamod-source/hl2sdk-manifests/SdkHelpers.ambuild delete mode 100644 metamod-source/hl2sdk-manifests/manifests/bgt.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/blade.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/bms.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/contagion.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/cs2.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/csgo.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/css.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/darkm.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/dods.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/doi.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/dota.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/episode1.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/eye.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/hl2dm.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/insurgency.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/l4d.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/l4d2.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/mcv.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/mock.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/nucleardawn.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/orangebox.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/portal2.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/pvkii.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/sdk2013.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/swarm.json delete mode 100644 metamod-source/hl2sdk-manifests/manifests/tf2.json delete mode 100644 metamod-source/hl2sdk-manifests/next-sdk-code.py delete mode 100644 metamod-source/loader/AMBuilder delete mode 100644 metamod-source/loader/gamedll.cpp delete mode 100644 metamod-source/loader/gamedll.h delete mode 100644 metamod-source/loader/loader.cpp delete mode 100644 metamod-source/loader/loader.h delete mode 100644 metamod-source/loader/loader_bridge.h delete mode 100644 metamod-source/loader/serverplugin.cpp delete mode 100644 metamod-source/loader/serverplugin.h delete mode 100644 metamod-source/loader/utility.cpp delete mode 100644 metamod-source/loader/utility.h delete mode 100644 metamod-source/loader/version.rc delete mode 100644 metamod-source/product.version delete mode 100644 metamod-source/public/metamod_version.h delete mode 100644 metamod-source/pushbuild.txt delete mode 100644 metamod-source/samples/s1_sample_mm/AMBuildScript delete mode 100644 metamod-source/samples/s1_sample_mm/README.md delete mode 100644 metamod-source/samples/s1_sample_mm/configure.py delete mode 100644 metamod-source/samples/s1_sample_mm/engine_wrappers.h delete mode 100644 metamod-source/samples/s1_sample_mm/msvc10/sample_mm.sln delete mode 100644 metamod-source/samples/s1_sample_mm/msvc10/sample_mm.vcxproj delete mode 100644 metamod-source/samples/s1_sample_mm/msvc10/sample_mm.vcxproj.filters delete mode 100644 metamod-source/samples/s1_sample_mm/msvc8/sample_mm.sln delete mode 100644 metamod-source/samples/s1_sample_mm/msvc8/sample_mm.vcproj delete mode 100644 metamod-source/samples/s1_sample_mm/msvc9/sample_mm.sln delete mode 100644 metamod-source/samples/s1_sample_mm/msvc9/sample_mm.vcproj delete mode 100644 metamod-source/samples/s1_sample_mm/product.version delete mode 100644 metamod-source/samples/s1_sample_mm/sample_mm.cpp delete mode 100644 metamod-source/samples/s1_sample_mm/sample_mm.h delete mode 100644 metamod-source/samples/s1_sample_mm/sample_mm.vdf delete mode 100644 metamod-source/samples/s1_stub_mm/Makefile delete mode 100644 metamod-source/samples/s1_stub_mm/README.md delete mode 100644 metamod-source/samples/s1_stub_mm/msvc10/stub_mm.sln delete mode 100644 metamod-source/samples/s1_stub_mm/msvc10/stub_mm.vcxproj delete mode 100644 metamod-source/samples/s1_stub_mm/msvc10/stub_mm.vcxproj.filters delete mode 100644 metamod-source/samples/s1_stub_mm/msvc8/stub_mm.sln delete mode 100644 metamod-source/samples/s1_stub_mm/msvc8/stub_mm.vcproj delete mode 100644 metamod-source/samples/s1_stub_mm/msvc9/stub_mm.sln delete mode 100644 metamod-source/samples/s1_stub_mm/msvc9/stub_mm.vcproj delete mode 100644 metamod-source/samples/s1_stub_mm/stub_mm.cpp delete mode 100644 metamod-source/samples/s1_stub_mm/stub_mm.h delete mode 100644 metamod-source/samples/s1_stub_mm/stub_mm.vdf delete mode 100644 metamod-source/samples/s2_sample_mm/AMBuildScript delete mode 100644 metamod-source/samples/s2_sample_mm/AMBuilder delete mode 100644 metamod-source/samples/s2_sample_mm/PackageScript delete mode 100644 metamod-source/samples/s2_sample_mm/README.md delete mode 100644 metamod-source/samples/s2_sample_mm/configure.py delete mode 100644 metamod-source/samples/s2_sample_mm/sample_mm.cpp delete mode 100644 metamod-source/samples/s2_sample_mm/sample_mm.h delete mode 100644 metamod-source/support/README.txt delete mode 100644 metamod-source/support/SourceMM.Doxyfile delete mode 100644 metamod-source/support/buildbot/BreakpadSymbols delete mode 100644 metamod-source/support/buildbot/PackageScript delete mode 100644 metamod-source/support/buildbot/Versioning delete mode 100644 metamod-source/support/buildbot/bootstrap.py delete mode 100644 metamod-source/support/buildbot/build_type delete mode 100644 metamod-source/support/buildbot/buildconfig.json delete mode 100644 metamod-source/support/buildbot/generate_headers.py delete mode 100644 metamod-source/support/buildbot/helpers.pm delete mode 100644 metamod-source/support/buildbot/package.pl delete mode 100644 metamod-source/support/buildbot/startbuild.pl delete mode 100644 metamod-source/support/buildbot/symstore.pl delete mode 100644 metamod-source/support/buildbot/trigger_full_rebuild delete mode 100644 metamod-source/support/buildbot/upload_symbols.py delete mode 100644 metamod-source/support/changelog.txt delete mode 100644 metamod-source/support/checkout-deps.ps1 delete mode 100644 metamod-source/support/checkout-deps.sh delete mode 100644 metamod-source/support/dll2lib.ps1 delete mode 100644 metamod-source/support/metamod.vdf delete mode 100644 metamod-source/support/metamod_linux64.vdf delete mode 100644 metamod-source/support/metamod_osx64.vdf delete mode 100644 metamod-source/support/metamod_win64.vdf delete mode 100644 metamod-source/support/metaplugins.ini delete mode 100644 metamod-source/support/msvc_project_templates/MMSProjectTemplate.2005.vcproj delete mode 100644 metamod-source/support/msvc_project_templates/MMSProjectTemplate.2008.vcproj delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCProjects/MMSProjectTemplate.ico delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCProjects/MMSProjectTemplate.vsz delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCProjects/Metamod/MMSProjectTemplate.vsdir delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/DottedHori.gif delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/DottedVert.gif delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/spacer.gif delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/NewStyles.css delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/HTML/1033/default.htm delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/MMSProjectTemplate.gif delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/MMSProjectTemplate_Background.gif delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Scripts/1033/default.js delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/ReadMe.txt delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/StdMMS.h delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/Templates.inf delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vcproj delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vdf delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_engine.h delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.cpp delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.h delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.cpp delete mode 100644 metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.h delete mode 100644 metamod-source/third_party/amtl/.appveyor/build.bat delete mode 100644 metamod-source/third_party/amtl/.appveyor/setup_environment.bat delete mode 100644 metamod-source/third_party/amtl/.clang-format delete mode 100644 metamod-source/third_party/amtl/.gitignore delete mode 100644 metamod-source/third_party/amtl/.gitmodules delete mode 100644 metamod-source/third_party/amtl/.travis.yml delete mode 100644 metamod-source/third_party/amtl/AMBuildScript delete mode 100644 metamod-source/third_party/amtl/README.md delete mode 100644 metamod-source/third_party/amtl/amtl/AMBuilder delete mode 100644 metamod-source/third_party/amtl/amtl/am-allocator-policies.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-arithmetic.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-assert.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-bits.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-cxx.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-deque.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-enum.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-fixedarray.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-flags.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-float.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-function.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-hashmap.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-hashset.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-hashtable.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-inlinelist.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-linking.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-maybe.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-mutex.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-platform.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-priority-queue.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-raii.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-refcounting-threadsafe.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-refcounting.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-storagebuffer.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-string.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-thread.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-threadlocal.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-time.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-unused.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-utility.h delete mode 100644 metamod-source/third_party/amtl/amtl/am-vector.h delete mode 100644 metamod-source/third_party/amtl/amtl/experimental/am-argparser.cpp delete mode 100644 metamod-source/third_party/amtl/amtl/experimental/am-argparser.h delete mode 100644 metamod-source/third_party/amtl/amtl/os/am-fsutil-posix.h delete mode 100644 metamod-source/third_party/amtl/amtl/os/am-fsutil-windows.h delete mode 100644 metamod-source/third_party/amtl/amtl/os/am-fsutil.h delete mode 100644 metamod-source/third_party/amtl/amtl/os/am-path.h delete mode 100644 metamod-source/third_party/amtl/amtl/os/am-shared-library.h delete mode 100644 metamod-source/third_party/amtl/amtl/os/am-system-errors.h delete mode 100644 metamod-source/third_party/amtl/appveyor.yml delete mode 100644 metamod-source/third_party/amtl/checkout-deps.sh delete mode 100644 metamod-source/third_party/amtl/compat/stdcxx.cpp delete mode 100644 metamod-source/third_party/amtl/configure.py delete mode 100644 metamod-source/third_party/amtl/tests/AMBuild.tests delete mode 100644 metamod-source/third_party/amtl/tests/main.cpp delete mode 100644 metamod-source/third_party/amtl/tests/runner.h delete mode 100644 metamod-source/third_party/amtl/tests/test-argparser.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-bits.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-callable.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-deque.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-flags.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-hashmap.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-inlinelist.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-priority-queue.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-raii.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-refcounting.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-string.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-system.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-threadlocal-threaded.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-threadlocal-unthreaded.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-time.cpp delete mode 100644 metamod-source/third_party/amtl/tests/test-vector.cpp delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/.clang-format delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/.gitignore delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/.travis.yml delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/BUILD.bazel delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/CMakeLists.txt delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/CONTRIBUTING.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/LICENSE delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/Makefile.am delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/README.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/WORKSPACE delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/appveyor.yml delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/ci/build-linux-autotools.sh delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/ci/build-linux-bazel.sh delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/ci/env-linux.sh delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/ci/env-osx.sh delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/ci/get-nprocessors.sh delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/ci/install-linux.sh delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/ci/install-osx.sh delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/ci/log-config.sh delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/ci/travis.sh delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/configure.ac delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/CMakeLists.txt delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/CONTRIBUTORS delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/LICENSE delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/Makefile.am delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/README.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/cmake/gmock.pc.in delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/cmake/gmock_main.pc.in delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/configure.ac delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/CheatSheet.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/CookBook.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/DesignDoc.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/Documentation.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/ForDummies.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/FrequentlyAskedQuestions.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/KnownIssues.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-actions.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-cardinalities.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h.pump delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-matchers.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-matchers.h.pump delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-nice-strict.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-matchers.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-more-actions.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-more-matchers.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/internal/custom/README.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-port.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/internal/gmock-port.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2005/gmock.sln delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2005/gmock.vcproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2005/gmock_config.vsprops delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2005/gmock_main.vcproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2005/gmock_test.vcproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2010/gmock.sln delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2010/gmock.vcxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2010/gmock_config.props delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2010/gmock_main.vcxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2010/gmock_test.vcxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2015/gmock.sln delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2015/gmock.vcxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2015/gmock_config.props delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2015/gmock_main.vcxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/msvc/2015/gmock_test.vcxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/fuse_gmock_files.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/generator/LICENSE delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/generator/README delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/generator/README.cppclean delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/generator/cpp/__init__.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/generator/cpp/ast.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/generator/cpp/gmock_class.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/generator/cpp/gmock_class_test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/generator/cpp/keywords.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/generator/cpp/tokenize.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/generator/cpp/utils.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/generator/gmock_gen.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/gmock-config.in delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/gmock_doctor.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/upload.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/scripts/upload_gmock.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/src/gmock-all.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/src/gmock-cardinalities.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/src/gmock-internal-utils.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/src/gmock-matchers.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/src/gmock-spec-builders.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/src/gmock.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/src/gmock_main.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/BUILD.bazel delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock-actions_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock-cardinalities_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock-generated-actions_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock-generated-function-mockers_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock-generated-internal-utils_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock-generated-matchers_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock-internal-utils_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock-matchers_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock-more-actions_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock-nice-strict_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock-port_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock-spec-builders_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock_all_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock_ex_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock_leak_test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock_leak_test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock_link2_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock_link_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock_link_test.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock_output_test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock_output_test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock_output_test_golden.txt delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock_stress_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googlemock/test/gmock_test_utils.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/CMakeLists.txt delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/CONTRIBUTORS delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/LICENSE delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/Makefile.am delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/README.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/cmake/Config.cmake.in delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/cmake/gtest.pc.in delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/cmake/gtest_main.pc.in delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/cmake/internal_utils.cmake delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/codegear/gtest.cbproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/codegear/gtest.groupproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/codegear/gtest_all.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/codegear/gtest_link.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/codegear/gtest_main.cbproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/codegear/gtest_unittest.cbproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/configure.ac delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/docs/Pkgconfig.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/docs/PumpManual.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/docs/XcodeGuide.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/docs/advanced.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/docs/faq.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/docs/primer.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/docs/samples.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/gtest-death-test.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/gtest-message.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/gtest-param-test.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/gtest-param-test.h.pump delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/gtest-printers.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/gtest-spi.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/gtest-test-part.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/gtest-typed-test.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/gtest.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/gtest_pred_impl.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/gtest_prod.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/custom/README.md delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/custom/gtest-port.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/custom/gtest-printers.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/custom/gtest.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/gtest-filepath.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/gtest-internal.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/gtest-param-util.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/gtest-port-arch.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/gtest-port.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/gtest-string.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h.pump delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/m4/acx_pthread.m4 delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/m4/gtest.m4 delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest-md.sln delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest-md.vcxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest-md.vcxproj.filters delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest.sln delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest.vcxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest.vcxproj.filters delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest_main-md.vcxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest_main-md.vcxproj.filters delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest_main.vcxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest_main.vcxproj.filters delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest_prod_test-md.vcxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest_prod_test-md.vcxproj.filters delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest_prod_test.vcxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest_prod_test.vcxproj.filters delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest_unittest-md.vcxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest_unittest-md.vcxproj.filters delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest_unittest.vcxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/msvc/2010/gtest_unittest.vcxproj.filters delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/prime_tables.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample1.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample1.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample10_unittest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample1_unittest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample2.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample2.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample2_unittest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample3-inl.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample3_unittest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample4.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample4.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample4_unittest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample5_unittest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample6_unittest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample7_unittest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample8_unittest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/samples/sample9_unittest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/scripts/common.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/scripts/fuse_gtest_files.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/scripts/gen_gtest_pred_impl.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/scripts/gtest-config.in delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/scripts/pump.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/scripts/release_docs.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/scripts/upload.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/scripts/upload_gtest.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/src/gtest-all.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/src/gtest-death-test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/src/gtest-filepath.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/src/gtest-internal-inl.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/src/gtest-port.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/src/gtest-printers.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/src/gtest-test-part.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/src/gtest-typed-test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/src/gtest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/src/gtest_main.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/BUILD.bazel delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-break-on-failure-unittest.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-break-on-failure-unittest_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-catch-exceptions-test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-catch-exceptions-test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-color-test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-color-test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-death-test-test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-death-test_ex_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-env-var-test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-env-var-test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-filepath-test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-filter-unittest.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-filter-unittest_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-json-outfiles-test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-json-output-unittest.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-linked-ptr-test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-list-tests-unittest.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-list-tests-unittest_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-listener-test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-message-test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-options-test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-output-test-golden-lin.txt delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-output-test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-output-test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-param-test-invalid-name1-test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-param-test-invalid-name1-test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-param-test-invalid-name2-test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-param-test-invalid-name2-test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-param-test-test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-param-test-test.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-param-test2-test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-port-test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-printers-test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-shuffle-test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-shuffle-test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-test-part-test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-test2_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-throw-on-failure-test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-throw-on-failure-test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-uninitialized-test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/googletest-uninitialized-test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest-typed-test2_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest-typed-test_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest-typed-test_test.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest-unittest-api_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_all_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_assert_by_exception_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_environment_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_help_test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_help_test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_json_test_utils.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_list_output_unittest.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_list_output_unittest_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_main_unittest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_no_test_unittest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_pred_impl_unittest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_premature_exit_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_prod_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_repeat_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_skip_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_sole_header_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_stress_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_test_macro_stack_footprint_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_test_utils.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_testbridge_test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_testbridge_test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_throw_on_failure_ex_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_unittest.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_xml_outfile1_test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_xml_outfile2_test_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_xml_outfiles_test.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_xml_output_unittest.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_xml_output_unittest_.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/gtest_xml_test_utils.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/production.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/test/production.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Config/DebugProject.xcconfig delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Config/FrameworkTarget.xcconfig delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Config/General.xcconfig delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Config/ReleaseProject.xcconfig delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Config/StaticLibraryTarget.xcconfig delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Config/TestTarget.xcconfig delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Resources/Info.plist delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Samples/FrameworkSample/Info.plist delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Samples/FrameworkSample/runtests.sh delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Samples/FrameworkSample/widget.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Samples/FrameworkSample/widget.h delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Samples/FrameworkSample/widget_test.cc delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Scripts/runtests.sh delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/Scripts/versiongenerate.py delete mode 100644 metamod-source/third_party/amtl/third_party/googletest/googletest/xcode/gtest.xcodeproj/project.pbxproj delete mode 100644 metamod-source/third_party/amtl/tools/restyler/.clang-format delete mode 100644 metamod-source/third_party/amtl/tools/restyler/.gitignore delete mode 100644 metamod-source/third_party/amtl/tools/restyler/Makefile delete mode 100644 metamod-source/third_party/amtl/tools/restyler/README.md delete mode 100644 metamod-source/third_party/amtl/tools/restyler/amstyler.cpp delete mode 100644 metamod-source/third_party/amtl/tools/restyler/test/amstyler_in.cpp delete mode 100644 metamod-source/third_party/amtl/tools/restyler/test/amstyler_out.cpp delete mode 100644 metamod-source/versionlib/AMBuildScript delete mode 100644 metamod-source/versionlib/versionlib.cpp delete mode 100644 metamod-source/versionlib/versionlib.h diff --git a/.gitmodules b/.gitmodules index eff4271f..e6e8f693 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "sdk"] path = sdk - url = https://github.com/alliedmodders/hl2sdk.git -[submodule "metamod-source"] - path = metamod-source - url = https://github.com/alliedmodders/metamod-source \ No newline at end of file + url = https://github.com/alliedmodders/hl2sdk.git \ No newline at end of file diff --git a/metamod-source/.github/workflows/ci.yml b/metamod-source/.github/workflows/ci.yml deleted file mode 100644 index 5bf437ef..00000000 --- a/metamod-source/.github/workflows/ci.yml +++ /dev/null @@ -1,131 +0,0 @@ -name: Continuous Integration -on: - push: - branches: - - master - pull_request: - branches: - - master -jobs: - test: - strategy: - matrix: - include: - - os: windows-latest - os_short: windows - compiler_cc: msvc-vs2022 - - os: windows-2019 - os_short: windows - compiler_cc: msvc-vs2019 - - os: ubuntu-latest - os_short: linux - compiler_cc: clang - compiler_cxx: clang++ - - os: ubuntu-20.04 - os_short: linux - compiler_cc: clang-6.0 - compiler_cxx: clang++-6.0 - compiler_install: clang-6.0 - fail-fast: false - runs-on: ${{ matrix.os }} - name: ${{ matrix.os_short }}-${{ matrix.compiler_cc }} - env: - SDKS: '["episode1","tf2","l4d2","csgo","dota"]' - DEPENDENCIES_FOLDER: dependencies - DEPENDENCIES_ROOT: ${{ github.workspace }}/dependencies - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - path: metamod-source - - - name: Select HL2SDKs - run: echo 'SDKS=["episode1","tf2","l4d2","cs2","insurgency"]' >> $GITHUB_ENV - - - name: Cache dependencies - uses: actions/cache@v3 - env: - cache-name: hl2sdk - with: - path: ${{ env.DEPENDENCIES_ROOT }} - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ join(fromJSON(env.SDKS), '') }} - restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}- - - # Setup Python for AMBuild - - uses: actions/setup-python@v4 - name: Setup Python 3.12 - with: - python-version: 3.12 - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip setuptools wheel - - - name: Install dependencies - shell: bash - run: | - mkdir -p ${{ env.DEPENDENCIES_FOLDER }} - cd ${{ env.DEPENDENCIES_FOLDER }} - - # Satisfy checkout-deps requirement for a "metamod-source" folder. - mkdir -p metamod-source - ../metamod-source/support/checkout-deps.sh -s ${{ join(fromJSON(env.SDKS)) }} - - - name: Install Linux dependencies - if: startsWith(runner.os, 'Linux') - run: | - sudo dpkg --add-architecture i386 - sudo apt-get update - sudo apt-get install -y --no-install-recommends \ - gcc-multilib g++-multilib libstdc++6 lib32stdc++6 \ - libc6-dev libc6-dev-i386 linux-libc-dev \ - linux-libc-dev:i386 lib32z1-dev ${{ matrix.compiler_install }} - - - name: Select clang compiler - if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS') - run: | - echo "CC=${{ matrix.compiler_cc }}" >> $GITHUB_ENV - echo "CXX=${{ matrix.compiler_cxx }}" >> $GITHUB_ENV - ${{ matrix.compiler_cc }} --version - ${{ matrix.compiler_cxx }} --version - - - name: Build - working-directory: metamod-source - run: | - mkdir build - cd build - python ../configure.py --enable-optimize --sdks=${{ join(fromJSON(env.SDKS)) }} --hl2sdk-root=${{ env.DEPENDENCIES_ROOT }} - ambuild - - - name: Test SourceHook (Optimized) - working-directory: metamod-source - shell: bash - # SourceHook tests are busted on Windows - continue-on-error: ${{ startsWith(runner.os, 'Windows') }} - run: | - mkdir build-sh-opt && cd build-sh-opt - python ../configure.py --enable-optimize --enable-tests --sdks= - ambuild - cd ./core/sourcehook/test/test_sourcehook - if [ -d "${{ matrix.os_short }}-x86" ]; then - ./${{ matrix.os_short }}-x86/test_sourcehook -v - fi - if [ -d "${{ matrix.os_short }}-x86_64" ]; then - ./${{ matrix.os_short }}-x86_64/test_sourcehook -v - fi - - - name: Test SourceHook (Debug) - working-directory: metamod-source - shell: bash - # SourceHook tests are busted on Windows - continue-on-error: ${{ startsWith(runner.os, 'Windows') }} - run: | - mkdir build-sh-debug && cd build-sh-debug - python ../configure.py --enable-debug --enable-tests --sdks= - ambuild - cd ./core/sourcehook/test/test_sourcehook - if [ -d "${{ matrix.os_short }}-x86" ]; then - ./${{ matrix.os_short }}-x86/test_sourcehook -v - fi - if [ -d "${{ matrix.os_short }}-x86_64" ]; then - ./${{ matrix.os_short }}-x86_64/test_sourcehook -v - fi diff --git a/metamod-source/.gitignore b/metamod-source/.gitignore deleted file mode 100644 index c2f678d9..00000000 --- a/metamod-source/.gitignore +++ /dev/null @@ -1,28 +0,0 @@ -# Binaries -*.dll -*.dylib -*.exe -*.so - -# Files generated by Visual Studio -*.aps -*.ncb -*.sdf -*.suo -*.user - -# Build directories -Debug.*/ -Release.*/ - -# Files generated by Mac OS X Finder -.DS_Store - -# Files generated by Windows Explorer -[Dd]esktop.ini -[Tt]humbs.db - -# AMBuild build directories -build/ -obj-*/ -.gdb_history diff --git a/metamod-source/.gitmodules b/metamod-source/.gitmodules deleted file mode 100644 index 94800b57..00000000 --- a/metamod-source/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "third_party/amtl"] - path = third_party/amtl - url = https://github.com/alliedmodders/amtl -[submodule "hl2sdk-manifests"] - path = hl2sdk-manifests - url = https://github.com/alliedmodders/hl2sdk-manifests diff --git a/metamod-source/.travis.yml b/metamod-source/.travis.yml deleted file mode 100644 index d45fa9b9..00000000 --- a/metamod-source/.travis.yml +++ /dev/null @@ -1,85 +0,0 @@ -git: - depth: 3 - -sudo: false -language: cpp -os: linux -dist: trusty -addons: - apt: - sources: - - ubuntu-toolchain-r-test - - llvm-toolchain-trusty-3.9 - - llvm-toolchain-trusty-4.0 - - llvm-toolchain-trusty-5.0 - packages: - - lib32stdc++6 - - lib32z1-dev - - libc6-dev-i386 - - linux-libc-dev - - g++-multilib -# - clang-3.6 -# - clang-3.8 -# - clang-4.0 -# - clang-5.0 -# - g++-6 -# - g++-6-multilib - - clang-3.9 - - g++-4.8-multilib - - g++-4.8 - - g++-4.9-multilib - - g++-4.9 - - g++-5-multilib - - g++-5 - - g++-7-multilib - - g++-7 - cache: - directories: - - ../mysql-5.0 - -matrix: - fast_finish: true - include: - - os: linux - sudo: false - language: cpp - addons: - apt: - packages: ['clang-3.6', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib'] - env: ['MATRIX_EVAL="CC=clang-3.6 && CXX=clang++-3.6"'] - - - os: linux - sudo: false - language: cpp - addons: - apt: - packages: ['clang-3.8', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib'] - env: ['MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8"'] - - - os: linux - sudo: false - language: cpp - addons: - apt: - sources: ['ubuntu-toolchain-r-test'] - packages: ['g++-6', 'g++-6-multilib', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib'] - env: ['MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"'] - -before_script: - - CHECKOUT_DIR=$PWD && cd .. && $CHECKOUT_DIR/support/checkout-deps.sh && cd $CHECKOUT_DIR -script: - - mkdir build && cd build - - PATH="~/.local/bin:$PATH" - - eval "${MATRIX_EVAL}" - - python ../configure.py --enable-optimize --sdks=episode1,tf2,l4d2,csgo,dota - - ambuild - - cd .. && mkdir build-sh-opt && cd build-sh-opt - - python ../configure.py --enable-optimize --enable-tests --sdks= - - ambuild - - ./core/sourcehook/test/test_sourcehook/linux-x86/test_sourcehook -v - - ./core/sourcehook/test/test_sourcehook/linux-x86_64/test_sourcehook -v - - cd .. && mkdir build-sh-debug && cd build-sh-debug - - python ../configure.py --enable-debug --enable-tests --sdks= - - ambuild - - ./core/sourcehook/test/test_sourcehook/linux-x86/test_sourcehook -v - - ./core/sourcehook/test/test_sourcehook/linux-x86_64/test_sourcehook -v diff --git a/metamod-source/AMBuildScript b/metamod-source/AMBuildScript deleted file mode 100644 index f4a8f246..00000000 --- a/metamod-source/AMBuildScript +++ /dev/null @@ -1,374 +0,0 @@ -# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: -import os, sys - -def ResolveEnvPath(env, folder): - if env in os.environ: - path = os.environ[env] - if os.path.isdir(path): - return path - else: - head = os.getcwd() - oldhead = None - while head != None and head != oldhead: - path = os.path.join(head, folder) - if os.path.isdir(path): - return path - oldhead = head - head, tail = os.path.split(head) - return None - -SdkHelpers = builder.Eval('hl2sdk-manifests/SdkHelpers.ambuild', { - 'Project': 'metamod' -}) - -class MMSConfig(object): - def __init__(self): - self.sdk_manifests = [] - self.sdks = {} - self.sdk_targets = [] - self.binaries = [] - self.generated_headers = None - self.versionlib = None - self.all_targets = [] - self.target_archs = set() - - if builder.options.targets: - target_archs = builder.options.targets.split(',') - else: - target_archs = ['x86'] - if builder.backend == 'amb2': - target_archs.append('x86_64') - - for arch in target_archs: - try: - cxx = builder.DetectCxx(target_arch = arch) - self.target_archs.add(cxx.target.arch) - except Exception as e: - # Error if archs were manually overridden. - if builder.options.targets: - raise - print('Skipping target {}: {}'.format(arch, e)) - continue - self.all_targets.append(cxx) - - if not self.all_targets: - raise Exception('No suitable C/C++ compiler was found.') - - def use_auto_versioning(self): - if builder.backend != 'amb2': - return False - return not getattr(builder.options, 'disable_auto_versioning', False) - - def detectProductVersion(self): - builder.AddConfigureFile('product.version') - - # For OS X dylib versioning - import re - with open(os.path.join(builder.sourcePath, 'product.version'), 'r') as fp: - productContents = fp.read() - m = re.match(r'(\d+)\.(\d+)\.(\d+).*', productContents) - if m == None: - self.productVersion = '1.0.0' - else: - major, minor, release = m.groups() - self.productVersion = '{0}.{1}.{2}'.format(major, minor, release) - - def findSdkPath(self, sdk_name): - dir_name = 'hl2sdk-{}'.format(sdk_name) - if builder.options.hl2sdk_root: - sdk_path = os.path.join(builder.options.hl2sdk_root, dir_name) - if os.path.exists(sdk_path): - return sdk_path - return ResolveEnvPath('HL2SDK{}'.format(sdk_name.upper()), dir_name) - - def shouldIncludeSdk(self, sdk): - if sdk.get('source2', False) and self.productVersion.startswith('1.'): - return False - return True - - def detectSDKs(self): - sdk_list = [s for s in builder.options.sdks.split(',') if s] - SdkHelpers.sdk_filter = self.shouldIncludeSdk - SdkHelpers.find_sdk_path = self.findSdkPath - SdkHelpers.findSdks(builder, self.all_targets, sdk_list) - - self.sdks = SdkHelpers.sdks - self.sdk_manifests = SdkHelpers.sdk_manifests - self.sdk_targets = SdkHelpers.sdk_targets - - def configure(self): - builder.AddConfigureFile('pushbuild.txt') - - for cxx in self.all_targets: - if cxx.target.arch not in ['x86', 'x86_64']: - raise Exception('Unknown target architecture: {0}'.format(arch)) - - self.configure_cxx(cxx) - - def configure_cxx(self, cxx): - if cxx.behavior == 'gcc': - cxx.defines += [ - 'stricmp=strcasecmp', - '_stricmp=strcasecmp', - '_snprintf=snprintf', - '_vsnprintf=vsnprintf', - 'HAVE_STDINT_H', - 'GNUC', - ] - cxx.cflags += [ - '-pipe', - '-fno-strict-aliasing', - '-Wall', - '-Werror', - '-Wno-uninitialized', - '-Wno-unused', - '-Wno-switch', - '-msse', - '-fPIC', - ] - - cxx.cxxflags += ['-std=c++17'] - if (cxx.version >= 'gcc-4.0') or cxx.family == 'clang': - cxx.cflags += ['-fvisibility=hidden'] - cxx.cxxflags += ['-fvisibility-inlines-hidden'] - cxx.cxxflags += [ - '-fno-exceptions', - '-fno-rtti', - '-fno-threadsafe-statics', - '-Wno-non-virtual-dtor', - '-Wno-overloaded-virtual', - '-Wno-register', - ] - if (cxx.version >= 'gcc-4.7' or cxx.family == 'clang'): - cxx.cxxflags += ['-Wno-delete-non-virtual-dtor'] - if cxx.family == 'gcc': - cxx.cflags += ['-mfpmath=sse'] - if cxx.family == 'clang': - cxx.cxxflags += ['-Wno-implicit-exception-spec-mismatch'] - if cxx.version >= 'clang-3.9' or cxx.version >= 'apple-clang-10.0': - cxx.cxxflags += ['-Wno-expansion-to-defined'] - if cxx.version >= 'clang-3.6' or cxx.version >= 'apple-clang-7.0': - cxx.cxxflags += ['-Wno-inconsistent-missing-override'] - if cxx.version >= 'apple-clang-5.1' or cxx.version >= 'clang-3.4': - cxx.cxxflags += ['-Wno-deprecated-register'] - else: - cxx.cxxflags += ['-Wno-deprecated'] - - # Work around SDK warnings. - if cxx.version >= 'clang-10.0' or cxx.version >= 'apple-clang-12.0': - cxx.cflags += [ - '-Wno-implicit-int-float-conversion', - '-Wno-tautological-overlap-compare', - ] - - elif cxx.like('msvc'): - if builder.options.debug == '1': - cxx.cflags += ['/MTd'] - cxx.linkflags += ['/NODEFAULTLIB:libcmt'] - else: - cxx.cflags += ['/MT'] - cxx.defines += [ - '_CRT_SECURE_NO_DEPRECATE', - '_CRT_SECURE_NO_WARNINGS', - '_CRT_NONSTDC_NO_DEPRECATE', - ] - cxx.cflags += [ - '/W3', - '/Zi', - '/std:c++17', - ] - cxx.cxxflags += ['/TP'] - - cxx.linkflags += [ - '/SUBSYSTEM:WINDOWS', - 'kernel32.lib', - 'user32.lib', - 'gdi32.lib', - 'winspool.lib', - 'comdlg32.lib', - 'advapi32.lib', - 'shell32.lib', - 'ole32.lib', - 'oleaut32.lib', - 'uuid.lib', - 'odbc32.lib', - 'odbccp32.lib', - ] - - # Optimization - if builder.options.opt == '1': - cxx.defines += ['NDEBUG'] - if cxx.behavior == 'gcc': - cxx.cflags += ['-O3'] - elif cxx.behavior == 'msvc': - cxx.cflags += ['/Ox', '/Zo'] - cxx.linkflags += ['/OPT:ICF', '/OPT:REF'] - - # Debugging - if builder.options.debug == '1': - cxx.defines += ['DEBUG', '_DEBUG'] - if cxx.behavior == 'gcc': - cxx.cflags += ['-g3'] - elif cxx.behavior == 'msvc': - cxx.cflags += ['/Od', '/RTC1'] - - # Don't omit the frame pointer. - # This needs to be after our optimization flags which could otherwise disable it. - if cxx.behavior == 'gcc': - cxx.cflags += ['-fno-omit-frame-pointer'] - elif cxx.behavior == 'msvc': - cxx.cflags += ['/Oy-'] - - # Platform-specifics - if cxx.target.platform == 'linux': - cxx.defines += ['LINUX', '_LINUX', 'POSIX', '_FILE_OFFSET_BITS=64'] - if cxx.family == 'gcc': - cxx.linkflags += ['-static-libgcc'] - elif cxx.family == 'clang': - cxx.linkflags += ['-lgcc_eh'] - cxx.linkflags += ['-static-libstdc++'] - elif cxx.target.platform == 'mac': - cxx.defines += ['OSX', '_OSX', 'POSIX'] - - if cxx.version >= 'apple-clang-10.0': - cxx.cflags += ['-mmacosx-version-min=10.9', '-stdlib=libc++'] - cxx.linkflags += [ - '-mmacosx-version-min=10.9', - ] - else: - cxx.cflags += ['-mmacosx-version-min=10.5'] - cxx.linkflags += [ - '-mmacosx-version-min=10.5', - ] - - cxx.linkflags += [ - '-stdlib=libc++', - '-lc++', - ] - cxx.cxxflags += ['-stdlib=libc++'] - elif cxx.target.platform == 'windows': - cxx.defines += ['WIN32', '_WINDOWS'] - - # Finish up. - cxx.defines += [ 'MMS_USE_VERSIONLIB' ] - cxx.includes += [ - os.path.join(builder.sourcePath, 'public'), - os.path.join(builder.sourcePath, 'third_party', 'amtl'), - ] - if self.use_auto_versioning(): - cxx.defines += ['MMS_GENERATED_BUILD'] - cxx.includes += [ - os.path.join(builder.buildPath, 'includes'), - os.path.join(builder.sourcePath, 'versionlib'), - ] - - def AddVersioning(self, binary): - if binary.compiler.target.platform == 'windows': - binary.sources += ['version.rc'] - binary.compiler.rcdefines += [ - 'BINARY_NAME="{0}"'.format(binary.outputFile), - 'RC_COMPILE' - ] - elif binary.compiler.target.platform == 'mac' and binary.type == 'library': - binary.compiler.postlink += [ - '-compatibility_version', '1.0.0', - '-current_version', self.productVersion - ] - if self.use_auto_versioning(): - binary.compiler.linkflags += [self.versionlib[binary.compiler.target.arch]] - binary.compiler.sourcedeps += MMS.generated_headers - if builder.options.breakpad_dump: - binary.compiler.symbol_files = 'separate' - return binary - - def Library(self, cxx, name): - binary = cxx.Library(name) - self.AddVersioning(binary) - - if binary.compiler.like('gcc'): - binary.sources += [ - os.path.join(builder.sourcePath, 'third_party', 'amtl', 'compat', 'stdcxx.cpp') - ] - - return binary - - def Program(self, compiler, name): - binary = compiler.Program(name) - compiler = binary.compiler - - self.AddVersioning(binary) - if '-static-libgcc' in binary.compiler.linkflags: - binary.compiler.linkflags.remove('-static-libgcc') - if '-lgcc_eh' in binary.compiler.linkflags: - binary.compiler.linkflags.remove('-lgcc_eh') - if binary.compiler.like('gcc'): - binary.compiler.linkflags += ['-lstdc++'] - return binary - - def StaticLibrary(self, cxx, name): - return cxx.StaticLibrary(name) - - def HL2Library(self, context, compiler, name, sdk): - binary = self.Library(compiler, name) - cxx = binary.compiler - - cxx.cxxincludes += [ - os.path.join(context.currentSourcePath), - os.path.join(context.currentSourcePath, 'sourcehook'), - os.path.join(context.sourcePath, 'loader'), - ] - - defines = [] - for other_sdk in self.sdk_manifests: - cxx.defines += ['SE_{}={}'.format(other_sdk['define'], other_sdk['code'])] - - if sdk['source2']: - cxx.defines += ['META_IS_SOURCE2'] - binary.sources += [ - os.path.join(sdk['path'], 'public', 'tier0', 'memoverride.cpp'), - os.path.join(sdk['path'], 'tier1', 'convar.cpp'), - ] - - SdkHelpers.configureCxx(context, binary, sdk) - - return binary - -if getattr(builder, 'target', None) is not None: - sys.stderr.write("Your output folder was configured for AMBuild 2.1, and Metamod:Source\n") - sys.stderr.write("is now configured to use AMBuild 2.2. Please remove your output folder\n") - sys.stderr.write("and reconfigure to continue.\n") - os._exit(1) - -MMS = MMSConfig() -MMS.detectProductVersion() -MMS.detectSDKs() -MMS.configure() - -if MMS.use_auto_versioning(): - MMS.generated_headers = builder.Build( - 'support/buildbot/Versioning', - { 'MMS': MMS } - ) - MMS.versionlib = builder.Build( - 'versionlib/AMBuildScript', - { 'MMS': MMS } - ) - -BuildScripts = [ - 'loader/AMBuilder', - 'core/AMBuilder', -] -if getattr(builder.options, 'enable_tests', False): - BuildScripts += [ - 'core/sourcehook/test/AMBuilder', - ] - -if builder.backend == 'amb2': - BuildScripts += [ - 'support/buildbot/PackageScript', - ] - -builder.Build(BuildScripts, { 'MMS': MMS }) - -if builder.options.breakpad_dump: - builder.Build('support/buildbot/BreakpadSymbols', { 'MMS': MMS }) diff --git a/metamod-source/LICENSE.txt b/metamod-source/LICENSE.txt deleted file mode 100644 index 2618fa42..00000000 --- a/metamod-source/LICENSE.txt +++ /dev/null @@ -1,29 +0,0 @@ -The software is Copyright (C) 2004-2008, Metamod:Source Development Team. - -Metamod:Source is distributed under the "zLib/libpng" license, which is reproduced -below: - ------------------------------------------------------------------------------ - -This software is provided "as-is", without any express or implied warranty. -In no event will the authors be held liable for any damages arising from -the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software in - a product, an acknowledgment in the product documentation would be - appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not - be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. - ------------------------------------------------------------------------------ - -The zLib/libpng license has been approved by the "Open Source Initiative" -organization. diff --git a/metamod-source/README.md b/metamod-source/README.md deleted file mode 100644 index 68365365..00000000 --- a/metamod-source/README.md +++ /dev/null @@ -1,57 +0,0 @@ -Metamod:Source -============== - -Metamod:Source - A C++ Plugin Environment and Detour Library for the Source Engine. - -Build instructions ------------------- - -Make sure ambuild2 is installed: https://github.com/alliedmodders/ambuild - -Clone the repo with submodules: -``` -git clone --recurse-submodules https://github.com/alliedmodders/metamod-source -``` - -Clone the SDK dependencies: -``` -cd .. -metamod-source/support/checkout-deps.sh -cd metamod-source -``` - -Configure the build: -``` -mkdir build -cd build -python ../configure.py -``` - -Build: -``` -ambuild -``` - -You can clone an individual SDK e.g.: -``` -cd .. -metamod-source/support/checkout-deps.sh -s episode1 -cd metamod-source -``` - -You can configure the build for an individual SDK e.g.: -``` -mkdir build -cd build -python ../configure.py --sdks episode1 -``` - -Stable build snapshots: - -Development build snapshots: - -General documentation: - -Detouring with SourceHook: - -Development: diff --git a/metamod-source/appveyor.yml b/metamod-source/appveyor.yml deleted file mode 100644 index a54246e6..00000000 --- a/metamod-source/appveyor.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: 1.0.{build} -image: Visual Studio 2015 -clone_folder: c:\projects\metamod-source -clone_depth: 1 -environment: - SDKS: csgo,l4d2,tf2,episode1,insurgency -install: -# https://www.appveyor.com/docs/windows-images-software/#python -- cmd: set PATH=C:\Python38;C:\Python38\Scripts;%PATH% -- cmd: git pull -- cmd: cd .. -- ps: metamod-source/support/checkout-deps.ps1 -SDKs ($env:SDKS -split ',') -- cmd: cd metamod-source -build_script: -- cmd: mkdir build -- cmd: cd build -- cmd: python ../configure.py --enable-optimize --sdks=%SDKS% --targets=x86,x86_64 -- cmd: ambuild diff --git a/metamod-source/configure.py b/metamod-source/configure.py deleted file mode 100644 index be24b8a3..00000000 --- a/metamod-source/configure.py +++ /dev/null @@ -1,38 +0,0 @@ -# vim: set sts=2 ts=8 sw=2 tw=99 et: -import sys -try: - from ambuild2 import run, util -except: - try: - import ambuild - sys.stderr.write('It looks like you have AMBuild 1 installed, but this project uses AMBuild 2.\n') - sys.stderr.write('Upgrade to the latest version of AMBuild to continue.\n') - except: - sys.stderr.write('AMBuild must be installed to build this project.\n') - sys.stderr.write('http://www.alliedmods.net/ambuild\n') - sys.exit(1) - -# Hack to show a decent upgrade message, which wasn't done until 2.2. -ambuild_version = getattr(run, 'CURRENT_API', '2.1') -if ambuild_version.startswith('2.1'): - sys.stderr.write("AMBuild 2.2 or higher is required; please update\n") - sys.exit(1) - -parser = run.BuildParser(sourcePath=sys.path[0], api='2.2') -parser.options.add_argument('--hl2sdk-root', type=str, dest='hl2sdk_root', default=None, - help='Root search folder for HL2SDKs') -parser.options.add_argument('--enable-debug', action='store_const', const='1', dest='debug', - help='Enable debugging symbols') -parser.options.add_argument('--enable-optimize', action='store_const', const='1', dest='opt', - help='Enable optimization') -parser.options.add_argument('-s', '--sdks', default='present', dest='sdks', - help='Build against specified SDKs; valid args are "all", "present", or ' - 'comma-delimited list of engine names') -parser.options.add_argument('--enable-tests', default=False, dest='enable_tests', action='store_true', - help='Build tests.') -parser.options.add_argument('--breakpad-dump', action='store_true', dest='breakpad_dump', - default=False, help='Dump and upload breakpad symbols') -parser.options.add_argument('--targets', type=str, dest='targets', default=None, - help="Override the target architecture (use commas to separate multiple targets).") -parser.options.add_argument('--disable-auto-versioning', action='store_true', dest='disable_auto_versioning') -parser.Configure() diff --git a/metamod-source/core/AMBuilder b/metamod-source/core/AMBuilder deleted file mode 100644 index 3adf7ad0..00000000 --- a/metamod-source/core/AMBuilder +++ /dev/null @@ -1,45 +0,0 @@ -# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: -import os - -for sdk_target in MMS.sdk_targets: - sdk = sdk_target.sdk - cxx = sdk_target.cxx - - name = 'metamod.' + sdk['extension'] - binary = MMS.HL2Library(builder, cxx, name, sdk) - - binary.sources += [ - 'metamod.cpp', - 'metamod_console.cpp', - 'metamod_oslink.cpp', - 'metamod_plugins.cpp', - 'metamod_util.cpp', - 'provider/provider_base.cpp', - 'sourcehook/sourcehook.cpp', - 'sourcehook/sourcehook_impl_chookidman.cpp', - 'sourcehook/sourcehook_impl_chookmaninfo.cpp', - 'sourcehook/sourcehook_impl_cproto.cpp', - 'sourcehook/sourcehook_impl_cvfnptr.cpp', - 'gamedll_bridge.cpp' - ] - - if sdk.get('source2', False): - binary.sources += [ - 'provider/source2/provider_source2.cpp', - ] - else: - binary.sources += [ - 'provider/source/provider_source.cpp', - 'provider/source/provider_source_console.cpp', - 'vsp_bridge.cpp' - ] - - if sdk['name'] == 'cs2': - binary.custom = [builder.tools.Protoc(protoc = sdk_target.protoc, sources = [ - os.path.join(sdk['path'], 'common', 'network_connection.proto'), - ])] - - if cxx.target.arch == 'x86': - binary.sources += ['sourcehook/sourcehook_hookmangen.cpp'] - nodes = builder.Add(binary) - MMS.binaries += [nodes] diff --git a/metamod-source/core/IPluginManager.h b/metamod-source/core/IPluginManager.h deleted file mode 100644 index ac0b7c03..00000000 --- a/metamod-source/core/IPluginManager.h +++ /dev/null @@ -1,158 +0,0 @@ -/* - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2008 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#ifndef _INCLUDE_METAMOD_IPLUGINMANAGER_H -#define _INCLUDE_METAMOD_IPLUGINMANAGER_H - -/** - * @brief Plugin Manager interface - * @file IPluginManager.h - */ - -#include - -namespace SourceMM -{ - /** - * @brief Load sources - */ - enum - { - Pl_BadLoad=0, - Pl_Console=-1, - Pl_File=-2, - Pl_MinId=1, - }; - - /** - * @brief Status of a plugin at runtime - */ - enum Pl_Status - { - Pl_NotFound=-4, - Pl_Error=-3, - Pl_Refused=-2, - Pl_Paused=-1, - Pl_Running=0, - }; - - /** - * @brief Programmatic management of the "loaded plugin" list. - */ - class ISmmPluginManager - { - public: - /** - * @brief Loads a plugin and returns its id. If this is called before DLLInit(), - * then the plugin is considered to be "hot" - it might refuse its own load later! - * Also, a hot plugin might not have an error message. - * - * @param file String containing file name. - * @param source Specifies who loaded the plugin. - * @param already Whether or not the plugin was already loaded. - * @param error String buffer for error messages. - * @param maxlen Maximum length of buffer. - * @return Id of plugin. - */ - virtual PluginId Load(const char *file, PluginId source, bool &already, char *error, size_t maxlen) =0; - - /** - * @brief Unloads a plugin. - * - * @param id Id of plugin - * @param force True to forcefully unload, false to let plugin opt-out. - * @param error String buffer for error messages - * @param maxlen Maximum length of buffer - * @return True on success, false otherwise - */ - virtual bool Unload(PluginId id, bool force, char *error, size_t maxlen) =0; - - /** - * @brief Pauses a plugin - * - * @param id Id of plugin - * @param error String buffer for error messages - * @param maxlen Maximum length of buffer - * @return True on success, false otherwise - */ - virtual bool Pause(PluginId id, char *error, size_t maxlen) =0; - - /** - * @brief Unpauses a plugin - * - * @param id Id of plugin - * @param error String buffer for error messages - * @param maxlen Maximum length of buffer - * @return True on success, false otherwise - */ - virtual bool Unpause(PluginId id, char *error, size_t maxlen) =0; - - /** - * @brief Unloads all plugins forcefully - * - * @return True on success, false otherwise - */ - virtual bool UnloadAll() =0; - - /** - * @brief Returns information about a plugin - * - * @param id Id of plugin - * @param file Pointer to store filename pointer, or NULL to ignore. - * @param status Pointer to store status, or NULL to ignore. - * @param source Pointer to store source, or NULL to ignore. - * @return True on success, false if not found - */ - virtual bool Query(PluginId id, const char **file, Pl_Status *status, PluginId *source) =0; - - /** - * @brief Checks another plugin's QueryRunning() status. - * - * @param id Id of plugin - * @param error Message buffer - * @param maxlength Size of error buffer - * @return Status value - */ - virtual bool QueryRunning(PluginId id, char *error, size_t maxlength) =0; - - /** - * @brief Returns the handle of a plugin (OS dependent meaning) - * - * @param id Id of plugin - * @param handle Pointer to store handle pointer, or NULL to ignore. - * @return True if plugin id is valid, false otherwise - */ - virtual bool QueryHandle(PluginId id, void **handle) =0; - }; -} - -#if !defined METAMOD_NO_AUTO_NAMESPACE -using namespace SourceMM; -#endif - -#endif //_INCLUDE_PLUGINMANAGER_H - diff --git a/metamod-source/core/ISmmAPI.h b/metamod-source/core/ISmmAPI.h deleted file mode 100644 index 2c2237df..00000000 --- a/metamod-source/core/ISmmAPI.h +++ /dev/null @@ -1,424 +0,0 @@ -/* - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2008 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#ifndef _INCLUDE_ISMM_API_H -#define _INCLUDE_ISMM_API_H - -/** - * @brief Core API calls that are provided to plugins. - * @file ISmmAPI.h - */ - -#include -#include -#include - -#if defined META_NO_HL2SDK -class CGlobalVars; -struct edict_t; -class ConCommandBase; -#else -#include -#endif - -#include -#include - -#define MMIFACE_SOURCEHOOK "ISourceHook" /**< ISourceHook Pointer */ -#define MMIFACE_PLMANAGER "IPluginManager" /**< SourceMM Plugin Functions */ -#define MMIFACE_SH_HOOKMANAUTOGEN "IHookManagerAutoGen" /**< SourceHook::IHookManagerAutoGen Pointer */ -#define IFACE_MAXNUM 999 /**< Maximum interface version */ - -#if defined META_IS_SOURCE2 -typedef CPlayerSlot MMSPlayer_t; -static const MMSPlayer_t MMSPlayer_INVALID = CPlayerSlot(-1); -#else -typedef edict_t* MMSPlayer_t; -static const MMSPlayer_t MMSPlayer_INVALID = nullptr; -#endif - -typedef void* (*CreateInterfaceFn)(const char *pName, int *pReturnCode); - -class IServerPluginCallbacks; - -namespace SourceMM -{ - class ISmmPlugin; - class IMetamodListener; - - /** - * The core API that Metamod:Source provides to plugins. - */ - class ISmmAPI - { - public: - /** - * @brief Logs a message through the HL2 log system. - * Note: Newlines are appended automatically. - * - * @param pl Plugin API pointer (used for tagging message) - * @param msg Formatted string. - */ - virtual void LogMsg(ISmmPlugin *pl, const char *msg, ...) =0; - - /** - * @brief Returns an interface factory for the HL2 engine. - * - * @param syn If syn is true, the synthetic wrapper is returned. - * If syn is false, the true function is returned. - * @return CreateInterfaceFn function pointer. - */ - virtual CreateInterfaceFn GetEngineFactory(bool syn=true) =0; - - /** - * @brief Returns an interface factory for the HL2 physics engine. - * - * @param syn If syn is true, the synthetic wrapper is returned. - * If syn is false, the true function is returned. - * @return CreateInterfaceFn function pointer. - */ - virtual CreateInterfaceFn GetPhysicsFactory(bool syn=true) =0; - - /** - * @brief Returns an interface factory for the HL2 file system. - * - * @param syn If syn is true, the synthetic wrapper is returned. - * If syn is false, the true function is returned. - * @return CreateInterfaceFn function pointer. - */ - virtual CreateInterfaceFn GetFileSystemFactory(bool syn=true) =0; - - /** - * @brief Returns an interface factory for the GameDLL. - * - * @param syn If syn is true, the synthetic wrapper is returned. - * If syn is false, the true function is returned. - * @return CreateInterfaceFn function pointer. - */ - virtual CreateInterfaceFn GetServerFactory(bool syn=true) =0; - - /** - * @brief Returns a CGlobalVars pointer from the HL2 Engine. - * - * @return CGlobalVars pointer. - */ - virtual CGlobalVars *GetCGlobals() =0; - - /** - * @brief Registers a ConCommandBase. - * - * @param plugin Parent plugin API pointer. - * @param pCommand ConCommandBase to register. - * @return True if successful, false otherwise. - */ - virtual bool RegisterConCommandBase(ISmmPlugin *plugin, ConCommandBase *pCommand) =0; - - /** - * @brief Unregisters a ConCommandBase. - * - * @param plugin Parent plugin API pointer. - * @param pCommand ConCommandBase to unlink. - */ - virtual void UnregisterConCommandBase(ISmmPlugin *plugin, ConCommandBase *pCommand) =0; - - /** - * @brief Prints an unformatted string to the remote server console. - * - * Note: Newlines are not added automatically. - * - * @param str Message string. - */ - virtual void ConPrint(const char *str) =0; - - /** - * @brief Prints a formatted message to the remote server console. - * - * Note: Newlines are not added automatically. - * - * @param fmt Formatted message. - */ - virtual void ConPrintf(const char *fmt, ...) =0; - - /** - * @brief Returns the Metamod Version numbers as major version and - * minor (API) version. Changes to minor version are guaranteed to be - * backwards compatible. Changes to major version are not. - * - * @param major Filled with the major API version number. - * @param minor Filled with the minor API version number. - * @param plvers Filled with the current plugin API version number. - * @param plmin Filled with the minimum plugin API version number - * supported. - */ - virtual void GetApiVersions(int &major, int &minor, int &plvers, int &plmin) =0; - - /** - * @brief Returns sourcehook API version and implementation version. - * - * @param shvers Filled with the SourceHook API version number. - * @param shimpl Filled with the SourceHook implementation number. - */ - virtual void GetShVersions(int &shvers, int &shimpl) =0; - - /** - * @brief Adds a Metamod listener. - * - * @param plugin Plugin interface pointer. - * @param pListener Listener interface pointer to add. - */ - virtual void AddListener(ISmmPlugin *plugin, IMetamodListener *pListener) =0; - - /** - * @brief Queries the metamod factory - * - * @param iface String containing interface name - * @param ret Optional pointer to store return status - * @param id Optional pointer to store id of plugin that - * overrode interface, 0 if none - * @return Returned pointer - */ - virtual void *MetaFactory(const char *iface, int *ret, PluginId *id) =0; - - /** - * @brief Given a base interface name, such as ServerGameDLL or - * ServerGameDLL003, reformats the string to increase the number, then - * returns the new number. This is the base function to InterfaceSearch() - * and VInterfaceMatch(). - * - * @param iface Input/output interface name. Must be writable. - * @param maxlength Maximum length of iface buffer. Must be at least - * strlen(iface)+4 chars. - * @return The newly incremented iface version number. - * @deprecated Use InterfaceSearch() or VInterfaceMatch instead. - */ - virtual int FormatIface(char iface[], size_t maxlength) =0; - - /** - * @brief Searches for an interface, eliminating the need to loop - * through FormatIface(). - * - * @param fn InterfaceFactory function. - * @param iface Interface string name. - * @param max Maximum version to look up. - * @param ret Last return code from interface factory function. - * @return Interface pointer, or NULL if not found. - */ - virtual void *InterfaceSearch(CreateInterfaceFn fn, - const char *iface, - int max, - int *ret) =0; - - /** - * @brief Returns the base directory of the game/server, equivalent to - * IVEngineServer::GetGameDir(), except the path is absolute. - * - * @return Static pointer to game's absolute basedir. - */ - virtual const char *GetBaseDir() =0; - - /** - * @brief Formats a file path to the local OS. - * - * Does not include any base directories. Note that all slashes and - * black slashes are reverted to the local OS's expectancy. - * - * @param buffer Destination buffer to store path. - * @param len Maximum length of buffer, including null - * terminator. - * @param fmt Formatted string. - * @param ... Arguments in the string. - * @return Number of bytes written, not including the null - * terminator. - */ - virtual size_t PathFormat(char *buffer, size_t len, const char *fmt, ...) =0; - - /** - * @brief Prints text in the specified client's console. Same as - * IVEngineServer::ClientPrintf except that it allows for string - * formatting. - * - * @param client Client edict pointer. - * @param fmt Formatted string to print to the client. - */ - virtual void ClientConPrintf(MMSPlayer_t client, const char *fmt, ...) =0; - - /** - * @brief Wrapper around InterfaceSearch(). Assumes no maximum. - * This is designed to replace the fact that searches only went upwards. - * The "V" is intended to convey that this is for Valve formatted - * interface strings. - * - * @param fn Interface factory function. - * @param iface Interface string. - * @param min Minimum value to search from. If zero, searching - * begins from the first available version regardless - * of the interface. Note that this can return - * interfaces EARLIER than the version specified. A - * value of -1 (default) specifies the string version - * as the minimum. Any other value specifices the - * minimum value to search from. - * @return Interface pointer, or NULL if not found. - */ - virtual void *VInterfaceMatch(CreateInterfaceFn fn, - const char *iface, - int min=-1) =0; - - /** - * @brief Tells SourceMM to add VSP hooking capability to plugins. - * - * Since this potentially uses more resources than it would otherwise, - * plugins have to explicitly enable the feature. Whether requested or - * not, if it is enabled, all plugins will get a pointer to the VSP - * listener through IMetamodListener. This will not be called more than - * once for a given plugin; if it is requested more than once, each - * successive call will only give the pointer to plugins which have not - * yet received it. - */ - virtual void EnableVSPListener() =0; - - /** - * @brief Returns the interface version of the GameDLL's IServerGameDLL - * implementation. - * - * @return Interface version of the loaded IServerGameDLL. - */ - virtual int GetGameDLLVersion() =0; - - /** - * @brief Returns the number of user messages in the GameDLL. - * - * @return Number of user messages, or -1 if SourceMM has - * failed to get user message list. - */ - virtual int GetUserMessageCount() =0; - - /** - * @brief Returns the index of the specified user message. - * - * @param name User message name. - * @param size Optional pointer to store size of user message. - * @return Message index, or -1 on failure. - */ - virtual int FindUserMessage(const char *name, int *size=NULL) =0; - - /** - * @brief Returns the name of the specified user message. - * - * @param index User message index. - * @param size Optional pointer to store size of user message. - * @return Message name, or NULL on failure. - */ - virtual const char *GetUserMessage(int index, int *size=NULL) =0; - - /** - * @brief Returns the highest interface version of IServerPluginCallbacks - * that the engine supports. This is useful for games that run on older - * versions of the Source engine, such as The Ship. - * - * @return Highest interface version of IServerPluginCallbacks. - * Returns 0 if SourceMM's VSP listener isn't - * currently enabled. - * @deprecated Use GetVSPInfo() instead. - */ - virtual int GetVSPVersion() =0; - - /** - * @brief Returns the engine interface that MM:S is using as a backend. - * - * The values will be one of the SOURCE_ENGINE_* constants from the top - * of this file. - * - * @return A SOURCE_ENGINE_* constant value. - */ - virtual int GetSourceEngineBuild() =0; - - /** - * @brief Returns the VSP listener loaded. - * - * This is useful for late-loading plugins which need to decide whether - * to add a listener or not (or need to get the pointer at all). - * - * @param pVersion Optional pointer to store the VSP version. - * @return IServerPluginCallbacks pointer, or NULL if an - * IMetamodListener event has yet to occur for - * EnableVSPListener(). - */ - virtual IServerPluginCallbacks *GetVSPInfo(int *pVersion) =0; - - /** - * @brief Formats a string. This is a platform safe wrapper around - * snprintf/_snprintf. - * - * @param buffer Buffer to write to. - * @param maxlength Maximum length of the buffer. - * @param format Format specifiers. - * @param ... Format arguments. - * @return Number of bytes actually written, not including - * the null terminator. - */ - virtual size_t Format(char *buffer, - size_t maxlength, - const char *format, - ...) =0; - - /** - * @brief Formats a string. This is a platform safe wrapper around - * vsnprintf/_vsnprintf. - * - * @param buffer Buffer to write to. - * @param maxlength Maximum length of the buffer. - * @param format Format specifiers. - * @param ap Format argument list. - * @return Number of bytes actually written, not including the - * null terminator. - */ - virtual size_t FormatArgs(char *buffer, - size_t maxlength, - const char *format, - va_list ap) =0; - }; -} - -#if !defined METAMOD_NO_AUTO_NAMESPACE -using namespace SourceMM; -#endif - -/** - * Version History - * - * 1.1.0 Bumped API to 1:0. The breaking changes occurred in SourceHook and the plugin API. - * 1.1.2 Added API call for generating iface names. - * 1.2 Added API more helper functions and new SourceHook version. - * 1.2.2 Added API for printing to client console (with string formatting). - * 1.3 Added new interface search API. - * 1.4 Added VSP listener and user message API. - * 1.5.0 Added API for getting highest supported version of IServerPluginCallbacks. - * 1.6.0 Added API for Orange Box. Broke backwards compatibility. - */ - -#endif //_INCLUDE_ISMM_API_H - diff --git a/metamod-source/core/ISmmPlugin.h b/metamod-source/core/ISmmPlugin.h deleted file mode 100644 index f0d185d7..00000000 --- a/metamod-source/core/ISmmPlugin.h +++ /dev/null @@ -1,552 +0,0 @@ -/* - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2008 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#ifndef _INCLUDE_ISMM_PLUGIN_H -#define _INCLUDE_ISMM_PLUGIN_H - -/** - * @brief Plugin API interface. - * @file ISmmPlugin.h These are callbacks that plugins can implement without hooks. - * The pure-virtual ISmmPlugin callbacks must be implemented for the load to load. - */ - -#include -#include -#include -#include - -#ifndef META_NO_HL2SDK -#if META_IS_SOURCE2 -#include -#else -#include -#endif -#endif - -class IServerPluginCallbacks; - -// Interface return status, binary-compatible with HL2SDK's IFACE_OK and IFACE_FAILED. -enum -{ - META_IFACE_OK = 0, - META_IFACE_FAILED -}; - -namespace SourceMM -{ - class ISmmAPI; - - /** - * @brief Callbacks that a plugin must expose. - */ - class ISmmPlugin - { - public: - /** - * @brief Called to request the plugin's API version. - * - * This is the first callback invoked, and always remains at the top - * of the virtual table. - * - * @return Plugin API version. - */ - virtual int GetApiVersion() - { - return METAMOD_PLAPI_VERSION; - } - - /** - * @brief Virtual destructor so GCC doesn't complain. - */ - virtual ~ISmmPlugin() - { - } - - public: - /** - * @brief Called on plugin load. - * - * This is called as DLLInit() executes - after the parameters are - * known, but before the original GameDLL function is called. - * Therefore, you cannot hook it, but you don't need to - Load() is - * basically your hook. You can override factories before the engine - * and gamedll exchange them. However, take care to note that if your - * plugin is unloaded, and the gamedll/engine have cached an interface - * you've passed, something will definitely crash. Be careful. - * - * @param id Internal id of plugin. Saved globally by PLUGIN_SAVEVARS() - * @param ismm External API for SourceMM. Saved globally by PLUGIN_SAVEVARS() - * @param error Error message buffer - * @param maxlength Size of error message buffer - * @param late Set to true if your plugin was loaded late (not at server load). - * @return True if successful, return false to reject the load. - */ - virtual bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlength, bool late) =0; - - /** - * @brief Called when all plugins have been loaded. - * - * This is called after DLLInit(), and thus the mod has been mostly initialized. - * It is also safe to assume that all other (automatically loaded) plugins are now - * ready to start interacting, because they are all loaded. - */ - virtual void AllPluginsLoaded() - { - } - - /** - * @brief Called when your plugin is "queried". - * - * This is useful for rejecting a loaded state. For example, if your - * plugin wants to stop operating, it can simply return false and copy - * an error message. This will notify other plugins or MM:S of - * something bad that happened. MM:S will not cache the return state, - * so if you return false, your plugin will not actually be paused or - * unloaded. This callback will be called when: - * - Another plugin requests it - * - Someone types "meta list", it will show up as "REFUSED" - * - When Metamod need to re-check the plugin's status - * - If the plugin does something like overload a factory, Metamod - * will make sure the Query() returns true before calling it. - * Also note that this query will only override Metamod when the - * plugin is running and not paused. - * - * @param error Buffer for error message, or NULL if none. - * @param maxlen Maximum length of error buffer. - * @return Status code - true for okay, false for badness. - */ - virtual bool QueryRunning(char *error, size_t maxlen) - { - return true; - } - - /** - * @brief Called on plugin unload. You can return false if you know - * your plugin is not capable of restoring critical states it modifies. - * - * @param error Error message buffer - * @param maxlen Size of error message buffer - * @return True on success, return false to request no unload. - */ - virtual bool Unload(char *error, size_t maxlen) - { - return true; - } - - /** - * @brief Called on plugin pause. - * - * @param error Error message buffer - * @param maxlen Size of error message buffer - * @return True on success, return false to request no pause. - */ - virtual bool Pause(char *error, size_t maxlen) - { - return true; - } - - /** - * @brief Called on plugin unpause. - * - * @param error Error message buffer - * @param maxlen Size of error message buffer - * @return True on success, return false to request no unpause. - */ - virtual bool Unpause(char *error, size_t maxlen) - { - return true; - } - public: - /** @brief Return author as string */ - virtual const char *GetAuthor() =0; - - /** @brief Return plugin name as string */ - virtual const char *GetName() =0; - - /** @brief Return a description as string */ - virtual const char *GetDescription() =0; - - /** @brief Return a URL as string */ - virtual const char *GetURL() =0; - - /** @brief Return quick license code as string */ - virtual const char *GetLicense() =0; - - /** @brief Return version as string */ - virtual const char *GetVersion() =0; - - /** @brief Return author as string */ - virtual const char *GetDate() =0; - - /** @brief Return author as string */ - virtual const char *GetLogTag() =0; - }; - - /** - * @brief Various events that Metamod can fire. - */ - class IMetamodListener - { - public: - /** - * @brief Called when a plugin is loaded. - * - * @param id Id of the plugin. - */ - virtual void OnPluginLoad(PluginId id) - { - } - - /** - * @brief Called when a plugin is unloaded. - * - * @param id Id of the plugin. - */ - virtual void OnPluginUnload(PluginId id) - { - } - - /** - * @brief Called when a plugin is paused. - * - * @param id Id of the plugin. - */ - virtual void OnPluginPause(PluginId id) - { - } - - /** - * @brief Called when a plugin is unpaused. - * - * @param id Id of the plugin. - */ - virtual void OnPluginUnpause(PluginId id) - { - } - - /** - * @brief Called when the level is loaded (after GameInit, before - * ServerActivate). - * - * To override this, hook IServerGameDLL::LevelInit(). - * - * @param pMapName Name of the map. - * @param pMapEntities Lump string of the map entities, in KeyValues - * format. - * @param pOldLevel Unknown. - * @param pLandmarkName Unknown. - * @param loadGame Unknown. - * @param background Unknown. - */ - virtual void OnLevelInit(char const *pMapName, - char const *pMapEntities, - char const *pOldLevel, - char const *pLandmarkName, - bool loadGame, - bool background) - { - } - - /** - * @brief Called when the level is shut down. May be called more than - * once. - */ - virtual void OnLevelShutdown() - { - } - - /** - * @brief Called when engineFactory() is used through Metamod:Source's - * wrapper. This can be used to provide interfaces to other plugins or - * the GameDLL. - * - * If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED. - * - * @param iface Interface string. - * @param ret Optional pointer to store return code. - * @return Generic pointer to the interface, or NULL if - * not found. - */ - virtual void *OnEngineQuery(const char *iface, int *ret) - { - if (ret) - { - *ret = META_IFACE_FAILED; - } - - return NULL; - } - - /** - * @brief Called when the physics factory is used through - * Metamod:Source's wrapper. This can be used to provide interfaces to - * other plugins. - * - * If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED. - * - * @param iface Interface string. - * @param ret Optional pointer to store return code. - * @return Generic pointer to the interface, or NULL if - * not found. - */ - virtual void *OnPhysicsQuery(const char *iface, int *ret) - { - if (ret) - { - *ret = META_IFACE_FAILED; - } - - return NULL; - } - - /** - * @brief Called when the filesystem factory is used through - * Metamod:Source's wrapper. This can be used to provide interfaces to - * other plugins. - * - * If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED. - * - * @param iface Interface string. - * @param ret Optional pointer to store return code. - * @return Generic pointer to the interface, or NULL if not - * found. - */ - virtual void *OnFileSystemQuery(const char *iface, int *ret) - { - if (ret) - { - *ret = META_IFACE_FAILED; - } - - return NULL; - } - - /** - * @brief Called when the server DLL's factory is used through - * Metamod:Source's wrapper. This can be used to provide interfaces to - * other plugins. - * - * If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED. - * - * @param iface Interface string. - * @param ret Optional pointer to store return code. - * @return Generic pointer to the interface, or NULL if not - * found. - */ - virtual void *OnGameDLLQuery(const char *iface, int *ret) - { - if (ret) - { - *ret = META_IFACE_FAILED; - } - - return NULL; - } - - /** - * @brief Called when Metamod's own factory is invoked. - * This can be used to provide interfaces to other plugins. - * - * If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED. - * - * @param iface Interface string. - * @param ret Optional pointer to store return code. - * @return Generic pointer to the interface, or NULL if not - * found. - */ - virtual void *OnMetamodQuery(const char *iface, int *ret) - { - if (ret) - { - *ret = META_IFACE_FAILED; - } - - return NULL; - } - - /** - * @brief Called when Metamod:Source acquires a valid - * IServerPluginCallbacks pointer to be used for hooking by plugins. - * - * This will only be called after a call to ISmmAPI::EnableVSPListener(). - * If called before GameInit, this callback will occur before LevelInit. - * Otherwise, it will be called on the first call after that. - * - * This callback is provided to all plugins regardless of which (or how - * many) called EnableVSPListener(), but only if at least one did in - * fact enable it, and only once for all plugins. That is, a late - * loading plugin should use ISmmAPI::GetVSPInfo() before relying on - * this callback. - * - * This callback is never called if Metamod:Source is in VSP mode. - * If in VSP mode, a VSP instance is automatically and always available - * via ISmmAPI::GetVSPInfo(), which should be called anyway (to handle - * late loading cases). - * - * @param iface Interface pointer. If NULL, then the VSP - * listening construct failed to initialize and - * is not available. - */ - virtual void OnVSPListening(IServerPluginCallbacks *iface) - { - } - - /** - * @brief Called when Metamod:Source is about to remove a concommand or - * convar. This can also be called if ISmmAPI::UnregisterConCmdBase is - * used by a plugin. - * - * @param id Id of the plugin that created the concommand or - * convar. - * @param pCommand Pointer to concommand or convar that is being - * removed. - */ - virtual void OnUnlinkConCommandBase(PluginId id, ConCommandBase *pCommand) - { - } - }; -} - -#if !defined METAMOD_NO_AUTO_NAMESPACE -using namespace SourceMM; -#endif - -#define PL_EXPOSURE CreateInterface -#define PL_EXPOSURE_C "CreateInterface" - -/** - * @brief Exposes the plugin to the MM:S loader. - * - * @param name Deprecated - should be a variable name (like name). - * @param var Name of the variable that contains the singleton. - * This macro automatically takes the address of it, so - * you should not pass a pointer to your plugin's - * singleton. - */ -#ifdef META_NO_HL2SDK -#define PL_EXPOSURE_FUNC(name, var) \ - SMM_API void *PL_EXPOSURE(const char *name, int *code) { \ - if (name && !strcmp(name, METAMOD_PLAPI_NAME)) { \ - return static_cast(&var); \ - } \ - return NULL; \ - } - -#else -// First param should be actual classname, not iface name, but we don't have that and it doesn't matter here. -#define PL_EXPOSURE_FUNC(name, var) EXPOSE_SINGLE_INTERFACE_GLOBALVAR(ISmmPlugin, ISmmPlugin, METAMOD_PLAPI_NAME, var); -#endif - -#define PLUGIN_EXPOSE(name, var) \ - ISmmAPI *g_SMAPI = NULL; \ - ISmmPlugin *g_PLAPI = NULL; \ - PluginId g_PLID = (PluginId)0; \ - SourceHook::ISourceHook *g_SHPtr = NULL; \ - PL_EXPOSURE_FUNC(name, var) - - - - - -/** - * @brief This should be in one of your header files, if you wish - * to use values like g_SHPtr in other files. - */ -#define PLUGIN_GLOBALVARS() \ - extern SourceHook::ISourceHook *g_SHPtr; \ - extern ISmmAPI *g_SMAPI; \ - extern ISmmPlugin *g_PLAPI; \ - extern PluginId g_PLID; - -/** - * @brief This should be the first line in your Load callback. - */ -#define PLUGIN_SAVEVARS() \ - g_SMAPI = ismm; \ - g_SHPtr = static_cast(ismm->MetaFactory(MMIFACE_SOURCEHOOK, NULL, NULL)); \ - g_PLAPI = static_cast(this); \ - g_PLID = id; - -#define META_LOG g_SMAPI->LogMsg -#define META_REGCMD(name) g_SMAPI->RegisterConCommandBase(g_PLAPI, name##_command) -#define META_REGCVAR(var) g_SMAPI->RegisterConCommandBase(g_PLAPI, var) -#define META_UNREGCMD(name) g_SMAPI->UnregisterConCommandBase(g_PLAPI, name##_command) -#define META_UNREGCVAR(var) g_SMAPI->UnregisterConCommandBase(g_PLAPI, var) -#define META_CONPRINT g_SMAPI->ConPrint -#define META_CONPRINTF g_SMAPI->ConPrintf - -/* Probably should use this up above someday */ -#define CONCMD_VARNAME(name) name##_command - -#if !defined SMM_API -#if defined __WIN32__ || defined _WIN32 || defined WIN32 - #define SMM_API extern "C" __declspec(dllexport) -#elif defined __GNUC__ - #define SMM_API extern "C" __attribute__ ((visibility("default"))) -#endif -#endif //!defined SMM_API - -/** - * @brief Macro for automatically getting a current or newer Valve interface. - * - * @param v_factory Factory method to use from ISmmAPI (such as engineFactory). - * @param v_var Variable name to store into. - * @param v_type Interface type (do not include the pointer/asterisk). - * @param v_name Interface name. - */ -#define GET_V_IFACE_CURRENT(v_factory, v_var, v_type, v_name) \ - v_var = (v_type *)ismm->VInterfaceMatch(ismm->v_factory(), v_name); \ - if (!v_var) \ - { \ - if (error && maxlen) \ - { \ - ismm->Format(error, maxlen, "Could not find interface: %s", v_name); \ - } \ - return false; \ - } - - /** - * @brief Same as GET_V_IFACE, except searches for any. - * - * @param v_factory Factory method to use from ISmmAPI (such as engineFactory). - * @param v_var Variable name to store into. - * @param v_type Interface type (do not include the pointer/asterisk). - * @param v_name Interface name. - */ -#define GET_V_IFACE_ANY(v_factory, v_var, v_type, v_name) \ - v_var = (v_type *)ismm->VInterfaceMatch(ismm->v_factory(), v_name, 0); \ - if (!v_var) \ - { \ - if (error && maxlen) \ - { \ - ismm->Format(error, maxlen, "Could not find interface: %s", v_name); \ - } \ - return false; \ - } - -#endif //_INCLUDE_ISMM_PLUGIN_H - diff --git a/metamod-source/core/ISmmPluginExt.h b/metamod-source/core/ISmmPluginExt.h deleted file mode 100644 index 73fe9c88..00000000 --- a/metamod-source/core/ISmmPluginExt.h +++ /dev/null @@ -1,194 +0,0 @@ -/* - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2009 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#ifndef _INCLUDE_METAMOD_SOURCE_PLUGIN_EXT_H_ -#define _INCLUDE_METAMOD_SOURCE_PLUGIN_EXT_H_ - -#include - -/** - * @file ISmmPluginExt.h Provides an alternate method for loading plugins, - * without needing to include the default headers and all their Half-Life baggage. - * - * @brief Definitions for extended plugin loading. - */ - -#define SOURCE_ENGINE_UNKNOWN 0 /**< Could not determine the engine version */ -#define SOURCE_ENGINE_ORIGINAL 1 /**< Original Source Engine (used by The Ship) */ -#define SOURCE_ENGINE_EPISODEONE 2 /**< Episode 1 Source Engine (second major SDK) */ -#define SOURCE_ENGINE_ORANGEBOX 3 /**< Orange Box Source Engine (third major SDK) */ -#define SOURCE_ENGINE_LEFT4DEAD 4 /**< Left 4 Dead */ -#define SOURCE_ENGINE_DARKMESSIAH 5 /**< Dark Messiah Multiplayer (based on original engine) */ -#define SOURCE_ENGINE_ORANGEBOXVALVE_DEPRECATED 6 /**< Orange Box Source Engine for Valve games (TF2/DOD:S/HL2DM) */ -#define SOURCE_ENGINE_LEFT4DEAD2 7 /**< Left 4 Dead 2 */ -#define SOURCE_ENGINE_ALIENSWARM 8 /**< Alien Swarm */ -#define SOURCE_ENGINE_BLOODYGOODTIME 9 /**< Bloody Good Time */ -#define SOURCE_ENGINE_EYE 10 /**< E.Y.E Divine Cybermancy */ -#define SOURCE_ENGINE_PORTAL2 11 /**< Portal 2 */ -#define SOURCE_ENGINE_CSGO 12 /**< Counter-Strike: Global Offensive */ -#define SOURCE_ENGINE_CSS 13 /**< Counter-Strike: Source (sometimes older version of Orange Box Valve) */ -#define SOURCE_ENGINE_DOTA 14 /**< Dota 2 */ -#define SOURCE_ENGINE_HL2DM 15 /**< Half-Life 2 Deathmatch */ -#define SOURCE_ENGINE_DODS 16 /**< Day of Defeat: Source */ -#define SOURCE_ENGINE_TF2 17 /**< Team Fortress 2 */ -#define SOURCE_ENGINE_NUCLEARDAWN 18 /**< Nuclear Dawn */ -#define SOURCE_ENGINE_SDK2013 19 /**< Source SDK 2013 */ -#define SOURCE_ENGINE_BLADE 20 /**< Blade Symphony */ -#define SOURCE_ENGINE_INSURGENCY 21 /**< Insurgency */ -#define SOURCE_ENGINE_CONTAGION 22 /**< Contagion */ -#define SOURCE_ENGINE_BMS 23 /**< Black Mesa Multiplayer */ -#define SOURCE_ENGINE_DOI 24 /**< Day of Infamy */ -#define SOURCE_ENGINE_MOCK 25 /**< Mock source engine */ -#define SOURCE_ENGINE_PVKII 26 /**< Pirates, Vikings, and Knights II */ -#define SOURCE_ENGINE_MCV 27 /**< Military Conflict: Vietnam */ -#define SOURCE_ENGINE_CS2 28 /**< Counter-Strike 2 */ - -#define METAMOD_PLAPI_VERSION 16 /**< Version of this header file */ -#define METAMOD_PLAPI_NAME "ISmmPlugin" /**< Name of the plugin interface */ - -namespace SourceMM -{ - class ISmmPlugin; - class ISmmAPI; - - /** - * @brief Used to uniquely identify plugins. - */ - typedef int PluginId; - - #define METAMOD_FAIL_API_V1 7 /**< Minimum API version to detect for V1 */ - #define METAMOD_FAIL_API_V2 14 /**< Minimum API version to detect for V2 */ - - /** - * Use this to instantiate a plugin that will always fail. - * This class definition works against major API versions 1 and 2. - */ - class ISmmFailPlugin - { - public: - /** - * @brief You must return METAMOD_FAIL_API_V1 or METAMOD_FAIL_API_V2 here, - * depending on which Metamod:Source version you detected. - */ - virtual int GetApiVersion() = 0; - - /** - * @brief Do not change. - */ - virtual ~ISmmFailPlugin() - { - } - - /** - * @brief Return false here -- fill in the error buffer appropriately. - * - * Do not ever return true. If you do, MM:S will crash because the class layout is - * incomplete against ISmmPlugin. - * - * @param id Ignore. - * @param ismm Ignore. - * @param error Error buffer (must be filled). - * @param maxlength Maximum size of error buffer. - * @param late Ignore. - * @return Must return false. - */ - virtual bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlength, bool late) =0; - }; -} - -typedef SourceMM::ISmmPlugin METAMOD_PLUGIN; - -/** - * @brief Contains version information. - */ -struct MetamodVersionInfo -{ - int api_major; /**< ISmmAPI major version */ - int api_minor; /**< ISmmAPI minor version */ - int sh_iface; /**< SourceHook interface version */ - int sh_impl; /**< SourceHook implementation version */ - int pl_min; /**< Plugin API minimum version */ - int pl_max; /**< Plugin API maximum version */ - int source_engine; /**< Source Engine version (SOURCE_* constants) */ - const char *game_dir; /**< Game directory name */ - - /** - * @brief Returns the game folder. - * - * @return Game folder, or NULL if not available on this version - * of Metamod:Source. - */ - inline const char *GetGameDir() const - { - if (pl_max < 15) - return NULL; - return game_dir; - } -}; - -/** - * @brief Contains information about loading a plugin. - */ -struct MetamodLoaderInfo -{ - const char *pl_file; /**< File path to the plugin being loaded. */ - const char *pl_path; /**< Folder path containing the plugin. */ -}; - -/** - * @brief If a function of this type is exposed as "CreateInterface_MMS", then - * Metamod:Source will attempt to call this function before calling - * CreateInterface. If this function returns a valid ISmmPlugin pointer, then - * CreateInterface will not be called. - * - * This is useful for implementing a mini-loader plugin for multiple versions. - * - * @param mvi MetamodVersionInfo structure. - * @param mli MetamodLoaderInfo structure. - * @return ISmmAPI pointer, or NULL if none. - */ -typedef METAMOD_PLUGIN *(*METAMOD_FN_LOAD)(const MetamodVersionInfo *mvi, - const MetamodLoaderInfo *mli); - -/** - * @brief If a function of this type is exposed as "UnloadInterface_MMS", then - * Metamod:Source will attempt to call this function after calling - * ISmmAPI::Unload(), and before closing the library. This lets loader plugins - * clean up before exiting. - * - * Note: This function will be ignored unless CreateInterfce_MMS was exposed. - * It may be called even if ISmmAPI::Unload() could not be called. - */ -typedef void (*METAMOD_FN_UNLOAD)(); - -/** - * @brief Original type of load function. CreateInterfaceFn from Valve. - * - * Plugins will expose this as "CreateInterface". - */ -typedef void *(*METAMOD_FN_ORIG_LOAD)(const char *, int *); - -#endif //INCLUDE_METAMOD_SOURCE_PLUGIN_EXT_H_ - diff --git a/metamod-source/core/gamedll_bridge.cpp b/metamod-source/core/gamedll_bridge.cpp deleted file mode 100644 index c5adc20f..00000000 --- a/metamod-source/core/gamedll_bridge.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2009 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#include -#include "metamod.h" -#include "metamod_plugins.h" -#include "metamod_util.h" -#include -#include "provider/provider_base.h" - -using namespace SourceMM; - -class GameDllBridge : public IGameDllBridge -{ -public: - virtual bool DLLInit_Pre(const gamedll_bridge_info *info, char *buffer, size_t maxlength) - { - server = (IServerGameDLL *) info->isgd; - g_Metamod.SetGameDLLInfo((CreateInterfaceFn)info->gsFactory, - info->dllInterfaceName, - info->dllVersion, - true); - g_Metamod.SetVSPListener(info->vsp_listener_path); - mm_InitializeGlobals((CreateInterfaceFn) info->engineFactory, - (CreateInterfaceFn) info->physicsFactory, - (CreateInterfaceFn) info->fsFactory, - (CGlobalVars*) info->pGlobals); - - if (!mm_DetectGameInformation()) - { - UTIL_Format(buffer, maxlength, "Metamod:Source failed to detect game paths; cannot load."); - return false; - } - - mm_InitializeForLoad(); - mm_StartupMetamod(false); - - return true; - } - virtual void DLLInit_Post(int *isgdUnload) - { - SourceHook::MemFuncInfo mfi; - - mfi.isVirtual = false; -#ifdef META_IS_SOURCE2 - SourceHook::GetFuncInfo(&IServerGameDLL::Shutdown, mfi); -#else - SourceHook::GetFuncInfo(&IServerGameDLL::DLLShutdown, mfi); -#endif - assert(mfi.isVirtual); - assert(mfi.vtbloffs == 0); - assert(mfi.thisptroffs == 0); - *isgdUnload = mfi.vtblindex; - - g_PluginMngr.SetAllLoaded(); - } - virtual void *QueryInterface(const char *iface, int *ret) - { - return g_Metamod.GetServerFactory(true)(iface, ret); - } - virtual void Unload() - { - mm_UnloadMetamod(); - } -}; - -GameDllBridge mm16_gamedll_bridge; - -SMM_API IGameDllBridge * -GetGameDllBridge() -{ - return &mm16_gamedll_bridge; -} - diff --git a/metamod-source/core/metamod.cpp b/metamod-source/core/metamod.cpp deleted file mode 100644 index bfe44d09..00000000 --- a/metamod-source/core/metamod.cpp +++ /dev/null @@ -1,1240 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2010 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#include -#include "metamod_oslink.h" -#include "metamod.h" -#include -#include -#include -#include "metamod_provider.h" -#include "metamod_plugins.h" -#include "metamod_util.h" -#include "metamod_console.h" -#include "provider/provider_base.h" -#include - -#define X64_SUFFIX ".x64" - -using namespace SourceMM; -using namespace SourceHook; -using namespace SourceHook::Impl; - -/** - * @brief Implementation of main SourceMM GameDLL functionality - * @file sourcemm.cpp - */ - -static void -InitializeVSP(); - -static void -DoInitialPluginLoads(); - -static int -LoadPluginsFromFile(const char *filepath, int &skipped); - -static int -LoadVDFPluginsFromDir(const char *dir, int &skipped); - -struct game_dll_t -{ - CreateInterfaceFn factory; -}; - -static String mod_path; -static String metamod_path; -static String full_bin_path; -static int vsp_version = 0; -static int gamedll_version = 0; -static const char *gamedll_interface_name = nullptr; -static int engine_build = SOURCE_ENGINE_UNKNOWN; -static List gamedll_list; -static bool is_gamedll_loaded = false; -static bool in_first_level = true; -static bool is_game_init = false; -static bool vsp_load_requested = false; -static bool vsp_loaded = false; -static game_dll_t gamedll_info; -static MetamodSourceConVar *metamod_version = NULL; -static MetamodSourceConVar *mm_pluginsfile = NULL; -static MetamodSourceConVar *mm_basedir = NULL; -static CreateInterfaceFn engine_factory = NULL; -static CreateInterfaceFn physics_factory = NULL; -static CreateInterfaceFn filesystem_factory = NULL; -#if !defined( _WIN64 ) && !defined( __amd64__ ) -static CHookManagerAutoGen g_SH_HookManagerAutoGen(&g_SourceHook); -#endif -static META_RES last_meta_res; -static IServerPluginCallbacks *vsp_callbacks = NULL; -static bool were_plugins_loaded = false; -static bool g_bIsVspBridged = false; - -MetamodSource g_Metamod; -PluginId g_PLID = Pl_Console; -CSourceHookImpl g_SourceHook; -ISourceHook *g_SHPtr = &g_SourceHook; -SourceMM::ISmmAPI *g_pMetamod = &g_Metamod; - -/* Helper Macro */ -#define IFACE_MACRO(orig,nam) \ - CPluginManager::CPlugin *pl; \ - SourceHook::List::iterator event; \ - IMetamodListener *api; \ - int mret = 0; \ - void *val = NULL; \ - for (PluginIter iter = g_PluginMngr._begin(); iter != g_PluginMngr._end(); iter++) { \ - pl = (*iter); \ - for (event=pl->m_Events.begin(); event!=pl->m_Events.end(); event++) { \ - api = (*event); \ - mret = META_IFACE_FAILED; \ - if ( (val=api->On##nam##Query(iface, &mret)) != NULL ) { \ - if (ret) *ret = mret; \ - return val; \ - } \ - } \ - } \ - return (orig)(iface, ret); - -#define ITER_EVENT(evn, args) \ - CPluginManager::CPlugin *pl; \ - SourceHook::List::iterator event; \ - IMetamodListener *api; \ - for (PluginIter iter = g_PluginMngr._begin(); iter != g_PluginMngr._end(); iter++) { \ - pl = (*iter); \ - for (event=pl->m_Events.begin(); event!=pl->m_Events.end(); event++) { \ - api = (*event); \ - api->evn args; \ - } \ - } - -static class ProviderCallbacks : public IMetamodSourceProviderCallbacks -{ - virtual void OnGameInit() override - { - if (is_game_init) - return; - - provider->DisplayDevMsg("MMS: OnGameInit\n"); - - if (vsp_load_requested) - InitializeVSP(); - - if (g_bIsVspBridged && !were_plugins_loaded) - { - DoInitialPluginLoads(); - g_PluginMngr.SetAllLoaded(); - were_plugins_loaded = true; - } - - is_game_init = true; - } - - virtual void OnLevelInit(char const* pMapName, char const* pMapEntities, char const* pOldLevel, - char const* pLandmarkName, bool loadGame, bool background) override - { - provider->DisplayDevMsg("MMS: LevelInit\n"); - - ITER_EVENT(OnLevelInit, (pMapName, pMapEntities, pOldLevel, pLandmarkName, loadGame, background)); - } - - virtual void OnLevelShutdown() override - { - provider->DisplayDevMsg("MMS: LevelShutdown\n"); - - if (g_bIsVspBridged && !were_plugins_loaded) - { - DoInitialPluginLoads(); - g_PluginMngr.SetAllLoaded(); - were_plugins_loaded = true; - in_first_level = true; - } - - if (!in_first_level) - { - char filepath[PATH_SIZE], vdfpath[PATH_SIZE]; - - g_Metamod.PathFormat(filepath, - sizeof(filepath), - "%s/%s", - mod_path.c_str(), - provider->GetConVarString(mm_pluginsfile)); - g_Metamod.PathFormat(vdfpath, - sizeof(vdfpath), - "%s/%s", - mod_path.c_str(), - provider->GetConVarString(mm_basedir)); - mm_LoadPlugins(filepath, vdfpath); - } - else - { - in_first_level = false; - } - - ITER_EVENT(OnLevelShutdown, ()); - } - - virtual bool OnCommand_Meta(IMetamodSourceCommandInfo* info) override - { - return Command_Meta(info); - } - - virtual bool OnCommand_ClientMeta(MMSPlayer_t client, IMetamodSourceCommandInfo* info) override - { - return Command_ClientMeta(client, info); - } -} s_ProviderCallbacks; - -/* Initialize everything here */ -void -mm_InitializeForLoad() -{ - char full_path[PATH_SIZE] = {0}; - GetFileOfAddress((void *)gamedll_info.factory, full_path, sizeof(full_path)); - full_bin_path.assign(full_path); - - /* Like Metamod, reload plugins at the end of the map. - * This is so plugins can hook everything on load, BUT, new plugins will be reloaded - * if the server is shut down (silly, but rare case). - */ - in_first_level = true; - - provider->SetCallbacks(&s_ProviderCallbacks); -} - -bool -mm_DetectGameInformation() -{ - char game_path[PATH_SIZE]; - - provider->GetGamePath(game_path, sizeof(game_path)); - - mod_path.assign(game_path); - - engine_build = provider->DetermineSourceEngine(); - - return true; -} - -void * -ServerFactory(const char *iface, int *ret) -{ - IFACE_MACRO(gamedll_info.factory, GameDLL); -} - -static int -LoadPluginsFromFile(const char *filepath, int &skipped) -{ - FILE *fp; - int total = 0; - PluginId id; - bool already; - - skipped = 0; - - fp = fopen(filepath, "rt"); - if (!fp) - { - return 0; - } - - char buffer[255], error[255], full_path[PATH_SIZE]; - const char *file; - size_t length; - while (!feof(fp) && fgets(buffer, sizeof(buffer), fp) != NULL) - { - UTIL_TrimLeft(buffer); - UTIL_TrimRight(buffer); - - length = strlen(buffer); - if (!length) - { - continue; - } - - if (buffer[0] == '\0' || buffer[0] == ';' || strncmp(buffer, "//", 2) == 0) - { - continue; - } - - file = buffer; - if (buffer[0] == '"') - { - char *cptr = buffer; - file = ++cptr; - - while (*cptr) - { - if (*cptr == '"') - { - *cptr = '\0'; - break; - } - cptr++; - } - } - else - { - char *cptr = buffer; - while (*cptr) - { - if (isspace(*cptr)) - { - char *optr = cptr; - while (*cptr && isspace(*cptr)) - { - cptr++; - } - *optr = '\0'; - UTIL_TrimRight(cptr); - if (*cptr && isalpha(*cptr)) - { - g_PluginMngr.SetAlias(buffer, cptr); - file = cptr; - } - break; - } - cptr++; - } - } - if (!file[0]) - { - continue; - } - - g_Metamod.GetFullPluginPath(file, full_path, sizeof(full_path)); - - id = g_PluginMngr.Load(full_path, Pl_File, already, error, sizeof(error)); - if (id < Pl_MinId || g_PluginMngr.FindById(id)->m_Status < Pl_Paused) - { - mm_LogMessage("[META] Failed to load plugin %s. %s", buffer, error); - } - else - { - if (already) - skipped++; - else - total++; - } - } - fclose(fp); - - return total; -} - -void InitializeVSP() -{ - if (g_bIsVspBridged) - return; - - size_t len; - char engine_file[PATH_SIZE]; - char engine_path[PATH_SIZE]; - char rel_path[PATH_SIZE * 2]; - - GetFileOfAddress((void *)engine_factory, engine_file, sizeof(engine_file)); - - /* Chop off the "engine" file part */ - len = strlen(engine_file); - for (size_t i = len - 1; i < len; i--) - { - if (engine_file[i] == '/' || engine_file[i] == '\\') - { - engine_file[i] = '\0'; - break; - } - } - - /* If this fails the file either does not exist or - * on Windows the buffer may be too small. */ - if (abspath(engine_path, engine_file) == NULL) - { - engine_path[0] = '\0'; - } - - const char *usepath = metamod_path.c_str(); - if (UTIL_Relatize(rel_path, sizeof(rel_path), engine_path, metamod_path.c_str())) - { - usepath = rel_path; - } - - char command[PATH_SIZE * 2]; - UTIL_Format(command, sizeof(command), "plugin_load \"%s\"\n", usepath); - provider->ServerCommand(command); -} - -/* Wrapper function. This is called when the GameDLL thinks it's using - * the engine's real engineFactory. - */ -static void * -EngineFactory(const char *iface, int *ret) -{ - IFACE_MACRO(engine_factory, Engine); -} - -/* Wrapper function. This is called when the GameDLL thinks it's using - * the engine's real physicsFactory. - */ -static void * -PhysicsFactory(const char *iface, int *ret) -{ - IFACE_MACRO(physics_factory, Physics); -} - -/* Wrapper function. This is called when the GameDLL thinks it's using - * the engine's real fileSystemFactory. - */ -static void * -FileSystemFactory(const char *iface, int *ret) -{ - IFACE_MACRO(filesystem_factory, FileSystem); -} - -void -mm_LogMessage(const char *msg, ...) -{ - va_list ap; - static char buffer[2048]; - - va_start(ap, msg); - size_t len = vsnprintf(buffer, sizeof(buffer) - 2, msg, ap); - va_end(ap); - - buffer[len++] = '\n'; - buffer[len] = '\0'; - - if (!provider->LogMessage(buffer)) - { - fprintf(stdout, "%s", buffer); - } -} - -static void -DoInitialPluginLoads() -{ - const char *pluginFile = provider->GetCommandLineValue("mm_pluginsfile", NULL); - const char *mmBaseDir = provider->GetCommandLineValue("mm_basedir", NULL); - if (!pluginFile) - { - pluginFile = provider->GetConVarString(mm_pluginsfile); - if (pluginFile == NULL) - { - pluginFile = "addons/metamod/metaplugins.ini"; - } - } - if (!mmBaseDir) - { - mmBaseDir = provider->GetConVarString(mm_basedir); - if (mmBaseDir == NULL) - { - mmBaseDir = "addons/metamod"; - } - } - - char filepath[PATH_SIZE], vdfpath[PATH_SIZE]; - - g_Metamod.PathFormat(filepath, sizeof(filepath), "%s/%s", mod_path.c_str(), pluginFile); - g_Metamod.PathFormat(vdfpath, sizeof(vdfpath), "%s/%s", mod_path.c_str(), mmBaseDir); - mm_LoadPlugins(filepath, vdfpath); -} - -void -mm_StartupMetamod(bool is_vsp_load) -{ - char buffer[255]; - - UTIL_Format(buffer, - sizeof(buffer), - "%s%s", - METAMOD_VERSION, - is_vsp_load ? "V" : ""); - - metamod_version = provider->CreateConVar("metamod_version", - METAMOD_VERSION, - "Metamod:Source Version", - ConVarFlag_Notify|ConVarFlag_SpOnly); - - provider->SetConVarString(metamod_version, buffer); - - mm_pluginsfile = provider->CreateConVar("mm_pluginsfile", -#if defined WIN32 || defined _WIN32 - "addons\\metamod\\metaplugins.ini", -#else - "addons/metamod/metaplugins.ini", -#endif - "Metamod:Source Plugins File", - ConVarFlag_SpOnly); - - mm_basedir = provider->CreateConVar("mm_basedir", -#if defined __linux__ || defined __APPLE__ - "addons/metamod", -#else - "addons\\metamod", -#endif - "Metamod:Source Base Folder", - ConVarFlag_SpOnly); - - g_bIsVspBridged = is_vsp_load; - - if (!is_vsp_load) - { - DoInitialPluginLoads(); - in_first_level = true; - } -} - -void -mm_InitializeGlobals(CreateInterfaceFn engineFactory, - CreateInterfaceFn physicsFactory, - CreateInterfaceFn filesystemFactory, - CGlobalVars *pGlobals) -{ - engine_factory = engineFactory; - physics_factory = physicsFactory; - filesystem_factory = filesystemFactory; - gpGlobals = pGlobals; - provider->Notify_DLLInit_Pre(engineFactory, gamedll_info.factory); -} - -void -mm_UnloadMetamod() -{ - /* Unload plugins */ - g_PluginMngr.UnloadAll(); - - provider->Notify_DLLShutdown_Pre(); - - g_SourceHook.CompleteShutdown(); -} - -void MetamodSource::LogMsg(ISmmPlugin *pl, const char *msg, ...) -{ - va_list ap; - char buffer[2048]; - - va_start(ap, msg); - UTIL_FormatArgs(buffer, sizeof(buffer), msg, ap); - va_end(ap); - - mm_LogMessage("[%s] %s", pl->GetLogTag(), buffer); -} - -CreateInterfaceFn MetamodSource::GetEngineFactory(bool syn/* =true */) -{ - if (syn) - return EngineFactory; - return engine_factory; -} - -CreateInterfaceFn MetamodSource::GetPhysicsFactory(bool syn/* =true */) -{ - if (syn) - return PhysicsFactory; - return physics_factory; -} - -CreateInterfaceFn MetamodSource::GetFileSystemFactory(bool syn/* =true */) -{ - if (syn) - return FileSystemFactory; - return filesystem_factory; -} - -CreateInterfaceFn MetamodSource::GetServerFactory(bool syn/* =true */) -{ - if (syn) - return ServerFactory; - return gamedll_info.factory; -} - -CGlobalVars *MetamodSource::GetCGlobals() -{ - return gpGlobals; -} - -void MetamodSource::SetLastMetaReturn(META_RES res) -{ - last_meta_res = res; -} - -META_RES MetamodSource::GetLastMetaReturn() -{ - return last_meta_res; -} - -void MetamodSource::ConPrint(const char *str) -{ - provider->ConsolePrint(str); -} - -void MetamodSource::ConPrintf(const char *fmt, ...) -{ - va_list ap; - char buffer[2048]; - - va_start(ap, fmt); - UTIL_FormatArgs(buffer, sizeof(buffer), fmt, ap); - va_end(ap); - - provider->ConsolePrint(buffer); -} - -void MetamodSource::GetApiVersions(int &major, int &minor, int &plvers, int &plmin) -{ - major = METAMOD_API_MAJOR; - minor = METAMOD_API_MINOR; - plvers = METAMOD_PLAPI_VERSION; - plmin = PLAPI_MIN_VERSION; -} - -void MetamodSource::GetShVersions(int &shvers, int &shimpl) -{ - shvers = SH_IFACE_VERSION; - shimpl = SH_IMPL_VERSION; -} - -int MetamodSource::FormatIface(char iface[], size_t maxlength) -{ - size_t length = strlen(iface); - size_t i; - int num = 0; - - for (i = length - 1; i + 1 > 0; i--) - { - if (!isdigit(iface[i])) - { - if (i != length - 1) - { - num = 1; - } - break; - } - } - - if ( (num && (maxlength <= length)) || (!num && (maxlength <= length + 3)) ) - { - return -1; - } - - if (i != length - 1) - { - num = atoi(&(iface[++i])); - } - - num++; - - snprintf(&(iface[i]), 4, "%03d", num); - - return num; -} - -void *MetamodSource::InterfaceSearch(CreateInterfaceFn fn, const char *iface, int max, int *ret) -{ - char _if[256]; /* assume no interface goes beyond this */ - size_t len = strlen(iface); - int num = 0; - void *pf = NULL; - - if (max > 999) - { - max = 999; - } - - if (len + 4 > sizeof(_if)) - { - if (ret) - { - *ret = META_IFACE_FAILED; - } - return NULL; - } - - strcpy(_if, iface); - - do - { - if ((pf = (fn)(_if, ret)) != NULL) - { - break; - } - if (num > max) - { - break; - } - } while ((num = FormatIface(_if, len+1))); - - return pf; -} - -void *MetamodSource::VInterfaceMatch(CreateInterfaceFn fn, const char *iface, int min) -{ - char buffer[256]; /* assume no interface will go beyond this */ - size_t len = strlen(iface); - int ret; /* just in case something doesn't handle NULL properly */ - - if (len > sizeof(buffer) - 4) - { - return NULL; - } - - strcpy(buffer, iface); - - if (min != -1) - { - char *ptr = &buffer[len - 1]; - int digits = 0; - while (isdigit(*ptr) && digits <=3) - { - *ptr = '\0'; - digits++; - ptr--; - } - if (digits != 3) - { - /* for now, assume this is an error */ - strcpy(buffer, iface); - } - else - { - char num[4]; - min = (min == 0) ? 1 : min; - snprintf(num, sizeof(num), "%03d", min); - strcat(buffer, num); - } - } - - return InterfaceSearch(fn, buffer, IFACE_MAXNUM, &ret); -} - -const char *MetamodSource::GetBaseDir() -{ - return mod_path.c_str(); -} - -size_t MetamodSource::PathFormat(char *buffer, size_t len, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - size_t mylen = UTIL_FormatArgs(buffer, len, fmt, ap); - va_end(ap); - - for (size_t i = 0; i < mylen; i++) - { - if (buffer[i] == ALT_SEP_CHAR) - { - buffer[i] = PATH_SEP_CHAR; - } - } - - return mylen; -} - -void MetamodSource::ClientConPrintf(MMSPlayer_t client, const char *fmt, ...) -{ - va_list ap; - char buffer[2048]; - - va_start(ap, fmt); - UTIL_FormatArgs(buffer, sizeof(buffer), fmt, ap); - va_end(ap); - - provider->ClientConsolePrint(client, buffer); -} - -void MetamodSource::EnableVSPListener() -{ - if (is_game_init && !vsp_load_requested && !vsp_loaded) - { - InitializeVSP(); - } - - vsp_load_requested = true; -} - -int MetamodSource::GetVSPVersion() -{ - return vsp_version; -} - -int MetamodSource::GetGameDLLVersion() -{ - return gamedll_version; -} - -void *MetamodSource::MetaFactory(const char *iface, int *ret, PluginId *id) -{ - if (id) - { - *id = 0; - } - - if (!iface) - { - return NULL; - } - - /* First check ours... we get first chance! */ - if (strcmp(iface, MMIFACE_SOURCEHOOK) == 0) - { - if (ret) - { - *ret = META_IFACE_OK; - } - return static_cast(static_cast(&g_SourceHook)); - } - else if (strcmp(iface, MMIFACE_PLMANAGER) == 0) - { - if (ret) - { - *ret = META_IFACE_OK; - } - return static_cast(static_cast(&g_PluginMngr)); - } - else if (strcmp(iface, MMIFACE_SH_HOOKMANAUTOGEN) == 0) - { -#if defined( _WIN64 ) || defined( __amd64__ ) - if (ret) - { - *ret = META_IFACE_FAILED; - } - return nullptr; -#else - if (ret) - { - *ret = META_IFACE_OK; - } - return static_cast(static_cast(&g_SH_HookManagerAutoGen)); -#endif - } - - CPluginManager::CPlugin *pl; - List::iterator event; - IMetamodListener *api; - void *value; - - int subret = 0; - for (PluginIter iter = g_PluginMngr._begin(); - iter != g_PluginMngr._end(); - iter++) - { - pl = (*iter); - for (event = pl->m_Events.begin(); event != pl->m_Events.end(); event++) - { - api = (*event); - subret = META_IFACE_FAILED; - if ((value = api->OnMetamodQuery(iface, &subret)) != NULL) - { - if (ret) - { - *ret = subret; - } - if (id) - { - *id = pl->m_Id; - } - return value; - } - } - } - - if (ret) - { - *ret = META_IFACE_FAILED; - } - - return NULL; -} - -void MetamodSource::AddListener(ISmmPlugin *plugin, IMetamodListener *pListener) -{ - CPluginManager::CPlugin *pl = g_PluginMngr.FindByAPI(plugin); - - pl->m_Events.push_back(pListener); -} - -const char *MetamodSource::GetGameBinaryPath() -{ - return full_bin_path.c_str(); -} - -const char *MetamodSource::GetPluginsFile() -{ - return provider->GetConVarString(mm_pluginsfile); -} - -const char *MetamodSource::GetVDFDir() -{ - return provider->GetConVarString(mm_basedir); -} - -bool MetamodSource::RegisterConCommandBase(ISmmPlugin *plugin, ConCommandBase *pCommand) -{ - if (provider->IsConCommandBaseACommand(pCommand)) - { - g_PluginMngr.AddPluginCmd(plugin, pCommand); - } - else - { - g_PluginMngr.AddPluginCvar(plugin, pCommand); - } - - return provider->RegisterConCommandBase(pCommand); -} - -void MetamodSource::UnregisterConCommandBase(ISmmPlugin *plugin, ConCommandBase *pCommand) -{ - if (provider->IsConCommandBaseACommand(pCommand)) - { - g_PluginMngr.RemovePluginCmd(plugin, pCommand); - } - else - { - g_PluginMngr.RemovePluginCvar(plugin, pCommand); - } - - CPluginManager::CPlugin *pOrig = g_PluginMngr.FindByAPI(plugin); - UnregisterConCommandBase(pOrig ? pOrig->m_Id : 0, pCommand); -} - -void MetamodSource::UnregisterConCommandBase(PluginId id, ConCommandBase *pCommand) -{ - PluginIter iter; - CPluginManager::CPlugin *pPlugin; - List::iterator event; - IMetamodListener *pML; - for (iter=g_PluginMngr._begin(); iter!=g_PluginMngr._end(); iter++) - { - pPlugin = (*iter); - if (pPlugin->m_Status < Pl_Paused) - { - continue; - } - /* Only valid for plugins >= 12 (v1:6, SourceMM 1.5) */ - if (pPlugin->m_API->GetApiVersion() < 12) - { - continue; - } - for (event=pPlugin->m_Events.begin(); - event!=pPlugin->m_Events.end(); - event++) - { - pML = (*event); - pML->OnUnlinkConCommandBase(id, pCommand); - } - } - - return provider->UnregisterConCommandBase(pCommand); -} - -int MetamodSource::GetUserMessageCount() -{ - return provider->GetUserMessageCount(); -} - -int MetamodSource::FindUserMessage(const char *name, int *size/* =NULL */) -{ - return provider->FindUserMessage(name, size); -} - -const char *MetamodSource::GetUserMessage(int index, int *size/* =NULL */) -{ - return provider->GetUserMessage(index, size); -} - -int MetamodSource::GetSourceEngineBuild() -{ - return engine_build; -} - -void MetamodSource::NotifyVSPListening(IServerPluginCallbacks *callbacks, int version) -{ - if (version != -1) - vsp_version = version; - - vsp_callbacks = callbacks; - ITER_EVENT(OnVSPListening, (callbacks)); - - if (is_gamedll_loaded) - { - /* - * MM:S is loaded as a game DLL so we need to set these for mm_IsVspBridged() and - * mm_IsVspLoadComplete() - */ - g_bIsVspBridged = true; - were_plugins_loaded = true; - } -} - -IServerPluginCallbacks *MetamodSource::GetVSPInfo(int *pVersion) -{ - if (pVersion) - { - *pVersion = vsp_version; - } - - return vsp_callbacks; -} - -size_t MetamodSource::Format(char *buffer, size_t maxlength, const char *format, ...) -{ - va_list ap; - size_t result; - - va_start(ap, format); - result = FormatArgs(buffer, maxlength, format, ap); - va_end(ap); - - return result; -} - -size_t MetamodSource::FormatArgs(char *buffer, size_t maxlength, const char *format, va_list ap) -{ - return UTIL_FormatArgs(buffer, maxlength, format, ap); -} - -bool MetamodSource::IsLoadedAsGameDLL() -{ - return is_gamedll_loaded; -} - -void MetamodSource::SetGameDLLInfo(CreateInterfaceFn serverFactory, const char *pGameDllIfaceName, int version, bool loaded) -{ - gamedll_info.factory = serverFactory; - gamedll_interface_name = pGameDllIfaceName; - gamedll_version = version; - is_gamedll_loaded = loaded; -} - -void MetamodSource::SetVSPListener(const char *path) -{ - metamod_path.assign(path); -} - -size_t MetamodSource::GetFullPluginPath(const char *plugin, char *buffer, size_t len) -{ - const char *pext, *ext; - size_t num; - - /* First find if it's an absolute path or not... */ - if (plugin[0] == '/' || strncmp(&(plugin[1]), ":\\", 2) == 0) - { - return UTIL_Format(buffer, len, plugin); - } - - /* Attempt to find a file extension */ - pext = UTIL_GetExtension(plugin); - /* Add an extension if there's none there */ - if (!pext) - { -#if defined(WIN32) || defined(_WIN32) -#if defined(WIN64) || defined(_WIN64) - ext = X64_SUFFIX BINARY_EXT; -#else - ext = BINARY_EXT; -#endif -#elif defined __APPLE__ -#if defined (__x86_64__) - ext = X64_SUFFIX BINARY_EXT; -#else - ext = BINARY_EXT; -#endif -#else -#if defined(__x86_64__) - ext = X64_SUFFIX BINARY_EXT; -#else - ext = "_i486" BINARY_EXT; -#endif -#endif - } - else - { - ext = ""; - } - - /* Format the new path */ - num = PathFormat(buffer, len, "%s/%s%s", mod_path.c_str(), plugin, ext); - - /* If path was passed without extension and it doesn't exist with "." try "." */ -#if defined(WIN64) || defined (_WIN64) || defined(__linux__) || defined(__x86_64__) - struct stat s; - if (!pext && stat(buffer, &s) != 0) - { - num = PathFormat(buffer, len, "%s/%s" BINARY_EXT, mod_path.c_str(), plugin); - } -#endif - - return num; -} - -const char *MetamodSource::GetGameDLLInterfaceName() const -{ - return gamedll_interface_name; -} - -static bool -ProcessVDF(const char *path, bool &skipped) -{ - PluginId id; - bool already; - char alias[24], file[255], full_path[255], error[255]; - - if (!provider->ProcessVDF(path, file, sizeof(file), alias, sizeof(alias))) - { - skipped = false; - return false; - } - - if (alias[0] != '\0') - g_PluginMngr.SetAlias(alias, file); - - g_Metamod.GetFullPluginPath(file, full_path, sizeof(full_path)); - - id = g_PluginMngr.Load(full_path, Pl_File, already, error, sizeof(error)); - skipped = already; - if (id < Pl_MinId || g_PluginMngr.FindById(id)->m_Status < Pl_Paused) - { - mm_LogMessage("[META] Failed to load plugin %s: %s", file, error); - return false; - } - - return true; -} - -static int -LoadVDFPluginsFromDir(const char *dir, int &skipped) -{ - bool success, skip; - int total = 0; - char path[MAX_PATH]; - char relpath[MAX_PATH * 2]; - - skipped = 0; - -#if defined _MSC_VER - HANDLE hFind; - WIN32_FIND_DATA fd; - char error[255]; - - g_Metamod.PathFormat(path, sizeof(path), "%s\\*.vdf", dir); - if ((hFind = FindFirstFile(path, &fd)) == INVALID_HANDLE_VALUE) - { - DWORD dw = GetLastError(); - if (dw == ERROR_FILE_NOT_FOUND) - return 0; - - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - dw, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - error, - sizeof(error), - NULL); - mm_LogMessage("[META] Could not open folder \"%s\" (%s)", dir, error); - return 0; - } - - do - { - g_Metamod.PathFormat(path, sizeof(path), "%s\\%s", dir, fd.cFileName); - UTIL_Relatize(relpath, sizeof(relpath), mod_path.c_str(), path); - success = ProcessVDF(relpath, skip); - if (skip) - skipped++; - else if (success) - total++; - } while (FindNextFile(hFind, &fd)); - - FindClose(hFind); -#else - DIR *pDir; - struct dirent *pEnt; - int extidx; - - if ((pDir = opendir(dir)) == NULL) - { - mm_LogMessage("[META] Could not open folder \"%s\" (%s)", dir, strerror(errno)); - return 0; - } - - while ((pEnt = readdir(pDir)) != NULL) - { - if (strcmp(pEnt->d_name, ".") == 0 - || strcmp(pEnt->d_name, "..") == 0) - { - continue; - } - extidx = strlen(pEnt->d_name) - 4; - if (extidx < 0 || stricmp(&pEnt->d_name[extidx], ".vdf")) - { - continue; - } - g_Metamod.PathFormat(path, sizeof(path), "%s/%s", dir, pEnt->d_name); - UTIL_Relatize(relpath, sizeof(relpath), mod_path.c_str(), path); - success = ProcessVDF(relpath, skip); - if (skip) - skipped++; - else if (success) - total++; - } - - closedir(pDir); -#endif - - return total; -} - -int -mm_LoadPlugins(const char *filepath, const char *vdfpath) -{ - int total, skipped, fskipped, vskipped; - const char *s = ""; - - total = LoadPluginsFromFile(filepath, fskipped); - total += LoadVDFPluginsFromDir(vdfpath, vskipped); - skipped = fskipped + vskipped; - - if (total == 0 || total > 1) - s = "s"; - - if (skipped) - mm_LogMessage("[META] Loaded %d plugin%s (%d already loaded)", total, s, skipped); - else - mm_LogMessage("[META] Loaded %d plugin%s.", total, s); - - return total; -} - -bool -mm_IsVspBridged() -{ - return g_bIsVspBridged; -} - -bool -mm_IsVspLoadComplete() -{ - return were_plugins_loaded; -} - diff --git a/metamod-source/core/metamod.h b/metamod-source/core/metamod.h deleted file mode 100644 index b1446bbc..00000000 --- a/metamod-source/core/metamod.h +++ /dev/null @@ -1,135 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2010 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#ifndef _INCLUDE_SOURCEMM_H -#define _INCLUDE_SOURCEMM_H - -/** - * @brief SourceMM main functionality for GameDLL interception - * @file sourcemm.h - */ - -#include -#include -#include -#include -#include -#include -#include "metamod_provider.h" - -using namespace SourceMM; - -/** - * Versioning - * increase api_major when API breaks - * increase api_minor when new functions are added (non-breaking) - */ -#define SOURCEMM_VERSION SVN_FILE_VERSION_STRING -#define SOURCEMM_DATE __DATE__ -#define METAMOD_API_MAJOR 2 /* increase this on a breaking change */ -#define METAMOD_API_MINOR 0 /* increase this on a non-breaking API change */ - -class MetamodSource : public ISmmAPI -{ -public: // ISmmAPI - void LogMsg(ISmmPlugin *pl, const char *msg, ...) override; - CreateInterfaceFn GetEngineFactory(bool syn=true) override; - CreateInterfaceFn GetPhysicsFactory(bool syn=true) override; - CreateInterfaceFn GetFileSystemFactory(bool syn=true) override; - CreateInterfaceFn GetServerFactory(bool syn=true) override; - CGlobalVars *GetCGlobals() override; - bool RegisterConCommandBase(ISmmPlugin *plugin, ConCommandBase *pCommand) override; - void UnregisterConCommandBase(ISmmPlugin *plugin, ConCommandBase *pCommand) override; - void ConPrint(const char *str) override; - void ConPrintf(const char *fmt, ...) override; - void GetApiVersions(int &major, int &minor, int &plvers, int &plmin) override; - void GetShVersions(int &shvers, int &shimpl) override; - void AddListener(ISmmPlugin *plugin, IMetamodListener *pListener) override; - void *MetaFactory(const char *iface, int *ret, PluginId *id) override; - int FormatIface(char iface[], size_t maxlength) override; - void *InterfaceSearch(CreateInterfaceFn fn, const char *iface, int max, int *ret) override; - const char *GetBaseDir() override; - size_t PathFormat(char *buffer, size_t len, const char *fmt, ...) override; - void ClientConPrintf(MMSPlayer_t client, const char *fmt, ...) override; - void *VInterfaceMatch(CreateInterfaceFn fn, const char *iface, int min=-1) override; - void EnableVSPListener() override; - int GetGameDLLVersion() override; - int GetUserMessageCount() override; - int FindUserMessage(const char *name, int *size=NULL) override; - const char *GetUserMessage(int index, int *size=NULL) override; - int GetVSPVersion() override; - int GetSourceEngineBuild() override; - IServerPluginCallbacks *GetVSPInfo(int *pVersion) override; - size_t Format(char *buffer, size_t maxlength, const char *format, ...) override; - size_t FormatArgs(char *buffer, size_t maxlength, const char *format, va_list ap) override; -public: - void SetLastMetaReturn(META_RES res); - META_RES GetLastMetaReturn(); - bool IsLoadedAsGameDLL(); - const char *GetGameBinaryPath(); - const char *GetPluginsFile(); - const char *GetVDFDir(); - void UnregisterConCommandBase(PluginId id, ConCommandBase *pCommand); - void NotifyVSPListening(IServerPluginCallbacks *callbacks, int version); - const char* GetGameDLLInterfaceName() const; - void SetGameDLLInfo(CreateInterfaceFn serverFactory, const char *pGameDllIfaceName, int version, bool loaded); - void SetVSPListener(const char *path); - size_t GetFullPluginPath(const char *plugin, char *buffer, size_t len); -}; - -bool -mm_DetectGameInformation(); - -void -mm_LogMessage(const char *msg, ...); - -int -mm_LoadPlugins(const char *filepath, const char *vdfpath); - -void -mm_InitializeForLoad(); - -void -mm_InitializeGlobals(CreateInterfaceFn engineFactory, - CreateInterfaceFn physicsFactory, - CreateInterfaceFn filesystemFactory, - CGlobalVars *pGlobals); -void -mm_StartupMetamod(bool is_vsp_load); - -void -mm_UnloadMetamod(); - -bool -mm_IsVspBridged(); - -bool -mm_IsVspLoadComplete(); - -extern MetamodSource g_Metamod; -extern SourceHook::Impl::CSourceHookImpl g_SourceHook; - -#endif //_INCLUDE_SOURCEMM_H - diff --git a/metamod-source/core/metamod_console.cpp b/metamod-source/core/metamod_console.cpp deleted file mode 100644 index 0fd08ac2..00000000 --- a/metamod-source/core/metamod_console.cpp +++ /dev/null @@ -1,727 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2010 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#include -#include "metamod_oslink.h" -#include -#include -#include "metamod.h" -#include "metamod_util.h" -#include "metamod_console.h" -#include "metamod_plugins.h" - -using namespace SourceMM; -using namespace SourceHook; - -/** - * @brief Console Command Implementations - * @file concommands.cpp - */ - -#define CONMSG g_Metamod.ConPrintf -#define CLIENT_CONMSG g_Metamod.ClientConPrintf -template - -void CMDMSG(MMSPlayer_t client, const char *pMsg, Ts ... ts) -{ - if (client != MMSPlayer_INVALID) - { - CLIENT_CONMSG(client, pMsg, ts...); - } - else - { - CONMSG(pMsg, ts...); - } -} - -static void ReplyCredits(MMSPlayer_t client = MMSPlayer_INVALID) -{ - CMDMSG(client, "Metamod:Source was developed by:\n"); - CMDMSG(client, " SourceHook: Pavol \"PM OnoTo\" Marko\n"); - CMDMSG(client, " GameDLL/Plugins: David \"BAILOPAN\" Anderson\n"); - CMDMSG(client, " GameDLL: Scott \"DS\" Ehlert\n"); - CMDMSG(client, "For more information, see the official website\n"); - CMDMSG(client, "http://www.metamodsource.net/\n"); -} - -static void ReplyVersion(MMSPlayer_t client = MMSPlayer_INVALID) -{ - CMDMSG(client, " Metamod:Source Version Information\n"); - CMDMSG(client, " Metamod:Source version %s\n", METAMOD_VERSION); - CMDMSG(client, " Plugin interface version: %d:%d\n", METAMOD_PLAPI_VERSION, PLAPI_MIN_VERSION); - CMDMSG(client, " SourceHook version: %d:%d\n", g_SHPtr->GetIfaceVersion(), g_SHPtr->GetImplVersion()); - if (g_Metamod.IsLoadedAsGameDLL()) - { - CMDMSG(client, " Loaded As: GameDLL (gameinfo.txt)\n"); - } - else - { - CMDMSG(client, " Loaded As: Valve Server Plugin\n"); - } - CMDMSG(client, " Compiled on: %s\n", MMS_BUILD_TIMESTAMP); -#if defined(MMS_GENERATED_BUILD) - CMDMSG(client, " Built from: https://github.com/alliedmodders/metamod-source/commit/%s\n", METAMOD_SHA); - CMDMSG(client, " Build ID: %s:%s\n", METAMOD_LOCAL_REV, METAMOD_SHA); -#endif - CMDMSG(client, " http://www.metamodsource.net/\n"); -} - -bool Command_Meta(IMetamodSourceCommandInfo *info) -{ - unsigned int args = info->GetArgCount(); - - if (mm_IsVspBridged() && !mm_IsVspLoadComplete()) - { - CONMSG("You must change the map to activate Metamod:Source.\n"); - return true; - } - - if (args >= 1) - { - const char *command = info->GetArg(1); - if (strcmp(command, "credits") == 0) - { - ReplyCredits(); - - return true; - } - else if (strcmp(command, "version") == 0) - { - ReplyVersion(); - - return true; - } - else if (strcmp(command, "game") == 0) - { - CONMSG("GameDLL Information\n"); - CONMSG(" Description: %s\n", provider->GetGameDescription()); - CONMSG(" Mod Path: %s\n", g_Metamod.GetBaseDir()); - CONMSG(" DLL Path: %s\n", g_Metamod.GetGameBinaryPath()); - CONMSG(" Interface: %s\n", g_Metamod.GetGameDLLInterfaceName()); - CONMSG(" Engine: %s\n", provider->GetEngineDescription()); - - // Display user messages - const char *msgname; - int msgsize; - int messages = g_Metamod.GetUserMessageCount(); - - if (messages > 0) - { - CONMSG(" User Messages: %-32.31s %-5s %-5s\n", "Name", "Index", "Size"); - - for (int i = 0; i < messages; i++) - { - msgname = g_Metamod.GetUserMessage(i, &msgsize); - - CONMSG(" %-32.31s %-5d %-5d\n", msgname, i, msgsize); - } - - CONMSG(" %d user message%s in total\n", messages, (messages > 1) ? "s" : ""); - } - else - { - CONMSG(" User Messages: None\n"); - } - - return true; - } - else if (strcmp(command, "refresh") == 0) - { - char filepath[PATH_SIZE], vdfpath[PATH_SIZE]; - g_Metamod.PathFormat(filepath, - sizeof(filepath), - "%s/%s", - g_Metamod.GetBaseDir(), - g_Metamod.GetPluginsFile()); - g_Metamod.PathFormat(vdfpath, - sizeof(vdfpath), - "%s/%s", - g_Metamod.GetBaseDir(), - g_Metamod.GetVDFDir()); - - mm_LoadPlugins(filepath, vdfpath); - - return true; - } - else if (strcmp(command, "list") == 0) - { - CPluginManager::CPlugin *pl; - ISmmPlugin *plapi; - const char *plname; - PluginIter i; - char buffer[256]; - size_t len; - int plnum = g_PluginMngr.GetPluginCount(); - - if (!plnum) - { - CONMSG("No plugins loaded.\n"); - return true; - } else { - CONMSG("Listing %d plugin%s:\n", plnum, (plnum > 1) ? "s" : ""); - } - - for (i = g_PluginMngr._begin(); i != g_PluginMngr._end(); i++) - { - pl = (*i); - if (!pl) - { - break; - } - - len = 0; - - if (pl->m_Status != Pl_Running) - { - len += UTIL_Format(buffer, sizeof(buffer), " [%02d] <%s>", pl->m_Id, g_PluginMngr.GetStatusText(pl)); - } else { - len += UTIL_Format(buffer, sizeof(buffer), " [%02d]", pl->m_Id); - } - - if ((plapi = pl->m_API)) - { - plname = IS_STR_FILLED(plapi->GetName()) ? plapi->GetName() : pl->m_File.c_str(); - len += UTIL_Format(&buffer[len], sizeof(buffer)-len, " %s", plname); - - if (IS_STR_FILLED(plapi->GetVersion())) - { - len += UTIL_Format(&buffer[len], sizeof(buffer)-len, " (%s)", plapi->GetVersion()); - } - if (IS_STR_FILLED(plapi->GetAuthor())) - { - UTIL_Format(&buffer[len], sizeof(buffer)-len, " by %s", plapi->GetAuthor()); - } - } - - CONMSG("%s\n", buffer); - } - - return true; - } - else if (strcmp(command, "cmds") == 0) - { - if (args >= 2) - { - int id = atoi(info->GetArg(2)); - CPluginManager::CPlugin *pl = g_PluginMngr.FindById(id); - - if (!pl) - { - CONMSG("Plugin %d not found.\n", id); - return true; - } - - if (!pl->m_API) - { - CONMSG("Plugin %d is not loaded.\n", id); - } - else - { - CONMSG("Console commands for %s:\n", pl->m_API->GetName()); - List::iterator ci; - size_t count = 0; - - for (ci=pl->m_Cmds.begin(); ci!=pl->m_Cmds.end(); ci++) - { - count++; - CONMSG(" [%5d] %-s\n", count, (*ci)->GetName()); - } - } - } - else - { - CONMSG("Usage: meta cmds \n"); - } - - return true; - } - else if (strcmp(command, "cvars") == 0) - { - if (args >= 2) - { - int id = atoi(info->GetArg(2)); - CPluginManager::CPlugin *pl = g_PluginMngr.FindById(id); - - if (!pl) - { - CONMSG("Plugin %d not found.\n", id); - return true; - } - - if (!pl->m_API) - { - CONMSG("Plugin %d is not loaded.\n", id); - } - else - { - CONMSG("Registered cvars for %s:\n", pl->m_API->GetName()); - List::iterator ci; - size_t count = 0; - - for (ci=pl->m_Cvars.begin(); ci!=pl->m_Cvars.end(); ci++) - { - count++; - CONMSG(" [%5d] %-s\n", count, (*ci)->GetName()); - } - } - } - else - { - CONMSG("Usage: meta cvars \n"); - } - - return true; - } - else if (strcmp(command, "info") == 0) - { - if (args >= 2) - { - int id = atoi(info->GetArg(2)); - CPluginManager::CPlugin *pl = g_PluginMngr.FindById(id); - if (!pl) - { - CONMSG("Plugin %d not found.\n", id); - return true; - } - - if (!pl->m_API) - { - CONMSG("Plugin %d is not loaded.\n", id); - } - else - { - if (pl->m_Status == Pl_Paused) - { - CONMSG("Plugin %d is paused.\n", id); - } - else if (pl->m_Status == Pl_Running) - { - char run_msg[255]; - bool run = false; - if (pl->m_API && pl->m_API->QueryRunning(run_msg, sizeof(run_msg)-1)) - { - run = true; - } - if (run) - { - CONMSG("Plugin %d is running.\n", id); - } - else - { - CONMSG("Plugin %d is stopped: %s\n", id, run_msg); - } - } - CONMSG(" Name: \"%s\" by %s\n", pl->m_API->GetName(), pl->m_API->GetAuthor()); - CONMSG(" Version: %s\n", pl->m_API->GetVersion()); - CONMSG(" Description: %s\n", pl->m_API->GetDescription()); - CONMSG(" License: %s\n", pl->m_API->GetLicense()); - CONMSG(" URL: %s\n", pl->m_API->GetURL()); - CONMSG(" Details: API %03d, Date: %s\n", pl->m_API->GetApiVersion(), pl->m_API->GetDate()); - } - CONMSG("File: %s\n\n", pl->m_File.c_str()); - - return true; - } - else - { - CONMSG("Usage: meta info \n"); - - return true; - } - } - else if (strcmp(command, "pause") == 0) - { - if (args >= 2) - { - int id = atoi(info->GetArg(2)); - - char error[255]; - - if (!g_PluginMngr.Pause(id, error, sizeof(error))) - { - CONMSG("Pause failed: %s\n", error); - return true; - } - - CONMSG("Plugin %d has been paused.\n", id); - - return true; - } - else - { - CONMSG("Usage: meta pause \n"); - - return true; - } - } - else if (strcmp(command, "unpause") == 0) - { - if (args >= 2) - { - int id = atoi(info->GetArg(2)); - char error[255]; - - if (!g_PluginMngr.Unpause(id, error, sizeof(error))) - { - CONMSG("Unpause failed: %s\n", error); - return true; - } - - CONMSG("Plugin %d has been unpaused.\n", id); - - return true; - } - else - { - CONMSG("Usage: meta unpause \n"); - - return true; - } - } - else if (strcmp(command, "load") == 0) - { - if (args >= 2) - { - const char *file = info->GetArg(2); - char full_path[255]; - - const char *alias = g_PluginMngr.LookupAlias(file); - if (alias) - { - file = alias; - } - - g_Metamod.GetFullPluginPath(file, full_path, sizeof(full_path)); - - char error[255]={0}; - bool already; - CPluginManager::CPlugin *pl; - - // If we've recently tried to unload plugins, they might still - // be in the unload queue. Force them out now. This is not - // lowered to CPluginManager because it's not strictly safe - // there. - g_SourceHook.ResolvePendingUnloads(true); - - PluginId id = g_PluginMngr.Load(full_path, Pl_Console, already, error, sizeof(error)); - pl = g_PluginMngr.FindById(id); - if (!pl || id < Pl_MinId || (pl->m_Status < Pl_Paused)) - { - CONMSG("Failed to load plugin %s (%s).\n", file, error); - return true; - } - - if (!already) - { - CONMSG("Plugin \"%s\" loaded with id %d.\n", pl->m_API->GetName(), pl->m_Id); - } else { - CONMSG("Plugin \"%s\" is already loaded as %d.\n", pl->m_API->GetName(), pl->m_Id); - } - - return true; - } - else - { - CONMSG("Usage: meta load \n"); - - return true; - } - } - else if ( (strcmp(command, "alias") == 0) || - (strcmp(command, "aliases") == 0) ) - { - if (args >= 3) - { - const char *alias = info->GetArg(2); - const char *value = info->GetArg(3); - - g_PluginMngr.SetAlias(alias, value); - if (value == NULL || value[0] == '\0') - { - CONMSG("Deleted alias: %s.\n", alias); - } else { - CONMSG("Set alias \"%s\" to: %s\n", alias, value); - } - } - else if (args >= 2) - { - const char *alias = info->GetArg(2); - const char *value = g_PluginMngr.LookupAlias(alias); - if (value) - { - CONMSG("Alias \"%s\" is set to: %s\n", alias, value); - } else { - CONMSG("Alias \"%s\" was not found.\n", alias); - } - } - else - { - List::iterator iter, end; - CNameAlias *p; - - iter = g_PluginMngr._alias_begin(); - end = g_PluginMngr._alias_end(); - size_t total = 0; - if (iter != end) - { - CONMSG("%-10.9s %s\n", "Alias", "File"); - CONMSG(" --- \n"); - for (; iter!=end; iter++) - { - p = (*iter); - CONMSG("%-10.9s %s\n", p->alias.c_str(), p->value.c_str()); - total++; - } - CONMSG(" --- \n"); - CONMSG("%d aliases total.\n", total); - } - else - { - CONMSG("No aliases found.\n"); - } - } - return true; - } - else if (strcmp(command, "unload") == 0) - { - if (args >= 2) - { - const char *file = info->GetArg(2); - int id = atoi(file); - char error[255]={0}; - - if (id == 0 && isalpha(file[0])) - { - char full_path[255]; - const char *alias = g_PluginMngr.LookupAlias(file); - - if (alias) - { - file = alias; - } - - g_Metamod.GetFullPluginPath(file, full_path, sizeof(full_path)); - - List::iterator iter, end; - CPluginManager::CPlugin *pl; - iter = g_PluginMngr._begin(); - end = g_PluginMngr._end(); - for (; iter!=end; iter++) - { - pl = (*iter); - if (strcmp(pl->m_File.c_str(), full_path) == 0) - { - id = pl->m_Id; - break; - } - } - if (id == 0) - { - CONMSG("Plugin \"%s\" not found.\n", full_path); - return true; - } - } - - if (!g_PluginMngr.Unload(id, false, error, sizeof(error))) - { - CONMSG("Unload failed: %s\n", error); - return true; - } - - CONMSG("Plugin %d unloaded.\n", id); - } - else - { - CONMSG("Usage: meta unload \n"); - } - return true; - } - else if (strcmp(command, "force_unload") == 0) - { - if (args >= 2) - { - int id = atoi(info->GetArg(2)); - char error[255]={0}; - - if (!g_PluginMngr.Unload(id, false, error, sizeof(error))) - { - CONMSG("Force unload failed: %s\n", error); - return true; - } - - CONMSG("Plugin %d force unloaded.\n", id); - - return true; - } - else - { - CONMSG("Usage: meta force_unload \n"); - - return true; - } - } - else if (strcmp(command, "clear") == 0) - { - if (!g_PluginMngr.UnloadAll()) - { - CONMSG("One or more plugins resisted removal (cleaned anyway).\n"); - return true; - } - - CONMSG("All plugins unloaded.\n"); - - return true; - } - else if (strcmp(command, "retry") == 0) - { - if (args >= 2) - { - int id = atoi(info->GetArg(2)); - char error[255]; - - if (!g_PluginMngr.Retry(id, error, sizeof(error))) - { - CONMSG("Error reloading plugin: %s\n", error); - return true; - } - - CONMSG("Plugin %d successfully reloaded.\n", id); - - return true; - } - else - { - CONMSG("Usage: meta retry \n"); - - return true; - } - } - } - - CONMSG("Metamod:Source Menu\n"); - CONMSG("usage: meta [arguments]\n"); - CONMSG(" alias - List or set an alias\n"); - CONMSG(" clear - Unload all plugins forcefully\n"); - CONMSG(" cmds - Show plugin commands\n"); - CONMSG(" cvars - Show plugin cvars\n"); - CONMSG(" credits - About Metamod:Source\n"); - CONMSG(" force_unload - Forcefully unload a plugin\n"); - CONMSG(" game - Information about GameDLL\n"); - CONMSG(" info - Information about a plugin\n"); - CONMSG(" list - List plugins\n"); - CONMSG(" load - Load a plugin\n"); - CONMSG(" pause - Pause a running plugin\n"); - CONMSG(" refresh - Reparse plugin files\n"); - CONMSG(" retry - Attempt to reload a plugin\n"); - CONMSG(" unload - Unload a loaded plugin\n"); - CONMSG(" unpause - Unpause a paused plugin\n"); - CONMSG(" version - Version information\n"); - - return true; -} - -bool Command_ClientMeta(MMSPlayer_t client, IMetamodSourceCommandInfo *info) -{ - const char *cmd = info->GetArg(0); - - if (strcmp(cmd, "meta") == 0) - { - unsigned int args = info->GetArgCount(); - if (args == 1) - { - const char *subcmd = info->GetArg(1); - - if (strcmp(subcmd, "credits") == 0) - { - ReplyCredits(client); - - return true; - } - else if(strcmp(subcmd, "version") == 0) - { - ReplyVersion(client); - - return true; - } - else if(strcmp(subcmd, "list") == 0) - { - CPluginManager::CPlugin *pl; - ISmmPlugin *plapi; - const char *plname; - PluginIter i; - char buffer[256]; - size_t len = 0; - int plnum = 0; - - for (i = g_PluginMngr._begin(); i != g_PluginMngr._end(); i++, len=0) - { - pl = (*i); - if (pl && pl->m_Status == Pl_Running) - { - plapi = pl->m_API; - if (!plapi || !plapi->QueryRunning(NULL, 0)) - { - continue; - } - plnum++; - - len += UTIL_Format(buffer, sizeof(buffer), " [%02d]", plnum); - - plname = IS_STR_FILLED(plapi->GetName()) ? plapi->GetName() : pl->m_File.c_str(); - len += UTIL_Format(&buffer[len], sizeof(buffer)-len, " %s", plname); - - if (IS_STR_FILLED(plapi->GetVersion())) - { - len += UTIL_Format(&buffer[len], sizeof(buffer)-len, " (%s)", plapi->GetVersion()); - } - if (IS_STR_FILLED(plapi->GetAuthor())) - { - UTIL_Format(&buffer[len], sizeof(buffer)-len, " by %s", plapi->GetAuthor()); - } - - CLIENT_CONMSG(client, "%s\n", buffer); - } - } - - if (!plnum) - { - CLIENT_CONMSG(client, "No active plugins loaded.\n"); - } - - return true; - } - } - - CLIENT_CONMSG(client, "Metamod:Source Menu\n"); - CLIENT_CONMSG(client, "usage: meta \n"); - CLIENT_CONMSG(client, " credits - About Metamod:Source\n"); - CLIENT_CONMSG(client, " list - List plugins\n"); - CLIENT_CONMSG(client, " version - Version information\n"); - - return true; - } - - return false; -} diff --git a/metamod-source/core/metamod_console.h b/metamod-source/core/metamod_console.h deleted file mode 100644 index 68c026a8..00000000 --- a/metamod-source/core/metamod_console.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2008 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#ifndef _INCLUDE_CONCOMMANDS_H -#define _INCLUDE_CONCOMMANDS_H - -#include "metamod_provider.h" - -bool Command_Meta(IMetamodSourceCommandInfo *info); -bool Command_ClientMeta(MMSPlayer_t client, IMetamodSourceCommandInfo *info); - -#endif //_INCLUDE_CONCOMMANDS_H diff --git a/metamod-source/core/metamod_oslink.cpp b/metamod-source/core/metamod_oslink.cpp deleted file mode 100644 index caf20412..00000000 --- a/metamod-source/core/metamod_oslink.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/** - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2008 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#include -#include "metamod_oslink.h" -#include -#include -#if defined __linux__ || defined __APPLE__ -#include -#endif - -#if defined __WIN32__ || defined _WIN32 || defined WIN32 -const char *dlerror() -{ - static char buf[1024]; - DWORD num; - - num = GetLastError(); - - if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - num, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - buf, - sizeof(buf), - NULL) - == 0) - { - _snprintf(buf, sizeof(buf), "unknown error %x", num); - } - - return buf; -} -#endif - -#if defined __linux_ || defined __APPLE___ -int GetLastError() -{ - return errno; -} - -extern "C" void __cxa_guard_acquire(void) -{ -} - -extern "C" void __cxa_guard_release(void) -{ -} -#endif - -bool GetFileOfAddress(void *pAddr, char *buffer, size_t maxlength) -{ -#if defined WIN32 || defined _WIN32 - MEMORY_BASIC_INFORMATION mem; - if (!VirtualQuery(pAddr, &mem, sizeof(mem))) - return false; - if (mem.AllocationBase == NULL) - return false; - HMODULE dll = (HMODULE)mem.AllocationBase; - GetModuleFileName(dll, (LPTSTR)buffer, static_cast(maxlength)); -#elif defined __linux__ || defined __APPLE__ - Dl_info info; - if (!dladdr(pAddr, &info)) - return false; - if (!info.dli_fbase || !info.dli_fname) - return false; - const char *dllpath = info.dli_fname; - snprintf(buffer, maxlength, "%s", dllpath); -#endif - return true; -} - -#if defined __GNUC__ && defined(NO_MALLOC_OVERRIDE) -void * operator new(size_t size) { - return malloc(size); -} - -void * operator new[](size_t size) { - return malloc(size); -} - -void operator delete(void * ptr) { - free(ptr); -} - -void operator delete[](void * ptr) { - free(ptr); -} -#endif - diff --git a/metamod-source/core/metamod_oslink.h b/metamod-source/core/metamod_oslink.h deleted file mode 100644 index 83c04d1a..00000000 --- a/metamod-source/core/metamod_oslink.h +++ /dev/null @@ -1,116 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2009 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#ifndef _INCLUDE_OSLINK_H -#define _INCLUDE_OSLINK_H - -/** - * @brief Defines OS-independent information - * @file oslink.h - */ - -#if defined __WIN32__ || defined _WIN32 || defined WIN32 - #define WIN32_LEAN_AND_MEAN - #define OS_WIN32 - #if defined _MSC_VER && _MSC_VER >= 1400 - #undef ARRAYSIZE - #else - #define mkdir(a) _mkdir(a) - #endif - #include - #include - #include - #define dlmount(x) LoadLibrary(x) - #define dlsym(x, s) GetProcAddress(x, s) - #define dlclose(x) FreeLibrary(x) - const char* dlerror(); - #define abspath(x, s) _fullpath(x, s, sizeof(x)) - #define PATH_SEP_STR "\\" - #define PATH_SEP_CHAR '\\' - #define ALT_SEP_CHAR '/' - #define PATH_SIZE MAX_PATH - #define strcasecmp stricmp - inline bool _IsPathSepChar(char c) { return (c == '/' || c == '\\'); } -#elif defined __linux__ || defined __APPLE__ - #if defined __linux__ - #define OS_LINUX - #elif defined __APPLE__ - #define OS_DARWIN - #include - #endif - #include - #include - #include - #include - typedef void* HINSTANCE; -#ifdef META_IS_SOURCE2 - #define dlmount(x) dlopen(x,RTLD_NOW | RTLD_DEEPBIND) -#else - #define dlmount(x) dlopen(x,RTLD_NOW) -#endif - #define abspath(x, s) realpath(s, x) - #define PATH_SEP_STR "/" - #define PATH_SEP_CHAR '/' - #define ALT_SEP_CHAR '\\' - #define PATH_SIZE PATH_MAX - #ifndef stricmp - #define stricmp strcasecmp - #endif - #ifndef strnicmp - #define strnicmp strncasecmp - #endif - inline bool _IsPathSepChar(char c) { return (c == '/'); } -#endif - -#if defined __linux__ || defined __APPLE__ - #include - int GetLastError(); -#endif - -bool GetFileOfAddress(void *pAddr, char *buffer, size_t maxlength); - -#if defined __WIN32__ || defined _WIN32 || defined WIN32 - #define SMM_API extern "C" __declspec(dllexport) -#elif defined __GNUC__ - #define SMM_API extern "C" __attribute__ ((visibility("default"))) -#endif - -#if defined __WIN32__ || defined _WIN32 || defined WIN32 - typedef __int64 int64_t; - typedef unsigned __int64 uint64_t; - typedef __int32 int32_t; - typedef unsigned __int32 uint32_t; -#elif defined __GNUC__ -#include -#endif - -#if !defined __linux__ && !defined __APPLE__ - #define snprintf _snprintf - #if defined _MSC_VER && _MSC_VER < 1500 - #define vsnprintf _vsnprintf - #endif -#endif - -#endif //_INCLUDE_OSLINK_H diff --git a/metamod-source/core/metamod_plugins.cpp b/metamod-source/core/metamod_plugins.cpp deleted file mode 100644 index 0b721750..00000000 --- a/metamod-source/core/metamod_plugins.cpp +++ /dev/null @@ -1,867 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2009 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#include - -#include - -#include -#include "metamod_oslink.h" -#include "metamod.h" -#include "metamod_plugins.h" -#include "metamod_util.h" - -/** - * @brief Implements functions from CPlugin.h - * @file CPlugin.cpp - */ - -using namespace SourceMM; - -#define ITER_PLEVENT(evn, plid) \ - CPluginManager::CPlugin *_Xpl; \ - SourceHook::List::iterator event; \ - IMetamodListener *api; \ - for (PluginIter iter = g_PluginMngr._begin(); iter != g_PluginMngr._end(); iter++) { \ - _Xpl = (*iter); \ - if (_Xpl->m_Id == plid) \ - continue; \ - for (event=_Xpl->m_Events.begin(); event!=_Xpl->m_Events.end(); event++) { \ - api = (*event); \ - api->evn(plid); \ - } \ - } - -CPluginManager g_PluginMngr; - -MetamodVersionInfo GlobVersionInfo = -{ - METAMOD_API_MAJOR, - METAMOD_API_MINOR, - SH_IFACE_VERSION, - SH_IMPL_VERSION, - PLAPI_MIN_VERSION, - METAMOD_PLAPI_VERSION, - SOURCE_ENGINE_UNKNOWN, - NULL -}; - -CPluginManager::CPluginManager() -{ - m_LastId = Pl_MinId; - m_AllLoaded = false; -} - -CPluginManager::~CPluginManager() -{ - SourceHook::List::iterator iter; - - for (iter = m_Aliases.begin(); iter != m_Aliases.end(); iter++) - { - delete (*iter); - } - - m_Aliases.clear(); -} - -const char *CPluginManager::LookupAlias(const char *alias) -{ - SourceHook::List::iterator iter; - CNameAlias *p; - - for (iter = m_Aliases.begin(); iter != m_Aliases.end(); iter++) - { - p = (*iter); - if (p->alias.compare(alias) == 0) - { - return p->value.c_str(); - } - } - - return NULL; -} - -SourceHook::List::iterator CPluginManager::_alias_begin() -{ - return m_Aliases.begin(); -} - -SourceHook::List::iterator CPluginManager::_alias_end() -{ - return m_Aliases.end(); -} - -void CPluginManager::SetAlias(const char *alias, const char *value) -{ - SourceHook::List::iterator iter; - CNameAlias *p; - - for (iter = m_Aliases.begin(); iter != m_Aliases.end(); iter++) - { - p = (*iter); - if (p->alias.compare(alias) == 0) - { - if (value[0] == '\0') - { - iter = m_Aliases.erase(iter); - return; - } - else - { - p->value.assign(value); - return; - } - } - } - - if (value[0] != '\0') - { - p = new CNameAlias; - - p->alias.assign(alias); - p->value.assign(value); - - m_Aliases.push_back(p); - } -} - -CPluginManager::CPlugin::CPlugin() : m_Id(0), m_Source(0), m_API(NULL), m_Lib(NULL), m_UnloadFn(NULL) -{ - -} - -PluginId CPluginManager::Load(const char *file, PluginId source, bool &already, char *error, size_t maxlen) -{ - already = false; - //Check if we're about to reload an old plugin - PluginIter i = m_Plugins.begin(); - while (i != m_Plugins.end()) - { - if ((*i) && UTIL_PathCmp(file, (*i)->m_File.c_str())) - { - if ((*i)->m_Status < Pl_Paused) - { - //Attempt to load the plugin again - already = true; - i = m_Plugins.erase(i); - continue; - } - else - { - //No need to load it - already = true; - return (*i)->m_Id; - } - } - i++; - } - - CPlugin *pl = _Load(file, source, error, maxlen); - - if (!pl) - { - return Pl_BadLoad; - } - - ITER_PLEVENT(OnPluginLoad, pl->m_Id); - - return pl->m_Id; -} - -CPluginManager::CPlugin *CPluginManager::FindById(PluginId id) -{ - PluginIter i; - - for (i=m_Plugins.begin(); i!=m_Plugins.end(); i++) - { - if ( (*i)->m_Id == id )\ - { - return (*i); - } - } - - return NULL; -} - -void CPluginManager::SetAllLoaded() -{ - if (m_AllLoaded) - { - return; - } - - m_AllLoaded = true; - PluginIter i; - - for (i=m_Plugins.begin(); i!=m_Plugins.end(); i++) - { - if ( (*i) && (*i)->m_Status == Pl_Running && (*i)->m_API ) - { - //API 4 is when we added this callback - //Min version is now 5, so we ignore this check - //if ( (*i)->m_API->GetApiVersion() >= 004 ) - (*i)->m_API->AllPluginsLoaded(); - } - } -} - -bool CPluginManager::Pause(PluginId id, char *error, size_t maxlen) -{ - CPlugin *pl = FindById(id); - - if (!pl) - { - UTIL_Format(error, maxlen, "Plugin id not found"); - return false; - } - - bool ret; - - if ((ret=_Pause(pl, error, maxlen)) == true) - { - ITER_PLEVENT(OnPluginPause, pl->m_Id); - } - - return ret; -} - -bool CPluginManager::Unpause(PluginId id, char *error, size_t maxlen) -{ - CPlugin *pl = FindById(id); - - if (!pl) - { - UTIL_Format(error, maxlen, "Plugin id not found"); - return false; - } - - bool ret; - - if ( (ret=_Unpause(pl, error, maxlen)) == true ) - { - ITER_PLEVENT(OnPluginUnpause, pl->m_Id); - } - - return ret; -} - -bool CPluginManager::Unload(PluginId id, bool force, char *error, size_t maxlen) -{ - CPlugin *pl = FindById(id); - - if (!pl) - { - UTIL_Format(error, maxlen, "Plugin %d not found", id); - return false; - } - - bool ret; - PluginId old_id = pl->m_Id; - if ( (ret=_Unload(pl, force, error, maxlen)) == true ) - { - ITER_PLEVENT(OnPluginUnload, old_id); - } - - return ret; -} - -bool CPluginManager::Retry(PluginId id, char *error, size_t len) -{ - PluginIter i; - char buffer[64]; - for (i=m_Plugins.begin(); i!=m_Plugins.end(); i++) - { - if ( (*i) && (*i)->m_Id == id ) - { - if ( (*i)->m_Status >= Pl_Paused) - { - UTIL_Format(error, len, "Plugin %d is already running.", id); - return false; - } - CPlugin *pl = _Load((*i)->m_File.c_str(), Pl_Console, error, len); - if (!pl) - { - return false; - } - if (pl->m_Status >= Pl_Paused) - { - //Now it gets crazy... unload the original copy. - _Unload( (*i), true, buffer, sizeof(buffer)-1 ); - - //Set the new copy's id - pl->m_Id = id; - - //We just wasted an id... reclaim it - m_LastId--; - - return true; - } - else - { - //don't really care about the buffer here - _Unload(pl, true, buffer, sizeof(buffer)-1); - - //We just wasted an id... reclaim it - m_LastId--; - return false; - } - } - } - - UTIL_Format(error, len, "Plugin %d not found,", id); - return false; -} - -CPluginManager::CPlugin *CPluginManager::FindByAPI(ISmmPlugin *api) -{ - PluginIter i; - - //don't find bad plugins! - if (!api) - { - return NULL; - } - - for (i=m_Plugins.begin(); i!=m_Plugins.end(); i++) - { - if ((*i)->m_API == api) - { - return (*i); - } - } - - return NULL; -} - -int CPluginManager::GetPluginCount() -{ - return (int)m_Plugins.size(); -} - -const char *CPluginManager::GetStatusText(CPlugin *pl) -{ - switch (pl->m_Status) - { - case Pl_NotFound: - return "NOFILE"; - case Pl_Error: - return "ERROR"; - case Pl_Refused: - return "FAILED"; - case Pl_Paused: - return "PAUSED"; - case Pl_Running: - { - if (pl->m_API && pl->m_API->QueryRunning(NULL, 0)) - { - return "STOPPED"; - } else { - return "RUNNING"; - } - } - default: - return "-"; - } -} - -struct Unloader : public SourceHook::Impl::UnloadListener -{ - CPluginManager::CPlugin *plugin_; - bool destroy_; - - Unloader(CPluginManager::CPlugin *plugin, bool destroy) - : plugin_(plugin), destroy_(destroy) - { } - - void ReadyToUnload(SourceHook::Plugin plug) - { - if (plugin_->m_UnloadFn != NULL) - plugin_->m_UnloadFn(); - - dlclose(plugin_->m_Lib); - - if (destroy_) - { - delete plugin_; - } - else - { - plugin_->m_Lib = NULL; - plugin_->m_API = NULL; - } - - delete this; - } -}; - -CPluginManager::CPlugin *CPluginManager::_Load(const char *file, PluginId source, char *error, size_t maxlen) -{ - std::unique_ptr fp(nullptr, ::fclose); - CPlugin *pl; - - pl = new CPlugin(); - *error = '\0'; - - //Add plugin to list - pl->m_Id = m_LastId; - pl->m_File.assign(file); - m_Plugins.push_back(pl); - m_LastId++; - - if (ke::EndsWith(file, BINARY_EXT)) - { - //Check if the file even exists - fp.reset(fopen(file, "r")); - if (!fp) - { - if (error) - { - UTIL_Format(error, maxlen, "File not found: %s", file); - } - pl->m_Status = Pl_NotFound; - } - } - else - { - if (error) - UTIL_Format(error, maxlen, "File type not supported"); - pl->m_Status = Pl_NotFound; - } - - if (fp) - { - fp.reset(); - - //Load the file - pl->m_Lib = dlmount(file); - if (!pl->m_Lib) - { - if (error) - { - UTIL_Format(error, maxlen, "%s", dlerror()); - } - pl->m_Status = Pl_Error; - } - else - { - pl->m_API = NULL; - - /** - * First, try the new "advanced" interface - */ - METAMOD_FN_LOAD fnLoad = (METAMOD_FN_LOAD)dlsym(pl->m_Lib, "CreateInterface_MMS"); - if (fnLoad != NULL) - { - if (GlobVersionInfo.source_engine == SOURCE_ENGINE_UNKNOWN) - { - GlobVersionInfo.source_engine = g_Metamod.GetSourceEngineBuild(); - } - if (GlobVersionInfo.game_dir == NULL) - { - GlobVersionInfo.game_dir = strrchr(g_Metamod.GetBaseDir(), PATH_SEP_CHAR) + 1; - } - - /* Build path information */ - char file_path[256]; - size_t len = g_Metamod.PathFormat(file_path, sizeof(file_path), "%s", file); - - for (size_t i = len - 1; i < len; i--) - { - if (_IsPathSepChar(file_path[i])) - { - file_path[i] = '\0'; - break; - } - } - - MetamodLoaderInfo info; - info.pl_file = file; - info.pl_path = file_path; - - pl->m_API = fnLoad(&GlobVersionInfo, &info); -#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 - /* For plugin compat - try loading again using original OB if OB-Valve has failed */ - if (pl->m_API == NULL) - { - GlobVersionInfo.source_engine = SOURCE_ENGINE_ORANGEBOXVALVE_DEPRECATED; - pl->m_API = fnLoad(&GlobVersionInfo, &info); - if (pl->m_API == NULL) - { - GlobVersionInfo.source_engine = SOURCE_ENGINE_ORANGEBOX; - pl->m_API = fnLoad(&GlobVersionInfo, &info); - } - GlobVersionInfo.source_engine = g_Metamod.GetSourceEngineBuild(); - } -#endif - pl->m_UnloadFn = (METAMOD_FN_UNLOAD)dlsym(pl->m_Lib, "UnloadInterface_MMS"); - } - - /** - * If we didn't get anything, try the normal/simple interface. - */ - if (pl->m_API == NULL) - { - CreateInterfaceFn pfn = (CreateInterfaceFn)(dlsym(pl->m_Lib, PL_EXPOSURE_C)); - if (!pfn) - { - if (error) - { - UTIL_Format(error, maxlen, "Function %s not found", PL_EXPOSURE_C); - } - pl->m_Status = Pl_Error; - } - else - { - pl->m_API = static_cast((pfn)(METAMOD_PLAPI_NAME, NULL)); - - if (!pl->m_API) - { - if (error) - { - UTIL_Format(error, maxlen, "Failed to get API"); - } - pl->m_Status = Pl_Error; - } - } - } - - if (pl->m_API != NULL) - { - int api = pl->m_API->GetApiVersion(); - if (api < PLAPI_MIN_VERSION) - { - if (error) - { - if (api == 13) - { - UTIL_Format(error, maxlen, "Plugin uses experimental Metamod build, probably 1.6.x (%d < %d)", api, PLAPI_MIN_VERSION); - } - else if (api <= 12 && api >= 7) - { - UTIL_Format(error, maxlen, "Older Metamod version required, probably 1.4.x (%d < %d)", api, PLAPI_MIN_VERSION); - } - else - { - UTIL_Format(error, maxlen, "Older Metamod version required, probably 1.0 (%d < %d)", api, PLAPI_MIN_VERSION); - } - } - pl->m_Status = Pl_Error; - } - else if (api > METAMOD_PLAPI_VERSION) - { - if (error) - { - UTIL_Format(error, maxlen, "Plugin requires newer Metamod version (%d > %d)", api, METAMOD_PLAPI_VERSION); - } - pl->m_Status = Pl_Error; - } - else - { - if (pl->m_API->Load(pl->m_Id, &g_Metamod, error, maxlen, m_AllLoaded)) - { - pl->m_Status = Pl_Running; - if (m_AllLoaded) - { - pl->m_API->AllPluginsLoaded(); - } - } - else - { - pl->m_Status = Pl_Refused; - } - } - } - } - } - - if (pl->m_Lib && (pl->m_Status < Pl_Paused)) - { - pl->m_Events.clear(); - UnregAllConCmds(pl); - g_SourceHook.UnloadPlugin(pl->m_Id, new Unloader(pl, false)); - } - - return pl; -} - -bool CPluginManager::_Unload(CPluginManager::CPlugin *pl, bool force, char *error, size_t maxlen) -{ - if (error) - { - *error = '\0'; - } - - if (pl->m_API && pl->m_Lib) - { - //Note, we'll always tell the plugin it will be unloading... - if (pl->m_API->Unload(error, maxlen) || force) - { - pl->m_Events.clear(); - UnregAllConCmds(pl); - - //Remove the plugin from the list - PluginIter i; - for (i=m_Plugins.begin(); i!=m_Plugins.end(); i++) - { - if ( (*i)->m_Id == pl->m_Id ) - { - i = m_Plugins.erase(i); - break; - } - } - - //Make sure to detach it from sourcehook! - g_SourceHook.UnloadPlugin(pl->m_Id, new Unloader(pl, true)); - return true; - } - } else { - //The plugin is not valid, and let's just remove it from the list anyway - PluginIter i; - for (i=m_Plugins.begin(); i!=m_Plugins.end(); i++) - { - if ( (*i)->m_Id == pl->m_Id ) - { - i = m_Plugins.erase(i); - break; - } - } - delete pl; - - return true; - } - - return false; -} - -bool CPluginManager::_Pause(CPluginManager::CPlugin *pl, char *error, size_t maxlen) -{ - if (error) - { - *error = '\0'; - } - - if (pl->m_Status != Pl_Running || !pl->m_API) - { - if (error) - { - UTIL_Format(error, maxlen, "Plugin cannot be paused"); - } - } - else - { - if (pl->m_API->Pause(error, maxlen)) - { - g_SourceHook.PausePlugin(pl->m_Id); - pl->m_Status = Pl_Paused; - - return true; - } - } - - return false; -} - -bool CPluginManager::_Unpause(CPluginManager::CPlugin *pl, char *error, size_t maxlen) -{ - if (error) - { - *error = '\0'; - } - - if (pl->m_Status != Pl_Paused || !pl->m_API) - { - if (error) - { - UTIL_Format(error, maxlen, "Plugin cannot be unpaused"); - } - } - else - { - if (pl->m_API->Unpause(error, maxlen)) - { - g_SourceHook.UnpausePlugin(pl->m_Id); - pl->m_Status = Pl_Running; - - return true; - } - } - - return false; -} - -bool CPluginManager::UnloadAll() -{ - PluginIter i; - - char error[128]; - bool status = true; - - while ((i = m_Plugins.begin()) != m_Plugins.end()) - { - if ( !_Unload( (*i), true, error, sizeof(error)) ) - { - status = false; - } - } - - return status; -} - -bool CPluginManager::Query(PluginId id, const char **file, Pl_Status *status, PluginId *source) -{ - CPlugin *pl = FindById(id); - - if (!pl) - { - return false; - } - - if (file != NULL) - { - *file = pl->m_File.c_str(); - } - - if (status != NULL) - { - *status = pl->m_Status; - } - - if (source != NULL) - { - *source = pl->m_Source; - } - - return true; -} - -bool CPluginManager::QueryRunning(PluginId id, char *error, size_t maxlength) -{ - CPlugin *pl = FindById(id); - - if (!pl || !pl->m_API) - { - if (error) - { - UTIL_Format(error, maxlength, "Plugin not valid"); - } - return false; - } - - return pl->m_API->QueryRunning(error, maxlength); -} - -bool CPluginManager::QueryHandle(PluginId id, void **handle) -{ - CPlugin *pl = FindById(id); - - if (!pl) - { - return false; - } - - if (handle) - { - *handle = static_cast(pl->m_Lib); - } - - return true; -} - -PluginIter CPluginManager::_begin() -{ - return m_Plugins.begin(); -} - -PluginIter CPluginManager::_end() -{ - return m_Plugins.end(); -} - -void CPluginManager::AddPluginCvar(ISmmPlugin *api, ConCommandBase *pCvar) -{ - CPlugin *pl = FindByAPI(api); - - if (!pl) - { - return; - } - - pl->m_Cvars.push_back(pCvar); -} - -void CPluginManager::AddPluginCmd(ISmmPlugin *api, ConCommandBase *pCmd) -{ - CPlugin *pl = FindByAPI(api); - - if (!pl) - { - return; - } - - pl->m_Cmds.push_back(pCmd); -} - -void CPluginManager::RemovePluginCvar(ISmmPlugin *api, ConCommandBase *pCvar) -{ - CPlugin *pl = FindByAPI(api); - - if (!pl) - { - return; - } - - pl->m_Cvars.remove(pCvar); -} - -void CPluginManager::RemovePluginCmd(ISmmPlugin *api, ConCommandBase *pCmd) -{ - CPlugin *pl = FindByAPI(api); - - if (!pl) - { - return; - } - - pl->m_Cmds.remove(pCmd); -} - -void CPluginManager::UnregAllConCmds(CPlugin *pl) -{ - SourceHook::List::iterator i; - - /* :TODO: */ - for (i=pl->m_Cvars.begin(); i!=pl->m_Cvars.end(); i++) - { - g_Metamod.UnregisterConCommandBase(pl->m_Id, (*i) ); - } - pl->m_Cvars.clear(); - - for (i=pl->m_Cmds.begin(); i!=pl->m_Cmds.end(); i++) - { - g_Metamod.UnregisterConCommandBase(pl->m_Id, (*i) ); - } - pl->m_Cmds.clear(); -} - diff --git a/metamod-source/core/metamod_plugins.h b/metamod-source/core/metamod_plugins.h deleted file mode 100644 index 5bf4f904..00000000 --- a/metamod-source/core/metamod_plugins.h +++ /dev/null @@ -1,170 +0,0 @@ -/** - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2008 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#ifndef _INCLUDE_CPLUGIN_H -#define _INCLUDE_CPLUGIN_H - -/** - * @brief Implementation of Plugin API and Management routines - * @file CPlugin.cpp - */ - -#include -#include -#include -#include -#include -#include -#include -#include "metamod_oslink.h" - -/** - * History of plugin versions: (M=min, C=current) - * 1: Initial interface - * 2: Added GetLogTag() - * 3: Moved GetApiVersion() to top (2005-04-16) - * 4: Added AllPluginsLoaded() callback (2005-04-18) - * 5: Bumped version for SourceHook V4 (2005-05-01) - * 6: Added functions for console printing (2005-05-26) - * 7: Changed template libraries (2005-08-11) - * New loading structure mechanism - * New SourceHook version - * 8: New SourceHook version (2005-12-23) - * New ISmmAPI additions - * 9: New ISmmPluginManager additions - * 10: Added VSP listen functions to ISmmAPI and IMetamodListener (2007-02-09) - * 11: New SourceHook version v4.5 (May, 2007) - * 12: Orange Box API - * 13: Breaking of API for next SH version and other API changes - * MC 14: ABI stability reached for 1.6.0 changes - */ - -#define PLAPI_MIN_VERSION 14 - -struct CNameAlias -{ - SourceHook::String alias; - SourceHook::String value; -}; -/** - * @brief Implements Plugin Manager API - */ -class CPluginManager : public ISmmPluginManager -{ -public: - /** - * @brief Internal structure for holding plugin data - */ - class CPlugin - { - public: - CPlugin(); - public: - PluginId m_Id; - SourceHook::String m_File; - Pl_Status m_Status; - PluginId m_Source; - ISmmPlugin *m_API; - HINSTANCE m_Lib; - SourceHook::List m_Cvars; - SourceHook::List m_Cmds; - SourceHook::List m_Events; - METAMOD_FN_UNLOAD m_UnloadFn; - }; -public: - CPluginManager(); - ~CPluginManager(); - void SetAllLoaded(); -public: - PluginId Load(const char *file, PluginId source, bool &already, char *error, size_t maxlen); - bool Unload(PluginId id, bool force, char *error, size_t maxlen); - bool Pause(PluginId id, char *error, size_t maxlen); - bool Unpause(PluginId id, char *error, size_t maxlen); - bool UnloadAll(); - void SetAlias(const char *alias, const char *value); -public: - bool Query(PluginId id, const char **file, Pl_Status *status, PluginId *source); - bool QueryRunning(PluginId id, char *error, size_t maxlength); - bool QueryHandle(PluginId id, void **handle); - - void AddPluginCvar(ISmmPlugin *api, ConCommandBase *pCvar); - void AddPluginCmd(ISmmPlugin *api, ConCommandBase *pCmd); - void RemovePluginCvar(ISmmPlugin *api, ConCommandBase *pCvar); - void RemovePluginCmd(ISmmPlugin *api, ConCommandBase *pCmd); - - /** - * @brief Finds a plugin by Id - * - * @param id Id of plugin - * @return CPlugin on success, NULL otherwise - */ - CPlugin *FindById(PluginId id); - - CPlugin *FindByAPI(ISmmPlugin *api); - - /** - * @brief Attempts to reload a failed plugin - * - * @param id Id of plugin - * @param error Error message buffer - * @param len Maximum length of buffer - * @return True on success, false otherwise - */ - bool Retry(PluginId id, char *error, size_t len); - - int GetPluginCount(); - const char *GetStatusText(CPlugin *pl); - - //get alias info - const char *LookupAlias(const char *alias); - SourceHook::List::iterator _alias_begin(); - SourceHook::List::iterator _alias_end(); - - //Internal iterators - SourceHook::List::iterator _begin(); - SourceHook::List::iterator _end(); -private: - //These are identical internal functions for the wrappers above. - CPlugin *_Load(const char *file, PluginId source, char *error, size_t maxlen); - bool _Unload(CPlugin *pl, bool force, char *error, size_t maxlen); - bool _Pause(CPlugin *pl, char *error, size_t maxlen); - bool _Unpause(CPlugin *pl, char *error, size_t maxlen); - void UnregAllConCmds(CPlugin *pl); -private: - PluginId m_LastId; - SourceHook::List m_Plugins; - SourceHook::List m_Aliases; - bool m_AllLoaded; -}; - -typedef SourceHook::List::iterator PluginIter; - -/** @brief Singleton for plugin manager */ -extern CPluginManager g_PluginMngr; - -#endif //_INCLUDE_CPLUGIN_H - diff --git a/metamod-source/core/metamod_provider.h b/metamod-source/core/metamod_provider.h deleted file mode 100644 index 249abcf6..00000000 --- a/metamod-source/core/metamod_provider.h +++ /dev/null @@ -1,333 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2009 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#ifndef _INCLUDE_METAMOD_SOURCE_SUPPORT_H_ -#define _INCLUDE_METAMOD_SOURCE_SUPPORT_H_ - -namespace SourceMM -{ - class MetamodSourceConVar; - - enum - { - ConVarFlag_None = 0, - ConVarFlag_Notify = 1, - ConVarFlag_SpOnly = 2, - }; - - /** - * @brief Abstracts command information, since the new engine fixes the - * re-entrancy problems in the tokenization system. - */ - class IMetamodSourceCommandInfo - { - public: - /** - * @brief Returns the argument count such that arguments - * 1 to N are valid arguments, and 0 is the command name. - * - * @return Argument count. - */ - virtual unsigned int GetArgCount() =0; - - /** - * @brief Returns the string of an argument number. - * - * @param num Argument number. - * @return Argument text. - */ - virtual const char *GetArg(unsigned int num) =0; - - /** - * @brief Returns the entire command argument string. - * - * @return Argument string. - */ - virtual const char *GetArgString() =0; - }; - - /** - * @brief Interface for Metamod:Source to provide callbacks to the - * provider. - */ - class IMetamodSourceProviderCallbacks - { - public: - /** - * @brief Called before the server DLL handles game initialization. - */ - virtual void OnGameInit() = 0; - - /** - * @brief Called after the server DLL has completed handling level/map initialization. - */ - virtual void OnLevelInit(char const* pMapName, char const* pMapEntities, char const* pOldLevel, char const* pLandmarkName, bool loadGame, bool background) = 0; - - /** - * @brief Called after the server DLL has completed handling level/map shut down. - */ - virtual void OnLevelShutdown() = 0; - - /** - * @brief Called when the ConCommand "meta" is executed - */ - virtual bool OnCommand_Meta(IMetamodSourceCommandInfo* info) = 0; - - /** - * @brief Called when a client executes "meta" as a ClientCommand - */ - virtual bool OnCommand_ClientMeta(MMSPlayer_t player, IMetamodSourceCommandInfo* info) = 0; - }; - - class IMetamodSourceProvider - { - public: - /** - * @brief Set the callback interface for the provider to call into. - * - * @param pCallbacks Pointer to callback interface implementation. - */ - virtual void SetCallbacks(IMetamodSourceProviderCallbacks* pCallbacks) = 0; - - /** - * @brief Returns whether source engine build is compatible. - * - * @param build Source engine build. - * @return True if compatible, false otherwise. - */ - virtual bool IsSourceEngineBuildCompatible(int build) =0; - - /** - * @brief Logs a message via IVEngineServer::LogPrint. - * - * @param buffer Buffer to print. - * @return True on success, false if not supported, - * or IVEngineServer is not yet known. - */ - virtual bool LogMessage(const char *buffer) =0; - - /** - * @brief Returns the command line value of a parameter. If ICvar - * is not yet loaded, this uses an equivalent function. - * - * @param key Parameter to look up. - * @param val Default string to return if none found. - * @return Parameter value. - */ - virtual const char *GetCommandLineValue(const char *key, const char *defval=NULL) =0; - - /** - * @brief Prints a string to the remote server console. - * - * Note: new lines are not appended. - * - * @param msg Message string. - */ - virtual void ConsolePrint(const char *msg) =0; - - /** - * @brief Prints text in the specified client's console. - * - * @param player Player identifier - * @param msg Message string. - */ - virtual void ClientConsolePrint(MMSPlayer_t player, const char *msg) =0; - - /** - * @brief Halts the server with a fatal error message. - * - * No newline is appended. - * - * @param fmt Formatted message string. - * @param ... Format parameters. - */ - virtual void DisplayError(const char *fmt, ...) =0; - - /** - * @brief Sends the server a warning message. - * - * No newline is appended. - * - * @param fmt Formatted message string. - * @param ... Format parameters. - */ - virtual void DisplayWarning(const char *fmt, ...) =0; - - /** - * @brief Sends the server a developer message. - * - * No newline is appended. - * - * @param fmt Formatted message string. - * @param ... Format parameters. - */ - virtual void DisplayDevMsg(const char* fmt, ...) = 0; - - /** - * @brief Attempts to notify the provider of the gamedll version being - * used. - * - * @param iface Interface string. - * @return Version number on success, 0 otherwise. - */ - virtual int TryServerGameDLL(const char *iface) =0; - - /** - * @brief Notifies the provider that the DLLInit pre-hook is almost done. - */ - virtual void Notify_DLLInit_Pre(CreateInterfaceFn engineFactory, CreateInterfaceFn serverFactory) =0; - - virtual void Notify_DLLShutdown_Pre() =0; - - /** - * @brief Wrapper around IVEngineServer::ServerCommand() - * - * @param cmd Command string. - */ - virtual void ServerCommand(const char *cmd) =0; - - /** - * @brief Creates a ConVar pointer. - * - * @param name ConVar name. - * @param defval Default value string. - * @param flags ConVar flags. - * @param help Help text. - * @return ConVar pointer. - */ - virtual MetamodSourceConVar *CreateConVar(const char *name, - const char *defval, - const char *help, - int flags) =0; - - /** - * @brief Returns the string value of a ConVar. - * - * @param convar ConVar pointer. - * @return String value. - */ - virtual const char *GetConVarString(MetamodSourceConVar *convar) =0; - - /** - * @brief Sets a ConVar string. - * - * @param convar ConVar pointer. - * @param str String pointer. - */ - virtual void SetConVarString(MetamodSourceConVar *convar, const char *str) =0; - - /** - * @brief Retrieves the absolute path to the game directory. - * - * @param buffer Buffer in which to store path. - * @param maxlen Maximum length of buffer. - */ - virtual void GetGamePath(char *buffer, int maxlen) = 0; - - /** - * @brief Retrieves the game description. - * - * @return Game description. - */ - virtual const char *GetGameDescription() =0; - - /** - * @brief Registers a ConCommandBase. - * - * @param pCommand ConCommandBase to register. - * @return True if successful, false otherwise. - */ - virtual bool RegisterConCommandBase(ConCommandBase *pCommand) =0; - - /** - * @brief Unregisters a ConCommandBase. - * - * @param pCommand ConCommandBase to unlink. - */ - virtual void UnregisterConCommandBase(ConCommandBase *pCommand) =0; - - /** - * @brief Returns whether a ConCommandBase is a command or not. - * - * @param pCommand ConCommandBase pointer. - * @return True if a command, false otherwise. - */ - virtual bool IsConCommandBaseACommand(ConCommandBase *pCommand) =0; - - /** - * @brief Returns the number of user messages in the GameDLL. - * - * @return Number of user messages, or -1 if SourceMM has - * failed to get user message list. - */ - virtual int GetUserMessageCount() =0; - - /** - * @brief Returns the index of the specified user message. - * - * @param name User message name. - * @param size Optional pointer to store size of user message. - * @return Message index, or -1 on failure. - */ - virtual int FindUserMessage(const char *name, int *size=NULL) =0; - - /** - * @brief Returns the name of the specified user message. - * - * @param index User message index. - * @param size Optional pointer to store size of user message. - * @return Message name, or NULL on failure. - */ - virtual const char *GetUserMessage(int index, int *size=NULL) =0; - - /** - * @brief Returns the Source Engine build. - * - * @return SOURCE_ENGINE constant. - */ - virtual int DetermineSourceEngine() =0; - - /** - * @brief Processes a VDF plugin file. - * - */ - virtual bool ProcessVDF(const char *file, char path[], size_t path_len, char alias[], size_t alias_len) =0; - - /** - * @brief Returns string that describes engine version. - * - * @return Description. - */ - virtual const char *GetEngineDescription() const =0; - }; -}; - -extern PluginId g_PLID; -extern SourceHook::ISourceHook *g_SHPtr; -extern SourceMM::IMetamodSourceProvider *provider; -extern SourceMM::ISmmAPI *g_pMetamod; - -#endif //_INCLUDE_METAMOD_SOURCE_SUPPORT_H_ - diff --git a/metamod-source/core/metamod_util.cpp b/metamod-source/core/metamod_util.cpp deleted file mode 100644 index ad8c74a7..00000000 --- a/metamod-source/core/metamod_util.cpp +++ /dev/null @@ -1,456 +0,0 @@ -/** - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2008 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include "metamod_util.h" -#include "metamod_oslink.h" - -#ifdef _WIN32 -# include -#else -# include -# include -#endif - -using namespace std::string_literals; - -/** - * @brief Utility functions - * @file util.cpp - */ - -const char *UTIL_GetExtension(const char *file) -{ - size_t len = strlen(file); - size_t i = 0; - - for (i = len - 1; i + 1 > 0; i--) - { - if (file[i] == '/' || file[i] == '\\') - { - return NULL; - } - - if ((file[i] == '.') && (i != len - 1)) - { - return (const char *)&(file[i + 1]); - } - } - - return NULL; -} - -// https://stackoverflow.com/a/217605 -// trim from start (in place) -static inline void ltrim(std::string& s) { - s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) { - return !std::isspace(ch); - })); -} - -// trim from end (in place) -static inline void rtrim(std::string& s) { - s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) { - return !std::isspace(ch); - }).base(), s.end()); -} - -void UTIL_TrimLeft(char *buffer) -{ - std::string s(buffer); - ltrim(s); - strcpy(buffer, s.c_str()); -} - -void UTIL_TrimRight(char *buffer) -{ - std::string s(buffer); - rtrim(s); - strcpy(buffer, s.c_str()); -} - -bool UTIL_PathCmp(const char *path1, const char *path2) -{ - size_t pos1 = 0, pos2 = 0; - - while (true) - { - if (path1[pos1] == '\0' || path2[pos2] == '\0') - { - return (path1[pos1] == path2[pos2]); - } - - if (path1[pos1] == PATH_SEP_CHAR) - { - if (path2[pos2] != PATH_SEP_CHAR) - { - return false; - } - - /* Look for extra path chars */ - while (path1[++pos1]) - { - if (path1[pos1] != PATH_SEP_CHAR) - { - break; - } - } - while (path2[++pos2]) - { - if (path2[pos2] != PATH_SEP_CHAR) - { - break; - } - } - continue; - } - - /* If we're at a different non-alphanumeric, the next character MUST match */ - if ((((unsigned)path1[pos1] & 0x80) && path1[pos1] != path2[pos2]) - || - (!isalpha(path1[pos1]) && (path1[pos1] != path2[pos2])) - ) - { - return false; - } - - #ifdef WIN32 - if (toupper(path1[pos1]) != toupper(path2[pos2])) - #else - if (path1[pos1] != path2[pos2]) - #endif - { - return false; - } - - pos1++; - pos2++; - } -} - -size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - size_t len = vsnprintf(buffer, maxlength, fmt, ap); - va_end(ap); - - if (len >= maxlength) - { - len = maxlength - 1; - buffer[len] = '\0'; - } - - return len; -} - -size_t UTIL_FormatArgs(char *buffer, size_t maxlength, const char *fmt, va_list params) -{ - size_t len = vsnprintf(buffer, maxlength, fmt, params); - - if (len >= maxlength) - { - len = maxlength - 1; - buffer[len] = '\0'; - } - - return len; -} - -inline bool pathchar_isalpha(char a) -{ - return (((a & 1<<7) == 0) && isalpha(a)); -} - -inline bool pathchar_sep(char a) -{ -#if defined WIN32 - return (a == '/' || a == '\\'); -#else - return (a == '/'); -#endif -} - -inline bool pathstr_isabsolute(const char *str) -{ -#if defined WIN32 - return (pathchar_isalpha(str[0]) - && str[1] == ':' - && pathchar_sep(str[2])); -#else - return (str[0] == '/'); -#endif -} - -inline bool pathchar_cmp(char a, char b) -{ -#if defined WIN32 - if (pathchar_isalpha(a) && pathchar_isalpha(b)) - { - return (tolower(a) == tolower(b)); - } - /* Either path separator is acceptable */ - if (pathchar_sep(a)) - { - return pathchar_sep(b); - } -#endif - return (a == b); -} - -/** - * @brief Forms a relative path given two absolute paths. - * - * @param buffer Buffer to store relative path in. - * @param maxlength Maximum length of the output buffer. - * @param relTo Destination folder to use as a working directory. - * Final folder name should not be pathchar-terminated. - * @param relFrom Source file or folder to use as a target. - * @return True on success, false on failure. - */ -bool UTIL_BadRelatize(char buffer[], - size_t maxlength, - const char *relTo, - const char *relFrom) -{ - /* We don't allow relative paths in here, force - * the user to resolve these himself! - */ - if (!pathstr_isabsolute(relTo) - || !pathstr_isabsolute(relFrom)) - { - return false; - } - -#if defined WIN32 - /* Relative paths across drives are not possible */ - if (!pathchar_cmp(relTo[0], relFrom[0])) - { - return false; - } - /* Get rid of the drive and semicolon part */ - relTo = &relTo[2]; - relFrom = &relFrom[2]; -#endif - - /* Eliminate the common root between the paths */ - const char *rootTo = NULL; - const char *rootFrom = NULL; - while (*relTo != '\0' && *relFrom != '\0') - { - /* If we get to a new path sequence, start over */ - if (pathchar_sep(*relTo) - && pathchar_sep(*relFrom)) - { - rootTo = relTo; - rootFrom = relFrom; - /* If the paths don't compare, stop looking for a common root */ - } else if (!pathchar_cmp(*relTo, *relFrom)) { - break; - } - relTo++; - relFrom++; - } - - /* NULLs shouldn't happen! */ - if (rootTo == NULL - || rootFrom == NULL) - { - return false; - } - - size_t numLevels = 0; - - /* The root case is special! - * Don't count anything from it. - */ - if (*(rootTo + 1) != '\0') - { - /* Search for how many levels we need to go up. - * Since the root pointer points to a '/', we increment - * the initial pointer by one. - */ - while (*rootTo != '\0') - { - if (pathchar_sep(*rootTo)) - { - /* Check for an improper trailing slash, - * just to be nice even though the user - * should NOT have done this! - */ - if (*(rootTo + 1) == '\0') - { - break; - } - numLevels++; - } - rootTo++; - } - } - - /* Now build the new relative path. */ - size_t len, total = 0; - while (numLevels--) - { - len = snprintf(&buffer[total], maxlength - total, ".." PATH_SEP_STR); - if (len >= maxlength - total) - { - /* Not enough space in the buffer */ - return false; - } - total += len; - } - - /* Add the absolute path. */ - len = snprintf(&buffer[total], maxlength - total, "%s", &rootFrom[1]); - if (len >= maxlength - total) - { - return false; - } - - return true; -} - -bool UTIL_VerifySignature(const void *addr, const char *sig, size_t len) -{ - unsigned char *addr1 = (unsigned char *) addr; - unsigned char *addr2 = (unsigned char *) sig; - - for (size_t i = 0; i < len; i++) - { - if (addr2[i] == '*') - continue; - if (addr1[i] != addr2[i]) - return false; - } - - return true; -} - -static bool ComparePathComponent(const std::string& a, const std::string& b) { -#ifdef _WIN32 - if (a.size() != b.size()) - return false; - for (size_t i = 0; i < a.size(); i++) { - if (!pathchar_cmp(a[i], b[i])) - return false; - } - return true; -#else - return a == b; -#endif -} - -static std::vector SplitPath(const char* path) { - std::vector parts; - - const char* iter = path; - -#ifdef _WIN32 - if (isalpha(path[0]) && path[1] == ':' && pathchar_sep(path[2])) { - // Append drive only (eg C:) - parts.emplace_back(path, 2); - iter += 2; - while (pathchar_sep(*iter)) - iter++; - } -#endif - - if (pathchar_sep(*iter)) { - parts.emplace_back(PATH_SEP_STR); - while (pathchar_sep(*iter)) - iter++; - } - - while (*iter) { - const char* start = iter; - while (*iter && !pathchar_sep(*iter)) - iter++; - if (iter != start) - parts.emplace_back(start, iter - start); - while (pathchar_sep(*iter)) - iter++; - } - return parts; -} - -bool UTIL_Relatize2(char* buffer, size_t maxlen, const char* path1, const char* path2) -{ - auto parts1 = SplitPath(path1); - auto parts2 = SplitPath(path2); - - // If this fails, paths were not relative or have different drives. - if (parts1[0] != parts2[0]) - return false; - - // Skip past identical paths. - size_t cursor = 1; - while (true) { - if (cursor >= parts1.size() || cursor >= parts2.size()) - break; - if (!ComparePathComponent(parts1[cursor], parts2[cursor])) - break; - cursor++; - } - - std::string new_path; - for (size_t i = cursor; i < parts1.size(); i++) - new_path += ".."s + PATH_SEP_STR; - for (size_t i = cursor; i < parts2.size(); i++) { - new_path += parts2[i]; - if (i != parts2.size() - 1) - new_path += PATH_SEP_STR; - } - if (pathchar_sep(path2[strlen(path2) - 1])) - new_path += PATH_SEP_STR; - - snprintf(buffer, maxlen, "%s", new_path.c_str()); - return true; -} - -static inline bool PathExists(const char* path) { -#ifdef _WIN32 - return _access(path, 0) == 0 || errno != ENOENT; -#else - return access(path, F_OK) == 0 || errno != ENOENT; -#endif -} - -bool UTIL_Relatize(char buffer[], size_t maxlength, const char *relTo, const char *relFrom) -{ - if (UTIL_BadRelatize(buffer, maxlength, relTo, relFrom)) { - if (PathExists(buffer)) - return true; - } - return UTIL_Relatize2(buffer, maxlength, relTo, relFrom); -} diff --git a/metamod-source/core/metamod_util.h b/metamod-source/core/metamod_util.h deleted file mode 100644 index 234b804e..00000000 --- a/metamod-source/core/metamod_util.h +++ /dev/null @@ -1,109 +0,0 @@ -/** - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2008 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#ifndef _INCLUDE_UTIL_H -#define _INCLUDE_UTIL_H - -#include - -#if defined(WIN32) || defined(_WIN32) -#define BINARY_EXT ".dll" -#elif defined(__linux__) -#define BINARY_EXT ".so" -#elif defined(__APPLE__) -#define BINARY_EXT ".dylib" -#endif - -/** - * @brief Utility functions - * @file util.h - */ - -/** - * @brief Returns true is string is not blank, false otherwise. - */ -#define IS_STR_FILLED(var) (var != NULL && var[0] != '\0') - -/** - * @brief Returns a pointer to the extension in a file name. - */ -const char *UTIL_GetExtension(const char *file); - -/** - * @brief Removes whitespace characters from left side of string. - */ -void UTIL_TrimLeft(char *buffer); - -/** - * @brief Removes whitespace characters from right side of string. - */ -void UTIL_TrimRight(char *buffer); - -/** - * @brief Compares two file paths. - */ -bool UTIL_PathCmp(const char *path1, const char *path2); - -/** - * @brief Same as snprintf except that it ensures the string buffer is null terminated. - */ -size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...); - -/** - * @brief Same as vsnprintf except that it ensures the string buffer is null terminated. - */ -size_t UTIL_FormatArgs(char *buffer, size_t maxlength, const char *fmt, va_list params); - -/** - * @brief Forms a relative path given two absolute paths. - * - * @param buffer Buffer to store relative path in. - * @param maxlength Maximum length of the output buffer. - * @param relTo Destination folder to use as a working directory. - * Final folder name should not be pathchar-terminated. - * @param relFrom Source file or folder to use as a target. - * @return True on success, false on failure. - */ -bool UTIL_Relatize(char buffer[], size_t maxlength, const char *relTo, const char *relFrom); - -// The previous version of Relatize is broken. Do not use it. We include it for -// backwards compatibility in old engines only, in case there are weird path -// scenarios going on. -bool UTIL_Relatize2(char buffer[], size_t maxlength, const char *relTo, const char *relFrom); - -/** - * @brief Compares memory address against a signature. - * - * @param addr Memory address to check. - * @param sig Signature used to check against memory address. Accept 0x2A as wildcard. - * @param len Length of signature. - * @return True if signature was verified, false otherwise. - */ -bool UTIL_VerifySignature(const void *addr, const char *sig, size_t len); - -#endif //_INCLUDE_UTIL_H - diff --git a/metamod-source/core/provider/provider_base.cpp b/metamod-source/core/provider/provider_base.cpp deleted file mode 100644 index d8e8947a..00000000 --- a/metamod-source/core/provider/provider_base.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2023 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#include -#include -#include "../metamod_oslink.h" -#include -#include -#include -#include -#include "../metamod_util.h" -#include "provider_base.h" -#include "metamod_console.h" -#include -#include "metamod.h" -#include - - -/* Imports */ -#if SOURCE_ENGINE < SE_ORANGEBOX -#undef CommandLine -DLL_IMPORT ICommandLine *CommandLine(); -#endif - -void _ServerCommand(); -/* Variables */ -static List conbases_unreg; - -ICvar *icvar = NULL; -IServerGameDLL *server = NULL; -IVEngineServer *engine = NULL; -IServerGameClients *gameclients = NULL; -CGlobalVars *gpGlobals = NULL; - - -bool BaseProvider::IsSourceEngineBuildCompatible(int build) -{ - return (build == SOURCE_ENGINE_ORIGINAL - || build == SOURCE_ENGINE_EPISODEONE); -} - -int BaseProvider::TryServerGameDLL(const char *iface) -{ - if (strncmp(iface, "ServerGameDLL", 13) != 0) - { - return 0; - } - - return atoi(&iface[13]); -} - -bool BaseProvider::LogMessage(const char *buffer) -{ - if (!engine) - { - return false; - } - - engine->LogPrint(buffer); - - return true; -} - -void BaseProvider::DisplayError(const char *fmt, ...) -{ - va_list ap; - char buffer[2048]; - - va_start(ap, fmt); - UTIL_FormatArgs(buffer, sizeof(buffer), fmt, ap); - va_end(ap); - - Error("%s", buffer); -} - -void BaseProvider::DisplayWarning(const char *fmt, ...) -{ - va_list ap; - char buffer[2048]; - - va_start(ap, fmt); - UTIL_FormatArgs(buffer, sizeof(buffer), fmt, ap); - va_end(ap); - - Warning("%s", buffer); -} - -void BaseProvider::DisplayDevMsg(const char* fmt, ...) -{ - va_list ap; - char buffer[2048]; - - va_start(ap, fmt); - UTIL_FormatArgs(buffer, sizeof(buffer), fmt, ap); - va_end(ap); - - DevMsg("%s", buffer); -} diff --git a/metamod-source/core/provider/provider_base.h b/metamod-source/core/provider/provider_base.h deleted file mode 100644 index 2294db24..00000000 --- a/metamod-source/core/provider/provider_base.h +++ /dev/null @@ -1,105 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2023 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#ifndef _INCLUDE_METAMOD_SOURCE_BASE_PROVIDER_H_ -#define _INCLUDE_METAMOD_SOURCE_BASE_PROVIDER_H_ - -#if defined _DEBUG -#define DEBUG2 -#undef _DEBUG -#endif -#include -#include -#if !defined META_IS_SOURCE2 -#include -#endif -#include "ISmmAPI.h" -#include "metamod_provider.h" -#include "metamod_oslink.h" -#if defined DEBUG2 -#undef DEBUG2 -#define _DEBUG -#endif - -using namespace SourceMM; -using namespace SourceHook; - -class INetworkGameServer; - -class BaseProvider : public IMetamodSourceProvider -{ -public: // Must implement - virtual void Notify_DLLInit_Pre(CreateInterfaceFn engineFactory, CreateInterfaceFn serverFactory) override = 0; - virtual void Notify_DLLShutdown_Pre() override = 0; - virtual int DetermineSourceEngine() override = 0; - virtual const char *GetEngineDescription() const override = 0; - virtual void GetGamePath(char *pszBuffer, int len) override = 0; - virtual const char *GetGameDescription() override = 0; - virtual bool ProcessVDF(const char* file, char path[], size_t path_len, char alias[], size_t alias_len) override = 0; - virtual const char* GetCommandLineValue(const char* key, const char* defval) override = 0; - virtual void ConsolePrint(const char* msg) override = 0; - virtual void ClientConsolePrint(MMSPlayer_t player, const char* msg) override = 0; - virtual void ServerCommand(const char* cmd) override = 0; - virtual MetamodSourceConVar *CreateConVar(const char* name, - const char* defval, - const char* help, - int flags) override = 0; - virtual const char* GetConVarString(MetamodSourceConVar *convar) override = 0; - virtual void SetConVarString(MetamodSourceConVar *convar, const char* str) override = 0; - virtual bool RegisterConCommandBase(ConCommandBase* pCommand) override = 0; - virtual void UnregisterConCommandBase(ConCommandBase* pCommand) override = 0; - virtual bool IsConCommandBaseACommand(ConCommandBase* pCommand) override = 0; -public: // May implement/override (stubbed) - virtual int GetUserMessageCount() override { return -1; } - virtual int FindUserMessage(const char *name, int *size=nullptr) override { return -1;} - virtual const char *GetUserMessage(int index, int *size=nullptr) override { return nullptr;} -public: // May implement/override - virtual bool IsSourceEngineBuildCompatible(int build) override; - virtual bool LogMessage(const char *buffer) override; - virtual void DisplayError(const char *fmt, ...) override; - virtual void DisplayWarning(const char *fmt, ...) override; - virtual void DisplayDevMsg(const char* fmt, ...) override; - virtual int TryServerGameDLL(const char *iface) override; -public: - void SetCallbacks(IMetamodSourceProviderCallbacks* pCallbacks) override final - { - m_pCallbacks = pCallbacks; - } -protected: - IMetamodSourceProviderCallbacks* m_pCallbacks = nullptr; -}; - -extern IVEngineServer *engine; -extern IServerGameDLL *server; -extern IServerGameClients *gameclients; -extern ICvar *icvar; -extern CGlobalVars *gpGlobals; -#if defined META_IS_SOURCE2 -extern INetworkServerService *netservice; -extern IEngineServiceMgr *enginesvcmgr; -#endif - -#endif //_INCLUDE_METAMOD_SOURCE_BASE_PROVIDER_H_ - diff --git a/metamod-source/core/provider/source/provider_source.cpp b/metamod-source/core/provider/source/provider_source.cpp deleted file mode 100644 index 9e0705ae..00000000 --- a/metamod-source/core/provider/source/provider_source.cpp +++ /dev/null @@ -1,678 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2023 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#include "provider_source.h" -#include -#include -#include -#include -#include -#include - -#include - -#if SOURCE_ENGINE >= SE_ORANGEBOX -void LocalCommand_Meta(const CCommand& args); -#else -void LocalCommand_Meta(); -#endif -static ConCommand meta_local_cmd("meta", LocalCommand_Meta, "Metamod:Source control options"); - -static SourceProvider g_SourceProvider; - -IMetamodSourceProvider* provider = &g_SourceProvider; - -SH_DECL_HOOK0(IServerGameDLL, GameInit, SH_NOATTRIB, 0, bool); -SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, 0, bool, const char*, const char*, const char*, const char*, bool, bool); -SH_DECL_HOOK0_void(IServerGameDLL, LevelShutdown, SH_NOATTRIB, 0); - -#if SOURCE_ENGINE >= SE_ORANGEBOX -SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t*, const CCommand&); -#else -SH_DECL_HOOK1_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t*); -#endif - -void SourceProvider::Notify_DLLInit_Pre(CreateInterfaceFn engineFactory, - CreateInterfaceFn serverFactory) -{ -#if SOURCE_ENGINE == SE_SDK2013 - // Shim to avoid hooking shims - engine = (IVEngineServer*)((engineFactory)("VEngineServer023", NULL)); - if (!engine) - { - engine = (IVEngineServer*)((engineFactory)("VEngineServer022", NULL)); - if (!engine) - { - engine = (IVEngineServer*)((engineFactory)("VEngineServer021", NULL)); - } - } -#else - engine = (IVEngineServer*)((engineFactory)(INTERFACEVERSION_VENGINESERVER, NULL)); -#endif - if (!engine) - { - DisplayError("Could not find IVEngineServer! Metamod cannot load."); - return; - } - -#if SOURCE_ENGINE >= SE_ORANGEBOX - icvar = (ICvar*)((engineFactory)(CVAR_INTERFACE_VERSION, NULL)); -#else - icvar = (ICvar*)((engineFactory)(VENGINE_CVAR_INTERFACE_VERSION, NULL)); -#endif - if (!icvar) - { - DisplayError("Could not find ICvar! Metamod cannot load."); - return; - } - - if ((gameclients = (IServerGameClients*)(serverFactory("ServerGameClients003", NULL))) - == NULL) - { - gameclients = (IServerGameClients*)(serverFactory("ServerGameClients004", NULL)); - } - - baseFs = (IFileSystem*)((engineFactory)(FILESYSTEM_INTERFACE_VERSION, NULL)); - if (baseFs == NULL) - { - mm_LogMessage("Unable to find \"%s\": .vdf files will not be parsed", FILESYSTEM_INTERFACE_VERSION); - } - -#if SOURCE_ENGINE >= SE_ORANGEBOX - g_pCVar = icvar; -#endif - - m_ConVarAccessor.RegisterConCommandBase(&meta_local_cmd); - -#if SOURCE_ENGINE == SE_EPISODEONE - /* The Ship is the only game known at this time that uses the pre-Episode One engine */ - bOriginalEngine = strcmp(CommandLine()->ParmValue("-game", "hl2"), "ship") == 0; -#endif - - CacheUserMessages(); - -#if SOURCE_ENGINE < SE_ORANGEBOX - if (!m_ConVarAccessor.InitConCommandBaseList()) - { - /* This is very unlikely considering it's old engine */ - mm_LogMessage("[META] Warning: Failed to find ConCommandBase list!"); - mm_LogMessage("[META] Warning: ConVars and ConCommands cannot be unregistered properly! Please file a bug report."); - } -#endif - - if (gameclients) - { - SH_ADD_HOOK(IServerGameClients, ClientCommand, gameclients, SH_MEMBER(this, &SourceProvider::Hook_ClientCommand), false); - } - - SH_ADD_HOOK(IServerGameDLL, GameInit, server, SH_MEMBER(this, &SourceProvider::Hook_GameInit), false); - SH_ADD_HOOK(IServerGameDLL, LevelInit, server, SH_MEMBER(this, &SourceProvider::Hook_LevelInit), true); - SH_ADD_HOOK(IServerGameDLL, LevelShutdown, server, SH_MEMBER(this, &SourceProvider::Hook_LevelShutdown), true); -} - -void SourceProvider::Notify_DLLShutdown_Pre() -{ - SH_REMOVE_HOOK(IServerGameDLL, GameInit, server, SH_MEMBER(this, &SourceProvider::Hook_GameInit), false); - SH_REMOVE_HOOK(IServerGameDLL, LevelInit, server, SH_MEMBER(this, &SourceProvider::Hook_LevelInit), true); - SH_REMOVE_HOOK(IServerGameDLL, LevelShutdown, server, SH_MEMBER(this, &SourceProvider::Hook_LevelShutdown), true); - - m_ConVarAccessor.RemoveMetamodCommands(); - -#if SOURCE_ENGINE < SE_ORANGEBOX - if (g_Metamod.IsLoadedAsGameDLL()) - { - icvar->UnlinkVariables(FCVAR_GAMEDLL); - } -#endif -} - -bool SourceProvider::ProcessVDF(const char* file, char path[], size_t path_len, char alias[], size_t alias_len) -{ - if (baseFs == NULL) - { - return false; - } - - KeyValues* pValues; - bool bKVLoaded = false; - const char* plugin_file, * p_alias; - - pValues = new KeyValues("Metamod Plugin"); - - if (bOriginalEngine) - { - /* The Ship must use a special version of this function */ - bKVLoaded = KVLoadFromFile(pValues, baseFs, file); - } - else - { - bKVLoaded = pValues->LoadFromFile(baseFs, file); - } - - if (!bKVLoaded) - { - pValues->deleteThis(); - return false; - } - - if ((plugin_file = pValues->GetString("file", NULL)) == NULL) - { - pValues->deleteThis(); - return false; - } - - UTIL_Format(path, path_len, "%s", plugin_file); - - if ((p_alias = pValues->GetString("alias", NULL)) != NULL) - { - UTIL_Format(alias, alias_len, "%s", p_alias); - } - else - { - UTIL_Format(alias, alias_len, ""); - } - - pValues->deleteThis(); - - return true; -} - -int SourceProvider::DetermineSourceEngine() -{ -#if SOURCE_ENGINE == SE_BLOODYGOODTIME - return SOURCE_ENGINE_BLOODYGOODTIME; -#elif SOURCE_ENGINE == SE_ALIENSWARM - return SOURCE_ENGINE_ALIENSWARM; -#elif SOURCE_ENGINE == SE_LEFT4DEAD2 - return SOURCE_ENGINE_LEFT4DEAD2; -#elif SOURCE_ENGINE == SE_NUCLEARDAWN - return SOURCE_ENGINE_NUCLEARDAWN; -#elif SOURCE_ENGINE == SE_CONTAGION - return SOURCE_ENGINE_CONTAGION; -#elif SOURCE_ENGINE == SE_LEFT4DEAD - return SOURCE_ENGINE_LEFT4DEAD; -#elif SOURCE_ENGINE == SE_ORANGEBOX - return SOURCE_ENGINE_ORANGEBOX; -#elif SOURCE_ENGINE == SE_CSS - return SOURCE_ENGINE_CSS; -#elif SOURCE_ENGINE == SE_HL2DM - return SOURCE_ENGINE_HL2DM; -#elif SOURCE_ENGINE == SE_DODS - return SOURCE_ENGINE_DODS; -#elif SOURCE_ENGINE == SE_SDK2013 - return SOURCE_ENGINE_SDK2013; -#elif SOURCE_ENGINE == SE_TF2 - return SOURCE_ENGINE_TF2; -#elif SOURCE_ENGINE == SE_DARKMESSIAH - return SOURCE_ENGINE_DARKMESSIAH; -#elif SOURCE_ENGINE == SE_EYE - return SOURCE_ENGINE_EYE; -#elif SOURCE_ENGINE == SE_PORTAL2 - return SOURCE_ENGINE_PORTAL2; -#elif SOURCE_ENGINE == SE_BLADE - return SOURCE_ENGINE_BLADE; -#elif SOURCE_ENGINE == SE_INSURGENCY - return SOURCE_ENGINE_INSURGENCY; -#elif SOURCE_ENGINE == SE_DOI - return SOURCE_ENGINE_DOI; -#elif SOURCE_ENGINE == SE_CSGO - return SOURCE_ENGINE_CSGO; -#elif SOURCE_ENGINE == SE_BMS - return SOURCE_ENGINE_BMS; -#elif SOURCE_ENGINE == SE_EPISODEONE - return bOriginalEngine ? SOURCE_ENGINE_ORIGINAL : SOURCE_ENGINE_EPISODEONE; -#elif SOURCE_ENGINE == SE_MOCK - return SOURCE_ENGINE_MOCK; -#elif SOURCE_ENGINE == SE_PVKII - return SOURCE_ENGINE_PVKII; -#elif SOURCE_ENGINE == SE_MCV - return SOURCE_ENGINE_MCV; -#else -#error "SOURCE_ENGINE not defined to a known value" -#endif -} - -const char* SourceProvider::GetEngineDescription() const -{ -#if SOURCE_ENGINE == SE_BLOODYGOODTIME - return "Bloody Good Time (2010)"; -#elif SOURCE_ENGINE == SE_ALIENSWARM - return "Alien Swarm (2010)"; -#elif SOURCE_ENGINE == SE_LEFT4DEAD2 - return "Left 4 Dead 2 (2009)"; -#elif SOURCE_ENGINE == SE_NUCLEARDAWN - return "Nuclear Dawn (2011)"; -#elif SOURCE_ENGINE == SE_CONTAGION - return "Contagion (2013)"; -#elif SOURCE_ENGINE == SE_LEFT4DEAD - return "Left 4 Dead (2008)"; -#elif SOURCE_ENGINE == SE_ORANGEBOX - return "Episode 2 (Orange Box, 2007)"; -#elif SOURCE_ENGINE == SE_CSS - return "Counter-Strike: Source (Valve Orange Box)"; -#elif SOURCE_ENGINE == SE_HL2DM - return "Half-Life 2 Deathmatch (Valve Orange Box)"; -#elif SOURCE_ENGINE == SE_DODS - return "Day of Defeat: Source (Valve Orange Box)"; -#elif SOURCE_ENGINE == SE_SDK2013 - return "Source SDK 2013 (2013)"; -#elif SOURCE_ENGINE == SE_BMS - return "Black Mesa (2015)"; -#elif SOURCE_ENGINE == SE_TF2 - return "Team Fortress 2 (Valve Orange Box)"; -#elif SOURCE_ENGINE == SE_DARKMESSIAH - return "Dark Messiah (2006)"; -#elif SOURCE_ENGINE == SE_EYE - return "E.Y.E. Divine Cybermancy (2011)"; -#elif SOURCE_ENGINE == SE_PORTAL2 - return "Portal 2 (2011)"; -#elif SOURCE_ENGINE == SE_BLADE - return "Blade Symphony (2013)"; -#elif SOURCE_ENGINE == SE_INSURGENCY - return "Insurgency (2013)"; -#elif SOURCE_ENGINE == SE_DOI - return "Day of Infamy (2016)"; -#elif SOURCE_ENGINE == SE_CSGO - return "Counter-Strike: Global Offensive (2012)"; -#elif SOURCE_ENGINE == SE_EPISODEONE - if (bOriginalEngine) - { - return "Original (pre-Episode 1)"; - } - else - { - return "Episode 1 (2004)"; - } -#elif SOURCE_ENGINE == SE_MOCK - return "Mock"; -#elif SOURCE_ENGINE == SE_PVKII - return "Pirates, Vikings, and Knights II"; -#elif SOURCE_ENGINE == SE_MCV - return "Military Combat: Vietnam"; -#else -#error "SOURCE_ENGINE not defined to a known value" -#endif -} - -void SourceProvider::GetGamePath(char* pszBuffer, int len) -{ - engine->GetGameDir(pszBuffer, len); -} - -const char* SourceProvider::GetGameDescription() -{ - return server->GetGameDescription(); -} - -void SourceProvider::ConsolePrint(const char* str) -{ -#if SOURCE_ENGINE >= SE_ORANGEBOX - ConMsg("%s", str); -#else - Msg("%s", str); -#endif -} - -const char* SourceProvider::GetCommandLineValue(const char* key, const char* defval) -{ - if (key[0] == '-' || key[0] == '+') - { - return CommandLine()->ParmValue(key, defval); - } - else if (icvar) - { - const char* val; - if ((val = icvar->GetCommandLineValue(key)) == NULL) - { - return defval; - } - - return val; - } - - return NULL; -} - -void SourceProvider::ClientConsolePrint(MMSPlayer_t pEdict, const char* message) -{ - engine->ClientPrintf(pEdict, message); -} - -void SourceProvider::ServerCommand(const char* cmd) -{ - engine->ServerCommand(cmd); -} - -const char* SourceProvider::GetConVarString(MetamodSourceConVar *convar) -{ - if (nullptr == convar) - { - return nullptr; - } - - return reinterpret_cast(convar)->GetString(); -} - -void SourceProvider::SetConVarString(MetamodSourceConVar *convar, const char* str) -{ - reinterpret_cast(convar)->SetValue(str); -} - -bool SourceProvider::IsConCommandBaseACommand(ConCommandBase* pCommand) -{ - return pCommand->IsCommand(); -} - -bool SourceProvider::RegisterConCommandBase(ConCommandBase* pCommand) -{ - return m_ConVarAccessor.Register(pCommand); -} - -void SourceProvider::UnregisterConCommandBase(ConCommandBase* pCommand) -{ - return m_ConVarAccessor.Unregister(pCommand); -} - -MetamodSourceConVar* SourceProvider::CreateConVar(const char* name, - const char* defval, - const char* help, - int flags) -{ - int newflags = 0; - if (flags & ConVarFlag_Notify) - { - newflags |= FCVAR_NOTIFY; - } - if (flags & ConVarFlag_SpOnly) - { - newflags |= FCVAR_SPONLY; - } - - ConVar* pVar = new ConVar(name, defval, newflags, help); - - m_ConVarAccessor.RegisterConCommandBase(pVar); - - return reinterpret_cast(pVar); -} - -#if SOURCE_ENGINE >= SE_ORANGEBOX -class GlobCommand : public IMetamodSourceCommandInfo -{ -public: - GlobCommand(const CCommand* cmd) : m_cmd(cmd) - { - } -public: - unsigned int GetArgCount() - { - return m_cmd->ArgC() - 1; - } - - const char* GetArg(unsigned int num) - { - return m_cmd->Arg(num); - } - - const char* GetArgString() - { - return m_cmd->ArgS(); - } -private: - const CCommand* m_cmd; -}; -#else -class GlobCommand : public IMetamodSourceCommandInfo -{ -public: - unsigned int GetArgCount() - { - return engine->Cmd_Argc() - 1; - } - - const char* GetArg(unsigned int num) - { - return engine->Cmd_Argv(num); - } - - const char* GetArgString() - { - return engine->Cmd_Args(); - } -}; -#endif - -#if SOURCE_ENGINE >= SE_ORANGEBOX -void LocalCommand_Meta(const CCommand& args) -{ - GlobCommand cmd(&args); -#else -void LocalCommand_Meta() -{ - GlobCommand cmd; -#endif - - if (nullptr != g_SourceProvider.m_pCallbacks) - { -#if SOURCE_ENGINE >= SE_ORANGEBOX - GlobCommand cmd(&args); -#else - GlobCommand cmd; -#endif - g_SourceProvider.m_pCallbacks->OnCommand_Meta(&cmd); - } -} - -#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV - -void SourceProvider::CacheUserMessages() -{ -} - -#else -static jmp_buf usermsg_end; - -/* This only gets called if IServerGameDLL::GetUserMessageInfo() triggers it */ -void Detour_Error(const tchar* pMsg, ...) -{ - /* Jump back to setjmp() in CacheUserMessages() */ - longjmp(usermsg_end, 1); -} - -#define IA32_JMP_IMM32 0xE9 - -/* IServerGameDLL::GetUserMessageInfo() crashes on games based on the old engine and - * early Orange Box. This is because Error() from tier0 gets called when a bad index is - * passed. This is all due to a bug in CUtlRBTree::IsValidIndex(). - * - * So we detour Error() to fix this. Our detour then jumps back into CacheUserMessages() - * to a point before GetUserMessageInfo() is called. The detour is then removed and we - * exit. - */ -void SourceProvider::CacheUserMessages() -{ - int q, size; - char buffer[256]; - unsigned char* target, * detour; - unsigned char orig_bytes[5]; - - target = (unsigned char*)&Error; - detour = (unsigned char*)&Detour_Error; - - /* Save bytes from target function */ - memcpy(orig_bytes, target, sizeof(orig_bytes)); - - /* Patch in relative jump to our Error() detour */ - SetMemAccess(target, sizeof(orig_bytes), SH_MEM_READ | SH_MEM_WRITE | SH_MEM_EXEC); - target[0] = IA32_JMP_IMM32; - *(int32_t*)&target[1] = (int32_t)(detour - (target + 5)); - - /* This is where longjmp() will end up */ - if (setjmp(usermsg_end)) - { - /* Restore bytes and memory protection */ - memcpy(target, orig_bytes, sizeof(orig_bytes)); - SetMemAccess(target, sizeof(orig_bytes), SH_MEM_READ | SH_MEM_EXEC); - return; - } - - q = 0; - - /* If GetUserMessageInfo() calls Error(), we should end up in our detour */ - while (server->GetUserMessageInfo(q, buffer, sizeof(buffer), size)) - { - usermsgs_list.push_back(UsrMsgInfo(size, buffer)); - q++; - } - - /* Jump back to setjmp() */ - longjmp(usermsg_end, 1); -} -#endif - -int SourceProvider::GetUserMessageCount() -{ - if (!IsUserMessageIterationSupported()) - return -1; - - return (int)usermsgs_list.size(); -} - -int SourceProvider::FindUserMessage(const char* name, int* size) -{ - if (IsUserMessageIterationSupported()) - { - for (size_t i = 0; i < usermsgs_list.size(); i++) - { - if (usermsgs_list[i].name.compare(name) == 0) - { - if (size) - { - *size = usermsgs_list[i].size; - } - return (int)i; - } - } - } - - return -1; -} - -const char* SourceProvider::GetUserMessage(int index, int* size) -{ - if (!IsUserMessageIterationSupported() || index < 0 || index >= (int)usermsgs_list.size()) - { - return nullptr; - } - - if (size) - { - *size = usermsgs_list[index].size; - } - - return usermsgs_list[index].name.c_str(); -} - -bool SourceProvider::KVLoadFromFile(KeyValues* kv, IFileSystem* filesystem, const char* resourceName, const char* pathID) -{ - Assert(filesystem); -#ifdef _MSC_VER - Assert(_heapchk() == _HEAPOK); -#endif - - FileHandle_t f = filesystem->Open(resourceName, "rb", pathID); - if (!f) - return false; - - // load file into a null-terminated buffer - int fileSize = filesystem->Size(f); - char* buffer = (char*)MemAllocScratch(fileSize + 1); - - Assert(buffer); - - filesystem->Read(buffer, fileSize, f); // read into local buffer - - buffer[fileSize] = 0; // null terminate file as EOF - - filesystem->Close(f); // close file after reading - - bool retOK = kv->LoadFromBuffer(resourceName, buffer, filesystem); - - MemFreeScratch(); - - return retOK; -} - -bool SourceProvider::Hook_GameInit() -{ - if (nullptr != m_pCallbacks) - { - m_pCallbacks->OnGameInit(); - } - - RETURN_META_VALUE(MRES_IGNORED, true); -} - -bool SourceProvider::Hook_LevelInit(char const* pMapName, char const* pMapEntities, char const* pOldLevel, - char const* pLandmarkName, bool loadGame, bool background) -{ - if (nullptr != m_pCallbacks) - { - m_pCallbacks->OnLevelInit(pMapName, pMapEntities, pOldLevel, pLandmarkName, loadGame, background); - } - - RETURN_META_VALUE(MRES_IGNORED, true); -} - -void SourceProvider::Hook_LevelShutdown() -{ - if (nullptr != m_pCallbacks) - { - m_pCallbacks->OnLevelShutdown(); - } - - RETURN_META(MRES_IGNORED); -} - -#if SOURCE_ENGINE >= SE_ORANGEBOX -void SourceProvider::Hook_ClientCommand(edict_t* client, const CCommand& _cmd) -{ - GlobCommand cmd(&_cmd); -#else -void SourceProvider::Hook_ClientCommand(edict_t * client) -{ - GlobCommand cmd; -#endif - if (strcmp(cmd.GetArg(0), "meta") == 0) - { - if (nullptr != m_pCallbacks) - { - m_pCallbacks->OnCommand_ClientMeta(client, &cmd); - } - - RETURN_META(MRES_SUPERCEDE); - } - - RETURN_META(MRES_IGNORED); -} diff --git a/metamod-source/core/provider/source/provider_source.h b/metamod-source/core/provider/source/provider_source.h deleted file mode 100644 index 1461b59e..00000000 --- a/metamod-source/core/provider/source/provider_source.h +++ /dev/null @@ -1,127 +0,0 @@ -/** - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2023 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#ifndef _INCLUDE_METAMOD_SOURCE_SOURCE1_PROVIDER_H_ -#define _INCLUDE_METAMOD_SOURCE_SOURCE1_PROVIDER_H_ - -#include "../provider_base.h" -#include -#include -#include - -class IFileSystem; - -class SourceProvider : public BaseProvider -{ -public: // BaseProvider - virtual void Notify_DLLInit_Pre(CreateInterfaceFn engineFactory, CreateInterfaceFn serverFactory) override; - virtual void Notify_DLLShutdown_Pre() override; - virtual bool ProcessVDF(const char* file, char path[], size_t path_len, char alias[], size_t alias_len) override; - virtual int DetermineSourceEngine() override; - virtual const char* GetEngineDescription() const override; - virtual void GetGamePath(char* pszBuffer, int len) override; - virtual const char* GetGameDescription() override; - virtual const char* GetCommandLineValue(const char* key, const char* defval) override; - virtual void ConsolePrint(const char* msg) override; - virtual void ClientConsolePrint(MMSPlayer_t client, const char* msg) override; - virtual void ServerCommand(const char* cmd) override; - virtual MetamodSourceConVar *CreateConVar(const char* name, - const char* defval, - const char* help, - int flags) override; - virtual const char* GetConVarString(MetamodSourceConVar *convar) override; - virtual void SetConVarString(MetamodSourceConVar *convar, const char* str) override; - virtual bool RegisterConCommandBase(ConCommandBase* pCommand) override; - virtual void UnregisterConCommandBase(ConCommandBase* pCommand) override; - virtual bool IsConCommandBaseACommand(ConCommandBase* pCommand) override; - virtual int GetUserMessageCount() override; - virtual int FindUserMessage(const char* name, int* size = nullptr) override; - virtual const char* GetUserMessage(int index, int* size = nullptr) override; -public: // IConCommandBaseAccessor - class SourceConVarAccessor : public IConCommandBaseAccessor - { - virtual bool RegisterConCommandBase(ConCommandBase* pCommand) override; - private: - bool Register(ConCommandBase* pCommand); - void Unregister(ConCommandBase* pCommand); - void RemoveMetamodCommands(); -#if SOURCE_ENGINE < SE_ORANGEBOX - bool InitConCommandBaseList(); - private: - ConCommandBase** m_TopConCommandBase = nullptr; -#endif - private: - SourceHook::List m_RegisteredCommands; - - friend class SourceProvider; - } m_ConVarAccessor; -public: - bool Hook_GameInit(); - bool Hook_LevelInit(char const* pMapName, char const* pMapEntities, char const* pOldLevel, - char const* pLandmarkName, bool loadGame, bool background); - void Hook_LevelShutdown(); -#if SOURCE_ENGINE >= SE_ORANGEBOX - void Hook_ClientCommand(edict_t* pEdict, const CCommand& args); -#else - void Hook_ClientCommand(edict_t* pEdict); -#endif -private: - struct UsrMsgInfo - { - UsrMsgInfo() - { - } - UsrMsgInfo(int s, const char* t) : size(s), name(t) - { - } - int size; - std::string name; - }; -private: - void CacheUserMessages(); - bool KVLoadFromFile(KeyValues* kv, IFileSystem* filesystem, const char* resourceName, const char* pathID = nullptr); - inline bool IsUserMessageIterationSupported() const - { -#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV - return false; -#else - return true; -#endif - } -private: - IFileSystem* baseFs = nullptr; - std::vector usermsgs_list; - bool bOriginalEngine = false; - -#if SOURCE_ENGINE >= SE_ORANGEBOX - friend void LocalCommand_Meta(const CCommand& args); -#else - friend void LocalCommand_Meta(); -#endif -}; - -#endif diff --git a/metamod-source/core/provider/source/provider_source_console.cpp b/metamod-source/core/provider/source/provider_source_console.cpp deleted file mode 100644 index f70d7ea5..00000000 --- a/metamod-source/core/provider/source/provider_source_console.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/** - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2008 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#include "provider_source.h" -#include "metamod_util.h" - -#if SOURCE_ENGINE >= SE_ORANGEBOX -#else -#define RegisterConCommand RegisterConCommandBase -#endif - -bool SourceProvider::SourceConVarAccessor::RegisterConCommandBase(ConCommandBase *pCommand) -{ - m_RegisteredCommands.push_back(pCommand); -#if SOURCE_ENGINE < SE_ALIENSWARM - pCommand->SetNext(NULL); -#endif - icvar->RegisterConCommand(pCommand); - - return true; -} - -bool SourceProvider::SourceConVarAccessor::Register(ConCommandBase *pCommand) -{ -#if SOURCE_ENGINE < SE_ALIENSWARM - pCommand->SetNext(NULL); -#endif - icvar->RegisterConCommand(pCommand); - - return true; -} - -void SourceProvider::SourceConVarAccessor::RemoveMetamodCommands() -{ - List::iterator iter; - - for (iter = m_RegisteredCommands.begin(); iter != m_RegisteredCommands.end(); iter++) - { - Unregister(*iter); - } -} - -#if SOURCE_ENGINE < SE_ORANGEBOX -/* Signature for ICvar::GetCommands() in vstdlib for Win32 and Linux. - * - * 20226EE0 A1 50 5C 5A 20 mov eax,dword ptr ds:[205A5C50h] <-- What we want - * 20226EE5 C3 ret - */ -#define CMDLIST_SIG "\xA1\x2A\x2A\x2A\x2A\xC3" -#define CMDLIST_SIGLEN 6 - -/* Linux symbol name of ConCommandBase list in vstdlib */ -#define CMDLIST_SYMBOL "_ZN14ConCommandBase18s_pConCommandBasesE" - -/* This function retrieves the address of the var that holds the top of the ConCommandBase list. - * Having this allows us to change the beginning of this list with ease. - * - * This craziness eliminates the need for the eternal command/cvar used previously which - * could have caused a crash as a result of registering commands/cvars more than once. - */ -bool SourceProvider::SourceConVarAccessor::InitConCommandBaseList() -{ - char *vfunc = (char *)SH_GET_ORIG_VFNPTR_ENTRY(icvar, &ICvar::GetCommands); - - if (*vfunc == '\xE9') - { - /* Get address from displacement... - * - * Add 5 because it's relative to next instruction: - * Opcode <1 byte> + 32-bit displacement <4 bytes> - */ - vfunc += *reinterpret_cast(vfunc + 1) + 5; - } - - if (!vfunc) - { - return false; - } - -#ifdef OS_WIN32 - if (UTIL_VerifySignature(vfunc, CMDLIST_SIG, CMDLIST_SIGLEN)) - { - /* Skip past 0xA1 and get addr of ConCommandBase list var */ - m_TopConCommandBase = *reinterpret_cast(vfunc + 1); - return true; - } -#elif defined OS_LINUX - /* Try dlsym first */ - char path[PATH_SIZE]; - if (GetFileOfAddress((void *)icvar, path, sizeof(path))) - { - void *handle = dlopen(path, RTLD_NOW); - if (handle) - { - m_TopConCommandBase = reinterpret_cast(dlsym(handle, CMDLIST_SYMBOL)); - dlclose(handle); - return true; - } - } - - /* If dlsym failed, then verify signature of function */ - if (!m_TopConCommandBase && UTIL_VerifySignature(vfunc, CMDLIST_SIG, CMDLIST_SIGLEN)) - { - /* Skip past 0xA1 and get addr of ConCommandBase list var */ - m_TopConCommandBase = *reinterpret_cast(vfunc + 1); - return true; - } -#endif - - return false; -} -#endif - -void SourceProvider::SourceConVarAccessor::Unregister(ConCommandBase *pCommand) -{ -#if SOURCE_ENGINE >= SE_ORANGEBOX - icvar->UnregisterConCommand(pCommand); -#else - ConCommandBase *pCur = NULL; - ConCommandBase *pPrev = NULL; - - if (!pCommand) - { - return; - } - - pCur = icvar->GetCommands(); - - if (!m_TopConCommandBase || !pCur) - { - return; - } - - if (pCur == pCommand) - { - *m_TopConCommandBase = const_cast(pCommand->GetNext()); - pCommand->SetNext(NULL); - return; - } - - pPrev = pCur; - pCur = const_cast(pCur->GetNext()); - - while (pCur) - { - if (pCur == pCommand) - { - pPrev->SetNext(const_cast(pCommand->GetNext())); - pCommand->SetNext(NULL); - } - - pPrev = pCur; - pCur = const_cast(pCur->GetNext()); - } -#endif -} diff --git a/metamod-source/core/provider/source2/provider_source2.cpp b/metamod-source/core/provider/source2/provider_source2.cpp deleted file mode 100644 index 7fa33453..00000000 --- a/metamod-source/core/provider/source2/provider_source2.cpp +++ /dev/null @@ -1,456 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2023 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#include "provider_source2.h" -#include -#include -#include -#include -#include -#include -#include -#include - - -static Source2Provider g_Source2Provider; - -IMetamodSourceProvider* provider = &g_Source2Provider; - -CON_COMMAND_EXTERN(meta, LocalCommand_Meta, "Metamod:Source control options"); - - -static ISource2ServerConfig* serverconfig = NULL; -INetworkServerService* netservice = NULL; -IEngineServiceMgr* enginesvcmgr = NULL; - -SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, CPlayerSlot, const CCommand&); -SH_DECL_HOOK3_void(IEngineServiceMgr, RegisterLoopMode, SH_NOATTRIB, 0, const char *, ILoopModeFactory *, void **); -SH_DECL_HOOK3_void(IEngineServiceMgr, UnregisterLoopMode, SH_NOATTRIB, 0, const char*, ILoopModeFactory*, void**); -SH_DECL_HOOK0(ILoopModeFactory, CreateLoopMode, SH_NOATTRIB, 0, ILoopMode *); -SH_DECL_HOOK1_void(ILoopModeFactory, DestroyLoopMode, SH_NOATTRIB, 0, ILoopMode *); -SH_DECL_HOOK2(ILoopMode, LoopInit, SH_NOATTRIB, 0, bool, KeyValues*, ILoopModePrerequisiteRegistry *); -SH_DECL_HOOK0_void(ILoopMode, LoopShutdown, SH_NOATTRIB, 0); - -#ifdef SHOULD_OVERRIDE_ALLOWDEDICATED_SERVER -SH_DECL_HOOK1(ISource2ServerConfig, AllowDedicatedServers, const, 0, bool, EUniverse); -#endif - -void Source2Provider::Notify_DLLInit_Pre(CreateInterfaceFn engineFactory, - CreateInterfaceFn serverFactory) -{ - engine = (IVEngineServer*)((engineFactory)(INTERFACEVERSION_VENGINESERVER, NULL)); - if (!engine) - { - DisplayError("Could not find IVEngineServer! Metamod cannot load."); - return; - } - - gpGlobals = engine->GetServerGlobals(); - serverconfig = (ISource2ServerConfig*)((serverFactory)(INTERFACEVERSION_SERVERCONFIG, NULL)); - netservice = (INetworkServerService*)((engineFactory)(NETWORKSERVERSERVICE_INTERFACE_VERSION, NULL)); - enginesvcmgr = (IEngineServiceMgr*)((engineFactory)(ENGINESERVICEMGR_INTERFACE_VERSION, NULL)); - - icvar = (ICvar*)((engineFactory)(CVAR_INTERFACE_VERSION, NULL)); - if (!icvar) - { - DisplayError("Could not find ICvar! Metamod cannot load."); - return; - } - - gameclients = (IServerGameClients*)(serverFactory(INTERFACEVERSION_SERVERGAMECLIENTS, NULL)); - g_pFullFileSystem = baseFs = (IFileSystem*)((engineFactory)(FILESYSTEM_INTERFACE_VERSION, NULL)); - if (baseFs == NULL) - { - mm_LogMessage("Unable to find \"%s\": .vdf files will not be parsed", FILESYSTEM_INTERFACE_VERSION); - } - - // Since we have to be added as a Game path (cannot add GameBin directly), we - // automatically get added to other paths as well, including having the MM:S - // dir become the default write path for logs and more. We can fix some of these. - - // GAMMACASE: This deals with the search paths where metamod could get added to, but there are still - // problems with this as console.log file for example would be created way earlier than we alter these search paths, - // and will be created in the metamod folder still, unsure what the solution to that could be tho! - - // NOTE: baseFs->PrintSearchPaths(); could be used to print out search paths to debug them. - - const char *pathIds[] = { - "ADDONS", - "CONTENT", - "CONTENTADDONS", - "CONTENTROOT", - "EXECUTABLE_PATH", - "GAME", - "GAMEBIN", - "GAMEROOT", - "MOD", - "PLATFORM", - "SHADER_SOURCE", - "SHADER_SOURCE_MOD", - "SHADER_SOURCE_ROOT" - }; - - for(size_t id = 0; id < (sizeof(pathIds) / sizeof(pathIds[0])); id++) - { - CUtlVector searchPaths; - baseFs->GetSearchPathsForPathID(pathIds[id], (GetSearchPathTypes_t)0, searchPaths); - - FOR_EACH_VEC(searchPaths, i) - { - if(strstr(searchPaths[i].Get(), "metamod") != 0) - { - baseFs->RemoveSearchPath(searchPaths[i].Get(), pathIds[id]); - } - } - } - - baseFs->RemoveSearchPaths("DEFAULT_WRITE_PATH"); - - CBufferStringGrowable<260> searchPath; - baseFs->GetSearchPath("GAME", (GetSearchPathTypes_t)0, searchPath, 1); - baseFs->AddSearchPath(searchPath.Get(), "DEFAULT_WRITE_PATH"); - - g_pCVar = icvar; - - ConVar_Register(FCVAR_RELEASE); - - if (gameclients) - { - SH_ADD_HOOK(IServerGameClients, ClientCommand, gameclients, SH_MEMBER(this, &Source2Provider::Hook_ClientCommand), false); - } - -#ifdef SHOULD_OVERRIDE_ALLOWDEDICATED_SERVER - SH_ADD_VPHOOK(ISource2ServerConfig, AllowDedicatedServers, serverconfig, SH_MEMBER(this, &Source2Provider::Hook_AllowDedicatedServers), false); -#endif - - SH_ADD_HOOK(IEngineServiceMgr, RegisterLoopMode, enginesvcmgr, SH_MEMBER(this, &Source2Provider::Hook_RegisterLoopMode), false); - SH_ADD_HOOK(IEngineServiceMgr, UnregisterLoopMode, enginesvcmgr, SH_MEMBER(this, &Source2Provider::Hook_UnregisterLoopMode), false); -} - -void Source2Provider::Notify_DLLShutdown_Pre() -{ - ConVar_Unregister(); - - SH_REMOVE_HOOK(IEngineServiceMgr, RegisterLoopMode, enginesvcmgr, SH_MEMBER(this, &Source2Provider::Hook_RegisterLoopMode), false); - SH_REMOVE_HOOK(IEngineServiceMgr, UnregisterLoopMode, enginesvcmgr, SH_MEMBER(this, &Source2Provider::Hook_UnregisterLoopMode), false); - - if (gameclients) - { - SH_REMOVE_HOOK(IServerGameClients, ClientCommand, gameclients, SH_MEMBER(this, &Source2Provider::Hook_ClientCommand), false); - } -} - -bool Source2Provider::ProcessVDF(const char* file, char path[], size_t path_len, char alias[], size_t alias_len) -{ - if (baseFs == NULL) - { - return false; - } - - KeyValues* pValues; - bool bKVLoaded = false; - const char* plugin_file, * p_alias; - - pValues = new KeyValues("Metamod Plugin"); - - bKVLoaded = pValues->LoadFromFile(baseFs, file); - if (!bKVLoaded) - { - delete pValues; - return false; - } - - if ((plugin_file = pValues->GetString("file", NULL)) == NULL) - { - delete pValues; - return false; - } - - UTIL_Format(path, path_len, "%s", plugin_file); - - if ((p_alias = pValues->GetString("alias", NULL)) != NULL) - { - UTIL_Format(alias, alias_len, "%s", p_alias); - } - else - { - UTIL_Format(alias, alias_len, ""); - } - - delete pValues; - - return true; -} - -int Source2Provider::DetermineSourceEngine() -{ -#if SOURCE_ENGINE == SE_DOTA - return SOURCE_ENGINE_DOTA; -#elif SOURCE_ENGINE == SE_CS2 - return SOURCE_ENGINE_CS2; -#else -#error "SOURCE_ENGINE not defined to a known value" -#endif -} - -const char* Source2Provider::GetEngineDescription() const -{ -#if SOURCE_ENGINE == SE_DOTA - return "Dota 2 (2013)"; -#elif SOURCE_ENGINE == SE_CS2 - return "Counter-Strike 2 (2023)"; -#else -#error "SOURCE_ENGINE not defined to a known value" -#endif -} - -void Source2Provider::GetGamePath(char* pszBuffer, int len) -{ - CBufferStringGrowable buf; - engine->GetGameDir(buf); - ke::SafeSprintf(pszBuffer, len, "%s", buf.Get()); -} - -const char* Source2Provider::GetGameDescription() -{ - return serverconfig->GetGameDescription(); -} - -#ifdef SHOULD_OVERRIDE_ALLOWDEDICATED_SERVER -bool Source2Provider::Hook_AllowDedicatedServers(EUniverse universe) const -{ - RETURN_META_VALUE(MRES_SUPERCEDE, true); -} -#endif - -const char* Source2Provider::GetCommandLineValue(const char* key, const char* defval) -{ - return CommandLine()->ParmValue(key, defval); -} - -void Source2Provider::ConsolePrint(const char* str) -{ - ConMsg("%s", str); -} - -void Source2Provider::ClientConsolePrint(MMSPlayer_t client, const char* message) -{ - engine->ClientPrintf(client, message); -} - -void Source2Provider::ServerCommand(const char* cmd) -{ - engine->ServerCommand(cmd); -} - -const char* Source2Provider::GetConVarString(MetamodSourceConVar *convar) -{ -#ifdef S2_CONVAR_UNFINISHED - if (convar == NULL) - { - return NULL; - } - - return convar->GetString(); -#else - return nullptr; -#endif -} - -void Source2Provider::SetConVarString(MetamodSourceConVar *convar, const char* str) -{ -#ifdef S2_CONVAR_UNFINISHED - convar->SetValue(str); -#endif -} - -bool Source2Provider::IsConCommandBaseACommand(ConCommandBase* pCommand) -{ -#ifdef S2_CONVAR_UNFINISHED - return pCommand->IsCommand(); -#else - return false; -#endif -} - -bool Source2Provider::RegisterConCommandBase(ConCommandBase* pCommand) -{ -#ifdef S2_CONVAR_UNFINISHED - return g_SMConVarAccessor.Register(pCommand); -#else - return true; -#endif -} - -void Source2Provider::UnregisterConCommandBase(ConCommandBase* pCommand) -{ -#ifdef S2_CONVAR_UNFINISHED - return g_SMConVarAccessor.Unregister(pCommand); -#endif -} - -MetamodSourceConVar* Source2Provider::CreateConVar(const char* name, - const char* defval, - const char* help, - int flags) -{ -#ifdef S2_CONVAR_UNFINISHED - int newflags = 0; - if (flags & ConVarFlag_Notify) - { - newflags |= FCVAR_NOTIFY; - } - if (flags & ConVarFlag_SpOnly) - { - newflags |= FCVAR_SPONLY; - } - - ConVar* pVar = new ConVar(name, defval, newflags, help); - - g_SMConVarAccessor.RegisterConCommandBase(pVar); - - return pVar; -#else - return nullptr; -#endif -} - -class GlobCommand : public IMetamodSourceCommandInfo -{ -public: - GlobCommand(const CCommand* cmd) : m_cmd(cmd) - { - } -public: - unsigned int GetArgCount() - { - return m_cmd->ArgC() - 1; - } - - const char* GetArg(unsigned int num) - { - return m_cmd->Arg(num); - } - - const char* GetArgString() - { - return m_cmd->ArgS(); - } -private: - const CCommand* m_cmd; -}; - -void LocalCommand_Meta(const CCommandContext &, const CCommand& args) -{ - if (nullptr != g_Source2Provider.m_pCallbacks) - { - GlobCommand cmd(&args); - g_Source2Provider.m_pCallbacks->OnCommand_Meta(&cmd); - } -} - -void Source2Provider::Hook_RegisterLoopMode(const char *pszLoopModeName, ILoopModeFactory *pLoopModeFactory, void **ppGlobalPointer) -{ - if (!strcmp(pszLoopModeName, "game")) - { - SH_ADD_HOOK(ILoopModeFactory, CreateLoopMode, pLoopModeFactory, SH_MEMBER(this, &Source2Provider::Hook_CreateLoopModePost), true); - SH_ADD_HOOK(ILoopModeFactory, DestroyLoopMode, pLoopModeFactory, SH_MEMBER(this, &Source2Provider::Hook_DestroyLoopMode), false); - - if (nullptr != m_pCallbacks) - { - m_pCallbacks->OnGameInit(); - } - } -} - -void Source2Provider::Hook_UnregisterLoopMode(const char* pszLoopModeName, ILoopModeFactory* pLoopModeFactory, void** ppGlobalPointer) -{ - if (!strcmp(pszLoopModeName, "game")) - { - SH_REMOVE_HOOK(ILoopModeFactory, CreateLoopMode, pLoopModeFactory, SH_MEMBER(this, &Source2Provider::Hook_CreateLoopModePost), true); - SH_REMOVE_HOOK(ILoopModeFactory, DestroyLoopMode, pLoopModeFactory, SH_MEMBER(this, &Source2Provider::Hook_DestroyLoopMode), false); - } - - RETURN_META(MRES_IGNORED); -} - -ILoopMode *Source2Provider::Hook_CreateLoopModePost() -{ - ILoopMode *pLoopMode = META_RESULT_ORIG_RET(ILoopMode *); - SH_ADD_HOOK(ILoopMode, LoopInit, pLoopMode, SH_MEMBER(this, &Source2Provider::Hook_LoopInitPost), true); - SH_ADD_HOOK(ILoopMode, LoopShutdown, pLoopMode, SH_MEMBER(this, &Source2Provider::Hook_LoopShutdownPost), true); - - // Post-hook. Ignored - return nullptr; -} - -void Source2Provider::Hook_DestroyLoopMode(ILoopMode* pLoopMode) -{ - SH_REMOVE_HOOK(ILoopMode, LoopInit, pLoopMode, SH_MEMBER(this, &Source2Provider::Hook_LoopInitPost), true); - SH_REMOVE_HOOK(ILoopMode, LoopShutdown, pLoopMode, SH_MEMBER(this, &Source2Provider::Hook_LoopShutdownPost), true); -} - -bool Source2Provider::Hook_LoopInitPost(KeyValues* pKeyValues, ILoopModePrerequisiteRegistry *pRegistry) -{ - if (nullptr != m_pCallbacks) - { - m_pCallbacks->OnLevelInit( - pKeyValues->GetString("levelname"), - "", - pKeyValues->GetString("previouslevel"), - pKeyValues->GetString("landmarkname"), - pKeyValues->GetBool("loadmap"), - false - ); - } - - // Post-hook. Ignored - return true; -} - -void Source2Provider::Hook_LoopShutdownPost() -{ - if (nullptr != m_pCallbacks) - { - m_pCallbacks->OnLevelShutdown(); - } -} - -void Source2Provider::Hook_ClientCommand(CPlayerSlot nSlot, const CCommand& _cmd) -{ - GlobCommand cmd(&_cmd); - - if (strcmp(cmd.GetArg(0), "meta") == 0) - { - if (nullptr != m_pCallbacks) - { - m_pCallbacks->OnCommand_ClientMeta(nSlot, &cmd); - } - - RETURN_META(MRES_SUPERCEDE); - } - - RETURN_META(MRES_IGNORED); -} diff --git a/metamod-source/core/provider/source2/provider_source2.h b/metamod-source/core/provider/source2/provider_source2.h deleted file mode 100644 index 42554b3f..00000000 --- a/metamod-source/core/provider/source2/provider_source2.h +++ /dev/null @@ -1,84 +0,0 @@ -/** - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2023 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#ifndef _INCLUDE_METAMOD_SOURCE_SOURCE2_PROVIDER_H_ -#define _INCLUDE_METAMOD_SOURCE_SOURCE2_PROVIDER_H_ - -#include "../provider_base.h" -#include -#include -#include - -// TODO: is this still needed for Dota or CS2 on any platform? -#if SOURCE_ENGINE == SE_DOTA && defined( _WIN32 ) -#define SHOULD_OVERRIDE_ALLOWDEDICATED_SERVER -#endif - -class INetworkGameClient; -class ISource2WorldSession; - -class Source2Provider : public BaseProvider -{ -public: - virtual void Notify_DLLInit_Pre(CreateInterfaceFn engineFactory, CreateInterfaceFn serverFactory) override; - virtual void Notify_DLLShutdown_Pre() override; - virtual bool ProcessVDF(const char* file, char path[], size_t path_len, char alias[], size_t alias_len) override; - virtual int DetermineSourceEngine() override; - virtual const char* GetEngineDescription() const override; - virtual void GetGamePath(char* pszBuffer, int len) override; - virtual const char* GetGameDescription() override; - virtual const char* GetCommandLineValue(const char* key, const char* defval) override; - virtual void ConsolePrint(const char* msg) override; - virtual void ClientConsolePrint(MMSPlayer_t player, const char* msg) override; - virtual void ServerCommand(const char* cmd) override; - virtual MetamodSourceConVar *CreateConVar(const char* name, - const char* defval, - const char* help, - int flags) override; - virtual const char* GetConVarString(MetamodSourceConVar *convar) override; - virtual void SetConVarString(MetamodSourceConVar *convar, const char* str) override; - virtual bool RegisterConCommandBase(ConCommandBase* pCommand) override; - virtual void UnregisterConCommandBase(ConCommandBase* pCommand) override; - virtual bool IsConCommandBaseACommand(ConCommandBase* pCommand) override; -public: -#ifdef SHOULD_OVERRIDE_ALLOWDEDICATED_SERVER - bool Hook_AllowDedicatedServers(EUniverse universe) const; -#endif - void Hook_RegisterLoopMode(const char* pszLoopModeName, ILoopModeFactory *pLoopModeFactory, void **ppGlobalPointer); - void Hook_UnregisterLoopMode(const char* pszLoopModeName, ILoopModeFactory* pLoopModeFactory, void** ppGlobalPointer); - ILoopMode *Hook_CreateLoopModePost(); - void Hook_DestroyLoopMode(ILoopMode*); - bool Hook_LoopInitPost(KeyValues* pKeyValues, ILoopModePrerequisiteRegistry *pRegistry); - void Hook_LoopShutdownPost(); - void Hook_ClientCommand(CPlayerSlot nSlot, const CCommand& args); -private: - IFileSystem* baseFs = nullptr; - - friend void LocalCommand_Meta(const CCommandContext& context, const CCommand& args); -}; - -#endif diff --git a/metamod-source/core/sourcehook/FastDelegate.h b/metamod-source/core/sourcehook/FastDelegate.h deleted file mode 100644 index 53a3964c..00000000 --- a/metamod-source/core/sourcehook/FastDelegate.h +++ /dev/null @@ -1,1074 +0,0 @@ -// FastDelegate.h -// Efficient delegates in C++ that generate only two lines of asm code! -// Documentation is found at http://www.codeproject.com/cpp/FastDelegate.asp -// -// - Don Clugston, Mar 2004. -// Major contributions were made by Jody Hagins. -// History: -// 24-Apr-04 1.0 * Submitted to CodeProject. -// 28-Apr-04 1.1 * Prevent most unsafe uses of evil static function hack. -// * Improved syntax for horrible_cast (thanks Paul Bludov). -// * Tested on Metrowerks MWCC and Intel ICL (IA32) -// * Compiled, but not run, on Comeau C++ and Intel Itanium ICL. -// 27-Jun-04 1.2 * Now works on Borland C++ Builder 5.5 -// * Now works on /clr "managed C++" code on VC7, VC7.1 -// * Comeau C++ now compiles without warnings. -// * Prevent the virtual inheritance case from being used on -// VC6 and earlier, which generate incorrect code. -// * Improved warning and error messages. Non-standard hacks -// now have compile-time checks to make them safer. -// * implicit_cast used instead of static_cast in many cases. -// * If calling a const member function, a const class pointer can be used. -// * MakeDelegate() global helper function added to simplify pass-by-value. -// * Added fastdelegate.clear() -// 16-Jul-04 1.2.1* Workaround for gcc bug (const member function pointers in templates) -// 30-Oct-04 1.3 * Support for (non-void) return values. -// * No more workarounds in client code! -// MSVC and Intel now use a clever hack invented by John Dlugosz: -// - The FASTDELEGATEDECLARE workaround is no longer necessary. -// - No more warning messages for VC6 -// * Less use of macros. Error messages should be more comprehensible. -// * Added include guards -// * Added FastDelegate::empty() to test if invocation is safe (Thanks Neville Franks). -// * Now tested on VS 2005 Express Beta, PGI C++ -// 24-Dec-04 1.4 * Added DelegateMemento, to allow collections of disparate delegates. -// * <,>,<=,>= comparison operators to allow storage in ordered containers. -// * Substantial reduction of code size, especially the 'Closure' class. -// * Standardised all the compiler-specific workarounds. -// * MFP conversion now works for CodePlay (but not yet supported in the full code). -// * Now compiles without warnings on _any_ supported compiler, including BCC 5.5.1 -// * New syntax: FastDelegate< int (char *, double) >. -// 14-Feb-05 1.4.1* Now treats =0 as equivalent to .clear(), ==0 as equivalent to .empty(). (Thanks elfric). -// * Now tested on Intel ICL for AMD64, VS2005 Beta for AMD64 and Itanium. -// 30-Mar-05 1.5 * Safebool idiom: "if (dg)" is now equivalent to "if (!dg.empty())" -// * Fully supported by CodePlay VectorC -// * Bugfix for Metrowerks: empty() was buggy because a valid MFP can be 0 on MWCC! -// * More optimal assignment,== and != operators for static function pointers. -// -// AlliedModders LLC modifications. -// -// 24-Oct-15 1.6 * Use C++11 variadic templates. -// - -#ifndef FASTDELEGATE_H -#define FASTDELEGATE_H - -#ifdef _MSC_VER -# if _MSC_VER > 1000 -# pragma once -# endif // _MSC_VER > 1000 -#endif // #ifdef _MSC_VER - -#include // to allow <,> comparisons - -//////////////////////////////////////////////////////////////////////////////// -// Configuration options -// -//////////////////////////////////////////////////////////////////////////////// - -// Uncomment the following #define for optimally-sized delegates. -// In this case, the generated asm code is almost identical to the code you'd get -// if the compiler had native support for delegates. -// It will not work on systems where sizeof(dataptr) < sizeof(codeptr). -// Thus, it will not work for DOS compilers using the medium model. -// It will also probably fail on some DSP systems. -#define FASTDELEGATE_USESTATICFUNCTIONHACK - -// Uncomment the next line to allow function declarator syntax. -// It is automatically enabled for those compilers where it is known to work. -//#define FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX - -//////////////////////////////////////////////////////////////////////////////// -// Compiler identification for workarounds -// -//////////////////////////////////////////////////////////////////////////////// - -// Compiler identification. It's not easy to identify Visual C++ because -// many vendors fraudulently define Microsoft's identifiers. -#if defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__VECTOR_C) && !defined(__ICL) && !defined(__BORLANDC__) -#define FASTDLGT_ISMSVC - -#if (_MSC_VER <1300) // Many workarounds are required for VC6. -#define FASTDLGT_VC6 -#pragma warning(disable:4786) // disable this ridiculous warning -#endif - -#endif - -// Does the compiler uses Microsoft's member function pointer structure? -// If so, it needs special treatment. -// Metrowerks CodeWarrior, Intel, and CodePlay fraudulently define Microsoft's -// identifier, _MSC_VER. We need to filter Metrowerks out. -#if defined(_MSC_VER) && !defined(__MWERKS__) -#define FASTDLGT_MICROSOFT_MFP - -#if !defined(__VECTOR_C) -// CodePlay doesn't have the __single/multi/virtual_inheritance keywords -#define FASTDLGT_HASINHERITANCE_KEYWORDS -#endif -#endif - -// Does it allow function declarator syntax? The following compilers are known to work: -#if defined(FASTDLGT_ISMSVC) && (_MSC_VER >=1310) // VC 7.1 -#define FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX -#endif - -// Gcc(2.95+), and versions of Digital Mars, Intel and Comeau in common use. -#if defined (__DMC__) || defined(__GNUC__) || defined(__ICL) || defined(__COMO__) -#define FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX -#endif - -// It works on Metrowerks MWCC 3.2.2. From boost.Config it should work on earlier ones too. -#if defined (__MWERKS__) -#define FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX -#endif - -#ifdef __GNUC__ // Workaround GCC bug #8271 - // At present, GCC doesn't recognize constness of MFPs in templates -#define FASTDELEGATE_GCC_BUG_8271 -#endif - - - -//////////////////////////////////////////////////////////////////////////////// -// General tricks used in this code -// -// (a) Error messages are generated by typdefing an array of negative size to -// generate compile-time errors. -// (b) Warning messages on MSVC are generated by declaring unused variables, and -// enabling the "variable XXX is never used" warning. -// (c) Unions are used in a few compiler-specific cases to perform illegal casts. -// (d) For Microsoft and Intel, when adjusting the 'this' pointer, it's cast to -// (char *) first to ensure that the correct number of *bytes* are added. -// -//////////////////////////////////////////////////////////////////////////////// -// Helper templates -// -//////////////////////////////////////////////////////////////////////////////// - - -namespace fastdelegate { -namespace detail { // we'll hide the implementation details in a nested namespace. - -// implicit_cast< > -// I believe this was originally going to be in the C++ standard but -// was left out by accident. It's even milder than static_cast. -// I use it instead of static_cast<> to emphasize that I'm not doing -// anything nasty. -// Usage is identical to static_cast<> -template -inline OutputClass implicit_cast(InputClass input){ - return input; -} - -// horrible_cast< > -// This is truly evil. It completely subverts C++'s type system, allowing you -// to cast from any class to any other class. Technically, using a union -// to perform the cast is undefined behaviour (even in C). But we can see if -// it is OK by checking that the union is the same size as each of its members. -// horrible_cast<> should only be used for compiler-specific workarounds. -// Usage is identical to reinterpret_cast<>. - -// This union is declared outside the horrible_cast because BCC 5.5.1 -// can't inline a function with a nested class, and gives a warning. -template -union horrible_union{ - OutputClass out; - InputClass in; -}; - -template -inline OutputClass horrible_cast(const InputClass input){ - horrible_union u; - // Cause a compile-time error if in, out and u are not the same size. - // If the compile fails here, it means the compiler has peculiar - // unions which would prevent the cast from working. - static_assert(sizeof(InputClass)==sizeof(u) && sizeof(InputClass)==sizeof(OutputClass), - "Can't use horrible cast"); - u.in = input; - return u.out; -} - -//////////////////////////////////////////////////////////////////////////////// -// Workarounds -// -//////////////////////////////////////////////////////////////////////////////// - -// Backwards compatibility: This macro used to be necessary in the virtual inheritance -// case for Intel and Microsoft. Now it just forward-declares the class. -#define FASTDELEGATEDECLARE(CLASSNAME) class CLASSNAME; - -// Prevent use of the static function hack with the DOS medium model. -#ifdef __MEDIUM__ -#undef FASTDELEGATE_USESTATICFUNCTIONHACK -#endif - -// DefaultVoid - a workaround for 'void' templates in VC6. -// -// (1) VC6 and earlier do not allow 'void' as a default template argument. -// (2) They also doesn't allow you to return 'void' from a function. -// -// Workaround for (1): Declare a dummy type 'DefaultVoid' which we use -// when we'd like to use 'void'. We convert it into 'void' and back -// using the templates DefaultVoidToVoid<> and VoidToDefaultVoid<>. -// Workaround for (2): On VC6, the code for calling a void function is -// identical to the code for calling a non-void function in which the -// return value is never used, provided the return value is returned -// in the EAX register, rather than on the stack. -// This is true for most fundamental types such as int, enum, void *. -// Const void * is the safest option since it doesn't participate -// in any automatic conversions. But on a 16-bit compiler it might -// cause extra code to be generated, so we disable it for all compilers -// except for VC6 (and VC5). -#ifdef FASTDLGT_VC6 -// VC6 workaround -typedef const void * DefaultVoid; -#else -// On any other compiler, just use a normal void. -typedef void DefaultVoid; -#endif - -// Translate from 'DefaultVoid' to 'void'. -// Everything else is unchanged -template -struct DefaultVoidToVoid { typedef T type; }; - -template <> -struct DefaultVoidToVoid { typedef void type; }; - -// Translate from 'void' into 'DefaultVoid' -// Everything else is unchanged -template -struct VoidToDefaultVoid { typedef T type; }; - -template <> -struct VoidToDefaultVoid { typedef DefaultVoid type; }; - - - -//////////////////////////////////////////////////////////////////////////////// -// Fast Delegates, part 1: -// -// Conversion of member function pointer to a standard form -// -//////////////////////////////////////////////////////////////////////////////// - -// GenericClass is a fake class, ONLY used to provide a type. -// It is vitally important that it is never defined, so that the compiler doesn't -// think it can optimize the invocation. For example, Borland generates simpler -// code if it knows the class only uses single inheritance. - -// Compilers using Microsoft's structure need to be treated as a special case. -#ifdef FASTDLGT_MICROSOFT_MFP - -#ifdef FASTDLGT_HASINHERITANCE_KEYWORDS - // For Microsoft and Intel, we want to ensure that it's the most efficient type of MFP - // (4 bytes), even when the /vmg option is used. Declaring an empty class - // would give 16 byte pointers in this case.... - class __single_inheritance GenericClass; -#endif - // ...but for Codeplay, an empty class *always* gives 4 byte pointers. - // If compiled with the /clr option ("managed C++"), the JIT compiler thinks - // it needs to load GenericClass before it can call any of its functions, - // (compiles OK but crashes at runtime!), so we need to declare an - // empty class to make it happy. - // Codeplay and VC4 can't cope with the unknown_inheritance case either. - class GenericClass {}; -#else - class GenericClass; -#endif - -// The size of a single inheritance member function pointer. -const int SINGLE_MEMFUNCPTR_SIZE = sizeof(void (GenericClass::*)()); - -// SimplifyMemFunc< >::Convert() -// -// A template function that converts an arbitrary member function pointer into the -// simplest possible form of member function pointer, using a supplied 'this' pointer. -// According to the standard, this can be done legally with reinterpret_cast<>. -// For (non-standard) compilers which use member function pointers which vary in size -// depending on the class, we need to use knowledge of the internal structure of a -// member function pointer, as used by the compiler. Template specialization is used -// to distinguish between the sizes. Because some compilers don't support partial -// template specialisation, I use full specialisation of a wrapper struct. - -// general case -- don't know how to convert it. Force a compile failure -template -struct SimplifyMemFunc { - template - inline static GenericClass *Convert(X *pthis, XFuncType function_to_bind, - GenericMemFuncType &bound_func) { - // Unsupported member function type -- force a compile failure. - static_assert(N >= 100, "Unsupported memeber function pointer on this compiler"); - return 0; - } -}; - -// For compilers where all member func ptrs are the same size, everything goes here. -// For non-standard compilers, only single_inheritance classes go here. -template <> -struct SimplifyMemFunc { - template - inline static GenericClass *Convert(X *pthis, XFuncType function_to_bind, - GenericMemFuncType &bound_func) { -#if defined __DMC__ - // Digital Mars doesn't allow you to cast between abitrary PMF's, - // even though the standard says you can. The 32-bit compiler lets you - // static_cast through an int, but the DOS compiler doesn't. - bound_func = horrible_cast(function_to_bind); -#else - bound_func = reinterpret_cast(function_to_bind); -#endif - return reinterpret_cast(pthis); - } -}; - -//////////////////////////////////////////////////////////////////////////////// -// Fast Delegates, part 1b: -// -// Workarounds for Microsoft and Intel -// -//////////////////////////////////////////////////////////////////////////////// - - -// Compilers with member function pointers which violate the standard (MSVC, Intel, Codeplay), -// need to be treated as a special case. -#ifdef FASTDLGT_MICROSOFT_MFP - -// We use unions to perform horrible_casts. I would like to use #pragma pack(push, 1) -// at the start of each function for extra safety, but VC6 seems to ICE -// intermittently if you do this inside a template. - -// __multiple_inheritance classes go here -// Nasty hack for Microsoft and Intel (IA32 and Itanium) -template<> -struct SimplifyMemFunc< SINGLE_MEMFUNCPTR_SIZE + sizeof(int) > { - template - inline static GenericClass *Convert(X *pthis, XFuncType function_to_bind, - GenericMemFuncType &bound_func) { - // We need to use a horrible_cast to do this conversion. - // In MSVC, a multiple inheritance member pointer is internally defined as: - union { - XFuncType func; - struct { - GenericMemFuncType funcaddress; // points to the actual member function - int delta; // #BYTES to be added to the 'this' pointer - }s; - } u; - // Check that the horrible_cast will work - static_assert(sizeof(function_to_bind)==sizeof(u.s), "Can't use horrible cast"); - u.func = function_to_bind; - bound_func = u.s.funcaddress; - return reinterpret_cast(reinterpret_cast(pthis) + u.s.delta); - } -}; - -// virtual inheritance is a real nuisance. It's inefficient and complicated. -// On MSVC and Intel, there isn't enough information in the pointer itself to -// enable conversion to a closure pointer. Earlier versions of this code didn't -// work for all cases, and generated a compile-time error instead. -// But a very clever hack invented by John M. Dlugosz solves this problem. -// My code is somewhat different to his: I have no asm code, and I make no -// assumptions about the calling convention that is used. - -// In VC++ and ICL, a virtual_inheritance member pointer -// is internally defined as: -struct MicrosoftVirtualMFP { - void (GenericClass::*codeptr)(); // points to the actual member function - int delta; // #bytes to be added to the 'this' pointer - int vtable_index; // or 0 if no virtual inheritance -}; -// The CRUCIAL feature of Microsoft/Intel MFPs which we exploit is that the -// m_codeptr member is *always* called, regardless of the values of the other -// members. (This is *not* true for other compilers, eg GCC, which obtain the -// function address from the vtable if a virtual function is being called). -// Dlugosz's trick is to make the codeptr point to a probe function which -// returns the 'this' pointer that was used. - -// Define a generic class that uses virtual inheritance. -// It has a trival member function that returns the value of the 'this' pointer. -struct GenericVirtualClass : virtual public GenericClass -{ - typedef GenericVirtualClass * (GenericVirtualClass::*ProbePtrType)(); - GenericVirtualClass * GetThis() { return this; } -}; - -// __virtual_inheritance classes go here -template <> -struct SimplifyMemFunc -{ - - template - inline static GenericClass *Convert(X *pthis, XFuncType function_to_bind, - GenericMemFuncType &bound_func) { - union { - XFuncType func; - GenericClass* (X::*ProbeFunc)(); - MicrosoftVirtualMFP s; - } u; - u.func = function_to_bind; - bound_func = reinterpret_cast(u.s.codeptr); - union { - GenericVirtualClass::ProbePtrType virtfunc; - MicrosoftVirtualMFP s; - } u2; - // Check that the horrible_cast<>s will work - static_assert(sizeof(function_to_bind)==sizeof(u.s) - && sizeof(function_to_bind)==sizeof(u.ProbeFunc) - && sizeof(u2.virtfunc)==sizeof(u2.s), - "Can't use horrible cast."); - // Unfortunately, taking the address of a MF prevents it from being inlined, so - // this next line can't be completely optimised away by the compiler. - u2.virtfunc = &GenericVirtualClass::GetThis; - u.s.codeptr = u2.s.codeptr; - return (pthis->*u.ProbeFunc)(); - } -}; - -#if (_MSC_VER <1300) - -// Nasty hack for Microsoft Visual C++ 6.0 -// unknown_inheritance classes go here -// There is a compiler bug in MSVC6 which generates incorrect code in this case!! -template <> -struct SimplifyMemFunc -{ - template - inline static GenericClass *Convert(X *pthis, XFuncType function_to_bind, - GenericMemFuncType &bound_func) { - // There is an apalling but obscure compiler bug in MSVC6 and earlier: - // vtable_index and 'vtordisp' are always set to 0 in the - // unknown_inheritance case! - // This means that an incorrect function could be called!!! - // Compiling with the /vmg option leads to potentially incorrect code. - // This is probably the reason that the IDE has a user interface for specifying - // the /vmg option, but it is disabled - you can only specify /vmg on - // the command line. In VC1.5 and earlier, the compiler would ICE if it ever - // encountered this situation. - // It is OK to use the /vmg option if /vmm or /vms is specified. - - // Fortunately, the wrong function is only called in very obscure cases. - // It only occurs when a derived class overrides a virtual function declared - // in a virtual base class, and the member function - // points to the *Derived* version of that function. The problem can be - // completely averted in 100% of cases by using the *Base class* for the - // member fpointer. Ie, if you use the base class as an interface, you'll - // stay out of trouble. - // Occasionally, you might want to point directly to a derived class function - // that isn't an override of a base class. In this case, both vtable_index - // and 'vtordisp' are zero, but a virtual_inheritance pointer will be generated. - // We can generate correct code in this case. To prevent an incorrect call from - // ever being made, on MSVC6 we generate a warning, and call a function to - // make the program crash instantly. - static_assert(true, "VC6 Compiler Bug"); - return 0; - } -}; - - -#else - -// Nasty hack for Microsoft and Intel (IA32 and Itanium) -// unknown_inheritance classes go here -// This is probably the ugliest bit of code I've ever written. Look at the casts! -// There is a compiler bug in MSVC6 which prevents it from using this code. -template <> -struct SimplifyMemFunc -{ - template - inline static GenericClass *Convert(X *pthis, XFuncType function_to_bind, - GenericMemFuncType &bound_func) { - // The member function pointer is 16 bytes long. We can't use a normal cast, but - // we can use a union to do the conversion. - union { - XFuncType func; - // In VC++ and ICL, an unknown_inheritance member pointer - // is internally defined as: - struct { - GenericMemFuncType m_funcaddress; // points to the actual member function - int delta; // #bytes to be added to the 'this' pointer - int vtordisp; // #bytes to add to 'this' to find the vtable - int vtable_index; // or 0 if no virtual inheritance - } s; - } u; - // Check that the horrible_cast will work - static_assert(sizeof(XFuncType)==sizeof(u.s), "Can't use horrible cast."); - u.func = function_to_bind; - bound_func = u.s.funcaddress; - int virtual_delta = 0; - if (u.s.vtable_index) { // Virtual inheritance is used - // First, get to the vtable. - // It is 'vtordisp' bytes from the start of the class. - const int * vtable = *reinterpret_cast( - reinterpret_cast(pthis) + u.s.vtordisp ); - - // 'vtable_index' tells us where in the table we should be looking. - virtual_delta = u.s.vtordisp + *reinterpret_cast( - reinterpret_cast(vtable) + u.s.vtable_index); - } - // The int at 'virtual_delta' gives us the amount to add to 'this'. - // Finally we can add the three components together. Phew! - return reinterpret_cast( - reinterpret_cast(pthis) + u.s.delta + virtual_delta); - }; -}; -#endif // MSVC 7 and greater - -#endif // MS/Intel hacks - -} // namespace detail - -//////////////////////////////////////////////////////////////////////////////// -// Fast Delegates, part 2: -// -// Define the delegate storage, and cope with static functions -// -//////////////////////////////////////////////////////////////////////////////// - -// DelegateMemento -- an opaque structure which can hold an arbitary delegate. -// It knows nothing about the calling convention or number of arguments used by -// the function pointed to. -// It supplies comparison operators so that it can be stored in STL collections. -// It cannot be set to anything other than null, nor invoked directly: -// it must be converted to a specific delegate. - -// Implementation: -// There are two possible implementations: the Safe method and the Evil method. -// DelegateMemento - Safe version -// -// This implementation is standard-compliant, but a bit tricky. -// A static function pointer is stored inside the class. -// Here are the valid values: -// +-- Static pointer --+--pThis --+-- pMemFunc-+-- Meaning------+ -// | 0 | 0 | 0 | Empty | -// | !=0 |(dontcare)| Invoker | Static function| -// | 0 | !=0 | !=0* | Method call | -// +--------------------+----------+------------+----------------+ -// * For Metrowerks, this can be 0. (first virtual function in a -// single_inheritance class). -// When stored stored inside a specific delegate, the 'dontcare' entries are replaced -// with a reference to the delegate itself. This complicates the = and == operators -// for the delegate class. - -// DelegateMemento - Evil version -// -// For compilers where data pointers are at least as big as code pointers, it is -// possible to store the function pointer in the this pointer, using another -// horrible_cast. In this case the DelegateMemento implementation is simple: -// +--pThis --+-- pMemFunc-+-- Meaning---------------------+ -// | 0 | 0 | Empty | -// | !=0 | !=0* | Static function or method call| -// +----------+------------+-------------------------------+ -// * For Metrowerks, this can be 0. (first virtual function in a -// single_inheritance class). -// Note that the Sun C++ and MSVC documentation explicitly state that they -// support static_cast between void * and function pointers. - -class DelegateMemento { -protected: - // the data is protected, not private, because many - // compilers have problems with template friends. - typedef void (detail::GenericClass::*GenericMemFuncType)(); // arbitrary MFP. - detail::GenericClass *m_pthis; - GenericMemFuncType m_pFunction; - -#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) - typedef void (*GenericFuncPtr)(); // arbitrary code pointer - GenericFuncPtr m_pStaticFunction; -#endif - -public: -#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) - DelegateMemento() : m_pthis(0), m_pFunction(0), m_pStaticFunction(0) {}; - void clear() { - m_pthis=0; m_pFunction=0; m_pStaticFunction=0; - } -#else - DelegateMemento() : m_pthis(0), m_pFunction(0) {}; - void clear() { m_pthis=0; m_pFunction=0; } -#endif -public: -#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) - inline bool IsEqual (const DelegateMemento &x) const{ - // We have to cope with the static function pointers as a special case - if (m_pFunction!=x.m_pFunction) return false; - // the static function ptrs must either both be equal, or both be 0. - if (m_pStaticFunction!=x.m_pStaticFunction) return false; - if (m_pStaticFunction!=0) return m_pthis==x.m_pthis; - else return true; - } -#else // Evil Method - inline bool IsEqual (const DelegateMemento &x) const{ - return m_pthis==x.m_pthis && m_pFunction==x.m_pFunction; - } -#endif - // Provide a strict weak ordering for DelegateMementos. - inline bool IsLess(const DelegateMemento &right) const { - // deal with static function pointers first -#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) - if (m_pStaticFunction !=0 || right.m_pStaticFunction!=0) - return m_pStaticFunction < right.m_pStaticFunction; -#endif - if (m_pthis !=right.m_pthis) return m_pthis < right.m_pthis; - // There are no ordering operators for member function pointers, - // but we can fake one by comparing each byte. The resulting ordering is - // arbitrary (and compiler-dependent), but it permits storage in ordered STL containers. - return memcmp(&m_pFunction, &right.m_pFunction, sizeof(m_pFunction)) < 0; - - } - // BUGFIX (Mar 2005): - // We can't just compare m_pFunction because on Metrowerks, - // m_pFunction can be zero even if the delegate is not empty! - inline bool operator ! () const // Is it bound to anything? - { return m_pthis==0 && m_pFunction==0; } - inline bool empty() const // Is it bound to anything? - { return m_pthis==0 && m_pFunction==0; } -public: - DelegateMemento & operator = (const DelegateMemento &right) { - SetMementoFrom(right); - return *this; - } - inline bool operator <(const DelegateMemento &right) { - return IsLess(right); - } - inline bool operator >(const DelegateMemento &right) { - return right.IsLess(*this); - } - DelegateMemento (const DelegateMemento &right) : - m_pthis(right.m_pthis), m_pFunction(right.m_pFunction) -#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) - , m_pStaticFunction (right.m_pStaticFunction) -#endif - {} -protected: - void SetMementoFrom(const DelegateMemento &right) { - m_pFunction = right.m_pFunction; - m_pthis = right.m_pthis; -#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) - m_pStaticFunction = right.m_pStaticFunction; -#endif - } -}; - - -// ClosurePtr<> -// -// A private wrapper class that adds function signatures to DelegateMemento. -// It's the class that does most of the actual work. -// The signatures are specified by: -// GenericMemFunc: must be a type of GenericClass member function pointer. -// StaticFuncPtr: must be a type of function pointer with the same signature -// as GenericMemFunc. -// UnvoidStaticFuncPtr: is the same as StaticFuncPtr, except on VC6 -// where it never returns void (returns DefaultVoid instead). - -// An outer class, FastDelegateN<>, handles the invoking and creates the -// necessary typedefs. -// This class does everything else. - -namespace detail { - -template < class GenericMemFunc, class StaticFuncPtr, class UnvoidStaticFuncPtr> -class ClosurePtr : public DelegateMemento { -public: - // These functions are for setting the delegate to a member function. - - // Here's the clever bit: we convert an arbitrary member function into a - // standard form. XMemFunc should be a member function of class X, but I can't - // enforce that here. It needs to be enforced by the wrapper class. - template < class X, class XMemFunc > - inline void bindmemfunc(X *pthis, XMemFunc function_to_bind ) { - m_pthis = SimplifyMemFunc< sizeof(function_to_bind) > - ::Convert(pthis, function_to_bind, m_pFunction); -#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) - m_pStaticFunction = 0; -#endif - } - // For const member functions, we only need a const class pointer. - // Since we know that the member function is const, it's safe to - // remove the const qualifier from the 'this' pointer with a const_cast. - // VC6 has problems if we just overload 'bindmemfunc', so we give it a different name. - template < class X, class XMemFunc> - inline void bindconstmemfunc(const X *pthis, XMemFunc function_to_bind) { - m_pthis= SimplifyMemFunc< sizeof(function_to_bind) > - ::Convert(const_cast(pthis), function_to_bind, m_pFunction); -#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) - m_pStaticFunction = 0; -#endif - } -#ifdef FASTDELEGATE_GCC_BUG_8271 // At present, GCC doesn't recognize constness of MFPs in templates - template < class X, class XMemFunc> - inline void bindmemfunc(const X *pthis, XMemFunc function_to_bind) { - bindconstmemfunc(pthis, function_to_bind); -#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) - m_pStaticFunction = 0; -#endif - } -#endif - // These functions are required for invoking the stored function - inline GenericClass *GetClosureThis() const { return m_pthis; } - inline GenericMemFunc GetClosureMemPtr() const { return reinterpret_cast(m_pFunction); } - -// There are a few ways of dealing with static function pointers. -// There's a standard-compliant, but tricky method. -// There's also a straightforward hack, that won't work on DOS compilers using the -// medium memory model. It's so evil that I can't recommend it, but I've -// implemented it anyway because it produces very nice asm code. - -#if !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) - -// ClosurePtr<> - Safe version -// -// This implementation is standard-compliant, but a bit tricky. -// I store the function pointer inside the class, and the delegate then -// points to itself. Whenever the delegate is copied, these self-references -// must be transformed, and this complicates the = and == operators. -public: - // The next two functions are for operator ==, =, and the copy constructor. - // We may need to convert the m_pthis pointers, so that - // they remain as self-references. - template< class DerivedClass > - inline void CopyFrom (DerivedClass *pParent, const DelegateMemento &x) { - SetMementoFrom(x); - if (m_pStaticFunction!=0) { - // transform self references... - m_pthis=reinterpret_cast(pParent); - } - } - // For static functions, the 'static_function_invoker' class in the parent - // will be called. The parent then needs to call GetStaticFunction() to find out - // the actual function to invoke. - template < class DerivedClass, class ParentInvokerSig > - inline void bindstaticfunc(DerivedClass *pParent, ParentInvokerSig static_function_invoker, - StaticFuncPtr function_to_bind ) { - if (function_to_bind==0) { // cope with assignment to 0 - m_pFunction=0; - } else { - bindmemfunc(pParent, static_function_invoker); - } - m_pStaticFunction=reinterpret_cast(function_to_bind); - } - inline UnvoidStaticFuncPtr GetStaticFunction() const { - return reinterpret_cast(m_pStaticFunction); - } -#else - -// ClosurePtr<> - Evil version -// -// For compilers where data pointers are at least as big as code pointers, it is -// possible to store the function pointer in the this pointer, using another -// horrible_cast. Invocation isn't any faster, but it saves 4 bytes, and -// speeds up comparison and assignment. If C++ provided direct language support -// for delegates, they would produce asm code that was almost identical to this. -// Note that the Sun C++ and MSVC documentation explicitly state that they -// support static_cast between void * and function pointers. - - template< class DerivedClass > - inline void CopyFrom (DerivedClass *pParent, const DelegateMemento &right) { - SetMementoFrom(right); - } - // For static functions, the 'static_function_invoker' class in the parent - // will be called. The parent then needs to call GetStaticFunction() to find out - // the actual function to invoke. - // ******** EVIL, EVIL CODE! ******* - template < class DerivedClass, class ParentInvokerSig> - inline void bindstaticfunc(DerivedClass *pParent, ParentInvokerSig static_function_invoker, - StaticFuncPtr function_to_bind) { - if (function_to_bind==0) { // cope with assignment to 0 - m_pFunction=0; - } else { - // We'll be ignoring the 'this' pointer, but we need to make sure we pass - // a valid value to bindmemfunc(). - bindmemfunc(pParent, static_function_invoker); - } - - // WARNING! Evil hack. We store the function in the 'this' pointer! - // Ensure that there's a compilation failure if function pointers - // and data pointers have different sizes. - // If you get this error, you need to #undef FASTDELEGATE_USESTATICFUNCTIONHACK. - static_assert(sizeof(GenericClass *)==sizeof(function_to_bind), "Can't use evil method."); - m_pthis = horrible_cast(function_to_bind); - // MSVC, SunC++ and DMC accept the following (non-standard) code: -// m_pthis = static_cast(static_cast(function_to_bind)); - // BCC32, Comeau and DMC accept this method. MSVC7.1 needs __int64 instead of long -// m_pthis = reinterpret_cast(reinterpret_cast(function_to_bind)); - } - // ******** EVIL, EVIL CODE! ******* - // This function will be called with an invalid 'this' pointer!! - // We're just returning the 'this' pointer, converted into - // a function pointer! - inline UnvoidStaticFuncPtr GetStaticFunction() const { - // Ensure that there's a compilation failure if function pointers - // and data pointers have different sizes. - // If you get this error, you need to #undef FASTDELEGATE_USESTATICFUNCTIONHACK. - static_assert(sizeof(UnvoidStaticFuncPtr)==sizeof(this), "Can't use evil method."); - return horrible_cast(this); - } -#endif // !defined(FASTDELEGATE_USESTATICFUNCTIONHACK) - - // Does the closure contain this static function? - inline bool IsEqualToStaticFuncPtr(StaticFuncPtr funcptr){ - if (funcptr==0) return empty(); - // For the Evil method, if it doesn't actually contain a static function, this will return an arbitrary - // value that is not equal to any valid function pointer. - else return funcptr==reinterpret_cast(GetStaticFunction()); - } -}; - - -} // namespace detail - -//////////////////////////////////////////////////////////////////////////////// -// Fast Delegates, part 3: -// -// Wrapper classes to ensure type safety -// -//////////////////////////////////////////////////////////////////////////////// - - -// Once we have the member function conversion templates, it's easy to make the -// wrapper classes. So that they will work with as many compilers as possible, -// the classes are of the form -// FastDelegate3 -// They can cope with any combination of parameters. The max number of parameters -// allowed is 8, but it is trivial to increase this limit. -// Note that we need to treat const member functions seperately. -// All this class does is to enforce type safety, and invoke the delegate with -// the correct list of parameters. - -// Because of the weird rule about the class of derived member function pointers, -// you sometimes need to apply a downcast to the 'this' pointer. -// This is the reason for the use of "implicit_cast(pthis)" in the code below. -// If CDerivedClass is derived from CBaseClass, but doesn't override SimpleVirtualFunction, -// without this trick you'd need to write: -// MyDelegate(static_cast(&d), &CDerivedClass::SimpleVirtualFunction); -// but with the trick you can write -// MyDelegate(&d, &CDerivedClass::SimpleVirtualFunction); - -// RetType is the type the compiler uses in compiling the template. For VC6, -// it cannot be void. DesiredRetType is the real type which is returned from -// all of the functions. It can be void. - -// Implicit conversion to "bool" is achieved using the safe_bool idiom, -// using member data pointers (MDP). This allows "if (dg)..." syntax -// Because some compilers (eg codeplay) don't have a unique value for a zero -// MDP, an extra padding member is added to the SafeBool struct. -// Some compilers (eg VC6) won't implicitly convert from 0 to an MDP, so -// in that case the static function constructor is not made explicit; this -// allows "if (dg==0) ..." to compile. - -template -class FastDelegate { -private: - typedef typename detail::DefaultVoidToVoid::type DesiredRetType; - typedef DesiredRetType (*StaticFunctionPtr)(Params... params); - typedef RetType (*UnvoidStaticFunctionPtr)(Params... params); - typedef RetType (detail::GenericClass::*GenericMemFn)(Params... params); - typedef detail::ClosurePtr ClosureType; - ClosureType m_Closure; -public: - // Typedefs to aid generic programming - typedef FastDelegate type; - - // Construction and comparison functions - FastDelegate() { - clear(); - } - FastDelegate(const FastDelegate &x) { - m_Closure.CopyFrom(this, x.m_Closure); - } - void operator = (const FastDelegate &x) { - m_Closure.CopyFrom(this, x.m_Closure); - } - bool operator ==(const FastDelegate &x) const { - return m_Closure.IsEqual(x.m_Closure); - } - bool operator !=(const FastDelegate &x) const { - return !m_Closure.IsEqual(x.m_Closure); - } - bool operator <(const FastDelegate &x) const { - return m_Closure.IsLess(x.m_Closure); - } - bool operator >(const FastDelegate &x) const { - return x.m_Closure.IsLess(m_Closure); - } - // Binding to non-const member functions - template < class X, class Y > - FastDelegate(Y *pthis, DesiredRetType (X::* function_to_bind)(Params... params) ) { - m_Closure.bindmemfunc(detail::implicit_cast(pthis), function_to_bind); - } - template < class X, class Y > - inline void bind(Y *pthis, DesiredRetType (X::* function_to_bind)(Params... params)) { - m_Closure.bindmemfunc(detail::implicit_cast(pthis), function_to_bind); - } - // Binding to const member functions. - template < class X, class Y > - FastDelegate(const Y *pthis, DesiredRetType (X::* function_to_bind)(Params... params) const) { - m_Closure.bindconstmemfunc(detail::implicit_cast(pthis), function_to_bind); - } - template < class X, class Y > - inline void bind(const Y *pthis, DesiredRetType (X::* function_to_bind)(Params... params) const) { - m_Closure.bindconstmemfunc(detail::implicit_cast(pthis), function_to_bind); - } - // Static functions. We convert them into a member function call. - // This constructor also provides implicit conversion - FastDelegate(DesiredRetType (*function_to_bind)(Params... params) ) { - bind(function_to_bind); - } - // for efficiency, prevent creation of a temporary - void operator = (DesiredRetType (*function_to_bind)(Params... params) ) { - bind(function_to_bind); - } - inline void bind(DesiredRetType (*function_to_bind)(Params... params)) { - m_Closure.bindstaticfunc(this, &FastDelegate::InvokeStaticFunction, function_to_bind); - } - // Invoke the delegate - RetType operator() (Params... params) const { - return (m_Closure.GetClosureThis()->*(m_Closure.GetClosureMemPtr()))(params...); - } - // Implicit conversion to "bool" using the safe_bool idiom -private: - typedef struct SafeBoolStruct { - int a_data_pointer_to_this_is_0_on_buggy_compilers; - StaticFunctionPtr m_nonzero; - } UselessTypedef; - typedef StaticFunctionPtr SafeBoolStruct::*unspecified_bool_type; -public: - operator unspecified_bool_type() const { - return empty() ? 0: &SafeBoolStruct::m_nonzero; - } - // necessary to allow ==0 to work despite the safe_bool idiom - inline bool operator==(StaticFunctionPtr funcptr) { - return m_Closure.IsEqualToStaticFuncPtr(funcptr); - } - inline bool operator!=(StaticFunctionPtr funcptr) { - return !m_Closure.IsEqualToStaticFuncPtr(funcptr); - } - inline bool operator ! () const { // Is it bound to anything? - return !m_Closure; - } - inline bool empty() const { - return !m_Closure; - } - void clear() { - m_Closure.clear(); - } - // Conversion to and from the DelegateMemento storage class - const DelegateMemento & GetMemento() { - return m_Closure; - } - void SetMemento(const DelegateMemento &any) { - m_Closure.CopyFrom(this, any); - } - -private: - // Invoker for static functions - RetType InvokeStaticFunction(Params... params) const { - return (*(m_Closure.GetStaticFunction()))(params...); - } -}; - -//////////////////////////////////////////////////////////////////////////////// -// Fast Delegates, part 4: -// -// FastDelegate<> class (Original author: Jody Hagins) -// Allows boost::function style syntax like: -// FastDelegate< double (int, long) > -// instead of: -// FastDelegate2< int, long, double > -// -//////////////////////////////////////////////////////////////////////////////// - -#ifdef FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX - -//N=0 -// Specialization to allow use of -// FastDelegate< R ( ) > -// instead of -// FastDelegate0 < R > -template -class FastDelegate< R (Params...) > - // Inherit from FastDelegate0 so that it can be treated just like a FastDelegate0 - : public FastDelegate < R, Params... > -{ -public: - // Make using the base type a bit easier via typedef. - typedef FastDelegate < R, Params... > BaseType; - - // Allow users access to the specific type of this delegate. - typedef FastDelegate SelfType; - - // Mimic the base class constructors. - FastDelegate() : BaseType() { } - - template < class X, class Y > - FastDelegate(Y * pthis, - R (X::* function_to_bind)(Params... params)) - : BaseType(pthis, function_to_bind) { } - - template < class X, class Y > - FastDelegate(const Y *pthis, - R (X::* function_to_bind)(Params... params) const) - : BaseType(pthis, function_to_bind) - { } - - FastDelegate(R (*function_to_bind)(Params... params)) - : BaseType(function_to_bind) { } - void operator = (const BaseType &x) { - *static_cast(this) = x; } -}; - -#endif //FASTDELEGATE_ALLOW_FUNCTION_TYPE_SYNTAX - -//////////////////////////////////////////////////////////////////////////////// -// Fast Delegates, part 5: -// -// MakeDelegate() helper function -// -// MakeDelegate(&x, &X::func) returns a fastdelegate of the type -// necessary for calling x.func() with the correct number of arguments. -// This makes it possible to eliminate many typedefs from user code. -// -//////////////////////////////////////////////////////////////////////////////// - -// Also declare overloads of a MakeDelegate() global function to -// reduce the need for typedefs. -// We need seperate overloads for const and non-const member functions. -// Also, because of the weird rule about the class of derived member function pointers, -// implicit downcasts may need to be applied later to the 'this' pointer. -// That's why two classes (X and Y) appear in the definitions. Y must be implicitly -// castable to X. - -// Workaround for VC6. VC6 needs void return types converted into DefaultVoid. -// GCC 3.2 and later won't compile this unless it's preceded by 'typename', -// but VC6 doesn't allow 'typename' in this context. -// So, I have to use a macro. - -#ifdef FASTDLGT_VC6 -#define FASTDLGT_RETTYPE detail::VoidToDefaultVoid::type -#else -#define FASTDLGT_RETTYPE RetType -#endif - -//N=1 -template -FastDelegate MakeDelegate(Y* x, RetType (X::*func)(Params... params)) { - return FastDelegate(x, func); -} - -template -FastDelegate MakeDelegate(Y* x, RetType (X::*func)(Params... params) const) { - return FastDelegate(x, func); -} - -template -FastDelegate MakeDelegate(RetType (*func)(Params... params)) { - return FastDelegate(func); -} - - // clean up after ourselves... -#undef FASTDLGT_RETTYPE - -} // namespace fastdelegate - -#endif // !defined(FASTDELEGATE_H) diff --git a/metamod-source/core/sourcehook/generate/generate b/metamod-source/core/sourcehook/generate/generate deleted file mode 100644 index 399784cc..00000000 --- a/metamod-source/core/sourcehook/generate/generate +++ /dev/null @@ -1,9 +0,0 @@ -#/bin/sh - -cd shworker -make -cd .. - -shworker/bin/shworker.bin iter sourcehook.hxx sourcehook.h $1 - -cp *.h .. diff --git a/metamod-source/core/sourcehook/generate/generate.bat b/metamod-source/core/sourcehook/generate/generate.bat deleted file mode 100644 index 82a8c51e..00000000 --- a/metamod-source/core/sourcehook/generate/generate.bat +++ /dev/null @@ -1,8 +0,0 @@ -:: Generates everything -:: Usage: -:: generate.bat - - -shworker iter sourcehook.hxx sourcehook.h %1 - -copy *.h .. diff --git a/metamod-source/core/sourcehook/generate/shworker.bin b/metamod-source/core/sourcehook/generate/shworker.bin deleted file mode 100644 index 96105b3c726572527d301d27612a2893d65a2beb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50608 zcmd3P4R}<=_5MxRg%u+kAWF~(i-LmC7!Z{RY6vVJ3b+K4pjMVZ0t7=6lU;}wYH+j4 z^|G2OsUJl}rIxm~q7sV&8iA5%X^og_Y$>8ry=$VPrVuH*|M#7lySw2-ZTtM5=YR9e zojEgS&YW}R%$d1!?`&>&Pn(pGkf2#tqSj3#wB{k3V>IHzM`g)q&80cCq1piL9IZRD zST?#EI0&KwD%p`|L+Hjbz@t~89HB2@29}XFgSc21q2VD-V_hUpm1XIpWL>Z(WScxASJWk+43ujE!YqW-5vC(tiEt4D zugM762$vv?MYtM)*8qgx2*VK0Mi_&@>pFy)BBh~6H0>&cNeClU9-~Zz3lPAX))V1c z1YW%mQV{wfK>VYsE!Gn;55P!K9FkZ!!ZyLfx1)qj^9Kx9j zo`LvMgv%6sp^AS(S~(Z-Iy&OiqH=wz4kWSPhlHWydsLYj8aCoV57F5Mq#M;y%L zj}*-QKmHnwj8uelRd6}tfe7azoR4rW0xy`K7*hgJx3g3{RmE9|&r#_N6?0r&qtfxw z2TEzHkx5xDg2I|UvpLwe=b<-SRQZjn`~h}0u5C~V@!wYPPNWHcqZIxY7$tnVQo>!T z{CUK@r~}&UEGiM#8U(^OP(WN(dp9cjOOZ!JZ>szO1;4L4x|_mJ zR{RW7<@;5~UZ%=#QuW=SOM2%keA+1Cg@9cn><-%bAoSSns{LCaH_LBU^j=c*x~uxX zQE(OD(WuX6dTaf~m_#xvZ!Pe6twbQb0PvII+IvswV~#5Ct6)q1Ao6)_L12CAf!B`_ z2+vjeu=L-m`s)K#K18)Y0x2g;jdMDk0^OM6+Xv5>GxIgTl7Cx_&2HYD#X0* zLLmMQr9Vy|gg2`8W-GV|F)t4S%eSlcZdL8iR{H&iD!)$A%Tn+*1+PR$$yhg#-0*}`X2rN%k z<##FgQ)Q2qKL3h*Ui%P;f19dr_3vW}wyE~7R{b#)xRm#C1YVrVS^rIiPrpa_1;uX` z(!_sA)wk$ht@z^{MEvbaA1^BSZdKoEkNw7LBl>~(Zq%RC!?OQgTAh+_8p>Gyh0=ee zg5Oc}M=JPB)t@^R%yDR4E+jrin1(gUm7q&{QxyJ%NE2>W?G-70Zddfzsd5)$>vA!H zIlQn$PTt;YmU(lE78O_eiYg|Q6jW9gRcc=EqNQb}-b!CVh0p6HcBQXy!SLa%ahc}5 zVaBzyDn~CYE-iF>u3fNX33FyuUS3gDUQ)22$h~9dE1@34TU^K!? zmlc$k7lBSJXW~frGOMhzvUpLcXhY_V2B+ntGQ6|AMN7+lw|dbcm@KO(SX88lUj_kK zN7C~ys;csq7gbc2l@^o~qr$Qb5SpDgV`PTcyP&G7V1Dtkk)Y?TEcPy->|Wokte7&S(2#B9S-s#?wqJo>fiwi0W zEpeeLaxK(3%SWz!iz~{Od&~T+@2w~(T~q{JN=;;f!cxDlz(;ipU1y@xO8t~-pkAgyUR9E6PkN?%3Ut!!3x&nzD*=gjx|DvGFv1rF+7i*`YXnsLSLFs}b@4~VQZ&3v(drn?6 zXOnT~Od#uvq0(6bYp%2$p4)(%6LgWWstNm(*NLa;tdcNR(qJ zEG>q~L@jpej5zhe3`)x?mKKzFi-A}G`D1ZY*%@B{z0$5{`9`D1N>0Yw$?7VuE~8D%m_;^9M9Md&xU5nb z=!8*XaLvw}<;#>3q2#3GQE~Qcusm9!EmV@9L`%{${BYbEF?}v9E-9MtUwBduF#M(8 z`#x4j7nc_M+%%j^C9{%MN!RL>XcvB0lcUSvd+C_Sp?4~jb{#U7Vt7kEevi&BT>u|e z;YQ_AqB023Aswg6vj0GpKL}UZ=64Au*|)6tyD%X`S!I!>c?d$gf#tIfMueJ-Xh0{^ z_6Z|MjtJjn9DpT7(WxwEkrSmw!X~0dI(jPl^CYMuUswg^-$e@+cq=*mj?}!lrOP?H z#ihQ5+R~z>OUss_BQQBu_{!j?O5v#B&$NY$ihPwUUr>Il zR_;f7VNuyaZK0|N^ab#~3zn8EkAd#2D)wm$g_gA9%EIDB1Zg*#cj|SZUkC^6uPiD= z1#+U+3`+}&fpEj@sUt_uy0z3-Q017gWvgFCAa8h_gQmGp_S3E~=1alP65@ zUXq@nO`bM2dxCcq1dXQBFNvmA`J6ex9j#56GiQAERPRV2;7Y`EBzJIZDs)2}`(ti5 zJn<%o*rwtHfi1BTqqQXs(&C@2X{Bwz>aKF*OJsRBl=Tp`*iNFTOU`5|xlF*{GgzN- z?dwADTyQJ4MS5s!)f$xb_NekKl=m(!#-n|AZ5_&4r*dF1wioQ$QwmNNiPX#GU7 zpFvz+zG3&Fq?@));lK3^pXL&^CWXJ{BD;gnbK4k$@-D{MBxz!dhxa{<@!;Le*rjPL zjL*mZ6XOf8W@ns%Jt)RwHSHi{Y~q-Vvo)=qF&-2SF~-Au2jd+1{Fi`D5k7Y^PGx)^ z_8*4Z9X+sqcQD4fIf*gWx5U-SO%7&^1@utH(A)^d*!am{ zj0b|zjG>${jPWoqjxiR|S&aK)4~OxYSYtEBCd4$x*f8=i#s%O|crrc<@}!7!P1; z7-N&AmN7O`)-uM1)q{-j0I`noC{0_>7~^0AV{A}vWQ+&Arx|18WfS8unzorSHpsRx z#s=6n#^W@tf$^2-f5zBUYhs**{%1TM{m*y;`k(Pc^gm-a`k(P+^gm;4#vEjPE&87^ z9)Q{zV*~6Ej6Isx$#|xw!nFcUBMeK{ z!qozH5r)RJaJhg76V4($PryS7Pa*6P@Cd??ObcfTID_yU!WjY{O?Vz*mw?9*ra<9j z0goeGPFNFg7U3$whrUI|kcot=2_F#f6vC?sHw$bom3kf$6o+seNgqsL^1YAP6nQ)eX%L%s<&JeJV@BzXu z0ap<=2`3A91>r-4H33%>?j(HZ8_Hip7~T`|3wSkQ2jOM`uOXaFxIw_Rgi{G`67X8W zF2d^t{2<|>glh%7j&KIyY5}h&Jce+&fHx4%B0NvP8wqo(J?s(i(}X>Qvjn_}@EpP! z0^Uq`9$}Y&w-8=TI9b5k2$vJq1l&NlitwRhlz$iDYQhHu+(dXa;bsBvAzVwiLBP#~ zA0)gB(z*9v$a;Z20A1$=<;7Q*EMK1jHM@H_#VgqsL^1l&%znQ)eX z4-sx9oFU*2!UqVu1l&p3B%BO*_X7tHd1mJ$QVKTs5+luXZhUQLt-yglslGA;^NHqjwhas|(*g~)CvAWu zdmm?HBnS8U+jiTDlJMG2{jl^wkGJ4;3TXAG&1*;`2ilVsGc(d0*p&=AYyi0Vd9woT zDaJ}i#GjOJ@$(Euo_QfU?uP3l{^Wdf8#rUFqK+Hq>Yd)#cG$F9(9?J4o6n+1A3fN- z6;dgBA$RMl_AKZ^54IvVPn0kXqlq4>@|Uf%z*R3CZ^)cvdV?Ymf~o<)&*wq&+q?lauUU^Up_41VN5 zYtNs)AN|pA>_uYfN51_1kvFG$X68le*`OJKj8@Ue1{MZ(B~4{9IW!ATSxmM}_bH3X znR&q}iz%kr1I3}>Vz32%^hvZU_a6K{>R24qEi++xLKezFBHDz~=HvyCE6Kk$M)J zEk`2}uWF|W=}>T}#cm7A;~OGux>Q3y6%CD%4K zOf5y~sme&bD49-;1=fPNZW|n_7d3weDgv7rGLKRm#p(!B2$WtRh_oP)cuL}jj*;LN?eI zD5DkIZ^l(yck*gsET1id_~wY}Cyrvv!UVxKm`5nEALK&Yr=SdWmTz8TQ6!2m-E|Bsmp4P8Q_8vdBGs0=aMT z#6a%O0tu_Ld!CY9CsZE_d~1=r=>&4mC~}R5g}n$Kwjxb?`2^KqFCy=Jt7eQ>+DkdA zTRN&iH6i+e;}u^axN!VK>F6C)>Z+q*ii`1VS+#iSDaoBL$n~|ztv-R=-|%!r9ew$) z7`cy-7L7`kOCE)2EwHmtV4y`V^8|8+BKIUnSSo+ul;nbf+;EHBC#c+2*l~*7Y>=>Q zeG1Z4`I)F@seF@FGsY`b{tZT+rK8>!7o6|9*m?ve5ei&paZzZ|qQt_=UjP~E=r0{H z9qm9`@OlEdO@iD6i`^q#wa`y!YYDZmJt>MAxA2M7Gh3~G77FYY0^4?SY-UI5 z1>0i;_A-He4E)Bsd-U8?IDBSD>V?2P1@=&Z-EnekW=n%L_d#5}o=c^d`L>XfZznX? zpR8}^%Efu_Cgg{<20+l0m#>yAuVDdrJq7|XloG%ELMSdTFBH&;t1uq}=A0WWOriQF zftduv2jUQybs;GPe=LglcpT#NE)<2#%YZluyn}1!J$YaWOK8>p&62I~zcE^|HrIEH zB4H*TStK$9nXBV61Ow@D8G`k5<1&QlB*kS2`}y}FC={#qov=;Sm{@OqhqzS#|x~P~cfg914zsFlxdKa`bx4vw$GRD_NHAI^PVT8!auPkHix5 zR^-W*DJDm`zSM&pD;{$%cE$t^BFcpVhuT17qf^Crx&-_pEht?`nJ|I}BKE2oqA$`I zGeWi=NJkgSHCgnFTy9fDC4#P)zaA~bq!SAP)yCBpOHwShn{U3r0S@Dlj#D!B1oA=w zu7kx=RWOifRVM4o)*#Py*a)~hWm>@$X9(!&e}c_K)xCIO!hIhs$hQPMc-|HA~QvnXz5*rwMXCG7FJ}0${V7X z`R3+mTDARTTm~Br|K=N#Z+jErT?FtDo*=Tq!$l+-B&NAIt|}V}mjMCA`QUDvENgqS z?ayuPZLhVNZGUV#*!F7MD{cGRwzmDP?GJH1DY`4)=%UJiLX`!)Rr|F`+Lh7h35j zX@tj%`r*&;oCvJ95ru1z6JAUZw0)q(fg_cx;%Juwv6%HA;iNqNS~Wb-oFtHB06IJg}? zye1cW2BIflCR)CECJ^+X3uU3;9NhI_GVX@Rf&TD}Uvo98pxan~@oKb;=?+PAEN%*e zL|=q6){cd?z6!dA!1(GZXK)8H({E79?}$s-TL^m5x9-6G%L%W#{PPM|Ym z`XM7BQr?jVLtFta(PW?#Bgi+*0J-Vy2FI_!@I)#)^775QAi0s-ZX^bFxw@5iMBJv) zBeT3?`3rG$<(?jP+)_hs)5F;e9l?=uC0OEO@dMeCanmvG<)Hb+@hexEoiyzw)Jy8|q8Zn^9@`pG5;( z*gn^$)~2D{n-u$vX>bAX3+NXx+URa))B2Gp$5Ur6fh3Bb^TAKVf5_~lVD5dEWNIsq zy|Qv&M4xW9dGy1_;8x-#Z|AbppB(X<5&u3C`4H;Wk3`(<){dZ5kc(*h@`&*>*$n7r z`8OHv_NcO~y;3r6tV|L%1@pj)!s7JSpJ>_=O`mRARNDnG6BFY~ha5T%;@9yNRNtvC_m-qS)3EaRg$6WN) z-O0|EUk`kJqp#Q4=^fD6^h5r4^h0g$N8E?nKGnYfwHY0mO};(Omy^+=FJ)|Qhp$^! zTRRauhaJjl`-6U%xF6SweQ43wKep6!!);oM*O|8S1y>|-+`(_4cLRd3R5prwUSxuorGh3W+b|I5R^&AhFn zA`{-nzaiw`l4srvhOYOb=QfywMU5??@($vQo$Jubjn3d&uw)quh~udmB6`d-WuLau zPkGEEABpBr(?|}F#o*9)8}2Qks*X_Z#>}l^7d&^J{{rCVnZwyo?gk@qi3THqX3Te` zT4Jp@mP7)k&0{u$ENBKBZvP{!B;sF}Z%&uEZJUvyuzq7_5)&w^zcQ_wZ~Zm0eQYIMu$ z$lUE*+fdWs8)U3(FnTBn^38s65{ztswdsdL_fLBdPm20GU4}l)V3(Qsp%M#(gFMq= z{{pHczPdxBL`b62Adpd&R{*H8u=G5R~!Tqw4Br2pJyHXn%7X9>JN-RKDRPpzK zxayFp%vVZptBKQ3R(yp5n&0m5W4Z&`}8$0f-M@uM&zKz9jJlmCtWJq zV-<@8Cs4)4i2rGGg{pj=%vC<^ZK-0mbBUw_^zbT4d610GX2f@*UFV{|RKoJP0NFJ1 z@IoWt-A^T?EX0g5)}M5Dpa3w&%xd@FR%Xk0k)hmHOj&$)nY$5wYf`~#_q!gv>xhir zgoz>F{Egrx2_ps!Z<=IszY*es+KRmxbo$#yc2Z!sE%T7>-mLHNO_Nkf5{3n;?u~b6 zCkGlbNH$WDB53Ayp=rJ%cE0_a%^Bbhv=uG?Zfj1kI*S>l*@zu`6S3l?xnw?l}xK|H%R|B4#u*0Y) z3r3K4uMuL@h%FOP%yNim5}x1T(i>6(yB&=ZXq=>quq6+~@u?!p5{Oo{EK!!D*KYyE zndUo}fS(}c3^X{5a+@J!Hl{lC`ZQWgXf2A2DGnnGue402gUr#zE|*a!b68!kA4lDW zvUsnXh&xy_>RDvur5fc9qspe&CxfOSHCmu?FF>!Szt^{qz+DNw46Pp&G#w(7tQyNu z{eZ|!ipvD%K9QLmmzkv3w~EXZktrCiPZen)RDGIAlX<;#Qw5TFX)F{psCk&qErvsm=1AUQr~`zcd=WHhj5W@#@$eY zb0foQeVa(j*16SYDCxK(YShctH;S~B?rD*h($N`N^w*2Dly0?1OMP;m!%%9h6=^Bm zT9Fp?>$njkw<7h>CZ_8i6geAs7q8Ft?dzDXufpBZ!wQj>oN$}P;-p-pB`0%4T5|GZ zk(QFq6KTmwp-4+fr--zabec#@`m;qk8F#%tOQa?Jp&~8lhpJgxx0v^!kN1#APqq3=25A=Xn&_ga!qTxPVjzZDxuYR4V*V~X8nwVT2s%PtZ{Weq&jdpO> zJ&czb$aCKFA$DMlAa!Zfk!vGFeHhz?CW22Rt=DbDz0H9+eMa!`PZt_NAqzaOZER4q z-dh)0&YD_o7QSjT>L}INkf`0$|C$jb1&r)~NZ4i=A!dZ`!e^)&Sh*%izs;u0#h&}deS4uu zujajOE$$KFzRax`LzAHvRqu(9%`Z@y6{C}caP=-H0OYH@=n%ViX<}o)|*uIfgYsn#7^_vIu z@yYsM;F6s$_eQ5T>ywg0;}g)Jq&PO)=HK=b56H<{`phIQP;MC!8lN&#uir%Gf}3$S z-^#*+SzQN`q0k}RA&OqNp5>u+xJyBdNlAgu;m(@pvE&bQ{>T}89kY(bj{~CDO4)Uk zf0yiUxBe%xZ?v%guVjA*A15I$DuYp5(0g0{v@* zX!3H%83}mEH0ni0cOxh)Z;T<96M=>leTUSuk(D|&J5AOGzMh>b$t(TN7-4v9`ffCu z<=(1Lq? ziF(gaHbyh?z+X6lCLe4kMR$!J6bitI%*E)84##S}jw4kK!Q2OdX$?E6wo?u}F<9fq zS^OxBA9Hd<#*e)5BOsM}H$d)8*E<%YZJ!u*gTW8vz>YZ*1{0hXjNmp3k_FJmL>)mp zJrV|!`<-=Ayb`5 zMZJu1jSapa@4Lq8MSqQrRd19+yr0ShzrsmHS`_O4)j&-j_g@Uuy~6wbw*z$> zYX5fwb<_`N_qc&t6m2Y&bk%VqmE*JnHsK7;L09tOx1R13e<7%L1+pNJ6uEU`CA$b1+3$O^q z*yTecV|So-EO(H~jR;(bvW}c^t^Y$>*bGL02wn>CVr~9zu;heJE0+6!$~7pw`@nE_ zvyt0^#nOy%~PB~v6CmKeB~WR7&AwVh2yRhULOxcoFH~# z4wv(R(Ov44c9f{527L0nhkfJTXH4Iv2ZeuhA3#Hfze#z1>0YNd8}41k%2sOuBUVKI z7Cj`KrdadnbzHOU`x@5WijXJA<;1Hl;YzN($Y-az9*HGIrda zhhxC@)MIbb+sT;(G7Duve(bkJ<)7ZH%jTr;P=|XLs2ctjszCbGlSwYchWrp)3S+I? zTG_zGSs}b>8wmIw1?7=R(tIl9C=A{7N z_dbqqspQs_A=?d#C)32tDr`q418WIBM2l;~w4nulX(3w>-24pPazYDy5DDMC_kmj$2(TGZ_dJKw+NwJ z?4jNQN=qVm#Yy_u*U2|$LIdK}u3+Uu2*6GM_|4Sdi{vO*zRPgxpJDM?eOtm%XUz;g z&Qu)ZHv5+{^G0WopCpTSA&tQjw1H05b_Z`}%Bl04`%pz<+eGnt1l#a6RK(rg@kZn# zyb-y;sACmuJO`fvX7zSf8|t*a0&`cdwn~ z$y+i)Nqmhg7w@l~HNWaI;>yWT_OVdX6?kk7&4xVj5@#vOxvl6J2py>>hR3WGZ^V;A z%MI7=7By7)E6=IeT07EA8kOb6s&ql=wK z7zIfw6BSwJ=QwO?JUC zFdKIZ!NTXzD8x5Ns>%RV3HQYs8UFEgEK*|LrKQo*Mfhtfnd|K&5Hq*N3jT!xRQ#E! zXmRl;Sxzo&qGHsyk5^oLiWf4<#=E%7_r-f#PQGI5aq9E<)cm$_+p%sH9lZO|dd88q#+z!b+#kx%vD9bgM{811JFF-clt%|uJ(OJ_Dt%UAhwcq;un%`K& z-VRD#J|lS$&c87@4lHmH;jH;B`U#7=C08h&_e0|tD|%y0H)XJNxIjHPf{gRqi+JyK zmgH7>uWYQBh~_aDN)=-{ENdx6pGIOySLmUk%;r#uC-#~YP!XFr3eLDsO{3xtjynA-O+~6@sOQJXqd7fN8L1a#ScXtnWhkd}T zu8`3sh>-aav^%oFdSsBp0V@D85HLPCm#ab1jta4U8)voSyyqi2hj@;52u#bcKTrmN zMaErnQ4$K&p!+1Gea6 zXUz~hUX6*Kro7>PN+(gP{1Mod!l90oF3cCOd_S&?;fffa??C{u{tFK#Pf=r?EKz8z z>GI=h%UHKdZo>VLUE5WQ;pe4Yx*>oR)O*9Xeays%R!feif- zB7;+lp%IFq-^=V!U`t%%SO1{K?>nLK0!d6Yo{7fWR>c(fwQLf`7CzR+0uICqmZJbR z_(Dg#S`W!`O5v3Hwxn1HM$uv6PBe^aJXaIzjTd9pa=TW$SXH|U*;tH=<9paf1Qfmi z9n{vQj^qmO6#fG|O4lyqv=TG?e;tc&b%NFEPcQ0X^lu0(%a}fu98ecC;=Ogg$u+k6 zB$r#&f+?Pz?7H|CXSyM3DDY-nzuol;p=Luq6{3FRZHSCXw0;`*! z1bu2{F0xT=o2X`KVz*QoHL)E7v&%?z3A4hJ(&Gxry(Rn{>?(Xwm%e>oma=6{8lu(m zFx7Gxl!c9PTg#et#%=4O%HzaV+E>c+powsuwd2X9U%t5q^(oe4&_;MCgo11bK1bg6 zaVW<#>>LbxYtH^0jG=e%IUk;-^yXomnO}ygzNzdjd?%+E^Uspke119(SS*Xb-g=7F zdD5pO_n`DyVsN-JqiffDr4khDb)Xx*8VcZ^gtd^4H}12#bmKyz=Syk&P@3q}H%&4~ zHQz4vZ>f0)*rX;FBRl*eDyiQ{Sk<0{kvj6QiD^W9|9u^PF&e*yurg)kdHP{~>WA&M z(SI=SLw$W>{T6j@Y^5EqT7P;V)1T}cBt64>v0l6LrMO;0qflT-ESf^W2fxLN9DCv4 zK$`=BW&}(qlHb1=2au3Qw|BeOi8tN}y1++=7~^ev&6%uh1lmOfd=e7_Lv`y>6lid% zPkwg0AHml@>nT#BdxMNN%IIkk1=j(eDcK-)KEaTlGT8k0i}Dx%;XLyUVLnMq@c9>f z5%bK4fdG+$4gT{C$w3{3=>{IN@rdULG}++HCrWLHf>kIBiEjp=1nkK|`+4RCpb;l{ zs}P*~&AWqDwVU>VR$Qbsb=iIykaLZf+9JGfxwuBrVC{(@H(_%%1~6=)hSs9IML1Vnt_n2HgTk z1u;7|^Y{{*b4J^KSO&+CU%VU-d`4KUDt{~}rFhI)R^l2YqSN3U<75&;R`oU|fH6Sh zk$mYvYQk*&15_^Fx`U2+8|WE>#{E5Ef^I z1Z3+i`$~Tubyw|JL#tUO?$FigqAO2gl3>!SeuyB(rLeLfZPgqlxNJp|e6)}c#U+ut za=H5ja>?sYuw&;6CCjC|^(>(uHtGd|Mnm%1 zo&*v`hkV$22_vdHcbunPl_9J9sl9O9GGJmxt-Wy$w)tG}*BKzov8 z5M&g?lKUL<8MMOVHopSfT<15oZNxL+$;LmFEryqPfIF$Wch=J=EOi$tE``P^t{nfg z3yPm6H%%ME=RoCX_8m0)y++bSAesmDBJ3o`{HJU$d^PA9^}?!-Q#bSQS*AYTmS^?@ zuXv5coQ82!_Y254xw@a;EK0&RNk;!c{hY){So+~OSKWNvpm`F6VuQwgT!V7xh;bwI z(-wqQ-sk8J&VikH8iOf_#8uB!V=x(a8Xu+~q@;cugGo^=rtkq4;ds#~?E=6dZ>LFJOe?f)fSe6x>7ZEogcgQfvwjmeEv}O5x0nS@TcmhznX~ z>Wz8kb=;B)vOTqAl?&8hHkYjbo%#x&k5^xJDAO9vbeOb+n9u2a4yE5~PT%2k9uVYD z?sMjTm(O__Eyo7IJn(FBd7{tB5nTT7KIap(0^8L)!*~B1?a7HtxY^^T%-)a+h~eLV zExIdy-f+;nbeT5>gF6@q{Ee09g9OHk+@JWb=8g5w#`j@1IAFcx*;hoSJ{Npt`jw$^a10ibcd1fItT0-s|S?j$>tZ35U*r#Y^dF1 zc49BXLKdwgvlWB8-Z=4h$YXx^J0xs_jpsX&6M6fF>qGbV14@p^d`*@_-o73`xYCY1 zaVqk8E0@1~GXic=v*BVP=IgIJ?1bP15e@N>_`;n0pLgkXxn4vJ}qRAJl_OiaHt|M?qzUj_7V*yi`wFh zElyqJ;q$oQUc>JQO|kjT<#!lbThChkP4Obsmz0^Eyz)yUCkemh*P-{)56u-nu_vDu zvH6sQ)5>~o2WW)KZNa_z7rp_;$_}GP+v#|peli-FU-*&?d_()XF}))*VP&HJC67V( zyCM4PeLs+|vDwKhPQ@2aF-MOt|1=A>voaaSdfUVqQ#^KDX6~kG?B++Oncr4K57I)P zd9$Dh)Q&7mvn=>Z5HRad!I&{Pl$RPBe@xGY1h_{()iT7_o%*Cy(d(Tz&J}$l&h_w2 zu0`pqtH}zC^ibOX4kwr~j@Rx*4;jlHT-RQVR`eqr3laZ*%Ua{lLa)SG+o)t4KyK{h zB>(B5$+k>)GRXQSK}|EDvSa6XfASH z3TpY^vYHgkIr7cR$(s9+J~^pzGL}eqW|*AZI2lVZF^5>#(cfy!kY}g!Ji5C%oMYJpw}8-<;5;lqG#4o z)8N)dRHq*Bnt7y>U)n6@N2=xsDys+R1{!UdM=CzHgcfZ+^BXbB_>)vTAzuvybZ$k3Hf<5&GXr3x!a8HfgO%G z6V)p)Qnv+mq=qI7`{msRBG%W2fuf|_jqyo%y2A-uV|-f3R;!Pf_AEWDv?Y(Z_1D-B zG2GiC8D=%)0?|h335)G)@oXvN{}tsIqJINcYoUu@BCG9FsdxUYrwhZ(=x#~=H+*J_ z{gWP{A~AM6#-zb`x9^E8OTl?#tO({{$o55JAg)lNHa8+}K->>9nQn)_uiTFmU4^|7 zVIz9u@Rbg@XnY-)Z~h8gfk9{u2dUgG=s$WNoj=(dO!)fB@v z!Fu`O`D5_>ans%E#+dPe5P8MpW(;54R`92ROt!KKfy}ygAUl| zo5?+%JbW|2U(Ce0f|0Lb6vL&uP2aF*aX{Eat9i~BUiFxNV4Yk?WO9l=%HmLO7C(N9 z*9`8I%pJbJ7@lMd-OS{byW4ie*?SsYcDVx!0CpMxWscxsU*EBL${1$Mp}q>1dHo~9o(5-`WCILnys(0lL34#n}e7A8ekO`N@LCmCI2wGY1C5!G6AQU~zKkhw)1d zEp$2_^Bz&yDiqK~9IR7Pu+ZsgOv2Y{Et!ccF2nK!l}uE+UQ{xvhprlvbPoXKGJ$fS z?J01Qlb08+psvA`C%h0T>0?&4?|~3#8dhehqS8(1NKGPY0ffr|^KfY-48 zR3qClHap1~*oP79d;vZPUyjViqi>dRmUC@z7I1@mWtBnr0F_nxTUB0)tHN{XwOKe| zKXPyNcGl8-{c9Th{c*%$fO>P*kYxE!6nxD8a|X8jAB3>Bo1QFRO(9Fu>!zT(9-4@| z{Ee?#$YU`vRPpVyn0NyXOTO{j9ipmqNroVhW%Py=6XK*8j?H6AalS=hWsHE+5XU7Y z0rbBm59{MggvY^M4Sv9vG2ie%g;;)VbG!4dhXAn4zm15OY?Cd9&sPkeW3_j2tUdfp zh6B~K)!l`JA-}^n+Cpo9V|BjZ$ihj9@%{nwz-dem&YCpv6#g700X}i)6i_7G0+0-P z0Vw@CYiE-G8bgU$ya6pt$B|v(mqKHZ zha(iY$9VCb&?lvWciIyBgmtVwVNKa5mmp>7=!8B=ixEJdu+j;A!useFKH*Yi#vgo2(BSd|y zw)Kj3)l>_8s6ba;b;*fcWkMi-BPPe?Nxq-fbR41XRq&V89S|BR>bz9oD2NKYdv}u_q4G2=e^Banvyq zb0VIh`m3N89?d0^l|^=54ex=(R@PwR_~WXHjPsAr*m-=$+i_$?m73!-`cUEj6sH&Q!vN(5_5bSeB%i-J^mkxX5NPpb4p9a9M=)8%q#L(Dg z$=Myg?ie+p(RboNg)x4xF*5~JhBeRhiJ-Zr=OiHz?-Og$_ zpMhg@*I4I1uf_D61zNEKuOIWk>j#iF&wT$;!J|0vI$PF^KSeegNa7UPixwV!Kg_=e zE0d5o=ZY1|j1y0}=I-GU*In|6D;my=&gi0rWGr2BlET^OvEzB=e``G@ua{ap;BfAD z@p^`Z_h0Y|dBHCBo1o&5yCsy{OoMdecQZCq?!2VHQ5>}mppODaanv>ull1X2Jcqnf z%5cjgF@5KrsP9Yp&6-g76btcx5MnK~8Q497&0I4Ai%xZf*4==ktdktNf15s?kJ7sP z0G8~|8vbiiY|6sYavSiT5cn(i7+Ro_UJ65DER5WL&{^XL8V^lPPKE!VQo5Xv?LzTc z%+IJ}_#5DQ;^<~ba?YBaKv1+MyYw%Jlb zw;iLJho6w=CO<)iQ|kU-zliDnyX@!B7T*7$`uUQ+lKNLMRSUI7XZF}e@(%q4~aPQu09JoRG@ z4aB?*#2A!5_vm-{?ZS`DVJJ_H{gs?_)|?q%(MnCHlvoNTwFb3>-Hset
w$IN)hdIk-&FUDMGO~U`a2;MbHx%PKQ(iQGbl8Tw=C{G`0-GF;T*o12Gfb3 zavO!pLN^@cQul93pL=rMull*@&F|O!91HP((EWp8^*_)(e`e|wx^IZn{gZJ{_j`1| z&vLq_(*0*qrz>>dpudW3@Ho%wtmyzo?DrmU3K!F?90x(^ePNd|-T(HxbZ@Wwfx6$f zRw4cmx=;Jpf28}YQ|mr{t-=4c{sZm)H{YlGZBgAr;dmUOH_uOXKJynf;oT{mBCNh8 zY=<9{&h^n~Dz)p>u=ylY!*L@m*vE3SJac@q4i^)IGnizx+#IH#k2>=%j(BrycCb8z zvQlhjSdMru8shAbgN!H{JdFJSX2X~##hh@qqOl(tQ5xUJigH%YV4g+ht%H)4Ye`1E zft5Pl{hu>8(bD8fMKu!{KbSdXQO@AAmYyzCWS&AsY>znlR8~3|&+nhzgC+t^Z0LU8 z@z^-5dE{X{t7q=6JWGEEzZIME9Cqc0eLV?3@s#-&{bN9hWs>+W1+s#^+3) zbyYOe)g^aC3`HB^iUVTF5iTtb(8guWa!->a$GNPu>nd%8l_nj9qFD*jP z1doxN=BgPwn#Qx5|IO+vUIUcKyG-uG3EMd4?AKZ_}W4 z#TAwQ`S^Fi$7L4yw2Lm*2D>!*Uw>Ui{I|cZ;!;;pRe42GWhMU?dH(E4+Lc#o?wp+K za;|XADq6t*Q0^)%^Fe0(FXqBQ+Mp}7sin&bN{S0z%L*!r3+9&;xk?N0zmBb3`G410 zty27VVJ*)>8>|(S;9r&(-sFHW-X+_b3vPGrEw-pt-3Ix|zxHPR` z{({1yg^Ly!FS)s7X=z#cEftkM|FY#(x862Bd%{Hbq$yLcxpvz08P|Dc=FFO%o0mW5 z`Ww6%BS&2_`qIlTAA`3a6Us^pi>ZQwk~l57mKXaLlRcj!oPzq^;NpcE6Nr?*VH7gc%dkhi}F*O>FAbdnoZqUE=(1c z$#~QVN_|t8`cfUSS|?B_^)LNV*}@-zmrDM`cEUN`#-?HhJP+v>csBlX%E9+WA_oz> zu-(Pqt9Tl_aN__^!T#`K#MOv7YqlVsi1LZp)-6G-VY7c7;*4KLB29=7JQax?Lc9&H zU(?`pHas1PbYhXdWm_aN6gyH=nj?{N#H;s3B0O!}@(=9E9i5^nQM%h3{6IC}iz)`6OK&N)do+iJ)^ z6lH@E7GrCX?{7d_)5iC51QWB*uulru@3h_3EpbwMa#6ZV;CWEo3S9gvWzF^u8nAFD z2D;^?C(TO7k6@5y6~eesB!a^enr&+wo}xJ`-La6kY)nZi_#qh>B-&d64G6QXYw%u z`dAGwvM*ipP$bd6t-ya8_;%`P!io5a+31Az=^E%y;mU)2^IT8U{z#;PZ6F-4+e%P( zA$v6NQZQaeBHaZKHa;i4m(c$l;0y*%@OT{6Px1PRjjRVe5;1rXO%j4)O856DqO` z?28yRK$rcw8MHV5H4>S6ivC{;S{Sm4PYBwW<50&$ojq@34new$&c@R(+ob)2P2%7i zuan{A!_A5d=Kvk&+DB-dUyx2pLwuoqoOX?btGnO+c0$ux+Q*6Z*ZXN-B@RXU*>3iZ zv$dVw>|dX)y&=+n?=}qi58Ld|4%D8u**B$WTSR)7Z6NZ$wAr5?sOfh5uLf#$cBUV< zGye^{y>o!}k=_2)0PRbW{#N8a-QE7h0BvV?JAQNH4UztPcjD_k?4JzK*7vagbAa}= zNN?%UANe2lu&*7Uecr>4^cF{dq(5}nzZ|H2F47O5WCE48y1iwf z)^fW2je*)ekv30fyZ0yAUmvJFmPDMUB>Nu+YJW?zHw@H15b4iE{sU*&w+_^PeTMyo zf!eboz5NX0e{_cZNSfAphW%e@T6Hg`*Ysk3eJ}f0X`br1BnKbofftH1r>G)+I-{_`~L zk+bcs=V+VHwyzqfHHh>ck>7GQaSohK{JYPkojiK3{rv&jmUHd@7@+Mr*Z%GRZU4FU zUkuPb5$VGs|BeB~xqATdF(|GaIS>C*D#3mrQQMlx`)i5zSGs9$iu6~BSaE;c4P&w1 z)*of>+F16!jdPdHku&!wL3v z-L>_J{0)#dyV+a2!;ON%12+46cI_pb9sfY<6WbFg+}hpV=FpCGx9>SkYwS^^X|KWJ z9oikI+21-%d-gOUvfW>tnUHj$JuBfx`#kMt5JF9ve{RB=*V+#yXp8N;5)#@H?8g$= zwuKP+#ia=&Fpf12t$Ig7i^Kk|Lp$hzpuan<8!{SB8=`4noi+r?r+VTOS&MEY;q-Tf znhqwSGQ=9PHo@N7SKE+if2NOC+iO+g6DitTeNk55?=hx32H3wADt@e+2S2d0!rp4r z{zOLhC)jHta^m?|e}9{3Z-OSe*=u@eO*WW*Y0<0x4#bK>opLrWJ|9BJJYnsoI`MLb=n(U+VjaQ z-Jfj#e1P_|-u7Sg)_&W200?#9EPM43?GadXcWryW zURc}ry9CKUrjm}CYOn3DJ>S0<(qH$tKXZ<@>1?JCpKbr>9PQ3?1|a>)Irc}=w8Q6c zfVHRD|9Gx;-??;i=D8D5dSHP4-htZcfu#1>K>KIsYi|rBg^~~)XTRNDK@NUBOn1|OU+Bco1J&}0TYKQi9qJ8se z+JiRxZ+mJ_*;0@6)B<)_%jw!b?e=@l)OK}esnNr}DMkCD2fFAbhkbodZR2T39zD&D z-~amc>GtN+wTF}J+mp11&#ajjV+1c0r@R{0&eOXmcvDclc9Z0c1ex~-~nY}*gr@ecoeRHbz(pmOz z`e_gKBmRMY_QU$X*pt~iPOv(E>`g~SlbZh520~7 zt*Ns)&Okh-huy(>dGRWn1MF&@t8ETU$68as=IDv|El|h*<<+)M^p1q|wMEHsQ*A_t_j^wTv_lA>Q*d$v?pV{2E~w zvj3+QTd}cc)p-tj*nzMY;RA#(5fXn6-Vx427=@6Hkb^KEp#tF!g!>SlKzI&e2f|*2 z4-mdYNPGbG5za#xg^-PqgD@YV0^tsX`w*T$cn)C)!d`?A5WYl6d=T{!&O;c5kd2Uo zFdv};;SPlR5S~DI4q*qvUW5-2zC=iT2=x)pLl}jSjgW&dAE5%_4g^d7X6RxXU}l_g zn%$8Koic4hn(^5xkNMi<2@|ex4V^qAcbMyv^wH^;xkhDVT$V99W3+2%4t9m66!>KR zk4E8Njs4#sU-F+&{{IA-+DNawb*ZmlK4M>mj2By};!^BOm22tP11w4(pFQ&x2S4CQMu0xE=!8E^aZ}Mib^mbqa_P~jz$WW z7B2vH83^N+E?Se6=T`!ILD^Dn##u)81LAXlL;pmdG8(>UGywVy>tY$N^AX^}1l|!VSGiKm(CjA@n=<}N3nD~6bx@?m;^nKiaq|YKA zePkyF2YsV;5tr9w1o}7P(YNh^GkgkZt6k7Ty~8kv09X|FP74IedzZd7FMj? z7Zn~=(E#7s@Q|EOEli7ELmb{7;OzlkoVi5hXpF;a0bUF6EE=R~rS~9Bw%IP{uU6n4 zK$`Z#i+H5}R|LvIye*icw>+$ASx8$K@fiMwVBv8t?*yKW8S1j|J_Kyx9UE?U9Qy_I zXCWab9YH=`quSO8)Rk1=h)x>BBm zyjb9zi;PPU$REcq$3{H8+0S6_^DJbl%c5t&@iF}o;clu``W*?&mg!$4EL)%-k+9Sb z{e^^OZ&_=eZlXu!_?P9<;5g1DEF!U{k}#!^<5t34pDbRw^Lsb3(vxdE zS?3gxM?7?j_6>9{e2aQNq$=(~c#~m7%m( z3B!rtqFqW@b^z^9!qOAb&LqsWuCyl!_ZP5r>(<4Cuzxs<#IA19w+u3`8?1u;yh-UN z5&Dr5$#R?aMTGAqIIfwKp!L!4iBwd+1k6Zd09*1UVCCxuY~$JpSAv$RO+`%mXFCa6 ze=QerOI&+519m(t`|D)wFGqP(T>CYExkf_-dVRH@A;yM=f|E7wb;tAbTfix*e@XvU zz}7|i-mn0~g!dulGX(eEh<_CEm^l6^$Y_)gR^{CL)hu}vQ?+vm<64bCYsduL^qI{u z66y0m&#%gFROR;qwr#;P0!*t9${PW5jY&%!r1jF?1w0$|D^&e)7-F7In}hzI^cJeY zjsudSJww4e75&E){1)htpH2nerOL&JZJTV4O`<$WJ4ZPMS~_jv8o-Ocz?vEK+1|6N z9Mgs<=lXz`CC|SAKM4I?fjr_*l|x?R6v*}$0ZwfK{}>vScQ;_``J*?UsNPWcO^V-- z6nws_KUlg9?EwW(1kCYEwBFFywW_?Es(&}&rw`j4m!q8g{8^O`QuPl29)bR2{Xyuz z4pn}cs?T4Bvg|)O@ry{Fnk(JVBjx!8;EYdV@_r7uxx3wwE$Am{5x@t2hvyBzY`>p$ zY1%kZj&&Je7utu5Mt`Sjd_}_N4tgf`|7?YS3-rqN9tB*3@xpg&)ZY$O&NDbH|3<<5 z6p8Q|7#UpGAPKmq))%SKO5WZWj{^XgfPeBs{&ECntUqr7Jm-+jK|5#p2daFfpocXZ z;G{VIozf+1+4!#4Sd@m^cTb2IaQSd)h{SLr< zmS#87z7yc+;`!|Zcr@($I)R_04FTk%qt5)$PYN{Ih%v;S6P0aDqp9{ ze;J2Qdw379HJ`dL-ab*~s}z1uj4NLA75~>O_%h_Ny_*4Zy-u7y+8Np{s{BG#9#HTI zz-(`eg8!lDy{_O%3coK61y>CM>0baiULRKgZh=3&9%by`I{_bn|L40o!jA!7+ir7| ztMa{odEJ0OdY>uSvM(E%!o_SRFUKtj_Bxn2zX#Y_ zuk^-~)4u?Zi?ffTfNMU-evG0w6GUvEVs8!lV0)`b6qhyLHz=5EZzkVR@KB^dN^{61 zm6o8&FH|tqO4J(_oP{*;?^m!z|DOuJ1ZBiO4EP}C2fjNcKQ6gM(_U2NV*tnZ$F-{5 z;-^Nzd@oLVPXV42Hy_oja*ijKf1}_^1)nLGfa3X_+Fxoq(-9EzUR1fH%NDZv`!mpN|0Zvh4Y&f{T=V zy|F}{2me$B9O4gE&kWXho33EeaPhVPA0~MhEiEhcR{9F?x!QsXAHIlMxG;Tz=JigP zeO-=s+SFOIysq58)o^&c)i7CV%N#*^(|QF%^>TQW!}XFrG?l` z@_H9k6?ltE3%v{YQC?QoggJAt;pH8fehI42m{mDp ze8nlYRf5aa`DF^BMP3I12S~Q_>(jHlNU)&9iRFMbmhPxRNx?K3>i*rGg zX2lM>)+29O;VmP-bn!1Be@v@|A9|5%)-6Q!SY*%Es?GrOT%|x)D=&Vw_ChW0j}V-P zz;6!$D*K!v`4nX-cD;|Px7z9tscEiX4F_>nJcq^RxG!|uw#o(7WF!9D3r}Ka(si9F z-BP|UA88#%UpYYTY9aM6FJ)HZaw*0h`h0W8J$(H5=V$K|oJwfVemImlVpGNDDh+`u z4pLHjkzYAZ^cWUY6``zf!Bw7gSNOw7PdaAUqzHFjK*4}q|AM`}_TY7YLV-hW`(d%j ztOxY~1QABiL_QqAjhKzCUa1f{Fq9RTK(toub2zMI3=v8%>; zC<|{PrHjX6w<5uyr&CrQuz*YB1QUvgFPzR7T*pbWXHn2P+ou}@!C?g6`PDSZz$fCm z6I*(?MDnWb$fe|{jZM^I6SkfZW8o4%9qq#0lWb(eiiX8566*TjyQ^DouB^zC(%sn` zW^dLTh8 z`DDAm87`R=F)@9GDc$8IdG~bVeRgZB4Y$4}nq9^Pxs>LCnr&4nybWLO_B(!@fwV){ z%<(EST13AQNZ#xfOoRWq%caz%h?!{2MD+h~&q$`FC@R{g5>_!`f$KGu9jQ{$6bisl z6B7zG>X2V{i4ehThHfWzyX;WI+ms-bzZ0u&B<9L1c@SznFy_(hhuFv6$djWSCmF#l{fzEC~TkOzwkgOD1P< z;#(;9A^38KQo+I}T+4&Q>PLMBLDg$6z_D?L3fWdnHEJ(VRQa*&3974yuC< z5^C?D6=*{`Y(y;``YGJ@GD?`GkSDB=vmAtB1oA$@&PiCc zE}zv^&d_~ZMy2#)lcq-uQa|u77PU-GSF|9aIVWRxi3P+nsaonI%{+LW-r6Ett;Ly#)Hq$P` zN$Z^Q6k)+7bExDTBpu_Y?K4?!OwSA-|be~-eEFFvYkmw~g zr+JhiH#(w{cdE3FdISUoKGNH!eS$)$@s_#;a({En;m?PGY{cojK-%`mpD2|r&=Rh+%yO4mqep+V6|_aeN541E_Ot8E xsB6?yuGOkJvq_d#yNxM~TP3w%G+j7)Xf42+uomd29*FAT^&D3kjb!w7zXO{-;PL class SomeClass - template - class SomeClass - - declare function -- somefunc(@FUNCARGS) - somefunc(Param1 p1, Param2 p2) - - select template -- SomeClass<@SELARGS> - SomeClass - - invoke function -- somefunc(@INVOKEARGS) - somefunc(p1, p2) - - I also provide @NUM which is the number of arguments. - The case where @NUM is zero is a special case: for template declarations, - the entire template<> bit needs to disappear. When other arguments are - involved, either at the beginning or end of the list, there a commas - which might need to be removed. - - I've used .hxx as the extension for these files. This enables C++ - I wanted to use an unusual file extension (.HOH) for these files, because they - aren't real header files. But I also like to use the C++ syntax highlighting - in Visual Studio. I chose .hxx because MSVC treats it as C++, but it - seems to very rarely used. - - Installation (for VC6, if you want to use .HOH as the extension instead): - Go into the registry and change - HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Text Editor\Tabs/Language Settings\C/C++\FileExtensions from cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2 - to cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2;hoh by adding �;hoh� to the end. - Then add this as a custom build step to the main file of your project: - hopter $(InputDir)\*.hoh $(InputDir)\*.h - -*/ - -#include -#include -#include -#include - -// This is a quick-n-dirty implementation of a CString replacement. -// It promises nothing more than to provide enough functionality to get -// this program to run. -// Note that I have really never used CString, so the information to -// implement the members that are used in this program come from -// online documentation at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_cstring.asp -// Also, I have only used VC++ a few times, a long time ago, so -// I really do not know what all their alphabet soup is suppoed to -// mean, so I just made a guess... - - -class CString -{ -public: - enum { MAX_FORMAT_STRING_SIZE = 8 * 1044 }; - CString() - : str_() - { - } - - CString( - CString const & rhs) - : str_(rhs.str_) - { - } - - CString( - char ch, - int repeat = 1) - : str_(repeat, ch) - { - } - - CString( - char const * s) - : str_(s) - { - } - - CString & operator=( - CString const & rhs) - { - str_ = rhs.str_; - return *this; - } - - CString & operator=( - char const * s) - { - str_ = s; - return *this; - } - - CString & operator=( - char ch) - { - str_ = ch; - return *this; - } - - void Format( - char const * fmt, - ...) - { - char buffer[ MAX_FORMAT_STRING_SIZE ]; - va_list ap; - va_start(ap, fmt); - vsprintf(buffer, fmt, ap); - va_end(ap); - str_ = buffer; - } - - char operator[]( - int x) const - { - return str_[x]; - } - - CString & operator+=( - CString const & x) - { - str_ += x.str_; return *this; - } - - int Replace( - CString const & lhs, - CString const & rhs) - { - int rval = 0; - std::string::size_type pos = 0; - while (pos < str_.length()) - { - pos = str_.find(lhs.str_, pos); - if (pos != std::string::npos) - { - str_.replace(pos, lhs.GetLength(), rhs.str_); - pos += rhs.GetLength(); - ++rval; - } - } - return rval; - } - - int GetLength() const - { - return str_.length(); - } - - operator char const * () const - { - return str_.c_str(); - } - -private: - std::string str_; -}; - - -CString operator+( - CString const & x, - CString const & y) -{ - CString result(x); - result += y; - return result; -} - - -/* Example: This is an excerpt from boost::function_template.hpp - -#define BOOST_FUNCTION_FUNCTION_INVOKER \ - BOOST_JOIN(function_invoker,BOOST_FUNCTION_NUM_ARGS) -#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER \ - BOOST_JOIN(void_function_invoker,BOOST_FUNCTION_NUM_ARGS) - - template< - typename FunctionPtr, - typename R BOOST_FUNCTION_COMMA - BOOST_FUNCTION_TEMPLATE_PARMS - > - struct BOOST_FUNCTION_GET_FUNCTION_INVOKER - { - typedef typename ct_if<(is_void::value), - BOOST_FUNCTION_VOID_FUNCTION_INVOKER< - FunctionPtr, - R BOOST_FUNCTION_COMMA - BOOST_FUNCTION_TEMPLATE_ARGS - >, - BOOST_FUNCTION_FUNCTION_INVOKER< - FunctionPtr, - R BOOST_FUNCTION_COMMA - BOOST_FUNCTION_TEMPLATE_ARGS - > - >::type type; - }; - -Using HOPTER, this can be written as: - - template< typename FunctionPtr, typename R, @CLASSARGS> - struct get_function_invoker@NUM - { - typedef typename ct_if<(is_void::value), - void_function_invoker@NUM, - function_invoker@NUM - >::type type; - }; -*/ - -int MaxNumArgs; - -/// Makes the necessary subsititutions in 'bigblock', and writes to fout. -void PrintVarArgs(FILE *fout, CString bigblock, int num) { - CString numstr; - CString invokelist; - CString funclist; - CString selectlist; - CString classlist; - CString commastr; - numstr.Format("%d", num); - if (num==0) { - invokelist=""; - funclist=""; - selectlist=""; - commastr=""; - classlist=""; - }else { - invokelist="p1"; - funclist="Param1 p1"; - selectlist = "Param1"; - classlist = "class Param1"; - commastr=", "; - CString str; - for (int k=2; k<=num; k++) { - str.Format(", p%d", k); - invokelist+=str; - str.Format(", Param%d p%d", k, k); - funclist+=str; - str.Format(", Param%d", k); - selectlist += str; - str.Format(", class Param%d", k); - classlist += str; - } - } - - // Simple replacement of number of arguments - bigblock.Replace("@NUM", numstr); - - // Template declarations - if (num==0) bigblock.Replace("template<@CLASSARGS>", ""); - else bigblock.Replace("template<@CLASSARGS>", - (CString)"template<" + classlist+">"); - if (num==0) bigblock.Replace("template <@CLASSARGS>", ""); - else bigblock.Replace("template <@CLASSARGS>", - (CString)"template<" + classlist+">"); - bigblock.Replace(",@CLASSARGS", commastr + classlist); - bigblock.Replace(", @CLASSARGS", commastr + classlist); - bigblock.Replace("@CLASSARGS, ", classlist + commastr); - bigblock.Replace("@CLASSARGS,", classlist + commastr); - bigblock.Replace("@CLASSARGS", classlist); - - // Template selections - CString selargstr; - if (num==0) selargstr = ""; - else selargstr = (CString)"<"+selectlist+">"; - - bigblock.Replace("<@SELARGS>", selargstr); - bigblock.Replace("< @SELARGS >", selargstr); - bigblock.Replace(",@SELARGS", commastr + selectlist); - bigblock.Replace(", @SELARGS", commastr + selectlist); - bigblock.Replace("@SELARGS, ", selectlist + commastr); - bigblock.Replace("@SELARGS,", selectlist + commastr); - bigblock.Replace("@SELARGS", selectlist); - - // Function declarations - bigblock.Replace(",@FUNCARGS", commastr + funclist); - bigblock.Replace(", @FUNCARGS", commastr + funclist); - bigblock.Replace("@FUNCARGS, ", funclist + commastr); - bigblock.Replace("@FUNCARGS,", funclist + commastr); - bigblock.Replace("@FUNCARGS", funclist); - - // Function invocation - bigblock.Replace(",@INVOKEARGS", commastr + invokelist); - bigblock.Replace(", @INVOKEARGS", commastr + invokelist); - bigblock.Replace("@INVOKEARGS, ", invokelist + commastr); - bigblock.Replace("@INVOKEARGS,", invokelist + commastr); - bigblock.Replace("@INVOKEARGS", invokelist); - - fputs(bigblock, fout); -} - -int action_hopter(int numargs, const char *filenamein, const char *filenameout) -{ - - MaxNumArgs = numargs; - - FILE * fin; - FILE *fout; - - fin =fopen(filenamein,"rt"); - if (!fin) { printf("Error, can't open %s\n", filenamein); return 1; }; - fout = fopen (filenameout, "wt"); - if (!fout) { printf("Error, can't open %s\n", filenameout); return 1; }; - char buf[5000]; - for (;;) { - if (!fgets(buf, 5000, fin)) break; - if (!strncmp(buf, "@VARARGS", 8)) { - // found a match... - CString bigblock; - for (;;) { - if (feof(fin)) { printf("No matching @ENDVAR !!??\n"); return 1; }; - fgets(buf, 5000, fin); - if (!strncmp(buf, "@ENDVAR", 7)) break; - bigblock+=buf; - } -// fprintf(fout, "// Auto-generated code [[[\n"); - for (int k=0; k<=MaxNumArgs; k++) { - fprintf(fout, "//N=%d\n", k); - PrintVarArgs(fout, bigblock, k); - } -// fprintf(fout, "// ]]] End auto-generated code\n"); - } else { - fprintf(fout, "%s", buf); - } - } - fclose(fin); - fclose(fout); - return 0; -} diff --git a/metamod-source/core/sourcehook/generate/shworker/msvc7/shworker.vcproj b/metamod-source/core/sourcehook/generate/shworker/msvc7/shworker.vcproj deleted file mode 100644 index 1218a8ef..00000000 --- a/metamod-source/core/sourcehook/generate/shworker/msvc7/shworker.vcproj +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metamod-source/core/sourcehook/generate/shworker/msvc8/shworker.vcproj b/metamod-source/core/sourcehook/generate/shworker/msvc8/shworker.vcproj deleted file mode 100644 index 6f0ca43b..00000000 --- a/metamod-source/core/sourcehook/generate/shworker/msvc8/shworker.vcproj +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metamod-source/core/sourcehook/generate/shworker/msvc9/shworker.sln b/metamod-source/core/sourcehook/generate/shworker/msvc9/shworker.sln deleted file mode 100644 index 185d2559..00000000 --- a/metamod-source/core/sourcehook/generate/shworker/msvc9/shworker.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shworker", "shworker.vcproj", "{7CD76E64-A9DF-47DB-8A68-36297C67E557}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7CD76E64-A9DF-47DB-8A68-36297C67E557}.Debug|Win32.ActiveCfg = Debug|Win32 - {7CD76E64-A9DF-47DB-8A68-36297C67E557}.Debug|Win32.Build.0 = Debug|Win32 - {7CD76E64-A9DF-47DB-8A68-36297C67E557}.Release|Win32.ActiveCfg = Release|Win32 - {7CD76E64-A9DF-47DB-8A68-36297C67E557}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/metamod-source/core/sourcehook/generate/shworker/msvc9/shworker.vcproj b/metamod-source/core/sourcehook/generate/shworker/msvc9/shworker.vcproj deleted file mode 100644 index 8878a27b..00000000 --- a/metamod-source/core/sourcehook/generate/shworker/msvc9/shworker.vcproj +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metamod-source/core/sourcehook/generate/shworker/shworker.cpp b/metamod-source/core/sourcehook/generate/shworker/shworker.cpp deleted file mode 100644 index 408a6eb9..00000000 --- a/metamod-source/core/sourcehook/generate/shworker/shworker.cpp +++ /dev/null @@ -1,768 +0,0 @@ -// SHWorker -// Inspired by "Hopter" that comes with FastDelegate (http://www.codeproject.com/cpp/FastDelegate.asp) -// Much more powerful (and ugly) though - -/* - - INPUT FILE DIRECTIVES - - $a is the first additional argument, $b the second, ... - - --- - ITERATION - - @[variable,min,max:code|separator@] - - variable: this will be replaced in code by its current value. - vars are always $ and a number. - min: first value to be used for variable - max: last value to be used for variable - code: the code that will be inserted on each iteration. - separator: optional. this will be inserted between iterations. - If you don't use a separator, you may leave out the | - IMPORTANT: iterations will only be performed if max >= min - - --- ARITHMETIC EXPRESSION - - @(expr) - - expr may contain: - variables - constants - operators (currently only + and * are supported) - - --- CONDITION - - @[expr operator expr:code@] - - Example: @[$1!=0:hello@] - - Currently only != and == are supported operators. - - - Yes, error handling in here is weird, some stuff uses return values, other code uses exceptions. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "stdio.h" - -#ifdef __linux__ -# define stricmp strcasecmp -#endif - -// Ensure that the template version is being used! -#ifdef min -#undef min -#endif - -using namespace std; - -extern int action_hopter(int numargs, const char *filenamein, const char *filenameout); - -typedef map varmap; - -struct MyError -{ - const char *m_desc; - - MyError(const char *desc) : m_desc(desc) - { - } - - void Print() - { - cout << m_desc << endl; - } -}; - -struct SyntaxError : MyError -{ - SyntaxError() : MyError("Syntax error in expression") - { - } -}; -struct OtherError : MyError -{ - OtherError() : MyError("WTF") - { - } -}; - -void trim_string(std::string &str) -{ - size_t first = str.find_first_not_of(" \t\v\n\r"); - if (first == std::string::npos) - { - str.clear(); - return; - } - - size_t last = str.length(); - for (std::string::reverse_iterator riter = str.rbegin(); riter != str.rend(); ++riter) - { - char ch = *riter; - if (ch != ' ' && - ch != '\t' && - ch != '\v' && - ch != '\n' && - ch != '\r') - break; - --last; - } - str = str.substr(first, last - first); -} - -// unused -bool ExtractToken(std::string &strin, std::string &strout) -{ - trim_string(strin); - if (strin.begin() == strin.end()) - { - strout.clear(); - return false; - } - size_t first = strin.find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFHIJKLMNOPQRSTUVWXYZ_0123456789"); - if (first == 0) - { - if (strin.size() > 1 && strin.at(0) == '/' && strin.at(1) == '/') - { - // One-line comment, find its end - first = strin.find('\n') + 1; - } - else if (strin.size() > 1 && strin.at(0) == '/' && strin.at(1) == '*') - { - // Multi-line comment, find its end - first = strin.find("*/") + 2; - } - strin = strin.substr(1); - strout.clear(); - return true; - } - strout = strin.substr(0, first); - strin = strin.substr(first); - return true; -} - -// Returns the number of occurencies replaced -int DoReplace(string &str, const string &what, const string &with) -{ - int cnt=0; - size_t where = str.find(what); - - while (where != string::npos) - { - str.replace(where, what.size(), with); - ++cnt; - where = str.find(what, where); - } - return cnt; -} - -int DoReplace(string &str, const char *what, const char *with) -{ - int cnt=0; - size_t where = str.find(what); - size_t whatsize = strlen(what); - while (where != string::npos) - { - str.replace(where, whatsize, with); - ++cnt; - where = str.find(what, where); - } - return cnt; -} - - -class ExprParser -{ - // grammar: - /* - expr -> expr + term { do_add } - | expr - term { do_sub } - | term - - term -> term * factor { do_mul } - | term / factor { do_div } - | term % factor { do_mod } - - factor -> (expr) - | numeric constant { push } - - - equivalent to: - - expr -> term moreterms - moreterms -> + term { do_add } moreterms - moreterms -> - term { do_sub } moreterms - moreterms -> epsilon - - term -> factor morefactors - morefactors -> * factor { do_mul } morefactors - morefactors -> / factor { do_div } morefactors - morefactors -> % factor { do_mod } morefactors - morefactors -> epsilon - - factor -> (expr) - factor -> numeric constant { push } - - */ - - string::const_iterator m_begin; - string::const_iterator m_end; - string::const_iterator m_iter; - - int m_lookahead; - int m_tokenval; - - stack m_stack; - static const int DONE = 256; - static const int NUM = 257; - - int lexan() - { - while (1) - { - if (m_iter == m_end) - return DONE; - - int t = *m_iter++; - - if (t == ' ' || t == '\t') - ; // Remove whitespace - else if (isdigit(t)) - { - --m_iter; - - m_tokenval = 0; - while (m_iter != m_end && isdigit(*m_iter)) - { - m_tokenval *= 10; - m_tokenval += *m_iter - '0'; - ++m_iter; - } - return NUM; - } - else - return t; - } - } - - void match(int t) - { - if (m_lookahead == t) - m_lookahead = lexan(); - else - throw SyntaxError(); - } - void factor() - { - switch (m_lookahead) - { - case '(': - match('('); expr(); match(')'); - break; - case NUM: - m_stack.push(m_tokenval); match(NUM); - break; - default: - throw SyntaxError(); - } - } - void term() - { - factor(); - while (1) - { - switch (m_lookahead) - { - case '*': - match('*'); factor(); do_mul(); - continue; - case '/': - match('/'); factor(); do_div(); - continue; - case '%': - match('%'); factor(); do_mod(); - continue; - default: - return; - } - - } - } - - void expr() - { - term(); - while (1) - { - switch (m_lookahead) - { - case '+': - match('+'); term(); do_add(); - continue; - case '-': - match('-'); term(); do_sub(); - continue; - default: - return; - } - } - } - - void do_add() - { - int a2 = m_stack.top(); m_stack.pop(); - int a1 = m_stack.top(); m_stack.pop(); - m_stack.push(a1 + a2); - } - - void do_sub() - { - int a2 = m_stack.top(); m_stack.pop(); - int a1 = m_stack.top(); m_stack.pop(); - m_stack.push(a1 - a2); - } - - void do_mul() - { - int a2 = m_stack.top(); m_stack.pop(); - int a1 = m_stack.top(); m_stack.pop(); - m_stack.push(a1 * a2); - } - - void do_div() - { - int a2 = m_stack.top(); m_stack.pop(); - int a1 = m_stack.top(); m_stack.pop(); - m_stack.push(a1 / a2); - } - - void do_mod() - { - int a2 = m_stack.top(); m_stack.pop(); - int a1 = m_stack.top(); m_stack.pop(); - m_stack.push(a1 % a2); - } - -public: - ExprParser(string::const_iterator begin, string::const_iterator end) : - m_begin(begin), m_end(end), m_iter(begin) - { - m_lookahead = lexan(); - expr(); - } - - operator int() - { - if (m_stack.size() != 1) - throw OtherError(); - - return m_stack.top(); - } -}; - -int parse_expr(string::const_iterator begin, string::const_iterator end) -{ - return ExprParser(begin, end); -} - -size_t find_first_directive(const string &buf, size_t begin=0) -{ - for (;;) - { - if (begin >= buf.size()) - return string::npos; - - size_t firstdirpos = buf.find('@', begin); - if (firstdirpos == string::npos) - return firstdirpos; - - if (buf.size() > firstdirpos+1) - { - if (buf[firstdirpos+1] == '[' || buf[firstdirpos+1] == '(') - return firstdirpos; - } - begin = firstdirpos+1; - } -} - -// buf begins with a section. Find its end! -size_t find_section_end(const string &buf) -{ - int starttype = buf[1]; - int endtype = (buf[1] == '(') ? ')' : ']'; - - int nestlevel = 0; - - if (starttype == '(') - { - for (string::const_iterator iter = buf.begin(); iter != buf.end(); ++iter) - { - if (*iter == starttype) - ++nestlevel; - if (*iter == endtype) - { - if (--nestlevel == 0) - return iter - buf.begin() + 1; - } - } - return string::npos; - } - else if (starttype == '[') - { - int lastchar = 0; - for (string::const_iterator iter = buf.begin(); iter != buf.end(); ++iter) - { - if (lastchar == '@' && *iter == starttype) - ++nestlevel; - if (lastchar == '@' && *iter == endtype) - { - if (--nestlevel == 0) - return iter - buf.begin() + 1; - } - lastchar = *iter; - } - return string::npos; - } - - return string::npos; -} - -// replaces variables and additional arguments -void replace_vars(string &buf, int argc, int *argv, const varmap &vars) -{ - char varname[] = "$ "; - char value[32]; - - for (int i = 0; i < argc; ++i) - { - varname[1] = 'a' + i; - sprintf(value, "%d", argv[i]); - DoReplace(buf, varname, value); - } - - for (varmap::const_iterator iter = vars.begin(); iter != vars.end(); ++iter) - { - varname[1] = '0' + iter->first; - sprintf(value, "%d", iter->second); - DoReplace(buf, varname, value); - } -} - -// do_input -// params: -// argc: number of additional arguments -// argv: additional arguments -// outfile: output file -// buf: string to be processed. IMPORTANT: buf is modified! -// curvars: variables buffer. -// retval: -// 0 on success, non-zero on error - -int do_input(int argc, int *argv, ofstream &outfile, string &buf, varmap &curvars) -{ - for (;;) - { - // Find the next directive. - size_t firstdirpos = find_first_directive(buf); - - // Output everything that came before, and remove it from buf - outfile << buf.substr(0, firstdirpos); - if (firstdirpos == string::npos) - return 0; - buf = buf.substr(firstdirpos); - - // Now find the matching end. - size_t sectionend = find_section_end(buf); - if (sectionend == string::npos) - { - cout << "ERROR: Section not closed!" << endl; - return 1; - } - - // Place the section in its own buffer and remove it from the input string. - string sect(buf.begin(), buf.begin() + sectionend); - buf = buf.substr(sectionend); - - // CASE1: Arithmetic expression - if (sect[1] == '(') - { - replace_vars(sect, argc, argv, curvars); - outfile << parse_expr(sect.begin()+1, sect.end()); - } - else if (sect[1] == '[') - { - int is_iter = 0; // 0 -> no; 1 -> maybe (only used in check); 2 -> yes - char lastchar = 0; - // This could be an iteration OR a conditional thing. - // Pretty braindead check: iterations begin with a variable, then a comma. - for (string::iterator iter = sect.begin() + 2; iter != sect.end(); ++iter) - { - if (*iter == ' ' || *iter == '\t') - ; - else if (is_iter == 0 && lastchar == '$' && isdigit(*iter)) - is_iter = 1; - else if (is_iter == 1 && *iter == ',') - { - is_iter = 2; - break; - } - else if (*iter == '$') - ; - else - break; - lastchar = *iter; - } - if (is_iter == 2) - { - // CASE2: iteration - // Looks like: @[var,min,max:code|sep@] - // Replace known variables / additional arguments - replace_vars(sect, argc, argv, curvars); - - // get the parts! - string varname; - int varnum; - int expr_min; - int expr_max; - - // varname - size_t comma = sect.find(','); - if (comma == string::npos) - { - cout << "Invalid iteration syntax" << endl; - return 1; - } - varname.assign(sect.begin() + 2, sect.begin() + comma); - trim_string(varname); - if (varname.size() != 2 || varname[0] != '$' || !isdigit(varname[1])) - { - cout << "Invalid variable name" << endl; - return 1; - } - varnum = varname[1] - '0'; - - // min - ++comma; - size_t nextcomma = sect.find(',', comma); - if (nextcomma == string::npos) - { - cout << "Invalid iteration syntax" << endl; - return 1; - } - expr_min = parse_expr(sect.begin() + comma, sect.begin() + nextcomma); - - // max - comma = nextcomma + 1; - nextcomma = sect.find(':', comma); - if (nextcomma == string::npos) - { - cout << "Invalid iteration syntax" << endl; - return 1; - } - - expr_max = parse_expr(sect.begin() + comma, sect.begin() + nextcomma); - - // separator - size_t sepbegin = sect.find('|'); - size_t sepend = string::npos; - if (sepbegin != string::npos && sepbegin < nextcomma) - { - // There's a separator! - ++sepbegin; - sepend = nextcomma; - } - else - sepbegin = string::npos; - - - ++nextcomma; // nextcomma is now where code begins! - - size_t codeend = sect.size() - 2; - - // Check whether the var is already taken - if (curvars.find(varnum) != curvars.end()) - { - cout << "Variable $" << varnum << "already taken!" << endl; - return 1; - } - - // Do iterations!! - for (int i = expr_min; i <= expr_max; ++i) - { - curvars[varnum] = i; - - string code(sect.begin() + nextcomma, sect.begin() + codeend); - replace_vars(code, argc, argv, curvars); - - // Feed it through the input routine (RECURSE!!!!!! YEAH!) - do_input(argc, argv, outfile, code, curvars); - - // Add separator if required - if (sepbegin != string::npos && i != expr_max) - { - string tmp(sect.begin() + sepbegin, sect.begin() + sepend); - do_input(argc, argv, outfile, tmp, curvars); - } - } - // Remove the var! - curvars.erase(varnum); - } - else - { - // CASE3: conditional thing. - // Looks like: @[expr1 operator expr2:code@] - - // Find the operator position - - enum OP_TYPE - { - OP_EQ, - OP_NEQ - }; - - OP_TYPE op; - size_t oppos = sect.find("=="); - if (oppos != string::npos) - op = OP_EQ; - else - { - oppos = sect.find("!="); - if (oppos != string::npos) - op = OP_NEQ; - else - { - cout << "Conditional expression without operator!?" << endl; - return 1; - } - } - size_t colon = sect.find(':'); - - // Now we've got everything. Parse first expr: - int expr1 = parse_expr(sect.begin() + 2, sect.begin() + oppos); - int expr2 = parse_expr(sect.begin() + oppos + 2, sect.begin() + colon); - if ((op == OP_EQ && expr1 == expr2) || - (op == OP_NEQ && expr1 != expr2)) - { - // Condition is true, process it! - // The text may still contain arithmetic exprs or other cond. exprs - // so send it through do_input - string tmp(sect.substr(colon+1, sect.size() - colon - 3)); - do_input(argc, argv, outfile, tmp, curvars); - } - } - } - else - { - cout << "WTF" << endl; - return 1; - } - } - - return 0; -} - - - -// action_iter -// params: -// filenamein: input file name -// filenameout: output file name -// argc: number of additional arguments -// argv: additional arguments -// retval: 0 on success, non-zero on error - -// Convert additional arguments -// Read whole input file to memory and open output file -// Pass to do_input() -int action_iter(const char *filenamein, const char *filenameout, int argc, const char *argv[]) -{ - // Convert additional arguments - const int MAX_ARGC = 10; - int converted_argv[MAX_ARGC]; - - int i; - for (i = 0; i < argc && i < MAX_ARGC; ++i) - converted_argv[i] = atoi(argv[i]); - - if (argc != i) - cout << "WARNING: Not all additional arguments processed!" << endl; - - - // Read whole input file to memory and open output file - ifstream fin(filenamein); - ofstream fout(filenameout); - - if (!fin) - { - cout << "Could not open file \"" << filenamein << "\"." << endl; - return 1; - } - if (!fout) - { - cout << "Could not open file \"" << filenameout << "\"." << endl; - return 1; - } - string input_str( - istreambuf_iterator (fin.rdbuf()), - istreambuf_iterator ()); - - - // Begin processing input - varmap vars; - try - { - return do_input(argc, converted_argv, fout, input_str, vars); - } - catch (MyError err) - { - err.Print(); - return 1; - } -} - -// MAIN -// Prints usage if required -// Calls action_hopter OR action_iter -int main(int argc, const char **argv) -{ - if (argc < 4) - { - cout << "Usage:" << endl << " shworker [iter/hopter] ..." << endl; - cout << " shworker iter filename.in filename.out [param1, param2, ...]" << endl; - cout << " shworker hopter filename.in filename.out [num-of-args]" << endl; - return 1; - } - - const char *action = argv[1]; - - if (stricmp(action, "hopter") == 0) - { - const char *filenamein = argv[2]; - const char *filenameout = argv[3]; - int argsnum = atoi(argv[4]); - - return action_hopter(argsnum, filenamein, filenameout); - } - else if (stricmp(action, "iter") == 0) - { - const char *filenamein = argv[2]; - const char *filenameout = argv[3]; - int additional_argc = argc - 4; - const char ** additional_argv = argv + 4; - return action_iter(filenamein, filenameout, additional_argc, additional_argv); - } - else - { - cout << "Unrecognized action: " << argv[1] << endl; - return 1; - } -} diff --git a/metamod-source/core/sourcehook/generate/sourcehook.hxx b/metamod-source/core/sourcehook/generate/sourcehook.hxx deleted file mode 100644 index 29db9fc8..00000000 --- a/metamod-source/core/sourcehook/generate/sourcehook.hxx +++ /dev/null @@ -1,1571 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -/** -* @file sourcehook.h -* @brief Contains the public SourceHook API -*/ - -#ifndef __SOURCEHOOK_H__ -#define __SOURCEHOOK_H__ - -// Interface revisions: -// 1 - Initial revision -// 2 - Changed to virtual functions for iterators and all queries -// 3 - Added "hook loop status variable" -// 4 - Reentrant -// 5 - New "V2" interface -#define SH_IFACE_VERSION 5 - -// Impl versions: -// ??? -// 4 - addition of hook ids and vp hooks (with them, AddHookNew and RemoveHookNew) -// This is not a SH_IFACE_VERSION change so that old plugins continue working! -// 5 - implementation of the new "V2" interface -#define SH_IMPL_VERSION 5 - -// Hookman version: -// 1 - standard -#define SH_HOOKMAN_VERSION 1 - -// Hookmanautogen versions -// 1 - initial -#define SH_HOOKMANAUTOGEN_IFACE_VERSION 1 -#define SH_HOOKMANAUTOGEN_IMPL_VERSION 1 - -// The value of SH_GLOB_SHPTR has to be a pointer to SourceHook::ISourceHook -// It's used in various macros -#ifndef SH_GLOB_SHPTR -#define SH_GLOB_SHPTR g_SHPtr -#endif - -// Used to identify the current plugin -#ifndef SH_GLOB_PLUGPTR -#define SH_GLOB_PLUGPTR g_PLID -#endif - -#ifdef SH_DEBUG -# include -# include - -# define SH_ASSERT(x, info) \ - do { \ - if (!(x)) \ - { \ - printf("SOURCEHOOK DEBUG ASSERTION FAILED: %s:%u(%s): %s: ", __FILE__, __LINE__, __FUNCTION__, #x); \ - printf info; \ - putchar('\n'); \ - abort(); \ - } \ - } while(0) - -#else -# define SH_ASSERT(x, info) -#endif - -// System -#define SH_SYS_WIN32 1 -#define SH_SYS_LINUX 2 -#define SH_SYS_APPLE 3 - -// Platform -#define SH_XP_POSIX 10 -#define SH_XP_WINAPI 20 - -#ifdef _WIN32 -# define SH_SYS SH_SYS_WIN32 -# define SH_XP SH_XP_WINAPI -#elif defined __linux__ -# define SH_SYS SH_SYS_LINUX -# define SH_XP SH_XP_POSIX -#elif defined __APPLE__ -# define SH_SYS SH_SYS_APPLE -# define SH_XP SH_XP_POSIX -#else -# error Unsupported system -#endif - -// Compiler -#define SH_COMP_GCC 1 -#define SH_COMP_MSVC 2 - -#ifdef _MSC_VER -# define SH_COMP SH_COMP_MSVC -#elif defined __GNUC__ -# define SH_COMP SH_COMP_GCC -#else -# error Unsupported compiler -#endif - -#if SH_COMP==SH_COMP_MSVC && _MSC_VER < 1500 -# define vsnprintf _vsnprintf -#endif - -#if SH_SYS != SH_SYS_WIN32 -# include -#endif - -#define SH_PTRSIZE sizeof(void*) - -#include "sh_memfuncinfo.h" -#include "FastDelegate.h" - -// Good old metamod! - -// Flags returned by a plugin's api function. -// NOTE: order is crucial, as greater/less comparisons are made. -enum META_RES -{ - MRES_IGNORED=0, // plugin didn't take any action - MRES_HANDLED, // plugin did something, but real function should still be called - MRES_OVERRIDE, // call real function, but use my return value - MRES_SUPERCEDE // skip real function; use my return value -}; - - -namespace SourceHook -{ - /** - * @brief Specifies the size (in bytes) for the internal buffer of vafmt(printf-like) function handlers - */ - const int STRBUF_LEN=4096; - - /** - * @brief An empty class. No inheritance used. Used for original-function-call hacks - */ - class EmptyClass - { - }; - - /** - * @brief Implicit cast. - */ - template - inline Out implicit_cast(In input) - { - return input; - } - - /** - * @brief A plugin typedef - * - * SourceHook doesn't really care what this is. As long as the ==, != and = operators work on it and every - * plugin has a unique identifier, everything is ok. - * It should also be possible to set it to 0. - */ - typedef int Plugin; - - - template class CallClass : public T - { - }; - typedef void ManualCallClass; - - /** - * @brief Describes the way a parameter/retval is passed. - */ - struct PassInfo - { - enum PassType - { - PassType_Unknown=0, /**< Unknown -- no extra info available */ - PassType_Basic, /**< Plain old register data (pointers, integers) */ - PassType_Float, /**< Floating point data */ - PassType_Object, /**< Object or structure */ - }; - - enum PassFlags - { - PassFlag_ByVal = (1<<0), /**< Passing by value */ - PassFlag_ByRef = (1<<1), /**< Passing by reference */ - PassFlag_ODtor = (1<<2), /**< Object has a destructor */ - PassFlag_OCtor = (1<<3), /**< Object has a normal non-trivial constructor */ - PassFlag_AssignOp = (1<<4), /**< Object has a non-trivial assignment operator */ - PassFlag_CCtor = (1<<5), /**< Object has a copy constructor (which takes const Object& as only parameter) */ - - // The following two flags are only relevant for byval return types. - // SH tries to auto-detect these - // If you want to override SH's auto-detection, pass them in yourself - PassFlag_RetMem = (1<<6), /**< Object is returned in memory (through hidden first param */ - PassFlag_RetReg = (1<<7) /**< Object is returned in EAX(:EDX) */ - }; - - size_t size; //!< Size of the data being passed - - // Extra info: - // (might be used in future versions for automatic hookfunc generation) - int type; //!< PassType value - unsigned int flags; //!< Pass/return flags - - struct V2Info - { - void *pNormalCtor; - void *pCopyCtor; - void *pDtor; - void *pAssignOperator; - }; - }; - - struct ProtoInfo - { - enum CallConvention - { - CallConv_Unknown, /**< Unknown -- no extra info available (0)*/ - CallConv_ThisCall, /**< This call (object pointer required) (1)*/ - CallConv_Cdecl, /**< C call (2)*/ - CallConv_StdCall, /**< Windows "stdcall" (3)*/ - - CallConv_HasVarArgs = (1<<16), /**< Has variable arguments */ - CallConv_HasVafmt = CallConv_HasVarArgs | (1<<17) /**< last params: const char*, ... */ - }; - - int numOfParams; //!< number of parameters - PassInfo retPassInfo; //!< PassInfo for the return value. size=0 -> no retval - const PassInfo *paramsPassInfo; //!< PassInfos for the parameters - - // paramsPassInfo[0] is basically a dummy parameter. - // However, paramsPassInfo[0].size stores the version of the ProtoInfo structure. - - // Extra info: - int convention; - - // Version2: - PassInfo::V2Info retPassInfo2; - const PassInfo::V2Info *paramsPassInfo2; - }; - - struct IHookManagerInfo; - - /** - * @brief Pointer to hook manager interface function - * - * The hook manager should store hi for later use if store==true. It should then call hi->SetInfo(...) if hi - * is non-null. The hook manager can return 0 for success or a non-zero value if it doesn't want to be used. - * - * @param hi A pointer to IHookManagerInfo - */ - typedef int (*HookManagerPubFunc)(bool store, IHookManagerInfo *hi); - - class ISHDelegate - { - public: - virtual bool IsEqual(ISHDelegate *pOtherDeleg) = 0; // pOtherDeleg is from the same plugin and hookman - virtual void DeleteThis() = 0; - }; - - struct IHookManagerInfo - { - virtual void SetInfo(int hookman_version, int vtbloffs, int vtblidx, - ProtoInfo *proto, void *hookfunc_vfnptr) = 0; - }; - - // I'm adding support for functions which return references. - - // How it works: - // SH_SETUPCALLS doesn't use plain rettype to store the temporary return values (plugin ret, orig ret, - // override ret) anymore; instead, it uses SourceHook::ReferenceCarrier::type - // this is typedefed to the original rettype normally, but if the rettype is a reference, it's a special class - // which stores the reference as a pointer, and implements constructors, operator= and a conversion operator. - // special cases were needed for getoverrideret / getorigret; these are implemented through the - // SourceHook::MacroRefHelpers structs. - // Furthermore, SetOverrideRet had to be changed a bit; see SourceHook::OverrideFunctor somewhere down in this file. - template struct ReferenceCarrier - { - typedef T type; - }; - - template struct ReferenceCarrier - { - class type - { - T *m_StoredRef; - public: - type() : m_StoredRef(NULL) - { - } - type(T& ref) : m_StoredRef(&ref) - { - } - - T& operator= (T& ref) - { - m_StoredRef = &ref; - return ref; - } - - operator T& () const - { - return *m_StoredRef; - } - }; - }; - - template struct ReferenceUtil - { - typedef T plain_type; - typedef T* pointer_type; - typedef T& reference_type; - }; - - template struct ReferenceUtil - { - typedef T plain_type; - typedef T* pointer_type; - typedef T& reference_type; - }; - - struct IHookContext - { - virtual ISHDelegate *GetNext() = 0; - virtual void *GetOverrideRetPtr() = 0; - virtual const void *GetOrigRetPtr() = 0; - virtual bool ShouldCallOrig() = 0; - }; - - /** - * @brief The main SourceHook interface - */ - class ISourceHook - { - public: - /** - * @brief Return interface version - */ - virtual int GetIfaceVersion() = 0; - - /** - * @brief Return implementation version - */ - virtual int GetImplVersion() = 0; - - /** - * @brief Modes for the new AddHook - */ - enum AddHookMode - { - Hook_Normal, - Hook_VP, - Hook_DVP - }; - - /** - * @brief Add a (VP) hook. - * - * @return non-zero hook id on success, 0 otherwise - * - * @param plug The unique identifier of the plugin that calls this function - * @param mode Can be either Hook_Normal or Hook_VP (vtable-wide hook) - * @param iface The interface pointer - * @param ifacesize The size of the class iface points to - * @param myHookMan A hook manager function that should be capable of handling the function - * @param handler A pointer to the hook handler something - * @param post Set to true if you want a post handler - */ - virtual int AddHook(Plugin plug, AddHookMode mode, void *iface, int thisptr_offs, HookManagerPubFunc myHookMan, - ISHDelegate *handler, bool post) = 0; - - // Source backwarts compat (only for normal hooks) - virtual bool RemoveHook(Plugin plug, void *iface, int thisptr_offs, HookManagerPubFunc myHookMan, - ISHDelegate *handler, bool post) = 0; - - /** - * @brief Remove a hook by ID. - * - * @return true on success, false otherwise - * - * @param hookid The hook id (returned by AddHook) - */ - virtual bool RemoveHookByID(int hookid) = 0; - - /** - * @brief Pause a hook by ID. - * - * @return true on success, false otherwise - * - * @param hookid The hook id (returned by AddHook) - */ - virtual bool PauseHookByID(int hookid) = 0; - - /** - * @brief Unpause a hook by ID. - * - * @return true on success, false otherwise - * - * @param hookid The hook id (returned by AddHook) - */ - virtual bool UnpauseHookByID(int hookid) = 0; - - /** - * @brief Checks whether a plugin has (a) hook manager(s) that is/are currently used by other plugins - * - * @param plug The unique identifier of the plugin in question - */ - - virtual void SetRes(META_RES res) = 0; //!< Sets the meta result - virtual META_RES GetPrevRes() = 0; //!< Gets the meta result of the - //!< previously calledhandler - virtual META_RES GetStatus() = 0; //!< Gets the highest meta result - virtual const void *GetOrigRet() = 0; //!< Gets the original result. - //!< If not in post function, undefined - virtual const void *GetOverrideRet() = 0; //!< Gets the override result. - //!< If none is specified, NULL - virtual void *GetIfacePtr() = 0; //!< Gets the interface pointer - - virtual void *GetOverrideRetPtr() = 0; //!< Used for setting the override return value - - /** - * @brief Remove a hook manager. Auto-removes all hooks attached to it from plugin plug. - * - * @param plug The owner of the hook manager - * @param pubFunc The hook manager's info function - */ - virtual void RemoveHookManager(Plugin plug, HookManagerPubFunc pubFunc) = 0; - - // For SH_CALL: - - /** - * @brief Makes sure that hooks are going to be ignored on the next call of vfnptr - * - * @param plug The unique identifier of the plugin that calls this function - * @param vfnptr The virtual function pointer of the function in question - */ - virtual void SetIgnoreHooks(void *vfnptr) = 0; - - /** - * @brief Reverses SetIgnoreHooks' effect - * - * @param plug The unique identifier of the plugin that calls this function - * @param vfnptr The virtual function pointer of the function in question - */ - virtual void ResetIgnoreHooks(void *vfnptr) = 0; - - /** - * @brief Finds the original entry of a virtual function pointer - * - * @param vfnptr The virtual function pointer - * @return The original entry if the virtual function pointer has been patched; NULL otherwise. - */ - virtual void *GetOrigVfnPtrEntry(void *vfnptr) = 0; - - ////////////////////////////////////////////////////////////////////////// - - // For hook managers - - // Returns the current iface ptr - virtual void DoRecall() = 0; //!< Initiates a recall sequence - - /* - HOW RECALLS WORK: - - The problem: - Users want the ability to change parameters of the called function - from inside their handler. - The solution: - 1) Mark as "recall" - 2) Recall the function - 3) => SH's hook func gets called: - 4) The first iterator points at the first hook the last hookfunc didn't execute yet - 5) does all iteration and returns normally - 6) The user's handler returns immediately - 7) The hook func returns immediately as well - - Also note that the recalled hookfunc starts with the status the recalling hookfunc - ended with. The last handler (doing the recall) is also able to specify its own - META_RES. - */ - - /** - * @brief Set up the hook loop. - * - * @param statusPtr pointer to status variable - * @param prevResPtr pointer to previous result variable - * @param curResPtr pointer to current result variable - * @param ifacePtrPtr pointer to interface this pointer variable - * @param origRetPr pointer to original return value variable. NULL for void funcs - * @param overrideRetPtr pointer to override return value variable. NULL for void funcs - * - * @return Override Return Pointer the hookfunc should use (may differ from overrideRetPtr - * when the hook func is being called as part of a recall - */ - virtual IHookContext *SetupHookLoop(IHookManagerInfo *hi, void *vfnptr, void *thisptr, void **origCallAddr, - META_RES *statusPtr, META_RES *prevResPtr, META_RES *curResPtr, - const void *origRetPtr, void *overrideRetPtr) = 0; - - virtual void EndContext(IHookContext *pCtx) = 0; - }; - - - class IHookManagerAutoGen - { - public: - virtual int GetIfaceVersion() = 0; - virtual int GetImplVersion() = 0; - - virtual HookManagerPubFunc MakeHookMan(const ProtoInfo *proto, int vtbl_offs, int vtbl_idx) = 0; - virtual void ReleaseHookMan(HookManagerPubFunc pubFunc) = 0; - }; - - // For META_RESULT_ORIG_RET and META_RESULT_OVERRIDE_RET: - // These have to be able to return references. If T is a reference, the pointers returned - // from the SH_GLOB_SHPTR are pointers to instances of ReferenceCarrier::type. - template struct MacroRefHelpers - { - inline static const T* GetOrigRet(ISourceHook *shptr) - { - return reinterpret_cast(shptr->GetOrigRet()); - } - inline static const T* GetOverrideRet(ISourceHook *shptr) - { - return reinterpret_cast(shptr->GetOverrideRet()); - } - }; - - template struct MacroRefHelpers - { - inline static T* GetOrigRet(ISourceHook *shptr) - { - T &ref = *reinterpret_cast::type *>(shptr->GetOrigRet()); - return &ref; - } - inline static T* GetOverrideRet(ISourceHook *shptr) - { - T &ref = *reinterpret_cast::type *>(shptr->GetOverrideRet()); - return &ref; - } - }; - - template - void *GetOrigVfnPtrEntry(X *pInstance, MFP mfp, ISourceHook *pSH) - { - SourceHook::MemFuncInfo info = {true, -1, 0, 0}; - SourceHook::GetFuncInfo(pInstance, mfp, info); - - void *vfnptr = reinterpret_cast( - *reinterpret_cast(reinterpret_cast(pInstance) + info.thisptroffs + info.vtbloffs) + info.vtblindex); - - void *origentry = pSH->GetOrigVfnPtrEntry(vfnptr); - - return origentry ? origentry : *reinterpret_cast(vfnptr); - } - - template struct GetPassInfo - { - static const int type = 0; - static const unsigned int flags = PassInfo::PassFlag_ByVal; - }; - - template struct GetPassInfo - { - static const int type = 0; - static const unsigned int flags = PassInfo::PassFlag_ByRef; - }; -} - -/************************************************************************/ -/* High level interface */ -/************************************************************************/ -#define META_RESULT_STATUS SH_GLOB_SHPTR->GetStatus() -#define META_RESULT_PREVIOUS SH_GLOB_SHPTR->GetPrevRes() -#define META_RESULT_ORIG_RET(type) *SourceHook::MacroRefHelpers::GetOrigRet(SH_GLOB_SHPTR) -#define META_RESULT_OVERRIDE_RET(type) *SourceHook::MacroRefHelpers::GetOverrideRet(SH_GLOB_SHPTR) -#define META_IFACEPTR(type) reinterpret_cast(SH_GLOB_SHPTR->GetIfacePtr()) - -#define SET_META_RESULT(result) SH_GLOB_SHPTR->SetRes(result) -#define RETURN_META(result) do { SET_META_RESULT(result); return; } while(0) -#define RETURN_META_VALUE(result, value) do { SET_META_RESULT(result); return (value); } while(0) - - -template -SourceHook::CallClass *SH_GET_CALLCLASS(T *p) -{ - return static_cast< SourceHook::CallClass *>(p); -} -#define SH_RELEASE_CALLCLASS(p) - -#define SH_GET_MCALLCLASS(p, size) reinterpret_cast(p) - -// only call these from the hook handlers directly! - -#define MAKE_NOREF_VALUE(rettype) \ - *reinterpret_cast< ::SourceHook::ReferenceUtil::pointer_type >(0) - -// If a hook on a function which returns a reference does not want to specify a return value, -// it can use this macro. -// ONLY USE THIS WITH MRES_IGNORED AND MRES_HANDLED !!! -#define RETURN_META_NOREF(result, rettype) \ - RETURN_META_VALUE(result, MAKE_NOREF_VALUE(rettype)) - -// Why take a memfuncptr instead of iface and func when we have to deduce the iface anyway now? -// Well, without it, there'd be no way to specify which overloaded version we want in _VALUE - -// SourceHook::SetOverrideRet is defined later. -#define RETURN_META_NEWPARAMS(result, memfuncptr, newparams) \ - do { \ - SET_META_RESULT(result); \ - SH_GLOB_SHPTR->DoRecall(); \ - (SourceHook::RecallGetIface(SH_GLOB_SHPTR, memfuncptr)->*(memfuncptr)) newparams; \ - RETURN_META(MRES_SUPERCEDE); \ - } while (0) - -#define RETURN_META_VALUE_NEWPARAMS(result, value, memfuncptr, newparams) \ - do { \ - SET_META_RESULT(result); \ - SH_GLOB_SHPTR->DoRecall(); \ - if ((result) >= MRES_OVERRIDE) \ - { \ - /* meh, set the override result here because we don't get a chance to return */ \ - /* before continuing the hook loop through the recall */ \ - SourceHook::SetOverrideResult(memfuncptr)(SH_GLOB_SHPTR, value); \ - } \ - RETURN_META_VALUE(MRES_SUPERCEDE, \ - (SourceHook::RecallGetIface(SH_GLOB_SHPTR, memfuncptr)->*(memfuncptr)) newparams); \ - } while (0) - -// :TODO: thisptroffs in MNEWPARAMS ?? - -#if SH_COMP == SH_COMP_MSVC - -#define SOUREHOOK__MNEWPARAMS_PREPAREMFP(hookname) \ - union \ - { \ - SH_MFHCls(hookname)::ECMFP mfp; \ - void *addr; \ - } u; \ - u.addr = (*reinterpret_cast(reinterpret_cast(thisptr) + SH_MFHCls(hookname)::ms_MFI.vtbloffs))[ \ - SH_MFHCls(hookname)::ms_MFI.vtblindex]; - -#elif SH_COMP == SH_COMP_GCC - -#define SOUREHOOK__MNEWPARAMS_PREPAREMFP(hookname) \ - union \ - { \ - SH_MFHCls(hookname)::ECMFP mfp; \ - struct \ - { \ - void *addr; \ - intptr_t adjustor; \ - } s; \ - } u; \ - u.s.addr = (*reinterpret_cast(reinterpret_cast(thisptr) + SH_MFHCls(hookname)::ms_MFI.vtbloffs))[ \ - SH_MFHCls(hookname)::ms_MFI.vtblindex]; \ - u.s.adjustor = 0; - -#endif - -#define RETURN_META_MNEWPARAMS(result, hookname, newparams) \ - do { \ - SET_META_RESULT(result); \ - SH_GLOB_SHPTR->DoRecall(); \ - SourceHook::EmptyClass *thisptr = reinterpret_cast(SH_GLOB_SHPTR->GetIfacePtr()); \ - (thisptr->*(__SoureceHook_FHM_GetRecallMFP##hookname(thisptr))) newparams; \ - RETURN_META(MRES_SUPERCEDE); \ - } while (0) - -#define RETURN_META_VALUE_MNEWPARAMS(result, value, hookname, newparams) \ - do { \ - SET_META_RESULT(result); \ - SH_GLOB_SHPTR->DoRecall(); \ - if ((result) >= MRES_OVERRIDE) \ - { \ - /* see RETURN_META_VALUE_NEWPARAMS */ \ - __SoureceHook_FHM_SetOverrideResult##hookname(SH_GLOB_SHPTR, value); \ - } \ - SourceHook::EmptyClass *thisptr = reinterpret_cast(SH_GLOB_SHPTR->GetIfacePtr()); \ - RETURN_META_VALUE(MRES_SUPERCEDE, (thisptr->*(__SoureceHook_FHM_GetRecallMFP##hookname(thisptr))) newparams); \ - } while (0) - - -#define SH_MANUALHOOK_RECONFIGURE(hookname, pvtblindex, pvtbloffs, pthisptroffs) \ - __SourceHook_FHM_Reconfigure##hookname(pvtblindex, pvtbloffs, pthisptroffs) - -#define SH_GET_ORIG_VFNPTR_ENTRY(inst, mfp) (SourceHook::GetOrigVfnPtrEntry(inst, mfp, SH_GLOB_SHPTR)) - -// New ADD / REMOVE macros. -#define SH_STATIC(func) fastdelegate::MakeDelegate(func) -#define SH_MEMBER(inst, func) fastdelegate::MakeDelegate(inst, func) - -#define SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ - __SourceHook_FHAdd##ifacetype##ifacefunc((void*)SourceHook::implicit_cast(ifaceptr), \ - SourceHook::ISourceHook::Hook_Normal, post, handler) - -#define SH_REMOVE_HOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ - __SourceHook_FHRemove##ifacetype##ifacefunc((void*)SourceHook::implicit_cast(ifaceptr), \ - post, handler) - -#define SH_ADD_MANUALHOOK(hookname, ifaceptr, handler, post) \ - __SourceHook_FHMAdd##hookname(reinterpret_cast(ifaceptr), \ - SourceHook::ISourceHook::Hook_Normal, post, handler) - -#define SH_REMOVE_MANUALHOOK(hookname, ifaceptr, handler, post) \ - __SourceHook_FHMRemove##hookname(reinterpret_cast(ifaceptr), post, handler) - -#define SH_ADD_VPHOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ - __SourceHook_FHAdd##ifacetype##ifacefunc((void*)SourceHook::implicit_cast(ifaceptr), \ - SourceHook::ISourceHook::Hook_VP, post, handler) - -#define SH_ADD_DVPHOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ - __SourceHook_FHAdd##ifacetype##ifacefunc((void*)SourceHook::implicit_cast(ifaceptr), \ - SourceHook::ISourceHook::Hook_DVP, post, handler) - -#define SH_ADD_MANUALVPHOOK(hookname, ifaceptr, handler, post) \ - __SourceHook_FHMAdd##hookname(reinterpret_cast(ifaceptr), SourceHook::ISourceHook::Hook_VP, post, handler) - -#define SH_ADD_MANUALDVPHOOK(hookname, ifaceptr, handler, post) \ - __SourceHook_FHMAdd##hookname(reinterpret_cast(ifaceptr), SourceHook::ISourceHook::Hook_DVP, post, handler) - -#define SH_REMOVE_HOOK_ID(hookid) \ - (SH_GLOB_SHPTR->RemoveHookByID(hookid)) - -// Old macros -// !! These are now deprecated. Instead, use one of these: -// SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, SH_STATIC(handler), post) -// SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, SH_MEMBER(inst, func), post) - -#define SH_ADD_HOOK_STATICFUNC(ifacetype, ifacefunc, ifaceptr, handler, post) \ - SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, SH_STATIC(handler), post) -#define SH_ADD_HOOK_MEMFUNC(ifacetype, ifacefunc, ifaceptr, handler_inst, handler_func, post) \ - SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, SH_MEMBER(handler_inst, handler_func), post) - -// SH_REMOVE_HOOK(ifacetype, ifacefunc, ifaceptr, SH_STATIC(handler), post) -// SH_REMOVE_HOOK(ifacetype, ifacefunc, ifaceptr, SH_MEMBER(inst, func), post) - -#define SH_REMOVE_HOOK_STATICFUNC(ifacetype, ifacefunc, ifaceptr, handler, post) \ - SH_REMOVE_HOOK(ifacetype, ifacefunc, ifaceptr, SH_STATIC(handler), post) -#define SH_REMOVE_HOOK_MEMFUNC(ifacetype, ifacefunc, ifaceptr, handler_inst, handler_func, post) \ - SH_REMOVE_HOOK(ifacetype, ifacefunc, ifaceptr, SH_MEMBER(handler_inst, handler_func), post) - -// SH_ADD_MANUALHOOK(hookname, ifaceptr, SH_STATIC(handler), post) -// SH_ADD_MANUALHOOK(hookname, ifaceptr, SH_MEMBER(inst, func), post) - -#define SH_ADD_MANUALHOOK_STATICFUNC(hookname, ifaceptr, handler, post) \ - SH_ADD_MANUALHOOK(hookname, ifaceptr, SH_STATIC(handler), post) -#define SH_ADD_MANUALHOOK_MEMFUNC(hookname, ifaceptr, handler_inst, handler_func, post) \ - SH_ADD_MANUALHOOK(hookname, ifaceptr, SH_MEMBER(handler_inst, handler_func), post) - -// SH_REMOVE_MANUALHOOK(hookname, ifaceptr, SH_STATIC(handler), post) -// SH_REMOVE_MANUALHOOK(hookname, ifaceptr, SH_MEMBER(inst, func), post) - -#define SH_REMOVE_MANUALHOOK_STATICFUNC(hookname, ifaceptr, handler, post) \ - SH_REMOVE_MANUALHOOK(hookname, ifaceptr, SH_STATIC(handler), post) -#define SH_REMOVE_MANUALHOOK_MEMFUNC(hookname, ifaceptr, handler_inst, handler_func, post) \ - SH_REMOVE_MANUALHOOK(hookname, ifaceptr, SH_MEMBER(handler_inst, handler_func), post) - -#define SH_NOATTRIB - - - - -#if SH_COMP == SH_COMP_MSVC -# define SH_SETUP_MFP(mfp) \ - reinterpret_cast(&mfp)[0] = vfnptr_origentry; -#elif SH_COMP == SH_COMP_GCC -# define SH_SETUP_MFP(mfp) \ - reinterpret_cast(&mfp)[0] = vfnptr_origentry; \ - reinterpret_cast(&mfp)[1] = 0; -#else -# error Not supported yet. -#endif - -////////////////////////////////////////////////////////////////////////// -#define SH_FHCls(ift, iff, ov) __SourceHook_FHCls_##ift##iff##ov -#define SH_MFHCls(hookname) __SourceHook_MFHCls_##hookname - -#define SHINT_MAKE_HOOKMANPUBFUNC(ifacetype, ifacefunc, overload, funcptr) \ - static int HookManPubFunc(bool store, ::SourceHook::IHookManagerInfo *hi) \ - { \ - using namespace ::SourceHook; \ - GetFuncInfo(funcptr, ms_MFI); \ - /* Verify interface version */ \ - if (SH_GLOB_SHPTR->GetIfaceVersion() != SH_IFACE_VERSION) \ - return 1; \ - if (SH_GLOB_SHPTR->GetImplVersion() < SH_IMPL_VERSION) \ - return 1; \ - if (store) \ - ms_HI = hi; \ - if (hi) \ - { \ - MemFuncInfo mfi = {true, -1, 0, 0}; \ - GetFuncInfo(&SH_FHCls(ifacetype,ifacefunc,overload)::Func, mfi); \ - hi->SetInfo(SH_HOOKMAN_VERSION, ms_MFI.vtbloffs, ms_MFI.vtblindex, &ms_Proto, \ - reinterpret_cast(reinterpret_cast(&ms_Inst) + mfi.vtbloffs)[mfi.vtblindex] ); \ - } \ - return 0; \ - } - -// It has to be possible to use the macros in namespaces -// -> So we need to access and extend the global SourceHook namespace -// We use a namespace alias for this -#define SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, funcptr) \ - struct SH_FHCls(ifacetype,ifacefunc,overload) \ - { \ - static SH_FHCls(ifacetype,ifacefunc,overload) ms_Inst; \ - static ::SourceHook::MemFuncInfo ms_MFI; \ - static ::SourceHook::IHookManagerInfo *ms_HI; \ - static ::SourceHook::ProtoInfo ms_Proto; \ - SHINT_MAKE_HOOKMANPUBFUNC(ifacetype, ifacefunc, overload, funcptr) - -#define SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, funcptr) \ - }; \ - SH_FHCls(ifacetype,ifacefunc,overload) SH_FHCls(ifacetype,ifacefunc,overload)::ms_Inst; \ - ::SourceHook::MemFuncInfo SH_FHCls(ifacetype,ifacefunc,overload)::ms_MFI; \ - ::SourceHook::IHookManagerInfo *SH_FHCls(ifacetype,ifacefunc,overload)::ms_HI; \ - int __SourceHook_FHAdd##ifacetype##ifacefunc(void *iface, ::SourceHook::ISourceHook::AddHookMode mode, bool post, \ - SH_FHCls(ifacetype,ifacefunc,overload)::FD handler) \ - { \ - using namespace ::SourceHook; \ - MemFuncInfo mfi = {true, -1, 0, 0}; \ - GetFuncInfo(funcptr, mfi); \ - if (mfi.thisptroffs < 0 || !mfi.isVirtual) \ - return false; /* No non-virtual functions / virtual inheritance supported */ \ - \ - return SH_GLOB_SHPTR->AddHook(SH_GLOB_PLUGPTR, mode, \ - iface, mfi.thisptroffs, SH_FHCls(ifacetype,ifacefunc,overload)::HookManPubFunc, \ - new SH_FHCls(ifacetype,ifacefunc,overload)::CMyDelegateImpl(handler), post); \ - } \ - bool __SourceHook_FHRemove##ifacetype##ifacefunc(void *iface, bool post, \ - SH_FHCls(ifacetype,ifacefunc,overload)::FD handler) \ - { \ - using namespace ::SourceHook; \ - MemFuncInfo mfi = {true, -1, 0, 0}; \ - GetFuncInfo(funcptr, mfi); \ - SH_FHCls(ifacetype,ifacefunc,overload)::CMyDelegateImpl tmp(handler); \ - return SH_GLOB_SHPTR->RemoveHook(SH_GLOB_PLUGPTR, iface, mfi.thisptroffs, \ - SH_FHCls(ifacetype,ifacefunc,overload)::HookManPubFunc, &tmp, post); \ - } \ - -#define SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, pvtbloffs, pvtblidx, pthisptroffs) \ - struct SH_MFHCls(hookname) \ - { \ - static SH_MFHCls(hookname) ms_Inst; \ - static ::SourceHook::MemFuncInfo ms_MFI; \ - static ::SourceHook::IHookManagerInfo *ms_HI; \ - static ::SourceHook::ProtoInfo ms_Proto; \ - \ - SH_MFHCls(hookname)() \ - { \ - ms_MFI.isVirtual = true; \ - ms_MFI.thisptroffs = pthisptroffs; \ - ms_MFI.vtblindex = pvtblidx; \ - ms_MFI.vtbloffs = pvtbloffs; \ - } \ - static int HookManPubFunc(bool store, ::SourceHook::IHookManagerInfo *hi) \ - { \ - using namespace ::SourceHook; \ - /* Verify interface version */ \ - if (SH_GLOB_SHPTR->GetIfaceVersion() != SH_IFACE_VERSION) \ - return 1; \ - if (SH_GLOB_SHPTR->GetImplVersion() < SH_IMPL_VERSION) \ - return 1; \ - if (store) \ - ms_HI = hi; \ - if (hi) \ - { \ - MemFuncInfo mfi = {true, -1, 0, 0}; \ - GetFuncInfo(&SH_MFHCls(hookname)::Func, mfi); \ - hi->SetInfo(SH_HOOKMAN_VERSION, ms_MFI.vtbloffs, ms_MFI.vtblindex, &ms_Proto, \ - reinterpret_cast(reinterpret_cast(&ms_Inst) + mfi.vtbloffs)[mfi.vtblindex] ); \ - } \ - return 0; \ - } - -#define SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, pvtbloffs, pvtblidx, pthisptroffs) \ - }; \ - SH_MFHCls(hookname) SH_MFHCls(hookname)::ms_Inst; \ - ::SourceHook::MemFuncInfo SH_MFHCls(hookname)::ms_MFI; \ - ::SourceHook::IHookManagerInfo *SH_MFHCls(hookname)::ms_HI; \ - int __SourceHook_FHMAdd##hookname(void *iface, ::SourceHook::ISourceHook::AddHookMode mode, bool post, \ - SH_MFHCls(hookname)::FD handler) \ - { \ - return SH_GLOB_SHPTR->AddHook(SH_GLOB_PLUGPTR, mode, \ - iface, pthisptroffs, SH_MFHCls(hookname)::HookManPubFunc, \ - new SH_MFHCls(hookname)::CMyDelegateImpl(handler), post); \ - } \ - bool __SourceHook_FHMRemove##hookname(void *iface, bool post, \ - SH_MFHCls(hookname)::FD handler) \ - { \ - SH_MFHCls(hookname)::CMyDelegateImpl tmp(handler); \ - return SH_GLOB_SHPTR->RemoveHook(SH_GLOB_PLUGPTR, iface, pthisptroffs, \ - SH_MFHCls(hookname)::HookManPubFunc, &tmp, post); \ - } \ - SH_MFHCls(hookname)::ECMFP __SoureceHook_FHM_GetRecallMFP##hookname(::SourceHook::EmptyClass *thisptr) \ - { \ - SOUREHOOK__MNEWPARAMS_PREPAREMFP(hookname); \ - return u.mfp; \ - } \ - SH_MFHCls(hookname)::CallEC __SoureceHook_FHM_SHCall##hookname(void *ptr) \ - { \ - SH_MFHCls(hookname)::ECMFP mfp; \ - void *vfnptr = reinterpret_cast( \ - *reinterpret_cast( (reinterpret_cast(ptr) + SH_MFHCls(hookname)::ms_MFI.thisptroffs + SH_MFHCls(hookname)::ms_MFI.vtbloffs) ) + SH_MFHCls(hookname)::ms_MFI.vtblindex); \ - /* patch mfp */ \ - *reinterpret_cast(&mfp) = *reinterpret_cast(vfnptr); \ - if (sizeof(mfp) == 2*sizeof(void*)) /* gcc */ \ - { \ - void** pleaseShutUpMsvc = reinterpret_cast(&mfp); \ - pleaseShutUpMsvc[1] = 0; \ - } \ - return SH_MFHCls(hookname)::CallEC(reinterpret_cast< ::SourceHook::EmptyClass* >(ptr), mfp, vfnptr, SH_GLOB_SHPTR); \ - } \ - void __SourceHook_FHM_Reconfigure##hookname(int p_vtblindex, int p_vtbloffs, int p_thisptroffs) \ - { \ - SH_GLOB_SHPTR->RemoveHookManager(SH_GLOB_PLUGPTR, SH_MFHCls(hookname)::HookManPubFunc); \ - SH_MFHCls(hookname)::ms_MFI.thisptroffs = p_thisptroffs; \ - SH_MFHCls(hookname)::ms_MFI.vtblindex = p_vtblindex; \ - SH_MFHCls(hookname)::ms_MFI.vtbloffs = p_vtbloffs; \ - } - -#define SH_SETUPCALLS(rettype, paramtypes, params) \ - /* 1) Set up */ \ - using namespace ::SourceHook; \ - void *ourvfnptr = reinterpret_cast( \ - *reinterpret_cast(reinterpret_cast(this) + ms_MFI.vtbloffs) + ms_MFI.vtblindex); \ - void *vfnptr_origentry; \ - \ - META_RES status = MRES_IGNORED; \ - META_RES prev_res; \ - META_RES cur_res; \ - \ - typedef ReferenceCarrier< rettype >::type my_rettype; \ - my_rettype orig_ret; \ - my_rettype override_ret; \ - my_rettype plugin_ret; \ - IMyDelegate *iter; \ - IHookContext *pContext = SH_GLOB_SHPTR->SetupHookLoop(ms_HI, ourvfnptr, reinterpret_cast(this), \ - &vfnptr_origentry, &status, &prev_res, &cur_res, &orig_ret, &override_ret); - -#define SH_CALL_HOOKS(post, params) \ - prev_res = MRES_IGNORED; \ - while ( (iter = static_cast(pContext->GetNext())) ) \ - { \ - cur_res = MRES_IGNORED; \ - plugin_ret = iter->Call params; \ - prev_res = cur_res; \ - if (cur_res > status) \ - status = cur_res; \ - if (cur_res >= MRES_OVERRIDE) \ - *reinterpret_cast(pContext->GetOverrideRetPtr()) = plugin_ret; \ - } - -#define SH_CALL_ORIG(rettype, paramtypes, params) \ - if (status != MRES_SUPERCEDE && pContext->ShouldCallOrig()) \ - { \ - rettype (EmptyClass::*mfp)paramtypes; \ - SH_SETUP_MFP(mfp); \ - orig_ret = (reinterpret_cast(this)->*mfp)params; \ - } \ - else \ - orig_ret = override_ret; /* :TODO: ??? : use pContext->GetOverrideRetPtr() or not? */ - -#define SH_RETURN() \ - const my_rettype *retptr = reinterpret_cast( \ - (status >= MRES_OVERRIDE) ? pContext->GetOverrideRetPtr() : pContext->GetOrigRetPtr()); \ - SH_GLOB_SHPTR->EndContext(pContext); \ - return *retptr; - -#define SH_HANDLEFUNC(paramtypes, params, rettype) \ - SH_SETUPCALLS(rettype, paramtypes, params) \ - SH_CALL_HOOKS(pre, params) \ - SH_CALL_ORIG(rettype, paramtypes, params) \ - SH_CALL_HOOKS(post, params) \ - SH_RETURN() - -////////////////////////////////////////////////////////////////////////// -#define SH_SETUPCALLS_void(paramtypes, params) \ - /* 1) Set up */ \ - using namespace ::SourceHook; \ - void *ourvfnptr = reinterpret_cast( \ - *reinterpret_cast(reinterpret_cast(this) + ms_MFI.vtbloffs) + ms_MFI.vtblindex); \ - void *vfnptr_origentry; \ - \ - META_RES status = MRES_IGNORED; \ - META_RES prev_res; \ - META_RES cur_res; \ - \ - IMyDelegate *iter; \ - IHookContext *pContext = SH_GLOB_SHPTR->SetupHookLoop(ms_HI, ourvfnptr, reinterpret_cast(this), \ - &vfnptr_origentry, &status, &prev_res, &cur_res, NULL, NULL); - -#define SH_CALL_HOOKS_void(post, params) \ - prev_res = MRES_IGNORED; \ - while ( (iter = static_cast(pContext->GetNext())) ) \ - { \ - cur_res = MRES_IGNORED; \ - iter->Call params; \ - prev_res = cur_res; \ - if (cur_res > status) \ - status = cur_res; \ - } - -#define SH_CALL_ORIG_void(paramtypes, params) \ - if (status != MRES_SUPERCEDE && pContext->ShouldCallOrig()) \ - { \ - void (EmptyClass::*mfp)paramtypes; \ - SH_SETUP_MFP(mfp); \ - (reinterpret_cast(this)->*mfp)params; \ - } - -#define SH_RETURN_void() \ - SH_GLOB_SHPTR->EndContext(pContext); - -#define SH_HANDLEFUNC_void(paramtypes, params) \ - SH_SETUPCALLS_void(paramtypes, params) \ - SH_CALL_HOOKS_void(pre, params) \ - SH_CALL_ORIG_void(paramtypes, params) \ - SH_CALL_HOOKS_void(post, params) \ - SH_RETURN_void() - - -// Special vafmt handlers -// :TODO: what -#define SH_HANDLEFUNC_vafmt(paramtypes, params_orig, params_plug, rettype) \ - SH_SETUPCALLS(rettype, paramtypes, params_orig) \ - SH_CALL_HOOKS(pre, params_plug) \ - SH_CALL_ORIG(rettype, paramtypes, params_orig) \ - SH_CALL_HOOKS(post, params_plug) \ - SH_RETURN() - -#define SH_HANDLEFUNC_void_vafmt(paramtypes, params_orig, params_plug) \ - SH_SETUPCALLS_void(paramtypes, params_orig) \ - SH_CALL_HOOKS_void(pre, params_plug) \ - SH_CALL_ORIG_void(paramtypes, params_orig) \ - SH_CALL_HOOKS_void(post, params_plug) \ - SH_RETURN_void() - -////////////////////////////////////////////////////////////////////////// - -#define MAKE_DELEG(ret_type, params_decl, params_pass) \ - struct IMyDelegate : ::SourceHook::ISHDelegate { virtual ret_type Call params_decl = 0; }; \ - struct CMyDelegateImpl : IMyDelegate \ - { \ - FD m_Deleg; \ - CMyDelegateImpl(FD deleg) : m_Deleg(deleg) {} \ - virtual ~CMyDelegateImpl() {} \ - ret_type Call params_decl { return m_Deleg params_pass; } \ - void DeleteThis() { delete this; } \ - bool IsEqual(ISHDelegate *pOtherDeleg) { return m_Deleg == static_cast(pOtherDeleg)->m_Deleg; } \ - }; - -#define MAKE_DELEG_void(params_decl, params_pass) \ - struct IMyDelegate : ::SourceHook::ISHDelegate { virtual void Call params_decl = 0; }; \ - struct CMyDelegateImpl : IMyDelegate \ - { \ - FD m_Deleg; \ - CMyDelegateImpl(FD deleg) : m_Deleg(deleg) {} \ - virtual ~CMyDelegateImpl() {} \ - void Call params_decl { m_Deleg params_pass; } \ - void DeleteThis() { delete this; } \ - bool IsEqual(ISHDelegate *pOtherDeleg) { return m_Deleg == static_cast(pOtherDeleg)->m_Deleg; } \ - }; - -// GetPassInfo -> easier access. __SH_GPI generates a SourceHook::PassInfo instance. -#define __SH_GPI(tt) { sizeof(tt), ::SourceHook::GetPassInfo< tt >::type, ::SourceHook::GetPassInfo< tt >::flags } -// Extra pass info V2 -#define __SH_EPI { 0, 0, 0, 0 } - -#define __SH_VAFMT_SEQ(fmt, buf) \ - char buf[::SourceHook::STRBUF_LEN]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, sizeof(buf), fmt, ap); \ - buf[sizeof(buf) - 1] = 0; \ - va_end(ap); - -// Helper for MANUALEXTERN. -# define SHINT_DECL_MANUALEXTERN_impl_value(hookname, rettype) \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype res); - -// Helpers for transforming X(__VA_ARGS__, Y) -> Y when __VA_ARGS__ is empty. -#define SHINT_COLLAPSE0(_T, ...) __VA_ARGS__ - -// -// MSVC will automatically remove a trailing comma if __VA_ARGS__ is empty. GCC requires using ## to do this. -// -#if defined(_MSC_VER) -# define SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, ...) \ - int __SourceHook_FHAdd##ifacetype##ifacefunc(void *iface, ::SourceHook::ISourceHook::AddHookMode mode, bool post, \ - fastdelegate::FastDelegate handler); \ - bool __SourceHook_FHRemove##ifacetype##ifacefunc(void *iface, bool post, \ - fastdelegate::FastDelegate handler); - -# define SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, ...) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, void, __VA_ARGS__) - -# define SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, ...) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, __VA_ARGS__, const char *) - -# define SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, ...) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, void, __VA_ARGS__, const char *) - -// Helpers for MANUALEXTERN. -# define SHINT_DECL_MANUALEXTERN_impl_shared(hookname, rettype, ...) \ - int __SourceHook_FHMAdd##hookname(void *iface, ::SourceHook::ISourceHook::AddHookMode mode, bool post, \ - fastdelegate::FastDelegate handler); \ - bool __SourceHook_FHMRemove##hookname(void *iface, bool post, \ - fastdelegate::FastDelegate handler); \ - void __SourceHook_FHM_Reconfigure##hookname(int pvtblindex, int pvtbloffs, int pthisptroffs); - -# define SHINT_DECL_MANUALEXTERN_impl(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl_shared(hookname, rettype, __VA_ARGS__) \ - rettype(::SourceHook::EmptyClass::* __SoureceHook_FHM_GetRecallMFP##hookname(::SourceHook::EmptyClass *thisptr) )(__VA_ARGS__); \ - SourceHook::ExecutableClassN __SoureceHook_FHM_SHCall##hookname(void *ptr); - -# define SHINT_DECL_MANUALEXTERN_impl_vafmt(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl_shared(hookname, rettype, __VA_ARGS__, const char *) \ - rettype(::SourceHook::EmptyClass::* __SoureceHook_FHM_GetRecallMFP##hookname(::SourceHook::EmptyClass *thisptr) )(SHINT_COLLAPSE0(void, __VA_ARGS__, const char *, ...)); \ - SourceHook::ExecutableClassN __SoureceHook_FHM_SHCall##hookname(void *ptr); - -# define SH_DECL_MANUALEXTERN(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl(hookname, rettype, __VA_ARGS__) \ - SHINT_DECL_MANUALEXTERN_impl_value(hookname, rettype) - -# define SH_DECL_MANUALEXTERN_void(hookname, ...) \ - SHINT_DECL_MANUALEXTERN_impl(hookname, void, __VA_ARGS__) - -# define SH_DECL_MANUALEXTERN_void_vafmt(hookname, ...) \ - SHINT_DECL_MANUALEXTERN_impl_vafmt(hookname, void, __VA_ARGS__) - -# define SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl_vafmt(hookname, rettype, __VA_ARGS__) \ - SHINT_DECL_MANUALEXTERN_impl_value(hookname, rettype) - -// -// GCC Implementation. -// -#else -# define SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, ...) \ - int __SourceHook_FHAdd##ifacetype##ifacefunc(void *iface, ::SourceHook::ISourceHook::AddHookMode mode, bool post, \ - fastdelegate::FastDelegate handler); \ - bool __SourceHook_FHRemove##ifacetype##ifacefunc(void *iface, bool post, \ - fastdelegate::FastDelegate handler); - -# define SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, ...) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, void, ##__VA_ARGS__) - -# define SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, ...) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, ##__VA_ARGS__, const char *) - -# define SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, ...) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, void, ##__VA_ARGS__, const char *) - -// Helpers for MANUALEXTERN. -# define SHINT_DECL_MANUALEXTERN_impl_shared(hookname, rettype, ...) \ - int __SourceHook_FHMAdd##hookname(void *iface, ::SourceHook::ISourceHook::AddHookMode mode, bool post, \ - fastdelegate::FastDelegate handler); \ - bool __SourceHook_FHMRemove##hookname(void *iface, bool post, \ - fastdelegate::FastDelegate handler); \ - void __SourceHook_FHM_Reconfigure##hookname(int pvtblindex, int pvtbloffs, int pthisptroffs); - -# define SHINT_DECL_MANUALEXTERN_impl(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl_shared(hookname, rettype, ##__VA_ARGS__) \ - rettype(::SourceHook::EmptyClass::* __SoureceHook_FHM_GetRecallMFP##hookname(::SourceHook::EmptyClass *thisptr) )(__VA_ARGS__); \ - SourceHook::ExecutableClassN __SoureceHook_FHM_SHCall##hookname(void *ptr); - -# define SHINT_DECL_MANUALEXTERN_impl_vafmt(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl_shared(hookname, rettype, ##__VA_ARGS__, const char *) \ - rettype(::SourceHook::EmptyClass::* __SoureceHook_FHM_GetRecallMFP##hookname(::SourceHook::EmptyClass *thisptr) )(SHINT_COLLAPSE0(void, ##__VA_ARGS__, const char *, ...)); \ - SourceHook::ExecutableClassN __SoureceHook_FHM_SHCall##hookname(void *ptr); - -# define SH_DECL_MANUALEXTERN(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl(hookname, rettype, ##__VA_ARGS__) \ - SHINT_DECL_MANUALEXTERN_impl_value(hookname, rettype) - -# define SH_DECL_MANUALEXTERN_void(hookname, ...) \ - SHINT_DECL_MANUALEXTERN_impl(hookname, void, ##__VA_ARGS__) - -# define SH_DECL_MANUALEXTERN_void_vafmt(hookname, ...) \ - SHINT_DECL_MANUALEXTERN_impl_vafmt(hookname, void, ##__VA_ARGS__) - -# define SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl_vafmt(hookname, rettype, ##__VA_ARGS__) \ - SHINT_DECL_MANUALEXTERN_impl_value(hookname, rettype) - -#endif - -// Compatibility wrappers around modern variadic macros. -@[$1,0,$a: -// ********* Support for $1 arguments ********* -#define SH_DECL_HOOK$1(ifacetype, ifacefunc, attr, overload, rettype@[$2,1,$1:, param$2@]) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (@[$2,1,$1|, :param$2 p$2@]), (@[$2,1,$1|, :p$2@])); \ - virtual rettype Func(@[$2,1,$1|, :param$2 p$2@]) \ - { SH_HANDLEFUNC((@[$2,1,$1|, :param$2@]), (@[$2,1,$1|, :p$2@]), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}@[$2,1,$1:, __SH_GPI(param$2)@] }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI@[$2,1,$1:, __SH_EPI@] }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { $1, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN$1(ifacetype, ifacefunc, attr, overload, rettype@[$2,1,$1:, param$2@]) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype@[$2,1,$1|:, param$2@]) - -#define SH_DECL_HOOK$1_void(ifacetype, ifacefunc, attr, overload@[$2,1,$1:, param$2@]) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((@[$2,1,$1|, :param$2 p$2@]), (@[$2,1,$1|, :p$2@])); \ - virtual void Func(@[$2,1,$1|, :param$2 p$2@]) \ - { SH_HANDLEFUNC_void((@[$2,1,$1|, :param$2@]), (@[$2,1,$1|, :p$2@])); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}@[$2,1,$1:,__SH_GPI(param$2)@] }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI@[$2,1,$1:, __SH_EPI@] }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { $1, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN$1_void(ifacetype, ifacefunc, attr, overload@[$2,1,$1:, param$2@]) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload@[$1!=0:, @]@[$2,1,$1|, :param$2@]) - -#define SH_DECL_HOOK$1_vafmt(ifacetype, ifacefunc, attr, overload, rettype@[$2,1,$1:, param$2@]) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (@[$2,1,$1|, :param$2 p$2@]@[$1!=0:, @]const char *px), (@[$2,1,$1|, :p$2@]@[$1!=0:, @]px)); \ - virtual rettype Func(@[$2,1,$1|, :param$2 p$2@] @[$1!=0:, @]const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((@[$2,1,$1:param$2, @]const char *, ...), (@[$2,1,$1|, :p$2@]@[$1!=0:, @]"%s", buf), (@[$2,1,$1|, :p$2@]@[$1!=0:, @]buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}@[$2,1,$1:, __SH_GPI(param$2)@] }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI@[$2,1,$1:, __SH_EPI@] }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { $1, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN$1_vafmt(ifacetype, ifacefunc, attr, overload, rettype@[$2,1,$1:, param$2@]) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype@[$1!=0:, @]@[$2,1,$1|, :param$2@]) - -#define SH_DECL_HOOK$1_void_vafmt(ifacetype, ifacefunc, attr, overload@[$2,1,$1:, param$2@]) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((@[$2,1,$1|, :param$2 p$2@]@[$1!=0:, @]const char *px), (@[$2,1,$1|, :p$2@]@[$1!=0:, @]px)); \ - virtual void Func(@[$2,1,$1|, :param$2 p$2@]@[$1!=0:, @]const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((@[$2,1,$1:param$2, @]const char *, ...), (@[$2,1,$1|, :p$2@]@[$1!=0:, @]"%s", buf), (@[$2,1,$1|, :p$2@]@[$1!=0:, @]buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}@[$2,1,$1:, __SH_GPI(param$2)@] }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI@[$2,1,$1:, __SH_EPI@] }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { $1, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN$1_void_vafmt(ifacetype, ifacefunc, attr, overload@[$2,1,$1:, param$2@]) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload@[$1!=0:, @]@[$2,1,$1|, :param$2@]) - -#define SH_DECL_MANUALHOOK$1(hookname, vtblidx, vtbloffs, thisptroffs, rettype@[$2,1,$1:, param$2@]) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (@[$2,1,$1|, :param$2 p$2@]), (@[$2,1,$1|, :p$2@])); \ - virtual rettype Func(@[$2,1,$1|, :param$2 p$2@]) \ - { SH_HANDLEFUNC((@[$2,1,$1|, :param$2@]), (@[$2,1,$1|, :p$2@]), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(@[$2,1,$1|, :param$2@]); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype@[$2,1,$1:, param$2@] > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}@[$2,1,$1:, __SH_GPI(param$2)@] }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI@[$2,1,$1:, __SH_EPI@] }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { $1, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN$1(hookname, rettype@[$2,1,$1:, param$2@]) \ - SH_DECL_MANUALEXTERN(hookname, rettype@[$2,1,$1|:, param$2@]) - -#define SH_DECL_MANUALHOOK$1_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype@[$2,1,$1:, param$2@]) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (@[$2,1,$1:param$2 p$2, @]const char *px), (@[$2,1,$1:p$2, @]px)); \ - virtual rettype Func(@[$2,1,$1:param$2 p$2, @]const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((@[$2,1,$1:param$2, @]const char *, ...), (@[$2,1,$1|, :p$2@]@[$1!=0:, @]"%s", buf), (@[$2,1,$1|, :p$2@]@[$1!=0:, @]buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(@[$2,1,$1:param$2, @]const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype@[$2,1,$1:, param$2@], const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}@[$2,1,$1:, __SH_GPI(param$2)@] }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI@[$2,1,$1:, __SH_EPI@] }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { $1, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN$1_vafmt(hookname, rettype@[$2,1,$1:, param$2@]) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype@[$1!=0:, @]@[$2,1,$1|, :param$2@]) - -#define SH_DECL_MANUALHOOK$1_void(hookname, vtblidx, vtbloffs, thisptroffs@[$2,1,$1:, param$2@]) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((@[$2,1,$1|, :param$2 p$2@]), (@[$2,1,$1|, :p$2@])); \ - virtual void Func(@[$2,1,$1|, :param$2 p$2@]) \ - { SH_HANDLEFUNC_void((@[$2,1,$1|, :param$2@]), (@[$2,1,$1|, :p$2@])); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(@[$2,1,$1|, :param$2@]); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}@[$2,1,$1:, __SH_GPI(param$2)@] }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI@[$2,1,$1:, __SH_EPI@] }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { $1, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN$1_void(hookname@[$2,1,$1:, param$2@]) \ - SH_DECL_MANUALEXTERN_void(hookname@[$1!=0:, @]@[$2,1,$1|, :param$2@]) - -#define SH_DECL_MANUALHOOK$1_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs@[$2,1,$1:, param$2@]) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((@[$2,1,$1:param$2 p$2, @]const char *px), (@[$2,1,$1:p$2, @]px)); \ - virtual void Func(@[$2,1,$1:param$2 p$2, @]const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((@[$2,1,$1:param$2, @]const char *, ...), (@[$2,1,$1|, :p$2@]@[$1!=0:, @]"%s", buf), (@[$2,1,$1|, :p$2@]@[$1!=0:, @]buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(@[$2,1,$1:param$2, @]const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void@[$2,1,$1:, param$2@], const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}@[$2,1,$1:, __SH_GPI(param$2)@] }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI@[$2,1,$1:, __SH_EPI@] }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { $1, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN$1_void_vafmt(hookname@[$2,1,$1:, param$2@]) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname@[$1!=0:, @]@[$2,1,$1|, :param$2@]) - -@] - - -////////////////////////////////////////////////////////////////////////// -// SH_CALL - -namespace SourceHook -{ - template - class ExecutableClassN - { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; - public: - ExecutableClassN(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) - : m_ThisPtr(tp), - m_VfnPtr(vp), - m_MFP(mfp), - m_pSH(pSH) - { } - - RetType operator()(Params... params) const { - using namespace ::SourceHook; - m_pSH->SetIgnoreHooks(m_VfnPtr); - RetType tmpret = (m_ThisPtr->*m_MFP)(params...); - m_pSH->ResetIgnoreHooks(m_VfnPtr); - return tmpret; - } - - template - RetType operator()(Params... params, MoreParams... more) const { - using namespace ::SourceHook; - m_pSH->SetIgnoreHooks(m_VfnPtr); - RetType tmpret = (m_ThisPtr->*m_MFP)(params..., more...); - m_pSH->ResetIgnoreHooks(m_VfnPtr); - return tmpret; - } - }; - - template - class ExecutableClassN - { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; - public: - ExecutableClassN(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) - : m_ThisPtr(tp), - m_VfnPtr(vp), - m_MFP(mfp), - m_pSH(pSH) - { } - - void operator()(Params... params) const { - using namespace ::SourceHook; - m_pSH->SetIgnoreHooks(m_VfnPtr); - (m_ThisPtr->*m_MFP)(params...); - m_pSH->ResetIgnoreHooks(m_VfnPtr); - } - - template - void operator()(Params... params, MoreParams... more) const { - using namespace ::SourceHook; - m_pSH->SetIgnoreHooks(m_VfnPtr); - (m_ThisPtr->*m_MFP)(params..., more...); - m_pSH->ResetIgnoreHooks(m_VfnPtr); - } - }; -} - -#define SH__CALL_GET_VFNPTR_NORMAL \ - using namespace ::SourceHook; \ - MemFuncInfo mfi = {true, -1, 0, 0}; \ - GetFuncInfo(ptr, mfp, mfi); \ - void *vfnptr = reinterpret_cast( \ - *reinterpret_cast(reinterpret_cast(ptr) + mfi.thisptroffs + mfi.vtbloffs) + mfi.vtblindex); - -#define SH__CALL_GET_VFNPTR_MANUAL \ - using namespace ::SourceHook; \ - void *vfnptr = reinterpret_cast( \ - *reinterpret_cast( (reinterpret_cast(ptr) + thisptroffs + vtbloffs) ) + vtblidx); \ - /* patch mfp */ \ - *reinterpret_cast(&mfp) = *reinterpret_cast(vfnptr); - -// SH_CALL needs to deduce the return type -> it uses templates and function overloading -// That's why SH_CALL takes two parameters: "mfp2" of type RetType(X::*mfp)(params), and "mfp" of type MFP -// The only purpose of the mfp2 parameter is to extract the return type - -template -SourceHook::ExecutableClassN -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Params...), SourceHook::ISourceHook *shptr) -{ - SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClassN(ptr, mfp, vfnptr, shptr); -} - -template -SourceHook::ExecutableClassN -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Params..., ...), SourceHook::ISourceHook *shptr) -{ - SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClassN(ptr, mfp, vfnptr, shptr); -} - -template -SourceHook::ExecutableClassN -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Params...)const, SourceHook::ISourceHook *shptr) -{ - SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClassN(ptr, mfp, vfnptr, shptr); -} - -template -SourceHook::ExecutableClassN -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Params..., ...)const, SourceHook::ISourceHook *shptr) -{ - SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClassN(ptr, mfp, vfnptr, shptr); -} - -template -SourceHook::ExecutableClassN -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Params...), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) -{ - SH__CALL_GET_VFNPTR_MANUAL - return SourceHook::ExecutableClassN( - reinterpret_cast(ptr), mfp, vfnptr, shptr); -} - -template -SourceHook::ExecutableClassN -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Params..., ...), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) -{ - SH__CALL_GET_VFNPTR_MANUAL - return SourceHook::ExecutableClassN( - reinterpret_cast(ptr), mfp, vfnptr, shptr); -} - -#define SH_CALL(ptr, mfp) SH_CALL2((ptr), (mfp), (mfp), SH_GLOB_SHPTR) -#define SH_MCALL2(ptr, mfp, vtblidx, vtbloffs, thisptroffs) SH_MCALL3((ptr), (mfp), (mfp), (vtblidx), (vtbloffs), (thisptroffs), SH_GLOB_SHPTR) -#define SH_MCALL(ptr, mhookname) __SoureceHook_FHM_SHCall##mhookname(ptr) - -////////////////////////////////////////////////////////////////////////// -// SetOverrideRet and RecallGetIface for recalls -// These take a ISourceHook pointer instead of using SH_GLOB_SHPTR directly -// The reason is that the user may want to redefine SH_GLOB_SHPTR - then the macros -// (META_RETURN_VALUE_NEWPARAMS) should obey the new pointer. - -namespace SourceHook -{ - // SetOverrideResult used to be implemented like this: - // SetOverrideResult(shptr, memfuncptr, return); - // normally the compiler can deduce the return type from memfuncptr, but (at least msvc8) failed when it was a reference - // (it thought it was ambigous - the ref and non-ref type) - // so now SetOverrideResult(memfuncptr) deduces the ret type, and returns a functor which does the work - // new syntax: SetOverrideResult(memfuncptr)(shptr, return) - // This also allows us to create a special version for references which respects ReferenceCarrier. - - template struct OverrideFunctor - { - void operator()(ISourceHook *shptr, T res) - { - *reinterpret_cast(shptr->GetOverrideRetPtr()) = res; - } - }; - template struct OverrideFunctor - { - void operator()(ISourceHook *shptr, T &res) - { - // overrideretptr points to ReferenceCarrier - *reinterpret_cast::type *>(shptr->GetOverrideRetPtr()) = res; - } - }; - - // For manual hooks: - // The rettype is passed in manually - template - OverrideFunctor SetOverrideResult() - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Params...)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Params..., ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Params...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Params..., ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } -} - -#endif - // The pope is dead. -> :( diff --git a/metamod-source/core/sourcehook/sh_list.h b/metamod-source/core/sourcehook/sh_list.h deleted file mode 100644 index 21d57c03..00000000 --- a/metamod-source/core/sourcehook/sh_list.h +++ /dev/null @@ -1,321 +0,0 @@ -/* ======== SourceMM ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): David "BAILOPAN" Anderson -* ============================ -*/ - -#ifndef _INCLUDE_SMM_LIST_H -#define _INCLUDE_SMM_LIST_H - -#include -#include - -namespace SourceHook -{ - - //This class is from CSDM for AMX Mod X - /* - A circular, doubly-linked list with one sentinel node - - Empty: - m_Head = sentinel - m_Head->next = m_Head; - m_Head->prev = m_Head; - One element: - m_Head = sentinel - m_Head->next = node1 - m_Head->prev = node1 - node1->next = m_Head - node1->prev = m_Head - Two elements: - m_Head = sentinel - m_Head->next = node1 - m_Head->prev = node2 - node1->next = node2 - node1->prev = m_Head - node2->next = m_Head - node2->prev = node1 - */ - template - class List - { - public: - class iterator; - friend class iterator; - class ListNode - { - public: - ListNode(const T & o) : obj(o) { }; - ListNode() { }; - T obj; - ListNode *next; - ListNode *prev; - }; - private: - // Initializes the sentinel node. - // BAIL used malloc instead of new in order to bypass the need for a constructor. - ListNode *_Initialize() - { - ListNode *n = (ListNode *)malloc(sizeof(ListNode)); - n->next = n; - n->prev = n; - return n; - } - public: - List() : m_Head(_Initialize()), m_Size(0) - { - } - List(const List &src) : m_Head(_Initialize()), m_Size(0) - { - iterator iter; - for (iter=src.begin(); iter!=src.end(); iter++) - push_back( (*iter) ); - } - ~List() - { - clear(); - - // Don't forget to free the sentinel - if (m_Head) - { - free(m_Head); - m_Head = NULL; - } - } - void push_back(const T &obj) - { - ListNode *node = new ListNode(obj); - - node->prev = m_Head->prev; - node->next = m_Head; - m_Head->prev->next = node; - m_Head->prev = node; - - m_Size++; - } - - void push_front(const T &obj) - { - insert(begin(), obj); - } - - void push_sorted(const T &obj) - { - iterator iter; - for (iter = begin(); iter != end(); ++iter) - { - if (obj < *iter) - { - insert(iter, obj); - return; - } - } - push_back(obj); - } - - size_t size() const - { - return m_Size; - } - - void clear() - { - ListNode *node = m_Head->next; - ListNode *temp; - m_Head->next = m_Head; - m_Head->prev = m_Head; - - // Iterate through the nodes until we find g_Head (the sentinel) again - while (node != m_Head) - { - temp = node->next; - delete node; - node = temp; - } - m_Size = 0; - } - bool empty() const - { - return (m_Size == 0); - } - T & front() - { - return m_Head->next->obj; - } - T & back() - { - return m_Head->prev->obj; - } - private: - ListNode *m_Head; - size_t m_Size; - public: - class iterator - { - friend class List; - public: - iterator() - { - m_This = NULL; - } - iterator(const List &src) - { - m_This = src.m_Head; - } - iterator(ListNode *n) : m_This(n) - { - } - iterator(const iterator &where) - { - m_This = where.m_This; - } - //pre decrement - iterator & operator--() - { - if (m_This) - m_This = m_This->prev; - return *this; - } - //post decrement - iterator operator--(int) - { - iterator old(*this); - if (m_This) - m_This = m_This->prev; - return old; - } - - //pre increment - iterator & operator++() - { - if (m_This) - m_This = m_This->next; - return *this; - } - //post increment - iterator operator++(int) - { - iterator old(*this); - if (m_This) - m_This = m_This->next; - return old; - } - - const T & operator * () const - { - return m_This->obj; - } - T & operator * () - { - return m_This->obj; - } - - T * operator -> () - { - return &(m_This->obj); - } - const T * operator -> () const - { - return &(m_This->obj); - } - - bool operator != (const iterator &where) const - { - return (m_This != where.m_This); - } - bool operator ==(const iterator &where) const - { - return (m_This == where.m_This); - } - - operator bool() - { - return m_This != NULL; - } - private: - ListNode *m_This; - }; - public: - iterator begin() const - { - return iterator(m_Head->next); - } - iterator end() const - { - return iterator(m_Head); - } - iterator erase(iterator &where) - { - ListNode *pNode = where.m_This; - iterator iter(where); - iter++; - - - // Works for all cases: empty list, erasing first element, erasing tail, erasing in the middle... - pNode->prev->next = pNode->next; - pNode->next->prev = pNode->prev; - - delete pNode; - m_Size--; - - return iter; - } - - iterator insert(iterator where, const T &obj) - { - // Insert obj right before where - - ListNode *node = new ListNode(obj); - ListNode *pWhereNode = where.m_This; - - pWhereNode->prev->next = node; - node->prev = pWhereNode->prev; - pWhereNode->prev = node; - node->next = pWhereNode; - - m_Size++; - - return iterator(node); - } - - public: - void remove(const T & obj) - { - iterator b; - for (b=begin(); b!=end(); b++) - { - if ( (*b) == obj ) - { - erase( b ); - break; - } - } - } - template - iterator find(const U & equ) const - { - iterator iter; - for (iter=begin(); iter!=end(); iter++) - { - if ( (*iter) == equ ) - return iter; - } - return end(); - } - List & operator =(const List &src) - { - clear(); - iterator iter; - for (iter=src.begin(); iter!=src.end(); iter++) - push_back( (*iter) ); - return *this; - } - }; - -}; //NAMESPACE - -#endif //_INCLUDE_CSDM_LIST_H diff --git a/metamod-source/core/sourcehook/sh_memfuncinfo.h b/metamod-source/core/sourcehook/sh_memfuncinfo.h deleted file mode 100644 index f83bf69b..00000000 --- a/metamod-source/core/sourcehook/sh_memfuncinfo.h +++ /dev/null @@ -1,327 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -/** - * @brief This file provides a way for getting information about a member function. - * @file sh_memfuncinfo.h - */ - -#ifndef __SHINT_MEMFUNC_INFO_H__ -#define __SHINT_MEMFUNC_INFO_H__ - -namespace SourceHook -{ - - // Don Clugston: - // implicit_cast< > - // I believe this was originally going to be in the C++ standard but - // was left out by accident. It's even milder than static_cast. - // I use it instead of static_cast<> to emphasize that I'm not doing - // anything nasty. - // Usage is identical to static_cast<> - template - inline OutputClass implicit_cast(InputClass input){ - return input; - } - - - struct MemFuncInfo - { - bool isVirtual; // Is the function virtual? - int thisptroffs; // The this pointer the function expects to be called with - // If -1, you need to call the GetFuncInfo_GetThisPtr function - int vtblindex; // The function's index in the vtable (0-based, 1=second entry, 2=third entry, ...) - int vtbloffs; // The vtable pointer - }; - - // Ideas by Don Clugston. - // Check out his excellent paper: http://www.codeproject.com/cpp/FastDelegate.asp - - template struct MFI_Impl - { - template static inline void GetFuncInfo(MFP *mfp, MemFuncInfo &out) - { - static char weird_memfunc_pointer_exclamation_mark_arrow_error[N-1000]; - } - }; - -# if SH_COMP == SH_COMP_GCC - - template<> struct MFI_Impl<2*SH_PTRSIZE> // All of these have size==8/16 - { - struct GCC_MemFunPtr - { - union - { - void *funcadr; // always even - intptr_t vtable_index_plus1; // = vindex+1, always odd - }; - intptr_t delta; - }; - template static inline void GetFuncInfo(MFP mfp, MemFuncInfo &out) - { - GCC_MemFunPtr *mfp_detail = (GCC_MemFunPtr*)&mfp; - out.thisptroffs = mfp_detail->delta; - if (mfp_detail->vtable_index_plus1 & 1) - { - out.vtblindex = (mfp_detail->vtable_index_plus1 - 1) / SH_PTRSIZE; - out.vtbloffs = 0; - out.isVirtual = true; - } - else - out.isVirtual = false; - } - }; - -# elif SH_COMP == SH_COMP_MSVC - - namespace - { - int MFI_GetVtblOffset(void *mfp) - { - unsigned char *addr = (unsigned char*)mfp; - if (*addr == 0xE9) // Jmp - { - // May or may not be! - // Check where it'd jump - addr += 5 /*size of the instruction*/ + *(unsigned long*)(addr + 1); - } - - // Check whether it's a virtual function call - // They look like this: - // 004125A0 8B 01 mov eax,dword ptr [ecx] - // 004125A2 FF 60 04 jmp dword ptr [eax+4] - // ==OR== - // 00411B80 8B 01 mov eax,dword ptr [ecx] - // 00411B82 FF A0 18 03 00 00 jmp dword ptr [eax+318h] - - // However, for vararg functions, they look like this: - // 0048F0B0 8B 44 24 04 mov eax,dword ptr [esp+4] - // 0048F0B4 8B 00 mov eax,dword ptr [eax] - // 0048F0B6 FF 60 08 jmp dword ptr [eax+8] - // ==OR== - // 0048F0B0 8B 44 24 04 mov eax,dword ptr [esp+4] - // 0048F0B4 8B 00 mov eax,dword ptr [eax] - // 00411B82 FF A0 18 03 00 00 jmp dword ptr [eax+318h] - - // With varargs, the this pointer is passed as if it was the first argument - - bool ok = false; - if (addr[0] == 0x8B && addr[1] == 0x44 && addr[2] == 0x24 && addr[3] == 0x04 && - addr[4] == 0x8B && addr[5] == 0x00) - { - addr += 6; - ok = true; - } - else if (addr[0] == 0x8B && addr[1] == 0x01) - { - addr += 2; - ok = true; - } - else if (addr[0] == 0x48 && addr[1] == 0x8B && addr[2] == 0x01) - { - addr += 3; - ok = true; - } - if (!ok) - return -1; - - if (*addr++ == 0xFF) - { - if (*addr == 0x60) - { - return *++addr / SH_PTRSIZE; - } - else if (*addr == 0xA0) - { - return *((unsigned int*)++addr) / SH_PTRSIZE; - } - else if (*addr == 0x20) - return 0; - else - return -1; - } - return -1; - } - } - - template<> struct MFI_Impl<1*SH_PTRSIZE> // simple ones - { - template static inline void GetFuncInfo(MFP mfp, MemFuncInfo &out) - { - out.vtblindex = MFI_GetVtblOffset(*(void**)&mfp); - out.isVirtual = out.vtblindex >= 0 ? true : false; - out.thisptroffs = 0; - out.vtbloffs = 0; - } - }; - - template<> struct MFI_Impl<2*SH_PTRSIZE> // more complicated ones! - { - struct MSVC_MemFunPtr2 - { - void *funcadr; - int delta; - }; - template static inline void GetFuncInfo(MFP mfp, MemFuncInfo &out) - { - out.vtblindex = MFI_GetVtblOffset(*(void**)&mfp); - out.isVirtual = out.vtblindex >= 0 ? true : false; - out.thisptroffs = reinterpret_cast(&mfp)->delta; - out.vtbloffs = 0; - } - }; - - // By Don Clugston, adapted - template<> struct MFI_Impl<3*SH_PTRSIZE> // WOW IT"S GETTING BIGGER OMGOMOGMG - { - class __single_inheritance GenericClass; - class GenericClass {}; - - struct MicrosoftVirtualMFP { - void (GenericClass::*codeptr)(); // points to the actual member function - int delta; // #bytes to be added to the 'this' pointer - int vtable_index; // or 0 if no virtual inheritance - }; - - struct GenericVirtualClass : virtual public GenericClass - { - typedef GenericVirtualClass * (GenericVirtualClass::*ProbePtrType)(); - GenericVirtualClass * GetThis() { return this; } - }; - - template static inline void GetFuncInfo(MFP mfp, MemFuncInfo &out) - { - out.vtblindex = MFI_GetVtblOffset(*(void**)&mfp); - out.isVirtual = out.vtblindex >= 0 ? true : false; - // This pointer - /* - union { - MFP func; - GenericClass* (T::*ProbeFunc)(); - MicrosoftVirtualMFP s; - } u; - u.func = mfp; - union { - GenericVirtualClass::ProbePtrType virtfunc; - MicrosoftVirtualMFP s; - } u2; - - // Check that the horrible_cast<>s will work - typedef int ERROR_CantUsehorrible_cast[sizeof(mfp)==sizeof(u.s) - && sizeof(mfp)==sizeof(u.ProbeFunc) - && sizeof(u2.virtfunc)==sizeof(u2.s) ? 1 : -1]; - // Unfortunately, taking the address of a MF prevents it from being inlined, so - // this next line can't be completely optimised away by the compiler. - u2.virtfunc = &GenericVirtualClass::GetThis; - u.s.codeptr = u2.s.codeptr; - out.thisptroffs = (reinterpret_cast(NULL)->*u.ProbeFunc)(); - */ - out.thisptroffs = -1; - out.vtbloffs = 0; - } - }; - - // Don: Nasty hack for Microsoft and Intel (IA32 and Itanium) - // unknown_inheritance classes go here - // This is probably the ugliest bit of code I've ever written. Look at the casts! - // There is a compiler bug in MSVC6 which prevents it from using this code. - template<> struct MFI_Impl<4*SH_PTRSIZE> // THE BIGGEST ONE!!!1GABEN - { - template static inline void GetFuncInfo(MFP mfp, MemFuncInfo &out) - { - out.vtblindex = MFI_GetVtblOffset(*(void**)&mfp); - out.isVirtual = out.vtblindex >= 0 ? true : false; - - // The member function pointer is 16 bytes long. We can't use a normal cast, but - // we can use a union to do the conversion. - union { - MFP func; - // In VC++ and ICL, an unknown_inheritance member pointer - // is internally defined as: - struct { - void *m_funcaddress; // points to the actual member function - int delta; // #bytes to be added to the 'this' pointer - int vtordisp; // #bytes to add to 'this' to find the vtable - int vtable_index; // or 0 if no virtual inheritance - } s; - } u; - // Check that the horrible_cast will work - typedef int ERROR_CantUsehorrible_cast[sizeof(u.func)==sizeof(u.s)? 1 : -1]; - u.func = mfp; - int virtual_delta = 0; - if (u.s.vtable_index) { // Virtual inheritance is used - /* - // First, get to the vtable. - // It is 'vtordisp' bytes from the start of the class. - int * vtable = *reinterpret_cast( - reinterpret_cast(thisptr) + u.s.vtordisp ); - - // 'vtable_index' tells us where in the table we should be looking. - virtual_delta = u.s.vtordisp + *reinterpret_cast( - reinterpret_cast(vtable) + u.s.vtable_index); - // The int at 'virtual_delta' gives us the amount to add to 'this'. - // Finally we can add the three components together. Phew! - out.thisptr = reinterpret_cast( - reinterpret_cast(thisptr) + u.s.delta + virtual_delta); - */ - out.vtbloffs = u.s.vtordisp; - out.thisptroffs = -1; - } - else - { - out.vtbloffs = out.vtblindex < 0 ? 0 : u.s.delta; - out.thisptroffs = u.s.delta; - } - }; - }; -# else -# error Unsupported compiler -# endif - - // This version does not take a this pointer - // Useful for hookdecls, as they ensure that mfp is correct through a static_cast - template inline void GetFuncInfo(X mfp, MemFuncInfo &out) - { - MFI_Impl::GetFuncInfo(mfp, out); - } - - // Versions which do take a this - // - template - inline void GetFuncInfo(Y *ptr, RetType(X::*mfp)(Params...), MemFuncInfo &out) - { - RetType(Y::*mfp2)(Params...) = mfp; - MFI_Impl::GetFuncInfo(mfp2, out); - } - - template - inline void GetFuncInfo(Y *ptr, RetType(X::*mfp)(Params...) const, MemFuncInfo &out) - { - RetType(Y::*mfp2)(Params...) const = mfp; - MFI_Impl::GetFuncInfo(mfp2, out); - } - - template - inline void GetFuncInfo(Y *ptr, RetType(X::*mfp)(Params..., ...), MemFuncInfo &out) - { - RetType(Y::*mfp2)(Params..., ...) = mfp; - MFI_Impl::GetFuncInfo(mfp2, out); - } - - template - inline void GetFuncInfo(Y *ptr, RetType(X::*mfp)(Params..., ...) const, MemFuncInfo &out) - { - RetType(Y::*mfp2)(Params..., ...) const = mfp; - MFI_Impl::GetFuncInfo(mfp2, out); - } -} - -#endif diff --git a/metamod-source/core/sourcehook/sh_memory.h b/metamod-source/core/sourcehook/sh_memory.h deleted file mode 100644 index d34a9b5d..00000000 --- a/metamod-source/core/sourcehook/sh_memory.h +++ /dev/null @@ -1,379 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko, Scott "Damaged Soul" Ehlert -* Contributors: lancevorgin, XAD, theqizmo -* ============================ -*/ - -#ifndef __SHINT_MEMORY_H__ -#define __SHINT_MEMORY_H__ - -// Feb 17 / 2005: -// Unprotect now sets to readwrite -// The vtable doesn't need to be executable anyway - -# if SH_XP == SH_XP_WINAPI -# include -# define SH_MEM_READ 1 -# define SH_MEM_WRITE 2 -# define SH_MEM_EXEC 4 -# elif SH_XP == SH_XP_POSIX -# include -# include -# include -# include -# include -// http://www.die.net/doc/linux/man/man2/mprotect.2.html -# include -# ifndef PAGESIZE -# define PAGESIZE 4096 -# endif -# define SH_MEM_READ PROT_READ -# define SH_MEM_WRITE PROT_WRITE -# define SH_MEM_EXEC PROT_EXEC - -// We need to align addr down to pagesize on linux -// We assume PAGESIZE is a power of two -# define SH_LALIGN(x) (void*)((uintptr_t)(x) & ~(PAGESIZE-1)) -# define SH_LALDIF(x) ((uintptr_t)(x) % PAGESIZE) -# else -# error Unsupported OS/Compiler -# endif -#if SH_SYS == SH_SYS_APPLE -# include -# include -# include -#endif - -#include "sh_list.h" - -namespace SourceHook -{ - static inline bool GetPageBits(void *addr, int *bits) - { -#if SH_SYS == SH_SYS_LINUX - // On linux, first check /proc/self/maps - unsigned long laddr = reinterpret_cast(addr); - - bool bFound = false; - FILE *pF = fopen("/proc/self/maps", "r"); - if (pF) { - // Linux /proc/self/maps -> parse - // Format: - // lower upper prot stuff path - // 08048000-0804c000 r-xp 00000000 03:03 1010107 /bin/cat - unsigned long rlower, rupper; - char r, w, x; - char *buffer = NULL; - size_t bufsize = 0; - while (getline(&buffer, &bufsize, pF) != -1) { - char *addr_split; - char *prot_split; - rlower = strtoul(buffer, &addr_split, 16); - rupper = strtoul(&addr_split[1], &prot_split, 16); - // Check whether we're IN THERE! - if (laddr >= rlower && laddr < rupper) { - r = prot_split[1]; - w = prot_split[2]; - x = prot_split[3]; - *bits = 0; - if (r == 'r') - *bits |= SH_MEM_READ; - if (w == 'w') - *bits |= SH_MEM_WRITE; - if (x == 'x') - *bits |= SH_MEM_EXEC; - bFound = true; - break; - } - } - free(buffer); - fclose(pF); - return bFound; - } - pF = fopen("/proc/curproc/map", "r"); - if (pF) { - // FreeBSD /proc/curproc/map -> parse - // 0x804800 0x805500 13 15 0xc6e18960 r-x 21 0x0 COW NC vnode - unsigned long rlower, rupper, ignoreLong; - int ignoreInt; - char r, w, x; - while (fscanf(pF, "0x%lx 0x%lx %d %d 0x%lx %c%c%c", &rlower, &rupper, &ignoreInt, - &ignoreInt, &ignoreLong, &r, &w, &x) != EOF) { - // Check whether we're IN THERE! - if (laddr >= rlower && laddr < rupper) { - fclose(pF); - *bits = 0; - if (r == 'r') - *bits |= SH_MEM_READ; - if (r == 'w') - *bits |= SH_MEM_WRITE; - if (r == 'x') - *bits |= SH_MEM_EXEC; - return true; - } - // Read to end of line - int c; - while ((c = fgetc(pF)) != '\n') { - if (c == EOF) - break; - } - if (c == EOF) - break; - } - fclose(pF); - return false; - } - return false; -#elif SH_SYS == SH_SYS_APPLE - vm_size_t ignoreSize; - vm_address_t vmaddr = (vm_address_t)addr; - memory_object_name_t obj; -#if defined(__i386__) - vm_region_basic_info_data_t info; - vm_region_flavor_t flavor = VM_REGION_BASIC_INFO; - mach_msg_type_number_t count = VM_REGION_BASIC_INFO_COUNT; - kern_return_t kr = vm_region(mach_task_self(), &vmaddr, &ignoreSize, flavor, - (vm_region_info_t)&info, &count, &obj); -#elif defined(__x86_64__) - vm_region_basic_info_data_64_t info; - vm_region_flavor_t flavor = VM_REGION_BASIC_INFO_64; - mach_msg_type_number_t count = VM_REGION_BASIC_INFO_COUNT_64; - kern_return_t kr = vm_region_64(mach_task_self(), &vmaddr, &ignoreSize, flavor, - (vm_region_info_64_t)&info, &count, &obj); -#endif - if (kr != KERN_SUCCESS) - return false; - *bits = 0; - if (info.protection & VM_PROT_READ) - *bits |= SH_MEM_READ; - if (info.protection & VM_PROT_WRITE) - *bits |= SH_MEM_WRITE; - if (info.protection & VM_PROT_EXECUTE) - *bits |= SH_MEM_EXEC; - return true; -#elif SH_XP == SH_XP_WINAPI - SYSTEM_INFO info; - GetSystemInfo(&info); - - MEMORY_BASIC_INFORMATION mem; - size_t base = size_t(addr) & ~size_t(info.dwPageSize - 1); - if (!VirtualQuery((void *)base, &mem, sizeof(mem))) - return false; - switch (mem.Protect) { - case PAGE_EXECUTE: - *bits = SH_MEM_EXEC; - break; - case PAGE_EXECUTE_READ: - *bits = SH_MEM_EXEC | SH_MEM_READ; - break; - case PAGE_EXECUTE_READWRITE: - case PAGE_EXECUTE_WRITECOPY: - *bits = SH_MEM_EXEC | SH_MEM_READ | SH_MEM_WRITE; - break; - case PAGE_NOACCESS: - *bits = 0; - break; - case PAGE_READONLY: - *bits = SH_MEM_READ; - break; - case PAGE_READWRITE: - case PAGE_WRITECOPY: - *bits = SH_MEM_READ | SH_MEM_WRITE; - break; - default: - return false; - } - return true; -#endif - } - - inline bool SetMemAccess(void *addr, size_t len, int access) - { -# if SH_XP == SH_XP_POSIX - return mprotect(SH_LALIGN(addr), len + SH_LALDIF(addr), access)==0 ? true : false; -# elif SH_XP == SH_XP_WINAPI - DWORD tmp; - DWORD prot; - switch (access) - { - case SH_MEM_READ: - prot = PAGE_READONLY; break; - case SH_MEM_READ | SH_MEM_WRITE: - prot = PAGE_READWRITE; break; - case SH_MEM_READ | SH_MEM_EXEC: - prot = PAGE_EXECUTE_READ; break; - default: - case SH_MEM_READ | SH_MEM_WRITE | SH_MEM_EXEC: - prot = PAGE_EXECUTE_READWRITE; break; - } - return VirtualProtect(addr, len, prot, &tmp) ? true : false; -# endif - } - - inline bool MakePageWritable(void *addr) - { - int bits; - if (GetPageBits(addr, &bits)) { - if (bits & SH_MEM_WRITE) - return true; - bits |= SH_MEM_WRITE; - } else { - bits = SH_MEM_READ | SH_MEM_WRITE | SH_MEM_EXEC; - } - return SetMemAccess(addr, sizeof(void *), bits); - } - -#if SH_XP == SH_XP_POSIX - namespace - { - bool g_BadReadCalled; - jmp_buf g_BadReadJmpBuf; - -# if SH_SYS == SH_SYS_LINUX - static void BadReadHandler(int sig) - { - if (g_BadReadCalled) - longjmp(g_BadReadJmpBuf, 1); - } -# elif SH_SYS == SH_SYS_APPLE - static void BadReadHandler(int signal, siginfo_t* my_siginfo, void* my_context) - { - if (g_BadReadCalled) - longjmp(g_BadReadJmpBuf, 1); - } -# endif - } -#endif - - /** - * @brief Checks whether the specified memory region is (still) accessible - * - * @param addr The lower boundary - * @param len Length of the region to be checked - */ - namespace - { - static inline bool ModuleInMemory(char *addr, size_t len) - { -#if SH_SYS == SH_SYS_LINUX - // On linux, first check /proc/self/maps - unsigned long lower = reinterpret_cast(addr); - unsigned long upper = lower + len; - - FILE *pF = fopen("/proc/self/maps", "r"); - if (pF) - { - // Linux /proc/self/maps -> parse - // Format: - // lower upper prot stuff path - // 08048000-0804c000 r-xp 00000000 03:03 1010107 /bin/cat - bool bFound = false; - - char *buffer = NULL; - size_t bufsize = 0; - while (getline(&buffer, &bufsize, pF) != -1) { - char *addr_split; - unsigned long rlower = strtoul(buffer, &addr_split, 16); - unsigned long rupper = strtoul(&addr_split[1], NULL, 16); - // Check whether we're IN THERE! - if (lower >= rlower && upper <= rupper) - { - bFound = true; - break; - } - } - free(buffer); - fclose(pF); - return bFound; - } - pF = fopen("/proc/curproc/map", "r"); - if (pF) - { - // FreeBSD /proc/curproc/map -> parse - // 0x804800 0x805500 13 15 0xc6e18960 r-x 21 0x0 COW NC vnode - long rlower, rupper; - while (fscanf(pF, "0x%lx 0x%lx", &rlower, &rupper) != EOF) - { - // Check whether we're IN THERE! - if (lower >= rlower && upper <= rupper) - { - fclose(pF); - return true; - } - // Read to end of line - int c; - while ((c = fgetc(pF)) != '\n') - { - if (c == EOF) - break; - } - if (c == EOF) - break; - } - fclose(pF); - return false; - } - - // Both of the above failed, try to actually read and trap sigsegv (implemented by Damaged Soul) - void(*prevHandler)(int sig); - g_BadReadCalled = true; - - if (setjmp(g_BadReadJmpBuf)) - return true; - - prevHandler = signal(SIGSEGV, BadReadHandler); - - volatile const char *p = reinterpret_cast(addr); - char dummy; - - for (size_t i = 0; i < len; i++) - dummy = p[i]; - (void)dummy; // silence unused var, we must read from p - - g_BadReadCalled = false; - - signal(SIGSEGV, prevHandler); - - return false; -#elif SH_SYS == SH_SYS_APPLE - struct sigaction sa, osa, osa2; - sa.sa_sigaction = BadReadHandler; - sa.sa_flags = SA_SIGINFO | SA_RESTART; - - g_BadReadCalled = true; - - if (setjmp(g_BadReadJmpBuf)) - return false; - - if (sigaction(SIGBUS, &sa, &osa) == -1) - return false; - if (sigaction(SIGSEGV, &sa, &osa2) == -1) - return false; - - volatile const char *p = reinterpret_cast(addr); - char dummy; - - for (size_t i = 0; i < len; i++) - dummy = p[i]; - (void)dummy; // silence unused var, we must read from p - - g_BadReadCalled = false; - - sigaction(SIGBUS, &osa, NULL); - sigaction(SIGSEGV, &osa2, NULL); - - return true; -#elif SH_XP == SH_XP_WINAPI - // On Win32, simply use IsBadReadPtr - return !IsBadReadPtr(addr, len); -#endif - } - } -} - -#endif diff --git a/metamod-source/core/sourcehook/sh_pagealloc.h b/metamod-source/core/sourcehook/sh_pagealloc.h deleted file mode 100644 index 3a415593..00000000 --- a/metamod-source/core/sourcehook/sh_pagealloc.h +++ /dev/null @@ -1,330 +0,0 @@ -#ifndef __SH_PAGEALLOC_H__ -#define __SH_PAGEALLOC_H__ - -#include "sh_list.h" -#include "sh_memory.h" - -# if SH_XP == SH_XP_WINAPI -# include -# elif SH_XP == SH_XP_POSIX -# include -# include -# else -# error Unsupported OS/Compiler -# endif - - -namespace SourceHook -{ - - /* - Class which lets us allocate memory regions in special pages only meant for on the fly code generation. - - If we alloc with malloc and then set the page access type to read/exec only, other regions returned by - malloc that are in the same page would lose their write access as well and the process could crash. - - Allocating one page per code generation session is usually a waste of memory and on some platforms also - a waste of virtual address space (Windows’ VirtualAlloc has a granularity of 64K). - - - IMPORTANT: the memory that Alloc() returns is not a in a defined state! - It could be in read+exec OR read+write mode. - -> call SetRE() or SetRW() before using allocated memory! - */ - class CPageAlloc - { - struct AllocationUnit - { - size_t begin_offset; - size_t size; - - AllocationUnit(size_t p_offs, size_t p_size) : begin_offset(p_offs), size(p_size) - { - } - - bool operator < (const AllocationUnit &other) const - { - return begin_offset < other.begin_offset; - } - }; - - typedef List AUList; - struct AllocatedRegion - { - void *startPtr; - size_t size; - bool isolated; // may contain only one AU - size_t minAlignment; - AUList allocUnits; - bool isRE; // true: RE, otherwise: RW - - void CheckGap(size_t gap_begin, size_t gap_end, size_t reqsize, - size_t &smallestgap_pos, size_t &smallestgap_size, size_t &outAlignBytes) - { - size_t gapsize = gap_end - gap_begin; - // How many bytes do we actually need here? - // = requested size + alignment bytes - size_t neededSize = reqsize; - size_t alignBytes = minAlignment - ((reinterpret_cast(startPtr) + gap_begin) % minAlignment); - - alignBytes %= minAlignment; - neededSize += alignBytes; - - if (gapsize >= neededSize) - { - if (gapsize < smallestgap_size) - { - smallestgap_size = gapsize; - smallestgap_pos = gap_begin; - outAlignBytes = alignBytes; - } - } - } - - bool TryAlloc(size_t reqsize, void * &outAddr) - { - // Check for isolated - if (isolated && !allocUnits.empty()) - return false; - - // Find the smallest gap where req fits - size_t lastend = 0; - size_t smallestgap_pos = size + 1; - size_t smallestgap_size = size + 1; - size_t alignmentbytes = 0; - - for (AUList::iterator iter = allocUnits.begin(); iter != allocUnits.end(); ++iter) - { - CheckGap(lastend, iter->begin_offset, reqsize, smallestgap_pos, smallestgap_size, alignmentbytes); - lastend = iter->begin_offset + iter->size; - } - - CheckGap(lastend, size, reqsize, smallestgap_pos, smallestgap_size, alignmentbytes); - - if (smallestgap_pos < size) - { - outAddr = reinterpret_cast(reinterpret_cast(startPtr) + smallestgap_pos + alignmentbytes); - allocUnits.push_sorted( AllocationUnit(smallestgap_pos, reqsize + alignmentbytes) ); - return true; - } - else - { - return false; - } - } - - bool TryFree(void *addr) - { - if (addr < startPtr || addr >= reinterpret_cast(reinterpret_cast(startPtr) + size)) - return false; - - intptr_t start = reinterpret_cast(startPtr); - - for (AUList::iterator iter = allocUnits.begin(); iter != allocUnits.end(); ++iter) - { - size_t AUBegin = start + iter->begin_offset; - void *alignedAUBegin = reinterpret_cast( - AUBegin + ((minAlignment - AUBegin % minAlignment) % minAlignment) - ); - - if (addr == alignedAUBegin) - { - DebugCleanMemory(reinterpret_cast(startPtr) + iter->begin_offset, - iter->size); - allocUnits.erase(iter); - return true; - } - } - - return false; - } - - void DebugCleanMemory(unsigned char* start, size_t size) - { - bool wasRE = isRE; - if (isRE) - { - SetRW(); - } - - unsigned char* end = start + size; - for (unsigned char* p = start; p != end; ++p) - { - *p = 0xCC; - } - - if (wasRE) - { - SetRE(); - } - } - - bool Contains(void *addr) - { - return addr >= startPtr && addr < reinterpret_cast(reinterpret_cast(startPtr) + size); - } - - void FreeRegion() - { -#if SH_XP == SH_XP_POSIX - munmap(startPtr, size); -#elif SH_XP == SH_XP_WINAPI - VirtualFree(startPtr, 0, MEM_RELEASE); -#endif - } - - void SetRE() - { - SetMemAccess(startPtr, size, SH_MEM_READ | SH_MEM_EXEC); - isRE = true; - } - - void SetRW() - { - SetMemAccess(startPtr, size, SH_MEM_READ | SH_MEM_WRITE); - isRE = false; - } - }; - - typedef List ARList; - - size_t m_MinAlignment; - size_t m_PageSize; - ARList m_Regions; - - bool AddRegion(size_t minSize, bool isolated) - { - AllocatedRegion newRegion; - newRegion.startPtr = 0; - newRegion.isolated = isolated; - newRegion.minAlignment = m_MinAlignment; - - // Compute real size -> align up to m_PageSize boundary - - newRegion.size = minSize - (minSize % m_PageSize); - if (newRegion.size < minSize) - newRegion.size += m_PageSize; - -#if SH_XP == SH_XP_POSIX -# if !defined MAP_ANONYMOUS -# define MAP_ANONYMOUS MAP_ANON -# endif - newRegion.startPtr = mmap(0, newRegion.size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); -#elif SH_XP == SH_XP_WINAPI - newRegion.startPtr = VirtualAlloc(NULL, newRegion.size, MEM_COMMIT, PAGE_READWRITE); -#endif - - if (newRegion.startPtr) - { - newRegion.SetRW(); - m_Regions.push_back(newRegion); - return true; - } - else - { - return false; - } - - } - - void *AllocPriv(size_t size, bool isolated) - { - void *addr; - - if (!isolated) - { - for (ARList::iterator iter = m_Regions.begin(); iter != m_Regions.end(); ++iter) - { - if (iter->TryAlloc(size, addr)) - return addr; - } - } - - if (!AddRegion(size, isolated)) - return NULL; - - bool tmp = m_Regions.back().TryAlloc(size, addr); - SH_ASSERT(tmp, ("TryAlloc fails after AddRegion")); - return tmp ? addr : NULL; - } - - public: - CPageAlloc(size_t minAlignment = 4 /* power of 2 */ ) : m_MinAlignment(minAlignment) - { -#if SH_XP == SH_XP_POSIX - m_PageSize = sysconf(_SC_PAGESIZE); -#elif SH_XP == SH_XP_WINAPI - SYSTEM_INFO sysInfo; - GetSystemInfo(&sysInfo); - m_PageSize = sysInfo.dwPageSize; -#endif - } - - ~CPageAlloc() - { - // Free all regions - for (ARList::iterator iter = m_Regions.begin(); iter != m_Regions.end(); ++iter) - { - iter->FreeRegion(); - } - } - - void *Alloc(size_t size) - { - return AllocPriv(size, false); - } - - void *AllocIsolated(size_t size) - { - return AllocPriv(size, true); - } - - void Free(void *ptr) - { - for (ARList::iterator iter = m_Regions.begin(); iter != m_Regions.end(); ++iter) - { - if (iter->TryFree(ptr)) - { - if (iter->allocUnits.empty()) - { - iter->FreeRegion(); - m_Regions.erase(iter); - } - break; - } - } - } - - void SetRE(void *ptr) - { - for (ARList::iterator iter = m_Regions.begin(); iter != m_Regions.end(); ++iter) - { - if (iter->Contains(ptr)) - { - iter->SetRE(); - break; - } - } - } - - void SetRW(void *ptr) - { - for (ARList::iterator iter = m_Regions.begin(); iter != m_Regions.end(); ++iter) - { - if (iter->Contains(ptr)) - { - iter->SetRW(); - break; - } - } - } - - size_t GetPageSize() - { - return m_PageSize; - } - }; -} - -#endif - diff --git a/metamod-source/core/sourcehook/sh_stack.h b/metamod-source/core/sourcehook/sh_stack.h deleted file mode 100644 index 5322db28..00000000 --- a/metamod-source/core/sourcehook/sh_stack.h +++ /dev/null @@ -1,232 +0,0 @@ -/* ======== SourceMM ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#ifndef __SH_STACK_H__ -#define __SH_STACK_H__ - -#include -#include "sh_vector.h" - -namespace SourceHook -{ - // May _never_ reallocate used memory! - - template class CStack - { - static const size_t SECTOR_SIZE = 16; - - CVector m_Sectors; // Stores sectors - - size_t m_UsedSize; - - void clear() - { - typename CVector::iterator sect_iter; - for (sect_iter = m_Sectors.begin(); sect_iter != m_Sectors.end(); ++sect_iter) - { - delete [] *sect_iter; - } - m_Sectors.clear(); - } - public: - friend class iterator; - class iterator - { - CStack *m_pParent; - size_t m_Index; - public: - iterator(CStack *pParent, size_t id) : m_pParent(pParent), m_Index(id) - { - } - - iterator(CStack *pParent) : m_pParent(pParent), m_Index(0) - { - } - - iterator() : m_pParent(NULL), m_Index(0) - { - } - - T &operator *() - { - return m_pParent->at(m_Index); - } - const T &operator *() const - { - return m_pParent->at(m_Index); - } - - T * operator->() - { - return &(m_pParent->at(m_Index)); - } - - const T * operator->() const - { - return &(m_pParent->at(m_Index)); - } - - iterator & operator++() // preincrement - { - ++m_Index; - return (*this); - } - - iterator operator++(int) // postincrement - { - iterator tmp = *this; - ++m_Index; - return tmp; - } - - iterator & operator--() // predecrement - { - --m_Index; - return (*this); - } - - iterator operator--(int) // postdecrememnt - { - iterator tmp = *this; - --m_Index; - return tmp; - } - - bool operator==(const iterator & right) const - { - return (m_pParent == right.m_pParent && m_Index == right.m_Index); - } - - bool operator!=(const iterator & right) const - { - return !(*this == right); - } - }; - CStack() : m_UsedSize(0) - { - } - - CStack(const CStack &other) - { - for (typename CVector::iterator sect_iter = other.m_Sectors.begin(); - sect_iter != other.m_Sectors.end(); ++sect_iter) - { - m_Sectors.push_back(new T[SECTOR_SIZE]); - for (size_t i = 0; i < SECTOR_SIZE; ++i) - m_Sectors.back()[i] = (*sect_iter)[i]; - } - m_UsedSize = other.m_UsedSize; - } - - CStack & operator =(const CStack &other) - { - clear(); - for (typename CVector::iterator sect_iter = other.m_Sectors.begin(); - sect_iter != other.m_Sectors.end(); ++sect_iter) - { - m_Sectors.push_back(new T[SECTOR_SIZE]); - for (size_t i = 0; i < SECTOR_SIZE; ++i) - m_Sectors.back()[i] = (*sect_iter)[i]; - } - m_UsedSize = other.m_UsedSize; - return *this; - } - - ~CStack() - { - clear(); - } - - T &at(size_t x) - { - return m_Sectors[x / SECTOR_SIZE][x % SECTOR_SIZE]; - } - - const T &at(size_t x) const - { - return m_Sectors[x / SECTOR_SIZE][x % SECTOR_SIZE]; - } - - bool push(const T &val) - { - if ((m_UsedSize / SECTOR_SIZE) >= m_Sectors.size()) - { - // New sector - m_Sectors.push_back(new T[SECTOR_SIZE]); - } - - at(m_UsedSize) = val; - - ++m_UsedSize; - return true; - } - - T *make_next() - { - if ((m_UsedSize / SECTOR_SIZE) >= m_Sectors.size()) - { - // New sector - m_Sectors.push_back(new T[SECTOR_SIZE]); - } - - return &(at(m_UsedSize++)); - } - - void pop() - { - --m_UsedSize; - } - - void popall() - { - m_UsedSize = 0; - } - - T &front() - { - return at(m_UsedSize-1); - } - - const T &front() const - { - return at(m_UsedSize-1); - } - - T &second() - { - return at(m_UsedSize-2); - } - - const T &second() const - { - return at(m_UsedSize-2); - } - - iterator begin() - { - return iterator(this, 0); - } - iterator end() - { - return iterator(this, m_UsedSize); - } - - size_t size() - { - return m_UsedSize; - } - bool empty() - { - return m_UsedSize == 0 ? true : false; - } - }; -}; //namespace SourceHook - -#endif diff --git a/metamod-source/core/sourcehook/sh_string.h b/metamod-source/core/sourcehook/sh_string.h deleted file mode 100644 index 49c46104..00000000 --- a/metamod-source/core/sourcehook/sh_string.h +++ /dev/null @@ -1,401 +0,0 @@ -/* ======== SourceMM ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): David "BAILOPAN" Anderson -* ============================ -*/ - -/* AMX Mod X - * - * by the AMX Mod X Development Team - */ - -#ifndef _INCLUDE_CSTRING_H -#define _INCLUDE_CSTRING_H - -#include -#include - -namespace SourceHook -{ -class String -{ -public: - String() - { - v = NULL; - a_size = 0; - //assign(""); - } - - ~String() - { - if (v) - delete [] v; - } - - String(const char *src) - { - v = NULL; - a_size = 0; - assign(src); - } - - String(const String &src) - { - v = NULL; - a_size = 0; - assign(src.c_str()); - } - - bool operator ==(const String &other) - { - return (compare(other.c_str()) == 0); - } - - bool operator ==(const char *other) - { - return (compare(other) == 0); - } - - const char *c_str() { return v?v:""; } - - const char *c_str() const { return v?v:""; } - - void append(const char *t) - { - Grow(size() + strlen(t) + 1); - strcat(v, t); - } - - void append(const char c) - { - size_t len = size(); - Grow(len + 2); - v[len] = c; - v[len + 1] = '\0'; - } - - void append(String &d) - { - append(d.c_str()); - } - - void assign(const String &src) - { - assign(src.c_str()); - } - - void assign(const char *d) - { - if (!d) - { - clear(); - } else { - Grow(strlen(d) + 1, false); - strcpy(v, d); - } - } - - void clear() - { - if (v) - v[0] = '\0'; - } - - int compare (const char *d) const - { - if (!v) - return strcmp("", d); - else - return strcmp(v, d); - } - - //Added this for amxx inclusion - bool empty() const - { - if (!v) - return true; - - if (v[0] == '\0') - return true; - - return false; - } - - size_t size() const - { - if (v) - return strlen(v); - else - return 0; - } - - size_t find(const char c, size_t index = 0) const - { - size_t len = size(); - if (len < 1) - return npos; - if (index >= len) - return npos; - size_t i = 0; - for (i=index; i= len) - return npos; - size_t i; - if (index == npos) - i = len - 1; - else - i = index; - - for (; i+1>0; i--) - { - if (v[i] == c) - { - return i; - } - } - - return npos; - } - - bool is_space(int c) const - { - if (c == '\f' || c == '\n' || - c == '\t' || c == '\r' || - c == '\v' || c == ' ') - { - return true; - } - - return false; - } - - void trim() - { - if (!v) - return; - - size_t i = 0; - size_t j = 0; - size_t len = strlen(v); - - if (len == 1) - { - if (is_space(v[i])) - { - clear(); - return; - } - } - - unsigned char c0 = v[0]; - - if (is_space(c0)) - { - for (i=0; i len-start) - num = len - start; - //do the erasing - bool copyflag = false; - for (i=0; i=start && i= len || !v) - return ns; - - if (num == npos) - { - num = len - index; - } else if (index+num >= len) { - num = len - index; - } - - size_t i = 0; - size_t nslen = num + 2; - - ns.Grow(nslen); - - for (i=index; i= 65 && v[i] <= 90) - v[i] &= ~(1<<5); - } - } - - String & operator = (const String &src) - { - assign(src); - return *this; - } - - String & operator = (const char *src) - { - assign(src); - return *this; - - } - - char operator [] (size_t index) const - { - if (index >= size() || !v) - { - return -1; - } else { - return v[index]; - } - } - - int at(size_t a) const - { - if (a >= size() || !v) - return -1; - - return v[a]; - } - - bool at(size_t at, char c) - { - if (at >= size() || !v) - return false; - - v[at] = c; - - return true; - } - -private: - void Grow(size_t d, bool copy=true) - { - if (d <= a_size) - return; - char *n = new char[d + 1]; - if (copy && v) - strcpy(n, v); - if (v) - delete [] v; - else - strcpy(n, ""); - v = n; - a_size = d + 1; - } - - char *v; - size_t a_size; -public: - static const size_t npos = static_cast(-1); -}; - -}; //NAMESPACE - -#endif //_INCLUDE_CSTRING_H diff --git a/metamod-source/core/sourcehook/sh_tinyhash.h b/metamod-source/core/sourcehook/sh_tinyhash.h deleted file mode 100644 index 60b919c3..00000000 --- a/metamod-source/core/sourcehook/sh_tinyhash.h +++ /dev/null @@ -1,534 +0,0 @@ -/* ======== SourceMM ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): David "BAILOPAN" Anderson -* ============================ -*/ - -#ifndef _INCLUDE_SH_TINYHASH_H_ -#define _INCLUDE_SH_TINYHASH_H_ - -#include "sh_list.h" - -#define _T_INIT_HASH_SIZE 32 - -namespace SourceHook -{ - template - int HashFunction(const K & k); - - template - int HashAlt(const U &u); - - template - int CompareAlt(const U &k1, const K &k2); - - template - int Compare(const K & k1, const K & k2); - - /** - * This is a tiny, growable hash class. - * Meant for quick and dirty dictionaries only! - */ - template - class THash - { - public: - struct THashNode - { - THashNode(const K & k, const V & v) : - key(k), val(v) - { - }; - THashNode & operator =(const THashNode &other) - { - key = other.key; - val = other.val; - } - K key; - V val; - }; - typedef List * NodePtr; - public: - class const_iterator; - THash() : m_Buckets(NULL), m_numBuckets(0), m_percentUsed(0.0f) - { - _Refactor(); - } - THash(const THash &other) : m_Buckets(new NodePtr[other.m_numBuckets]), - m_numBuckets(other.m_numBuckets), m_percentUsed(other.m_percentUsed) - { - for (size_t i=0; ikey)->val = iter->val; - } - void operator=(const THash &other) - { - clear(); - for (const_iterator iter = other.begin(); iter != other.end(); ++iter) - _FindOrInsert(iter->key)->val = iter->val; - } - - ~THash() - { - _Clear(); - } - void clear() - { - _Clear(); - _Refactor(); - } - size_t GetBuckets() - { - return m_numBuckets; - } - float PercentUsed() - { - return m_percentUsed; - } - V & operator [](const K & key) - { - THashNode *pNode = _FindOrInsert(key); - return pNode->val; - } - private: - void _Clear() - { - typename List::iterator iter, end; - for (size_t i=0; iend(); - iter = m_Buckets[i]->begin(); - while (iter != end) - { - delete (*iter); - iter++; - } - delete m_Buckets[i]; - m_Buckets[i] = NULL; - } - } - if (m_Buckets) - delete [] m_Buckets; - m_Buckets = NULL; - m_numBuckets = 0; - } - public: - template - V & AltFindOrInsert(const U & ukey) - { - size_t place = HashAlt(ukey) % m_numBuckets; - THashNode *pNode = NULL; - if (!m_Buckets[place]) - { - m_Buckets[place] = new List; - pNode = new THashNode(ukey, V()); - m_Buckets[place]->push_back(pNode); - m_percentUsed += (1.0f / (float)m_numBuckets); - } else { - typename List::iterator iter; - for (iter=m_Buckets[place]->begin(); iter!=m_Buckets[place]->end(); iter++) - { - if (CompareAlt(ukey, (*iter)->key) == 0) - { - return (*iter)->val; - } - } - //node does not exist - pNode = new THashNode(ukey, V()); - m_Buckets[place]->push_back(pNode); - } - if (PercentUsed() > 0.75f) - { - _Refactor(); - } - return pNode->val; - } - private: - THashNode *_FindOrInsert(const K & key) - { - size_t place = HashFunction(key) % m_numBuckets; - THashNode *pNode = NULL; - if (!m_Buckets[place]) - { - m_Buckets[place] = new List; - pNode = new THashNode(key, V()); - m_Buckets[place]->push_back(pNode); - m_percentUsed += (1.0f / (float)m_numBuckets); - } else { - typename List::iterator iter; - for (iter=m_Buckets[place]->begin(); iter!=m_Buckets[place]->end(); iter++) - { - if (Compare((*iter)->key, key) == 0) - return (*iter); - } - //node does not exist - pNode = new THashNode(key, V()); - m_Buckets[place]->push_back(pNode); - } - if (PercentUsed() > 0.75f) - { - _Refactor(); - } - return pNode; - } - void _Refactor() - { - m_percentUsed = 0.0f; - if (!m_numBuckets) - { - m_numBuckets = _T_INIT_HASH_SIZE; - m_Buckets = new NodePtr[m_numBuckets]; - for (size_t i=0; i::iterator iter; - size_t place; - THashNode *pHashNode; - NodePtr *temp = new NodePtr[m_numBuckets]; - for (size_t i=0; ibegin(); iter != m_Buckets[i]->end(); iter++) - { - pHashNode = (*iter); - //rehash it with the new bucket filter - place = HashFunction(pHashNode->key) % m_numBuckets; - //add it to the new hash table - if (!temp[place]) - { - temp[place] = new List; - m_percentUsed += (1.0f / (float)m_numBuckets); - } - temp[place]->push_back(pHashNode); - } - //delete that bucket! - delete m_Buckets[i]; - m_Buckets[i] = NULL; - } - } - //reassign bucket table - delete [] m_Buckets; - m_Buckets = temp; - } - } - public: - class iterator - { - friend class THash; - public: - iterator() : curbucket(-1), hash(NULL), end(true) - { - }; - iterator(THash *h) : curbucket(-1), hash(h), end(false) - { - if (!h->m_Buckets) - end = true; - else - _Inc(); - }; - //pre increment - iterator & operator++() - { - _Inc(); - return *this; - } - //post increment - iterator operator++(int) - { - iterator old(*this); - _Inc(); - return old; - } - const THashNode & operator * () const - { - return *(*iter); - } - THashNode & operator * () - { - return *(*iter); - } - const THashNode * operator ->() const - { - return (*iter); - } - THashNode * operator ->() - { - return (*iter); - } - bool operator ==(const iterator &where) const - { - if (where.hash == this->hash - && where.end == this->end - && - (this->end || - ((where.curbucket == this->curbucket) - && (where.iter == iter)) - )) - return true; - return false; - } - bool operator !=(const iterator &where) const - { - return !( (*this) == where ); - } - - void erase() - { - if (end || !hash || curbucket < 0 || curbucket >= static_cast(hash->m_numBuckets)) - return; - - // Remove this element and move to the next one - iterator tmp = *this; - ++tmp; - delete (*iter); - hash->m_Buckets[curbucket]->erase(iter); - *this = tmp; - - // :TODO: Maybe refactor to a lower size if required - } - private: - void _Inc() - { - if (end || !hash || curbucket >= static_cast(hash->m_numBuckets)) - return; - if (curbucket < 0) - { - for (int i=0; i<(int)hash->m_numBuckets; i++) - { - if (hash->m_Buckets[i]) - { - iter = hash->m_Buckets[i]->begin(); - if (iter == hash->m_Buckets[i]->end()) - continue; - curbucket = i; - break; - } - } - if (curbucket < 0) - end = true; - } else { - if (iter != hash->m_Buckets[curbucket]->end()) - iter++; - if (iter == hash->m_Buckets[curbucket]->end()) - { - int oldbucket = curbucket; - for (int i=curbucket+1; i<(int)hash->m_numBuckets; i++) - { - if (hash->m_Buckets[i]) - { - iter = hash->m_Buckets[i]->begin(); - if (iter == hash->m_Buckets[i]->end()) - continue; - curbucket = i; - break; - } - } - if (curbucket == oldbucket) - end = true; - } - } - } - private: - int curbucket; - typename SourceHook::List::iterator iter; - THash *hash; - bool end; - }; - class const_iterator - { - friend class THash; - public: - const_iterator() : curbucket(-1), hash(NULL), end(true) - { - }; - const_iterator(const THash *h) : curbucket(-1), hash(h), end(false) - { - if (!h->m_Buckets) - end = true; - else - _Inc(); - }; - //pre increment - const_iterator & operator++() - { - _Inc(); - return *this; - } - //post increment - const_iterator operator++(int) - { - iterator old(*this); - _Inc(); - return old; - } - const THashNode & operator * () const - { - return *(*iter); - } - const THashNode * operator ->() const - { - return (*iter); - } - bool operator ==(const const_iterator &where) const - { - if (where.hash == this->hash - && where.end == this->end - && - (this->end || - ((where.curbucket == this->curbucket) - && (where.iter == iter)) - )) - return true; - return false; - } - bool operator !=(const const_iterator &where) const - { - return !( (*this) == where ); - } - private: - void _Inc() - { - if (end || !hash || curbucket >= static_cast(hash->m_numBuckets)) - return; - if (curbucket < 0) - { - for (int i=0; i<(int)hash->m_numBuckets; i++) - { - if (hash->m_Buckets[i]) - { - iter = hash->m_Buckets[i]->begin(); - if (iter == hash->m_Buckets[i]->end()) - continue; - curbucket = i; - break; - } - } - if (curbucket < 0) - end = true; - } else { - if (iter != hash->m_Buckets[curbucket]->end()) - iter++; - if (iter == hash->m_Buckets[curbucket]->end()) - { - int oldbucket = curbucket; - for (int i=curbucket+1; i<(int)hash->m_numBuckets; i++) - { - if (hash->m_Buckets[i]) - { - iter = hash->m_Buckets[i]->begin(); - if (iter == hash->m_Buckets[i]->end()) - continue; - curbucket = i; - break; - } - } - if (curbucket == oldbucket) - end = true; - } - } - } - private: - int curbucket; - typename SourceHook::List::iterator iter; - const THash *hash; - bool end; - }; - public: - iterator begin() - { - return iterator(this); - } - iterator end() - { - iterator iter; - iter.hash = this; - return iter; - } - - const_iterator begin() const - { - return const_iterator(this); - } - const_iterator end() const - { - const_iterator iter; - iter.hash = this; - return iter; - } - - template - iterator find(const U & u) const - { - iterator b = begin(); - iterator e = end(); - for (iterator iter = b; iter != e; iter++) - { - if ( (*iter).key == u ) - return iter; - } - return end(); - } - template - iterator find(const U & u) - { - iterator b = begin(); - iterator e = end(); - for (iterator iter = b; iter != e; iter++) - { - if ( (*iter).key == u ) - return iter; - } - return end(); - } - template - iterator FindAlt(const U & u) - { - iterator b = begin(); - iterator e = end(); - for (iterator iter = b; iter != e; iter++) - { - if (CompareAlt(u, (*iter).key) == 0) - { - return iter; - } - } - return e; - } - iterator erase(iterator where) - { - where.erase(); - return where; - } - template - void erase(const U & u) - { - iterator iter = find(u); - if (iter == end()) - return; - iter.erase(); - } - friend class iterator; - friend class const_iterator; - private: - NodePtr *m_Buckets; - size_t m_numBuckets; - float m_percentUsed; - }; -}; - -#endif //_INCLUDE_SH_TINYHASH_H_ diff --git a/metamod-source/core/sourcehook/sh_vector.h b/metamod-source/core/sourcehook/sh_vector.h deleted file mode 100644 index 9e682a13..00000000 --- a/metamod-source/core/sourcehook/sh_vector.h +++ /dev/null @@ -1,519 +0,0 @@ -/* ======== SourceMM ======== -* Copyright (C) 2004-2008 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#ifndef __CVECTOR_H__ -#define __CVECTOR_H__ - -#include - -//This file originally from AMX Mod X -namespace SourceHook -{ -// Vector -template class CVector -{ - bool Grow(size_t amount) - { - // automatic grow - size_t newSize = m_Size * 2; - - if (newSize == 0) - { - newSize = 8; - } - - while (m_CurrentUsedSize + amount > newSize) - { - newSize *= 2; - } - - T *newData = new T[newSize]; - - if (m_Data) - { - for (size_t i=0; i= m_Size) - { - return Grow(amount); - } - else - { - return true; - } - } - - bool ChangeSize(size_t size) - { - // change size - if (size == m_Size) - { - return true; - } - - if (!size) - { - if (m_Data) - { - delete [] m_Data; - m_Data = NULL; - m_Size = 0; - } - return true; - } - - T *newData = new T[size]; - - if (m_Data) - { - size_t end = (m_CurrentUsedSize < size) ? (m_CurrentUsedSize) : size; - for (size_t i=0; i m_Size) - { - m_CurrentUsedSize = m_Size; - } - - return true; - } - - void FreeMemIfPossible() - { - if (!m_Data) - { - return; - } - - if (!m_CurrentUsedSize) - { - ChangeSize(0); - return; - } - - size_t newSize = m_Size; - while (m_CurrentUsedSize <= newSize / 2) - { - newSize /= 2; - } - - if (newSize != m_Size) - { - ChangeSize(newSize); - } - } -protected: - T *m_Data; - size_t m_Size; - size_t m_CurrentUsedSize; -public: - class iterator - { - protected: - T *m_Ptr; - public: - // constructors / destructors - iterator() - { - m_Ptr = NULL; - } - - iterator(T * ptr) - { - m_Ptr = ptr; - } - - // member functions - T * base() - { - return m_Ptr; - } - - const T * base() const - { - return m_Ptr; - } - - // operators - T & operator*() - { - return *m_Ptr; - } - - T * operator->() - { - return m_Ptr; - } - - iterator & operator++() // preincrement - { - ++m_Ptr; - return (*this); - } - - iterator operator++(int) // postincrement - { - iterator tmp = *this; - ++m_Ptr; - return tmp; - } - - iterator & operator--() // predecrement - { - --m_Ptr; - return (*this); - } - - iterator operator--(int) // postdecrememnt - { - iterator tmp = *this; - --m_Ptr; - return tmp; - } - - bool operator==(T * right) const - { - return (m_Ptr == right); - } - - bool operator==(const iterator & right) const - { - return (m_Ptr == right.m_Ptr); - } - - bool operator!=(T * right) const - { - return (m_Ptr != right); - } - - bool operator!=(const iterator & right) const - { - return (m_Ptr != right.m_Ptr); - } - - iterator & operator+=(size_t offset) - { - m_Ptr += offset; - return (*this); - } - - iterator & operator-=(size_t offset) - { - m_Ptr -= offset; - return (*this); - } - - iterator operator+(size_t offset) const - { - iterator tmp(*this); - tmp.m_Ptr += offset; - return tmp; - } - - iterator operator-(size_t offset) const - { - iterator tmp(*this); - tmp.m_Ptr -= offset; - return tmp; - } - - T & operator[](size_t offset) - { - return (*(*this + offset)); - } - - const T & operator[](size_t offset) const - { - return (*(*this + offset)); - } - - bool operator<(const iterator & right) const - { - return m_Ptr < right.m_Ptr; - } - - bool operator>(const iterator & right) const - { - return m_Ptr > right.m_Ptr; - } - - bool operator<=(const iterator & right) const - { - return m_Ptr <= right.m_Ptr; - } - - bool operator>=(const iterator & right) const - { - return m_Ptr >= right.m_Ptr; - } - - size_t operator-(const iterator & right) const - { - return m_Ptr - right.m_Ptr; - } - }; - - // constructors / destructors - CVector() - { - m_Size = 0; - m_CurrentUsedSize = 0; - m_Data = NULL; - } - - CVector(const CVector & other) - { - // copy data - m_Data = new T [other.m_CurrentUsedSize]; - m_Size = other.m_CurrentUsedSize; - m_CurrentUsedSize = other.m_CurrentUsedSize; - for (size_t i=0; i & other) - { - clear(); - ChangeSize(other.size()); - m_CurrentUsedSize = other.size(); - for (size_t i=0; i m_CurrentUsedSize) - assert(0); - return iterator(m_Data + pos); - } - - bool reserve(size_t newSize) - { - if (newSize > m_Size) - return ChangeSize(newSize); - return true; - } - - bool push_back(const T & elem) - { - if (!GrowIfNeeded(1)) - { - return false; - } - - m_Data[m_CurrentUsedSize++] = elem; - - return true; - } - - void pop_back() - { - --m_CurrentUsedSize; - if (m_CurrentUsedSize < 0) - m_CurrentUsedSize = 0; - - FreeMemIfPossible(); - } - - bool resize(size_t newSize) - { - return resize(newSize, T()); - } - - bool resize(size_t newSize, T defval) - { - if (!ChangeSize(newSize)) - return false; - for (size_t i = m_CurrentUsedSize; i < newSize; ++i) - m_Data[i] = defval; - m_CurrentUsedSize = newSize; - return true; - } - - bool empty() const - { - return (m_CurrentUsedSize == 0); - } - - T & at(size_t pos) - { - if (pos > m_CurrentUsedSize) - { - assert(0); - } - return m_Data[pos]; - } - - const T & at(size_t pos) const - { - if (pos > m_CurrentUsedSize) - { - assert(0); - } - return m_Data[pos]; - } - - T & operator[](size_t pos) - { - return at(pos); - } - - const T & operator[](size_t pos) const - { - return at(pos); - } - - T & front() - { - if (m_CurrentUsedSize < 1) - { - assert(0); - } - return m_Data[0]; - } - - const T & front() const - { - if (m_CurrentUsedSize < 1) - { - assert(0); - } - return m_Data[0]; - } - - T & back() - { - if (m_CurrentUsedSize < 1) - { - assert(0); - } - return m_Data[m_CurrentUsedSize - 1]; - } - - const T & back() const - { - if (m_CurrentUsedSize < 1) - { - assert(0); - } - return m_Data[m_CurrentUsedSize - 1]; - } - - iterator insert(iterator where, const T & value) - { - // validate iter - if (where < m_Data || where > (m_Data + m_CurrentUsedSize)) - return iterator(0); - - size_t ofs = where - begin(); - - if (!GrowIfNeeded(1)) - { - return iterator(0); - } - - ++m_CurrentUsedSize; - - where = begin() + ofs; - - // Move subsequent entries - for (T *ptr = m_Data + m_CurrentUsedSize - 2; ptr >= where.base(); --ptr) - *(ptr + 1) = *ptr; - - *where.base() = value; - - return where; - } - - iterator erase(iterator where) - { - // validate iter - if (where < m_Data || where >= (m_Data + m_CurrentUsedSize)) - return iterator(0); - - size_t ofs = where - begin(); - - if (m_CurrentUsedSize > 1) - { - // move - T *theend = m_Data + m_CurrentUsedSize; - for (T *ptr = where.base() + 1; ptr < theend; ++ptr) - *(ptr - 1) = *ptr; - } - - --m_CurrentUsedSize; - - FreeMemIfPossible(); - - return begin() + ofs; - } - - void clear() - { - m_Size = 0; - m_CurrentUsedSize = 0; - if (m_Data) - { - delete [] m_Data; - m_Data = NULL; - } - } -}; -}; //namespace SourceHook - -#endif // __CVECTOR_H__ diff --git a/metamod-source/core/sourcehook/sourcehook.cpp b/metamod-source/core/sourcehook/sourcehook.cpp deleted file mode 100644 index 8b66b2c3..00000000 --- a/metamod-source/core/sourcehook/sourcehook.cpp +++ /dev/null @@ -1,871 +0,0 @@ -/* ======== SourceHook ======== -* vim: set ts=4 sw=4 tw=99 noet: -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* Contributors: Scott "Damaged Soul" Ehlert -* ============================ -*/ - -/** - * @file sourcehook.cpp - * @brief Contains the implementation of the SourceHook API -*/ - -#if defined __GNUC__ -#include -#endif - -#include "sourcehook_impl.h" - -namespace SourceHook -{ - template<> - int HashFunction(const int & k) - { - return k; - } - template<> - int Compare(const int & k1, const int & k2) - { - if (k1 == k2) - return 0; - if (k1 > k2) - return 1; - if (k1 < k2) - return -1; - return 0; - } - - namespace Impl - { - ////////////////////////////////////////////////////////////////////////// - // CVfnPtrList - ////////////////////////////////////////////////////////////////////////// - - CVfnPtr *CVfnPtrList::GetVfnPtr(void *vfnptr) - { - iterator iter = find(vfnptr); - if (iter == end()) - { - // No vfnptr info object found - // --> create a new one - CVfnPtr newVfnPtr(vfnptr); - if (newVfnPtr.Init()) - { - push_back(newVfnPtr); - - return &(back()); - } - else - { - // Initialization failed. - return NULL; - } - } - else - { - return &(*iter); - } - } - - ////////////////////////////////////////////////////////////////////////// - // CSourceHookImpl - ////////////////////////////////////////////////////////////////////////// - - - CSourceHookImpl::CSourceHookImpl() - { - } - CSourceHookImpl::~CSourceHookImpl() - { - CompleteShutdown(); - } - - int CSourceHookImpl::GetIfaceVersion() - { - return SH_IFACE_VERSION; - } - - int CSourceHookImpl::GetImplVersion() - { - return SH_IMPL_VERSION; - } - - int CSourceHookImpl::AddHook(Plugin plug, AddHookMode mode, void *iface, int thisptr_offs, HookManagerPubFunc myHookMan, - ISHDelegate *handler, bool post) - { - if (mode != Hook_Normal && mode != Hook_VP && mode != Hook_DVP) - return 0; - - // Get info about hook manager - CHookManager hookManager(plug, myHookMan); - if (!hookManager) - return 0; - - void *adjustediface = NULL; - void **cur_vtptr = NULL; - void *cur_vfnptr = NULL; - - // find vfnptr - switch (mode) - { - case Hook_Normal: - adjustediface = reinterpret_cast(reinterpret_cast(iface) + thisptr_offs); - - cur_vtptr = *reinterpret_cast( - reinterpret_cast(adjustediface) + hookManager.GetVtblOffs()); - cur_vfnptr = reinterpret_cast(cur_vtptr + hookManager.GetVtblIdx()); - break; - - case Hook_VP: - - adjustediface = reinterpret_cast(reinterpret_cast(iface) + thisptr_offs); - - cur_vtptr = *reinterpret_cast( - reinterpret_cast(adjustediface) + hookManager.GetVtblOffs()); - cur_vfnptr = reinterpret_cast(cur_vtptr + hookManager.GetVtblIdx()); - - adjustediface = NULL; - break; - - case Hook_DVP: - adjustediface = NULL; - - cur_vtptr = reinterpret_cast(iface); - cur_vfnptr = cur_vtptr + hookManager.GetVtblIdx(); - - break; - } - - CVfnPtr *vfnPtr = m_VfnPtrs.GetVfnPtr(cur_vfnptr); - if (!vfnPtr) - { - // Could not create the vfnptr info object. - // This could be because a thunk generation on GCC - // has failed. See sourcehook_impl_cvfnptr.cpp - // for details. - return false; - } - - vfnPtr->AddHookMan(m_HookManList.GetHookMan(hookManager)); - CIface &ifaceinst = vfnPtr->GetIface(adjustediface); - - // Add the hook - CHook hook(plug, thisptr_offs, handler, - - m_HookIDMan.New(hookManager.GetProto(), hookManager.GetVtblOffs(), hookManager.GetVtblIdx(), - cur_vfnptr, adjustediface, plug, thisptr_offs, handler, post) - - ); - - if (post) - ifaceinst.GetPostHookList().push_back(hook); - else - ifaceinst.GetPreHookList().push_back(hook); - - return hook.GetID(); - } - - bool CSourceHookImpl::RemoveHook(Plugin plug, void *iface, int thisptr_offs, HookManagerPubFunc myHookMan, - ISHDelegate *handler, bool post) - { - // Get info about hook manager and compute adjustediface - CHookManager tmpHookMan(plug, myHookMan); - - void *adjustediface = reinterpret_cast(reinterpret_cast(iface)+thisptr_offs); - - // Loop through all hooks and remove those which match: - // hookman, vfnptr, iface, plug, adjusted iface, this ptr offs, handler, post - CVector removehooks; - m_HookIDMan.FindAllHooks(removehooks, tmpHookMan.GetProto(), tmpHookMan.GetVtblOffs(), tmpHookMan.GetVtblIdx(), - adjustediface, plug, thisptr_offs, handler, post); - - if (removehooks.empty()) - return false; - - bool status = false; - - for (CVector::iterator iter = removehooks.begin(); iter != removehooks.end(); ++iter) - { - if (RemoveHookByID(*iter)) - status = true; - } - return status; - } - - bool CSourceHookImpl::RemoveHookByID(int hookid) - { - const CHookIDManager::Entry *hentry; - - hentry = m_HookIDMan.QueryHook(hookid); - if (!hentry) - { - // hookid doesn't exist ! - return false; - } - - // find vfnptr - List::iterator vfnptr_iter = m_VfnPtrs.find(hentry->vfnptr); - if (vfnptr_iter == m_VfnPtrs.end()) - return false; - - // find iface - List::iterator iface_iter = vfnptr_iter->GetIfaceList().find(hentry->adjustediface); - if (iface_iter == vfnptr_iter->GetIfaceList().end()) - return false; - - // find hook - List &hooks = hentry->post ? iface_iter->GetPostHookList() : iface_iter->GetPreHookList(); - List::iterator hook_iter = hooks.find(hookid); - if (hook_iter == hooks.end()) - return false; - - hook_iter->GetHandler()->DeleteThis(); - - // Iterator movage! - List::iterator oldhookiter = hook_iter; - hook_iter = hooks.erase(hook_iter); - - for (CStack::iterator ctx_iter = m_ContextStack.begin(); - ctx_iter != m_ContextStack.end(); ++ctx_iter) - { - ctx_iter->HookRemoved(oldhookiter, hook_iter); - } - - if (iface_iter->GetPreHookList().empty() && iface_iter->GetPostHookList().empty()) - { - // -> Kill all contexts that use it! - for (CStack::iterator ctx_iter = m_ContextStack.begin(); - ctx_iter != m_ContextStack.end(); ++ctx_iter) - { - ctx_iter->IfaceRemoved(&(*iface_iter)); - } - - // There are no hooks on this iface anymore... - iface_iter = vfnptr_iter->GetIfaceList().erase(iface_iter); - - if (vfnptr_iter->GetIfaceList().empty()) - { - // No ifaces at all -> Deactivate the hook - - for (CStack::iterator ctx_iter = m_ContextStack.begin(); - ctx_iter != m_ContextStack.end(); ++ctx_iter) - { - ctx_iter->VfnPtrRemoved(&(*vfnptr_iter)); - } - - RevertAndRemoveVfnPtr(vfnptr_iter); - } - } - - m_HookIDMan.Remove(hookid); - return true; - } - - List::iterator CSourceHookImpl::RevertAndRemoveVfnPtr(List::iterator vfnptr_iter) - { - ICleanupTask *cleanupTask = vfnptr_iter->GetCleanupTask(); - - // Some vfnptrs require cleanup. - // Concrete case: on GCC, when the original vtable entry is not even - // we generate an even-aligned thunk to call the original function. - // If the vfnptr is being removed from a pre hook on the vfnptr - // we have to delay the cleanup of this thunk until the hook loop is done - // (because the orig function call mechanism is going to use the thunk). - - if (cleanupTask != NULL) - { - // If this vfnptr is in use in one of the hook loops running at the moment - // Schedule it for removal on the DEEPEST hook loop. - - size_t numOfContexts = m_ContextStack.size(); - // m_ContextStack.at(0) is the deepest hook context - // m_ContextStack.at(size-1) = m_ContextStack.front is the uppermost - - bool cleanupImmedieately = true; - - CVfnPtr *vfnPtrObjAddr = &(*vfnptr_iter); - for (size_t i = 0; i < numOfContexts; ++i) - { - CHookContext &context = m_ContextStack.at(i); - if (context.pVfnPtr == vfnPtrObjAddr) - { - // Found a hook context using this vfnptr at the moment. - context.m_CleanupTask = cleanupTask; - cleanupImmedieately = false; // Delay the cleanup - break; - } - } - - if (cleanupImmedieately) - { - cleanupTask->CleanupAndDeleteThis(); - } - } - - // Do the work - vfnptr_iter->Revert(); - return m_VfnPtrs.erase(vfnptr_iter); - } - - void CSourceHookImpl::SetRes(META_RES res) - { - *m_ContextStack.front().pCurRes = res; - } - - META_RES CSourceHookImpl::GetPrevRes() - { - return *m_ContextStack.front().pPrevRes; - } - - META_RES CSourceHookImpl::GetStatus() - { - return *m_ContextStack.front().pStatus; - - } - - const void *CSourceHookImpl::GetOrigRet() - { - return m_ContextStack.front().pOrigRet; - } - - const void *CSourceHookImpl::GetOverrideRet() - { - return (*m_ContextStack.front().pStatus < MRES_OVERRIDE) ? - NULL : m_ContextStack.front().pOverrideRet; - } - - void *CSourceHookImpl::GetIfacePtr() - { - // If in recall: return last one - if (m_ContextStack.front().m_State >= CHookContext::State_Recall_Pre && - m_ContextStack.front().m_State <= CHookContext::State_Recall_PostVP) - { - return m_ContextStack.second().pIfacePtr; - } - else - { - return m_ContextStack.front().pIfacePtr; - } - } - - void *CSourceHookImpl::GetOverrideRetPtr() - { - return m_ContextStack.front().pOverrideRet; - } - - void CSourceHookImpl::UnloadPlugin(Plugin plug, UnloadListener *listener) - { - // 1) Remove all hooks by this plugin - - CVector removehooks; - m_HookIDMan.FindAllHooks(removehooks, plug); - - for (CVector::iterator iter = removehooks.begin(); iter != removehooks.end(); ++iter) - RemoveHookByID(*iter); - - // 2) Remove all hook managers - for (CHookManList::iterator iter = m_HookManList.begin(); iter != m_HookManList.end(); ) - { - if (iter->GetOwnerPlugin() == plug) - iter = RemoveHookManager(iter); - else - ++iter; - } - - // Fix for bug 5034. It's pretty tricky to find whether hookmanagers owned by this - // plugin are active. We could change how hook managers are tracked in SH, and lazily - // free them as the context stack drops to 0, or we could change the pubfunc API to - // know whether it's active or not. Rather than deal with this extra complexity, we - // just conservatively wait until the context stack hits 0 before unloading. - if (m_ContextStack.size() == 0) - { - listener->ReadyToUnload(plug); - } - else - { - m_PendingUnloads.push_back(new PendingUnload(listener, plug)); - } - } - - CHookManList::iterator CSourceHookImpl::RemoveHookManager(CHookManList::iterator hookman_iter) - { - // 2) Remove it - for (CVfnPtrList::iterator vfnptr_iter = m_VfnPtrs.begin(); - vfnptr_iter != m_VfnPtrs.end();) - { - if (!vfnptr_iter->HookManRemoved(&(*hookman_iter))) - { - // This vfnptr has no more hook managers - // and asks to be removed. - - m_HookIDMan.RemoveAll(vfnptr_iter->GetPtr()); - - vfnptr_iter = RevertAndRemoveVfnPtr(vfnptr_iter); - } - else - { - ++vfnptr_iter; - } - } - - return m_HookManList.erase(hookman_iter); - } - - void CSourceHookImpl::RemoveHookManager(Plugin plug, HookManagerPubFunc pubFunc) - { - // Find the hook manager - CHookManList::iterator hookman_iter = m_HookManList.find(CHookManager::Descriptor(plug, pubFunc)); - - if (hookman_iter != m_HookManList.end()) - { - RemoveHookManager(hookman_iter); - } - } - - void CSourceHookImpl::SetIgnoreHooks(void *vfnptr) - { - CHookContext ctx; - ctx.m_State = CHookContext::State_Ignore; - m_ContextStack.push(ctx); - } - - void CSourceHookImpl::ResetIgnoreHooks(void *vfnptr) - { - if (!m_ContextStack.empty() && m_ContextStack.front().m_State == CHookContext::State_Ignore) - { - // Actually use EndContext - // instead of m_ContextStack.pop directly - // because it runs the cleanup task if neccesary - EndContext(&(m_ContextStack.front())); - } - } - - void *CSourceHookImpl::GetOrigVfnPtrEntry(void *vfnptr) - { - for (CVfnPtrList::iterator vfnptr_iter = m_VfnPtrs.begin(); vfnptr_iter != m_VfnPtrs.end(); ++vfnptr_iter) - { - if (vfnptr_iter->GetPtr() == vfnptr) - return vfnptr_iter->GetOrigEntry(); - } - return NULL; - } - - void CSourceHookImpl::DoRecall() - { - CHookContext newCtx; - CHookContext &curCtx = m_ContextStack.front(); - - - newCtx.m_State = curCtx.m_State + (CHookContext::State_Recall_Pre - CHookContext::State_Pre); - if (newCtx.m_State == CHookContext::State_Recall_Post || newCtx.m_State == CHookContext::State_Recall_PostVP) - { - // Also save orig ret - newCtx.pOrigRet = curCtx.pOrigRet; - } - - // The hookfunc usually does this, but it won't have a chance to see it, - // so for recalls, we update status here if it's required - if (*curCtx.pCurRes > *curCtx.pStatus) - *curCtx.pStatus = *curCtx.pCurRes; - - newCtx.pStatus = curCtx.pStatus; - newCtx.pOverrideRet = curCtx.pOverrideRet; - newCtx.pPrevRes = curCtx.pPrevRes; - newCtx.m_Iter = curCtx.m_Iter; - - // Take this with us! - newCtx.pCurRes = curCtx.pCurRes; - - m_ContextStack.push(newCtx); - curCtx.m_State = CHookContext::State_Dead; - } - - IHookContext *CSourceHookImpl::SetupHookLoop(IHookManagerInfo *hi, void *vfnptr, void *thisptr, void **origCallAddr, META_RES *statusPtr, - META_RES *prevResPtr, META_RES *curResPtr, const void *origRetPtr, void *overrideRetPtr) - { - CHookContext *pCtx = NULL; - CHookContext *oldctx = m_ContextStack.empty() ? NULL : &m_ContextStack.front(); - if (oldctx) - { - // SH_CALL - if (oldctx->m_State == CHookContext::State_Ignore) - { - *statusPtr = MRES_IGNORED; - oldctx->m_CallOrig = true; - oldctx->m_State = CHookContext::State_Dead; - - List &vfnptr_list = static_cast(hi)->GetVfnPtrList(); - List::iterator vfnptr_iter; - for (vfnptr_iter = vfnptr_list.begin(); - vfnptr_iter != vfnptr_list.end(); ++vfnptr_iter) - { - if (**vfnptr_iter == vfnptr) - break; - } - if (vfnptr_iter == vfnptr_list.end()) - { - SH_ASSERT(false, ("How can a hook exist on a vfnptr which we don't have in our db?!")); - } - else - { - *origCallAddr = (*vfnptr_iter)->GetOrigCallAddr(); - oldctx->pVfnPtr = *vfnptr_iter; - } - - oldctx->pOrigRet = origRetPtr; - return oldctx; - } - // Recall - else if (oldctx->m_State >= CHookContext::State_Recall_Pre && - oldctx->m_State <= CHookContext::State_Recall_PostVP) - { - pCtx = oldctx; - - *statusPtr = *(oldctx->pStatus); - *prevResPtr = *(oldctx->pPrevRes); - - pCtx->m_Iter = oldctx->m_Iter; - - // Only have possibility of calling the orig func in pre recall mode - pCtx->m_CallOrig = (oldctx->m_State == CHookContext::State_Recall_Pre || - oldctx->m_State == CHookContext::State_Recall_PreVP); - - overrideRetPtr = pCtx->pOverrideRet; - - // When the status is low so there's no override return value and we're in a post recall, - // give it the orig return value as override return value. - if (pCtx->m_State == CHookContext::State_Recall_Post || - pCtx->m_State == CHookContext::State_Recall_PostVP) - { - origRetPtr = oldctx->pOrigRet; - if (*statusPtr < MRES_OVERRIDE) - overrideRetPtr = const_cast(pCtx->pOrigRet); - } - } - } - if (!pCtx) - { - pCtx = m_ContextStack.make_next(); - pCtx->m_State = CHookContext::State_Born; - pCtx->m_CallOrig = true; - } - - pCtx->pIface = NULL; - - List &vfnptr_list = static_cast(hi)->GetVfnPtrList(); - List::iterator vfnptr_iter; - for (vfnptr_iter = vfnptr_list.begin(); - vfnptr_iter != vfnptr_list.end(); ++vfnptr_iter) - { - if (**vfnptr_iter == vfnptr) - break; - } - if (vfnptr_iter == vfnptr_list.end()) - { - pCtx->m_State = CHookContext::State_Dead; - } - else - { - pCtx->pVfnPtr = *vfnptr_iter; - *origCallAddr = pCtx->pVfnPtr->GetOrigCallAddr(); - pCtx->pIface = pCtx->pVfnPtr->FindIface(thisptr); - } - - pCtx->pStatus = statusPtr; - pCtx->pPrevRes = prevResPtr; - pCtx->pCurRes = curResPtr; - pCtx->pThisPtr = thisptr; - pCtx->pOverrideRet = overrideRetPtr; - pCtx->pOrigRet = origRetPtr; - - return pCtx; - } - - void CSourceHookImpl::ResolvePendingUnloads(bool force) - { - List::iterator iter = m_PendingUnloads.begin(); - while (iter != m_PendingUnloads.end()) - { - PendingUnload *unload = *iter; - - if (!force && !unload->deactivated()) - { - // Unless being forced, wait one drop of the context stack - // before actually unloading. Otherwise, we'll still return - // to unloaded memory. - unload->deactivate(); - iter++; - } - else - { - unload->listener()->ReadyToUnload(unload->plugin()); - delete unload; - iter = m_PendingUnloads.erase(iter); - } - } - } - - void CSourceHookImpl::EndContext(IHookContext *pCtx) - { - // Do clean up task, if any is associated with this context - m_ContextStack.front().DoCleanupTaskAndDeleteIt(); - // Then remove it - m_ContextStack.pop(); - - // If we've reached 0 contexts and there are pending unloads, - // resolve them now. - if (m_ContextStack.size() == 0 && m_PendingUnloads.size() != 0) - ResolvePendingUnloads(); - } - - void CSourceHookImpl::CompleteShutdown() - { - CVector removehooks; - m_HookIDMan.FindAllHooks(removehooks); - - for (CVector::iterator iter = removehooks.begin(); iter != removehooks.end(); ++iter) - RemoveHookByID(*iter); - } - - void CSourceHookImpl::PausePlugin(Plugin plug) - { - CVector pausehooks; - m_HookIDMan.FindAllHooks(pausehooks, plug); - - for (CVector::iterator iter = pausehooks.begin(); iter != pausehooks.end(); ++iter) - PauseHookByID(*iter); - } - - void CSourceHookImpl::UnpausePlugin(Plugin plug) - { - CVector unpausehooks; - m_HookIDMan.FindAllHooks(unpausehooks, plug); - - for (CVector::iterator iter = unpausehooks.begin(); iter != unpausehooks.end(); ++iter) - UnpauseHookByID(*iter); - } - - bool CSourceHookImpl::PauseHookByID(int hookid) - { - return SetHookPaused(hookid, true); - } - - bool CSourceHookImpl::UnpauseHookByID(int hookid) - { - return SetHookPaused(hookid, false); - } - - bool CSourceHookImpl::SetHookPaused(int hookid, bool paused) - { - const CHookIDManager::Entry *hentry; - - hentry = m_HookIDMan.QueryHook(hookid); - if (!hentry) - { - // hookid doesn't exist ! - return false; - } - - // find vfnptr - List::iterator vfnptr_iter = m_VfnPtrs.find(hentry->vfnptr); - if (vfnptr_iter == m_VfnPtrs.end()) - return false; - - // find iface - List::iterator iface_iter = vfnptr_iter->GetIfaceList().find(hentry->adjustediface); - if (iface_iter == vfnptr_iter->GetIfaceList().end()) - return false; - - // find hook - List &hooks = hentry->post ? iface_iter->GetPostHookList() : iface_iter->GetPreHookList(); - List::iterator hook_iter = hooks.find(hookid); - if (hook_iter == hooks.end()) - return false; - - hook_iter->SetPaused(paused); - return true; - } - - ////////////////////////////////////////////////////////////////////////// - // CHookContext - ////////////////////////////////////////////////////////////////////////// - ISHDelegate *CHookContext::GetNext() - { - CIface *pVPIface; - switch (m_State) - { - case State_Dead: - return NULL; - - case State_Born: - m_Iter = List::iterator(); - m_State = State_Pre; - - // fall-through - case State_Recall_Pre: - m_State = State_Pre; - case State_Pre: - if (pIface) - { - if (!m_Iter) - m_Iter = pIface->GetPreHookList().begin(); - else - ++m_Iter; - SkipPaused(m_Iter, pIface->GetPreHookList()); - - if (m_Iter != pIface->GetPreHookList().end()) - { - pIfacePtr = reinterpret_cast(reinterpret_cast(pThisPtr) - m_Iter->GetThisPointerOffset()); - return m_Iter->GetHandler(); - } - } - - // end of normal hooks -> VP - - m_State = State_PreVP; - m_Iter = List::iterator(); - - // fall-through - case State_Recall_PreVP: - m_State = State_PreVP; - case State_PreVP: - pVPIface = pVfnPtr->FindIface(NULL); - if (pVPIface) - { - if (!m_Iter) - m_Iter = pVPIface->GetPreHookList().begin(); - else - ++m_Iter; - SkipPaused(m_Iter, pVPIface->GetPreHookList()); - - if (m_Iter != pVPIface->GetPreHookList()) - { - pIfacePtr = reinterpret_cast(reinterpret_cast(pThisPtr) - m_Iter->GetThisPointerOffset()); - return m_Iter->GetHandler(); - } - } - - // end VP hooks -> orig call - - m_State = State_OrigCall; - return NULL; - - case State_OrigCall: - m_Iter = List::iterator(); - m_State = State_Post; - - // fall-through - case State_Post: - if (pIface) - { - if (!m_Iter) - m_Iter = pIface->GetPostHookList().begin(); - else - ++m_Iter; - SkipPaused(m_Iter, pIface->GetPostHookList()); - - if (m_Iter != pIface->GetPostHookList().end()) - { - pIfacePtr = reinterpret_cast(reinterpret_cast(pThisPtr) - m_Iter->GetThisPointerOffset()); - return m_Iter->GetHandler(); - } - } - // end of normal hooks -> VP - - m_State = State_PostVP; - m_Iter = List::iterator(); - - // fall-through - case State_PostVP: - pVPIface = pVfnPtr->FindIface(NULL); - if (pVPIface) - { - if (!m_Iter) - m_Iter = pVPIface->GetPostHookList().begin(); - else - ++m_Iter; - SkipPaused(m_Iter, pVPIface->GetPostHookList()); - - if (m_Iter != pVPIface->GetPostHookList()) - { - pIfacePtr = reinterpret_cast(reinterpret_cast(pThisPtr) - m_Iter->GetThisPointerOffset()); - return m_Iter->GetHandler(); - } - } - - // end VP hooks -> done - - m_State = State_Dead; - return NULL; - - case State_Recall_Post: - // Skip pre hooks _and_ orig call - m_State = State_Post; - return NULL; - - case State_Recall_PostVP: - // Skip pre hooks _and_ orig call - m_State = State_PostVP; - return NULL; - } - return NULL; - } - - void *CHookContext::GetOverrideRetPtr() - { - return pOverrideRet; - } - - const void *CHookContext::GetOrigRetPtr() - { - return pOrigRet; - } - - bool CHookContext::ShouldCallOrig() - { - return m_CallOrig; - } - - void CHookContext::HookRemoved(List::iterator oldhookiter, List::iterator nexthookiter) - { - if (m_Iter == oldhookiter) - { - m_Iter = nexthookiter; - --m_Iter; - } - } - - void CHookContext::IfaceRemoved(CIface *iface) - { - if (pIface == iface) - pIface = NULL; - } - - void CHookContext::VfnPtrRemoved(CVfnPtr *vfnptr) - { - if (pVfnPtr == vfnptr) - { - // Don't set pVfnPtr = NULL here! - // It may be used still. - // RevertAndRemoveVfnPtr uses it to find the hook context - // to which to attach the cleanup task of the vfnptr. - - //pVfnPtr = NULL; - m_State = State_Dead; - } - } - - void CHookContext::DoCleanupTaskAndDeleteIt() - { - if (m_CleanupTask != NULL) - { - m_CleanupTask->CleanupAndDeleteThis(); - } - } - } -} diff --git a/metamod-source/core/sourcehook/sourcehook.h b/metamod-source/core/sourcehook/sourcehook.h deleted file mode 100644 index faf5b24c..00000000 --- a/metamod-source/core/sourcehook/sourcehook.h +++ /dev/null @@ -1,4931 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -/** -* @file sourcehook.h -* @brief Contains the public SourceHook API -*/ - -#ifndef __SOURCEHOOK_H__ -#define __SOURCEHOOK_H__ - -// Interface revisions: -// 1 - Initial revision -// 2 - Changed to virtual functions for iterators and all queries -// 3 - Added "hook loop status variable" -// 4 - Reentrant -// 5 - New "V2" interface -#define SH_IFACE_VERSION 5 - -// Impl versions: -// ??? -// 4 - addition of hook ids and vp hooks (with them, AddHookNew and RemoveHookNew) -// This is not a SH_IFACE_VERSION change so that old plugins continue working! -// 5 - implementation of the new "V2" interface -#define SH_IMPL_VERSION 5 - -// Hookman version: -// 1 - standard -#define SH_HOOKMAN_VERSION 1 - -// Hookmanautogen versions -// 1 - initial -#define SH_HOOKMANAUTOGEN_IFACE_VERSION 1 -#define SH_HOOKMANAUTOGEN_IMPL_VERSION 1 - -// The value of SH_GLOB_SHPTR has to be a pointer to SourceHook::ISourceHook -// It's used in various macros -#ifndef SH_GLOB_SHPTR -#define SH_GLOB_SHPTR g_SHPtr -#endif - -// Used to identify the current plugin -#ifndef SH_GLOB_PLUGPTR -#define SH_GLOB_PLUGPTR g_PLID -#endif - -#ifdef SH_DEBUG -# include -# include - -# define SH_ASSERT(x, info) \ - do { \ - if (!(x)) \ - { \ - printf("SOURCEHOOK DEBUG ASSERTION FAILED: %s:%u(%s): %s: ", __FILE__, __LINE__, __FUNCTION__, #x); \ - printf info; \ - putchar('\n'); \ - abort(); \ - } \ - } while(0) - -#else -# define SH_ASSERT(x, info) -#endif - -// System -#define SH_SYS_WIN32 1 -#define SH_SYS_LINUX 2 -#define SH_SYS_APPLE 3 - -// Platform -#define SH_XP_POSIX 10 -#define SH_XP_WINAPI 20 - -#ifdef _WIN32 -# define SH_SYS SH_SYS_WIN32 -# define SH_XP SH_XP_WINAPI -#elif defined __linux__ -# define SH_SYS SH_SYS_LINUX -# define SH_XP SH_XP_POSIX -#elif defined __APPLE__ -# define SH_SYS SH_SYS_APPLE -# define SH_XP SH_XP_POSIX -#else -# error Unsupported system -#endif - -// Compiler -#define SH_COMP_GCC 1 -#define SH_COMP_MSVC 2 - -#ifdef _MSC_VER -# define SH_COMP SH_COMP_MSVC -#elif defined __GNUC__ -# define SH_COMP SH_COMP_GCC -#else -# error Unsupported compiler -#endif - -#if SH_COMP==SH_COMP_MSVC && _MSC_VER < 1500 -# define vsnprintf _vsnprintf -#endif - -#if SH_SYS != SH_SYS_WIN32 -# include -#endif - -#define SH_PTRSIZE sizeof(void*) - -#include "sh_memfuncinfo.h" -#include "FastDelegate.h" - -// Good old metamod! - -// Flags returned by a plugin's api function. -// NOTE: order is crucial, as greater/less comparisons are made. -enum META_RES -{ - MRES_IGNORED=0, // plugin didn't take any action - MRES_HANDLED, // plugin did something, but real function should still be called - MRES_OVERRIDE, // call real function, but use my return value - MRES_SUPERCEDE // skip real function; use my return value -}; - - -namespace SourceHook -{ - /** - * @brief Specifies the size (in bytes) for the internal buffer of vafmt(printf-like) function handlers - */ - const int STRBUF_LEN=4096; - - /** - * @brief An empty class. No inheritance used. Used for original-function-call hacks - */ - class EmptyClass - { - }; - - /** - * @brief Implicit cast. - */ - template - inline Out implicit_cast(In input) - { - return input; - } - - /** - * @brief A plugin typedef - * - * SourceHook doesn't really care what this is. As long as the ==, != and = operators work on it and every - * plugin has a unique identifier, everything is ok. - * It should also be possible to set it to 0. - */ - typedef int Plugin; - - - template class CallClass : public T - { - }; - typedef void ManualCallClass; - - /** - * @brief Describes the way a parameter/retval is passed. - */ - struct PassInfo - { - enum PassType - { - PassType_Unknown=0, /**< Unknown -- no extra info available */ - PassType_Basic, /**< Plain old register data (pointers, integers) */ - PassType_Float, /**< Floating point data */ - PassType_Object, /**< Object or structure */ - }; - - enum PassFlags - { - PassFlag_ByVal = (1<<0), /**< Passing by value */ - PassFlag_ByRef = (1<<1), /**< Passing by reference */ - PassFlag_ODtor = (1<<2), /**< Object has a destructor */ - PassFlag_OCtor = (1<<3), /**< Object has a normal non-trivial constructor */ - PassFlag_AssignOp = (1<<4), /**< Object has a non-trivial assignment operator */ - PassFlag_CCtor = (1<<5), /**< Object has a copy constructor (which takes const Object& as only parameter) */ - - // The following two flags are only relevant for byval return types. - // SH tries to auto-detect these - // If you want to override SH's auto-detection, pass them in yourself - PassFlag_RetMem = (1<<6), /**< Object is returned in memory (through hidden first param */ - PassFlag_RetReg = (1<<7) /**< Object is returned in EAX(:EDX) */ - }; - - size_t size; //!< Size of the data being passed - - // Extra info: - // (might be used in future versions for automatic hookfunc generation) - int type; //!< PassType value - unsigned int flags; //!< Pass/return flags - - struct V2Info - { - void *pNormalCtor; - void *pCopyCtor; - void *pDtor; - void *pAssignOperator; - }; - }; - - struct ProtoInfo - { - enum CallConvention - { - CallConv_Unknown, /**< Unknown -- no extra info available (0)*/ - CallConv_ThisCall, /**< This call (object pointer required) (1)*/ - CallConv_Cdecl, /**< C call (2)*/ - CallConv_StdCall, /**< Windows "stdcall" (3)*/ - - CallConv_HasVarArgs = (1<<16), /**< Has variable arguments */ - CallConv_HasVafmt = CallConv_HasVarArgs | (1<<17) /**< last params: const char*, ... */ - }; - - int numOfParams; //!< number of parameters - PassInfo retPassInfo; //!< PassInfo for the return value. size=0 -> no retval - const PassInfo *paramsPassInfo; //!< PassInfos for the parameters - - // paramsPassInfo[0] is basically a dummy parameter. - // However, paramsPassInfo[0].size stores the version of the ProtoInfo structure. - - // Extra info: - int convention; - - // Version2: - PassInfo::V2Info retPassInfo2; - const PassInfo::V2Info *paramsPassInfo2; - }; - - struct IHookManagerInfo; - - /** - * @brief Pointer to hook manager interface function - * - * The hook manager should store hi for later use if store==true. It should then call hi->SetInfo(...) if hi - * is non-null. The hook manager can return 0 for success or a non-zero value if it doesn't want to be used. - * - * @param hi A pointer to IHookManagerInfo - */ - typedef int (*HookManagerPubFunc)(bool store, IHookManagerInfo *hi); - - class ISHDelegate - { - public: - virtual bool IsEqual(ISHDelegate *pOtherDeleg) = 0; // pOtherDeleg is from the same plugin and hookman - virtual void DeleteThis() = 0; - }; - - struct IHookManagerInfo - { - virtual void SetInfo(int hookman_version, int vtbloffs, int vtblidx, - ProtoInfo *proto, void *hookfunc_vfnptr) = 0; - }; - - // I'm adding support for functions which return references. - - // How it works: - // SH_SETUPCALLS doesn't use plain rettype to store the temporary return values (plugin ret, orig ret, - // override ret) anymore; instead, it uses SourceHook::ReferenceCarrier::type - // this is typedefed to the original rettype normally, but if the rettype is a reference, it's a special class - // which stores the reference as a pointer, and implements constructors, operator= and a conversion operator. - // special cases were needed for getoverrideret / getorigret; these are implemented through the - // SourceHook::MacroRefHelpers structs. - // Furthermore, SetOverrideRet had to be changed a bit; see SourceHook::OverrideFunctor somewhere down in this file. - template struct ReferenceCarrier - { - typedef T type; - }; - - template struct ReferenceCarrier - { - class type - { - T *m_StoredRef; - public: - type() : m_StoredRef(NULL) - { - } - type(T& ref) : m_StoredRef(&ref) - { - } - - T& operator= (T& ref) - { - m_StoredRef = &ref; - return ref; - } - - operator T& () const - { - return *m_StoredRef; - } - }; - }; - - template struct ReferenceUtil - { - typedef T plain_type; - typedef T* pointer_type; - typedef T& reference_type; - }; - - template struct ReferenceUtil - { - typedef T plain_type; - typedef T* pointer_type; - typedef T& reference_type; - }; - - struct IHookContext - { - virtual ISHDelegate *GetNext() = 0; - virtual void *GetOverrideRetPtr() = 0; - virtual const void *GetOrigRetPtr() = 0; - virtual bool ShouldCallOrig() = 0; - }; - - /** - * @brief The main SourceHook interface - */ - class ISourceHook - { - public: - /** - * @brief Return interface version - */ - virtual int GetIfaceVersion() = 0; - - /** - * @brief Return implementation version - */ - virtual int GetImplVersion() = 0; - - /** - * @brief Modes for the new AddHook - */ - enum AddHookMode - { - Hook_Normal, - Hook_VP, - Hook_DVP - }; - - /** - * @brief Add a (VP) hook. - * - * @return non-zero hook id on success, 0 otherwise - * - * @param plug The unique identifier of the plugin that calls this function - * @param mode Can be either Hook_Normal or Hook_VP (vtable-wide hook) - * @param iface The interface pointer - * @param ifacesize The size of the class iface points to - * @param myHookMan A hook manager function that should be capable of handling the function - * @param handler A pointer to the hook handler something - * @param post Set to true if you want a post handler - */ - virtual int AddHook(Plugin plug, AddHookMode mode, void *iface, int thisptr_offs, HookManagerPubFunc myHookMan, - ISHDelegate *handler, bool post) = 0; - - // Source backwarts compat (only for normal hooks) - virtual bool RemoveHook(Plugin plug, void *iface, int thisptr_offs, HookManagerPubFunc myHookMan, - ISHDelegate *handler, bool post) = 0; - - /** - * @brief Remove a hook by ID. - * - * @return true on success, false otherwise - * - * @param hookid The hook id (returned by AddHook) - */ - virtual bool RemoveHookByID(int hookid) = 0; - - /** - * @brief Pause a hook by ID. - * - * @return true on success, false otherwise - * - * @param hookid The hook id (returned by AddHook) - */ - virtual bool PauseHookByID(int hookid) = 0; - - /** - * @brief Unpause a hook by ID. - * - * @return true on success, false otherwise - * - * @param hookid The hook id (returned by AddHook) - */ - virtual bool UnpauseHookByID(int hookid) = 0; - - /** - * @brief Checks whether a plugin has (a) hook manager(s) that is/are currently used by other plugins - * - * @param plug The unique identifier of the plugin in question - */ - - virtual void SetRes(META_RES res) = 0; //!< Sets the meta result - virtual META_RES GetPrevRes() = 0; //!< Gets the meta result of the - //!< previously calledhandler - virtual META_RES GetStatus() = 0; //!< Gets the highest meta result - virtual const void *GetOrigRet() = 0; //!< Gets the original result. - //!< If not in post function, undefined - virtual const void *GetOverrideRet() = 0; //!< Gets the override result. - //!< If none is specified, NULL - virtual void *GetIfacePtr() = 0; //!< Gets the interface pointer - - virtual void *GetOverrideRetPtr() = 0; //!< Used for setting the override return value - - /** - * @brief Remove a hook manager. Auto-removes all hooks attached to it from plugin plug. - * - * @param plug The owner of the hook manager - * @param pubFunc The hook manager's info function - */ - virtual void RemoveHookManager(Plugin plug, HookManagerPubFunc pubFunc) = 0; - - // For SH_CALL: - - /** - * @brief Makes sure that hooks are going to be ignored on the next call of vfnptr - * - * @param plug The unique identifier of the plugin that calls this function - * @param vfnptr The virtual function pointer of the function in question - */ - virtual void SetIgnoreHooks(void *vfnptr) = 0; - - /** - * @brief Reverses SetIgnoreHooks' effect - * - * @param plug The unique identifier of the plugin that calls this function - * @param vfnptr The virtual function pointer of the function in question - */ - virtual void ResetIgnoreHooks(void *vfnptr) = 0; - - /** - * @brief Finds the original entry of a virtual function pointer - * - * @param vfnptr The virtual function pointer - * @return The original entry if the virtual function pointer has been patched; NULL otherwise. - */ - virtual void *GetOrigVfnPtrEntry(void *vfnptr) = 0; - - ////////////////////////////////////////////////////////////////////////// - - // For hook managers - - // Returns the current iface ptr - virtual void DoRecall() = 0; //!< Initiates a recall sequence - - /* - HOW RECALLS WORK: - - The problem: - Users want the ability to change parameters of the called function - from inside their handler. - The solution: - 1) Mark as "recall" - 2) Recall the function - 3) => SH's hook func gets called: - 4) The first iterator points at the first hook the last hookfunc didn't execute yet - 5) does all iteration and returns normally - 6) The user's handler returns immediately - 7) The hook func returns immediately as well - - Also note that the recalled hookfunc starts with the status the recalling hookfunc - ended with. The last handler (doing the recall) is also able to specify its own - META_RES. - */ - - /** - * @brief Set up the hook loop. - * - * @param statusPtr pointer to status variable - * @param prevResPtr pointer to previous result variable - * @param curResPtr pointer to current result variable - * @param ifacePtrPtr pointer to interface this pointer variable - * @param origRetPr pointer to original return value variable. NULL for void funcs - * @param overrideRetPtr pointer to override return value variable. NULL for void funcs - * - * @return Override Return Pointer the hookfunc should use (may differ from overrideRetPtr - * when the hook func is being called as part of a recall - */ - virtual IHookContext *SetupHookLoop(IHookManagerInfo *hi, void *vfnptr, void *thisptr, void **origCallAddr, - META_RES *statusPtr, META_RES *prevResPtr, META_RES *curResPtr, - const void *origRetPtr, void *overrideRetPtr) = 0; - - virtual void EndContext(IHookContext *pCtx) = 0; - }; - - - class IHookManagerAutoGen - { - public: - virtual int GetIfaceVersion() = 0; - virtual int GetImplVersion() = 0; - - virtual HookManagerPubFunc MakeHookMan(const ProtoInfo *proto, int vtbl_offs, int vtbl_idx) = 0; - virtual void ReleaseHookMan(HookManagerPubFunc pubFunc) = 0; - }; - - // For META_RESULT_ORIG_RET and META_RESULT_OVERRIDE_RET: - // These have to be able to return references. If T is a reference, the pointers returned - // from the SH_GLOB_SHPTR are pointers to instances of ReferenceCarrier::type. - template struct MacroRefHelpers - { - inline static const T* GetOrigRet(ISourceHook *shptr) - { - return reinterpret_cast(shptr->GetOrigRet()); - } - inline static const T* GetOverrideRet(ISourceHook *shptr) - { - return reinterpret_cast(shptr->GetOverrideRet()); - } - }; - - template struct MacroRefHelpers - { - inline static T* GetOrigRet(ISourceHook *shptr) - { - T &ref = *reinterpret_cast::type *>(shptr->GetOrigRet()); - return &ref; - } - inline static T* GetOverrideRet(ISourceHook *shptr) - { - T &ref = *reinterpret_cast::type *>(shptr->GetOverrideRet()); - return &ref; - } - }; - - template - void *GetOrigVfnPtrEntry(X *pInstance, MFP mfp, ISourceHook *pSH) - { - SourceHook::MemFuncInfo info = {true, -1, 0, 0}; - SourceHook::GetFuncInfo(pInstance, mfp, info); - - void *vfnptr = reinterpret_cast( - *reinterpret_cast(reinterpret_cast(pInstance) + info.thisptroffs + info.vtbloffs) + info.vtblindex); - - void *origentry = pSH->GetOrigVfnPtrEntry(vfnptr); - - return origentry ? origentry : *reinterpret_cast(vfnptr); - } - - template struct GetPassInfo - { - static const int type = 0; - static const unsigned int flags = PassInfo::PassFlag_ByVal; - }; - - template struct GetPassInfo - { - static const int type = 0; - static const unsigned int flags = PassInfo::PassFlag_ByRef; - }; -} - -/************************************************************************/ -/* High level interface */ -/************************************************************************/ -#define META_RESULT_STATUS SH_GLOB_SHPTR->GetStatus() -#define META_RESULT_PREVIOUS SH_GLOB_SHPTR->GetPrevRes() -#define META_RESULT_ORIG_RET(type) *SourceHook::MacroRefHelpers::GetOrigRet(SH_GLOB_SHPTR) -#define META_RESULT_OVERRIDE_RET(type) *SourceHook::MacroRefHelpers::GetOverrideRet(SH_GLOB_SHPTR) -#define META_IFACEPTR(type) reinterpret_cast(SH_GLOB_SHPTR->GetIfacePtr()) - -#define SET_META_RESULT(result) SH_GLOB_SHPTR->SetRes(result) -#define RETURN_META(result) do { SET_META_RESULT(result); return; } while(0) -#define RETURN_META_VALUE(result, value) do { SET_META_RESULT(result); return (value); } while(0) - - -template -SourceHook::CallClass *SH_GET_CALLCLASS(T *p) -{ - return static_cast< SourceHook::CallClass *>(p); -} -#define SH_RELEASE_CALLCLASS(p) - -#define SH_GET_MCALLCLASS(p, size) reinterpret_cast(p) - -// only call these from the hook handlers directly! - -#define MAKE_NOREF_VALUE(rettype) \ - *reinterpret_cast< ::SourceHook::ReferenceUtil::pointer_type >(0) - -// If a hook on a function which returns a reference does not want to specify a return value, -// it can use this macro. -// ONLY USE THIS WITH MRES_IGNORED AND MRES_HANDLED !!! -#define RETURN_META_NOREF(result, rettype) \ - RETURN_META_VALUE(result, MAKE_NOREF_VALUE(rettype)) - -// Why take a memfuncptr instead of iface and func when we have to deduce the iface anyway now? -// Well, without it, there'd be no way to specify which overloaded version we want in _VALUE - -// SourceHook::SetOverrideRet is defined later. -#define RETURN_META_NEWPARAMS(result, memfuncptr, newparams) \ - do { \ - SET_META_RESULT(result); \ - SH_GLOB_SHPTR->DoRecall(); \ - (SourceHook::RecallGetIface(SH_GLOB_SHPTR, memfuncptr)->*(memfuncptr)) newparams; \ - RETURN_META(MRES_SUPERCEDE); \ - } while (0) - -#define RETURN_META_VALUE_NEWPARAMS(result, value, memfuncptr, newparams) \ - do { \ - SET_META_RESULT(result); \ - SH_GLOB_SHPTR->DoRecall(); \ - if ((result) >= MRES_OVERRIDE) \ - { \ - /* meh, set the override result here because we don't get a chance to return */ \ - /* before continuing the hook loop through the recall */ \ - SourceHook::SetOverrideResult(memfuncptr)(SH_GLOB_SHPTR, value); \ - } \ - RETURN_META_VALUE(MRES_SUPERCEDE, \ - (SourceHook::RecallGetIface(SH_GLOB_SHPTR, memfuncptr)->*(memfuncptr)) newparams); \ - } while (0) - -// :TODO: thisptroffs in MNEWPARAMS ?? - -#if SH_COMP == SH_COMP_MSVC - -#define SOUREHOOK__MNEWPARAMS_PREPAREMFP(hookname) \ - union \ - { \ - SH_MFHCls(hookname)::ECMFP mfp; \ - void *addr; \ - } u; \ - u.addr = (*reinterpret_cast(reinterpret_cast(thisptr) + SH_MFHCls(hookname)::ms_MFI.vtbloffs))[ \ - SH_MFHCls(hookname)::ms_MFI.vtblindex]; - -#elif SH_COMP == SH_COMP_GCC - -#define SOUREHOOK__MNEWPARAMS_PREPAREMFP(hookname) \ - union \ - { \ - SH_MFHCls(hookname)::ECMFP mfp; \ - struct \ - { \ - void *addr; \ - intptr_t adjustor; \ - } s; \ - } u; \ - u.s.addr = (*reinterpret_cast(reinterpret_cast(thisptr) + SH_MFHCls(hookname)::ms_MFI.vtbloffs))[ \ - SH_MFHCls(hookname)::ms_MFI.vtblindex]; \ - u.s.adjustor = 0; - -#endif - -#define RETURN_META_MNEWPARAMS(result, hookname, newparams) \ - do { \ - SET_META_RESULT(result); \ - SH_GLOB_SHPTR->DoRecall(); \ - SourceHook::EmptyClass *thisptr = reinterpret_cast(SH_GLOB_SHPTR->GetIfacePtr()); \ - (thisptr->*(__SoureceHook_FHM_GetRecallMFP##hookname(thisptr))) newparams; \ - RETURN_META(MRES_SUPERCEDE); \ - } while (0) - -#define RETURN_META_VALUE_MNEWPARAMS(result, value, hookname, newparams) \ - do { \ - SET_META_RESULT(result); \ - SH_GLOB_SHPTR->DoRecall(); \ - if ((result) >= MRES_OVERRIDE) \ - { \ - /* see RETURN_META_VALUE_NEWPARAMS */ \ - __SoureceHook_FHM_SetOverrideResult##hookname(SH_GLOB_SHPTR, value); \ - } \ - SourceHook::EmptyClass *thisptr = reinterpret_cast(SH_GLOB_SHPTR->GetIfacePtr()); \ - RETURN_META_VALUE(MRES_SUPERCEDE, (thisptr->*(__SoureceHook_FHM_GetRecallMFP##hookname(thisptr))) newparams); \ - } while (0) - - -#define SH_MANUALHOOK_RECONFIGURE(hookname, pvtblindex, pvtbloffs, pthisptroffs) \ - __SourceHook_FHM_Reconfigure##hookname(pvtblindex, pvtbloffs, pthisptroffs) - -#define SH_GET_ORIG_VFNPTR_ENTRY(inst, mfp) (SourceHook::GetOrigVfnPtrEntry(inst, mfp, SH_GLOB_SHPTR)) - -// New ADD / REMOVE macros. -#define SH_STATIC(func) fastdelegate::MakeDelegate(func) -#define SH_MEMBER(inst, func) fastdelegate::MakeDelegate(inst, func) - -#define SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ - __SourceHook_FHAdd##ifacetype##ifacefunc((void*)SourceHook::implicit_cast(ifaceptr), \ - SourceHook::ISourceHook::Hook_Normal, post, handler) - -#define SH_REMOVE_HOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ - __SourceHook_FHRemove##ifacetype##ifacefunc((void*)SourceHook::implicit_cast(ifaceptr), \ - post, handler) - -#define SH_ADD_MANUALHOOK(hookname, ifaceptr, handler, post) \ - __SourceHook_FHMAdd##hookname(reinterpret_cast(ifaceptr), \ - SourceHook::ISourceHook::Hook_Normal, post, handler) - -#define SH_REMOVE_MANUALHOOK(hookname, ifaceptr, handler, post) \ - __SourceHook_FHMRemove##hookname(reinterpret_cast(ifaceptr), post, handler) - -#define SH_ADD_VPHOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ - __SourceHook_FHAdd##ifacetype##ifacefunc((void*)SourceHook::implicit_cast(ifaceptr), \ - SourceHook::ISourceHook::Hook_VP, post, handler) - -#define SH_ADD_DVPHOOK(ifacetype, ifacefunc, ifaceptr, handler, post) \ - __SourceHook_FHAdd##ifacetype##ifacefunc((void*)SourceHook::implicit_cast(ifaceptr), \ - SourceHook::ISourceHook::Hook_DVP, post, handler) - -#define SH_ADD_MANUALVPHOOK(hookname, ifaceptr, handler, post) \ - __SourceHook_FHMAdd##hookname(reinterpret_cast(ifaceptr), SourceHook::ISourceHook::Hook_VP, post, handler) - -#define SH_ADD_MANUALDVPHOOK(hookname, ifaceptr, handler, post) \ - __SourceHook_FHMAdd##hookname(reinterpret_cast(ifaceptr), SourceHook::ISourceHook::Hook_DVP, post, handler) - -#define SH_REMOVE_HOOK_ID(hookid) \ - (SH_GLOB_SHPTR->RemoveHookByID(hookid)) - -// Old macros -// !! These are now deprecated. Instead, use one of these: -// SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, SH_STATIC(handler), post) -// SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, SH_MEMBER(inst, func), post) - -#define SH_ADD_HOOK_STATICFUNC(ifacetype, ifacefunc, ifaceptr, handler, post) \ - SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, SH_STATIC(handler), post) -#define SH_ADD_HOOK_MEMFUNC(ifacetype, ifacefunc, ifaceptr, handler_inst, handler_func, post) \ - SH_ADD_HOOK(ifacetype, ifacefunc, ifaceptr, SH_MEMBER(handler_inst, handler_func), post) - -// SH_REMOVE_HOOK(ifacetype, ifacefunc, ifaceptr, SH_STATIC(handler), post) -// SH_REMOVE_HOOK(ifacetype, ifacefunc, ifaceptr, SH_MEMBER(inst, func), post) - -#define SH_REMOVE_HOOK_STATICFUNC(ifacetype, ifacefunc, ifaceptr, handler, post) \ - SH_REMOVE_HOOK(ifacetype, ifacefunc, ifaceptr, SH_STATIC(handler), post) -#define SH_REMOVE_HOOK_MEMFUNC(ifacetype, ifacefunc, ifaceptr, handler_inst, handler_func, post) \ - SH_REMOVE_HOOK(ifacetype, ifacefunc, ifaceptr, SH_MEMBER(handler_inst, handler_func), post) - -// SH_ADD_MANUALHOOK(hookname, ifaceptr, SH_STATIC(handler), post) -// SH_ADD_MANUALHOOK(hookname, ifaceptr, SH_MEMBER(inst, func), post) - -#define SH_ADD_MANUALHOOK_STATICFUNC(hookname, ifaceptr, handler, post) \ - SH_ADD_MANUALHOOK(hookname, ifaceptr, SH_STATIC(handler), post) -#define SH_ADD_MANUALHOOK_MEMFUNC(hookname, ifaceptr, handler_inst, handler_func, post) \ - SH_ADD_MANUALHOOK(hookname, ifaceptr, SH_MEMBER(handler_inst, handler_func), post) - -// SH_REMOVE_MANUALHOOK(hookname, ifaceptr, SH_STATIC(handler), post) -// SH_REMOVE_MANUALHOOK(hookname, ifaceptr, SH_MEMBER(inst, func), post) - -#define SH_REMOVE_MANUALHOOK_STATICFUNC(hookname, ifaceptr, handler, post) \ - SH_REMOVE_MANUALHOOK(hookname, ifaceptr, SH_STATIC(handler), post) -#define SH_REMOVE_MANUALHOOK_MEMFUNC(hookname, ifaceptr, handler_inst, handler_func, post) \ - SH_REMOVE_MANUALHOOK(hookname, ifaceptr, SH_MEMBER(handler_inst, handler_func), post) - -#define SH_NOATTRIB - - - - -#if SH_COMP == SH_COMP_MSVC -# define SH_SETUP_MFP(mfp) \ - reinterpret_cast(&mfp)[0] = vfnptr_origentry; -#elif SH_COMP == SH_COMP_GCC -# define SH_SETUP_MFP(mfp) \ - reinterpret_cast(&mfp)[0] = vfnptr_origentry; \ - reinterpret_cast(&mfp)[1] = 0; -#else -# error Not supported yet. -#endif - -////////////////////////////////////////////////////////////////////////// -#define SH_FHCls(ift, iff, ov) __SourceHook_FHCls_##ift##iff##ov -#define SH_MFHCls(hookname) __SourceHook_MFHCls_##hookname - -#define SHINT_MAKE_HOOKMANPUBFUNC(ifacetype, ifacefunc, overload, funcptr) \ - static int HookManPubFunc(bool store, ::SourceHook::IHookManagerInfo *hi) \ - { \ - using namespace ::SourceHook; \ - GetFuncInfo(funcptr, ms_MFI); \ - /* Verify interface version */ \ - if (SH_GLOB_SHPTR->GetIfaceVersion() != SH_IFACE_VERSION) \ - return 1; \ - if (SH_GLOB_SHPTR->GetImplVersion() < SH_IMPL_VERSION) \ - return 1; \ - if (store) \ - ms_HI = hi; \ - if (hi) \ - { \ - MemFuncInfo mfi = {true, -1, 0, 0}; \ - GetFuncInfo(&SH_FHCls(ifacetype,ifacefunc,overload)::Func, mfi); \ - hi->SetInfo(SH_HOOKMAN_VERSION, ms_MFI.vtbloffs, ms_MFI.vtblindex, &ms_Proto, \ - reinterpret_cast(reinterpret_cast(&ms_Inst) + mfi.vtbloffs)[mfi.vtblindex] ); \ - } \ - return 0; \ - } - -// It has to be possible to use the macros in namespaces -// -> So we need to access and extend the global SourceHook namespace -// We use a namespace alias for this -#define SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, funcptr) \ - struct SH_FHCls(ifacetype,ifacefunc,overload) \ - { \ - static SH_FHCls(ifacetype,ifacefunc,overload) ms_Inst; \ - static ::SourceHook::MemFuncInfo ms_MFI; \ - static ::SourceHook::IHookManagerInfo *ms_HI; \ - static ::SourceHook::ProtoInfo ms_Proto; \ - SHINT_MAKE_HOOKMANPUBFUNC(ifacetype, ifacefunc, overload, funcptr) - -#define SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, funcptr) \ - }; \ - SH_FHCls(ifacetype,ifacefunc,overload) SH_FHCls(ifacetype,ifacefunc,overload)::ms_Inst; \ - ::SourceHook::MemFuncInfo SH_FHCls(ifacetype,ifacefunc,overload)::ms_MFI; \ - ::SourceHook::IHookManagerInfo *SH_FHCls(ifacetype,ifacefunc,overload)::ms_HI; \ - int __SourceHook_FHAdd##ifacetype##ifacefunc(void *iface, ::SourceHook::ISourceHook::AddHookMode mode, bool post, \ - SH_FHCls(ifacetype,ifacefunc,overload)::FD handler) \ - { \ - using namespace ::SourceHook; \ - MemFuncInfo mfi = {true, -1, 0, 0}; \ - GetFuncInfo(funcptr, mfi); \ - if (mfi.thisptroffs < 0 || !mfi.isVirtual) \ - return false; /* No non-virtual functions / virtual inheritance supported */ \ - \ - return SH_GLOB_SHPTR->AddHook(SH_GLOB_PLUGPTR, mode, \ - iface, mfi.thisptroffs, SH_FHCls(ifacetype,ifacefunc,overload)::HookManPubFunc, \ - new SH_FHCls(ifacetype,ifacefunc,overload)::CMyDelegateImpl(handler), post); \ - } \ - bool __SourceHook_FHRemove##ifacetype##ifacefunc(void *iface, bool post, \ - SH_FHCls(ifacetype,ifacefunc,overload)::FD handler) \ - { \ - using namespace ::SourceHook; \ - MemFuncInfo mfi = {true, -1, 0, 0}; \ - GetFuncInfo(funcptr, mfi); \ - SH_FHCls(ifacetype,ifacefunc,overload)::CMyDelegateImpl tmp(handler); \ - return SH_GLOB_SHPTR->RemoveHook(SH_GLOB_PLUGPTR, iface, mfi.thisptroffs, \ - SH_FHCls(ifacetype,ifacefunc,overload)::HookManPubFunc, &tmp, post); \ - } \ - -#define SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, pvtbloffs, pvtblidx, pthisptroffs) \ - struct SH_MFHCls(hookname) \ - { \ - static SH_MFHCls(hookname) ms_Inst; \ - static ::SourceHook::MemFuncInfo ms_MFI; \ - static ::SourceHook::IHookManagerInfo *ms_HI; \ - static ::SourceHook::ProtoInfo ms_Proto; \ - \ - SH_MFHCls(hookname)() \ - { \ - ms_MFI.isVirtual = true; \ - ms_MFI.thisptroffs = pthisptroffs; \ - ms_MFI.vtblindex = pvtblidx; \ - ms_MFI.vtbloffs = pvtbloffs; \ - } \ - static int HookManPubFunc(bool store, ::SourceHook::IHookManagerInfo *hi) \ - { \ - using namespace ::SourceHook; \ - /* Verify interface version */ \ - if (SH_GLOB_SHPTR->GetIfaceVersion() != SH_IFACE_VERSION) \ - return 1; \ - if (SH_GLOB_SHPTR->GetImplVersion() < SH_IMPL_VERSION) \ - return 1; \ - if (store) \ - ms_HI = hi; \ - if (hi) \ - { \ - MemFuncInfo mfi = {true, -1, 0, 0}; \ - GetFuncInfo(&SH_MFHCls(hookname)::Func, mfi); \ - hi->SetInfo(SH_HOOKMAN_VERSION, ms_MFI.vtbloffs, ms_MFI.vtblindex, &ms_Proto, \ - reinterpret_cast(reinterpret_cast(&ms_Inst) + mfi.vtbloffs)[mfi.vtblindex] ); \ - } \ - return 0; \ - } - -#define SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, pvtbloffs, pvtblidx, pthisptroffs) \ - }; \ - SH_MFHCls(hookname) SH_MFHCls(hookname)::ms_Inst; \ - ::SourceHook::MemFuncInfo SH_MFHCls(hookname)::ms_MFI; \ - ::SourceHook::IHookManagerInfo *SH_MFHCls(hookname)::ms_HI; \ - int __SourceHook_FHMAdd##hookname(void *iface, ::SourceHook::ISourceHook::AddHookMode mode, bool post, \ - SH_MFHCls(hookname)::FD handler) \ - { \ - return SH_GLOB_SHPTR->AddHook(SH_GLOB_PLUGPTR, mode, \ - iface, pthisptroffs, SH_MFHCls(hookname)::HookManPubFunc, \ - new SH_MFHCls(hookname)::CMyDelegateImpl(handler), post); \ - } \ - bool __SourceHook_FHMRemove##hookname(void *iface, bool post, \ - SH_MFHCls(hookname)::FD handler) \ - { \ - SH_MFHCls(hookname)::CMyDelegateImpl tmp(handler); \ - return SH_GLOB_SHPTR->RemoveHook(SH_GLOB_PLUGPTR, iface, pthisptroffs, \ - SH_MFHCls(hookname)::HookManPubFunc, &tmp, post); \ - } \ - SH_MFHCls(hookname)::ECMFP __SoureceHook_FHM_GetRecallMFP##hookname(::SourceHook::EmptyClass *thisptr) \ - { \ - SOUREHOOK__MNEWPARAMS_PREPAREMFP(hookname); \ - return u.mfp; \ - } \ - SH_MFHCls(hookname)::CallEC __SoureceHook_FHM_SHCall##hookname(void *ptr) \ - { \ - SH_MFHCls(hookname)::ECMFP mfp; \ - void *vfnptr = reinterpret_cast( \ - *reinterpret_cast( (reinterpret_cast(ptr) + SH_MFHCls(hookname)::ms_MFI.thisptroffs + SH_MFHCls(hookname)::ms_MFI.vtbloffs) ) + SH_MFHCls(hookname)::ms_MFI.vtblindex); \ - /* patch mfp */ \ - *reinterpret_cast(&mfp) = *reinterpret_cast(vfnptr); \ - if (sizeof(mfp) == 2*sizeof(void*)) /* gcc */ \ - { \ - void** pleaseShutUpMsvc = reinterpret_cast(&mfp); \ - pleaseShutUpMsvc[1] = 0; \ - } \ - return SH_MFHCls(hookname)::CallEC(reinterpret_cast< ::SourceHook::EmptyClass* >(ptr), mfp, vfnptr, SH_GLOB_SHPTR); \ - } \ - void __SourceHook_FHM_Reconfigure##hookname(int p_vtblindex, int p_vtbloffs, int p_thisptroffs) \ - { \ - SH_GLOB_SHPTR->RemoveHookManager(SH_GLOB_PLUGPTR, SH_MFHCls(hookname)::HookManPubFunc); \ - SH_MFHCls(hookname)::ms_MFI.thisptroffs = p_thisptroffs; \ - SH_MFHCls(hookname)::ms_MFI.vtblindex = p_vtblindex; \ - SH_MFHCls(hookname)::ms_MFI.vtbloffs = p_vtbloffs; \ - } - -#define SH_SETUPCALLS(rettype, paramtypes, params) \ - /* 1) Set up */ \ - using namespace ::SourceHook; \ - void *ourvfnptr = reinterpret_cast( \ - *reinterpret_cast(reinterpret_cast(this) + ms_MFI.vtbloffs) + ms_MFI.vtblindex); \ - void *vfnptr_origentry; \ - \ - META_RES status = MRES_IGNORED; \ - META_RES prev_res; \ - META_RES cur_res; \ - \ - typedef ReferenceCarrier< rettype >::type my_rettype; \ - my_rettype orig_ret; \ - my_rettype override_ret; \ - my_rettype plugin_ret; \ - IMyDelegate *iter; \ - IHookContext *pContext = SH_GLOB_SHPTR->SetupHookLoop(ms_HI, ourvfnptr, reinterpret_cast(this), \ - &vfnptr_origentry, &status, &prev_res, &cur_res, &orig_ret, &override_ret); - -#define SH_CALL_HOOKS(post, params) \ - prev_res = MRES_IGNORED; \ - while ( (iter = static_cast(pContext->GetNext())) ) \ - { \ - cur_res = MRES_IGNORED; \ - plugin_ret = iter->Call params; \ - prev_res = cur_res; \ - if (cur_res > status) \ - status = cur_res; \ - if (cur_res >= MRES_OVERRIDE) \ - *reinterpret_cast(pContext->GetOverrideRetPtr()) = plugin_ret; \ - } - -#define SH_CALL_ORIG(rettype, paramtypes, params) \ - if (status != MRES_SUPERCEDE && pContext->ShouldCallOrig()) \ - { \ - rettype (EmptyClass::*mfp)paramtypes; \ - SH_SETUP_MFP(mfp); \ - orig_ret = (reinterpret_cast(this)->*mfp)params; \ - } \ - else \ - orig_ret = override_ret; /* :TODO: ??? : use pContext->GetOverrideRetPtr() or not? */ - -#define SH_RETURN() \ - const my_rettype *retptr = reinterpret_cast( \ - (status >= MRES_OVERRIDE) ? pContext->GetOverrideRetPtr() : pContext->GetOrigRetPtr()); \ - SH_GLOB_SHPTR->EndContext(pContext); \ - return *retptr; - -#define SH_HANDLEFUNC(paramtypes, params, rettype) \ - SH_SETUPCALLS(rettype, paramtypes, params) \ - SH_CALL_HOOKS(pre, params) \ - SH_CALL_ORIG(rettype, paramtypes, params) \ - SH_CALL_HOOKS(post, params) \ - SH_RETURN() - -////////////////////////////////////////////////////////////////////////// -#define SH_SETUPCALLS_void(paramtypes, params) \ - /* 1) Set up */ \ - using namespace ::SourceHook; \ - void *ourvfnptr = reinterpret_cast( \ - *reinterpret_cast(reinterpret_cast(this) + ms_MFI.vtbloffs) + ms_MFI.vtblindex); \ - void *vfnptr_origentry; \ - \ - META_RES status = MRES_IGNORED; \ - META_RES prev_res; \ - META_RES cur_res; \ - \ - IMyDelegate *iter; \ - IHookContext *pContext = SH_GLOB_SHPTR->SetupHookLoop(ms_HI, ourvfnptr, reinterpret_cast(this), \ - &vfnptr_origentry, &status, &prev_res, &cur_res, NULL, NULL); - -#define SH_CALL_HOOKS_void(post, params) \ - prev_res = MRES_IGNORED; \ - while ( (iter = static_cast(pContext->GetNext())) ) \ - { \ - cur_res = MRES_IGNORED; \ - iter->Call params; \ - prev_res = cur_res; \ - if (cur_res > status) \ - status = cur_res; \ - } - -#define SH_CALL_ORIG_void(paramtypes, params) \ - if (status != MRES_SUPERCEDE && pContext->ShouldCallOrig()) \ - { \ - void (EmptyClass::*mfp)paramtypes; \ - SH_SETUP_MFP(mfp); \ - (reinterpret_cast(this)->*mfp)params; \ - } - -#define SH_RETURN_void() \ - SH_GLOB_SHPTR->EndContext(pContext); - -#define SH_HANDLEFUNC_void(paramtypes, params) \ - SH_SETUPCALLS_void(paramtypes, params) \ - SH_CALL_HOOKS_void(pre, params) \ - SH_CALL_ORIG_void(paramtypes, params) \ - SH_CALL_HOOKS_void(post, params) \ - SH_RETURN_void() - - -// Special vafmt handlers -// :TODO: what -#define SH_HANDLEFUNC_vafmt(paramtypes, params_orig, params_plug, rettype) \ - SH_SETUPCALLS(rettype, paramtypes, params_orig) \ - SH_CALL_HOOKS(pre, params_plug) \ - SH_CALL_ORIG(rettype, paramtypes, params_orig) \ - SH_CALL_HOOKS(post, params_plug) \ - SH_RETURN() - -#define SH_HANDLEFUNC_void_vafmt(paramtypes, params_orig, params_plug) \ - SH_SETUPCALLS_void(paramtypes, params_orig) \ - SH_CALL_HOOKS_void(pre, params_plug) \ - SH_CALL_ORIG_void(paramtypes, params_orig) \ - SH_CALL_HOOKS_void(post, params_plug) \ - SH_RETURN_void() - -////////////////////////////////////////////////////////////////////////// - -#define MAKE_DELEG(ret_type, params_decl, params_pass) \ - struct IMyDelegate : ::SourceHook::ISHDelegate { virtual ret_type Call params_decl = 0; }; \ - struct CMyDelegateImpl : IMyDelegate \ - { \ - FD m_Deleg; \ - CMyDelegateImpl(FD deleg) : m_Deleg(deleg) {} \ - virtual ~CMyDelegateImpl() {} \ - ret_type Call params_decl { return m_Deleg params_pass; } \ - void DeleteThis() { delete this; } \ - bool IsEqual(ISHDelegate *pOtherDeleg) { return m_Deleg == static_cast(pOtherDeleg)->m_Deleg; } \ - }; - -#define MAKE_DELEG_void(params_decl, params_pass) \ - struct IMyDelegate : ::SourceHook::ISHDelegate { virtual void Call params_decl = 0; }; \ - struct CMyDelegateImpl : IMyDelegate \ - { \ - FD m_Deleg; \ - CMyDelegateImpl(FD deleg) : m_Deleg(deleg) {} \ - virtual ~CMyDelegateImpl() {} \ - void Call params_decl { m_Deleg params_pass; } \ - void DeleteThis() { delete this; } \ - bool IsEqual(ISHDelegate *pOtherDeleg) { return m_Deleg == static_cast(pOtherDeleg)->m_Deleg; } \ - }; - -// GetPassInfo -> easier access. __SH_GPI generates a SourceHook::PassInfo instance. -#define __SH_GPI(tt) { sizeof(tt), ::SourceHook::GetPassInfo< tt >::type, ::SourceHook::GetPassInfo< tt >::flags } -// Extra pass info V2 -#define __SH_EPI { 0, 0, 0, 0 } - -#define __SH_VAFMT_SEQ(fmt, buf) \ - char buf[::SourceHook::STRBUF_LEN]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, sizeof(buf), fmt, ap); \ - buf[sizeof(buf) - 1] = 0; \ - va_end(ap); - -// Helper for MANUALEXTERN. -# define SHINT_DECL_MANUALEXTERN_impl_value(hookname, rettype) \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype res); - -// Helpers for transforming X(__VA_ARGS__, Y) -> Y when __VA_ARGS__ is empty. -#define SHINT_COLLAPSE0(_T, ...) __VA_ARGS__ - -// -// MSVC will automatically remove a trailing comma if __VA_ARGS__ is empty. GCC requires using ## to do this. -// -#if defined(_MSC_VER) -# define SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, ...) \ - int __SourceHook_FHAdd##ifacetype##ifacefunc(void *iface, ::SourceHook::ISourceHook::AddHookMode mode, bool post, \ - fastdelegate::FastDelegate handler); \ - bool __SourceHook_FHRemove##ifacetype##ifacefunc(void *iface, bool post, \ - fastdelegate::FastDelegate handler); - -# define SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, ...) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, void, __VA_ARGS__) - -# define SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, ...) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, __VA_ARGS__, const char *) - -# define SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, ...) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, void, __VA_ARGS__, const char *) - -// Helpers for MANUALEXTERN. -# define SHINT_DECL_MANUALEXTERN_impl_shared(hookname, rettype, ...) \ - int __SourceHook_FHMAdd##hookname(void *iface, ::SourceHook::ISourceHook::AddHookMode mode, bool post, \ - fastdelegate::FastDelegate handler); \ - bool __SourceHook_FHMRemove##hookname(void *iface, bool post, \ - fastdelegate::FastDelegate handler); \ - void __SourceHook_FHM_Reconfigure##hookname(int pvtblindex, int pvtbloffs, int pthisptroffs); - -# define SHINT_DECL_MANUALEXTERN_impl(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl_shared(hookname, rettype, __VA_ARGS__) \ - rettype(::SourceHook::EmptyClass::* __SoureceHook_FHM_GetRecallMFP##hookname(::SourceHook::EmptyClass *thisptr) )(__VA_ARGS__); \ - SourceHook::ExecutableClassN __SoureceHook_FHM_SHCall##hookname(void *ptr); - -# define SHINT_DECL_MANUALEXTERN_impl_vafmt(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl_shared(hookname, rettype, __VA_ARGS__, const char *) \ - rettype(::SourceHook::EmptyClass::* __SoureceHook_FHM_GetRecallMFP##hookname(::SourceHook::EmptyClass *thisptr) )(SHINT_COLLAPSE0(void, __VA_ARGS__, const char *, ...)); \ - SourceHook::ExecutableClassN __SoureceHook_FHM_SHCall##hookname(void *ptr); - -# define SH_DECL_MANUALEXTERN(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl(hookname, rettype, __VA_ARGS__) \ - SHINT_DECL_MANUALEXTERN_impl_value(hookname, rettype) - -# define SH_DECL_MANUALEXTERN_void(hookname, ...) \ - SHINT_DECL_MANUALEXTERN_impl(hookname, void, __VA_ARGS__) - -# define SH_DECL_MANUALEXTERN_void_vafmt(hookname, ...) \ - SHINT_DECL_MANUALEXTERN_impl_vafmt(hookname, void, __VA_ARGS__) - -# define SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl_vafmt(hookname, rettype, __VA_ARGS__) \ - SHINT_DECL_MANUALEXTERN_impl_value(hookname, rettype) - -// -// GCC Implementation. -// -#else -# define SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, ...) \ - int __SourceHook_FHAdd##ifacetype##ifacefunc(void *iface, ::SourceHook::ISourceHook::AddHookMode mode, bool post, \ - fastdelegate::FastDelegate handler); \ - bool __SourceHook_FHRemove##ifacetype##ifacefunc(void *iface, bool post, \ - fastdelegate::FastDelegate handler); - -# define SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, ...) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, void, ##__VA_ARGS__) - -# define SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, ...) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, ##__VA_ARGS__, const char *) - -# define SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, ...) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, void, ##__VA_ARGS__, const char *) - -// Helpers for MANUALEXTERN. -# define SHINT_DECL_MANUALEXTERN_impl_shared(hookname, rettype, ...) \ - int __SourceHook_FHMAdd##hookname(void *iface, ::SourceHook::ISourceHook::AddHookMode mode, bool post, \ - fastdelegate::FastDelegate handler); \ - bool __SourceHook_FHMRemove##hookname(void *iface, bool post, \ - fastdelegate::FastDelegate handler); \ - void __SourceHook_FHM_Reconfigure##hookname(int pvtblindex, int pvtbloffs, int pthisptroffs); - -# define SHINT_DECL_MANUALEXTERN_impl(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl_shared(hookname, rettype, ##__VA_ARGS__) \ - rettype(::SourceHook::EmptyClass::* __SoureceHook_FHM_GetRecallMFP##hookname(::SourceHook::EmptyClass *thisptr) )(__VA_ARGS__); \ - SourceHook::ExecutableClassN __SoureceHook_FHM_SHCall##hookname(void *ptr); - -# define SHINT_DECL_MANUALEXTERN_impl_vafmt(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl_shared(hookname, rettype, ##__VA_ARGS__, const char *) \ - rettype(::SourceHook::EmptyClass::* __SoureceHook_FHM_GetRecallMFP##hookname(::SourceHook::EmptyClass *thisptr) )(SHINT_COLLAPSE0(void, ##__VA_ARGS__, const char *, ...)); \ - SourceHook::ExecutableClassN __SoureceHook_FHM_SHCall##hookname(void *ptr); - -# define SH_DECL_MANUALEXTERN(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl(hookname, rettype, ##__VA_ARGS__) \ - SHINT_DECL_MANUALEXTERN_impl_value(hookname, rettype) - -# define SH_DECL_MANUALEXTERN_void(hookname, ...) \ - SHINT_DECL_MANUALEXTERN_impl(hookname, void, ##__VA_ARGS__) - -# define SH_DECL_MANUALEXTERN_void_vafmt(hookname, ...) \ - SHINT_DECL_MANUALEXTERN_impl_vafmt(hookname, void, ##__VA_ARGS__) - -# define SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, ...) \ - SHINT_DECL_MANUALEXTERN_impl_vafmt(hookname, rettype, ##__VA_ARGS__) \ - SHINT_DECL_MANUALEXTERN_impl_value(hookname, rettype) - -#endif - -// Compatibility wrappers around modern variadic macros. - -// ********* Support for 0 arguments ********* -#define SH_DECL_HOOK0(ifacetype, ifacefunc, attr, overload, rettype) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (), ()); \ - virtual rettype Func() \ - { SH_HANDLEFUNC((), (), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0} }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 0, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN0(ifacetype, ifacefunc, attr, overload, rettype) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype) - -#define SH_DECL_HOOK0_void(ifacetype, ifacefunc, attr, overload) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((), ()); \ - virtual void Func() \ - { SH_HANDLEFUNC_void((), ()); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0} }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 0, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN0_void(ifacetype, ifacefunc, attr, overload) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload) - -#define SH_DECL_HOOK0_vafmt(ifacetype, ifacefunc, attr, overload, rettype) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (const char *px), (px)); \ - virtual rettype Func( const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((const char *, ...), ("%s", buf), (buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0} }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 0, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN0_vafmt(ifacetype, ifacefunc, attr, overload, rettype) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype) - -#define SH_DECL_HOOK0_void_vafmt(ifacetype, ifacefunc, attr, overload) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((const char *px), (px)); \ - virtual void Func(const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((const char *, ...), ("%s", buf), (buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0} }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 0, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN0_void_vafmt(ifacetype, ifacefunc, attr, overload) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload) - -#define SH_DECL_MANUALHOOK0(hookname, vtblidx, vtbloffs, thisptroffs, rettype) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (), ()); \ - virtual rettype Func() \ - { SH_HANDLEFUNC((), (), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0} }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 0, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN0(hookname, rettype) \ - SH_DECL_MANUALEXTERN(hookname, rettype) - -#define SH_DECL_MANUALHOOK0_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (const char *px), (px)); \ - virtual rettype Func(const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((const char *, ...), ("%s", buf), (buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0} }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 0, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN0_vafmt(hookname, rettype) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype) - -#define SH_DECL_MANUALHOOK0_void(hookname, vtblidx, vtbloffs, thisptroffs) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((), ()); \ - virtual void Func() \ - { SH_HANDLEFUNC_void((), ()); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0} }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 0, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN0_void(hookname) \ - SH_DECL_MANUALEXTERN_void(hookname) - -#define SH_DECL_MANUALHOOK0_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((const char *px), (px)); \ - virtual void Func(const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((const char *, ...), ("%s", buf), (buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0} }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 0, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN0_void_vafmt(hookname) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname) - - -// ********* Support for 1 arguments ********* -#define SH_DECL_HOOK1(ifacetype, ifacefunc, attr, overload, rettype, param1) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1), (p1)); \ - virtual rettype Func(param1 p1) \ - { SH_HANDLEFUNC((param1), (p1), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 1, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN1(ifacetype, ifacefunc, attr, overload, rettype, param1) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1) - -#define SH_DECL_HOOK1_void(ifacetype, ifacefunc, attr, overload, param1) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1), (p1)); \ - virtual void Func(param1 p1) \ - { SH_HANDLEFUNC_void((param1), (p1)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 1, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN1_void(ifacetype, ifacefunc, attr, overload, param1) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1) - -#define SH_DECL_HOOK1_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, const char *px), (p1, px)); \ - virtual rettype Func(param1 p1 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, const char *, ...), (p1, "%s", buf), (p1, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 1, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN1_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1) - -#define SH_DECL_HOOK1_void_vafmt(ifacetype, ifacefunc, attr, overload, param1) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, const char *px), (p1, px)); \ - virtual void Func(param1 p1, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, const char *, ...), (p1, "%s", buf), (p1, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 1, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN1_void_vafmt(ifacetype, ifacefunc, attr, overload, param1) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1) - -#define SH_DECL_MANUALHOOK1(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1), (p1)); \ - virtual rettype Func(param1 p1) \ - { SH_HANDLEFUNC((param1), (p1), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 1, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN1(hookname, rettype, param1) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1) - -#define SH_DECL_MANUALHOOK1_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, const char *px), (p1, px)); \ - virtual rettype Func(param1 p1, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, const char *, ...), (p1, "%s", buf), (p1, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 1, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN1_vafmt(hookname, rettype, param1) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1) - -#define SH_DECL_MANUALHOOK1_void(hookname, vtblidx, vtbloffs, thisptroffs, param1) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1), (p1)); \ - virtual void Func(param1 p1) \ - { SH_HANDLEFUNC_void((param1), (p1)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 1, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN1_void(hookname, param1) \ - SH_DECL_MANUALEXTERN_void(hookname, param1) - -#define SH_DECL_MANUALHOOK1_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, const char *px), (p1, px)); \ - virtual void Func(param1 p1, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, const char *, ...), (p1, "%s", buf), (p1, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 1, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN1_void_vafmt(hookname, param1) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1) - - -// ********* Support for 2 arguments ********* -#define SH_DECL_HOOK2(ifacetype, ifacefunc, attr, overload, rettype, param1, param2) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2), (p1, p2)); \ - virtual rettype Func(param1 p1, param2 p2) \ - { SH_HANDLEFUNC((param1, param2), (p1, p2), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 2, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN2(ifacetype, ifacefunc, attr, overload, rettype, param1, param2) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2) - -#define SH_DECL_HOOK2_void(ifacetype, ifacefunc, attr, overload, param1, param2) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2), (p1, p2)); \ - virtual void Func(param1 p1, param2 p2) \ - { SH_HANDLEFUNC_void((param1, param2), (p1, p2)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 2, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN2_void(ifacetype, ifacefunc, attr, overload, param1, param2) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2) - -#define SH_DECL_HOOK2_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, const char *px), (p1, p2, px)); \ - virtual rettype Func(param1 p1, param2 p2 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, const char *, ...), (p1, p2, "%s", buf), (p1, p2, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 2, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN2_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2) - -#define SH_DECL_HOOK2_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, const char *px), (p1, p2, px)); \ - virtual void Func(param1 p1, param2 p2, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, const char *, ...), (p1, p2, "%s", buf), (p1, p2, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 2, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN2_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2) - -#define SH_DECL_MANUALHOOK2(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2), (p1, p2)); \ - virtual rettype Func(param1 p1, param2 p2) \ - { SH_HANDLEFUNC((param1, param2), (p1, p2), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 2, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN2(hookname, rettype, param1, param2) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2) - -#define SH_DECL_MANUALHOOK2_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, const char *px), (p1, p2, px)); \ - virtual rettype Func(param1 p1, param2 p2, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, const char *, ...), (p1, p2, "%s", buf), (p1, p2, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 2, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN2_vafmt(hookname, rettype, param1, param2) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2) - -#define SH_DECL_MANUALHOOK2_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2), (p1, p2)); \ - virtual void Func(param1 p1, param2 p2) \ - { SH_HANDLEFUNC_void((param1, param2), (p1, p2)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 2, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN2_void(hookname, param1, param2) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2) - -#define SH_DECL_MANUALHOOK2_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, const char *px), (p1, p2, px)); \ - virtual void Func(param1 p1, param2 p2, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, const char *, ...), (p1, p2, "%s", buf), (p1, p2, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 2, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN2_void_vafmt(hookname, param1, param2) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2) - - -// ********* Support for 3 arguments ********* -#define SH_DECL_HOOK3(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3), (p1, p2, p3)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3) \ - { SH_HANDLEFUNC((param1, param2, param3), (p1, p2, p3), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 3, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN3(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3) - -#define SH_DECL_HOOK3_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3), (p1, p2, p3)); \ - virtual void Func(param1 p1, param2 p2, param3 p3) \ - { SH_HANDLEFUNC_void((param1, param2, param3), (p1, p2, p3)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 3, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN3_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3) - -#define SH_DECL_HOOK3_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, const char *px), (p1, p2, p3, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, const char *, ...), (p1, p2, p3, "%s", buf), (p1, p2, p3, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 3, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN3_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3) - -#define SH_DECL_HOOK3_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, const char *px), (p1, p2, p3, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, const char *, ...), (p1, p2, p3, "%s", buf), (p1, p2, p3, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 3, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN3_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3) - -#define SH_DECL_MANUALHOOK3(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3), (p1, p2, p3)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3) \ - { SH_HANDLEFUNC((param1, param2, param3), (p1, p2, p3), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 3, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN3(hookname, rettype, param1, param2, param3) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3) - -#define SH_DECL_MANUALHOOK3_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, const char *px), (p1, p2, p3, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, const char *, ...), (p1, p2, p3, "%s", buf), (p1, p2, p3, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 3, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN3_vafmt(hookname, rettype, param1, param2, param3) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3) - -#define SH_DECL_MANUALHOOK3_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3), (p1, p2, p3)); \ - virtual void Func(param1 p1, param2 p2, param3 p3) \ - { SH_HANDLEFUNC_void((param1, param2, param3), (p1, p2, p3)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 3, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN3_void(hookname, param1, param2, param3) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3) - -#define SH_DECL_MANUALHOOK3_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, const char *px), (p1, p2, p3, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, const char *, ...), (p1, p2, p3, "%s", buf), (p1, p2, p3, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 3, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN3_void_vafmt(hookname, param1, param2, param3) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3) - - -// ********* Support for 4 arguments ********* -#define SH_DECL_HOOK4(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4), (p1, p2, p3, p4)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4) \ - { SH_HANDLEFUNC((param1, param2, param3, param4), (p1, p2, p3, p4), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 4, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN4(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4) - -#define SH_DECL_HOOK4_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4), (p1, p2, p3, p4)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4), (p1, p2, p3, p4)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 4, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN4_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4) - -#define SH_DECL_HOOK4_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, const char *px), (p1, p2, p3, p4, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, const char *, ...), (p1, p2, p3, p4, "%s", buf), (p1, p2, p3, p4, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 4, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN4_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4) - -#define SH_DECL_HOOK4_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, const char *px), (p1, p2, p3, p4, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, const char *, ...), (p1, p2, p3, p4, "%s", buf), (p1, p2, p3, p4, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 4, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN4_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4) - -#define SH_DECL_MANUALHOOK4(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4), (p1, p2, p3, p4)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4) \ - { SH_HANDLEFUNC((param1, param2, param3, param4), (p1, p2, p3, p4), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 4, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN4(hookname, rettype, param1, param2, param3, param4) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4) - -#define SH_DECL_MANUALHOOK4_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, const char *px), (p1, p2, p3, p4, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, const char *, ...), (p1, p2, p3, p4, "%s", buf), (p1, p2, p3, p4, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 4, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN4_vafmt(hookname, rettype, param1, param2, param3, param4) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4) - -#define SH_DECL_MANUALHOOK4_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4), (p1, p2, p3, p4)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4), (p1, p2, p3, p4)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 4, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN4_void(hookname, param1, param2, param3, param4) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4) - -#define SH_DECL_MANUALHOOK4_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, const char *px), (p1, p2, p3, p4, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, const char *, ...), (p1, p2, p3, p4, "%s", buf), (p1, p2, p3, p4, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 4, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN4_void_vafmt(hookname, param1, param2, param3, param4) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4) - - -// ********* Support for 5 arguments ********* -#define SH_DECL_HOOK5(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5), (p1, p2, p3, p4, p5)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5), (p1, p2, p3, p4, p5), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 5, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN5(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5) - -#define SH_DECL_HOOK5_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5), (p1, p2, p3, p4, p5)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5), (p1, p2, p3, p4, p5)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 5, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN5_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5) - -#define SH_DECL_HOOK5_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *px), (p1, p2, p3, p4, p5, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, const char *, ...), (p1, p2, p3, p4, p5, "%s", buf), (p1, p2, p3, p4, p5, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 5, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN5_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5) - -#define SH_DECL_HOOK5_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *px), (p1, p2, p3, p4, p5, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, const char *, ...), (p1, p2, p3, p4, p5, "%s", buf), (p1, p2, p3, p4, p5, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 5, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN5_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5) - -#define SH_DECL_MANUALHOOK5(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5), (p1, p2, p3, p4, p5)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5), (p1, p2, p3, p4, p5), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 5, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN5(hookname, rettype, param1, param2, param3, param4, param5) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5) - -#define SH_DECL_MANUALHOOK5_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *px), (p1, p2, p3, p4, p5, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, const char *, ...), (p1, p2, p3, p4, p5, "%s", buf), (p1, p2, p3, p4, p5, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 5, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN5_vafmt(hookname, rettype, param1, param2, param3, param4, param5) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5) - -#define SH_DECL_MANUALHOOK5_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5), (p1, p2, p3, p4, p5)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5), (p1, p2, p3, p4, p5)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 5, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN5_void(hookname, param1, param2, param3, param4, param5) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5) - -#define SH_DECL_MANUALHOOK5_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *px), (p1, p2, p3, p4, p5, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, const char *, ...), (p1, p2, p3, p4, p5, "%s", buf), (p1, p2, p3, p4, p5, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 5, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN5_void_vafmt(hookname, param1, param2, param3, param4, param5) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5) - - -// ********* Support for 6 arguments ********* -#define SH_DECL_HOOK6(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6), (p1, p2, p3, p4, p5, p6)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6), (p1, p2, p3, p4, p5, p6), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 6, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN6(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6) - -#define SH_DECL_HOOK6_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6), (p1, p2, p3, p4, p5, p6)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6), (p1, p2, p3, p4, p5, p6)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 6, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN6_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6) - -#define SH_DECL_HOOK6_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *px), (p1, p2, p3, p4, p5, p6, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, const char *, ...), (p1, p2, p3, p4, p5, p6, "%s", buf), (p1, p2, p3, p4, p5, p6, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 6, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN6_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6) - -#define SH_DECL_HOOK6_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *px), (p1, p2, p3, p4, p5, p6, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, const char *, ...), (p1, p2, p3, p4, p5, p6, "%s", buf), (p1, p2, p3, p4, p5, p6, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 6, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN6_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6) - -#define SH_DECL_MANUALHOOK6(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6), (p1, p2, p3, p4, p5, p6)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6), (p1, p2, p3, p4, p5, p6), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 6, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN6(hookname, rettype, param1, param2, param3, param4, param5, param6) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6) - -#define SH_DECL_MANUALHOOK6_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *px), (p1, p2, p3, p4, p5, p6, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, const char *, ...), (p1, p2, p3, p4, p5, p6, "%s", buf), (p1, p2, p3, p4, p5, p6, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 6, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN6_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6) - -#define SH_DECL_MANUALHOOK6_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6), (p1, p2, p3, p4, p5, p6)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6), (p1, p2, p3, p4, p5, p6)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 6, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN6_void(hookname, param1, param2, param3, param4, param5, param6) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6) - -#define SH_DECL_MANUALHOOK6_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *px), (p1, p2, p3, p4, p5, p6, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, const char *, ...), (p1, p2, p3, p4, p5, p6, "%s", buf), (p1, p2, p3, p4, p5, p6, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 6, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN6_void_vafmt(hookname, param1, param2, param3, param4, param5, param6) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6) - - -// ********* Support for 7 arguments ********* -#define SH_DECL_HOOK7(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7), (p1, p2, p3, p4, p5, p6, p7)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7), (p1, p2, p3, p4, p5, p6, p7), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 7, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN7(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7) - -#define SH_DECL_HOOK7_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7), (p1, p2, p3, p4, p5, p6, p7)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7), (p1, p2, p3, p4, p5, p6, p7)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6),__SH_GPI(param7) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 7, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN7_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7) - -#define SH_DECL_HOOK7_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, const char *px), (p1, p2, p3, p4, p5, p6, p7, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 7, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN7_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7) - -#define SH_DECL_HOOK7_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, const char *px), (p1, p2, p3, p4, p5, p6, p7, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 7, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN7_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7) - -#define SH_DECL_MANUALHOOK7(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7), (p1, p2, p3, p4, p5, p6, p7)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7), (p1, p2, p3, p4, p5, p6, p7), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 7, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN7(hookname, rettype, param1, param2, param3, param4, param5, param6, param7) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6, param7) - -#define SH_DECL_MANUALHOOK7_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, const char *px), (p1, p2, p3, p4, p5, p6, p7, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 7, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN7_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7) - -#define SH_DECL_MANUALHOOK7_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7), (p1, p2, p3, p4, p5, p6, p7)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7), (p1, p2, p3, p4, p5, p6, p7)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 7, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN7_void(hookname, param1, param2, param3, param4, param5, param6, param7) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6, param7) - -#define SH_DECL_MANUALHOOK7_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, const char *px), (p1, p2, p3, p4, p5, p6, p7, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, param7, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 7, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN7_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7) - - -// ********* Support for 8 arguments ********* -#define SH_DECL_HOOK8(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8), (p1, p2, p3, p4, p5, p6, p7, p8)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8), (p1, p2, p3, p4, p5, p6, p7, p8), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 8, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN8(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8) - -#define SH_DECL_HOOK8_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8), (p1, p2, p3, p4, p5, p6, p7, p8)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8), (p1, p2, p3, p4, p5, p6, p7, p8)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6),__SH_GPI(param7),__SH_GPI(param8) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 8, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN8_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8) - -#define SH_DECL_HOOK8_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 8, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN8_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8) - -#define SH_DECL_HOOK8_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 8, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN8_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8) - -#define SH_DECL_MANUALHOOK8(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8), (p1, p2, p3, p4, p5, p6, p7, p8)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8), (p1, p2, p3, p4, p5, p6, p7, p8), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 8, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN8(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8) - -#define SH_DECL_MANUALHOOK8_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 8, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN8_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8) - -#define SH_DECL_MANUALHOOK8_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8), (p1, p2, p3, p4, p5, p6, p7, p8)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8), (p1, p2, p3, p4, p5, p6, p7, p8)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 8, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN8_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8) - -#define SH_DECL_MANUALHOOK8_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, param7, param8, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 8, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN8_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8) - - -// ********* Support for 9 arguments ********* -#define SH_DECL_HOOK9(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9), (p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9), (p1, p2, p3, p4, p5, p6, p7, p8, p9), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 9, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN9(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9) - -#define SH_DECL_HOOK9_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9), (p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9), (p1, p2, p3, p4, p5, p6, p7, p8, p9)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6),__SH_GPI(param7),__SH_GPI(param8),__SH_GPI(param9) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 9, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN9_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9) - -#define SH_DECL_HOOK9_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 9, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN9_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9) - -#define SH_DECL_HOOK9_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 9, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN9_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9) - -#define SH_DECL_MANUALHOOK9(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9), (p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9), (p1, p2, p3, p4, p5, p6, p7, p8, p9), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 9, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN9(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9) - -#define SH_DECL_MANUALHOOK9_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 9, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN9_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9) - -#define SH_DECL_MANUALHOOK9_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9), (p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9), (p1, p2, p3, p4, p5, p6, p7, p8, p9)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 9, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN9_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9) - -#define SH_DECL_MANUALHOOK9_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, param7, param8, param9, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 9, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN9_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9) - - -// ********* Support for 10 arguments ********* -#define SH_DECL_HOOK10(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 10, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN10(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) - -#define SH_DECL_HOOK10_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6),__SH_GPI(param7),__SH_GPI(param8),__SH_GPI(param9),__SH_GPI(param10) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 10, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN10_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) - -#define SH_DECL_HOOK10_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 10, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN10_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) - -#define SH_DECL_HOOK10_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 10, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN10_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) - -#define SH_DECL_MANUALHOOK10(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 10, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN10(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) - -#define SH_DECL_MANUALHOOK10_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 10, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN10_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) - -#define SH_DECL_MANUALHOOK10_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 10, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN10_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) - -#define SH_DECL_MANUALHOOK10_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 10, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN10_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10) - - -// ********* Support for 11 arguments ********* -#define SH_DECL_HOOK11(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 11, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN11(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) - -#define SH_DECL_HOOK11_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6),__SH_GPI(param7),__SH_GPI(param8),__SH_GPI(param9),__SH_GPI(param10),__SH_GPI(param11) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 11, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN11_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) - -#define SH_DECL_HOOK11_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 11, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN11_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) - -#define SH_DECL_HOOK11_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 11, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN11_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) - -#define SH_DECL_MANUALHOOK11(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 11, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN11(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) - -#define SH_DECL_MANUALHOOK11_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 11, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN11_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) - -#define SH_DECL_MANUALHOOK11_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 11, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN11_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) - -#define SH_DECL_MANUALHOOK11_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 11, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN11_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11) - - -// ********* Support for 12 arguments ********* -#define SH_DECL_HOOK12(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 12, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN12(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) - -#define SH_DECL_HOOK12_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6),__SH_GPI(param7),__SH_GPI(param8),__SH_GPI(param9),__SH_GPI(param10),__SH_GPI(param11),__SH_GPI(param12) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 12, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN12_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) - -#define SH_DECL_HOOK12_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 12, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN12_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) - -#define SH_DECL_HOOK12_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 12, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN12_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) - -#define SH_DECL_MANUALHOOK12(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 12, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN12(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) - -#define SH_DECL_MANUALHOOK12_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 12, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN12_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) - -#define SH_DECL_MANUALHOOK12_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 12, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN12_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) - -#define SH_DECL_MANUALHOOK12_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 12, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN12_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12) - - -// ********* Support for 13 arguments ********* -#define SH_DECL_HOOK13(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 13, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN13(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) - -#define SH_DECL_HOOK13_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6),__SH_GPI(param7),__SH_GPI(param8),__SH_GPI(param9),__SH_GPI(param10),__SH_GPI(param11),__SH_GPI(param12),__SH_GPI(param13) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 13, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN13_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) - -#define SH_DECL_HOOK13_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 13, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN13_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) - -#define SH_DECL_HOOK13_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 13, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN13_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) - -#define SH_DECL_MANUALHOOK13(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 13, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN13(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) - -#define SH_DECL_MANUALHOOK13_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 13, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN13_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) - -#define SH_DECL_MANUALHOOK13_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 13, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN13_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) - -#define SH_DECL_MANUALHOOK13_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 13, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN13_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13) - - -// ********* Support for 14 arguments ********* -#define SH_DECL_HOOK14(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 14, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN14(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) - -#define SH_DECL_HOOK14_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6),__SH_GPI(param7),__SH_GPI(param8),__SH_GPI(param9),__SH_GPI(param10),__SH_GPI(param11),__SH_GPI(param12),__SH_GPI(param13),__SH_GPI(param14) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 14, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN14_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) - -#define SH_DECL_HOOK14_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 14, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN14_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) - -#define SH_DECL_HOOK14_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 14, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN14_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) - -#define SH_DECL_MANUALHOOK14(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 14, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN14(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) - -#define SH_DECL_MANUALHOOK14_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 14, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN14_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) - -#define SH_DECL_MANUALHOOK14_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 14, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN14_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) - -#define SH_DECL_MANUALHOOK14_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 14, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN14_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14) - - -// ********* Support for 15 arguments ********* -#define SH_DECL_HOOK15(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 15, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN15(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) - -#define SH_DECL_HOOK15_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6),__SH_GPI(param7),__SH_GPI(param8),__SH_GPI(param9),__SH_GPI(param10),__SH_GPI(param11),__SH_GPI(param12),__SH_GPI(param13),__SH_GPI(param14),__SH_GPI(param15) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 15, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN15_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) - -#define SH_DECL_HOOK15_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 15, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN15_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) - -#define SH_DECL_HOOK15_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 15, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN15_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) - -#define SH_DECL_MANUALHOOK15(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 15, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN15(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) - -#define SH_DECL_MANUALHOOK15_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 15, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN15_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) - -#define SH_DECL_MANUALHOOK15_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 15, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN15_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) - -#define SH_DECL_MANUALHOOK15_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 15, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN15_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15) - - -// ********* Support for 16 arguments ********* -#define SH_DECL_HOOK16(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 16, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN16(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) - -#define SH_DECL_HOOK16_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6),__SH_GPI(param7),__SH_GPI(param8),__SH_GPI(param9),__SH_GPI(param10),__SH_GPI(param11),__SH_GPI(param12),__SH_GPI(param13),__SH_GPI(param14),__SH_GPI(param15),__SH_GPI(param16) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 16, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN16_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) - -#define SH_DECL_HOOK16_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 16, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN16_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) - -#define SH_DECL_HOOK16_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 16, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN16_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) - -#define SH_DECL_MANUALHOOK16(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 16, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN16(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) - -#define SH_DECL_MANUALHOOK16_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 16, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN16_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) - -#define SH_DECL_MANUALHOOK16_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 16, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN16_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) - -#define SH_DECL_MANUALHOOK16_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 16, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN16_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16) - - -// ********* Support for 17 arguments ********* -#define SH_DECL_HOOK17(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 17, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN17(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) - -#define SH_DECL_HOOK17_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6),__SH_GPI(param7),__SH_GPI(param8),__SH_GPI(param9),__SH_GPI(param10),__SH_GPI(param11),__SH_GPI(param12),__SH_GPI(param13),__SH_GPI(param14),__SH_GPI(param15),__SH_GPI(param16),__SH_GPI(param17) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 17, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN17_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) - -#define SH_DECL_HOOK17_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 17, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN17_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) - -#define SH_DECL_HOOK17_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 17, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN17_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) - -#define SH_DECL_MANUALHOOK17(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 17, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN17(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) - -#define SH_DECL_MANUALHOOK17_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 17, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN17_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) - -#define SH_DECL_MANUALHOOK17_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 17, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN17_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) - -#define SH_DECL_MANUALHOOK17_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 17, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN17_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17) - - -// ********* Support for 18 arguments ********* -#define SH_DECL_HOOK18(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 18, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN18(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) - -#define SH_DECL_HOOK18_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6),__SH_GPI(param7),__SH_GPI(param8),__SH_GPI(param9),__SH_GPI(param10),__SH_GPI(param11),__SH_GPI(param12),__SH_GPI(param13),__SH_GPI(param14),__SH_GPI(param15),__SH_GPI(param16),__SH_GPI(param17),__SH_GPI(param18) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 18, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN18_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) - -#define SH_DECL_HOOK18_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 18, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN18_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) - -#define SH_DECL_HOOK18_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 18, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN18_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) - -#define SH_DECL_MANUALHOOK18(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 18, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN18(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) - -#define SH_DECL_MANUALHOOK18_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 18, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN18_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) - -#define SH_DECL_MANUALHOOK18_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 18, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN18_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) - -#define SH_DECL_MANUALHOOK18_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 18, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN18_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18) - - -// ********* Support for 19 arguments ********* -#define SH_DECL_HOOK19(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18), __SH_GPI(param19) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 19, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN19(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) - -#define SH_DECL_HOOK19_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6),__SH_GPI(param7),__SH_GPI(param8),__SH_GPI(param9),__SH_GPI(param10),__SH_GPI(param11),__SH_GPI(param12),__SH_GPI(param13),__SH_GPI(param14),__SH_GPI(param15),__SH_GPI(param16),__SH_GPI(param17),__SH_GPI(param18),__SH_GPI(param19) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 19, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN19_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) - -#define SH_DECL_HOOK19_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18), __SH_GPI(param19) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 19, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN19_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) - -#define SH_DECL_HOOK19_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18), __SH_GPI(param19) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 19, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN19_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) - -#define SH_DECL_MANUALHOOK19(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18), __SH_GPI(param19) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 19, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN19(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) - -#define SH_DECL_MANUALHOOK19_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18), __SH_GPI(param19) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 19, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN19_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) - -#define SH_DECL_MANUALHOOK19_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18), __SH_GPI(param19) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 19, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN19_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) - -#define SH_DECL_MANUALHOOK19_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18), __SH_GPI(param19) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 19, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN19_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19) - - -// ********* Support for 20 arguments ********* -#define SH_DECL_HOOK20(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20), rettype); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18), __SH_GPI(param19), __SH_GPI(param20) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 20, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN20(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SH_DECL_EXTERN(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) - -#define SH_DECL_HOOK20_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20)); } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0},__SH_GPI(param1),__SH_GPI(param2),__SH_GPI(param3),__SH_GPI(param4),__SH_GPI(param5),__SH_GPI(param6),__SH_GPI(param7),__SH_GPI(param8),__SH_GPI(param9),__SH_GPI(param10),__SH_GPI(param11),__SH_GPI(param12),__SH_GPI(param13),__SH_GPI(param14),__SH_GPI(param15),__SH_GPI(param16),__SH_GPI(param17),__SH_GPI(param18),__SH_GPI(param19),__SH_GPI(param20) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 20, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN20_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SH_DECL_EXTERN_void(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) - -#define SH_DECL_HOOK20_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20 , const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, buf), rettype); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18), __SH_GPI(param19), __SH_GPI(param20) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 20, __SH_GPI(rettype), \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN20_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SH_DECL_EXTERN_vafmt(ifacetype, ifacefunc, attr, overload, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) - -#define SH_DECL_HOOK20_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SHINT_MAKE_GENERICSTUFF_BEGIN(ifacetype, ifacefunc, overload, (static_cast \ - (&ifacetype::ifacefunc))) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, buf)); \ - } \ - SHINT_MAKE_GENERICSTUFF_END(ifacetype, ifacefunc, overload, \ - (static_cast(&ifacetype::ifacefunc))) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18), __SH_GPI(param19), __SH_GPI(param20) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_FHCls(ifacetype, ifacefunc, overload)::ms_Proto = { 20, { 0, 0, 0 }, \ - __SourceHook_ParamInfos_##ifacetype##ifacefunc##overload, 0, __SH_EPI, __SourceHook_ParamInfos2_##ifacetype##ifacefunc##overload }; - -#define SH_DECL_EXTERN20_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SH_DECL_EXTERN_void_vafmt(ifacetype, ifacefunc, attr, overload, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) - -#define SH_DECL_MANUALHOOK20(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20) \ - { SH_HANDLEFUNC((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20), rettype); } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20 > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18), __SH_GPI(param19), __SH_GPI(param20) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 20, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN20(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SH_DECL_MANUALEXTERN(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) - -#define SH_DECL_MANUALHOOK20_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG(rettype, (param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, px)); \ - virtual rettype Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, buf), rettype); \ - } \ - typedef rettype(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20, const char * > CallEC; \ - typedef rettype RetType; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18), __SH_GPI(param19), __SH_GPI(param20) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 20, __SH_GPI(rettype), \ - __SourceHook_ParamInfosM_##hookname, 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; \ - void __SoureceHook_FHM_SetOverrideResult##hookname(::SourceHook::ISourceHook *shptr, rettype value) \ - { \ - ::SourceHook::SetOverrideResult()(shptr, value); \ - } - -#define SH_DECL_MANUALEXTERN20_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SH_DECL_MANUALEXTERN_vafmt(hookname, rettype, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) - -#define SH_DECL_MANUALHOOK20_void(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20) \ - { SH_HANDLEFUNC_void((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20)); } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20); \ - typedef SourceHook::ExecutableClassN CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18), __SH_GPI(param19), __SH_GPI(param20) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 20, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN20_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SH_DECL_MANUALEXTERN_void(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) - -#define SH_DECL_MANUALHOOK20_void_vafmt(hookname, vtblidx, vtbloffs, thisptroffs, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SHINT_MAKE_GENERICSTUFF_BEGIN_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - typedef fastdelegate::FastDelegate FD; \ - MAKE_DELEG_void((param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20, const char *px), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, px)); \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, param7 p7, param8 p8, param9 p9, param10 p10, param11 p11, param12 p12, param13 p13, param14 p14, param15 p15, param16 p16, param17 p17, param18 p18, param19 p19, param20 p20, const char *fmt, ...) \ - { \ - __SH_VAFMT_SEQ(fmt, buf); \ - SH_HANDLEFUNC_void_vafmt((param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20, const char *, ...), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, "%s", buf), (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, buf)); \ - } \ - typedef void(::SourceHook::EmptyClass::*ECMFP)(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20, const char *, ...); \ - typedef SourceHook::ExecutableClassN< ::SourceHook::EmptyClass, ECMFP, void, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20, const char * > CallEC; \ - SHINT_MAKE_GENERICSTUFF_END_MANUAL(hookname, vtbloffs, vtblidx, thisptroffs) \ - \ - const ::SourceHook::PassInfo __SourceHook_ParamInfosM_##hookname[] = { {1, 0, 0}, __SH_GPI(param1), __SH_GPI(param2), __SH_GPI(param3), __SH_GPI(param4), __SH_GPI(param5), __SH_GPI(param6), __SH_GPI(param7), __SH_GPI(param8), __SH_GPI(param9), __SH_GPI(param10), __SH_GPI(param11), __SH_GPI(param12), __SH_GPI(param13), __SH_GPI(param14), __SH_GPI(param15), __SH_GPI(param16), __SH_GPI(param17), __SH_GPI(param18), __SH_GPI(param19), __SH_GPI(param20) }; \ - const ::SourceHook::PassInfo::V2Info __SourceHook_ParamInfos2M_##hookname[] = { __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI, __SH_EPI }; \ - ::SourceHook::ProtoInfo SH_MFHCls(hookname)::ms_Proto = { 20, { 0, 0, 0 }, \ - __SourceHook_ParamInfosM_##hookname , 0, __SH_EPI, __SourceHook_ParamInfos2M_##hookname }; - -#define SH_DECL_MANUALEXTERN20_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) \ - SH_DECL_MANUALEXTERN_void_vafmt(hookname, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11, param12, param13, param14, param15, param16, param17, param18, param19, param20) - - - - -////////////////////////////////////////////////////////////////////////// -// SH_CALL - -namespace SourceHook -{ - template - class ExecutableClassN - { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; - public: - ExecutableClassN(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) - : m_ThisPtr(tp), - m_VfnPtr(vp), - m_MFP(mfp), - m_pSH(pSH) - { } - - RetType operator()(Params... params) const { - using namespace ::SourceHook; - m_pSH->SetIgnoreHooks(m_VfnPtr); - RetType tmpret = (m_ThisPtr->*m_MFP)(params...); - m_pSH->ResetIgnoreHooks(m_VfnPtr); - return tmpret; - } - - template - RetType operator()(Params... params, MoreParams... more) const { - using namespace ::SourceHook; - m_pSH->SetIgnoreHooks(m_VfnPtr); - RetType tmpret = (m_ThisPtr->*m_MFP)(params..., more...); - m_pSH->ResetIgnoreHooks(m_VfnPtr); - return tmpret; - } - }; - - template - class ExecutableClassN - { - ObjType *m_ThisPtr; - void *m_VfnPtr; - MFPType m_MFP; - ISourceHook *m_pSH; - public: - ExecutableClassN(ObjType *tp, MFPType mfp, void *vp, ISourceHook *pSH) - : m_ThisPtr(tp), - m_VfnPtr(vp), - m_MFP(mfp), - m_pSH(pSH) - { } - - void operator()(Params... params) const { - using namespace ::SourceHook; - m_pSH->SetIgnoreHooks(m_VfnPtr); - (m_ThisPtr->*m_MFP)(params...); - m_pSH->ResetIgnoreHooks(m_VfnPtr); - } - - template - void operator()(Params... params, MoreParams... more) const { - using namespace ::SourceHook; - m_pSH->SetIgnoreHooks(m_VfnPtr); - (m_ThisPtr->*m_MFP)(params..., more...); - m_pSH->ResetIgnoreHooks(m_VfnPtr); - } - }; -} - -#define SH__CALL_GET_VFNPTR_NORMAL \ - using namespace ::SourceHook; \ - MemFuncInfo mfi = {true, -1, 0, 0}; \ - GetFuncInfo(ptr, mfp, mfi); \ - void *vfnptr = reinterpret_cast( \ - *reinterpret_cast(reinterpret_cast(ptr) + mfi.thisptroffs + mfi.vtbloffs) + mfi.vtblindex); - -#define SH__CALL_GET_VFNPTR_MANUAL \ - using namespace ::SourceHook; \ - void *vfnptr = reinterpret_cast( \ - *reinterpret_cast( (reinterpret_cast(ptr) + thisptroffs + vtbloffs) ) + vtblidx); \ - /* patch mfp */ \ - *reinterpret_cast(&mfp) = *reinterpret_cast(vfnptr); - -// SH_CALL needs to deduce the return type -> it uses templates and function overloading -// That's why SH_CALL takes two parameters: "mfp2" of type RetType(X::*mfp)(params), and "mfp" of type MFP -// The only purpose of the mfp2 parameter is to extract the return type - -template -SourceHook::ExecutableClassN -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Params...), SourceHook::ISourceHook *shptr) -{ - SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClassN(ptr, mfp, vfnptr, shptr); -} - -template -SourceHook::ExecutableClassN -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Params..., ...), SourceHook::ISourceHook *shptr) -{ - SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClassN(ptr, mfp, vfnptr, shptr); -} - -template -SourceHook::ExecutableClassN -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Params...)const, SourceHook::ISourceHook *shptr) -{ - SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClassN(ptr, mfp, vfnptr, shptr); -} - -template -SourceHook::ExecutableClassN -SH_CALL2(Y *ptr, MFP mfp, RetType(X::*mfp2)(Params..., ...)const, SourceHook::ISourceHook *shptr) -{ - SH__CALL_GET_VFNPTR_NORMAL - return SourceHook::ExecutableClassN(ptr, mfp, vfnptr, shptr); -} - -template -SourceHook::ExecutableClassN -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Params...), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) -{ - SH__CALL_GET_VFNPTR_MANUAL - return SourceHook::ExecutableClassN( - reinterpret_cast(ptr), mfp, vfnptr, shptr); -} - -template -SourceHook::ExecutableClassN -SH_MCALL3(Y *ptr, MFP mfp, RetType(X::*mfp2)(Params..., ...), int vtblidx, int vtbloffs, int thisptroffs, SourceHook::ISourceHook *shptr) -{ - SH__CALL_GET_VFNPTR_MANUAL - return SourceHook::ExecutableClassN( - reinterpret_cast(ptr), mfp, vfnptr, shptr); -} - -#define SH_CALL(ptr, mfp) SH_CALL2((ptr), (mfp), (mfp), SH_GLOB_SHPTR) -#define SH_MCALL2(ptr, mfp, vtblidx, vtbloffs, thisptroffs) SH_MCALL3((ptr), (mfp), (mfp), (vtblidx), (vtbloffs), (thisptroffs), SH_GLOB_SHPTR) -#define SH_MCALL(ptr, mhookname) __SoureceHook_FHM_SHCall##mhookname(ptr) - -////////////////////////////////////////////////////////////////////////// -// SetOverrideRet and RecallGetIface for recalls -// These take a ISourceHook pointer instead of using SH_GLOB_SHPTR directly -// The reason is that the user may want to redefine SH_GLOB_SHPTR - then the macros -// (META_RETURN_VALUE_NEWPARAMS) should obey the new pointer. - -namespace SourceHook -{ - // SetOverrideResult used to be implemented like this: - // SetOverrideResult(shptr, memfuncptr, return); - // normally the compiler can deduce the return type from memfuncptr, but (at least msvc8) failed when it was a reference - // (it thought it was ambigous - the ref and non-ref type) - // so now SetOverrideResult(memfuncptr) deduces the ret type, and returns a functor which does the work - // new syntax: SetOverrideResult(memfuncptr)(shptr, return) - // This also allows us to create a special version for references which respects ReferenceCarrier. - - template struct OverrideFunctor - { - void operator()(ISourceHook *shptr, T res) - { - *reinterpret_cast(shptr->GetOverrideRetPtr()) = res; - } - }; - template struct OverrideFunctor - { - void operator()(ISourceHook *shptr, T &res) - { - // overrideretptr points to ReferenceCarrier - *reinterpret_cast::type *>(shptr->GetOverrideRetPtr()) = res; - } - }; - - // For manual hooks: - // The rettype is passed in manually - template - OverrideFunctor SetOverrideResult() - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Params...)) - { - return OverrideFunctor(); - } - - template - OverrideFunctor SetOverrideResult(RetType (Iface::*mfp)(Params..., ...)) - { - return OverrideFunctor(); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Params...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } - - template - Iface *RecallGetIface(ISourceHook *shptr, RetType (Iface::*mfp)(Params..., ...)) - { - return reinterpret_cast(shptr->GetIfacePtr()); - } -} - -#endif - // The pope is dead. -> :( diff --git a/metamod-source/core/sourcehook/sourcehook_hookmangen.cpp b/metamod-source/core/sourcehook/sourcehook_hookmangen.cpp deleted file mode 100644 index 0b6404b9..00000000 --- a/metamod-source/core/sourcehook/sourcehook_hookmangen.cpp +++ /dev/null @@ -1,2040 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* Contributor(s): Borja "faluco" Ferav (many thanks for assitance!) -* David "BAILOPAN" Anderson -* ============================ -*/ - -// recommended literature: -// http://www.cs.umbc.edu/~chang/cs313.s02/stack.shtml -// http://www.angelcode.com/dev/callconv/callconv.html -// http://www.arl.wustl.edu/~lockwood/class/cs306/books/artofasm/Chapter_6/CH06-1.html - -#include -#include "sourcehook_impl.h" -#include "sourcehook_hookmangen.h" -#include "sourcehook_hookmangen_x86.h" -#include "sh_memory.h" -#include // we might need the address of vsnprintf - -#if SH_COMP == SH_COMP_MSVC -# define GCC_ONLY(x) -# define MSVC_ONLY(x) x -#elif SH_COMP == SH_COMP_GCC -# define GCC_ONLY(x) x -# define MSVC_ONLY(x) -#endif - -// :TODO: test BIG vtable indices - -namespace SourceHook -{ - namespace Impl - { - CPageAlloc GenBuffer::ms_Allocator(16); - - template - jit_int32_t DownCastPtr(T ptr) - { - return reinterpret_cast(ptr); - } - - jit_uint32_t DownCastSize(size_t size) - { - return static_cast(size); - } - - GenContext::GenContext(const ProtoInfo *proto, int vtbl_offs, int vtbl_idx, ISourceHook *pSHPtr) - : m_GeneratedPubFunc(NULL), m_OrigProto(proto), m_Proto(proto), m_VtblOffs(vtbl_offs), - m_VtblIdx(vtbl_idx), m_SHPtr(pSHPtr), m_pHI(NULL), m_HookfuncVfnptr(NULL), m_RegCounter(0) - { - m_pHI = new void*; - m_HookfuncVfnptr = new void*; - m_BuiltPI = new ProtoInfo; - m_BuiltPI_Params = NULL; - m_BuiltPI_Params2 = NULL; - } - - GenContext::~GenContext() - { - Clear(); - delete m_pHI; - delete m_HookfuncVfnptr; - delete m_BuiltPI; - } - - void GenContext::Clear() - { - m_HookFunc.clear(); - m_PubFunc.clear(); - if (m_BuiltPI_Params) - { - delete [] m_BuiltPI_Params; - m_BuiltPI_Params = NULL; - } - if (m_BuiltPI_Params2) - { - delete [] m_BuiltPI_Params2; - m_BuiltPI_Params2 = NULL; - } - } - - void GenContext::BuildProtoInfo() - { - m_BuiltPI->convention = m_Proto.GetConvention(); - m_BuiltPI->numOfParams = m_Proto.GetNumOfParams(); - - m_BuiltPI->retPassInfo.size = m_Proto.GetRet().size; - m_BuiltPI->retPassInfo.type = m_Proto.GetRet().type; - m_BuiltPI->retPassInfo.flags = m_Proto.GetRet().flags; - m_BuiltPI->retPassInfo2.pNormalCtor = m_Proto.GetRet().pNormalCtor; - m_BuiltPI->retPassInfo2.pCopyCtor = m_Proto.GetRet().pCopyCtor; - m_BuiltPI->retPassInfo2.pDtor = m_Proto.GetRet().pDtor; - m_BuiltPI->retPassInfo2.pAssignOperator = m_Proto.GetRet().pAssignOperator; - - if (m_BuiltPI_Params) - delete m_BuiltPI_Params; - m_BuiltPI_Params = new PassInfo[m_BuiltPI->numOfParams + 1]; - if (m_BuiltPI_Params2) - delete m_BuiltPI_Params2; - m_BuiltPI_Params2 = new PassInfo::V2Info[m_BuiltPI->numOfParams + 1]; - - m_BuiltPI_Params[0].size = 1; // Version 1 - m_BuiltPI_Params[0].type = 0; - m_BuiltPI_Params[0].flags = 0; - - for (int i = 0; i < m_Proto.GetNumOfParams(); ++i) - { - m_BuiltPI_Params[i+1].size = m_Proto.GetParam(i).size; - m_BuiltPI_Params[i+1].type = m_Proto.GetParam(i).type; - m_BuiltPI_Params[i+1].flags = m_Proto.GetParam(i).flags; - - m_BuiltPI_Params2[i+1].pNormalCtor = m_Proto.GetParam(i).pNormalCtor; - m_BuiltPI_Params2[i+1].pCopyCtor = m_Proto.GetParam(i).pCopyCtor; - m_BuiltPI_Params2[i+1].pDtor = m_Proto.GetParam(i).pDtor; - m_BuiltPI_Params2[i+1].pAssignOperator = m_Proto.GetParam(i).pAssignOperator; - } - - m_BuiltPI->paramsPassInfo = m_BuiltPI_Params; - m_BuiltPI->paramsPassInfo2 = m_BuiltPI_Params2; - } - - jit_int32_t GenContext::GetRealSize(const IntPassInfo &info) - { - if (info.flags & (PassInfo::PassFlag_ByRef | PassFlag_ForcedByRef)) - { - return SIZE_PTR; - } - return static_cast(info.size); - } - - jit_int32_t GenContext::AlignSize(jit_int32_t x, jit_int32_t boundary) - { - if (x % boundary != 0) - x = (x & ~(boundary-1)) + boundary; - return x; - } - - // Computes size on the stack - jit_int32_t GenContext::GetParamStackSize(const IntPassInfo &info) - { - // Align up to 4 byte boundaries - return AlignSize(GetRealSize(info), 4); - } - - jit_int8_t GenContext::NextRegEBX_ECX_EDX() - { - switch ((m_RegCounter++) % 3) - { - case 0: - return REG_EBX; - case 1: - return REG_ECX; - case 2: - default: - m_RegCounter = 0; - return REG_EDX; - } - } - - void GenContext::BitwiseCopy_Setup() - { - //cld - //push edi - //push esi - - IA32_Cld(&m_HookFunc); - IA32_Push_Reg(&m_HookFunc, REG_EDI); - IA32_Push_Reg(&m_HookFunc, REG_ESI); - } - - void GenContext::BitwiseCopy_Do(size_t size) - { - jit_uint32_t dwords = DownCastSize(size) / 4; - jit_uint32_t bytes = DownCastSize(size) % 4; - - //if dwords - // mov ecx, - // rep movsd - //if bytes - // mov ecx, - // rep movsb - //pop esi - //pop edi - - if (dwords) - { - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_ECX, dwords); - IA32_Rep(&m_HookFunc); - IA32_Movsd(&m_HookFunc); - } - if (bytes) - { - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_ECX, bytes); - IA32_Rep(&m_HookFunc); - IA32_Movsb(&m_HookFunc); - } - IA32_Pop_Reg(&m_HookFunc, REG_ESI); - IA32_Pop_Reg(&m_HookFunc, REG_EDI); - } - - jit_int32_t GenContext::AlignStackBeforeCall(int paramsize, int flags) - { - paramsize += - GCC_ONLY( ((flags & AlignStack_GCC_ThisOnStack)!=0 ? SIZE_PTR : 0) + ) - MSVC_ONLY( ((flags & AlignStack_MSVC_ThisOnStack)!=0 ? SIZE_PTR : 0) + ) - ((flags & AlignStack_MemRet)!=0 ? SIZE_PTR : 0); - - // At the beginning of the hookfunc, the stack is aligned to a 16 bytes boundary. - // Then, m_BytesPushedAfterInitialAlignment were pushed (can also be 0). - - // After this function is called, paramsize bytes will be pushed onto the stack - // After that, the alignment has to be a 16 bytes boundary again. - - - // How many bytes we would subtract if the alignment was alright now: - int subtractFromEsp = 16 - (paramsize % 16); - if (subtractFromEsp == 16) - subtractFromEsp = 0; - - // But: there might be bytes pushed alreay! - subtractFromEsp -= m_BytesPushedAfterInitialAlignment; - - // For example: paramsize was 0 and m_BytesPushedAfterInitialAlignment was 4. - // we then have to push another 12 bytes to reach 16 bytes alignment again. - - if (subtractFromEsp < 0) - subtractFromEsp = 16 - ((-subtractFromEsp) % 16); - - if (subtractFromEsp != 0) - IA32_Sub_Rm_ImmAuto(&m_HookFunc, REG_ESP, subtractFromEsp, MOD_REG); - - return subtractFromEsp; - } - - void GenContext::AlignStackAfterCall(jit_int32_t numofbytes) - { - if (numofbytes != 0) - IA32_Add_Rm_ImmAuto(&m_HookFunc, REG_ESP, numofbytes, MOD_REG); - } - - void GenContext::CheckAlignmentBeforeCall() - { -#if 0 - IA32_Test_Rm_Imm32(&m_HookFunc, REG_ESP, 15, MOD_REG); - IA32_Jump_Cond_Imm8(&m_HookFunc, CC_Z, 1); - IA32_Int3(&m_HookFunc); -#endif - } - - short GenContext::GetParamsTotalStackSize() - { - short acc = 0; - for (int i = 0; i < m_Proto.GetNumOfParams(); ++i) - { - acc += GetParamStackSize(m_Proto.GetParam(i)); - } - - return acc; - } - - short GenContext::GetForcedByRefParamOffset(int p) - { - short off = 0; - for (int i = 0; i < p; ++i) - { - if (m_Proto.GetParam(i).flags & PassFlag_ForcedByRef) - off += AlignSize(static_cast(m_Proto.GetParam(i).size), 4); - } - return off; - } - - short GenContext::GetForcedByRefParamsSize() - { - return GetForcedByRefParamOffset(m_Proto.GetNumOfParams()); - } - - jit_int32_t GenContext::PushRef(jit_int32_t param_offset, const IntPassInfo &pi) - { - // push [ebp+] - IA32_Push_Rm_DispAuto(&m_HookFunc, REG_EBP, param_offset); - - return SIZE_PTR; - } - - jit_int32_t GenContext::PushBasic(jit_int32_t param_offset, const IntPassInfo &pi) - { - int reg; - int reg2; - - switch (pi.size) - { - default: - SH_ASSERT(0, ("Unsupported!")); - return 0; - case 1: - reg = NextRegEBX_ECX_EDX(); - //movzx reg, BYTE PTR [ebp+] - //push reg - IA32_Movzx_Reg32_Rm8_DispAuto(&m_HookFunc, reg, REG_EBP, param_offset); - IA32_Push_Reg(&m_HookFunc, reg); - - return 4; - case 2: - reg = NextRegEBX_ECX_EDX(); - //movzx reg, WORD PTR [ebp+] - //push reg - m_HookFunc.write_ubyte(IA32_16BIT_PREFIX); - IA32_Movzx_Reg32_Rm16_DispAuto(&m_HookFunc, reg, REG_EBP, param_offset); - IA32_Push_Reg(&m_HookFunc, reg); - - return 4; - case 4: - reg = NextRegEBX_ECX_EDX(); - //mov reg, DWORD PTR [ebp+] - //push reg - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, reg, REG_EBP, param_offset); - IA32_Push_Reg(&m_HookFunc, reg); - - return 4; - case 8: - reg = NextRegEBX_ECX_EDX(); - reg2 = NextRegEBX_ECX_EDX(); - //mov reg, DWORD PTR [ebp++4] - //mov reg2, DWORD PTR [ebp+] - //push reg - //push reg2 - - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, reg, REG_EBP, param_offset+4); - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, reg2, REG_EBP, param_offset); - IA32_Push_Reg(&m_HookFunc, reg); - IA32_Push_Reg(&m_HookFunc, reg2); - - return 8; - } - } - - jit_int32_t GenContext::PushFloat(jit_int32_t param_offset, const IntPassInfo &pi) - { - switch (pi.size) - { - default: - SH_ASSERT(0, ("Unsupported!")); - return 0; - case 4: - //fld DWORD PTR [ebp+] - //push reg - //fstp DWORD PTR [esp] - IA32_Fld_Mem32_DispAuto(&m_HookFunc, REG_EBP, param_offset); - IA32_Push_Reg(&m_HookFunc, NextRegEBX_ECX_EDX()); - IA32_Fstp_Mem32_ESP(&m_HookFunc); - return 4; - case 8: - //fld QWORD PTR [ebp+] - //sub esp, 8 - //fstp QWORD PTR [esp] - IA32_Fld_Mem64_DispAuto(&m_HookFunc, REG_EBP, param_offset); - IA32_Sub_Rm_Imm8(&m_HookFunc, REG_ESP, 8, MOD_REG); - IA32_Fstp_Mem64_ESP(&m_HookFunc); - return 8; - } - } - - jit_int32_t GenContext::PushObject(jit_int32_t param_offset, const IntPassInfo &pi, jit_int32_t place_fbrr) - { - if ((pi.flags & PassFlag_ForcedByRef) == 0) - { - // make room on the stack - // sub esp, - IA32_Sub_Rm_ImmAuto(&m_HookFunc, REG_ESP, GetParamStackSize(pi), MOD_REG); - } - - // if there is a copy constructor.. - if (pi.pCopyCtor) - { - // :TODO: alignment here? - // can't use normal alignment methods - // because an unknown number of bytes has been pushed already (the other params) - - // save eax - IA32_Push_Reg(&m_HookFunc, REG_EAX); - - // compute dest addr to ECX - // = forcedbyref ? ebp+place_fbrr : esp+12 - if (pi.flags & PassFlag_ForcedByRef) - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, place_fbrr); - else - IA32_Lea_Reg_DispRegMultImm8(&m_HookFunc, REG_ECX, REG_NOIDX, REG_ESP, NOSCALE, 4); - - // compute src addr to EAX - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_EAX, REG_EBP, param_offset); - - // push params (gcc: also this) - IA32_Push_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - - // call - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EDX, DownCastPtr(pi.pCopyCtor)); - IA32_Call_Reg(&m_HookFunc, REG_EDX); - - // gcc: clean up stack - GCC_ONLY(IA32_Add_Rm_ImmAuto(&m_HookFunc, REG_ESP, 2 * SIZE_PTR, MOD_REG)); - - // restore eax - IA32_Pop_Reg(&m_HookFunc, REG_EAX); - } - else - { - // bitwise copy - - BitwiseCopy_Setup(); - - //if forcedbyref: - // lea edi, [ebp_place_fbrr] - //else - // lea edi, [esp+8] - bc_setup pushed two regs onto the stack! - //lea esi, [ebp+] - if (pi.flags & PassFlag_ForcedByRef) - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_EDI, REG_EBP, place_fbrr); - else - IA32_Lea_Reg_DispRegMultImm8(&m_HookFunc, REG_EDI, REG_NOIDX, REG_ESP, NOSCALE, 8); - - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ESI, REG_EBP, param_offset); - - BitwiseCopy_Do(pi.size); - } - - // forcedref: push reference to ebp+place_fbrr - if (pi.flags & PassFlag_ForcedByRef) - { - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, place_fbrr); - IA32_Push_Reg(&m_HookFunc, REG_ECX); - return SIZE_PTR; - } - - return GetParamStackSize(pi); - } - - void GenContext::DestroyParams(jit_int32_t fbrr_base) - { - for (int i = m_Proto.GetNumOfParams() - 1; i >= 0; --i) - { - const IntPassInfo &pi = m_Proto.GetParam(i); - if (pi.type == PassInfo::PassType_Object && (pi.flags & PassInfo::PassFlag_ODtor) && - (pi.flags & PassInfo::PassFlag_ByVal) && (pi.flags & PassFlag_ForcedByRef)) - { - // Actually, this is only for GCC (see line above: ForcedByRef) - jit_int32_t tmpAlign = AlignStackBeforeCall(0, AlignStack_GCC_ThisOnStack); - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, fbrr_base + GetForcedByRefParamOffset(i)); - IA32_Push_Reg(&m_HookFunc, REG_ECX); - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(pi.pDtor)); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - IA32_Pop_Reg(&m_HookFunc, REG_ECX); - - AlignStackAfterCall(tmpAlign); - } - } - } - - // May not touch eax! - jit_int32_t GenContext::PushParams(jit_int32_t param_base_offset, jit_int32_t save_ret_to, int v_place_for_memret, - jit_int32_t v_place_fbrr_base) - { - jit_int32_t added_to_stack = 0; - jit_int32_t ret = 0; - - // compute the offset _after_ the last parameter - jit_int32_t cur_offset = param_base_offset; - for (int i = 0; i < m_Proto.GetNumOfParams(); ++i) - { - cur_offset += GetParamStackSize(m_Proto.GetParam(i)); - } - - // push parameters in reverse order - for (int i = m_Proto.GetNumOfParams() - 1; i >= 0; --i) - { - const IntPassInfo &pi = m_Proto.GetParam(i); - cur_offset -= GetParamStackSize(pi); - if (pi.flags & PassInfo::PassFlag_ByVal) - { - switch (pi.type) - { - case PassInfo::PassType_Basic: - ret = PushBasic(cur_offset, pi); - break; - case PassInfo::PassType_Float: - ret = PushFloat(cur_offset, pi); - break; - case PassInfo::PassType_Object: - ret = PushObject(cur_offset, pi, v_place_fbrr_base + GetForcedByRefParamOffset(i)); - break; - } - } - else if (pi.flags & PassInfo::PassFlag_ByRef) - { - ret = PushRef(cur_offset, pi); - } - else - { - SH_ASSERT(0, ("Unsupported!")); - } - added_to_stack += ret; - } - - return added_to_stack; - } - - // It is IMPORTANT that PushMemRetPtr doesn't touch ecx and eax - jit_int32_t GenContext::PushMemRetPtr(jit_int32_t save_ret_to, jit_int32_t v_place_for_memret) - { - // Memory return support - if (m_Proto.GetRet().flags & PassInfo::PassFlag_RetMem) - { - // push address where to save it! - int reg = REG_EDX; - IA32_Lea_DispRegImmAuto(&m_HookFunc, reg, REG_EBP, - MemRetWithTempObj() ? v_place_for_memret : save_ret_to); - IA32_Push_Reg(&m_HookFunc, reg); - - return (SH_COMP==SH_COMP_MSVC) ? 4 : 0; // varargs funcs on msvc might need this. - // gcc doesn't: callee cleans the memret ptr, caller the other params :s - } - return 0; - } - - void GenContext::SaveRetVal(int v_where, int v_place_for_memret) - { - size_t size = GetRealSize(m_Proto.GetRet()); - if (size == 0) - { - // No return value -> nothing - return; - } - - if (m_Proto.GetRet().flags & PassInfo::PassFlag_ByRef) - { - // mov [ebp + v_plugin_ret], eax - IA32_Mov_Rm_Reg_DispAuto(&m_HookFunc, REG_EBP, REG_EAX, v_where); - return; - } - // else: ByVal - - - // Memory return: - if (m_Proto.GetRet().flags & PassInfo::PassFlag_RetMem) - { - if (MemRetWithTempObj()) - { - // *v_where = *v_place_for_memret - - // if we have an assign operator, use that - if (m_Proto.GetRet().pAssignOperator) - { - // lea edx, [ebp + v_place_for_memret] <-- src addr - // lea ecx, [ebp + v_where] <-- dest addr - // push edx - // gcc: push ecx - // call it - // gcc: clean up - - jit_int32_t tmpAlign = AlignStackBeforeCall(SIZE_PTR, AlignStack_GCC_ThisOnStack); - - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_EDX, REG_EBP, v_place_for_memret); - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, v_where); - IA32_Push_Reg(&m_HookFunc, REG_EDX); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(m_Proto.GetRet().pAssignOperator)); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Add_Rm_ImmAuto(&m_HookFunc, REG_ESP, 2 * SIZE_PTR, MOD_REG)); - - AlignStackAfterCall(tmpAlign); - } - else - { - // bitwise copy - BitwiseCopy_Setup(); - - //lea edi, [evp+v_where] <-- destination - //lea esi, [ebp+v_place_for_memret] <-- src - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_EDI, REG_EBP, v_where); - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ESI, REG_EBP, v_place_for_memret); - - BitwiseCopy_Do(m_Proto.GetRet().size); - } - - // Then: destruct *v_place_for_memret if required - if (m_Proto.GetRet().pDtor) - { - //lea ecx, [ebp+v_place_for_memret] - //gcc: push ecx - //call it - //gcc: clean up - - jit_int32_t tmpAlign = AlignStackBeforeCall(0, AlignStack_GCC_ThisOnStack); - - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, v_place_for_memret); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(m_Proto.GetRet().pDtor)); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Pop_Reg(&m_HookFunc, REG_ECX)); - - AlignStackAfterCall(tmpAlign); - } - } - else - { - // Already copied to correct address -> we're done - return; - } - } - - if (m_Proto.GetRet().type == PassInfo::PassType_Float) - { - if (size == 4) - IA32_Fstp_Mem32_DispAuto(&m_HookFunc, REG_EBP, v_where); - else if (size == 8) - IA32_Fstp_Mem64_DispAuto(&m_HookFunc, REG_EBP, v_where); - } - else if (m_Proto.GetRet().type == PassInfo::PassType_Basic) - { - if (size <= 4) - { - // size <= 4: return in EAX - // We align <4 sizes up to 4 - - - // mov [ebp + v_plugin_ret], eax - IA32_Mov_Rm_Reg_DispAuto(&m_HookFunc, REG_EBP, REG_EAX, v_where); - } - else if (size <= 8) - { - // size <= 4: return in EAX:EDX - // We align 4 8 !")); - } - } - } - } - - bool GenContext::MemRetWithTempObj() - { - // Memory return AND (has destructor OR has assign operator) - return ((m_Proto.GetRet().flags & PassInfo::PassFlag_RetMem) - && (m_Proto.GetRet().flags & (PassInfo::PassFlag_ODtor | PassInfo::PassFlag_AssignOp))); - } - - void GenContext::ProcessPluginRetVal(int v_cur_res, int v_pContext, int v_plugin_ret) - { - // only for non-void functions! - if (m_Proto.GetRet().size == 0) - return; - - // if (cur_res >= MRES_OVERRIDE) - // *reinterpret_cast(pContext->GetOverrideRetPtr()) = plugin_ret; - - // eax = cur_res - // cmp eax,MRES_OVERRIDE - // jnge thelabel - // pContext->GetOverrideRetPtr() --> overrideretptr in eax - // *eax = plugin_ret - // thelabel: - // - - jitoffs_t tmppos, counter; - - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_EAX, REG_EBP, v_cur_res); - - IA32_Cmp_Rm_Imm32(&m_HookFunc, MOD_REG, REG_EAX, MRES_OVERRIDE); - tmppos = IA32_Jump_Cond_Imm8(&m_HookFunc, CC_NGE, 0); - m_HookFunc.start_count(counter); - - // eax = pContext->GetOverrideRetPtr() no alignment needs - // ECX = pContext - // gcc: push ecx - // eax = [ecx] - // eax = [eax + 4] - // call eax - // gcc: clean up - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_ECX, REG_EBP, v_pContext); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - - // vtbloffs=0, vtblidx=1 - IA32_Mov_Reg_Rm(&m_HookFunc, REG_EAX, REG_ECX, MOD_MEM_REG); - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_EAX, REG_EAX, 4); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Pop_Reg(&m_HookFunc, REG_ECX)); - - - // *eax = plugin_ret - if (m_Proto.GetRet().flags & PassInfo::PassFlag_ByRef) - { - // mov ecx, [ebp+v_plugin_ret] - // mov [eax], ecx - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_ECX, REG_EBP, v_plugin_ret); - IA32_Mov_Rm_Reg(&m_HookFunc, REG_EAX, REG_ECX, MOD_MEM_REG); - } - else - { - if (m_Proto.GetRet().pAssignOperator) - { - // lea edx, [ebp + v_plugin_ret] - // push edx <-- src addr - // msvc: ecx = eax <-- dest addr - // gcc: push eax <-- dest addr - // call it - // gcc: clean up - - jit_int32_t tmpAlign = AlignStackBeforeCall(SIZE_PTR, AlignStack_GCC_ThisOnStack); - - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_EDX, REG_EBP, v_plugin_ret); - IA32_Push_Reg(&m_HookFunc, REG_EDX); -#if SH_COMP == SH_COMP_MSVC - IA32_Mov_Reg_Rm(&m_HookFunc, REG_ECX, REG_EAX, MOD_REG); -#elif SH_COMP == SH_COMP_GCC - IA32_Push_Reg(&m_HookFunc, REG_EAX); -#endif - - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(m_Proto.GetRet().pAssignOperator)); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Add_Rm_ImmAuto(&m_HookFunc, REG_ESP, 2 * SIZE_PTR, MOD_REG)); - - AlignStackAfterCall(tmpAlign); - } - else - { - // bitwise copy - BitwiseCopy_Setup(); - - //mov edi, eax <-- destination - //lea esi, [ebp+v_plugin_ret] <-- src - IA32_Mov_Reg_Rm(&m_HookFunc, REG_EDI, REG_EAX, MOD_REG); - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ESI, REG_EBP, v_plugin_ret); - - BitwiseCopy_Do(m_Proto.GetRet().size); - } - } - - m_HookFunc.end_count(counter); - m_HookFunc.rewrite(tmppos, static_cast(counter)); - } - - void GenContext::PrepareReturn(int v_status, int v_pContext, int v_retptr) - { - // only for non-void functions! - if (m_Proto.GetRet().size == 0) - return; - - // retptr = status >= MRES_OVERRIDE ? pContext->GetOverrideRetPtr() : pContext->GetOrigRetPtr() - - // OverrideRetPtr: vtblidx = 1 - // OrigRetPtr: vtbldix = 2 - // vtblidx = (status >= MRES_OVERRIDE) ? 1 : 2 - - // - // eax = pContext->GetOverrideRetPtr() - // ECX = pContext - // gcc: push ecx - - // eax = (status < MRES_OVERRIDE) ? 1 : 0 - // xor eax, eax - // cmp [ebp + v_status], MRES_OVERRIDE - // setl al <-- setcc optimization for ternary operators, - - - // lea eax, [4*eax + 0x4] - - // edx = [ecx] - // add edx, eax - // mov edx, [edx] - - // call edx - // gcc: clean up - - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_ECX, REG_EBP, v_pContext); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - IA32_Xor_Reg_Rm(&m_HookFunc, REG_EAX, REG_EAX, MOD_REG); - IA32_Cmp_Rm_Disp8_Imm8(&m_HookFunc, REG_EBP, v_status, MRES_OVERRIDE); - IA32_SetCC_Rm8(&m_HookFunc, REG_EAX, CC_L); - - IA32_Lea_Reg_RegMultImm32(&m_HookFunc, REG_EAX, REG_EAX, SCALE4, 4); - - IA32_Mov_Reg_Rm(&m_HookFunc, REG_EDX, REG_ECX, MOD_MEM_REG); - IA32_Add_Reg_Rm(&m_HookFunc, REG_EDX, REG_EAX, MOD_REG); - - IA32_Mov_Reg_Rm(&m_HookFunc, REG_EDX, REG_EDX, MOD_MEM_REG); - IA32_Call_Reg(&m_HookFunc, REG_EDX); - GCC_ONLY(IA32_Pop_Reg(&m_HookFunc, REG_ECX)); - - IA32_Mov_Rm_Reg_DispAuto(&m_HookFunc, REG_EBP, REG_EAX, v_retptr); - } - - void GenContext::DoReturn(int v_retptr, int v_memret_outaddr) - { - size_t size = m_Proto.GetRet().size; - if (!size) - return; - - // Get real ret pointer into ecx - // mov ecx, [ebp + v_ret_ptr] - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_ECX, REG_EBP, v_retptr); - - if (m_Proto.GetRet().flags & PassInfo::PassFlag_ByRef) - { - // mov eax, [ecx] - IA32_Mov_Reg_Rm(&m_HookFunc, REG_EAX, REG_ECX, MOD_MEM_REG); - return; - } - // else: byval - - if (m_Proto.GetRet().type == PassInfo::PassType_Float) - { - if (size == 4) - IA32_Fld_Mem32(&m_HookFunc, REG_ECX); - else if (size == 8) - IA32_Fld_Mem64(&m_HookFunc, REG_ECX); - } - else if (m_Proto.GetRet().type == PassInfo::PassType_Basic || - ((m_Proto.GetRet().type == PassInfo::PassType_Object) && (m_Proto.GetRet().flags & PassInfo::PassFlag_RetReg)) ) - { - if (size <= 4) - { - // size <= 4: return in EAX - // We align <4 sizes up to 4 - - // mov eax, [ecx] - IA32_Mov_Reg_Rm(&m_HookFunc, REG_EAX, REG_ECX, MOD_MEM_REG); - } - else if (size <= 8) - { - // size <= 4: return in EAX:EDX - // We align 48: return in memory - // handled later - } - } - - if (m_Proto.GetRet().flags & PassInfo::PassFlag_RetMem) - { - // *memret_outaddr = plugin_ret - if (m_Proto.GetRet().pCopyCtor) - { - // mov edx, ecx <-- src ( we set ecx to [ebp+v_retptr] before ) - // push edx <-- src addr - // msvc: ecx = [ebp + v_memret_outaddr] <-- dest addr - // gcc: push [ebp + v_memret_outaddr] <-- dest addr - // call it - // gcc: clean up - - jit_int32_t tmpAlign = AlignStackBeforeCall(SIZE_PTR, AlignStack_GCC_ThisOnStack); - - IA32_Mov_Reg_Rm(&m_HookFunc, REG_EDX, REG_ECX, MOD_REG); - IA32_Push_Reg(&m_HookFunc, REG_EDX); - -#if SH_COMP == SH_COMP_MSVC - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_ECX, REG_EBP, v_memret_outaddr); -#elif SH_COMP == SH_COMP_GCC - IA32_Push_Rm_DispAuto(&m_HookFunc, REG_EBP, v_memret_outaddr); -#endif - - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(m_Proto.GetRet().pCopyCtor)); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Add_Rm_ImmAuto(&m_HookFunc, REG_ESP, 2 * SIZE_PTR, MOD_REG)); - - AlignStackAfterCall(tmpAlign); - } - else - { - // bitwise copy - BitwiseCopy_Setup(); - - //mov edi, [ebp+v_memret_outaddr] <-- destination - //mov esi, ecx <-- src ( we set ecx to [ebp+v_retptr] before ) - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_EDI, REG_EBP, v_memret_outaddr); - IA32_Mov_Reg_Rm(&m_HookFunc, REG_ESI, REG_ECX, MOD_REG); - - BitwiseCopy_Do(m_Proto.GetRet().size); - } - - // In both cases: return the pointer in EAX - // mov eax, [ebp + v_memret_outaddr] - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_EAX, REG_EBP, v_memret_outaddr); - } - } - - void GenContext::GenerateCallHooks(int v_status, int v_prev_res, int v_cur_res, int v_iter, - int v_pContext, int base_param_offset, int v_plugin_ret, int v_place_for_memret, jit_int32_t v_place_fbrr_base, jit_int32_t v_va_buf) - { - jitoffs_t counter, tmppos; - jitoffs_t counter2, tmppos2; - - jitoffs_t loop_begin_counter; - - // prev_res = MRES_IGNORED - IA32_Mov_Rm_Imm32_Disp8(&m_HookFunc, REG_EBP, MRES_IGNORED, v_prev_res); - - m_HookFunc.start_count(loop_begin_counter); - - // eax = pContext->GetNext() - // ECX = pContext - // gcc: push ecx - // eax = [ecx] - // eax = [eax] - // call eax - // gcc: clean up - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_ECX, REG_EBP, v_pContext); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - - // vtbloffs=0, vtblidx=0 - IA32_Mov_Reg_Rm(&m_HookFunc, REG_EAX, REG_ECX, MOD_MEM_REG); - IA32_Mov_Reg_Rm(&m_HookFunc, REG_EAX, REG_EAX, MOD_MEM_REG); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Pop_Reg(&m_HookFunc, REG_ECX)); - - // quit on zero - // test eax, eax - // jz exit - IA32_Test_Rm_Reg(&m_HookFunc, REG_EAX, REG_EAX, MOD_REG); - tmppos = IA32_Jump_Cond_Imm32(&m_HookFunc, CC_Z, 0); - m_HookFunc.start_count(counter); - - // prev_res = MRES_IGNORED - IA32_Mov_Rm_Imm32_Disp8(&m_HookFunc, REG_EBP, MRES_IGNORED, v_cur_res); - - // iter->call() - // push params - // ecx = eax - // gcc: push ecx - // eax = [ecx] - // eax = [eax+2*SIZE_PTR] - // call eax - // gcc: clean up - - jit_int32_t caller_clean_bytes = 0; // gcc always, msvc never (hooks never have varargs!) - - jit_int32_t alignBytes = AlignStackBeforeCall( - GetParamsTotalStackSize() + ((m_Proto.GetConvention() & ProtoInfo::CallConv_HasVafmt)!=0 ? SIZE_PTR : 0), - AlignStack_GCC_ThisOnStack | ((m_Proto.GetRet().flags & PassInfo::PassFlag_RetMem) == 0 ? 0 : AlignStack_MemRet) - ); - - // vafmt: push va_buf - if (m_Proto.GetConvention() & ProtoInfo::CallConv_HasVafmt) - { - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, v_va_buf); - IA32_Push_Reg(&m_HookFunc, REG_ECX); - caller_clean_bytes += SIZE_PTR; - } - - caller_clean_bytes += PushParams(base_param_offset, v_plugin_ret, v_place_for_memret, v_place_fbrr_base); - - IA32_Mov_Reg_Rm(&m_HookFunc, REG_ECX, REG_EAX, MOD_REG); - if (SH_COMP == SH_COMP_GCC) - IA32_Push_Reg(&m_HookFunc, REG_ECX); - caller_clean_bytes += PushMemRetPtr(v_plugin_ret, v_place_for_memret); - IA32_Mov_Reg_Rm(&m_HookFunc, REG_EAX, REG_ECX, MOD_MEM_REG); - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_EAX, REG_EAX, 2*SIZE_PTR); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - - AlignStackAfterCall(alignBytes); - - // cleanup (gcc only) - // params + thisptr - if (SH_COMP == SH_COMP_GCC) - IA32_Add_Rm_ImmAuto(&m_HookFunc, REG_ESP, caller_clean_bytes + SIZE_PTR, MOD_REG); - - DestroyParams(v_place_fbrr_base); - - SaveRetVal(v_plugin_ret, v_place_for_memret); - - // process meta return: - // prev_res = cur_res - // if (cur_res > status) status = cur_res; - // - // eax = cur_res - // edx = status - // prev_res = eax - // cmp eax,edx - // jng thelabel - // status = eax - // thelabel: - // - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_EAX, REG_EBP, v_cur_res); - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_EDX, REG_EBP, v_status); - IA32_Mov_Rm_Reg_Disp8(&m_HookFunc, REG_EBP, REG_EAX, v_prev_res); - - IA32_Cmp_Reg_Rm(&m_HookFunc, REG_EAX, REG_EDX, MOD_REG); - tmppos2 = IA32_Jump_Cond_Imm8(&m_HookFunc, CC_NG, 0); - m_HookFunc.start_count(counter2); - - IA32_Mov_Rm_Reg_Disp8(&m_HookFunc, REG_EBP, REG_EAX, v_status); - - m_HookFunc.end_count(counter2); - m_HookFunc.rewrite(tmppos2, static_cast(counter2)); - - // process retval for non-void functions - ProcessPluginRetVal(v_cur_res, v_pContext, v_plugin_ret); - - // jump back to loop begin - tmppos2 = IA32_Jump_Imm32(&m_HookFunc, 0); - m_HookFunc.end_count(loop_begin_counter); - m_HookFunc.rewrite(tmppos2, -static_cast(loop_begin_counter)); - - m_HookFunc.end_count(counter); - m_HookFunc.rewrite(tmppos, static_cast(counter)); - } - - void GenContext::GenerateCallOrig(int v_status, int v_pContext, int param_base_offs, int v_this, - int v_vfnptr_origentry, int v_orig_ret, int v_override_ret, int v_place_for_memret, jit_int32_t v_place_fbrr_base, jit_int32_t v_va_buf) - { - jitoffs_t counter, tmppos; - jitoffs_t counter2, tmppos2; - jitoffs_t counter3, tmppos3; - - // if (status != MRES_SUPERCEDE && pConteext->ShouldCallOrig()) - // *v_orig_ret = orig_call() - // else - // *v_orig_ret = *v_override_ret - - // mov eax, status - // cmp eax, MRES_SUPERCEDE - // je dont_call - // call pContext->ShouldCallOrig() - // test al, al !! important: al, not eax! bool is only stored in the LSbyte - // jz dont_call - // - // orig_call() - // SaveRet(v_orig_ret) - // jmp skip_dont_call: - // - // dont_call: - // *v_orig_ret = *v_override_ret - // skip_dont_call: - - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_EAX, REG_EBP, v_status); - IA32_Cmp_Rm_Imm32(&m_HookFunc, MOD_REG, REG_EAX, MRES_SUPERCEDE); - - tmppos = IA32_Jump_Cond_Imm32(&m_HookFunc, CC_E, 0); - m_HookFunc.start_count(counter); - - // eax = pContext->ShouldCallOrig() - // ECX = pContext - // gcc: push ecx - // eax = [ecx] - // eax = [eax + 3*SIZE_PTR] - // call eax - // gcc: clean up - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_ECX, REG_EBP, v_pContext); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - - // vtbloffs=0, vtblidx=3 - IA32_Mov_Reg_Rm(&m_HookFunc, REG_EAX, REG_ECX, MOD_MEM_REG); - IA32_Mov_Reg_Rm_Disp8(&m_HookFunc, REG_EAX, REG_EAX, 3*SIZE_PTR); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Pop_Reg(&m_HookFunc, REG_ECX)); - - IA32_Test_Rm_Reg8(&m_HookFunc, REG_EAX, REG_EAX, MOD_REG); - tmppos2 = IA32_Jump_Cond_Imm32(&m_HookFunc, CC_Z, 0); - m_HookFunc.start_count(counter2); - - jit_int32_t caller_clean_bytes = 0; // gcc always, msvc when cdecl-like (varargs) - - jit_int32_t alignBytes = AlignStackBeforeCall( - GetParamsTotalStackSize() + ((m_Proto.GetConvention() & ProtoInfo::CallConv_HasVafmt)!=0 ? 2*SIZE_PTR : 0), - AlignStack_GCC_ThisOnStack | - ((m_Proto.GetRet().flags & PassInfo::PassFlag_RetMem) == 0 ? 0 : AlignStack_MemRet) | - ((m_Proto.GetConvention() & ProtoInfo::CallConv_HasVarArgs) == 0 ? 0 : AlignStack_MSVC_ThisOnStack) - ); - - // vafmt: push va_buf, then "%s" - if (m_Proto.GetConvention() & ProtoInfo::CallConv_HasVafmt) - { - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, v_va_buf); - IA32_Push_Reg(&m_HookFunc, REG_ECX); - IA32_Push_Imm32(&m_HookFunc, DownCastPtr("%s")); - caller_clean_bytes += 2*SIZE_PTR; - } - - // push params - caller_clean_bytes += PushParams(param_base_offs, v_orig_ret, v_place_for_memret, v_place_fbrr_base); - - // thisptr - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_ECX, REG_EBP, v_this); - if (SH_COMP == SH_COMP_GCC) - { - // on gcc/mingw, this is the first parameter - IA32_Push_Reg(&m_HookFunc, REG_ECX); - // on msvc without varargs, simply leave it in ecx - - // actually, if we're returning in memory, this pointer is the second param - // and the memret pointer is the real first parameter - caller_clean_bytes += PushMemRetPtr(v_orig_ret, v_place_for_memret); - } - else - { - // On msvc, if we're returning in memory, the memret pointer is the first parameter - caller_clean_bytes += PushMemRetPtr(v_orig_ret, v_place_for_memret); - - // actually, with varargs, the this pointer is the first param and the memret ptr - // is the second one - if (m_Proto.GetConvention() & ProtoInfo::CallConv_HasVarArgs) - { - IA32_Push_Reg(&m_HookFunc, REG_ECX); - } - } - - // call - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_EAX, REG_EBP, v_vfnptr_origentry); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - - AlignStackAfterCall(alignBytes); - - // cleanup - if (SH_COMP == SH_COMP_GCC || (m_Proto.GetConvention() & ProtoInfo::CallConv_HasVarArgs)) - IA32_Add_Rm_ImmAuto(&m_HookFunc, REG_ESP, caller_clean_bytes + SIZE_PTR, MOD_REG); - - DestroyParams(v_place_fbrr_base); - - // save retval - SaveRetVal(v_orig_ret, v_place_for_memret); - - // Skip don't call variant - tmppos3 = IA32_Jump_Imm32(&m_HookFunc, 0); - m_HookFunc.start_count(counter3); - - - // don't call: - m_HookFunc.end_count(counter); - m_HookFunc.rewrite(tmppos, static_cast(counter)); - - m_HookFunc.end_count(counter2); - m_HookFunc.rewrite(tmppos2, static_cast(counter2)); - - // *v_orig_ret = *v_override_ret - if (m_Proto.GetRet().flags & PassInfo::PassFlag_ByRef) - { - // mov ecx, [ebp + v_override_ret] - // mov [ebp + v_orig_ret], ecx - - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_ECX, REG_EBP, v_override_ret); - IA32_Mov_Rm_Reg_DispAuto(&m_HookFunc, REG_EBP, REG_ECX, v_orig_ret); - } - else - { - if (m_Proto.GetRet().pAssignOperator) - { - // lea edx, [ebp + v_override_ret] <-- src addr - // lea ecx, [ebp + v_orig_ret] <-- dest addr - // push edx <-- src addr - // gcc: push ecx - // call it - // gcc: clean up - - jit_int32_t tmpAlign = AlignStackBeforeCall(SIZE_PTR, AlignStack_GCC_ThisOnStack); - - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_EDX, REG_EBP, v_override_ret); - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, v_orig_ret); - IA32_Push_Reg(&m_HookFunc, REG_EDX); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(m_Proto.GetRet().pAssignOperator)); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Add_Rm_ImmAuto(&m_HookFunc, REG_ESP, 2*SIZE_PTR, MOD_REG)); - - AlignStackAfterCall(tmpAlign); - } - else - { - // bitwise copy - BitwiseCopy_Setup(); - - //lea edi, [ebp+v_orig_ret] <-- destination - //lea esi, [ebp+v_override_ret] <-- src - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_EDI, REG_EBP, v_orig_ret); - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ESI, REG_EBP, v_override_ret); - - BitwiseCopy_Do(m_Proto.GetRet().size); - } - } - - // skip don't call label target: - m_HookFunc.end_count(counter3); - m_HookFunc.rewrite(tmppos3, static_cast(counter3)); - } - - // Sets *v_pContext to return value - void GenContext::CallSetupHookLoop(int v_orig_ret, int v_override_ret, - int v_cur_res, int v_prev_res, int v_status, int v_vfnptr_origentry, - int v_this, int v_pContext) - { - // call shptr->SetupHookLoop(ms_HI, ourvfnptr, reinterpret_cast(this), - // &vfnptr_origentry, &status, &prev_res, &cur_res, &orig_ret, &override_ret); - // The last two params are null for void funcs. - - if (m_Proto.GetRet().size == 0) - { - // void - IA32_Push_Imm8(&m_HookFunc, 0); // orig_ret - IA32_Push_Imm8(&m_HookFunc, 0); // override_ret - } - else - { - // orig_ret and override_ret - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_EAX, REG_EBP, v_override_ret); - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_EDX, REG_EBP, v_orig_ret); - IA32_Push_Reg(&m_HookFunc, REG_EAX); - IA32_Push_Reg(&m_HookFunc, REG_EDX); - } - - // cur_res and prev_res - IA32_Lea_DispRegImm8(&m_HookFunc, REG_EAX, REG_EBP, v_cur_res); - IA32_Lea_DispRegImm8(&m_HookFunc, REG_EDX, REG_EBP, v_prev_res); - IA32_Push_Reg(&m_HookFunc, REG_EAX); - IA32_Push_Reg(&m_HookFunc, REG_EDX); - - // status and vfnptr_origentry - IA32_Lea_DispRegImm8(&m_HookFunc, REG_EAX, REG_EBP, v_status); - IA32_Lea_DispRegImm8(&m_HookFunc, REG_EDX, REG_EBP, v_vfnptr_origentry); - IA32_Push_Reg(&m_HookFunc, REG_EAX); - IA32_Push_Reg(&m_HookFunc, REG_EDX); - - // this - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_EAX, REG_EBP, v_this); - IA32_Push_Reg(&m_HookFunc, REG_EAX); - - // our vfn ptr - // *(this + vtbloffs) + SIZE_PTR*vtblidx - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_ECX, REG_EBP, v_this); // get this into ecx (gcc!) - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_EAX, REG_ECX, m_VtblOffs); - IA32_Add_Rm_ImmAuto(&m_HookFunc, REG_EAX, m_VtblIdx * SIZE_PTR, MOD_REG); - IA32_Push_Reg(&m_HookFunc, REG_EAX); - - // *m_pHI - IA32_Mov_Rm_Imm32(&m_HookFunc, REG_EDX, DownCastPtr(m_pHI), MOD_REG); - IA32_Mov_Reg_Rm(&m_HookFunc, REG_EAX, REG_EDX, MOD_MEM_REG); - IA32_Push_Reg(&m_HookFunc, REG_EAX); - - // set up thisptr -#if SH_COMP == SH_COMP_GCC - // on gcc/mingw, this is the first parameter - GCC_ONLY(IA32_Push_Imm32(&m_HookFunc, DownCastPtr(m_SHPtr))); -#elif SH_COMP == SH_COMP_MSVC - // on msvc, it's ecx - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_ECX, DownCastPtr(m_SHPtr)); -#endif - - // call the function. vtbloffs = 0, vtblidx = 19 - // get vtptr into edx -- we know shptr on jit time -> dereference it here! - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, - (*reinterpret_cast(m_SHPtr))[19]); - - IA32_Call_Reg(&m_HookFunc, REG_EAX); - - // on gcc/mingw, we have to clean up after the call - // 9 params + hidden thisptr param - GCC_ONLY(IA32_Add_Rm_Imm8(&m_HookFunc, REG_ESP, 10*SIZE_PTR, MOD_REG)); - - // store return value - IA32_Mov_Rm_Reg_Disp8(&m_HookFunc, REG_EBP, REG_EAX, v_pContext); - } - - void GenContext::CallEndContext(int v_pContext) - { - // call endcontext: - // shptr->EndContext(pContex) - IA32_Mov_Reg_Rm_DispAuto(&m_HookFunc, REG_EAX, REG_EBP, v_pContext); - IA32_Push_Reg(&m_HookFunc, REG_EAX); - - // thisptr -#if SH_COMP == SH_COMP_GCC - // on gcc/mingw, this is the first parameter - IA32_Push_Imm32(&m_HookFunc, DownCastPtr(m_SHPtr)); -#elif SH_COMP == SH_COMP_MSVC - // on msvc, it's ecx - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_ECX, DownCastPtr(m_SHPtr)); -#endif - - // get vtptr into edx -- we know shptr on jit time -> dereference it here! - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, - (*reinterpret_cast(m_SHPtr))[20]); - - IA32_Call_Reg(&m_HookFunc, REG_EAX); - - // on gcc/mingw, we have to clean up after the call - // 1 param + hidden thisptr param - GCC_ONLY(IA32_Add_Rm_Imm8(&m_HookFunc, REG_ESP, 2*SIZE_PTR, MOD_REG)); - } - - void GenContext::ResetFrame(jit_int32_t startOffset) - { - m_HookFunc_FrameOffset = startOffset; - m_HookFunc_FrameVarsSize = 0; - } - - jit_int32_t GenContext::AddVarToFrame(jit_int32_t size) - { - m_HookFunc_FrameOffset -= size; - m_HookFunc_FrameVarsSize += size; - return m_HookFunc_FrameOffset; - } - - jit_int32_t GenContext::ComputeVarsSize() - { - return m_HookFunc_FrameVarsSize; - } - - void * GenContext::GenerateHookFunc() - { - // prologue - IA32_Push_Reg(&m_HookFunc, REG_EBP); - IA32_Push_Reg(&m_HookFunc, REG_EBX); - IA32_Mov_Reg_Rm(&m_HookFunc, REG_EBP, REG_ESP, MOD_REG); - - jit_int32_t v_this = 0; - jit_int32_t param_base_offs = 0; - if (SH_COMP == SH_COMP_GCC || (m_Proto.GetConvention() & ProtoInfo::CallConv_HasVarArgs)) - { - // gcc or msvc with varargs: - v_this = 12; // first param - param_base_offs = 16; - ResetFrame(0); - } - else - { - // on msvc without varargs, save thisptr - v_this = -4; - param_base_offs = 12; - IA32_Push_Reg(&m_HookFunc, REG_ECX); - ResetFrame(-4); // start placing local vars on offset -4 - // because there already is the thisptr variable - } - - // ********************** stack frame ********************** - // MSVC without varargs - // second param (gcc: first real param) ebp + 16 - // first param (gcc: thisptr) ebp + 12 - // ret address: ebp + 8 - // caller's ebp ebp + 4 - // saved ebx ebp - // MSVC ONLY: current this ebp - 4 - // void *vfnptr_origentry ebp - 4 -4 - // META_RES status = MRES_IGNORED ebp - 8 -4 - // META_RES prev_res ebp - 12 -4 - // META_RES cur_res ebp - 16 -4 - // IMyDelegate *iter ebp - 20 -4 - // IHookContext *pContext ebp - 24 -4 - // == 3 ptrs + 3 enums = 24 bytes - // - // non-void: add: - // my_rettype *ret_ptr ebp - 28 -4 - // my_rettype orig_ret ebp - 28 - sizeof(my_rettype) -4 - // my_rettype override_ret ebp - 28 - sizeof(my_rettype)*2 -4 - // my_rettype plugin_ret ebp - 28 - sizeof(my_rettype)*3 -4 - // == + 3 * sizeof(my_rettype) bytes - - // if required: - // my_rettype place_for_memret ebp - 28 - sizeof(my_rettype)*4 -4 - - // gcc only: if required: - // place forced byref params ebp - 28 - sizeof(my_rettype)*{4 or 5} - // - // varargs: - // va_list argptr - // char va_buf[something]; - - - const jit_int8_t v_vfnptr_origentry = AddVarToFrame(SIZE_PTR); - const jit_int8_t v_status = AddVarToFrame(sizeof(META_RES)); - const jit_int8_t v_prev_res = AddVarToFrame(sizeof(META_RES)); - const jit_int8_t v_cur_res = AddVarToFrame(sizeof(META_RES)); - const jit_int8_t v_iter = AddVarToFrame(SIZE_PTR); - const jit_int8_t v_pContext = AddVarToFrame(SIZE_PTR); - - // Memory return: first param is the address - jit_int32_t v_memret_addr = 0; - if (m_Proto.GetRet().flags & PassInfo::PassFlag_RetMem) - { - if (SH_COMP == SH_COMP_GCC) - { - // gcc: now: first param = mem ret addr - // second param = this pointer - // third param = actual first param - v_memret_addr = 12; - v_this += 4; - param_base_offs += SIZE_PTR; - } - else // MSVC - { - if (m_Proto.GetConvention() & ProtoInfo::CallConv_HasVarArgs) - { - // varargs -> cdecl - // msvc: now: - // first param = this pointer - // second param = mem ret addr - // third param = actual first param - - // params_base_offs is already updated to point to after the this pointer - v_memret_addr = param_base_offs; - param_base_offs += SIZE_PTR; - } - else - { - v_memret_addr = param_base_offs; - param_base_offs += SIZE_PTR; - } - } - } - - jit_int32_t v_ret_ptr = 0; - jit_int32_t v_orig_ret = 0; - jit_int32_t v_override_ret = 0; - jit_int32_t v_plugin_ret = 0; - - if (m_Proto.GetRet().size != 0) - { - v_ret_ptr = AddVarToFrame(SIZE_PTR); - v_orig_ret = AddVarToFrame(GetParamStackSize(m_Proto.GetRet())); - v_override_ret = AddVarToFrame(GetParamStackSize(m_Proto.GetRet())); - v_plugin_ret = AddVarToFrame(GetParamStackSize(m_Proto.GetRet())); - } - - jit_int32_t v_place_for_memret = 0; - if (MemRetWithTempObj()) - { - v_place_for_memret = AddVarToFrame(GetParamStackSize(m_Proto.GetRet())); - } - - jit_int32_t v_place_fbrr_base = 0; - if (SH_COMP == SH_COMP_GCC && GetForcedByRefParamsSize()) - { - v_place_fbrr_base = AddVarToFrame(GetForcedByRefParamsSize()); - } - - // Only exists for varargs functions - jit_int32_t v_va_argptr = 0; - if (m_Proto.GetConvention() & ProtoInfo::CallConv_HasVarArgs) - { - v_va_argptr = AddVarToFrame(SIZE_PTR); - } - - jit_int32_t v_va_buf = 0; - if (m_Proto.GetConvention() & ProtoInfo::CallConv_HasVafmt) - { - v_va_buf = AddVarToFrame(SourceHook::STRBUF_LEN); - } - - IA32_Sub_Rm_Imm32(&m_HookFunc, REG_ESP, ComputeVarsSize(), MOD_REG); - - // Initial stack alignment - IA32_And_Rm_Imm32(&m_HookFunc, REG_ESP, MOD_REG, -16); - m_BytesPushedAfterInitialAlignment = 0; - - // init status localvar - IA32_Mov_Rm_Imm32_Disp8(&m_HookFunc, REG_EBP, MRES_IGNORED, v_status); - - // VarArgs: init argptr & format - if (m_Proto.GetConvention() & ProtoInfo::CallConv_HasVarArgs) - { - // argptr = first vararg param - // lea eax, [ebp + param_base_offs + paramssize] - // mov argptr, eax - - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_EAX, REG_EBP, param_base_offs + GetParamsTotalStackSize() + SIZE_PTR); // +SIZE_PTR: last const char * is not in protoinfo - IA32_Mov_Rm_Reg_DispAuto(&m_HookFunc, REG_EBP, REG_EAX, v_va_argptr); - } - if (m_Proto.GetConvention() & ProtoInfo::CallConv_HasVafmt) - { - // vsnprintf - - jit_int32_t tmpAlign = AlignStackBeforeCall(SIZE_PTR*3 + sizeof(size_t), 0); - - // push valist, fmt param, maxsize, buffer - IA32_Push_Reg(&m_HookFunc, REG_EAX); - IA32_Push_Rm_DispAuto(&m_HookFunc, REG_EBP, param_base_offs + GetParamsTotalStackSize()); // last given param (+4-4, see above) - IA32_Push_Imm32(&m_HookFunc, SourceHook::STRBUF_LEN - 1); - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, v_va_buf); - IA32_Push_Reg(&m_HookFunc, REG_ECX); - - // call - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(&vsnprintf)); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - - // Clean up (cdecl) - IA32_Add_Rm_Imm32(&m_HookFunc, REG_ESP, 0x10, MOD_REG); - - AlignStackAfterCall(tmpAlign); - - // Set trailing zero - IA32_Xor_Reg_Rm(&m_HookFunc, REG_EDX, REG_EDX, MOD_REG); - IA32_Mov_Rm8_Reg8_DispAuto(&m_HookFunc, REG_EBP, REG_EDX, v_va_buf + SourceHook::STRBUF_LEN - 1); - } - - // Call constructors for ret vars if required - if((m_Proto.GetRet().flags & PassInfo::PassFlag_ByVal) && - m_Proto.GetRet().pNormalCtor) - { - jit_int32_t tmpAlign = AlignStackBeforeCall(0, AlignStack_GCC_ThisOnStack); - - // orig_reg - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, v_orig_ret); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(m_Proto.GetRet().pNormalCtor)); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Pop_Reg(&m_HookFunc, REG_ECX)); - - // override_reg - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, v_override_ret); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(m_Proto.GetRet().pNormalCtor)); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Pop_Reg(&m_HookFunc, REG_ECX)); - - // plugin_ret - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, v_plugin_ret); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(m_Proto.GetRet().pNormalCtor)); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Pop_Reg(&m_HookFunc, REG_ECX)); - - AlignStackAfterCall(tmpAlign); - - // _don't_ call a constructor for v_place_for_memret ! - } - - // ********************** SetupHookLoop ********************** - CallSetupHookLoop(v_orig_ret, v_override_ret, v_cur_res, v_prev_res, v_status, v_vfnptr_origentry, - v_this, v_pContext); - - // ********************** call pre hooks ********************** - GenerateCallHooks(v_status, v_prev_res, v_cur_res, v_iter, v_pContext, param_base_offs, - v_plugin_ret, v_place_for_memret, v_place_fbrr_base, v_va_buf); - - // ********************** call orig func ********************** - GenerateCallOrig(v_status, v_pContext, param_base_offs, v_this, v_vfnptr_origentry, v_orig_ret, - v_override_ret, v_place_for_memret, v_place_fbrr_base, v_va_buf); - - // ********************** call post hooks ********************** - GenerateCallHooks(v_status, v_prev_res, v_cur_res, v_iter, v_pContext, param_base_offs, - v_plugin_ret, v_place_for_memret, v_place_fbrr_base, v_va_buf); - - // ********************** end context and return ********************** - - PrepareReturn(v_status, v_pContext, v_ret_ptr); - - CallEndContext(v_pContext); - - // Call destructors of byval object params which have a destructor - - jit_int32_t tmpAlign = AlignStackBeforeCall(0, AlignStack_GCC_ThisOnStack); - - jit_int32_t cur_param_pos = param_base_offs; - for (int i = 0; i < m_Proto.GetNumOfParams(); ++i) - { - const IntPassInfo &pi = m_Proto.GetParam(i); - // GCC: NOT of forced byref params. the caller destructs those. - if (pi.type == PassInfo::PassType_Object && (pi.flags & PassInfo::PassFlag_ODtor) && - (pi.flags & PassInfo::PassFlag_ByVal) && !(pi.flags & PassFlag_ForcedByRef)) - { - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, cur_param_pos); - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(pi.pDtor)); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Pop_Reg(&m_HookFunc, REG_ECX)); - } - cur_param_pos += GetParamStackSize(pi); - } - - AlignStackAfterCall(tmpAlign); - - DoReturn(v_ret_ptr, v_memret_addr); - - // Call destructors of orig_ret/ ... - if((m_Proto.GetRet().flags & PassInfo::PassFlag_ByVal) && - m_Proto.GetRet().pDtor) - { - // Preserve return value in EAX(:EDX) - IA32_Push_Reg(&m_HookFunc, REG_EAX); - IA32_Push_Reg(&m_HookFunc, REG_EDX); - - m_BytesPushedAfterInitialAlignment += 8; - - jit_int32_t tmpAlign = AlignStackBeforeCall(0, AlignStack_GCC_ThisOnStack); - - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, v_plugin_ret); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(m_Proto.GetRet().pDtor)); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Pop_Reg(&m_HookFunc, REG_ECX)); - - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, v_override_ret); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(m_Proto.GetRet().pDtor)); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Pop_Reg(&m_HookFunc, REG_ECX)); - - IA32_Lea_DispRegImmAuto(&m_HookFunc, REG_ECX, REG_EBP, v_orig_ret); - GCC_ONLY(IA32_Push_Reg(&m_HookFunc, REG_ECX)); - IA32_Mov_Reg_Imm32(&m_HookFunc, REG_EAX, DownCastPtr(m_Proto.GetRet().pDtor)); - CheckAlignmentBeforeCall(); - IA32_Call_Reg(&m_HookFunc, REG_EAX); - GCC_ONLY(IA32_Pop_Reg(&m_HookFunc, REG_ECX)); - - AlignStackAfterCall(tmpAlign); - - IA32_Pop_Reg(&m_HookFunc, REG_EDX); - IA32_Pop_Reg(&m_HookFunc, REG_EAX); - - m_BytesPushedAfterInitialAlignment -= 8; - } - - // epilogue - IA32_Mov_Reg_Rm(&m_HookFunc, REG_ESP, REG_EBP, MOD_REG); - IA32_Pop_Reg(&m_HookFunc, REG_EBX); - IA32_Pop_Reg(&m_HookFunc, REG_EBP); - - if (SH_COMP == SH_COMP_MSVC && !(m_Proto.GetConvention() & ProtoInfo::CallConv_HasVarArgs)) - { - // msvc without varargs: - // callee cleans the stack - - short cleansize = GetParamsTotalStackSize(); - // Memory return: address is first param - if (m_Proto.GetRet().flags & PassInfo::PassFlag_RetMem) - cleansize += SIZE_PTR; - - IA32_Return_Popstack(&m_HookFunc, cleansize); - } - else - { - // gcc or msvc with varargs: caller cleans the stack - // exception: gcc removes the memret addr on memret: - if (SH_COMP == SH_COMP_GCC && (m_Proto.GetRet().flags & PassInfo::PassFlag_RetMem)) - IA32_Return_Popstack(&m_HookFunc, SIZE_PTR); - else - IA32_Return(&m_HookFunc); - } - - - // Store pointer for later use - // m_HookfuncVfnPtr is a pointer to a void* because SH expects a pointer - // into the hookman's vtable - *m_HookfuncVfnptr = reinterpret_cast(m_HookFunc.GetData()); - - m_HookFunc.SetRE(); - - return m_HookFunc.GetData(); - } - - // Pre-condition: GenerateHookFunc() has been called! - void * GenContext::GeneratePubFunc() - { - jitoffs_t counter, tmppos; - - // The pubfunc is a static cdecl function. - // C Code: - // int HookManPubFunc( - // bool store, ebp + 8 - // IHookManagerInfo *hi ebp + 12 - // ) - // { - // if (store) - // *m_pHI = hi; - // if (hi) - // hi->SetInfo(HOOKMAN_VERSION, m_VtblOffs, m_VtblIdx, m_Proto.GetProto(), m_HookfuncVfnptr) - // } - - // prologue - IA32_Push_Reg(&m_PubFunc, REG_EBP); - IA32_Mov_Reg_Rm(&m_PubFunc, REG_EBP, REG_ESP, MOD_REG); - - - // save store in eax, hi in ecx - IA32_Movzx_Reg32_Rm8_Disp8(&m_PubFunc, REG_EAX, REG_EBP, 8); - IA32_Mov_Reg_Rm_DispAuto(&m_PubFunc, REG_ECX, REG_EBP, 12); - - // Check for store == 0 - IA32_Test_Rm_Reg8(&m_PubFunc, REG_EAX, REG_EAX, MOD_REG); - tmppos = IA32_Jump_Cond_Imm8(&m_PubFunc, CC_Z, 0); - m_PubFunc.start_count(counter); - - // nonzero -> store hi - IA32_Mov_Rm_Imm32(&m_PubFunc, REG_EDX, DownCastPtr(m_pHI), MOD_REG); - IA32_Mov_Rm_Reg(&m_PubFunc, REG_EDX, REG_ECX, MOD_MEM_REG); - - // zero - m_PubFunc.end_count(counter); - m_PubFunc.rewrite(tmppos, static_cast(counter)); - - // check for hi == 0 - IA32_Test_Rm_Reg(&m_PubFunc, REG_ECX, REG_ECX, MOD_REG); - tmppos = IA32_Jump_Cond_Imm8(&m_PubFunc, CC_Z, 0); - m_PubFunc.start_count(counter); - - // nonzero -> call vfunc - // push params in reverse order - IA32_Push_Imm32(&m_PubFunc, DownCastPtr(m_HookfuncVfnptr)); - IA32_Push_Imm32(&m_PubFunc, DownCastPtr(m_BuiltPI)); - IA32_Push_Imm32(&m_PubFunc, m_VtblIdx); - IA32_Push_Imm32(&m_PubFunc, m_VtblOffs); - IA32_Push_Imm32(&m_PubFunc, SH_HOOKMAN_VERSION); - - // hi == this is in ecx - // on gcc/mingw, ecx is the first parameter -#if SH_COMP == SH_COMP_GCC - IA32_Push_Reg(&m_PubFunc, REG_ECX); -#endif - - // call the function. vtbloffs = 0, vtblidx = 0 - // get vtptr into edx - IA32_Mov_Reg_Rm(&m_PubFunc, REG_EDX, REG_ECX, MOD_MEM_REG); - // get funcptr into eax - IA32_Mov_Reg_Rm(&m_PubFunc, REG_EAX, REG_EDX, MOD_MEM_REG); - - IA32_Call_Reg(&m_PubFunc, REG_EAX); - - // on gcc/mingw, we have to clean up after the call -#if SH_COMP == SH_COMP_GCC - // 5 params + hidden thisptr param - IA32_Add_Rm_Imm8(&m_PubFunc, REG_ESP, 6*SIZE_MWORD, MOD_REG); -#endif - - // zero - m_PubFunc.end_count(counter); - m_PubFunc.rewrite(tmppos, static_cast(counter)); - - // return value - IA32_Xor_Reg_Rm(&m_PubFunc, REG_EAX, REG_EAX, MOD_REG); - - // epilogue - IA32_Mov_Reg_Rm(&m_PubFunc, REG_ESP, REG_EBP, MOD_REG); - IA32_Pop_Reg(&m_PubFunc, REG_EBP); - IA32_Return(&m_PubFunc); - - m_PubFunc.SetRE(); - - return m_PubFunc; - } - - bool GenContext::PassInfoSupported(const IntPassInfo &pi, bool is_ret) - { - // :TODO: Error returns - if (pi.type != PassInfo::PassType_Basic && - pi.type != PassInfo::PassType_Float && - pi.type != PassInfo::PassType_Object) - { - return false; - } - - if (pi.type == PassInfo::PassType_Object && - (pi.flags & PassInfo::PassFlag_ByVal)) - { - if ((pi.flags & PassInfo::PassFlag_CCtor) && !pi.pCopyCtor) - { - return false; - } - - if ((pi.flags & PassInfo::PassFlag_ODtor) && !pi.pDtor) - { - return false; - } - - if ((pi.flags & PassInfo::PassFlag_AssignOp) && !pi.pAssignOperator) - { - return false; - } - - if ((pi.flags & PassInfo::PassFlag_OCtor) && !pi.pNormalCtor) - { - return false; - } - } - - if ((pi.flags & (PassInfo::PassFlag_ByVal | PassInfo::PassFlag_ByRef)) == 0) - { - return false; // Neither byval nor byref! - } - return true; - } - - void GenContext::AutoDetectRetType() - { - IntPassInfo &pi = m_Proto.GetRet(); - - // Only relevant for byval types - if (pi.flags & PassInfo::PassFlag_ByVal) - { - // Basic + float: - if (pi.type == PassInfo::PassType_Basic || - pi.type == PassInfo::PassType_Float) - { - // <= 8 bytes: - // _always_ in registers, no matter what the user says - if (pi.size <= 8) - { - pi.flags &= ~PassInfo::PassFlag_RetMem; - pi.flags |= PassInfo::PassFlag_RetReg; - } - else - { - // Does this even exist? No idea, if it does: in memory! - pi.flags &= ~PassInfo::PassFlag_RetReg; - pi.flags |= PassInfo::PassFlag_RetMem; - } - } - // Object: - else if (pi.type == PassInfo::PassType_Object) - { - // If the user says nothing, auto-detect - if ((pi.flags & (PassInfo::PassFlag_RetMem | PassInfo::PassFlag_RetReg)) == 0) - { -#if SH_COMP == SH_COMP_MSVC - // MSVC seems to return _all_ structs, classes, unions in memory - pi.flags |= PassInfo::PassFlag_RetMem; -#elif SH_COMP == SH_COMP_GCC -#if SH_SYS == SH_SYS_APPLE - // Apple GCC returns in memory if size isn't a power of 2 or > 8 - if ((pi.size & (pi.size - 1)) == 0 && pi.size <= 8) - { - pi.flags |= PassInfo::PassFlag_RetReg; - } - else -#endif - { - // GCC on Linux does same thing as MSVC - pi.flags |= PassInfo::PassFlag_RetMem; - } -#endif - } - } - } - else - { - // byref: make sure that the flag is _not_ set - pi.flags &= ~PassInfo::PassFlag_RetMem; - pi.flags |= PassInfo::PassFlag_RetReg; - } - } - - void GenContext::AutoDetectParamFlags() - { -#if SH_COMP == SH_COMP_GCC - // On GCC, all objects are passed by reference if they have a destructor - for (int i = 0; i < m_Proto.GetNumOfParams(); ++i) - { - IntPassInfo &pi = m_Proto.GetParam(i); - if (pi.type == PassInfo::PassType_Object && (pi.flags & PassInfo::PassFlag_ByVal) && - (pi.flags & PassInfo::PassFlag_ODtor)) - { - pi.flags |= PassFlag_ForcedByRef; - } - } -#endif - } - - HookManagerPubFunc GenContext::Generate() - { - Clear(); - - // Check conditions: - // -1) good proto version - // 0) we don't support unknown passtypes, convention, ... - // 1) we don't support functions which return objects by value or take parameters by value - // that have a constructor, a destructor or an overloaded assignment op - // (we wouldn't know how to call it!) - - if (m_Proto.GetVersion() < 1) - { - return NULL; - } - - AutoDetectRetType(); - AutoDetectParamFlags(); - - // Basically, we only support ThisCall/thiscall with varargs - if ((m_Proto.GetConvention() & (~ProtoInfo::CallConv_HasVafmt)) != ProtoInfo::CallConv_ThisCall) - { - return NULL; - } - - - if (m_Proto.GetRet().size != 0 && !PassInfoSupported(m_Proto.GetRet(), true)) - { - return NULL; - } - - for (int i = 0; i < m_Proto.GetNumOfParams(); ++i) - { - if (!PassInfoSupported(m_Proto.GetParam(i), false)) - return NULL; - } - - BuildProtoInfo(); - GenerateHookFunc(); - return fastdelegate::detail::horrible_cast(GeneratePubFunc()); - } - - HookManagerPubFunc GenContext::GetPubFunc() - { - if (m_GeneratedPubFunc == 0) - m_GeneratedPubFunc = Generate(); - - return m_GeneratedPubFunc; - } - - bool GenContext::Equal(const CProto &proto, int vtbl_offs, int vtbl_idx) - { - return (m_OrigProto.ExactlyEqual(proto) && m_VtblOffs == vtbl_offs && m_VtblIdx == vtbl_idx); - } - - bool GenContext::Equal(HookManagerPubFunc other) - { - return m_GeneratedPubFunc == other; - } - - // *********************************** class GenContextContainer - CHookManagerAutoGen::CHookManagerAutoGen(ISourceHook *pSHPtr) : m_pSHPtr(pSHPtr) - { - } - - CHookManagerAutoGen::~CHookManagerAutoGen() - { - for (List::iterator iter = m_Contexts.begin(); iter != m_Contexts.end(); ++iter) - { - delete iter->m_GenContext; - } - } - - int CHookManagerAutoGen::GetIfaceVersion() - { - return SH_HOOKMANAUTOGEN_IFACE_VERSION; - } - - int CHookManagerAutoGen::GetImplVersion() - { - return SH_HOOKMANAUTOGEN_IMPL_VERSION; - } - - HookManagerPubFunc CHookManagerAutoGen::MakeHookMan(const ProtoInfo *proto, int vtbl_offs, int vtbl_idx) - { - CProto mproto(proto); - for (List::iterator iter = m_Contexts.begin(); iter != m_Contexts.end(); ++iter) - { - if (iter->m_GenContext->Equal(mproto, vtbl_offs, vtbl_idx)) - { - iter->m_RefCnt++; - return iter->m_GenContext->GetPubFunc(); - } - } - - // Not found yet -> new one - StoredContext sctx; - sctx.m_RefCnt = 1; - sctx.m_GenContext = new GenContext(proto, vtbl_offs, vtbl_idx, m_pSHPtr); - - if (sctx.m_GenContext->GetPubFunc() == NULL) - { - return NULL; - } - else - { - m_Contexts.push_back(sctx); - return sctx.m_GenContext->GetPubFunc(); - } - } - - void CHookManagerAutoGen::ReleaseHookMan(HookManagerPubFunc pubFunc) - { - for (List::iterator iter = m_Contexts.begin(); iter != m_Contexts.end(); ++iter) - { - if (iter->m_GenContext->Equal(pubFunc)) - { - iter->m_RefCnt--; - if (iter->m_RefCnt == 0) - { - delete iter->m_GenContext; - m_Contexts.erase(iter); - } - break; - } - } - } - } -} diff --git a/metamod-source/core/sourcehook/sourcehook_hookmangen.h b/metamod-source/core/sourcehook/sourcehook_hookmangen.h deleted file mode 100644 index 39299341..00000000 --- a/metamod-source/core/sourcehook/sourcehook_hookmangen.h +++ /dev/null @@ -1,299 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#ifndef __SOURCEHOOK_HOOKMANGEN_H__ -#define __SOURCEHOOK_HOOKMANGEN_H__ - -#include "sh_pagealloc.h" - -namespace SourceHook -{ - namespace Impl - { - - // Code gen stuff -#if SH_COMP == SH_COMP_GCC -#include - typedef int8_t jit_int8_t; - typedef uint8_t jit_uint8_t; - typedef int32_t jit_int32_t; - typedef uint32_t jit_uint32_t; - typedef int64_t jit_int64_t; - typedef uint64_t jit_uint64_t; -#elif SH_COMP == SH_COMP_MSVC - typedef __int8 jit_int8_t; - typedef unsigned __int8 jit_uint8_t; - typedef __int32 jit_int32_t; - typedef unsigned __int32 jit_uint32_t; - typedef __int64 jit_int64_t; - typedef unsigned __int64 jit_uint64_t; -#endif - typedef unsigned int jitoffs_t; - typedef signed int jitrel_t; - - - class GenBuffer - { - static CPageAlloc ms_Allocator; - - unsigned char *m_pData; - jitoffs_t m_Size; - jitoffs_t m_AllocatedSize; - - public: - GenBuffer() : m_pData(NULL), m_Size(0), m_AllocatedSize(0) - { - } - ~GenBuffer() - { - clear(); - } - jitoffs_t GetSize() - { - return m_Size; - } - unsigned char *GetData() - { - return m_pData; - } - - template void push(PT what) - { - push((const unsigned char *)&what, sizeof(PT)); - } - - void push(const unsigned char *data, jitoffs_t size) - { - jitoffs_t newSize = m_Size + size; - if (newSize > m_AllocatedSize) - { - m_AllocatedSize = newSize > m_AllocatedSize*2 ? newSize : m_AllocatedSize*2; - if (m_AllocatedSize < 64) - m_AllocatedSize = 64; - - unsigned char *newBuf; - newBuf = reinterpret_cast(ms_Allocator.Alloc(m_AllocatedSize)); - ms_Allocator.SetRW(newBuf); - if (!newBuf) - { - SH_ASSERT(0, ("bad_alloc: couldn't allocate 0x%08X bytes of memory\n", m_AllocatedSize)); - return; - } - memset((void*)newBuf, 0xCC, m_AllocatedSize); // :TODO: remove this ! - memcpy((void*)newBuf, (const void*)m_pData, m_Size); - if (m_pData) - { - ms_Allocator.SetRE(reinterpret_cast(m_pData)); - ms_Allocator.SetRW(newBuf); - ms_Allocator.Free(reinterpret_cast(m_pData)); - } - m_pData = newBuf; - } - memcpy((void*)(m_pData + m_Size), (const void*)data, size); - m_Size = newSize; - } - - template void rewrite(jitoffs_t offset, PT what) - { - rewrite(offset, (const unsigned char *)&what, sizeof(PT)); - } - - void rewrite(jitoffs_t offset, const unsigned char *data, jitoffs_t size) - { - SH_ASSERT(offset + size <= m_AllocatedSize, ("rewrite too far")); - - memcpy((void*)(m_pData + offset), (const void*)data, size); - } - - void clear() - { - if (m_pData) - ms_Allocator.Free(reinterpret_cast(m_pData)); - m_pData = NULL; - m_Size = 0; - m_AllocatedSize = 0; - } - - void SetRE() - { - ms_Allocator.SetRE(reinterpret_cast(m_pData)); - } - - operator void *() - { - return reinterpret_cast(GetData()); - } - - void write_ubyte(jit_uint8_t x) { push(x); } - void write_byte(jit_uint8_t x) { push(x); } - - void write_ushort(unsigned short x) { push(x); } - void write_short(signed short x) { push(x); } - - void write_uint32(jit_uint32_t x) { push(x); } - void write_int32(jit_uint32_t x) { push(x); } - - jitoffs_t get_outputpos() - { - return m_Size; - } - - void start_count(jitoffs_t &offs) - { - offs = get_outputpos(); - } - void end_count(jitoffs_t &offs) - { - offs = get_outputpos() - offs; - } - }; - - class GenContext - { - const static int SIZE_MWORD = 4; - const static int SIZE_PTR = sizeof(void*); - const static int PassFlag_ForcedByRef = (1<<30); // ByVal in source, but actually passed by reference (GCC) -> private pass, destruct - - HookManagerPubFunc m_GeneratedPubFunc; - - CProto m_OrigProto; // original passed-in prototype - CProto m_Proto; - int m_VtblOffs; - int m_VtblIdx; - ISourceHook *m_SHPtr; - - GenBuffer m_HookFunc; - GenBuffer m_PubFunc; - - ProtoInfo *m_BuiltPI; - PassInfo *m_BuiltPI_Params; - PassInfo::V2Info *m_BuiltPI_Params2; - - // For hookfunc - void **m_pHI; - void **m_HookfuncVfnptr; - - // Level 3 - Helpers - int m_RegCounter; - jit_int8_t NextRegEBX_ECX_EDX(); - - int m_BytesPushedAfterInitialAlignment; - enum AlignStackFlags - { - AlignStack_GCC_ThisOnStack = 1, - AlignStack_MSVC_ThisOnStack = 2, - AlignStack_MemRet = 4 - }; - jit_int32_t AlignStackBeforeCall(int paramsize, int flags); - void AlignStackAfterCall(jit_int32_t numofbytes); - void CheckAlignmentBeforeCall(); - - // size info - jit_int32_t GetRealSize(const IntPassInfo &info); // checks for reference - jit_int32_t AlignSize(jit_int32_t x, jit_int32_t boundary); // align a size - jit_int32_t GetParamStackSize(const IntPassInfo &info); // get the size of a param in the param stack - short GetParamsTotalStackSize(); // sum(GetParamStackSize(param[i]), 0 <= i < numOfParams) - - // Helpers - void BitwiseCopy_Setup(); - void BitwiseCopy_Do(size_t size); - - - // HookFunc frame - jit_int32_t m_HookFunc_FrameOffset; - jit_int32_t m_HookFunc_FrameVarsSize; - - void ResetFrame(jit_int32_t startOffset); - jit_int32_t AddVarToFrame(jit_int32_t size); - jit_int32_t ComputeVarsSize(); - - // Param push - short GetForcedByRefParamsSize(); // sum(param[i] is forcedbyref ? GetStackSize(param[i]) : 0, 0 <= i < numOfParams) - short GetForcedByRefParamOffset(int p); // sum(param[i] is forcedbyref ? GetStackSize(param[i]) : 0, 0 <= i < p) - jit_int32_t PushParams(jit_int32_t param_base_offset, jit_int32_t save_ret_to, - jit_int32_t v_place_for_memret, jit_int32_t v_place_fbrr_base); // save_ret_to and v_place_for_memret only used for memory returns - jit_int32_t PushRef(jit_int32_t param_offset, const IntPassInfo &pi); - jit_int32_t PushBasic(jit_int32_t param_offset, const IntPassInfo &pi); - jit_int32_t PushFloat(jit_int32_t param_offset, const IntPassInfo &pi); - jit_int32_t PushObject(jit_int32_t param_offset, const IntPassInfo &pi, jit_int32_t v_place_fbrr); - jit_int32_t PushMemRetPtr(jit_int32_t save_ret_to, jit_int32_t v_place_for_memret); - void DestroyParams(jit_int32_t fbrr_base); - - // Ret val processing - void SaveRetVal(jit_int32_t v_where, jit_int32_t v_place_for_memret); - void ProcessPluginRetVal(jit_int32_t v_cur_res, jit_int32_t v_pContext, jit_int32_t v_plugin_ret); - - void PrepareReturn(jit_int32_t v_status, jit_int32_t v_pContext, jit_int32_t v_retptr); - void DoReturn(jit_int32_t v_retptr, jit_int32_t v_memret_outaddr); - - bool MemRetWithTempObj(); // do we do a memory return AND need a temporary place for it? - - // Call hooks - void GenerateCallHooks(int v_status, int v_prev_res, int v_cur_res, int v_iter, - int v_pContext, int base_param_offset, int v_plugin_ret, int v_place_for_memret, jit_int32_t v_place_fbrr_base, jit_int32_t v_va_buf); - - // Call orig - void GenerateCallOrig(int v_status, int v_pContext, int param_base_offs, int v_this, - int v_vfnptr_origentry, int v_orig_ret, int v_override_ret, int v_place_for_memret, jit_int32_t v_place_fbrr_base, jit_int32_t v_va_buf); - - // Hook loop - void CallSetupHookLoop(int v_orig_ret, int v_override_ret, - int v_cur_res, int v_prev_res, int v_status, int v_vnfptr_origentry, - int v_this, int v_pContext); - - void CallEndContext(int v_pContext); - - // Level 2 -> called from Generate() - void AutoDetectRetType(); - void AutoDetectParamFlags(); - bool PassInfoSupported(const IntPassInfo &pi, bool is_ret); - void Clear(); - void BuildProtoInfo(); - void *GenerateHookFunc(); - void *GeneratePubFunc(); - - HookManagerPubFunc Generate(); - public: - // Level 1 -> Public interface - GenContext(const ProtoInfo *proto, int vtbl_offs, int vtbl_idx, ISourceHook *pSHPtr); - ~GenContext(); - - bool Equal(const CProto &proto, int vtbl_offs, int vtbl_idx); - bool Equal(HookManagerPubFunc other); - - HookManagerPubFunc GetPubFunc(); - }; - - class CHookManagerAutoGen : public IHookManagerAutoGen - { - struct StoredContext - { - int m_RefCnt; - GenContext *m_GenContext; - }; - List m_Contexts; - ISourceHook *m_pSHPtr; - - public: - CHookManagerAutoGen(ISourceHook *pSHPtr); - ~CHookManagerAutoGen(); - - int GetIfaceVersion(); - int GetImplVersion(); - - HookManagerPubFunc MakeHookMan(const ProtoInfo *proto, int vtbl_offs, int vtbl_idx); - void ReleaseHookMan(HookManagerPubFunc pubFunc); - }; - - } -} - - -#endif diff --git a/metamod-source/core/sourcehook/sourcehook_hookmangen_x86.h b/metamod-source/core/sourcehook/sourcehook_hookmangen_x86.h deleted file mode 100644 index 3dd33067..00000000 --- a/metamod-source/core/sourcehook/sourcehook_hookmangen_x86.h +++ /dev/null @@ -1,1611 +0,0 @@ -/* ======== SourceHook ======== -* vim: set ts=4 : -* Copyright (C) 2004-2010 AlliedModders LLC. All rights reserved. -* No warranties of any kind -* -* License: zlib/libpng -* -* from the SourcePawn JIT SDK -* ============================ -*/ - -#ifndef __SOURCEHOOK_HOOKMANGEN_X86_H__ -#define __SOURCEHOOK_HOOKMANGEN_X86_H__ - -#include - -#undef REG_EAX -#undef REG_ECX -#undef REG_EDX -#undef REG_EBX -#undef REG_ESP -#undef REG_SIB -#undef REG_EBP -#undef REG_ESI -#undef REG_EDI - -//MOD R/M -#define MOD_MEM_REG 0 -#define MOD_DISP8 1 -#define MOD_DISP32 2 -#define MOD_REG 3 - -//SIB -#define NOSCALE 0 -#define SCALE2 1 -#define SCALE4 2 -#define SCALE8 3 - -//Register codes -#define REG_EAX 0 -#define REG_ECX 1 -#define REG_EDX 2 -#define REG_EBX 3 -#define REG_ESP 4 -#define REG_SIB 4 -#define REG_NOIDX 4 -#define REG_IMM_BASE 5 -#define REG_EBP 5 -#define REG_ESI 6 -#define REG_EDI 7 - -#define IA32_16BIT_PREFIX 0x66 - -//condition codes (for example, Jcc opcodes) -#define CC_B 0x2 -#define CC_NAE CC_B -#define CC_NB 0x3 -#define CC_AE CC_NB -#define CC_E 0x4 -#define CC_Z CC_E -#define CC_NE 0x5 -#define CC_NZ CC_NE -#define CC_NA 0x6 -#define CC_BE CC_NA -#define CC_A 0x7 -#define CC_NBE CC_A -#define CC_L 0xC -#define CC_NGE CC_L -#define CC_NL 0xD -#define CC_GE CC_NL -#define CC_NG 0xE -#define CC_LE CC_NG -#define CC_G 0xF -#define CC_NLE CC_G - -//Opcodes with encoding information -#define IA32_XOR_RM_REG 0x31 // encoding is /r -#define IA32_XOR_REG_RM 0x33 // encoding is /r -#define IA32_XOR_EAX_IMM32 0x35 // encoding is /r -#define IA32_XOR_RM_IMM32 0x81 // encoding is /6 -#define IA32_XOR_RM_IMM8 0x83 // encoding is /6 -#define IA32_ADD_RM_REG 0x01 // encoding is /r -#define IA32_ADD_REG_RM 0x03 // encoding is /r -#define IA32_ADD_RM_IMM32 0x81 // encoding is /0 -#define IA32_ADD_RM_IMM8 0x83 // encoding is /0 -#define IA32_ADD_EAX_IMM32 0x05 // no extra encoding -#define IA32_SUB_RM_REG 0x29 // encoding is /r -#define IA32_SUB_REG_RM 0x2B // encoding is /r -#define IA32_SUB_RM_IMM8 0x83 // encoding is /5 -#define IA32_SUB_RM_IMM32 0x81 // encoding is /5 -#define IA32_SBB_REG_RM 0x1B // encoding is /r -#define IA32_SBB_RM_IMM8 0x83 // encoding is -#define IA32_JMP_IMM32 0xE9 // encoding is imm32 -#define IA32_JMP_IMM8 0xEB // encoding is imm8 -#define IA32_JMP_RM 0xFF // encoding is /4 -#define IA32_CALL_IMM32 0xE8 // relative call, -#define IA32_CALL_RM 0xFF // encoding is /2 -#define IA32_MOV_REG_IMM 0xB8 // encoding is +r -#define IA32_MOV_RM8_REG 0x88 // encoding is /r -#define IA32_MOV_RM_REG 0x89 // encoding is /r -#define IA32_MOV_REG_RM 0x8B // encoding is /r -#define IA32_MOV_REG8_RM8 0x8A // encoding is /r -#define IA32_MOV_RM8_REG8 0x88 // encoding is /r -#define IA32_MOV_RM_IMM32 0xC7 // encoding is /0 -#define IA32_CMP_RM_IMM32 0x81 // encoding is /7 -#define IA32_CMP_RM_IMM8 0x83 // encoding is /7 -#define IA32_CMP_AL_IMM32 0x3C // no extra encoding -#define IA32_CMP_EAX_IMM32 0x3D // no extra encoding -#define IA32_CMP_RM_REG 0x39 // encoding is /r -#define IA32_CMP_REG_RM 0x3B // encoding is /r -#define IA32_CMPSB 0xA6 // no extra encoding -#define IA32_TEST_RM_REG8 0x84 // encoding is /r -#define IA32_TEST_RM_REG 0x85 // encoding is /r -#define IA32_TEST_RM_IMM32 0xF7 // encoding is /0 -#define IA32_JCC_IMM 0x70 // encoding is +cc -#define IA32_JCC_IMM32_1 0x0F // opcode part 1 -#define IA32_JCC_IMM32_2 0x80 // encoding is +cc -#define IA32_RET 0xC3 // no extra encoding -#define IA32_RETN 0xC2 // encoding is -#define IA32_NEG_RM 0xF7 // encoding is /3 -#define IA32_INC_REG 0x40 // encoding is +r -#define IA32_INC_RM 0xFF // encoding is /0 -#define IA32_DEC_REG 0x48 // encoding is +r -#define IA32_DEC_RM 0xFF // encoding is /1 -#define IA32_OR_REG_RM 0x0B // encoding is /r -#define IA32_AND_REG_RM 0x23 // encoding is /r -#define IA32_AND_EAX_IMM32 0x25 // encoding is -#define IA32_AND_RM_IMM32 0x81 // encoding is /4 -#define IA32_AND_RM_IMM8 0x83 // encoding is /4 -#define IA32_NOT_RM 0xF7 // encoding is /2 -#define IA32_DIV_RM 0xF7 // encoding is /6 -#define IA32_MUL_RM 0xF7 // encoding is /4 -#define IA32_IDIV_RM 0xF7 // encoding is /7 -#define IA32_IMUL_RM 0xF7 // encoding is /5 -#define IA32_IMUL_REG_IMM32 0x69 // encoding is /r -#define IA32_IMUL_REG_IMM8 0x6B // encoding is /r -#define IA32_IMUL_REG_RM_1 0x0F // encoding is _2 -#define IA32_IMUL_REG_RM_2 0xAF // encoding is /r -#define IA32_SHR_RM_IMM8 0xC1 // encoding is /5 -#define IA32_SHR_RM_1 0xD1 // encoding is /5 -#define IA32_SHL_RM_IMM8 0xC1 // encoding is /4 -#define IA32_SHL_RM_1 0xD1 // encoding is /4 -#define IA32_SAR_RM_CL 0xD3 // encoding is /7 -#define IA32_SAR_RM_1 0xD1 // encoding is /7 -#define IA32_SHR_RM_CL 0xD3 // encoding is /5 -#define IA32_SHL_RM_CL 0xD3 // encoding is /4 -#define IA32_SAR_RM_IMM8 0xC1 // encoding is /7 -#define IA32_SETCC_RM8_1 0x0F // opcode part 1 -#define IA32_SETCC_RM8_2 0x90 // encoding is +cc /0 (8bits) -#define IA32_CMOVCC_RM_1 0x0F // opcode part 1 -#define IA32_CMOVCC_RM_2 0x40 // encoding is +cc /r -#define IA32_XCHG_EAX_REG 0x90 // encoding is +r -#define IA32_LEA_REG_MEM 0x8D // encoding is /r -#define IA32_POP_REG 0x58 // encoding is +r -#define IA32_PUSH_REG 0x50 // encoding is +r -#define IA32_PUSH_RM 0xFF // encoding is /6 -#define IA32_PUSH_IMM32 0x68 // encoding is -#define IA32_PUSH_IMM8 0x6A // encoding is -#define IA32_REP 0xF3 // no extra encoding -#define IA32_MOVSD 0xA5 // no extra encoding -#define IA32_MOVSB 0xA4 // no extra encoding -#define IA32_STOSD 0xAB // no extra encoding -#define IA32_CLD 0xFC // no extra encoding -#define IA32_PUSHAD 0x60 // no extra encoding -#define IA32_POPAD 0x61 // no extra encoding -#define IA32_NOP 0x90 // no extra encoding -#define IA32_INT3 0xCC // no extra encoding -#define IA32_FSTP_MEM32 0xD9 // encoding is /3 -#define IA32_FSTP_MEM64 0xDD // encoding is /3 -#define IA32_FLD_MEM32 0xD9 // encoding is /0 -#define IA32_FLD_MEM64 0xDD // encoding is /0 -#define IA32_FILD_MEM32 0xDB // encoding is /0 -#define IA32_FADD_MEM32 0xD8 // encoding is /0 -#define IA32_FADD_FPREG_ST0_1 0xDC // opcode part 1 -#define IA32_FADD_FPREG_ST0_2 0xC0 // encoding is +r -#define IA32_FSUB_MEM32 0xD8 // encoding is /4 -#define IA32_FMUL_MEM32 0xD8 // encoding is /1 -#define IA32_FDIV_MEM32 0xD8 // encoding is /6 -#define IA32_FSTCW_MEM16_1 0x9B // opcode part 1 -#define IA32_FSTCW_MEM16_2 0xD9 // encoding is /7 -#define IA32_FLDCW_MEM16 0xD9 // encoding is /5 -#define IA32_FISTP_MEM32 0xDB // encoding is /3 -#define IA32_FUCOMIP_1 0xDF // opcode part 1 -#define IA32_FUCOMIP_2 0xE8 // encoding is +r -#define IA32_FSTP_FPREG_1 0xDD // opcode part 1 -#define IA32_FSTP_FPREG_2 0xD8 // encoding is +r -#define IA32_MOVZX_R32_RM8_1 0x0F // opcode part 1 -#define IA32_MOVZX_R32_RM8_2 0xB6 // encoding is /r -#define IA32_MOVZX_R32_RM16_1 0x0F // opcode part 1 -#define IA32_MOVZX_R32_RM16_2 0xB7 // encoding is /r - - -namespace SourceHook -{ - namespace Impl - { - typedef GenBuffer JitWriter; - - inline jit_uint8_t ia32_modrm(jit_uint8_t mode, jit_uint8_t reg, jit_uint8_t rm) - { - jit_uint8_t modrm = (mode << 6); - - modrm |= (reg << 3); - modrm |= (rm); - - return modrm; - } - - //mode is the scaling method - NOSCALE ... SCALE8 - //index is the register that is scaled - //base is the base register - inline jit_uint8_t ia32_sib(jit_uint8_t mode, jit_uint8_t index, jit_uint8_t base) - { - jit_uint8_t sib = (mode << 6); - - sib |= (index << 3); - sib |= (base); - - return sib; - } - - inline void IA32_Int3(JitWriter *jit) - { - jit->write_ubyte(IA32_INT3); - } - - /*********************** - * INCREMENT/DECREMENT * - ***********************/ - - inline void IA32_Inc_Reg(JitWriter *jit, jit_uint8_t reg) - { - jit->write_ubyte(IA32_INC_REG+reg); - } - - inline void IA32_Inc_Rm_Disp8(JitWriter *jit, jit_uint8_t reg, jit_int8_t disp) - { - jit->write_ubyte(IA32_INC_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 0, reg)); - jit->write_byte(disp); - } - - inline void IA32_Inc_Rm_Disp32(JitWriter *jit, jit_uint8_t reg, jit_int32_t disp) - { - jit->write_ubyte(IA32_INC_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP32, 0, reg)); - jit->write_int32(disp); - } - - inline void IA32_Inc_Rm_Disp_Reg(JitWriter *jit, jit_uint8_t base, jit_uint8_t reg, jit_uint8_t scale) - { - jit->write_ubyte(IA32_INC_RM); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, 0, REG_SIB)); - jit->write_ubyte(ia32_sib(scale, reg, base)); - } - - inline void IA32_Dec_Reg(JitWriter *jit, jit_uint8_t reg) - { - jit->write_ubyte(IA32_DEC_REG+reg); - } - - inline void IA32_Dec_Rm_Disp8(JitWriter *jit, jit_uint8_t reg, jit_int8_t disp) - { - jit->write_ubyte(IA32_DEC_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 1, reg)); - jit->write_byte(disp); - } - - inline void IA32_Dec_Rm_Disp32(JitWriter *jit, jit_uint8_t reg, jit_int32_t disp) - { - jit->write_ubyte(IA32_DEC_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP32, 1, reg)); - jit->write_int32(disp); - } - - inline void IA32_Dec_Rm_Disp_Reg(JitWriter *jit, jit_uint8_t base, jit_uint8_t reg, jit_uint8_t scale) - { - jit->write_ubyte(IA32_DEC_RM); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, 1, REG_SIB)); - jit->write_ubyte(ia32_sib(scale, reg, base)); - } - - /**************** - * BINARY LOGIC * - ****************/ - - inline void IA32_Xor_Rm_Reg(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t dest_mode) - { - jit->write_ubyte(IA32_XOR_RM_REG); - jit->write_ubyte(ia32_modrm(dest_mode, src, dest)); - } - - inline void IA32_Xor_Reg_Rm(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t dest_mode) - { - jit->write_ubyte(IA32_XOR_REG_RM); - jit->write_ubyte(ia32_modrm(dest_mode, dest, src)); - } - - inline void IA32_Xor_Rm_Imm8(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode, jit_int8_t value) - { - jit->write_ubyte(IA32_XOR_RM_IMM8); - jit->write_ubyte(ia32_modrm(mode, 6, reg)); - jit->write_byte(value); - } - - inline void IA32_Xor_Rm_Imm32(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode, jit_int32_t value) - { - jit->write_ubyte(IA32_XOR_RM_IMM32); - jit->write_ubyte(ia32_modrm(mode, 6, reg)); - jit->write_int32(value); - } - - inline void IA32_Xor_Eax_Imm32(JitWriter *jit, jit_int32_t value) - { - jit->write_ubyte(IA32_XOR_EAX_IMM32); - jit->write_int32(value); - } - - inline void IA32_Neg_Rm(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode) - { - jit->write_ubyte(IA32_NEG_RM); - jit->write_ubyte(ia32_modrm(mode, 3, reg)); - } - - inline void IA32_Or_Reg_Rm(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_OR_REG_RM); - jit->write_ubyte(ia32_modrm(mode, dest, src)); - } - - inline void IA32_And_Reg_Rm(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_AND_REG_RM); - jit->write_ubyte(ia32_modrm(mode, dest, src)); - } - - inline void IA32_And_Rm_Imm32(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode, jit_int32_t value) - { - jit->write_ubyte(IA32_AND_RM_IMM32); - jit->write_ubyte(ia32_modrm(mode, 4, reg)); - jit->write_int32(value); - } - - inline void IA32_And_Rm_Imm8(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode, jit_int8_t value) - { - jit->write_ubyte(IA32_AND_RM_IMM8); - jit->write_ubyte(ia32_modrm(mode, 4, reg)); - jit->write_byte(value); - } - - inline void IA32_And_Eax_Imm32(JitWriter *jit, jit_int32_t value) - { - jit->write_ubyte(IA32_AND_EAX_IMM32); - jit->write_int32(value); - } - - inline void IA32_Not_Rm(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode) - { - jit->write_ubyte(IA32_NOT_RM); - jit->write_ubyte(ia32_modrm(mode, 2, reg)); - } - - inline void IA32_Shr_Rm_Imm8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t value, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SHR_RM_IMM8); - jit->write_ubyte(ia32_modrm(mode, 5, dest)); - jit->write_ubyte(value); - } - - inline void IA32_Shr_Rm_1(JitWriter *jit, jit_uint8_t dest, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SHR_RM_1); - jit->write_ubyte(ia32_modrm(mode, 5, dest)); - } - - inline void IA32_Shl_Rm_Imm8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t value, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SHL_RM_IMM8); - jit->write_ubyte(ia32_modrm(mode, 4, dest)); - jit->write_ubyte(value); - } - - inline void IA32_Shl_Rm_1(JitWriter *jit, jit_uint8_t dest, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SHL_RM_1); - jit->write_ubyte(ia32_modrm(mode, 4, dest)); - } - - inline void IA32_Sar_Rm_Imm8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t value, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SAR_RM_IMM8); - jit->write_ubyte(ia32_modrm(mode, 7, dest)); - jit->write_ubyte(value); - } - - inline void IA32_Sar_Rm_CL(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SAR_RM_CL); - jit->write_ubyte(ia32_modrm(mode, 7, reg)); - } - - inline void IA32_Sar_Rm_1(JitWriter *jit, jit_uint8_t dest, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SAR_RM_1); - jit->write_ubyte(ia32_modrm(mode, 7, dest)); - } - - inline void IA32_Shr_Rm_CL(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SHR_RM_CL); - jit->write_ubyte(ia32_modrm(mode, 5, reg)); - } - - inline void IA32_Shl_Rm_CL(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SHL_RM_CL); - jit->write_ubyte(ia32_modrm(mode, 4, reg)); - } - - inline void IA32_Xchg_Eax_Reg(JitWriter *jit, jit_uint8_t reg) - { - jit->write_ubyte(IA32_XCHG_EAX_REG+reg); - } - - /********************** - * ARITHMETIC (BASIC) * - **********************/ - - inline void IA32_Add_Rm_Reg(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_ADD_RM_REG); - jit->write_ubyte(ia32_modrm(mode, src, dest)); - } - - inline void IA32_Add_Reg_Rm(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_ADD_REG_RM); - jit->write_ubyte(ia32_modrm(mode, dest, src)); - } - - inline void IA32_Add_Rm_Imm8(JitWriter *jit, jit_uint8_t reg, jit_int8_t value, jit_uint8_t mode) - { - jit->write_ubyte(IA32_ADD_RM_IMM8); - jit->write_ubyte(ia32_modrm(mode, 0, reg)); - jit->write_byte(value); - } - - inline void IA32_Add_Rm_Imm32(JitWriter *jit, jit_uint8_t reg, jit_int32_t value, jit_uint8_t mode) - { - jit->write_ubyte(IA32_ADD_RM_IMM32); - jit->write_ubyte(ia32_modrm(mode, 0, reg)); - jit->write_int32(value); - } - - inline void IA32_Add_Rm_ImmAuto(JitWriter *jit, jit_uint8_t reg, jit_int32_t value, jit_uint8_t mode) - { - if (value >= SCHAR_MIN && value <= SCHAR_MAX) - IA32_Add_Rm_Imm8(jit, reg, static_cast(value), mode); - else - IA32_Add_Rm_Imm32(jit, reg, value, mode); - } - - inline void IA32_Add_Eax_Imm32(JitWriter *jit, jit_int32_t value) - { - jit->write_ubyte(IA32_ADD_EAX_IMM32); - jit->write_int32(value); - } - - inline void IA32_Sub_Rm_Reg(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SUB_RM_REG); - jit->write_ubyte(ia32_modrm(mode, src, dest)); - } - - inline void IA32_Sub_Reg_Rm(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SUB_REG_RM); - jit->write_ubyte(ia32_modrm(mode, dest, src)); - } - - inline void IA32_Sub_Reg_Rm_Disp8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int8_t disp8) - { - jit->write_ubyte(IA32_SUB_REG_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP8, dest, src)); - jit->write_byte(disp8); - } - - inline void IA32_Sub_Rm_Reg_Disp8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int8_t disp8) - { - jit->write_ubyte(IA32_SUB_RM_REG); - jit->write_ubyte(ia32_modrm(MOD_DISP8, src, dest)); - jit->write_byte(disp8); - } - - inline void IA32_Sub_Rm_Imm8(JitWriter *jit, jit_uint8_t reg, jit_int8_t val, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SUB_RM_IMM8); - jit->write_ubyte(ia32_modrm(mode, 5, reg)); - jit->write_byte(val); - } - - inline void IA32_Sub_Rm_Imm32(JitWriter *jit, jit_uint8_t reg, jit_int32_t val, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SUB_RM_IMM32); - jit->write_ubyte(ia32_modrm(mode, 5, reg)); - jit->write_int32(val); - } - - inline void IA32_Sub_Rm_ImmAuto(JitWriter *jit, jit_uint8_t reg, jit_int32_t val, jit_uint8_t mode) - { - if (val >= SCHAR_MIN && val <= SCHAR_MAX) - IA32_Sub_Rm_Imm8(jit, reg, static_cast(val), mode); - else - IA32_Sub_Rm_Imm32(jit, reg, val, mode); - } - - inline void IA32_Sbb_Reg_Rm(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SBB_REG_RM); - jit->write_ubyte(ia32_modrm(mode, dest, src)); - } - - inline void IA32_Sbb_Rm_Imm8(JitWriter *jit, jit_uint8_t dest, jit_int8_t value, jit_uint8_t mode) - { - jit->write_ubyte(IA32_SBB_RM_IMM8); - jit->write_ubyte(ia32_modrm(mode, 3, dest)); - jit->write_byte(value); - } - - inline void IA32_Div_Rm(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode) - { - jit->write_ubyte(IA32_DIV_RM); - jit->write_ubyte(ia32_modrm(mode, 6, reg)); - } - - inline void IA32_IDiv_Rm(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode) - { - jit->write_ubyte(IA32_IDIV_RM); - jit->write_ubyte(ia32_modrm(mode, 7, reg)); - } - - inline void IA32_Mul_Rm(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode) - { - jit->write_ubyte(IA32_MUL_RM); - jit->write_ubyte(ia32_modrm(mode, 4, reg)); - } - - inline void IA32_IMul_Rm(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode) - { - jit->write_ubyte(IA32_IMUL_RM); - jit->write_ubyte(ia32_modrm(mode, 5, reg)); - } - - inline void IA32_IMul_Reg_Imm8(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode, jit_int8_t value) - { - jit->write_ubyte(IA32_IMUL_REG_IMM8); - jit->write_ubyte(ia32_modrm(mode, 0, reg)); - jit->write_byte(value); - } - - inline void IA32_IMul_Reg_Imm32(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode, jit_int32_t value) - { - jit->write_ubyte(IA32_IMUL_REG_IMM32); - jit->write_ubyte(ia32_modrm(mode, 0, reg)); - jit->write_int32(value); - } - - inline void IA32_IMul_Reg_Rm(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_IMUL_REG_RM_1); - jit->write_ubyte(IA32_IMUL_REG_RM_2); - jit->write_ubyte(ia32_modrm(mode, dest, src)); - } - - inline void IA32_Add_Rm_Reg_Disp8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int8_t disp) - { - jit->write_ubyte(IA32_ADD_RM_REG); - jit->write_ubyte(ia32_modrm(MOD_DISP8, src, dest)); - jit->write_byte(disp); - } - - inline void IA32_Add_Reg_Rm_Disp8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int8_t disp) - { - jit->write_ubyte(IA32_ADD_REG_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP8, dest, src)); - jit->write_byte(disp); - } - - inline void IA32_Add_Rm_Imm8_Disp8(JitWriter *jit, - jit_uint8_t dest, - jit_int8_t val, - jit_int8_t disp8) - { - jit->write_ubyte(IA32_ADD_RM_IMM8); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 0, dest)); - jit->write_byte(disp8); - jit->write_byte(val); - } - - inline void IA32_Add_Rm_Imm32_Disp8(JitWriter *jit, - jit_uint8_t dest, - jit_int32_t val, - jit_int8_t disp8) - { - jit->write_ubyte(IA32_ADD_RM_IMM32); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 0, dest)); - jit->write_byte(disp8); - jit->write_int32(val); - } - - inline jitoffs_t IA32_Add_Rm_Imm32_Later(JitWriter *jit, - jit_uint8_t dest, - jit_uint8_t mode) - { - jit->write_ubyte(IA32_ADD_RM_IMM32); - jit->write_ubyte(ia32_modrm(mode, 0, dest)); - jitoffs_t ptr = jit->get_outputpos(); - jit->write_int32(0); - return ptr; - } - - inline void IA32_Add_Rm_Imm8_Disp32(JitWriter *jit, - jit_uint8_t dest, - jit_int8_t val, - jit_int32_t disp32) - { - jit->write_ubyte(IA32_ADD_RM_IMM8); - jit->write_ubyte(ia32_modrm(MOD_DISP32, 0, dest)); - jit->write_int32(disp32); - jit->write_byte(val); - } - - inline void IA32_Add_RmEBP_Imm8_Disp_Reg(JitWriter *jit, - jit_uint8_t dest_base, - jit_uint8_t dest_index, - jit_uint8_t dest_scale, - jit_int8_t val) - { - jit->write_ubyte(IA32_ADD_RM_IMM8); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 0, REG_SIB)); - jit->write_ubyte(ia32_sib(dest_scale, dest_index, dest_base)); - jit->write_byte(0); - jit->write_byte(val); - } - - inline void IA32_Sub_Rm_Imm8_Disp8(JitWriter *jit, - jit_uint8_t dest, - jit_int8_t val, - jit_int8_t disp8) - { - jit->write_ubyte(IA32_SUB_RM_IMM8); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 5, dest)); - jit->write_byte(disp8); - jit->write_byte(val); - } - - inline void IA32_Sub_Rm_Imm8_Disp32(JitWriter *jit, - jit_uint8_t dest, - jit_int8_t val, - jit_int32_t disp32) - { - jit->write_ubyte(IA32_SUB_RM_IMM8); - jit->write_ubyte(ia32_modrm(MOD_DISP32, 5, dest)); - jit->write_int32(disp32); - jit->write_byte(val); - } - - inline void IA32_Sub_RmEBP_Imm8_Disp_Reg(JitWriter *jit, - jit_uint8_t dest_base, - jit_uint8_t dest_index, - jit_uint8_t dest_scale, - jit_int8_t val) - { - jit->write_ubyte(IA32_SUB_RM_IMM8); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 5, REG_SIB)); - jit->write_ubyte(ia32_sib(dest_scale, dest_index, dest_base)); - jit->write_byte(0); - jit->write_byte(val); - } - - /** - * Memory Instructions - */ - - inline void IA32_Lea_Reg_DispRegMult(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src_base, jit_uint8_t src_index, jit_uint8_t scale) - { - jit->write_ubyte(IA32_LEA_REG_MEM); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, dest, REG_SIB)); - jit->write_ubyte(ia32_sib(scale, src_index, src_base)); - } - - inline void IA32_Lea_Reg_DispEBPRegMult(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src_base, jit_uint8_t src_index, jit_uint8_t scale) - { - jit->write_ubyte(IA32_LEA_REG_MEM); - jit->write_ubyte(ia32_modrm(MOD_DISP8, dest, REG_SIB)); - jit->write_ubyte(ia32_sib(scale, src_index, src_base)); - jit->write_byte(0); - } - - inline void IA32_Lea_Reg_DispRegMultImm8(JitWriter *jit, - jit_uint8_t dest, - jit_uint8_t src_base, - jit_uint8_t src_index, - jit_uint8_t scale, - jit_int8_t val) - { - jit->write_ubyte(IA32_LEA_REG_MEM); - jit->write_ubyte(ia32_modrm(MOD_DISP8, dest, REG_SIB)); - jit->write_ubyte(ia32_sib(scale, src_index, src_base)); - jit->write_byte(val); - } - - inline void IA32_Lea_Reg_DispRegMultImm32(JitWriter *jit, - jit_uint8_t dest, - jit_uint8_t src_base, - jit_uint8_t src_index, - jit_uint8_t scale, - jit_int32_t val) - { - jit->write_ubyte(IA32_LEA_REG_MEM); - jit->write_ubyte(ia32_modrm(MOD_DISP32, dest, REG_SIB)); - jit->write_ubyte(ia32_sib(scale, src_index, src_base)); - jit->write_int32(val); - } - - inline void IA32_Lea_Reg_RegMultImm32(JitWriter *jit, - jit_uint8_t dest, - jit_uint8_t src_index, - jit_uint8_t scale, - jit_int32_t val) - { - jit->write_ubyte(IA32_LEA_REG_MEM); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, dest, REG_SIB)); - jit->write_ubyte(ia32_sib(scale, src_index, REG_IMM_BASE)); - jit->write_int32(val); - } - - inline void IA32_Lea_DispRegImm8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src_base, jit_int8_t val) - { - jit->write_ubyte(IA32_LEA_REG_MEM); - jit->write_ubyte(ia32_modrm(MOD_DISP8, dest, src_base)); - jit->write_byte(val); - } - - inline void IA32_Lea_DispRegImm32(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src_base, jit_int32_t val) - { - jit->write_ubyte(IA32_LEA_REG_MEM); - jit->write_ubyte(ia32_modrm(MOD_DISP32, dest, src_base)); - jit->write_int32(val); - } - - inline void IA32_Lea_DispRegImmAuto(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src_base, jit_int32_t val) - { - if (val >= SCHAR_MIN && val <= SCHAR_MAX) - IA32_Lea_DispRegImm8(jit, dest, src_base, static_cast(val)); - else - IA32_Lea_DispRegImm32(jit, dest, src_base, val); - } - - /** - * Stack Instructions - */ - - inline void IA32_Pop_Reg(JitWriter *jit, jit_uint8_t reg) - { - jit->write_ubyte(IA32_POP_REG+reg); - } - - inline void IA32_Push_Reg(JitWriter *jit, jit_uint8_t reg) - { - jit->write_ubyte(IA32_PUSH_REG+reg); - } - - inline void IA32_Push_Imm8(JitWriter *jit, jit_int8_t val) - { - jit->write_ubyte(IA32_PUSH_IMM8); - jit->write_byte(val); - } - - inline void IA32_Push_Imm32(JitWriter *jit, jit_int32_t val) - { - jit->write_ubyte(IA32_PUSH_IMM32); - jit->write_int32(val); - } - - inline void IA32_Pushad(JitWriter *jit) - { - jit->write_ubyte(IA32_PUSHAD); - } - - inline void IA32_Popad(JitWriter *jit) - { - jit->write_ubyte(IA32_POPAD); - } - - inline void IA32_Push_Rm_Disp8(JitWriter *jit, jit_uint8_t reg, jit_int8_t disp8) - { - jit->write_ubyte(IA32_PUSH_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 6, reg)); - jit->write_byte(disp8); - } - - inline void IA32_Push_Rm_Disp32(JitWriter *jit, jit_uint8_t reg, jit_int32_t disp32) - { - jit->write_ubyte(IA32_PUSH_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP32, 6, reg)); - jit->write_int32(disp32); - } - - inline void IA32_Push_Rm_DispAuto(JitWriter *jit, jit_uint8_t reg, jit_int32_t disp) - { - if (disp >= SCHAR_MIN && disp <= SCHAR_MAX) - IA32_Push_Rm_Disp8(jit, reg, static_cast(disp)); - else - IA32_Push_Rm_Disp32(jit, reg, disp); - } - - inline void IA32_Push_Rm_Disp8_ESP(JitWriter *jit, jit_int8_t disp8) - { - jit->write_ubyte(IA32_PUSH_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 6, REG_SIB)); - jit->write_ubyte(ia32_sib(NOSCALE, REG_NOIDX, REG_ESP)); - jit->write_byte(disp8); - } - - /** - * Moving from REGISTER/MEMORY to REGISTER - */ - - inline void IA32_Mov_Reg_Rm(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_MOV_REG_RM); - jit->write_ubyte(ia32_modrm(mode, dest, src)); - } - - inline void IA32_Mov_Reg8_Rm8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_MOV_REG8_RM8); - jit->write_ubyte(ia32_modrm(mode, dest, src)); - } - - inline void IA32_Mov_Reg_RmESP(JitWriter *jit, jit_uint8_t dest) - { - jit->write_ubyte(IA32_MOV_REG_RM); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, dest, REG_ESP)); - jit->write_ubyte(ia32_sib(NOSCALE, REG_NOIDX, REG_ESP)); - } - - inline void IA32_Mov_Reg_Rm_Disp8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int8_t disp) - { - jit->write_ubyte(IA32_MOV_REG_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP8, dest, src)); - jit->write_byte(disp); - } - - inline void IA32_Mov_Reg8_Rm8_Disp8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int8_t disp) - { - jit->write_ubyte(IA32_MOV_REG8_RM8); - jit->write_ubyte(ia32_modrm(MOD_DISP8, dest, src)); - jit->write_byte(disp); - } - - inline void IA32_Mov_Reg_Esp_Disp8(JitWriter *jit, jit_uint8_t dest, jit_int8_t disp) - { - jit->write_ubyte(IA32_MOV_REG_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP8, dest, REG_SIB)); - jit->write_ubyte(ia32_sib(NOSCALE, REG_NOIDX, REG_ESP)); - jit->write_byte(disp); - } - - inline void IA32_Mov_Reg_Rm_Disp32(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int32_t disp) - { - jit->write_ubyte(IA32_MOV_REG_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP32, dest, src)); - jit->write_int32(disp); - } - - inline void IA32_Mov_Reg8_Rm8_Disp32(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int32_t disp) - { - jit->write_ubyte(IA32_MOV_REG8_RM8); - jit->write_ubyte(ia32_modrm(MOD_DISP32, dest, src)); - jit->write_int32(disp); - } - - inline void IA32_Mov_Reg_Rm_Disp_Reg(JitWriter *jit, - jit_uint8_t dest, - jit_uint8_t src_base, - jit_uint8_t src_index, - jit_uint8_t src_scale) - { - jit->write_ubyte(IA32_MOV_REG_RM); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, dest, REG_SIB)); - jit->write_ubyte(ia32_sib(src_scale, src_index, src_base)); - } - - inline void IA32_Mov_Reg_Rm_Disp_Reg_Disp8(JitWriter *jit, - jit_uint8_t dest, - jit_uint8_t src_base, - jit_uint8_t src_index, - jit_uint8_t src_scale, - jit_int8_t disp8) - { - jit->write_ubyte(IA32_MOV_REG_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP8, dest, REG_SIB)); - jit->write_ubyte(ia32_sib(src_scale, src_index, src_base)); - jit->write_byte(disp8); - } - - inline void IA32_Mov_Reg_RmEBP_Disp_Reg(JitWriter *jit, - jit_uint8_t dest, - jit_uint8_t src_base, - jit_uint8_t src_index, - jit_uint8_t src_scale) - { - jit->write_ubyte(IA32_MOV_REG_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP8, dest, REG_SIB)); - jit->write_ubyte(ia32_sib(src_scale, src_index, src_base)); - jit->write_byte(0); - } - - inline void IA32_Mov_Reg_Rm_DispAuto(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int32_t disp) - { - if (disp == 0) - IA32_Mov_Reg_Rm(jit, dest, src, MOD_MEM_REG); - else if (disp <= SCHAR_MAX) - IA32_Mov_Reg_Rm_Disp8(jit, dest, src, static_cast(disp)); - else - IA32_Mov_Reg_Rm_Disp32(jit, dest, src, disp); - } - - /** - * Moving from REGISTER to REGISTER/MEMORY - */ - - inline void IA32_Mov_Rm_Reg(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_MOV_RM_REG); - jit->write_ubyte(ia32_modrm(mode, src, dest)); - } - - inline void IA32_Mov_Rm8_Reg8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_MOV_RM8_REG8); - jit->write_ubyte(ia32_modrm(mode, src, dest)); - } - - inline void IA32_Mov_Rm8_Reg8_Disp8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int8_t disp) - { - jit->write_ubyte(IA32_MOV_RM8_REG8); - jit->write_ubyte(ia32_modrm(MOD_DISP8, src, dest)); - jit->write_byte(disp); - } - - inline void IA32_Mov_Rm8_Reg8_Disp32(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int32_t disp) - { - jit->write_ubyte(IA32_MOV_RM8_REG8); - jit->write_ubyte(ia32_modrm(MOD_DISP32, src, dest)); - jit->write_int32(disp); - } - - inline void IA32_Mov_Rm8_Reg8_DispAuto(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int32_t disp) - { - if (disp >= SCHAR_MIN && disp <= SCHAR_MAX) - IA32_Mov_Rm8_Reg8_Disp8(jit, dest, src, static_cast(disp)); - else - IA32_Mov_Rm8_Reg8_Disp32(jit, dest, src, disp); - } - - inline void IA32_Mov_RmESP_Reg(JitWriter *jit, jit_uint8_t src) - { - jit->write_ubyte(IA32_MOV_RM_REG); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, src, REG_ESP)); - jit->write_ubyte(ia32_sib(NOSCALE, REG_NOIDX, REG_ESP)); - } - - inline void IA32_Mov_Rm_Reg_Disp8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int8_t disp) - { - jit->write_ubyte(IA32_MOV_RM_REG); - jit->write_ubyte(ia32_modrm(MOD_DISP8, src, dest)); - jit->write_byte(disp); - } - - inline void IA32_Mov_Rm_Reg_Disp32(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int32_t disp) - { - jit->write_ubyte(IA32_MOV_RM_REG); - jit->write_ubyte(ia32_modrm(MOD_DISP32, src, dest)); - jit->write_int32(disp); - } - - inline void IA32_Mov_Rm_Reg_DispAuto(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int32_t disp) - { - if (disp >= SCHAR_MIN && disp <= SCHAR_MAX) - IA32_Mov_Rm_Reg_Disp8(jit, dest, src, static_cast(disp)); - else - IA32_Mov_Rm_Reg_Disp32(jit, dest, src, disp); - } - - inline void IA32_Mov_RmEBP_Reg_Disp_Reg(JitWriter *jit, - jit_uint8_t dest_base, - jit_uint8_t dest_index, - jit_uint8_t dest_scale, - jit_uint8_t src) - { - jit->write_ubyte(IA32_MOV_RM_REG); - jit->write_ubyte(ia32_modrm(MOD_DISP8, src, REG_SIB)); - jit->write_ubyte(ia32_sib(dest_scale, dest_index, dest_base)); - jit->write_byte(0); - } - - inline void IA32_Mov_Rm8EBP_Reg_Disp_Reg(JitWriter *jit, - jit_uint8_t dest_base, - jit_uint8_t dest_index, - jit_uint8_t dest_scale, - jit_uint8_t src) - { - jit->write_ubyte(IA32_MOV_RM8_REG); - jit->write_ubyte(ia32_modrm(MOD_DISP8, src, REG_SIB)); - jit->write_ubyte(ia32_sib(dest_scale, dest_index, dest_base)); - jit->write_byte(0); - } - - inline void IA32_Mov_Rm16EBP_Reg_Disp_Reg(JitWriter *jit, - jit_uint8_t dest_base, - jit_uint8_t dest_index, - jit_uint8_t dest_scale, - jit_uint8_t src) - { - jit->write_ubyte(IA32_16BIT_PREFIX); - jit->write_ubyte(IA32_MOV_RM_REG); - jit->write_ubyte(ia32_modrm(MOD_DISP8, src, REG_SIB)); - jit->write_ubyte(ia32_sib(dest_scale, dest_index, dest_base)); - jit->write_byte(0); - } - - /** - * Moving from IMMEDIATE to REGISTER - */ - - inline jitoffs_t IA32_Mov_Reg_Imm32(JitWriter *jit, jit_uint8_t dest, jit_int32_t num) - { - jitoffs_t offs; - jit->write_ubyte(IA32_MOV_REG_IMM+dest); - offs = jit->get_outputpos(); - jit->write_int32(num); - return offs; - } - - inline void IA32_Mov_Rm_Imm32(JitWriter *jit, jit_uint8_t dest, jit_int32_t val, jit_uint8_t mode) - { - jit->write_ubyte(IA32_MOV_RM_IMM32); - jit->write_ubyte(ia32_modrm(mode, 0, dest)); - jit->write_int32(val); - } - - inline void IA32_Mov_Rm_Imm32_Disp8(JitWriter *jit, - jit_uint8_t dest, - jit_int32_t val, - jit_int8_t disp8) - { - jit->write_ubyte(IA32_MOV_RM_IMM32); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 0, dest)); - jit->write_byte(disp8); - jit->write_int32(val); - } - - inline void IA32_Mov_Rm_Imm32_Disp32(JitWriter *jit, - jit_uint8_t dest, - jit_int32_t val, - jit_int32_t disp32) - { - jit->write_ubyte(IA32_MOV_RM_IMM32); - jit->write_ubyte(ia32_modrm(MOD_DISP32, 0, dest)); - jit->write_int32(disp32); - jit->write_int32(val); - } - - inline void IA32_Mov_RmEBP_Imm32_Disp_Reg(JitWriter *jit, - jit_uint8_t dest_base, - jit_uint8_t dest_index, - jit_uint8_t dest_scale, - jit_int32_t val) - { - jit->write_ubyte(IA32_MOV_RM_IMM32); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 0, REG_SIB)); - jit->write_ubyte(ia32_sib(dest_scale, dest_index, dest_base)); - jit->write_byte(0); - jit->write_int32(val); - } - - inline void IA32_Mov_ESP_Disp8_Imm32(JitWriter *jit, jit_int8_t disp8, jit_int32_t val) - { - jit->write_ubyte(IA32_MOV_RM_IMM32); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 0, REG_SIB)); - jit->write_ubyte(ia32_sib(NOSCALE, REG_NOIDX, REG_ESP)); - jit->write_byte(disp8); - jit->write_int32(val); - } - - /** - * Floating Point Instructions - */ - - inline void IA32_Fstcw_Mem16_ESP(JitWriter *jit) - { - jit->write_ubyte(IA32_FSTCW_MEM16_1); - jit->write_ubyte(IA32_FSTCW_MEM16_2); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, 7, REG_SIB)); - jit->write_ubyte(ia32_sib(NOSCALE, REG_NOIDX, REG_ESP)); - } - - inline void IA32_Fldcw_Mem16_ESP(JitWriter *jit) - { - jit->write_ubyte(IA32_FLDCW_MEM16); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, 5, REG_SIB)); - jit->write_ubyte(ia32_sib(NOSCALE, REG_NOIDX, REG_ESP)); - } - - inline void IA32_Fldcw_Mem16_Disp8_ESP(JitWriter *jit, jit_int8_t disp8) - { - jit->write_ubyte(IA32_FLDCW_MEM16); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 5, REG_SIB)); - jit->write_ubyte(ia32_sib(NOSCALE, REG_NOIDX, REG_ESP)); - jit->write_byte(disp8); - } - - inline void IA32_Fistp_Mem32_ESP(JitWriter *jit) - { - jit->write_ubyte(IA32_FISTP_MEM32); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, 3, REG_SIB)); - jit->write_ubyte(ia32_sib(NOSCALE, REG_NOIDX, REG_ESP)); - } - - inline void IA32_Fistp_Mem32_Disp8_Esp(JitWriter *jit, jit_int8_t disp8) - { - jit->write_ubyte(IA32_FISTP_MEM32); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 3, REG_SIB)); - jit->write_ubyte(ia32_sib(NOSCALE, REG_NOIDX, REG_ESP)); - jit->write_byte(disp8); - } - - inline void IA32_Fucomip_ST0_FPUreg(JitWriter *jit, jit_uint8_t reg) - { - jit->write_ubyte(IA32_FUCOMIP_1); - jit->write_ubyte(IA32_FUCOMIP_2+reg); - } - - inline void IA32_Fadd_FPUreg_ST0(JitWriter *jit, jit_uint8_t reg) - { - jit->write_ubyte(IA32_FADD_FPREG_ST0_1); - jit->write_ubyte(IA32_FADD_FPREG_ST0_2+reg); - } - - inline void IA32_Fadd_Mem32_Disp8(JitWriter *jit, jit_uint8_t src, jit_int8_t val) - { - jit->write_ubyte(IA32_FADD_MEM32); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 0, src)); - jit->write_byte(val); - } - - inline void IA32_Fadd_Mem32_ESP(JitWriter *jit) - { - jit->write_ubyte(IA32_FADD_MEM32); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, 0, REG_SIB)); - jit->write_ubyte(ia32_sib(NOSCALE, REG_NOIDX, REG_ESP)); - } - - inline void IA32_Fsub_Mem32_Disp8(JitWriter *jit, jit_uint8_t src, jit_int8_t val) - { - jit->write_ubyte(IA32_FSUB_MEM32); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 4, src)); - jit->write_byte(val); - } - - inline void IA32_Fmul_Mem32_Disp8(JitWriter *jit, jit_uint8_t src, jit_int8_t val) - { - jit->write_ubyte(IA32_FMUL_MEM32); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 1, src)); - jit->write_byte(val); - } - - inline void IA32_Fdiv_Mem32_Disp8(JitWriter *jit, jit_uint8_t src, jit_int8_t val) - { - jit->write_ubyte(IA32_FDIV_MEM32); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 6, src)); - jit->write_byte(val); - } - - inline void IA32_Fild_Mem32(JitWriter *jit, jit_uint8_t src) - { - jit->write_ubyte(IA32_FILD_MEM32); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, 0, src)); - } - - inline void IA32_Fstp_Mem32(JitWriter *jit, jit_uint8_t dest) - { - jit->write_ubyte(IA32_FSTP_MEM32); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, 3, dest)); - } - - inline void IA32_Fstp_Mem32_DispAuto(JitWriter *jit, jit_uint8_t dest, jit_int32_t disp) - { - jit->write_ubyte(IA32_FSTP_MEM32); - - if (disp > SCHAR_MIN && disp < SCHAR_MAX) - { - jit->write_ubyte(ia32_modrm(MOD_DISP8, 3, dest)); - jit->write_byte(static_cast(disp)); - } - else - { - jit->write_ubyte(ia32_modrm(MOD_DISP32, 3, dest)); - jit->write_byte(disp); - } - } - - inline void IA32_Fstp_Mem64(JitWriter *jit, jit_uint8_t dest) - { - jit->write_ubyte(IA32_FSTP_MEM64); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, 3, dest)); - } - - inline void IA32_Fstp_Mem64_DispAuto(JitWriter *jit, jit_uint8_t dest, jit_int32_t disp) - { - jit->write_ubyte(IA32_FSTP_MEM64); - - if (disp > SCHAR_MIN && disp < SCHAR_MAX) - { - jit->write_ubyte(ia32_modrm(MOD_DISP8, 3, dest)); - jit->write_byte(static_cast(disp)); - } - else - { - jit->write_ubyte(ia32_modrm(MOD_DISP32, 3, dest)); - jit->write_byte(disp); - } - } - - inline void IA32_Fstp_Mem32_ESP(JitWriter *jit) - { - jit->write_ubyte(IA32_FSTP_MEM32); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, 3, REG_SIB)); - jit->write_ubyte(ia32_sib(NOSCALE, REG_NOIDX, REG_ESP)); - } - - inline void IA32_Fstp_Mem64_ESP(JitWriter *jit) - { - jit->write_ubyte(IA32_FSTP_MEM64); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, 3, REG_SIB)); - jit->write_ubyte(ia32_sib(NOSCALE, REG_NOIDX, REG_ESP)); - } - - inline void IA32_Fstp_FPUreg(JitWriter *jit, jit_uint8_t reg) - { - jit->write_ubyte(IA32_FSTP_FPREG_1); - jit->write_ubyte(IA32_FSTP_FPREG_2+reg); - } - - inline void IA32_Fld_Mem32(JitWriter *jit, jit_uint8_t src) - { - jit->write_ubyte(IA32_FLD_MEM32); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, 0, src)); - } - - inline void IA32_Fld_Mem64(JitWriter *jit, jit_uint8_t src) - { - jit->write_ubyte(IA32_FLD_MEM64); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, 0, src)); - } - - inline void IA32_Fld_Mem32_Disp8(JitWriter *jit, jit_uint8_t src, jit_int8_t val) - { - jit->write_ubyte(IA32_FLD_MEM32); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 0, src)); - jit->write_byte(val); - } - - inline void IA32_Fld_Mem64_Disp8(JitWriter *jit, jit_uint8_t src, jit_int8_t val) - { - jit->write_ubyte(IA32_FLD_MEM64); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 0, src)); - jit->write_byte(val); - } - - inline void IA32_Fld_Mem32_Disp32(JitWriter *jit, jit_uint8_t src, jit_int32_t val) - { - jit->write_ubyte(IA32_FLD_MEM32); - jit->write_ubyte(ia32_modrm(MOD_DISP32, 0, src)); - jit->write_int32(val); - } - - inline void IA32_Fld_Mem64_Disp32(JitWriter *jit, jit_uint8_t src, jit_int32_t val) - { - jit->write_ubyte(IA32_FLD_MEM64); - jit->write_ubyte(ia32_modrm(MOD_DISP32, 0, src)); - jit->write_int32(val); - } - - inline void IA32_Fld_Mem32_DispAuto(JitWriter *jit, jit_uint8_t src, jit_int32_t disp) - { - if (disp == 0) - IA32_Fld_Mem32(jit, src); - else if (disp <= SCHAR_MAX) - IA32_Fld_Mem32_Disp8(jit, src, static_cast(disp)); - else - IA32_Fld_Mem32_Disp32(jit, src, disp); - } - - inline void IA32_Fld_Mem64_DispAuto(JitWriter *jit, jit_uint8_t src, jit_int32_t disp) - { - if (disp == 0) - IA32_Fld_Mem64(jit, src); - else if (disp <= SCHAR_MAX) - IA32_Fld_Mem64_Disp8(jit, src, static_cast(disp)); - else - IA32_Fld_Mem64_Disp32(jit, src, disp); - } - - /** - * Move data with zero extend - */ - - inline void IA32_Movzx_Reg32_Rm8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_MOVZX_R32_RM8_1); - jit->write_ubyte(IA32_MOVZX_R32_RM8_2); - jit->write_ubyte(ia32_modrm(mode, dest, src)); - } - - inline void IA32_Movzx_Reg32_Rm8_Disp8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int8_t disp) - { - jit->write_ubyte(IA32_MOVZX_R32_RM8_1); - jit->write_ubyte(IA32_MOVZX_R32_RM8_2); - jit->write_ubyte(ia32_modrm(MOD_DISP8, dest, src)); - jit->write_byte(disp); - } - - inline void IA32_Movzx_Reg32_Rm8_Disp32(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int32_t disp) - { - jit->write_ubyte(IA32_MOVZX_R32_RM8_1); - jit->write_ubyte(IA32_MOVZX_R32_RM8_2); - jit->write_ubyte(ia32_modrm(MOD_DISP32, dest, src)); - jit->write_int32(disp); - } - - inline void IA32_Movzx_Reg32_Rm8_DispAuto(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int32_t disp) - { - if (disp >= SCHAR_MIN && disp <= SCHAR_MAX) - IA32_Movzx_Reg32_Rm8_Disp8(jit, dest, src, static_cast(disp)); - else - IA32_Movzx_Reg32_Rm8_Disp32(jit, dest, src, disp); - } - - inline void IA32_Movzx_Reg32_Rm16(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_MOVZX_R32_RM16_1); - jit->write_ubyte(IA32_MOVZX_R32_RM16_2); - jit->write_ubyte(ia32_modrm(mode, dest, src)); - } - - inline void IA32_Movzx_Reg32_Rm16_Disp8(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int8_t disp) - { - jit->write_ubyte(IA32_MOVZX_R32_RM16_1); - jit->write_ubyte(IA32_MOVZX_R32_RM16_2); - jit->write_ubyte(ia32_modrm(MOD_DISP8, dest, src)); - jit->write_byte(disp); - } - - inline void IA32_Movzx_Reg32_Rm16_Disp32(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int32_t disp) - { - jit->write_ubyte(IA32_MOVZX_R32_RM16_1); - jit->write_ubyte(IA32_MOVZX_R32_RM16_2); - jit->write_ubyte(ia32_modrm(MOD_DISP32, dest, src)); - jit->write_int32(disp); - } - - inline void IA32_Movzx_Reg32_Rm16_DispAuto(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_int32_t disp) - { - if (disp >= SCHAR_MIN && disp <= SCHAR_MAX) - IA32_Movzx_Reg32_Rm16_Disp8(jit, dest, src, static_cast(disp)); - else - IA32_Movzx_Reg32_Rm16_Disp32(jit, dest, src, disp); - } - - /** - * Branching/Jumping - */ - - inline jitoffs_t IA32_Jump_Cond_Imm8(JitWriter *jit, jit_uint8_t cond, jit_int8_t disp) - { - jitoffs_t ptr; - jit->write_ubyte(IA32_JCC_IMM+cond); - ptr = jit->get_outputpos(); - jit->write_byte(disp); - return ptr; - } - - inline jitoffs_t IA32_Jump_Imm32(JitWriter *jit, jit_int32_t disp) - { - jitoffs_t ptr; - jit->write_ubyte(IA32_JMP_IMM32); - ptr = jit->get_outputpos(); - jit->write_int32(disp); - return ptr; - } - - inline jitoffs_t IA32_Jump_Imm8(JitWriter *jit, jit_int8_t disp) - { - jitoffs_t ptr; - jit->write_ubyte(IA32_JMP_IMM8); - ptr = jit->get_outputpos(); - jit->write_byte(disp); - return ptr; - } - - inline jitoffs_t IA32_Jump_Cond_Imm32(JitWriter *jit, jit_uint8_t cond, jit_int32_t disp) - { - jitoffs_t ptr; - jit->write_ubyte(IA32_JCC_IMM32_1); - jit->write_ubyte(IA32_JCC_IMM32_2+cond); - ptr = jit->get_outputpos(); - jit->write_int32(disp); - return ptr; - } - - inline void IA32_Jump_Reg(JitWriter *jit, jit_uint8_t reg) - { - jit->write_ubyte(IA32_JMP_RM); - jit->write_ubyte(ia32_modrm(MOD_REG, 4, reg)); - } - - inline void IA32_Jump_Rm(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode) - { - jit->write_ubyte(IA32_JMP_RM); - jit->write_ubyte(ia32_modrm(mode, 4, reg)); - } - - inline jitoffs_t IA32_Call_Imm32(JitWriter *jit, jit_int32_t disp) - { - jitoffs_t ptr; - jit->write_ubyte(IA32_CALL_IMM32); - ptr = jit->get_outputpos(); - jit->write_int32(disp); - return ptr; - } - - inline void IA32_Call_Reg(JitWriter *jit, jit_uint8_t reg) - { - jit->write_ubyte(IA32_CALL_RM); - jit->write_ubyte(ia32_modrm(MOD_REG, 2, reg)); - } - - inline void IA32_Call_Rm(JitWriter *jit, jit_uint8_t reg, jit_uint8_t mode) - { - jit->write_ubyte(IA32_CALL_RM); - jit->write_ubyte(ia32_modrm(mode, 4, reg)); - } - - inline void IA32_Return(JitWriter *jit) - { - jit->write_ubyte(IA32_RET); - } - - inline void IA32_Return_Popstack(JitWriter *jit, unsigned short bytes) - { - jit->write_ubyte(IA32_RETN); - jit->write_ushort(bytes); - } - - inline void IA32_Test_Rm_Reg(JitWriter *jit, jit_uint8_t reg1, jit_uint8_t reg2, jit_uint8_t mode) - { - jit->write_ubyte(IA32_TEST_RM_REG); - jit->write_ubyte(ia32_modrm(mode, reg2, reg1)); - } - - inline void IA32_Test_Rm_Reg8(JitWriter *jit, jit_uint8_t reg1, jit_uint8_t reg2, jit_uint8_t mode) - { - jit->write_ubyte(IA32_TEST_RM_REG8); - jit->write_ubyte(ia32_modrm(mode, reg2, reg1)); - } - - inline void IA32_Test_Rm_Imm32(JitWriter *jit, jit_uint8_t operand1, jit_int32_t imm_operand, jit_uint8_t mode) - { - jit->write_ubyte(IA32_TEST_RM_IMM32); - jit->write_ubyte(ia32_modrm(mode, 0, operand1)); - jit->write_int32(imm_operand); - } - - inline void IA32_Cmp_Rm_Reg(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_CMP_RM_REG); - jit->write_ubyte(ia32_modrm(mode, src, dest)); - } - - inline void IA32_Cmp_Reg_Rm(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode) - { - jit->write_ubyte(IA32_CMP_REG_RM); - jit->write_ubyte(ia32_modrm(mode, dest, src)); - } - - inline void IA32_Cmp_Reg_Rm_ESP(JitWriter *jit, jit_uint8_t cmpreg) - { - jit->write_ubyte(IA32_CMP_REG_RM); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, cmpreg, REG_SIB)); - jit->write_ubyte(ia32_sib(NOSCALE, REG_NOIDX, REG_ESP)); - } - - inline void IA32_Cmp_Reg_Rm_Disp8(JitWriter *jit, jit_uint8_t reg1, jit_uint8_t reg2, jit_int8_t disp8) - { - jit->write_ubyte(IA32_CMP_REG_RM); - jit->write_ubyte(ia32_modrm(MOD_DISP8, reg1, reg2)); - jit->write_byte(disp8); - } - - inline void IA32_Cmp_Rm_Imm8(JitWriter *jit, jit_uint8_t mode, jit_uint8_t rm, jit_int8_t imm8) - { - jit->write_ubyte(IA32_CMP_RM_IMM8); - jit->write_ubyte(ia32_modrm(mode, 7, rm)); - jit->write_byte(imm8); - } - - inline void IA32_Cmp_Rm_Imm32(JitWriter *jit, jit_uint8_t mode, jit_uint8_t rm, jit_int32_t imm32) - { - jit->write_ubyte(IA32_CMP_RM_IMM32); - jit->write_ubyte(ia32_modrm(mode, 7, rm)); - jit->write_int32(imm32); - } - - inline void IA32_Cmp_Rm_Imm32_Disp8(JitWriter *jit, jit_uint8_t reg, jit_int8_t disp8, jit_int32_t imm32) - { - jit->write_ubyte(IA32_CMP_RM_IMM32); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 7, reg)); - jit->write_byte(disp8); - jit->write_int32(imm32); - } - - inline void IA32_Cmp_Rm_Disp8_Imm8(JitWriter *jit, jit_uint8_t reg, jit_int8_t disp, jit_int8_t imm8) - { - jit->write_ubyte(IA32_CMP_RM_IMM8); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 7, reg)); - jit->write_byte(disp); - jit->write_byte(imm8); - } - - inline void IA32_Cmp_Al_Imm8(JitWriter *jit, jit_int8_t value) - { - jit->write_ubyte(IA32_CMP_AL_IMM32); - jit->write_byte(value); - } - - inline void IA32_Cmp_Eax_Imm32(JitWriter *jit, jit_int32_t value) - { - jit->write_ubyte(IA32_CMP_EAX_IMM32); - jit->write_int32(value); - } - - inline void IA32_SetCC_Rm8(JitWriter *jit, jit_uint8_t reg, jit_uint8_t cond) - { - jit->write_ubyte(IA32_SETCC_RM8_1); - jit->write_ubyte(IA32_SETCC_RM8_2+cond); - jit->write_ubyte(ia32_modrm(MOD_REG, 0, reg)); - } - - inline void IA32_CmovCC_Rm(JitWriter *jit, jit_uint8_t src, jit_uint8_t cond) - { - jit->write_ubyte(IA32_CMOVCC_RM_1); - jit->write_ubyte(IA32_CMOVCC_RM_2+cond); - jit->write_ubyte(ia32_modrm(MOD_MEM_REG, 0, src)); - } - - inline void IA32_CmovCC_Rm_Disp8(JitWriter *jit, jit_uint8_t src, jit_uint8_t cond, jit_int8_t disp) - { - jit->write_ubyte(IA32_CMOVCC_RM_1); - jit->write_ubyte(IA32_CMOVCC_RM_2+cond); - jit->write_ubyte(ia32_modrm(MOD_DISP8, 0, src)); - jit->write_byte(disp); - } - - inline void IA32_Cmpsb(JitWriter *jit) - { - jit->write_ubyte(IA32_CMPSB); - } - - inline void IA32_Rep(JitWriter *jit) - { - jit->write_ubyte(IA32_REP); - } - - inline void IA32_Movsd(JitWriter *jit) - { - jit->write_ubyte(IA32_MOVSD); - } - - inline void IA32_Movsb(JitWriter *jit) - { - jit->write_ubyte(IA32_MOVSB); - } - - inline void IA32_Stosd(JitWriter *jit) - { - jit->write_ubyte(IA32_STOSD); - } - - inline void IA32_Cld(JitWriter *jit) - { - jit->write_ubyte(IA32_CLD); - } - - } -} - -#endif //_INCLUDE_JIT_X86_MACROS_H diff --git a/metamod-source/core/sourcehook/sourcehook_impl.h b/metamod-source/core/sourcehook/sourcehook_impl.h deleted file mode 100644 index f9ef068f..00000000 --- a/metamod-source/core/sourcehook/sourcehook_impl.h +++ /dev/null @@ -1,392 +0,0 @@ -/* ======== SourceHook ======== -* vim: set ts=4 sw=4 tw=99 noet: -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#ifndef __SOURCEHOOK_IMPL_H__ -#define __SOURCEHOOK_IMPL_H__ - -#include "sourcehook.h" -#include "sh_memory.h" -#include "sh_list.h" -#include "sh_vector.h" -#include "sh_tinyhash.h" -#include "sh_stack.h" - -/* - -IMPLEMENTATION INFO - ---------------------------------------- - :TODO: update ??? - -Protos ("Prototypes") - The purpose of protos is to provide the amount of type information about a function - which is required to be able to execute a function call without corrupting the stack. - Our protos do not fully do this, but they provide the size of the return value, the number of - parameters, and the size of each parameter, which is enough for most situations. - - There are two version of protos: - OLD: - C-Style strings. - - 0_void: - "attrib" - 1_void: - "attrib|param1_type" - 2_void: - "attrib|param1_type|param2_type - 0: - "attrib|ret_type" - 1: - "attrib|ret_type|param1_type" - 2: - "attrib|ret_type|param2_type" - - Old protos are deprecated. - - NEW: - New protos are in fact pointers to the ProtoInfo structure (see sourcehook.h) - - Old protos begin with a non-zero byte, new protos begin with a zero byte. - - Protos are usually stored in a CProto instance. - ---------------------------------------- -Hook managers and hook manager containers - Each hookman container is tied to _one_ proto/vtable index/vtable offset info. - Hookman containers then contain a list of hook managers provided by plugins, sorted by version. - (higher versions come first) - - Duplicate hook managers are ignored (ie. hook managers where proto, vtable index, vtable offset, - plugin, version are the same as in an already exisiting hook manager) - - A new hook manager is always added to the end of the version group in the corresponding - hook container. - - If the new hook manager was added to the beginning of the container (which only happens if - it is the first one or if it has a higher version than the previously first hook manager), - the now second hook manager is shut down and the new hook manager takes its job. - - A "hook manager container id" (HMCI) consits of three values: proto, vtbl index, vtbl offset. ---------------------------------------- -Hooks - When adding a hook, first the proposed hook manager is added to the corresponding - hook manager container as described above. - - Then the first hook manager in the the manhook container is chosen to handle the function. - - Removing a hook does not neccessarily unreigster the plugin's hook manager. In order to do this, - use RemoveHookManager or UnloadPlugin/ - - Hooks can be paused - they remain in memory but they are not called. In SH, the hook iterator - classes handle pausing transparently. - - The hook loop is supposed to call ShouldContinue before each iteration. This makes hook handlers - able to remove themselves. - ---------------------------------------- -Call classes - - !! deprecated !! - see below (new SH_CALL) - - Call classes are identified by a this pointer and an instance size - - We use the instance size because a derived class instance and a base class instance could - have the same this pointers, and we want to avoid that the derived class - (which could be bigger) gets the same callclass as the base class (mainly if the - base class' callclass was requested first). - - Call classes are reference counted. - - The original function pointers are stored in a vector (in order to allow fast random access). - These vectors are stored as the value type of a hash. The key type is int and represents the - vtable offset. - - If the hash key doesn't exist or the vtblidx is out of range or the corresponding element in the - vector is NULL, there is no hook on that function. - ---------------------------------------- -Recalls - Recalls are used for the META_RETURN_(VALUE_)NEWPARAMS macros, ie. to change the parameters - in the hook loop on the fly. - - First, the macro calls DoRecall(), then it calls the function the hook is attached to -> it - calls the hookfunc. SourceHook makes sure that the newly invoked hook loop starts where the last - one left off and that status variables like status, previous result, override return are kept. - When this recurisvely called hookfunc returns, the macro returns what it returned - (using MRES_SUPERCEDE). CSourceHookImpl returns false from ShouldContinue so the original hook loop - is abandonned. - -Post Recalls - People wanted to be able to use META_RETURN_(VALUE_)NEWPARAMS from post hooks as well. Crazy people! - Anyway, for this, we have to know where a hook handler is. Is it executing pre or post hooks at the moment? - The only way we can know this is watching when it calls CHookList::GetIter(). So CHookList gets a new variable: - m_RequestedFlag. It also gets two new functions: RQFlagReset() and RQFlagGet(). - HookLoopBegin() calls RQFlagReset on both hooklists of the iface; then DoRecall() checks whether the postlist's - RQ flag is set. if yes, the hook loop is in post mode. - - So, what a about a recall in post mode? The first ShouldContinue returns false and sets Status to supercede. - This way the pre hooks and the function call will be skipped. Then, then next ShouldContinue returns true, so we get - into the post hooks. HA! - -Return Values in Post Recalls - The easy case is when we already have an override return value. In this case, the status register gets transferred, - and so does the override return pointer. So, basically, everything is ok. - - However, what happens if we don't? ie. the status register is on MRES_IGNORED? In this case we'd have to transfer the - orig ret value. But we can't: There's no way to tell the hookfunc: "Use this as orig ret pointer". It uses its own. - So, we emulate it. GetOrigRet will return the orig ret pointer from the old hook loop. If still no one overrides it, - we'd have to return it. BUT! HOW TO DO THIS? Check out SH_RETURN(). First calls HookLoopEnd(), then decides whether - to return the override retval or the orig retval. But it doesn't ask for a new override return. So we give the function - the last orig return value as its new override return value; but leave status where it is so everything works, and in - HookLoopEnd we make sure that status is high enough so that the override return will be returned. crazy. - - All this stuff could be much less complicated if I didn't try to preserve binary compatibility :) - -VP Hooks - VP hooks are hooks which are called on a vfnptr, regardless of the this pointer with which it was called. They are - implemented as a special CIface instance with m_Ptr = NULL. All Hook Lists have a new "ListCatIterator" which - virtually concatenates the NULL-interface-hook-list with their normal hook list. - - - I'm afraid that with the addition of Recalls and VP Hooks, SourceHook is now a pretty complex and hacked-together - binary compatible beast which is pretty hard to maintain unless you've written it :) - -New SH_CALL - The addition of VP hooks messed up the Call Classes concept (see above) - call classes are bound to an - instance pointer; they only work on one of the hooked instances. But VP hooks are called on all instances. - - That's why now, SH_CALL takes an instance pointer instead of a callclass pointer. It basically does this: - 1) call SH_GLOB_PTR->SetIgnoreHooks(vfnptr) - 2) call this->*mfp - 3) call SH_GLOB_PTR->ResetIgnoreHooks(vfnptr) - - SourceHook stroes the "ignored vfnptr" and makes CVfnPtr::FindIface return NULL if the CVfnPtr instance - corresponds to the ignored vfnptr. This way the hook manager thinks that the instance isn't hooked, and calls - the original function. Everything works fine. This works even for VP hooks. -*/ - -#include "sourcehook_impl_cproto.h" -#include "sourcehook_impl_chookmaninfo.h" -#include "sourcehook_impl_chook.h" -#include "sourcehook_impl_ciface.h" -#include "sourcehook_impl_cvfnptr.h" -#include "sourcehook_impl_chookidman.h" - -namespace SourceHook -{ - /** - * @brief The SourceHook implementation - */ - - namespace Impl - { - struct CHookContext : IHookContext - { - CHookContext() : m_CleanupTask(NULL) - { - } - - enum State - { - State_Born, - State_Pre, - State_PreVP, - State_Post, - State_PostVP, - State_OrigCall, - State_Dead, - - // Special - State_Ignore, - State_Recall_Pre, - State_Recall_PreVP, - State_Recall_Post, - State_Recall_PostVP - }; - - int m_State; - List::iterator m_Iter; - - CVfnPtr *pVfnPtr; - CIface *pIface; - - META_RES *pStatus; - META_RES *pPrevRes; - META_RES *pCurRes; - - void *pThisPtr; - const void *pOrigRet; - void *pOverrideRet; - void *pIfacePtr; - - bool m_CallOrig; - - ICleanupTask *m_CleanupTask; - - void SkipPaused(List::iterator &iter, List &list) - { - while (iter != list.end() && iter->IsPaused()) - ++iter; - } - public: - void HookRemoved(List::iterator oldhookiter, List::iterator nexthookiter); - void IfaceRemoved(CIface *iface); - void VfnPtrRemoved(CVfnPtr *vfnptr); - - ISHDelegate *GetNext(); - void *GetOverrideRetPtr(); - const void *GetOrigRetPtr(); - bool ShouldCallOrig(); - void DoCleanupTaskAndDeleteIt(); - }; - - class CVfnPtrList : public List - { - public: - CVfnPtr *GetVfnPtr(void *p); - }; - - typedef CStack HookContextStack; - - class UnloadListener - { - public: - virtual void ReadyToUnload(Plugin plug) = 0; - }; - - class PendingUnload - { - UnloadListener *listener_; - Plugin plug_; - bool deactivated_; - - public: - PendingUnload(UnloadListener *listener, Plugin plug) - : listener_(listener), plug_(plug), deactivated_(false) - { } - - Plugin plugin() const - { - return plug_; - } - - UnloadListener *listener() const - { - return listener_; - } - - void deactivate() - { - deactivated_ = true; - } - bool deactivated() const - { - return deactivated_; - } - }; - - class CSourceHookImpl : public ISourceHook - { - private: - CHookManList m_HookManList; - CVfnPtrList m_VfnPtrs; - CHookIDManager m_HookIDMan; - HookContextStack m_ContextStack; - List m_PendingUnloads; - - bool SetHookPaused(int hookid, bool paused); - CHookManList::iterator RemoveHookManager(CHookManList::iterator iter); - List::iterator RevertAndRemoveVfnPtr(List::iterator vfnptr_iter); - public: - CSourceHookImpl(); - virtual ~CSourceHookImpl(); - - /** - * @brief Returns the interface version - */ - int GetIfaceVersion(); - - /** - * @brief Returns the implemnetation version - */ - int GetImplVersion(); - - int AddHook(Plugin plug, AddHookMode mode, void *iface, int thisptr_offs, HookManagerPubFunc myHookMan, - ISHDelegate *handler, bool post); - - bool RemoveHook(Plugin plug, void *iface, int thisptr_offs, HookManagerPubFunc myHookMan, - ISHDelegate *handler, bool post); - - bool RemoveHookByID(int hookid); - - bool PauseHookByID(int hookid); - bool UnpauseHookByID(int hookid); - - void SetRes(META_RES res); //!< Sets the meta result - META_RES GetPrevRes(); //!< Gets the meta result of the - //!< previously calledhandler - META_RES GetStatus(); //!< Gets the highest meta result - const void *GetOrigRet(); //!< Gets the original result. - //!< If not in post function, undefined - const void *GetOverrideRet(); //!< Gets the override result. - //!< If none is specified, NULL - void *GetIfacePtr(); //!< Gets the interface pointer - - void *GetOverrideRetPtr(); //!< Used for setting the override return value - - /* - * @brief Make sure that a plugin is not used by any - * other plugins anymore, and unregister all its hook - * managers. If any hooks owned by this plugin are - * still on the callstack, defers notifying the listener - * until the count has dropped to 0. - */ - void UnloadPlugin(Plugin plug, UnloadListener *listener); - - void ResolvePendingUnloads(bool force = false); - - void RemoveHookManager(Plugin plug, HookManagerPubFunc pubFunc); - - void SetIgnoreHooks(void *vfnptr); - void ResetIgnoreHooks(void *vfnptr); - - void DoRecall(); - - IHookContext *SetupHookLoop(IHookManagerInfo *hi, void *vfnptr, void *thisptr, void **origCallAddr, META_RES *statusPtr, - META_RES *prevResPtr, META_RES *curResPtr, const void *origRetPtr, void *overrideRetPtr); - - void EndContext(IHookContext *pCtx); - - void *GetOrigVfnPtrEntry(void *vfnptr); - - /** - * @brief Shut down the whole system, unregister all hook managers - */ - void CompleteShutdown(); - - /** - * @brief Pauses all hooks of a plugin - * - * @param plug The unique identifier of the plugin - */ - void PausePlugin(Plugin plug); - - /** - * @brief Unpauses all hooks of a plugin - * - * @param plug The unique identifier of the plugin - */ - void UnpausePlugin(Plugin plug); - }; - } -} - -#endif diff --git a/metamod-source/core/sourcehook/sourcehook_impl_chook.h b/metamod-source/core/sourcehook/sourcehook_impl_chook.h deleted file mode 100644 index 86b8cf07..00000000 --- a/metamod-source/core/sourcehook/sourcehook_impl_chook.h +++ /dev/null @@ -1,106 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#ifndef __SOURCEHOOK_IMPL_CHOOK_H__ -#define __SOURCEHOOK_IMPL_CHOOK_H__ - -namespace SourceHook -{ - namespace Impl - { - class CHook - { - // *** Data *** - Plugin m_OwnerPlugin; - int m_ThisPointerOffset; - ISHDelegate *m_pHandler; - int m_HookID; - bool m_Paused; - public: - - // *** Descriptor *** - struct Descriptor - { - Plugin m_OwnerPlugin; - int m_ThisPointerOffset; - ISHDelegate *m_pHandler; - - Descriptor(Plugin ownerPlugin, int thisPtrOffset, ISHDelegate *pHandler) - : m_OwnerPlugin(ownerPlugin), m_ThisPointerOffset(thisPtrOffset), - m_pHandler(pHandler) - { - } - }; - - // *** Interface *** - inline CHook(Plugin ownerPlugin, int thisPtrOffset, ISHDelegate *pHandler, int hookid, bool paused=false); - inline bool operator==(const Descriptor &other) const; - inline bool operator==(int hookid) const; - inline Plugin GetOwnerPlugin() const; - inline int GetThisPointerOffset() const; - inline ISHDelegate *GetHandler() const; - inline void SetPaused(bool value); - inline bool IsPaused() const; - inline int GetID() const; - }; - - // *** Implementation *** - inline CHook::CHook(Plugin ownerPlugin, int thisPtrOffset, ISHDelegate *pHandler, int hookid, bool paused) - : m_OwnerPlugin(ownerPlugin), m_ThisPointerOffset(thisPtrOffset), - m_pHandler(pHandler), m_HookID(hookid), m_Paused(paused) - { - } - - inline bool CHook::operator==(const Descriptor &other) const - { - return m_OwnerPlugin == other.m_OwnerPlugin - && m_ThisPointerOffset == other.m_ThisPointerOffset - && m_pHandler == other.m_pHandler; - } - - inline bool CHook::operator==(int hookid) const - { - return m_HookID == hookid; - } - - inline Plugin CHook::GetOwnerPlugin() const - { - return m_OwnerPlugin; - } - - inline int CHook::GetThisPointerOffset() const - { - return m_ThisPointerOffset; - } - - inline ISHDelegate *CHook::GetHandler() const - { - return m_pHandler; - } - - inline void CHook::SetPaused(bool value) - { - m_Paused = value; - } - - inline bool CHook::IsPaused() const - { - return m_Paused; - } - - inline int CHook::GetID() const - { - return m_HookID; - } - } -} - -#endif - diff --git a/metamod-source/core/sourcehook/sourcehook_impl_chookidman.cpp b/metamod-source/core/sourcehook/sourcehook_impl_chookidman.cpp deleted file mode 100644 index 29a3d09a..00000000 --- a/metamod-source/core/sourcehook/sourcehook_impl_chookidman.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* Contributors: Scott "Damaged Soul" Ehlert -* ============================ -*/ - -#include "sourcehook_impl.h" - -namespace SourceHook -{ - namespace Impl - { - CHookIDManager::CHookIDManager() - { - } - - int CHookIDManager::New(const CProto &proto, int vtbl_offs, int vtbl_idx, void *vfnptr, - void *adjustediface, Plugin plug, int thisptr_offs, ISHDelegate *handler, bool post) - { - Entry tmp(proto, vtbl_offs, vtbl_idx, vfnptr, adjustediface, plug, thisptr_offs, handler, post); - - size_t cursize = m_Entries.size(); - for (size_t i = 0; i < cursize; ++i) - { - if (m_Entries[i].isfree) - { - m_Entries[i] = tmp; - return static_cast(i) + 1; - } - } - - m_Entries.push_back(tmp); - return static_cast(m_Entries.size()); // return size() because hookid = id+1 anyway - } - - bool CHookIDManager::Remove(int hookid) - { - int realid = hookid - 1; - if (realid < 0 || realid >= static_cast(m_Entries.size()) || m_Entries[realid].isfree) - return false; - - m_Entries[realid].isfree = true; - - // :TODO: remove free ids from back sometimes ?? - - return true; - } - - const CHookIDManager::Entry * CHookIDManager::QueryHook(int hookid) - { - int realid = hookid - 1; - if (realid < 0 || realid >= static_cast(m_Entries.size()) || m_Entries[realid].isfree) - return NULL; - - return &m_Entries[realid]; - } - - void CHookIDManager::FindAllHooks(CVector &output, const CProto &proto, int vtbl_offs, - int vtbl_idx, void *adjustediface, Plugin plug, int thisptr_offs, ISHDelegate *handler, bool post) - { - // oh my god, a lot of parameters... - size_t cursize = m_Entries.size(); - for (size_t i = 0; i < cursize; ++i) - { - if (!m_Entries[i].isfree && m_Entries[i].proto == proto && m_Entries[i].vtbl_offs == vtbl_offs && - m_Entries[i].vtbl_idx == vtbl_idx && m_Entries[i].adjustediface == adjustediface && m_Entries[i].plug == plug && - m_Entries[i].thisptr_offs == thisptr_offs && m_Entries[i].handler->IsEqual(handler) && m_Entries[i].post == post) - { - output.push_back(static_cast(i) + 1); - } - } - } - - void CHookIDManager::FindAllHooks(CVector &output) - { - size_t cursize = m_Entries.size(); - for (size_t i = 0; i < cursize; ++i) - { - if (!m_Entries[i].isfree) - output.push_back(static_cast(i) + 1); - } - } - - void CHookIDManager::FindAllHooks(CVector &output, Plugin plug) - { - size_t cursize = m_Entries.size(); - for (size_t i = 0; i < cursize; ++i) - { - if (!m_Entries[i].isfree && m_Entries[i].plug == plug) - output.push_back(static_cast(i) + 1); - } - } - - - void CHookIDManager::RemoveAll(void *vfnptr) - { - size_t cursize = m_Entries.size(); - for (size_t i = 0; i < cursize; ++i) - { - if (!m_Entries[i].isfree && m_Entries[i].vfnptr == vfnptr) - m_Entries[i].isfree = true; - } - } - - } -} diff --git a/metamod-source/core/sourcehook/sourcehook_impl_chookidman.h b/metamod-source/core/sourcehook/sourcehook_impl_chookidman.h deleted file mode 100644 index 19f8d08e..00000000 --- a/metamod-source/core/sourcehook/sourcehook_impl_chookidman.h +++ /dev/null @@ -1,81 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#ifndef __SOURCEHOOK_IMPL_CHOOKIDMAN_H__ -#define __SOURCEHOOK_IMPL_CHOOKIDMAN_H__ - -#include "sh_vector.h" - -namespace SourceHook -{ - namespace Impl - { - // Associates hook ids with info about the hooks - // Also used to keep track of used hook ids - class CHookIDManager - { - public: - struct Entry - { - bool isfree; - - // hookman info - CProto proto; - int vtbl_offs; - int vtbl_idx; - - // vfnptr - void *vfnptr; - - // iface - void* adjustediface; - - // hook - Plugin plug; - int thisptr_offs; - ISHDelegate *handler; - bool post; - - Entry(const CProto &pprt, int pvo, int pvi, void *pvp, void *pai, Plugin pplug, int pto, - ISHDelegate *ph, bool ppost) - : isfree(false), proto(pprt), vtbl_offs(pvo), vtbl_idx(pvi), vfnptr(pvp), - adjustediface(pai), plug(pplug), thisptr_offs(pto), handler(ph), post(ppost) - { - } - Entry() - { - } - }; - private: - // Internally, hookid 1 is stored as m_Entries[0] - - CVector m_Entries; - public: - CHookIDManager(); - int New(const CProto &proto, int vtbl_offs, int vtbl_idx, void *vfnptr, void *adjustediface, - Plugin plug, int thisptr_offs, ISHDelegate *handler, bool post); - bool Remove(int hookid); - const Entry * QueryHook(int hookid); - - // Finds all hooks with the given info, and fills the hookids into output. - void FindAllHooks(CVector &output, const CProto &proto, int vtbl_offs, int vtbl_idx, - void *adjustediface, Plugin plug, int thisptr_offs, ISHDelegate *handler, bool post); - - // Removes all hooks with a specified vfnptr - void RemoveAll(void *vfnptr); - - void FindAllHooks(CVector &output); - void FindAllHooks(CVector &output, Plugin plug); - }; - } -} - -#endif - diff --git a/metamod-source/core/sourcehook/sourcehook_impl_chookmaninfo.cpp b/metamod-source/core/sourcehook/sourcehook_impl_chookmaninfo.cpp deleted file mode 100644 index 639b7a2a..00000000 --- a/metamod-source/core/sourcehook/sourcehook_impl_chookmaninfo.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* Contributors: Scott "Damaged Soul" Ehlert -* ============================ -*/ - -#include "sourcehook_impl.h" - -namespace SourceHook -{ - namespace Impl - { - CHookManager::CHookManager(Plugin ownerPlugin, HookManagerPubFunc pubFunc) - : m_OwnerPlugin(ownerPlugin), m_PubFunc(pubFunc), m_Version(-1) - { - // Query pubfunc - // -> Should call SetInfo and set all the other variables! - if (m_PubFunc(false, this) != 0) - { - // Error! - m_Version = -1; - } - } - - void CHookManager::SetInfo(int hookman_version, int vtbloffs, int vtblidx, - ProtoInfo *proto, void *hookfunc_vfnptr) - { - m_Version = hookman_version; - m_VtblOffs = vtbloffs; - m_VtblIdx = vtblidx; - m_Proto = proto; - m_HookfuncVfnptr = hookfunc_vfnptr; - } - - void CHookManager::Register() - { - m_PubFunc(true, this); - } - - void CHookManager::Unregister() - { - m_PubFunc(true, NULL); - } - - void CHookManager::IncrRef(CVfnPtr *pVfnPtr) - { - m_VfnPtrs.push_back(pVfnPtr); - if (m_VfnPtrs.size() == 1) - Register(); - } - - void CHookManager::DecrRef(CVfnPtr *pVfnPtr) - { - m_VfnPtrs.remove(pVfnPtr); - if (m_VfnPtrs.empty()) - Unregister(); - } - - CHookManager *CHookManList::GetHookMan(Plugin plug, HookManagerPubFunc pubFunc) - { - CHookManager hm(plug, pubFunc); - return GetHookMan(hm); - } - - CHookManager *CHookManList::GetHookMan(CHookManager &hm) - { - iterator iter = find(hm); - if (iter == end()) - { - push_back(hm); - return &(back()); - } - else - { - return &(*iter); - } - } - } -} diff --git a/metamod-source/core/sourcehook/sourcehook_impl_chookmaninfo.h b/metamod-source/core/sourcehook/sourcehook_impl_chookmaninfo.h deleted file mode 100644 index 6a805ea9..00000000 --- a/metamod-source/core/sourcehook/sourcehook_impl_chookmaninfo.h +++ /dev/null @@ -1,143 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#ifndef __SOURCEHOOK_IMPL_CHOOKMANINFO_H__ -#define __SOURCEHOOK_IMPL_CHOOKMANINFO_H__ - -#include "sh_list.h" -#include "sourcehook_impl_cproto.h" - -namespace SourceHook -{ - namespace Impl - { - class CVfnPtr; - - class CHookManager : public IHookManagerInfo - { - // *** Data *** - Plugin m_OwnerPlugin; - HookManagerPubFunc m_PubFunc; - int m_VtblOffs; - int m_VtblIdx; - CProto m_Proto; - int m_Version; - - void *m_HookfuncVfnptr; - - List m_VfnPtrs; - public: - // *** Descriptor *** - struct Descriptor - { - Plugin m_OwnerPlugin; - HookManagerPubFunc m_PubFunc; - Descriptor(Plugin ownerPlugin, HookManagerPubFunc pubFunc) - : m_OwnerPlugin(ownerPlugin), m_PubFunc(pubFunc) - { - } - }; - - // *** Interface *** - CHookManager(Plugin ownerPlugin, HookManagerPubFunc pubFunc); - - inline bool operator==(const Descriptor &other) const; - inline bool operator==(const CHookManager &other) const; - - inline operator bool() const; - inline Plugin GetOwnerPlugin() const; - inline int GetVtblOffs() const; - inline int GetVtblIdx() const; - inline const CProto &GetProto() const; - inline int GetVersion() const; - inline void *GetHookFunc() const; - inline HookManagerPubFunc GetPubFunc() const; - - void Register(); - void Unregister(); - - void IncrRef(CVfnPtr *pVfnPtr); - void DecrRef(CVfnPtr *pVfnPtr); - - List &GetVfnPtrList() - { - return m_VfnPtrs; - } - - // *** IHookManagerInfo interface *** - void SetInfo(int hookman_version, int vtbloffs, int vtblidx, - ProtoInfo *proto, void *hookfunc_vfnptr); - }; - - class CHookManList : public List - { - public: - CHookManager *GetHookMan(Plugin plug, HookManagerPubFunc pubFunc); - CHookManager *GetHookMan(CHookManager &hm); - }; - - // *** Implementation **/ - - inline CHookManager::operator bool() const - { - return m_Version != -1; - } - - inline bool CHookManager::operator==(const Descriptor &other) const - { - return m_OwnerPlugin == other.m_OwnerPlugin - && m_PubFunc == other.m_PubFunc; - } - - inline bool CHookManager::operator==(const CHookManager &other) const - { - return m_OwnerPlugin == other.m_OwnerPlugin - && m_PubFunc == other.m_PubFunc; - } - - inline Plugin CHookManager::GetOwnerPlugin() const - { - return m_OwnerPlugin; - } - - inline int CHookManager::GetVtblOffs() const - { - return m_VtblOffs; - } - - inline int CHookManager::GetVtblIdx() const - { - return m_VtblIdx; - } - - inline const CProto &CHookManager::GetProto() const - { - return m_Proto; - } - - inline int CHookManager::GetVersion() const - { - return m_Version; - } - - inline void *CHookManager::GetHookFunc() const - { - return *reinterpret_cast(m_HookfuncVfnptr); - } - - inline HookManagerPubFunc CHookManager::GetPubFunc() const - { - return m_PubFunc; - } - } -} - -#endif - diff --git a/metamod-source/core/sourcehook/sourcehook_impl_ciface.h b/metamod-source/core/sourcehook/sourcehook_impl_ciface.h deleted file mode 100644 index 690a4fca..00000000 --- a/metamod-source/core/sourcehook/sourcehook_impl_ciface.h +++ /dev/null @@ -1,96 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#ifndef __SOURCEHOOK_IMPL_CIFACE_H__ -#define __SOURCEHOOK_IMPL_CIFACE_H__ - -#include "sh_list.h" - -namespace SourceHook -{ - namespace Impl - { - class CIface - { - // *** Data *** - void *m_Ptr; - - List m_PreHooks; - List m_PostHooks; - public: - - // *** Descriptor *** - typedef void* Descriptor; - - // *** Interface *** - inline CIface(void *ptr); - inline ~CIface(); - inline bool operator==(const Descriptor &other); - inline void *GetPtr() const; - inline List &GetPreHookList(); - inline List &GetPostHookList(); - inline const List &GetPreHookList() const; - inline const List &GetPostHookList() const; - }; - - // *** Implementation *** - inline CIface::CIface(void *ptr) - : m_Ptr(ptr) - { - } - - inline CIface::~CIface() - { - // Before getting deleted, delete all remaining hook handlers - for (List::iterator iter = m_PreHooks.begin(); iter != m_PreHooks.end(); ++iter) - { - iter->GetHandler()->DeleteThis(); - } - - for (List::iterator iter = m_PostHooks.begin(); iter != m_PostHooks.end(); ++iter) - { - iter->GetHandler()->DeleteThis(); - } - } - - inline bool CIface::operator==(const Descriptor &other) - { - return m_Ptr == other; - } - - inline void *CIface::GetPtr() const - { - return m_Ptr; - } - - inline List &CIface::GetPreHookList() - { - return m_PreHooks; - } - - inline List &CIface::GetPostHookList() - { - return m_PostHooks; - } - - inline const List &CIface::GetPreHookList() const - { - return m_PreHooks; - } - - inline const List &CIface::GetPostHookList() const - { - return m_PostHooks; - } - } -} - -#endif - diff --git a/metamod-source/core/sourcehook/sourcehook_impl_cleanuptask.h b/metamod-source/core/sourcehook/sourcehook_impl_cleanuptask.h deleted file mode 100644 index e8aa725a..00000000 --- a/metamod-source/core/sourcehook/sourcehook_impl_cleanuptask.h +++ /dev/null @@ -1,29 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#ifndef __SOURCEHOOK_IMPL_CLEANUPTASK_H__ -#define __SOURCEHOOK_IMPL_CLEANUPTASK_H__ - - -namespace SourceHook -{ - namespace Impl - { - class ICleanupTask - { - public: - virtual void CleanupAndDeleteThis() = 0; - }; - } -} - -// __SOURCEHOOK_IMPL_CLEANUPTASK_H__ -#endif - diff --git a/metamod-source/core/sourcehook/sourcehook_impl_cproto.cpp b/metamod-source/core/sourcehook/sourcehook_impl_cproto.cpp deleted file mode 100644 index ff8af288..00000000 --- a/metamod-source/core/sourcehook/sourcehook_impl_cproto.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#include "sourcehook_impl.h" - -namespace SourceHook -{ - namespace Impl - { - void CProto::Fill(const ProtoInfo *pProto) - { - if (pProto == NULL) - m_Version = -1; - - m_ParamsPassInfo.clear(); - - if (pProto->paramsPassInfo[0].size == 0) - { - // Version 1 - m_Version = 0; - m_Convention = pProto->convention; - m_NumOfParams = pProto->numOfParams; - - m_RetPassInfo.size = pProto->retPassInfo.size; - m_RetPassInfo.type = pProto->retPassInfo.type; - m_RetPassInfo.flags = GetRealFlags(pProto->retPassInfo); - - m_RetPassInfo.pNormalCtor = NULL; - m_RetPassInfo.pCopyCtor = NULL; - m_RetPassInfo.pDtor = NULL; - m_RetPassInfo.pAssignOperator = NULL; - - - m_ParamsPassInfo.resize(pProto->numOfParams); - - for (int i = 1; i <= pProto->numOfParams; ++i) - { - m_ParamsPassInfo[i-1].size = pProto->paramsPassInfo[i].size; - m_ParamsPassInfo[i-1].type = pProto->paramsPassInfo[i].type; - m_ParamsPassInfo[i-1].flags = GetRealFlags(pProto->paramsPassInfo[i]); - - m_ParamsPassInfo[i-1].pNormalCtor = NULL; - m_ParamsPassInfo[i-1].pCopyCtor = NULL; - m_ParamsPassInfo[i-1].pDtor = NULL; - m_ParamsPassInfo[i-1].pAssignOperator = NULL; - } - } - else if (pProto->paramsPassInfo[0].size == 1) - { - // Version 2 - m_Version = 1; - m_Convention = pProto->convention; - m_NumOfParams = pProto->numOfParams; - - m_RetPassInfo.size = pProto->retPassInfo.size; - m_RetPassInfo.type = pProto->retPassInfo.type; - m_RetPassInfo.flags = pProto->retPassInfo.flags; - - m_RetPassInfo.pNormalCtor = pProto->retPassInfo2.pNormalCtor; - m_RetPassInfo.pCopyCtor = pProto->retPassInfo2.pCopyCtor; - m_RetPassInfo.pDtor = pProto->retPassInfo2.pDtor; - m_RetPassInfo.pAssignOperator = pProto->retPassInfo2.pAssignOperator; - - m_ParamsPassInfo.resize(pProto->numOfParams); - - for (int i = 1; i <= pProto->numOfParams; ++i) - { - m_ParamsPassInfo[i-1].size = pProto->paramsPassInfo[i].size; - m_ParamsPassInfo[i-1].type = pProto->paramsPassInfo[i].type; - m_ParamsPassInfo[i-1].flags = pProto->paramsPassInfo[i].flags; - - m_ParamsPassInfo[i-1].pNormalCtor = pProto->paramsPassInfo2[i].pNormalCtor; - m_ParamsPassInfo[i-1].pCopyCtor = pProto->paramsPassInfo2[i].pCopyCtor; - m_ParamsPassInfo[i-1].pDtor = pProto->paramsPassInfo2[i].pDtor; - m_ParamsPassInfo[i-1].pAssignOperator = pProto->paramsPassInfo2[i].pAssignOperator; - } - } - else - { - // Unknown - m_Version = -1; - } - } - - // Basic compat test - // Other than this, we assume that the plugins know what they're doing - bool CProto::operator == (const CProto &other) const - { - if (m_Version < 0 || other.GetVersion() < 0) - return false; - - if (m_NumOfParams != other.GetNumOfParams()) - return false; - - if (m_Convention != ProtoInfo::CallConv_Unknown && other.GetConvention() != ProtoInfo::CallConv_Unknown && - m_Convention != other.GetConvention()) - return false; - - if (GetRealSize(GetRet()) != GetRealSize(other.GetRet())) - return false; - - for (int i = 0; i < m_NumOfParams; ++i) - { - if (GetRealSize(GetParam(i)) != GetRealSize(other.GetParam(i))) - return false; - if (GetParam(i).type != PassInfo::PassType_Unknown && other.GetParam(i).type != PassInfo::PassType_Unknown) - { - if (GetParam(i).type != other.GetParam(i).type) - return false; - if (GetParam(i).flags != other.GetParam(i).flags) - return false; - } - } - - return true; - } - - bool CProto::ExactlyEqual(const CProto &other) const - { - if (m_Version != other.m_Version || - m_NumOfParams != other.m_NumOfParams || - m_Convention != other.m_Convention || - GetRet() != other.GetRet()) - { - return false; - } - - for (int i = 0; i < m_NumOfParams; ++i) - { - if(GetParam(i) != other.GetParam(i)) - return false; - } - - return true; - } - - } -} diff --git a/metamod-source/core/sourcehook/sourcehook_impl_cproto.h b/metamod-source/core/sourcehook/sourcehook_impl_cproto.h deleted file mode 100644 index 583fd7a6..00000000 --- a/metamod-source/core/sourcehook/sourcehook_impl_cproto.h +++ /dev/null @@ -1,141 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#ifndef __SOURCEHOOK_IMPL_CPROTO_H__ -#define __SOURCEHOOK_IMPL_CPROTO_H__ - -namespace SourceHook -{ - namespace Impl - { - // Internal representation - struct IntPassInfo - { - size_t size; - int type; - unsigned int flags; - - void *pNormalCtor; - void *pCopyCtor; - void *pDtor; - void *pAssignOperator; - - bool operator == (const IntPassInfo &other) const - { - return size == other.size - && type == other.type - && flags == other.flags - && pNormalCtor == other.pNormalCtor - && pDtor == other.pDtor - && pAssignOperator == other.pAssignOperator; - } - - bool operator != (const IntPassInfo &other) const - { - return !(*this == other); - } - }; - - class CProto - { - int m_Version; // -1 = invalid - int m_NumOfParams; - IntPassInfo m_RetPassInfo; - CVector m_ParamsPassInfo; - int m_Convention; - - void Fill(const ProtoInfo *pProto); - - // For old sourcehook.h: flags 0 -> assume ByVal - static unsigned int GetRealFlags(const PassInfo &info) - { - return (info.flags == 0) ? PassInfo::PassFlag_ByVal : info.flags; - } - - public: - CProto() : m_Version(-1) - { - } - - CProto(const ProtoInfo *pProto) - { - Fill(pProto); - } - - CProto(const CProto &other) : m_Version(other.m_Version), m_NumOfParams(other.m_NumOfParams), - m_RetPassInfo(other.m_RetPassInfo), m_ParamsPassInfo(other.m_ParamsPassInfo), - m_Convention(other.m_Convention) - { - - } - - ~CProto() - { - } - - void operator = (const ProtoInfo *pProto) - { - Fill (pProto); - } - - bool operator == (const CProto &other) const; - - bool ExactlyEqual(const CProto &other) const; - - int GetVersion() const - { - return m_Version; - } - - int GetNumOfParams() const - { - return m_NumOfParams; - } - - const IntPassInfo & GetParam(int i) const - { - return m_ParamsPassInfo[i]; - } - - IntPassInfo & GetParam(int i) - { - return m_ParamsPassInfo[i]; - } - - const IntPassInfo & GetRet() const - { - return m_RetPassInfo; - } - - IntPassInfo & GetRet() - { - return m_RetPassInfo; - } - - int GetConvention() const - { - return m_Convention; - } - - static size_t GetRealSize(const IntPassInfo &info) - { - if (info.flags & PassInfo::PassFlag_ByRef) - { - return sizeof(void*); - } - - return info.size; - } - }; - } -} - -#endif - diff --git a/metamod-source/core/sourcehook/sourcehook_impl_cvfnptr.cpp b/metamod-source/core/sourcehook/sourcehook_impl_cvfnptr.cpp deleted file mode 100644 index 82cdd5cd..00000000 --- a/metamod-source/core/sourcehook/sourcehook_impl_cvfnptr.cpp +++ /dev/null @@ -1,263 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#include "sourcehook_impl.h" - -namespace SourceHook -{ - namespace Impl - { - CPageAlloc CVfnPtr::ms_AlignedPageAllocator(8); - - CVfnPtr::CVfnPtr(void *ptr) - : m_Ptr(ptr), m_OrigEntry(*reinterpret_cast(m_Ptr)), - m_OrigCallThunk(NULL) - { - } - - CVfnPtr::~CVfnPtr() - { - if (!m_HookMans.empty()) - m_HookMans.front()->DecrRef(this); - } - - bool CVfnPtr::Init() - { - // Initalize the vfn ptr info object. - - // If we're running on GCC and the original vtable entry is odd - // we have a problem. - // The hook functions use non-virtual member function pointers to - // call the original function (see sourcehook.hxx, SH_SETUP_MFP and SH_CALL_ORIG) - // GCC has the same format for virtual and non-virtual MFPs: - // virtual ones have an odd value as "funcptr" where the offset into the vtable is encoded - // non-virtual ones have the direct function pointer as "funcptr", assuming that it is even - - // When m_OrigEntry is odd, GCC's runtime MFP calling code interpretes it as a virtual - // function call though we want to call the function in a non-virtual way - // (the original function call mechanism between the pre and post hook loop has to bypass - // the virtual calling mechanism in order to call the original function). - -#if SH_COMP==SH_COMP_GCC - if ((((ptrdiff_t)m_OrigEntry) & 1) != 0) - { - // Generate a new thunk - m_OrigCallThunk = ms_AlignedPageAllocator.Alloc(12); - ms_AlignedPageAllocator.SetRW(m_OrigCallThunk); - - unsigned char* thunkBase = reinterpret_cast(m_OrigCallThunk); - ptrdiff_t offset = reinterpret_cast(m_OrigEntry) - thunkBase - 5; - - if (offset >= INT_MIN && offset <= INT_MAX) - { - *(thunkBase + 0) = 0xE9; // offset jump, immediate operand - ptrdiff_t *offsetAddr = reinterpret_cast(thunkBase + 1); - - // destination = src + offset + 5 - // <=> offset = destination - src - 5 - *offsetAddr = offset; - } - else - { - // mov rax, m_origEntry - *(thunkBase + 0) = 0x48; - *(thunkBase + 1) = 0xB8; - void **offsetAddr = reinterpret_cast(thunkBase + 2); - - *offsetAddr = m_OrigEntry; - - // jmp rax - *(thunkBase + 10) = 0xFF; - *(thunkBase + 11) = 0xE0; - } - - ms_AlignedPageAllocator.SetRE(m_OrigCallThunk); - } -#endif - return true; - } - - class CVfnPtrOrigThunkCleanup : public ICleanupTask - { - CPageAlloc *m_Allocator; - void *m_AddrToFree; - - public: - CVfnPtrOrigThunkCleanup(CPageAlloc *allocator, void *addrToFree) : - m_Allocator(allocator), m_AddrToFree(addrToFree) - { - } - - virtual void CleanupAndDeleteThis() - { - m_Allocator->Free(m_AddrToFree); - delete this; - } - }; - - ICleanupTask* CVfnPtr::GetCleanupTask() - { - if (m_OrigCallThunk != NULL) - { - return new CVfnPtrOrigThunkCleanup(&ms_AlignedPageAllocator, m_OrigCallThunk); - } - else - { - return NULL; - } - } - - void* CVfnPtr::GetOrigCallAddr() const - { - if (m_OrigCallThunk) - { - return m_OrigCallThunk; - } - else - { - return m_OrigEntry; - } - } - - bool CVfnPtr::Revert() - { - // Only patch the vfnptr back if the module is still in memory - // If it's not, do not remove stuff like we did before - // First off we did it wrong (shutdown the whole hookman, uh..) and secondly applications may be - // confused by RemoveHook returning false then (yeah, I know, I made this one up, no one checks for RemoveHook error) - if (ModuleInMemory(reinterpret_cast(m_Ptr), SH_PTRSIZE)) - { - return Patch(m_OrigEntry); - } - else - { - return true; - } - } - - CIface *CVfnPtr::FindIface(void *iface) - { - List::iterator iter = m_IfaceList.find(iface); - if (iter == m_IfaceList.end()) - return NULL; - else - return &(*iter); - } - - void CVfnPtr::AddHookMan(CHookManager *pHookMan) - { - List::iterator iter; - - // Don't accept invalid hook managers - if (!*pHookMan) - return; - - // Check whether this hook manager already exists; if yes, ignore. - iter = m_HookMans.find(pHookMan); - if (iter != m_HookMans.end()) - return; - - // It doesn't -> add it. Add it to the end of its version group. - for (iter = m_HookMans.begin(); iter != m_HookMans.end(); ++iter) - { - if ((*iter)->GetVersion() < pHookMan->GetVersion()) - break; - } - - bool isBeginning = iter == m_HookMans.begin(); - - m_HookMans.insert(iter, pHookMan); - - if (isBeginning) - { - pHookMan->IncrRef(this); - if (m_HookMans.size() > 1) - { - // If another hookman was used until now but this one is better - // (which it is because it's the first -> it has a higher version) - // -> switch! - - List::iterator second = m_HookMans.begin(); - ++second; - - (*second)->DecrRef(this); - } - - // Make sure that this vfnptr points at it - Patch(pHookMan->GetHookFunc()); - } - } - - bool CVfnPtr::HookManRemoved(CHookManager *pHookMan) - { - // Don't accept invalid hook managers - if (!*pHookMan) - return true; - - List::iterator iter = m_HookMans.find(pHookMan); - if (iter == m_HookMans.end()) - return true; // Didn't exist here anyway - - if (iter == m_HookMans.begin()) - { - // It is the first one! - pHookMan->DecrRef(this); - m_HookMans.erase(iter); - - if (m_HookMans.empty()) - return false; // No more hookmans -> let SH delete us - - // Activate second -> now first hookman - m_HookMans.front()->IncrRef(this); - Patch(m_HookMans.front()->GetHookFunc()); - } - else - { - m_HookMans.erase(iter); - } - return true; - } - - bool CVfnPtr::Patch(void *newValue) - { - if (!MakePageWritable(m_Ptr)) - { - return false; - } - - *reinterpret_cast(m_Ptr) = newValue; - - return true; - } - - CIface &CVfnPtr::GetIface(void *iface) - { - List::iterator iter = m_IfaceList.find(iface); - if (iter == m_IfaceList.end()) - { - CIface newIface(iface); - if (iface == NULL) - { - m_IfaceList.push_front(newIface); - return m_IfaceList.front(); - } - else - { - m_IfaceList.push_back(newIface); - return m_IfaceList.back(); - } - } - else - { - return *iter; - } - } - } -} diff --git a/metamod-source/core/sourcehook/sourcehook_impl_cvfnptr.h b/metamod-source/core/sourcehook/sourcehook_impl_cvfnptr.h deleted file mode 100644 index 6ed52604..00000000 --- a/metamod-source/core/sourcehook/sourcehook_impl_cvfnptr.h +++ /dev/null @@ -1,91 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#ifndef __SOURCEHOOK_IMPL_CVFNPTR_H__ -#define __SOURCEHOOK_IMPL_CVFNPTR_H__ - -#include "sh_list.h" -#include "sh_memory.h" -#include "sh_pagealloc.h" -#include "sourcehook_impl_cleanuptask.h" - -namespace SourceHook -{ - namespace Impl - { - class CVfnPtr - { - static CPageAlloc ms_AlignedPageAllocator; - - // *** Data *** - void *m_Ptr; - void *m_OrigEntry; - void *m_OrigCallThunk; // See Init() method - - List m_HookMans; - List m_IfaceList; - public: - // *** Descriptor *** - typedef void* Descriptor; - - // *** Interface *** - CVfnPtr(void *ptr); - ~CVfnPtr(); - bool Init(); - inline bool operator==(const Descriptor &other); - inline void *GetPtr() const; - inline void *GetOrigEntry() const; - void *GetOrigCallAddr() const; - inline List &GetIfaceList(); - inline const List &GetIfaceList() const; - CIface *FindIface(void *iface); - CIface &GetIface(void *iface); - bool Patch(void *newValue); - bool Revert(); - - ICleanupTask *GetCleanupTask(); - - void AddHookMan(CHookManager *pHookMan); - // If this returns false, it means that there is no hook manager left - // to use and that this vfnptr should be removed. - bool HookManRemoved(CHookManager *pHookMan); - }; - - // *** Implementation *** - - inline bool CVfnPtr::operator==(const Descriptor &other) - { - return m_Ptr == other; - } - - inline void *CVfnPtr::GetPtr() const - { - return m_Ptr; - } - - inline void *CVfnPtr::GetOrigEntry() const - { - return m_OrigEntry; - } - - inline List &CVfnPtr::GetIfaceList() - { - return m_IfaceList; - } - - inline const List &CVfnPtr::GetIfaceList() const - { - return m_IfaceList; - } - } -} - -#endif - diff --git a/metamod-source/core/sourcehook/sourcehook_pibuilder.h b/metamod-source/core/sourcehook/sourcehook_pibuilder.h deleted file mode 100644 index bcbb3f07..00000000 --- a/metamod-source/core/sourcehook/sourcehook_pibuilder.h +++ /dev/null @@ -1,109 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2010 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#ifndef __SOURCEHOOK_PIBUILDER_H__ -#define __SOURCEHOOK_PIBUILDER_H__ - -#include "sourcehook.h" -#include "sh_vector.h" - -namespace SourceHook -{ - // Helper class: protocol information builder - class CProtoInfoBuilder - { - ProtoInfo m_PI; - CVector m_Params; - CVector m_Params2; - public: - CProtoInfoBuilder(int cc) - { - memset(reinterpret_cast(&m_PI), 0, sizeof(ProtoInfo)); - m_PI.convention = cc; - - // dummy 0 params - PassInfo dummy; - PassInfo::V2Info dummy2; - memset(reinterpret_cast(&dummy), 0, sizeof(PassInfo)); - memset(reinterpret_cast(&dummy2), 0, sizeof(PassInfo::V2Info)); - - dummy.size = 1; // Version1 - - m_Params.push_back(dummy); - m_Params2.push_back(dummy2); - } - - void SetReturnType(size_t size, PassInfo::PassType type, int flags, - void *pNormalCtor, void *pCopyCtor, void *pDtor, void *pAssignOperator) - { - if (pNormalCtor) - flags |= PassInfo::PassFlag_OCtor; - - if (pCopyCtor) - flags |= PassInfo::PassFlag_CCtor; - - if (pDtor) - flags |= PassInfo::PassFlag_ODtor; - - if (pAssignOperator) - flags |= PassInfo::PassFlag_AssignOp; - - m_PI.retPassInfo.size = size; - m_PI.retPassInfo.type = type; - m_PI.retPassInfo.flags = flags; - m_PI.retPassInfo2.pNormalCtor = pNormalCtor; - m_PI.retPassInfo2.pCopyCtor = pCopyCtor; - m_PI.retPassInfo2.pDtor = pDtor; - m_PI.retPassInfo2.pAssignOperator = pAssignOperator; - } - - void AddParam(size_t size, PassInfo::PassType type, int flags, - void *pNormalCtor, void *pCopyCtor, void *pDtor, void *pAssignOperator) - { - PassInfo pi; - PassInfo::V2Info pi2; - - if (pNormalCtor) - flags |= PassInfo::PassFlag_OCtor; - - if (pCopyCtor) - flags |= PassInfo::PassFlag_CCtor; - - if (pDtor) - flags |= PassInfo::PassFlag_ODtor; - - if (pAssignOperator) - flags |= PassInfo::PassFlag_AssignOp; - - - pi.size = size; - pi.type = type; - pi.flags = flags; - pi2.pNormalCtor = pNormalCtor; - pi2.pCopyCtor = pCopyCtor; - pi2.pDtor = pDtor; - pi2.pAssignOperator = pAssignOperator; - - m_Params.push_back(pi); - m_Params2.push_back(pi2); - ++m_PI.numOfParams; - } - - operator ProtoInfo*() - { - m_PI.paramsPassInfo = &(m_Params[0]); - m_PI.paramsPassInfo2 = &(m_Params2[0]); - return &m_PI; - } - }; -} - -#endif - diff --git a/metamod-source/core/sourcehook/test/AMBuilder b/metamod-source/core/sourcehook/test/AMBuilder deleted file mode 100644 index 4a6c2fa4..00000000 --- a/metamod-source/core/sourcehook/test/AMBuilder +++ /dev/null @@ -1,42 +0,0 @@ -# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: -import os - -for cxx in MMS.all_targets: - name = 'test_sourcehook' - binary = MMS.Program(cxx, name) - binary.compiler.cxxincludes += [ - os.path.join(builder.sourcePath, 'core', 'sourcehook'), - ] - if binary.compiler.version >= 'gcc-4.9': - binary.compiler.cxxflags += ['-fno-devirtualize'] - if binary.compiler.version >= 'clang-2.9' or binary.compiler.version >= 'apple-clang-3.0': - binary.compiler.cxxflags += ['-Wno-null-dereference'] - - binary.sources += [ - 'main.cpp', - '../sourcehook.cpp', - '../sourcehook_impl_chookmaninfo.cpp', - '../sourcehook_impl_chookidman.cpp', - '../sourcehook_impl_cproto.cpp', - '../sourcehook_impl_cvfnptr.cpp', - 'test1.cpp', - 'test2.cpp', - 'test3.cpp', - 'test4.cpp', - 'testbail.cpp', - 'testbail2.cpp', - 'testhookmangen.cpp', - 'testlist.cpp', - 'testmanual.cpp', - 'testmulti.cpp', - 'testoddthunks.cpp', - 'testrecall.cpp', - 'testreentr.cpp', - 'testref.cpp', - 'testrefret.cpp', - 'testvphooks.cpp', - ] - if binary.compiler.target.arch == 'x86': - binary.sources += ['../sourcehook_hookmangen.cpp'] - - builder.Add(binary) diff --git a/metamod-source/core/sourcehook/test/Makefile b/metamod-source/core/sourcehook/test/Makefile deleted file mode 100644 index d5d4c397..00000000 --- a/metamod-source/core/sourcehook/test/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# (C)2004-2009 Metamod:Source Development Team -# Makefile written by David "BAILOPAN" Anderson and Pavol Marko - -OPT_FLAGS = -O3 -funroll-loops -s -pipe -DEBUG_FLAGS = -g -ggdb3 -CPP = gcc -LINK = -lstdc++ -INCLUDE = -I. -I.. -MAX_PARAMS=20 - -BINARY = sourcehook_test -OBJECTS = main.cpp sourcehook.cpp sourcehook_hookmangen.cpp sourcehook_impl_chookmaninfo.cpp sourcehook_impl_chookidman.cpp sourcehook_impl_cproto.cpp sourcehook_impl_cvfnptr.cpp $(shell ls -t test*.cpp) -HEADERS = ../sh_list.h ../sh_tinyhash.h ../sh_memory.h ../sh_string.h ../sh_vector.h ../sourcehook_impl.h ../FastDelegate.h ../sourcehook.h ../sh_memfuncinfo.h ../sh_pagealloc.h - -ifeq "$(DEBUG)" "true" - BIN_DIR = Debug - CFLAGS = $(DEBUG_FLAGS) -else - BIN_DIR = Release - CFLAGS = $(OPT_FLAGS) -endif - -CFLAGS += -Wall -Wno-non-virtual-dtor -# Also, enable SH_ASSERT -CFLAGS += -DSH_DEBUG - -OBJ_LINUX := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o) - - -default: all - -$(BIN_DIR)/%.o: %.cpp $(HEADERS) - $(CPP) $(INCLUDE) $(CFLAGS) -o $@ -c $< - -../sourcehook.h: ../generate/sourcehook.hxx - (cd ../generate; ./shworker.bin iter sourcehook.hxx sourcehook.h $(MAX_PARAMS); cp sourcehook.h ..) - -../sourcehook.hxx: ../generate/sh_memfuncinfo.hxx - (cd ../generate; ./shworker.bin iter sh_memfuncinfo.hxx sh_memfuncinfo.h $(MAX_PARAMS); cp sh_memfuncino.h ..) - -../FastDelegate.hxx: ../generate/FastDelegate.hxx - (cd ../generate; ./shworker.bin iter FastDelegate.hxx FastDelegate.h $(MAX_PARAMS); cp FastDelegate.h ..) - -debug: - $(MAKE) all DEBUG=true - -all: - mkdir -p $(BIN_DIR) - ln -sf ../sourcehook.cpp - ln -sf ../sourcehook_hookmangen.cpp - ln -sf ../sourcehook_impl_chookidman.cpp - ln -sf ../sourcehook_impl_chookmaninfo.cpp - ln -sf ../sourcehook_impl_cproto.cpp - ln -sf ../sourcehook_impl_cvfnptr.cpp - $(MAKE) $(BINARY) - rm -f $(BINARY) - rm -f sourcehook.cpp - rm -f sourcehook_hookmangen.cpp - rm -f sourcehook_impl_chookidman.cpp - rm -f sourcehook_impl_chookmaninfo.cpp - rm -f sourcehook_impl_cproto.cpp - rm -f sourcehook_impl_cvfnptr.cpp - ln -sf $(BIN_DIR)/$(BINARY) $(BINARY) - - -$(BINARY): $(OBJ_LINUX) - $(CPP) $(INCLUDE) $(CFLAGS) $(OBJ_LINUX) $(LINK) -o $(BIN_DIR)/$(BINARY) - -clean: - rm -rf Release/*.o - rm -rf Release/$(BINARY) - rm -rf Debug/*.o - rm -rf Debug/$(BINARY) diff --git a/metamod-source/core/sourcehook/test/generate.bat b/metamod-source/core/sourcehook/test/generate.bat deleted file mode 100644 index 3fd08a7d..00000000 --- a/metamod-source/core/sourcehook/test/generate.bat +++ /dev/null @@ -1,6 +0,0 @@ -:: Generates everything -:: Usage: -:: generate.bat - - -..\generate\shworker iter testhookmangen.hxx testhookmangen.h %1 \ No newline at end of file diff --git a/metamod-source/core/sourcehook/test/main.cpp b/metamod-source/core/sourcehook/test/main.cpp deleted file mode 100644 index a04f39c2..00000000 --- a/metamod-source/core/sourcehook/test/main.cpp +++ /dev/null @@ -1,142 +0,0 @@ -// Hello BAIL! -// hello pm how are you -// I'm fine, what about you? -// not bad, just looking for mem leaks -// mem leaks in my code!? never! I have to preserve binary compatibility :( -// This is a test file - -#include -#include -#include -#include -#include - -#include "sourcehook_impl.h" -#include "sourcehook.h" -#include "sourcehook_hookmangen.h" - -using namespace std; -bool g_Verbose; - -struct Unloader : public SourceHook::Impl::UnloadListener -{ - void ReadyToUnload(SourceHook::Plugin) { } -} g_UnloadListener; - -#define DECL_TEST(x) bool Test##x(std::string &error); - -#define DO_TEST(x) \ - error.clear(); \ - if (Test##x(error)) \ - { \ - ++passed; \ - cout << "Test" << #x << " passed" << endl; \ - } \ - else \ - { \ - ++failed; \ - cout << "Test" << #x << " FAILED: " << error << endl; \ - } \ - - -DECL_TEST(List); -DECL_TEST(Basic); -DECL_TEST(VafmtAndOverload); -DECL_TEST(ThisPtrOffs); -DECL_TEST(PlugSys); -DECL_TEST(Bail); -DECL_TEST(Reentr); -DECL_TEST(Manual); -DECL_TEST(Recall); -DECL_TEST(Multi); -DECL_TEST(Ref); -DECL_TEST(RefRet); -DECL_TEST(VPHooks); -DECL_TEST(CPageAlloc); // in testhookmangen.cpp -DECL_TEST(HookManGen); -DECL_TEST(OddThunks); - -int main(int argc, char *argv[]) -{ - std::string error; - - g_Verbose = argc > 1 && strcmp(argv[1], "-v") == 0; - - int passed = 0, failed = 0; - - DO_TEST(List); - DO_TEST(Basic); - DO_TEST(VafmtAndOverload); - DO_TEST(ThisPtrOffs); - DO_TEST(PlugSys); - DO_TEST(Bail); - DO_TEST(Reentr); - DO_TEST(Manual); - DO_TEST(Recall); - DO_TEST(Multi); - DO_TEST(Ref); - DO_TEST(RefRet); - DO_TEST(VPHooks); - DO_TEST(CPageAlloc); -#if !defined( _M_AMD64 ) && !defined( __amd64__ ) && !defined(__x86_64__) // TODO: Fix for 64-bit - DO_TEST(HookManGen); -#endif - DO_TEST(OddThunks); - - cout << endl << "----" << endl << "Passed: " << passed << endl << "Failed: " << failed << endl; - cout << "Total: " << passed + failed << endl; - - if (failed) - return 1; - return 0; -} - -SourceHook::ISourceHook *Test_Factory() -{ - return new SourceHook::Impl::CSourceHookImpl(); -} - -void Test_Delete(SourceHook::ISourceHook *shptr) -{ - delete static_cast(shptr); -} - -void Test_CompleteShutdown(SourceHook::ISourceHook *shptr) -{ - static_cast(shptr)->CompleteShutdown(); -} - -class Listener : public SourceHook::Impl::UnloadListener -{ -public: - void ReadyToUnload(SourceHook::Plugin plug) override { - } -} sListener; - -void Test_UnloadPlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) -{ - static_cast(shptr)->UnloadPlugin(plug, &sListener); -} - -void Test_PausePlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) -{ - static_cast(shptr)->PausePlugin(plug); -} - -void Test_UnpausePlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug) -{ - static_cast(shptr)->UnpausePlugin(plug); -} - -#if !defined( _M_AMD64 ) && !defined( __amd64__ ) && !defined(__x86_64__) -SourceHook::IHookManagerAutoGen *Test_HMAG_Factory(SourceHook::ISourceHook *shptr) -{ - return new SourceHook::Impl::CHookManagerAutoGen(shptr); -} - -void Test_HMAG_Delete(SourceHook::IHookManagerAutoGen *ptr) -{ - delete static_cast(ptr); -} -#endif - diff --git a/metamod-source/core/sourcehook/test/msvc12/test.sln b/metamod-source/core/sourcehook/test/msvc12/test.sln deleted file mode 100644 index e3e32039..00000000 --- a/metamod-source/core/sourcehook/test/msvc12/test.sln +++ /dev/null @@ -1,40 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcxproj", "{456BBA64-FF14-4292-8443-3BA79E4D84CC}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug_NoDebugRuntimeLib|Win32 = Debug_NoDebugRuntimeLib|Win32 - Debug_NoDebugRuntimeLib|x64 = Debug_NoDebugRuntimeLib|x64 - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - DebugOpt|Win32 = DebugOpt|Win32 - DebugOpt|x64 = DebugOpt|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Debug_NoDebugRuntimeLib|Win32.ActiveCfg = Debug_NoDebugRuntimeLib|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Debug_NoDebugRuntimeLib|Win32.Build.0 = Debug_NoDebugRuntimeLib|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Debug_NoDebugRuntimeLib|x64.ActiveCfg = Debug_NoDebugRuntimeLib|x64 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Debug_NoDebugRuntimeLib|x64.Build.0 = Debug_NoDebugRuntimeLib|x64 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Debug|Win32.ActiveCfg = Debug|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Debug|Win32.Build.0 = Debug|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Debug|x64.ActiveCfg = Debug|x64 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Debug|x64.Build.0 = Debug|x64 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.DebugOpt|Win32.ActiveCfg = DebugOpt|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.DebugOpt|Win32.Build.0 = DebugOpt|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.DebugOpt|x64.ActiveCfg = DebugOpt|x64 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.DebugOpt|x64.Build.0 = DebugOpt|x64 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Release|Win32.ActiveCfg = Release|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Release|Win32.Build.0 = Release|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Release|x64.ActiveCfg = Release|x64 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/metamod-source/core/sourcehook/test/msvc12/test.vcxproj b/metamod-source/core/sourcehook/test/msvc12/test.vcxproj deleted file mode 100644 index d7d068b9..00000000 --- a/metamod-source/core/sourcehook/test/msvc12/test.vcxproj +++ /dev/null @@ -1,461 +0,0 @@ - - - - - DebugOpt - Win32 - - - DebugOpt - x64 - - - Debug_NoDebugRuntimeLib - Win32 - - - Debug_NoDebugRuntimeLib - x64 - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {456BBA64-FF14-4292-8443-3BA79E4D84CC} - test - Win32Proj - - - - Application - v120 - MultiByte - - - Application - v120 - MultiByte - - - Application - v120 - MultiByte - - - Application - v120 - MultiByte - - - Application - v120 - MultiByte - - - Application - v120 - MultiByte - - - Application - v120 - MultiByte - - - Application - v120 - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.30501.0 - - - Debug\ - Debug\ - true - - - true - - - Release\ - Release\ - false - - - false - - - DebugOpt\ - DebugOpt\ - true - - - true - - - Debug_NoDebugRuntimeLib\ - Debug_NoDebugRuntimeLib\ - true - - - true - - - - Disabled - Neither - ../..;..;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;SH_DEBUG;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - true - EnableFastChecks - MultiThreadedDebug - true - true - - Level3 - EditAndContinue - - - $(OutDir)test.exe - true - $(OutDir)test.pdb - Console - false - - MachineX86 - - - - - Disabled - Neither - ../..;..;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;SH_DEBUG;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - true - true - - - Level3 - ProgramDatabase - - - $(OutDir)test.exe - true - $(OutDir)test.pdb - Console - false - - - - - - - Full - OnlyExplicitInline - Size - true - ../..;..;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - true - true - - - Level3 - true - ProgramDatabase - - - $(OutDir)test.exe - true - true - true - Console - true - true - false - - MachineX86 - - - - - Full - OnlyExplicitInline - Size - true - ../..;..;%(AdditionalIncludeDirectories) - NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - true - true - - - - - Level3 - true - ProgramDatabase - - - $(OutDir)test.exe - true - true - true - Console - true - true - false - - - - - - - Full - OnlyExplicitInline - false - Size - true - ..;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - false - Default - MultiThreaded - true - true - - Level3 - ProgramDatabase - - - $(OutDir)test.exe - true - $(OutDir)test.pdb - Console - false - - MachineX86 - - - - - Full - OnlyExplicitInline - false - Size - true - ..;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - false - Default - MultiThreaded - true - true - - - Level3 - ProgramDatabase - - - $(OutDir)test.exe - true - $(OutDir)test.pdb - Console - false - - - - - - - Disabled - Neither - ../..;..;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - true - Sync - EnableFastChecks - MultiThreaded - true - true - - Level3 - EditAndContinue - - - $(OutDir)test.exe - true - $(OutDir)test.pdb - Console - false - - MachineX86 - - - - - Disabled - Neither - ../..;..;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - Sync - EnableFastChecks - MultiThreaded - true - true - - - Level3 - ProgramDatabase - - - $(OutDir)test.exe - true - $(OutDir)test.pdb - Console - false - - - - - - - - - - - - - - - - - - - - - - false - false - false - false - - - - - - - - - - - - - - echo on -pushd ..\..\generate -shworker.exe iter sourcehook.hxx sourcehook.h 16 -copy sourcehook.h ..\sourcehook.h -popd - - echo on -pushd ..\..\generate -shworker.exe iter sourcehook.hxx sourcehook.h 16 -copy sourcehook.h ..\sourcehook.h -popd - - ..\..\sourcehook.h;%(Outputs) - ..\..\sourcehook.h;%(Outputs) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/metamod-source/core/sourcehook/test/msvc12/test.vcxproj.filters b/metamod-source/core/sourcehook/test/msvc12/test.vcxproj.filters deleted file mode 100644 index fddea24d..00000000 --- a/metamod-source/core/sourcehook/test/msvc12/test.vcxproj.filters +++ /dev/null @@ -1,191 +0,0 @@ - - - - - {097d3bc9-e1f2-4054-93f3-b12d28409a01} - cpp;c;cxx;def;odl;idl;hpj;bat;asm - - - {c1c8bd55-c7ae-46fc-a115-e490b5068b5c} - - - {17326c78-c7e4-456b-b9df-019e07ca478f} - - - {c15408a4-1aa9-485e-916b-c4eeaddeeee2} - h;hpp;hxx;hm;inl;inc - - - {be31706d-65c6-4945-b7be-84dcbbcde2e7} - - - {75eb6b5b-331a-4eba-b0b2-687c273e2746} - - - {1efd71b2-ab96-4217-ab65-dbc369ec623f} - - - {d4f35fc6-e668-474b-82af-0771f32cde7f} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Source Files\SourceHook - - - Source Files\SourceHook - - - Source Files\SourceHook - - - Source Files\SourceHook - - - Source Files\SourceHook - - - Source Files\SourceHook - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - Source Files\TestTools - - - - - Header Files\TestTools - - - Header Files\TestTools - - - Header Files\TestTools - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook - - - Header Files\SourceHook\generate - - - Header Files\SourceHook\generate - - - Header Files\SourceHook\generate - - - - - Header Files\SourceHook\generate - - - \ No newline at end of file diff --git a/metamod-source/core/sourcehook/test/msvc7/test.vcproj b/metamod-source/core/sourcehook/test/msvc7/test.vcproj deleted file mode 100644 index 1d5f3978..00000000 --- a/metamod-source/core/sourcehook/test/msvc7/test.vcproj +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metamod-source/core/sourcehook/test/msvc8/test.vcproj b/metamod-source/core/sourcehook/test/msvc8/test.vcproj deleted file mode 100644 index 0b49dd3d..00000000 --- a/metamod-source/core/sourcehook/test/msvc8/test.vcproj +++ /dev/null @@ -1,578 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metamod-source/core/sourcehook/test/sourcehook_test.h b/metamod-source/core/sourcehook/test/sourcehook_test.h deleted file mode 100644 index 065b543e..00000000 --- a/metamod-source/core/sourcehook/test/sourcehook_test.h +++ /dev/null @@ -1,49 +0,0 @@ -// This file is used for backwards compatibility testing -// It allows us to test binary backwards compatibility by using an older include file HERE: -#include "sourcehook.h" // <-- here -// There. main.cpp which implements all of the following function is always usign sourcehook.h -// and the up-to-date sourcehook_impl.h/sourcehook.cpp. The tests use this file however. -// If the test needs an up-to-date version (like the recall test), it can simply -// #include "sourcehook.h" before including this, thus overriding our decision. - - -SourceHook::ISourceHook *Test_Factory(); -void Test_Delete(SourceHook::ISourceHook *shptr); - -template -struct CAutoPtrDestruction -{ - T *m_Ptr; - CAutoPtrDestruction(T *p) : m_Ptr(p) { } - ~CAutoPtrDestruction() { if (m_Ptr) delete m_Ptr; } - void clear() { m_Ptr = NULL; } - void set(T *ptr) { m_Ptr = ptr; } -}; - -struct CSHPtrAutoDestruction -{ - SourceHook::ISourceHook *m_SHPtr; - CSHPtrAutoDestruction(SourceHook::ISourceHook *shptr) : m_SHPtr(shptr) {} - ~CSHPtrAutoDestruction() { Test_Delete(m_SHPtr); } -}; - -#define GET_SHPTR(var) var = Test_Factory(); CSHPtrAutoDestruction ___autodestruction(var); - -// Access to CSourceHookImpl functions -void Test_CompleteShutdown(SourceHook::ISourceHook *shptr); -void Test_UnloadPlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug); -void Test_PausePlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug); -void Test_UnpausePlugin(SourceHook::ISourceHook *shptr, SourceHook::Plugin plug); - -SourceHook::IHookManagerAutoGen *Test_HMAG_Factory(SourceHook::ISourceHook *pSHPtr); -void Test_HMAG_Delete(SourceHook::IHookManagerAutoGen *ptr); - -struct CHMAGAutoDestruction -{ - SourceHook::IHookManagerAutoGen *m_Ptr; - CHMAGAutoDestruction(SourceHook::IHookManagerAutoGen *ptr) : m_Ptr(ptr) {} - ~CHMAGAutoDestruction() { Test_HMAG_Delete(m_Ptr); } -}; - - -#define GET_HMAG(var, shptr) var = Test_HMAG_Factory(shptr); CHMAGAutoDestruction __hmagautodestruction(var); diff --git a/metamod-source/core/sourcehook/test/test.sln b/metamod-source/core/sourcehook/test/test.sln deleted file mode 100644 index 75fafaee..00000000 --- a/metamod-source/core/sourcehook/test/test.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcproj", "{456BBA64-FF14-4292-8443-3BA79E4D84CC}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug_NoDebugRuntimeLib|Win32 = Debug_NoDebugRuntimeLib|Win32 - Debug|Win32 = Debug|Win32 - DebugOpt|Win32 = DebugOpt|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Debug_NoDebugRuntimeLib|Win32.ActiveCfg = Debug_NoDebugRuntimeLib|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Debug_NoDebugRuntimeLib|Win32.Build.0 = Debug_NoDebugRuntimeLib|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Debug|Win32.ActiveCfg = Debug|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Debug|Win32.Build.0 = Debug|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.DebugOpt|Win32.ActiveCfg = DebugOpt|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.DebugOpt|Win32.Build.0 = DebugOpt|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Release|Win32.ActiveCfg = Release|Win32 - {456BBA64-FF14-4292-8443-3BA79E4D84CC}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/metamod-source/core/sourcehook/test/test.vcproj b/metamod-source/core/sourcehook/test/test.vcproj deleted file mode 100644 index 6d6bbc47..00000000 --- a/metamod-source/core/sourcehook/test/test.vcproj +++ /dev/null @@ -1,619 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metamod-source/core/sourcehook/test/test1.cpp b/metamod-source/core/sourcehook/test/test1.cpp deleted file mode 100644 index 08bdbd78..00000000 --- a/metamod-source/core/sourcehook/test/test1.cpp +++ /dev/null @@ -1,750 +0,0 @@ -#include -#include "sourcehook_test.h" -#include "testevents.h" - -#include "sh_memory.h" - -namespace -{ - StateList g_States; - SourceHook::ISourceHook *g_SHPtr; - SourceHook::Plugin g_PLID; - - // TEST1 - // Basic tests - // Hooking and callclass - - MAKE_STATE_1(State_ModuleInMemory, bool); - MAKE_STATE(State_F1_Called); - MAKE_STATE_1(State_F1_PreHandler_Called, void*); - MAKE_STATE_1(State_F1_PostHandler_Called, void*); - MAKE_STATE_1(State_F1_HookAdded, bool); - MAKE_STATE(State_F1_HookRemoved); - MAKE_STATE(State_F1_CallClassGenerated); - MAKE_STATE(State_F1_CallClassReleased); - MAKE_STATE_1(State_F299_Called, std::string); - MAKE_STATE_1(State_F299_PreHandlerCalled, std::string); - MAKE_STATE_1(State_F299_PostHandlerCalled, std::string); - MAKE_STATE_1(State_F299Ret, bool); - - class Test - { - public: - virtual void F1() - { - ADD_STATE(State_F1_Called); - } - virtual void F2(){} - virtual void F3(){} - virtual void F4(){} - virtual void F5(){} - virtual void F6(){} - virtual void F7(){} - virtual void F8(){} - virtual void F9(){} - virtual void F10(){} - virtual void F11(){} - virtual void F12(){} - virtual void F13(){} - virtual void F14(){} - virtual void F15(){} - virtual void F16(){} - virtual void F17(){} - virtual void F18(){} - virtual void F19(){} - virtual float F20() const { return 1.0f; } // Look! F20 is const-ed and returns a float - virtual void F21(){} - virtual void F22(){} - virtual void F23(){} - virtual void F24(){} - virtual void F25(){} - virtual void F26(){} - virtual void F27(){} - virtual void F28(){} - virtual void F29(){} - virtual void F30(){} - virtual void F31(){} - virtual void F32(){} - virtual void F33(){} - virtual void F34(){} - virtual void F35(){} - virtual void F36(){} - virtual void F37(){} - virtual void F38(){} - virtual void F39(){} - virtual void F40(){} - virtual void F41(){} - virtual void F42(){} - virtual void F43(){} - virtual void F44(){} - virtual void F45(){} - virtual void F46(){} - virtual void F47(){} - virtual void F48(){} - virtual void F49(){} - virtual void F50(){} - virtual void F51(){} - virtual void F52(){} - virtual void F53(){} - virtual void F54(){} - virtual void F55(){} - virtual void F56(){} - virtual void F57(){} - virtual void F58(){} - virtual void F59(){} - virtual void F60(int &hello){} - virtual void F61(){} - virtual void F62(){} - virtual void F63(){} - virtual void F64(){} - virtual void F65(){} - virtual void F66(){} - virtual void F67(){} - virtual void F68(){} - virtual void F69(){} - virtual void F70(){} - virtual void F71(){} - virtual void F72(){} - virtual void F73(){} - virtual void F74(){} - virtual void F75(){} - virtual void F76(){} - virtual void F77(){} - virtual void F78(){} - virtual void F79(){} - virtual void F80(){} - virtual void F81(){} - virtual void F82(){} - virtual void F83(){} - virtual void F84(){} - virtual void F85(){} - virtual void F86(){} - virtual void F87(){} - virtual void F88(){} - virtual void F89(){} - virtual void F90(){} - virtual void F91(){} - virtual void F92(){} - virtual void F93(){} - virtual void F94(){} - virtual void F95(){} - virtual void F96(){} - virtual void F97(){} - virtual void F98(){} - virtual void F99(){} - virtual void F100(){} - virtual void F101(){} - virtual void F102(){} - virtual void F103(){} - virtual void F104(){} - virtual void F105(){} - virtual void F106(){} - virtual void F107(){} - virtual void F108(){} - virtual void F109(){} - virtual void F110(){} - virtual void F111(){} - virtual void F112(){} - virtual void F113(){} - virtual void F114(){} - virtual void F115(){} - virtual void F116(){} - virtual void F117(){} - virtual void F118(){} - virtual void F119(){} - virtual void F120(){} - virtual void F121(){} - virtual void F122(){} - virtual void F123(){} - virtual void F124(){} - virtual void F125(){} - virtual void F126(){} - virtual void F127(){} - virtual void F128(){} - virtual void F129(){} - virtual void F130(){} - virtual void F131(){} - virtual void F132(){} - virtual void F133(){} - virtual void F134(){} - virtual void F135(){} - virtual void F136(){} - virtual void F137(){} - virtual void F138(){} - virtual void F139(){} - virtual void F140(){} - virtual void F141(){} - virtual void F142(){} - virtual void F143(){} - virtual void F144(){} - virtual void F145(){} - virtual void F146(){} - virtual void F147(){} - virtual void F148(){} - virtual void F149(){} - virtual void F150(){} - virtual void F151(){} - virtual void F152(){} - virtual void F153(){} - virtual void F154(){} - virtual void F155(){} - virtual void F156(){} - virtual void F157(){} - virtual void F158(){} - virtual void F159(){} - virtual void F160(){} - virtual void F161(){} - virtual void F162(){} - virtual void F163(){} - virtual void F164(){} - virtual void F165(){} - virtual void F166(){} - virtual void F167(){} - virtual void F168(){} - virtual void F169(){} - virtual void F170(){} - virtual void F171(){} - virtual void F172(){} - virtual void F173(){} - virtual void F174(){} - virtual void F175(){} - virtual void F176(){} - virtual void F177(){} - virtual void F178(){} - virtual void F179(){} - virtual void F180(){} - virtual void F181(){} - virtual void F182(){} - virtual void F183(){} - virtual void F184(){} - virtual void F185(){} - virtual void F186(){} - virtual void F187(){} - virtual void F188(){} - virtual void F189(){} - virtual void F190(){} - virtual void F191(){} - virtual void F192(){} - virtual void F193(){} - virtual void F194(){} - virtual void F195(){} - virtual void F196(){} - virtual void F197(){} - virtual void F198(){} - virtual void F199(){} - virtual void F200(){} - virtual void F201(){} - virtual void F202(){} - virtual void F203(){} - virtual void F204(){} - virtual void F205(){} - virtual void F206(){} - virtual void F207(){} - virtual void F208(){} - virtual void F209(){} - virtual void F210(){} - virtual void F211(){} - virtual void F212(){} - virtual void F213(){} - virtual void F214(){} - virtual void F215(){} - virtual void F216(){} - virtual void F217(){} - virtual void F218(){} - virtual void F219(){} - virtual void F220(){} - virtual void F221(){} - virtual void F222(){} - virtual void F223(){} - virtual void F224(){} - virtual void F225(){} - virtual void F226(){} - virtual void F227(){} - virtual void F228(){} - virtual void F229(){} - virtual void F230(){} - virtual void F231(){} - virtual void F232(){} - virtual void F233(){} - virtual void F234(){} - virtual void F235(){} - virtual void F236(){} - virtual void F237(){} - virtual void F238(){} - virtual void F239(){} - virtual void F240(){} - virtual void F241(){} - virtual void F242(){} - virtual void F243(){} - virtual void F244(){} - virtual void F245(){} - virtual void F246(){} - virtual void F247(){} - virtual void F248(){} - virtual void F249(){} - virtual void F250(){} - virtual void F251(){} - virtual void F252(){} - virtual void F253(){} - virtual void F254(){} - virtual void F255(){} - virtual void F256(){} - virtual void F257(){} - virtual void F258(){} - virtual void F259(){} - virtual void F260(){} - virtual void F261(){} - virtual void F262(){} - virtual void F263(){} - virtual void F264(){} - virtual void F265(){} - virtual void F266(){} - virtual void F267(){} - virtual void F268(){} - virtual void F269(){} - virtual void F270(){} - virtual void F271(){} - virtual void F272(){} - virtual void F273(){} - virtual void F274(){} - virtual void F275(){} - virtual void F276(){} - virtual void F277(){} - virtual void F278(){} - virtual void F279(){} - virtual void F280(){} - virtual void F281(){} - virtual void F282(){} - virtual void F283(){} - virtual void F284(){} - virtual void F285(){} - virtual void F286(){} - virtual void F287(){} - virtual void F288(){} - virtual void F289(){} - virtual void F290(){} - virtual void F291(){} - virtual void F292(){} - virtual void F293(){} - virtual void F294(){} - virtual void F295(){} - virtual void F296(){} - virtual void F297(){} - virtual void F298(){} - virtual bool F299(const char *mwah) - { - ADD_STATE(State_F299_Called(mwah)); - return true; - } - }; - - SH_DECL_HOOK1(Test, F299, SH_NOATTRIB, 0, bool, const char *); - SH_DECL_HOOK0_void(Test, F1, SH_NOATTRIB, 0); - SH_DECL_HOOK0_void(Test, F2, SH_NOATTRIB, 0); - SH_DECL_HOOK0_void(Test, F3, SH_NOATTRIB, 0); - SH_DECL_HOOK0_void(Test, F4, SH_NOATTRIB, 0); - SH_DECL_HOOK0_void(Test, F5, SH_NOATTRIB, 0); - SH_DECL_HOOK0_void(Test, F6, SH_NOATTRIB, 0); - SH_DECL_HOOK0_void(Test, F7, SH_NOATTRIB, 0); - SH_DECL_HOOK0_void(Test, F8, SH_NOATTRIB, 0); - SH_DECL_HOOK0_void(Test, F9, SH_NOATTRIB, 0); - SH_DECL_HOOK0_void(Test, F10, SH_NOATTRIB, 0); - - SH_DECL_HOOK0(Test, F20, const, 0, float); - SH_DECL_HOOK1_void(Test, F60, SH_NOATTRIB, 0, int&); - - SH_DECL_EXTERN1(Test, F299, SH_NOATTRIB, 0, bool, const char *); - SH_DECL_EXTERN0_void(Test, F1, SH_NOATTRIB, 0); - - META_RES g_F1Pre_WhatToDo; - META_RES g_F1Post_WhatToDo; - - struct HandlersF1 - { - void Pre() - { - ADD_STATE(State_F1_PreHandler_Called(reinterpret_cast(this))); - RETURN_META(g_F1Pre_WhatToDo); - } - - void Post() - { - ADD_STATE(State_F1_PostHandler_Called(reinterpret_cast(this))); - RETURN_META(g_F1Post_WhatToDo); - } - }; - - META_RES g_F299Pre_WhatToDo; - bool g_F299Pre_WhatToRet; - - bool F299_Pre(const char *mwah) - { - ADD_STATE(State_F299_PreHandlerCalled(mwah)); - RETURN_META_VALUE(g_F299Pre_WhatToDo, g_F299Pre_WhatToRet); - } - - bool F299_Post(const char *mwah) - { - ADD_STATE(State_F299_PostHandlerCalled(mwah)); - RETURN_META_VALUE(MRES_OVERRIDE, META_RESULT_STATUS >= MRES_OVERRIDE ? !META_RESULT_OVERRIDE_RET(bool) : - !META_RESULT_ORIG_RET(bool)); - } - - void F60_Pre(int &hello) - { - hello = 10; - } - - Test *MyTestFactory() - { - return new Test; - } -} - -template T func(T a) -{ - return a; -} - -bool TestBasic(std::string &error) -{ - // Simple test for ModuleInMemory - // 1) &error should on the stack - // 2) 0 should not be mapped - ADD_STATE(State_ModuleInMemory(SourceHook::ModuleInMemory(reinterpret_cast(&error), sizeof(error)))); - ADD_STATE(State_ModuleInMemory(SourceHook::ModuleInMemory(0, 1))); - - CHECK_STATES((&g_States, - new State_ModuleInMemory(true), - new State_ModuleInMemory(false), - NULL), "ModuleInMemory"); - - GET_SHPTR(g_SHPtr); - g_PLID = 1337; - - HandlersF1 f1_handlers; - Test *pTest = MyTestFactory(); - CAutoPtrDestruction apd(pTest); - - void *pOrigVfnPtrF1 = (*reinterpret_cast(pTest))[0]; - - // 1) Get a call class and call the member through it and normally - SourceHook::CallClass *cc = SH_GET_CALLCLASS(pTest); - - ADD_STATE(State_F1_CallClassGenerated); - - SH_CALL(cc, &Test::F1)(); - pTest->F1(); - - CHECK_STATES((&g_States, - new State_F1_CallClassGenerated, - new State_F1_Called, - new State_F1_Called, - NULL), "Part 1"); - - CHECK_COND(SH_GET_ORIG_VFNPTR_ENTRY(pTest, &Test::F1) == pOrigVfnPtrF1, "Part S1"); - - // 2) Request a call class again - SourceHook::CallClass *cc2 = SH_GET_CALLCLASS(pTest); - ADD_STATE(State_F1_CallClassGenerated); - - SH_CALL(cc, &Test::F1)(); - SH_CALL(cc2, &Test::F1)(); - pTest->F1(); - - SH_RELEASE_CALLCLASS(cc2); - ADD_STATE(State_F1_CallClassReleased); - - SH_CALL(cc, &Test::F1)(); - pTest->F1(); - - CHECK_STATES((&g_States, - new State_F1_CallClassGenerated, - new State_F1_Called, - new State_F1_Called, - new State_F1_Called, - new State_F1_CallClassReleased, - new State_F1_Called, - new State_F1_Called, - NULL), "Part 2"); - - // 3) Add a pre hook - // (one add memfunc in old format) - g_F1Pre_WhatToDo = MRES_SUPERCEDE; - ADD_STATE(State_F1_HookAdded(SH_ADD_HOOK_MEMFUNC(Test, F1, pTest, &f1_handlers, &HandlersF1::Pre, false) ? true : false)); - - SH_CALL(cc, &Test::F1)(); - pTest->F1(); - - CHECK_STATES((&g_States, - new State_F1_HookAdded(true), - new State_F1_Called, - new State_F1_PreHandler_Called(&f1_handlers), - NULL), "Part 3"); - - CHECK_COND(SH_GET_ORIG_VFNPTR_ENTRY(pTest, &Test::F1) == pOrigVfnPtrF1, "Part S3"); - - // 4) Rerequest the callclass - SH_RELEASE_CALLCLASS(cc); - - ADD_STATE(State_F1_CallClassReleased); - cc2 = SH_GET_CALLCLASS(pTest); - ADD_STATE(State_F1_CallClassGenerated); - - SH_CALL(cc, &Test::F1)(); - pTest->F1(); - - CHECK_STATES((&g_States, - new State_F1_CallClassReleased, - new State_F1_CallClassGenerated, - new State_F1_Called, - new State_F1_PreHandler_Called(&f1_handlers), - NULL), "Part 4"); - - // 5) Check ignore / supercede - g_F1Pre_WhatToDo = MRES_SUPERCEDE; - SH_CALL(cc, &Test::F1)(); - pTest->F1(); - - g_F1Pre_WhatToDo = MRES_IGNORED; - SH_CALL(cc, &Test::F1)(); - pTest->F1(); - - CHECK_STATES((&g_States, - new State_F1_Called, - new State_F1_PreHandler_Called(&f1_handlers), - new State_F1_Called, - new State_F1_PreHandler_Called(&f1_handlers), - new State_F1_Called, - NULL), "Part 5"); - - // 6) remove the hook again - // (one remove memfunc in old format) - SH_REMOVE_HOOK_MEMFUNC(Test, F1, pTest, &f1_handlers, &HandlersF1::Pre, false); - ADD_STATE(State_F1_HookRemoved); - - SH_CALL(cc, &Test::F1)(); - pTest->F1(); - - CHECK_STATES((&g_States, - new State_F1_HookRemoved, - new State_F1_Called, - new State_F1_Called, - NULL), "Part 6"); - - // 7) add a post hook now - g_F1Post_WhatToDo = MRES_IGNORED; - ADD_STATE(State_F1_HookAdded(SH_ADD_HOOK(Test, F1, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Post), true) ? true : false)); - - SH_CALL(cc, &Test::F1)(); - pTest->F1(); - - CHECK_STATES((&g_States, - new State_F1_HookAdded(true), - new State_F1_Called, - new State_F1_Called, - new State_F1_PostHandler_Called(&f1_handlers), - NULL), "Part 7"); - - // 8) And a pre hook again - g_F1Pre_WhatToDo = MRES_IGNORED; - ADD_STATE(State_F1_HookAdded(SH_ADD_HOOK(Test, F1, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false) ? true : false)); - - SH_CALL(cc, &Test::F1)(); - pTest->F1(); - - g_F1Pre_WhatToDo = MRES_SUPERCEDE; - SH_CALL(cc, &Test::F1)(); - pTest->F1(); - - CHECK_STATES((&g_States, - new State_F1_HookAdded(true), - new State_F1_Called, - new State_F1_PreHandler_Called(&f1_handlers), - new State_F1_Called, - new State_F1_PostHandler_Called(&f1_handlers), - new State_F1_Called, - new State_F1_PreHandler_Called(&f1_handlers), - new State_F1_PostHandler_Called(&f1_handlers), - NULL), "Part 8"); - - // 9) Remove all hooks - SH_REMOVE_HOOK(Test, F1, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false); - ADD_STATE(State_F1_HookRemoved); - SH_REMOVE_HOOK(Test, F1, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Post), true); - ADD_STATE(State_F1_HookRemoved); - - SH_CALL(cc, &Test::F1)(); - pTest->F1(); - - CHECK_STATES((&g_States, - new State_F1_HookRemoved, - new State_F1_HookRemoved, - new State_F1_Called, - new State_F1_Called, - NULL), "Part 9"); - - // 10) Some checks on F299 - g_F299Pre_WhatToDo = MRES_IGNORED; - g_F299Pre_WhatToRet = false; - - ADD_STATE(State_F299Ret(pTest->F299("hi"))); - ADD_STATE(State_F299Ret(SH_CALL(cc, &Test::F299)("hi"))); - - CHECK_STATES((&g_States, - new State_F299_Called("hi"), - new State_F299Ret(true), - new State_F299_Called("hi"), - new State_F299Ret(true), - NULL), "Part 10.1"); - - // (one add staticfunc in old format) - SH_ADD_HOOK_STATICFUNC(Test, F299, pTest, F299_Pre, false); - ADD_STATE(State_F299Ret(pTest->F299("hi"))); - ADD_STATE(State_F299Ret(SH_CALL(cc, &Test::F299)("hi"))); - - CHECK_STATES((&g_States, - new State_F299_PreHandlerCalled("hi"), - new State_F299_Called("hi"), - new State_F299Ret(true), - new State_F299_Called("hi"), - new State_F299Ret(true), - NULL), "Part 10.2"); - - SH_ADD_HOOK(Test, F299, pTest, SH_STATIC(F299_Post), true); - ADD_STATE(State_F299Ret(pTest->F299("hi"))); - ADD_STATE(State_F299Ret(SH_CALL(cc, &Test::F299)("hi"))); - - CHECK_STATES((&g_States, - new State_F299_PreHandlerCalled("hi"), - new State_F299_Called("hi"), - new State_F299_PostHandlerCalled("hi"), - new State_F299Ret(false), - new State_F299_Called("hi"), - new State_F299Ret(true), - NULL), "Part 10.3"); - - g_F299Pre_WhatToDo = MRES_OVERRIDE; - ADD_STATE(State_F299Ret(pTest->F299("hi"))); - ADD_STATE(State_F299Ret(SH_CALL(cc, &Test::F299)("hi"))); - - CHECK_STATES((&g_States, - new State_F299_PreHandlerCalled("hi"), - new State_F299_Called("hi"), - new State_F299_PostHandlerCalled("hi"), - new State_F299Ret(true), - new State_F299_Called("hi"), - new State_F299Ret(true), - NULL), "Part 10.4"); - - g_F299Pre_WhatToDo = MRES_SUPERCEDE; - ADD_STATE(State_F299Ret(pTest->F299("hi"))); - ADD_STATE(State_F299Ret(SH_CALL(cc, &Test::F299)("hi"))); - - CHECK_STATES((&g_States, - new State_F299_PreHandlerCalled("hi"), - new State_F299_PostHandlerCalled("hi"), - new State_F299Ret(true), - new State_F299_Called("hi"), - new State_F299Ret(true), - NULL), "Part 10.5"); - - // (one remove staticfunc in old format) - SH_REMOVE_HOOK_STATICFUNC(Test, F299, pTest, F299_Pre, false); - ADD_STATE(State_F299Ret(pTest->F299("hi"))); - ADD_STATE(State_F299Ret(SH_CALL(cc, &Test::F299)("hi"))); - - CHECK_STATES((&g_States, - new State_F299_Called("hi"), - new State_F299_PostHandlerCalled("hi"), - new State_F299Ret(false), - new State_F299_Called("hi"), - new State_F299Ret(true), - NULL), "Part 10.6"); - - SH_REMOVE_HOOK(Test, F299, pTest, SH_STATIC(F299_Post), true); - ADD_STATE(State_F299Ret(pTest->F299("hi"))); - ADD_STATE(State_F299Ret(SH_CALL(cc, &Test::F299)("hi"))); - - CHECK_STATES((&g_States, - new State_F299_Called("hi"), - new State_F299Ret(true), - new State_F299_Called("hi"), - new State_F299Ret(true), - NULL), "Part 10.7"); - - // 11) Release callclass - SH_RELEASE_CALLCLASS(cc); - ADD_STATE(State_F1_CallClassReleased); - - - CHECK_STATES((&g_States, - new State_F1_CallClassReleased, - NULL), "Part 11"); - - // 11 1/2) Test removing hook by id - - g_F1Pre_WhatToDo = MRES_IGNORED; - - pTest->F1(); - int hookPre = SH_ADD_HOOK(Test, F1, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false); - int hookPost = SH_ADD_HOOK(Test, F1, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Post), true); - - pTest->F1(); - SH_REMOVE_HOOK_ID(hookPost); - pTest->F1(); - SH_REMOVE_HOOK_ID(hookPre); - pTest->F1(); - - CHECK_STATES((&g_States, - new State_F1_Called, - - new State_F1_PreHandler_Called(&f1_handlers), - new State_F1_Called, - new State_F1_PostHandler_Called(&f1_handlers), - - new State_F1_PreHandler_Called(&f1_handlers), - new State_F1_Called, - - new State_F1_Called, - - NULL), "Part 11 1/2"); - - // 12) Try out one ref param - SH_ADD_HOOK(Test, F60, pTest, SH_STATIC(F60_Pre), false); - int a = 0; - pTest->F60(a); - CHECK_COND(a == 10, "Part12"); - SH_REMOVE_HOOK(Test, F60, pTest, SH_STATIC(F60_Pre), false); - - // 13) Remove hooks after the instance has been removed - SH_ADD_HOOK(Test, F1, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), true); - SH_ADD_HOOK(Test, F2, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), true); - SH_ADD_HOOK(Test, F3, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false); - SH_ADD_HOOK(Test, F4, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), true); - SH_ADD_HOOK(Test, F5, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false); - SH_ADD_HOOK(Test, F6, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), true); - SH_ADD_HOOK(Test, F7, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false); - SH_ADD_HOOK(Test, F8, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false); - SH_ADD_HOOK(Test, F9, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false); - SH_ADD_HOOK(Test, F10, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false); - - delete pTest; - apd.clear(); - - SH_REMOVE_HOOK(Test, F1, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), true); - SH_REMOVE_HOOK(Test, F2, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), true); - SH_REMOVE_HOOK(Test, F3, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false); - SH_REMOVE_HOOK(Test, F4, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), true); - SH_REMOVE_HOOK(Test, F5, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false); - SH_REMOVE_HOOK(Test, F6, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), true); - SH_REMOVE_HOOK(Test, F7, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false); - SH_REMOVE_HOOK(Test, F8, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false); - SH_REMOVE_HOOK(Test, F9, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false); - SH_REMOVE_HOOK(Test, F10, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false); - CHECK_COND(SH_REMOVE_HOOK(Test, F10, pTest, SH_MEMBER(&f1_handlers, &HandlersF1::Pre), false) == false, "Part 12.1"); - - Test_CompleteShutdown(g_SHPtr); - - return true; -} diff --git a/metamod-source/core/sourcehook/test/test2.cpp b/metamod-source/core/sourcehook/test/test2.cpp deleted file mode 100644 index 78da423e..00000000 --- a/metamod-source/core/sourcehook/test/test2.cpp +++ /dev/null @@ -1,242 +0,0 @@ -#include -#include "sourcehook_test.h" -#include "testevents.h" -#include - -// TEST2 -// Vafmt and Overloaded functions -namespace -{ - StateList g_States; - SourceHook::ISourceHook *g_SHPtr; - SourceHook::Plugin g_PLID; - - MAKE_STATE_1(State_EatYams_Called, int); - MAKE_STATE_1(State_EatYams_Handler_Called, int); - MAKE_STATE_2(State_Vafmt_Called, int, std::string); - MAKE_STATE_2(State_Vafmt_PreHandler_Called, int, std::string); - MAKE_STATE_2(State_Vafmt_PostHandler_Called, int, std::string); - - class IGaben - { - public: - virtual void EatYams() - { - ADD_STATE(State_EatYams_Called(0)); - } - virtual bool EatYams(const char *location) const - { - ADD_STATE(State_EatYams_Called(1)); - return true; - } - virtual void Vafmt1(bool param1, int x, const char *fmt, ...) - { - va_list ap; - va_start(ap, fmt); - char buffer[9999]; - vsnprintf(buffer, 9998, fmt, ap); - buffer[9998] = 0; - va_end(ap); - ADD_STATE(State_Vafmt_Called(1, std::string(buffer))); - } - virtual float Vafmt2(const char *fmt, ...) - { - va_list ap; - va_start(ap, fmt); - char buffer[9999]; - vsnprintf(buffer, 9998, fmt, ap); - buffer[9998] = 0; - va_end(ap); - ADD_STATE(State_Vafmt_Called(2, std::string(buffer))); - return 0.0f; - } - }; - - SH_DECL_HOOK0_void(IGaben, EatYams, SH_NOATTRIB, 0); - SH_DECL_HOOK1(IGaben, EatYams, const, 1, bool, const char *); - SH_DECL_HOOK2_void_vafmt(IGaben, Vafmt1, SH_NOATTRIB, 0, bool, int); - SH_DECL_HOOK0_vafmt(IGaben, Vafmt2, SH_NOATTRIB, 0, float); - - SH_DECL_EXTERN2_void_vafmt(IGaben, Vafmt1, SH_NOATTRIB, 0, bool, int); - SH_DECL_EXTERN0_vafmt(IGaben, Vafmt2, SH_NOATTRIB, 0, float); - - // Hook also using manual hooks! - SH_DECL_MANUALHOOK0_vafmt(IGaben_Vafmt2, 3, 0, 0, float); - SH_DECL_MANUALEXTERN0_vafmt(IGaben_Vafmt2, float); - - SH_DECL_MANUALHOOK2_void_vafmt(IGaben_Vafmt1, 2, 0, 0, bool, int); - SH_DECL_MANUALEXTERN2_void_vafmt(IGaben_Vafmt1, bool, int); - - void EatYams0_Handler() - { - ADD_STATE(State_EatYams_Handler_Called(0)); - } - - bool EatYams1_Handler(const char *loc) - { - ADD_STATE(State_EatYams_Handler_Called(1)); - return true; - } - - void Vafmt1_PreHandler(bool param1, int x, const char *in) - { - ADD_STATE(State_Vafmt_PreHandler_Called(1, std::string(in))); - } - void Vafmt1_PostHandler(bool param1, int x, const char *in) - { - ADD_STATE(State_Vafmt_PostHandler_Called(1, std::string(in))); - } - float Vafmt2_PreHandler(const char *in) - { - ADD_STATE(State_Vafmt_PreHandler_Called(2, std::string(in))); - return 0.0f; - } - float Vafmt2_PostHandler(const char *in) - { - ADD_STATE(State_Vafmt_PostHandler_Called(2, std::string(in))); - return 0.0f; - } - - IGaben *MyInstanceFactory() - { - return new IGaben; - } -} - - -bool TestVafmtAndOverload(std::string &error) -{ - int h1, h2, h3, h4; - GET_SHPTR(g_SHPtr); - g_PLID = 1337; - - IGaben *pGab = MyInstanceFactory(); - CAutoPtrDestruction apd(pGab); - - // Part 1 - SH_CALL(pGab, static_cast(&IGaben::EatYams))(); - SH_CALL(pGab, static_cast(&IGaben::EatYams))("Here!"); - - h1 = SH_ADD_HOOK(IGaben, EatYams, pGab, EatYams0_Handler, false); - h2 = SH_ADD_HOOK(IGaben, EatYams, pGab, EatYams1_Handler, false); - - pGab->EatYams(); - pGab->EatYams("Here!"); - - SH_REMOVE_HOOK_ID(h1); - SH_REMOVE_HOOK_ID(h2); - - CHECK_STATES((&g_States, - new State_EatYams_Called(0), - new State_EatYams_Called(1), - new State_EatYams_Handler_Called(0), - new State_EatYams_Called(0), - new State_EatYams_Handler_Called(1), - new State_EatYams_Called(1), - NULL),"Part 1"); - - // Part 2 - pGab->Vafmt1(true, 55, "Hello %s%d%s", "BA", 1, "L"); - SH_CALL(pGab, &IGaben::Vafmt1)(true, 55, "Hello %s%d%s", "BA", 1, "L"); - pGab->Vafmt2("Hello %s%d%s", "BA", 1, "LOPAN"); - SH_CALL(pGab, &IGaben::Vafmt2)("Hello %s%d%s", "BA", 1, "LOPAN"); - - CHECK_STATES((&g_States, - new State_Vafmt_Called(1, "Hello BA1L"), - new State_Vafmt_Called(1, "Hello BA1L"), - new State_Vafmt_Called(2, "Hello BA1LOPAN"), - new State_Vafmt_Called(2, "Hello BA1LOPAN"), - NULL), "Part 2"); - - // Part 3 - h1 = SH_ADD_HOOK(IGaben, Vafmt1, pGab, Vafmt1_PreHandler, false); - h2 = SH_ADD_HOOK(IGaben, Vafmt1, pGab, Vafmt1_PostHandler, true); - h3 = SH_ADD_HOOK(IGaben, Vafmt2, pGab, Vafmt2_PreHandler, false); - h4 = SH_ADD_HOOK(IGaben, Vafmt2, pGab, Vafmt2_PostHandler, true); - - pGab->Vafmt1(true, 55, "Hello %s%d%s", "BA", 1, "L"); - pGab->Vafmt2("Hello %s%d%s", "BA", 1, "LOPAN"); - - CHECK_STATES((&g_States, - new State_Vafmt_PreHandler_Called(1, std::string("Hello BA1L")), - new State_Vafmt_Called(1, std::string("Hello BA1L")), - new State_Vafmt_PostHandler_Called(1, std::string("Hello BA1L")), - - new State_Vafmt_PreHandler_Called(2, std::string("Hello BA1LOPAN")), - new State_Vafmt_Called(2, std::string("Hello BA1LOPAN")), - new State_Vafmt_PostHandler_Called(2, std::string("Hello BA1LOPAN")), - NULL), "Part 3"); - - - // Check LARGE stuff - char tmpbuf[501]; - for (int i = 0; i < 500; ++i) - tmpbuf[i] = (i % 10) + '0'; - tmpbuf[500] = 0; - - pGab->Vafmt2("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", - tmpbuf, tmpbuf, tmpbuf, tmpbuf, tmpbuf, tmpbuf, tmpbuf, tmpbuf, tmpbuf, tmpbuf, - tmpbuf, tmpbuf, tmpbuf, tmpbuf, tmpbuf, tmpbuf, tmpbuf, tmpbuf, tmpbuf, tmpbuf); - - char refbuf[SourceHook::STRBUF_LEN]; - for (int i = 0; i < (SourceHook::STRBUF_LEN - 1); ++i) - refbuf[i] = (i % 10) + '0'; - refbuf[SourceHook::STRBUF_LEN - 1] = 0; - - CHECK_STATES((&g_States, - new State_Vafmt_PreHandler_Called(2, std::string(refbuf)), - new State_Vafmt_Called(2, std::string(refbuf)), - new State_Vafmt_PostHandler_Called(2, std::string(refbuf)), - NULL - ), "Part 3.1"); - - // Part 4 - SH_REMOVE_HOOK_ID(h1); - SH_REMOVE_HOOK_ID(h2); - SH_REMOVE_HOOK_ID(h3); - SH_REMOVE_HOOK_ID(h4); - - pGab->Vafmt1(true, 55, "Hello %s%d%s", "BA", 1, "L"); - pGab->Vafmt2("Hello %s%d%s", "BA", 1, "LOPAN"); - - CHECK_STATES((&g_States, - new State_Vafmt_Called(1, "Hello BA1L"), - new State_Vafmt_Called(2, "Hello BA1LOPAN"), - NULL), "Part 4"); - - // Part5: Part3 but with manualhooks - h1 = SH_ADD_MANUALHOOK(IGaben_Vafmt1, pGab, SH_STATIC(Vafmt1_PreHandler), false); - h2 = SH_ADD_MANUALHOOK(IGaben_Vafmt1, pGab, SH_STATIC(Vafmt1_PostHandler), true); - h3 = SH_ADD_MANUALHOOK(IGaben_Vafmt2, pGab, SH_STATIC(Vafmt2_PreHandler), false); - h4 = SH_ADD_MANUALHOOK(IGaben_Vafmt2, pGab, SH_STATIC(Vafmt2_PostHandler), true); - - pGab->Vafmt1(true, 55, "Hello %s%d%s", "BA", 1, "L"); - SH_CALL(pGab, &IGaben::Vafmt1)(true, 55, "Hello %s%d%s", "BA", 1, "L"); - SH_MCALL(pGab, IGaben_Vafmt1)(true, 55, "Hello %s%d%s", "BA", 1, "L"); - - CHECK_STATES((&g_States, - new State_Vafmt_PreHandler_Called(1, std::string("Hello BA1L")), - new State_Vafmt_Called(1, std::string("Hello BA1L")), - new State_Vafmt_PostHandler_Called(1, std::string("Hello BA1L")), - - // SH_CALL and SH_MCALL - new State_Vafmt_Called(1, std::string("Hello BA1L")), - new State_Vafmt_Called(1, std::string("Hello BA1L")), - NULL), "Part 5.1"); - - pGab->Vafmt2("Hello %s%d%s", "BA", 1, "LOPAN"); - SH_CALL(pGab, &IGaben::Vafmt2)("Hello %s%d%s", "BA", 1, "LOPAN"); - SH_MCALL(pGab, IGaben_Vafmt2)("Hello %s%d%s", "BA", 1, "LOPAN"); - - CHECK_STATES((&g_States, - new State_Vafmt_PreHandler_Called(2, std::string("Hello BA1LOPAN")), - new State_Vafmt_Called(2, std::string("Hello BA1LOPAN")), - new State_Vafmt_PostHandler_Called(2, std::string("Hello BA1LOPAN")), - - // SH_CALL and SH_MCALL - new State_Vafmt_Called(2, "Hello BA1LOPAN"), - new State_Vafmt_Called(2, "Hello BA1LOPAN"), - NULL), "Part 5.2"); - - return true; -} diff --git a/metamod-source/core/sourcehook/test/test3.cpp b/metamod-source/core/sourcehook/test/test3.cpp deleted file mode 100644 index c4e88da3..00000000 --- a/metamod-source/core/sourcehook/test/test3.cpp +++ /dev/null @@ -1,245 +0,0 @@ -#include -#include "sourcehook_test.h" -#include "testevents.h" - -// TEST3 -// Tests with inheritance / thisptroffsets - -namespace -{ - StateList g_States; - SourceHook::ISourceHook *g_SHPtr; - SourceHook::Plugin g_PLID; - - MAKE_STATE_1(State_Func1_Called, void*); // param1: This pointer - MAKE_STATE_1(State_Func2_Called, void*); // param1: This pointer - MAKE_STATE_1(State_Func3_Called, void*); // param1: This pointer - - MAKE_STATE_1(State_Func1H_Called, void*); - MAKE_STATE_1(State_Func2H_Called, void*); - MAKE_STATE_1(State_Func3H_Called, void*); - - class Base1 - { - int a; - public: - virtual void Func1() - { - ADD_STATE(State_Func1_Called(reinterpret_cast(this))); - } - }; - class Base2 - { - int b; - public: - virtual void Func2() - { - ADD_STATE(State_Func2_Called(reinterpret_cast(this))); - } - }; - class Derived : public Base1, public Base2 - { - int c; - public: - virtual void Func3() - { - ADD_STATE(State_Func3_Called(reinterpret_cast(this))); - } - }; - - SH_DECL_HOOK0_void(Derived, Func1, SH_NOATTRIB, 0); - SH_DECL_HOOK0_void(Derived, Func2, SH_NOATTRIB, 0); - SH_DECL_HOOK0_void(Derived, Func3, SH_NOATTRIB, 0); - SH_DECL_HOOK0_void(Base1, Func1, SH_NOATTRIB, 0); - SH_DECL_HOOK0_void(Base2, Func2, SH_NOATTRIB, 0); - - void Handler_Func1() - { - ADD_STATE(State_Func1H_Called(META_IFACEPTR(void))); - } - void Handler_Func2() - { - ADD_STATE(State_Func2H_Called(META_IFACEPTR(void))); - } - void Handler_Func3() - { - ADD_STATE(State_Func3H_Called(META_IFACEPTR(void))); - } - - Derived *MyInstanceFactory() - { - return new Derived; - } -} - -bool TestThisPtrOffs(std::string &error) -{ - GET_SHPTR(g_SHPtr); - g_PLID = 1337; - - Derived *pD = MyInstanceFactory(); - Base1 *pB1 = pD; - Base2 *pB2 = pD; - - CAutoPtrDestruction apd(pD); - - - // It should be: - // pB1 = pD - // pB2 > pB1 - - // 1) - // Get a callclass for pD - // Verify whether the this pointers are correct - // Also call them normally to make sure that we aren't messing it up ;) - SourceHook::CallClass *pD_CC = SH_GET_CALLCLASS(pD); - - SH_CALL(pD_CC, &Derived::Func1)(); - SH_CALL(pD_CC, &Derived::Func2)(); - SH_CALL(pD_CC, &Derived::Func3)(); - pD->Func1(); - pD->Func2(); - pD->Func3(); - - CHECK_STATES((&g_States, - new State_Func1_Called(pB1), - new State_Func2_Called(pB2), - new State_Func3_Called(pD), - new State_Func1_Called(pB1), - new State_Func2_Called(pB2), - new State_Func3_Called(pD), - NULL), "Part 1"); - - SH_CALL(pD_CC, &Base1::Func1)(); - SH_CALL(pD_CC, &Base2::Func2)(); - - CHECK_STATES((&g_States, - new State_Func1_Called(pB1), - new State_Func2_Called(pB2), - NULL), "Part 1.1"); - - // 2) - // Get callclasses for the other ones and verify it as well - - SourceHook::CallClass *pB1_CC = SH_GET_CALLCLASS(pB1); - SourceHook::CallClass *pB2_CC = SH_GET_CALLCLASS(pB2); - - SH_CALL(pB1_CC, &Base1::Func1)(); - SH_CALL(pB2_CC, &Base2::Func2)(); - - CHECK_STATES((&g_States, - new State_Func1_Called(pB1), - new State_Func2_Called(pB2), - NULL), "Part 2"); - - - // 3) Add hooks on them (referring to them through pD1 / Derived) - // Check whether the hooks are called with the correct this pointer - - SH_ADD_HOOK(Derived, Func1, pD, SH_STATIC(Handler_Func1), false); - SH_ADD_HOOK(Derived, Func2, pD, SH_STATIC(Handler_Func2), false); - SH_ADD_HOOK(Derived, Func3, pD, SH_STATIC(Handler_Func3), false); - - pD->Func1(); - pD->Func2(); - pD->Func3(); - pB1->Func1(); - pB2->Func2(); - - // The handlers should always be called with the pointer to Derived - CHECK_STATES((&g_States, - new State_Func1H_Called(pD), - new State_Func1_Called(pB1), - new State_Func2H_Called(pD), - new State_Func2_Called(pB2), - new State_Func3H_Called(pD), - new State_Func3_Called(pD), - new State_Func1H_Called(pD), - new State_Func1_Called(pB1), - new State_Func2H_Called(pD), - new State_Func2_Called(pB2), - NULL), "Part 3"); - - SH_REMOVE_HOOK(Derived, Func1, pD, SH_STATIC(Handler_Func1), false); - SH_REMOVE_HOOK(Derived, Func2, pD, SH_STATIC(Handler_Func2), false); - SH_REMOVE_HOOK(Derived, Func3, pD, SH_STATIC(Handler_Func3), false); - - // 4) - // Now add the hooks on Base1 and Base2 and check again - - // Note that the new implicit_cast should convert the pD to Base1*/Base2* :) - SH_ADD_HOOK(Base1, Func1, pD, SH_STATIC(Handler_Func1), false); - SH_ADD_HOOK(Base2, Func2, pD, SH_STATIC(Handler_Func2), false); - SH_ADD_HOOK(Derived, Func3, pD, SH_STATIC(Handler_Func3), false); - - pD->Func1(); - pD->Func2(); - pD->Func3(); - pB1->Func1(); - pB2->Func2(); - - // This time, the handlers for Func1 should be called with pB1 and the handlers - // for Func2 should be called with pB2 - CHECK_STATES((&g_States, - new State_Func1H_Called(pB1), - new State_Func1_Called(pB1), - new State_Func2H_Called(pB2), - new State_Func2_Called(pB2), - new State_Func3H_Called(pD), - new State_Func3_Called(pD), - new State_Func1H_Called(pB1), - new State_Func1_Called(pB1), - new State_Func2H_Called(pB2), - new State_Func2_Called(pB2), - NULL), "Part 4"); - - SH_REMOVE_HOOK(Base1, Func1, pD, SH_STATIC(Handler_Func1), false); - SH_REMOVE_HOOK(Base2, Func2, pD, SH_STATIC(Handler_Func2), false); - SH_REMOVE_HOOK(Derived, Func3, pD, SH_STATIC(Handler_Func3), false); - - - // 5) - // Add some hooks, and use callclasses - - // 5.1) First off, add all of them on pD - SH_ADD_HOOK(Derived, Func1, pD, SH_STATIC(Handler_Func1), false); - SH_ADD_HOOK(Derived, Func2, pD, SH_STATIC(Handler_Func2), false); - SH_ADD_HOOK(Derived, Func3, pD, SH_STATIC(Handler_Func3), false); - - pD->Func1(); - pD->Func2(); - pD->Func3(); - - CHECK_STATES((&g_States, - new State_Func1H_Called(pD), - new State_Func1_Called(pB1), - new State_Func2H_Called(pD), - new State_Func2_Called(pB2), - new State_Func3H_Called(pD), - new State_Func3_Called(pD), - NULL), "Part 5.1"); - - SH_CALL(pD_CC, &Derived::Func1)(); - SH_CALL(pD_CC, &Derived::Func2)(); - SH_CALL(pD_CC, &Derived::Func3)(); - SH_CALL(pB1_CC, &Base1::Func1)(); - SH_CALL(pB2_CC, &Base2::Func2)(); - - CHECK_STATES((&g_States, - new State_Func1_Called(pB1), - new State_Func2_Called(pB2), - new State_Func3_Called(pD), - new State_Func1_Called(pB1), - new State_Func2_Called(pB2), - NULL), "Part 5.2"); - - SH_REMOVE_HOOK(Derived, Func1, pD, SH_STATIC(Handler_Func1), false); - SH_REMOVE_HOOK(Derived, Func2, pD, SH_STATIC(Handler_Func2), false); - SH_REMOVE_HOOK(Derived, Func3, pD, SH_STATIC(Handler_Func3), false); - - SH_RELEASE_CALLCLASS(pB1_CC); - SH_RELEASE_CALLCLASS(pB2_CC); - SH_RELEASE_CALLCLASS(pD_CC); - - return true; -} diff --git a/metamod-source/core/sourcehook/test/test4.cpp b/metamod-source/core/sourcehook/test/test4.cpp deleted file mode 100644 index 8776204c..00000000 --- a/metamod-source/core/sourcehook/test/test4.cpp +++ /dev/null @@ -1,315 +0,0 @@ -#include -#include "sourcehook_test.h" -#include "testevents.h" - -// TEST4 -// Tests of plugin management system - -namespace -{ - StateList g_States; - SourceHook::ISourceHook *g_SHPtr; - SourceHook::Plugin g_PLID; - - MAKE_STATE(State_Func1_Called); - MAKE_STATE(State_Func2_Called); - MAKE_STATE(State_Func3_Called); - - MAKE_STATE(State_Func1H_Called); - MAKE_STATE(State_Func2H_Called); - MAKE_STATE(State_Func3H_Called); - - class Test - { - public: - virtual void Func1() - { - ADD_STATE(State_Func1_Called); - } - - virtual void Func2() - { - ADD_STATE(State_Func2_Called); - } - - virtual void Func3() - { - ADD_STATE(State_Func3_Called); - } - }; - - SH_DECL_HOOK0_void(Test, Func1, SH_NOATTRIB, 1); - SH_DECL_HOOK0_void(Test, Func2, SH_NOATTRIB, 1); - SH_DECL_HOOK0_void(Test, Func3, SH_NOATTRIB, 1); - - void Handler_Func1() - { - ADD_STATE(State_Func1H_Called); - } - void Handler_Func2() - { - ADD_STATE(State_Func2H_Called); - } - void Handler_Func3() - { - ADD_STATE(State_Func3H_Called); - } - - Test *MyTestFactory() - { - return new Test; - } -} - -bool TestPlugSys(std::string &error) -{ - GET_SHPTR(g_SHPtr); - g_PLID = 1; - - Test *pInst = MyTestFactory(); - CAutoPtrDestruction apd(pInst); - - // 1) - // Add hooks, then issue a complete shutdown - SH_ADD_HOOK(Test, Func1, pInst, SH_STATIC(Handler_Func1), false); - SH_ADD_HOOK(Test, Func2, pInst, SH_STATIC(Handler_Func2), true); - SH_ADD_HOOK(Test, Func3, pInst, SH_STATIC(Handler_Func3), false); - - pInst->Func1(); - pInst->Func2(); - pInst->Func3(); - - CHECK_STATES((&g_States, - new State_Func1H_Called, - new State_Func1_Called, - new State_Func2_Called, - new State_Func2H_Called, - new State_Func3H_Called, - new State_Func3_Called, - NULL), "Part 1.1"); - - Test_CompleteShutdown(g_SHPtr); - - pInst->Func1(); - pInst->Func2(); - pInst->Func3(); - - CHECK_STATES((&g_States, - new State_Func1_Called, - new State_Func2_Called, - new State_Func3_Called, - NULL), "Part 1.2"); - - // 2) - // Add hooks from "different plugins", then shutdown the plugins - - g_PLID = 1; - SH_ADD_HOOK(Test, Func1, pInst, SH_STATIC(Handler_Func1), false); - g_PLID = 2; - SH_ADD_HOOK(Test, Func2, pInst, SH_STATIC(Handler_Func2), true); - g_PLID = 3; - SH_ADD_HOOK(Test, Func3, pInst, SH_STATIC(Handler_Func3), false); - - g_PLID = 1; - SH_ADD_HOOK(Test, Func2, pInst, SH_STATIC(Handler_Func2), true); - SH_ADD_HOOK(Test, Func3, pInst, SH_STATIC(Handler_Func3), false); - - g_PLID = 2; - SH_ADD_HOOK(Test, Func1, pInst, SH_STATIC(Handler_Func1), false); - SH_ADD_HOOK(Test, Func3, pInst, SH_STATIC(Handler_Func3), false); - - g_PLID = 3; - SH_ADD_HOOK(Test, Func1, pInst, SH_STATIC(Handler_Func1), false); - SH_ADD_HOOK(Test, Func2, pInst, SH_STATIC(Handler_Func2), true); - - pInst->Func1(); - pInst->Func2(); - pInst->Func3(); - - CHECK_STATES((&g_States, - new State_Func1H_Called, - new State_Func1H_Called, - new State_Func1H_Called, - new State_Func1_Called, - new State_Func2_Called, - new State_Func2H_Called, - new State_Func2H_Called, - new State_Func2H_Called, - new State_Func3H_Called, - new State_Func3H_Called, - new State_Func3H_Called, - new State_Func3_Called, - NULL), "Part 2.1"); - - // Unload plugins one by one - Test_UnloadPlugin(g_SHPtr, 3); - - pInst->Func1(); - pInst->Func2(); - pInst->Func3(); - - CHECK_STATES((&g_States, - new State_Func1H_Called, - new State_Func1H_Called, - new State_Func1_Called, - new State_Func2_Called, - new State_Func2H_Called, - new State_Func2H_Called, - new State_Func3H_Called, - new State_Func3H_Called, - new State_Func3_Called, - NULL), "Part 2.3.1"); - - Test_UnloadPlugin(g_SHPtr, 2); - - pInst->Func1(); - pInst->Func2(); - pInst->Func3(); - - CHECK_STATES((&g_States, - new State_Func1H_Called, - new State_Func1_Called, - new State_Func2_Called, - new State_Func2H_Called, - new State_Func3H_Called, - new State_Func3_Called, - NULL), "Part 2.4.1"); - - Test_UnloadPlugin(g_SHPtr, 1); - - pInst->Func1(); - pInst->Func2(); - pInst->Func3(); - - CHECK_STATES((&g_States, - new State_Func1_Called, - new State_Func2_Called, - new State_Func3_Called, - NULL), "Part 2.5.1"); - - - // 3) - // Add hooks from "different plugins", then pause the plugins - - g_PLID = 1; - SH_ADD_HOOK(Test, Func1, pInst, SH_STATIC(Handler_Func1), false); - g_PLID = 2; - SH_ADD_HOOK(Test, Func2, pInst, SH_STATIC(Handler_Func2), true); - g_PLID = 3; - SH_ADD_HOOK(Test, Func3, pInst, SH_STATIC(Handler_Func3), false); - - g_PLID = 1; - SH_ADD_HOOK(Test, Func2, pInst, SH_STATIC(Handler_Func2), true); - SH_ADD_HOOK(Test, Func3, pInst, SH_STATIC(Handler_Func3), false); - - g_PLID = 2; - SH_ADD_HOOK(Test, Func1, pInst, SH_STATIC(Handler_Func1), false); - SH_ADD_HOOK(Test, Func3, pInst, SH_STATIC(Handler_Func3), false); - - g_PLID = 3; - SH_ADD_HOOK(Test, Func1, pInst, SH_STATIC(Handler_Func1), false); - SH_ADD_HOOK(Test, Func2, pInst, SH_STATIC(Handler_Func2), true); - - pInst->Func1(); - pInst->Func2(); - pInst->Func3(); - - CHECK_STATES((&g_States, - new State_Func1H_Called, - new State_Func1H_Called, - new State_Func1H_Called, - new State_Func1_Called, - new State_Func2_Called, - new State_Func2H_Called, - new State_Func2H_Called, - new State_Func2H_Called, - new State_Func3H_Called, - new State_Func3H_Called, - new State_Func3H_Called, - new State_Func3_Called, - NULL), "Part 3.1"); - - // Unload plugins one by one - Test_PausePlugin(g_SHPtr, 3); - - pInst->Func1(); - pInst->Func2(); - pInst->Func3(); - - CHECK_STATES((&g_States, - new State_Func1H_Called, - new State_Func1H_Called, - new State_Func1_Called, - new State_Func2_Called, - new State_Func2H_Called, - new State_Func2H_Called, - new State_Func3H_Called, - new State_Func3H_Called, - new State_Func3_Called, - NULL), "Part 3.3.1"); - - Test_PausePlugin(g_SHPtr, 2); - - pInst->Func1(); - pInst->Func2(); - pInst->Func3(); - - CHECK_STATES((&g_States, - new State_Func1H_Called, - new State_Func1_Called, - new State_Func2_Called, - new State_Func2H_Called, - new State_Func3H_Called, - new State_Func3_Called, - NULL), "Part 3.4.1"); - - Test_PausePlugin(g_SHPtr, 1); - - pInst->Func1(); - pInst->Func2(); - pInst->Func3(); - - CHECK_STATES((&g_States, - new State_Func1_Called, - new State_Func2_Called, - new State_Func3_Called, - NULL), "Part 3.5.1"); - - Test_UnpausePlugin(g_SHPtr, 1); - Test_UnpausePlugin(g_SHPtr, 2); - Test_UnpausePlugin(g_SHPtr, 3); - - pInst->Func1(); - pInst->Func2(); - pInst->Func3(); - - CHECK_STATES((&g_States, - new State_Func1H_Called, - new State_Func1H_Called, - new State_Func1H_Called, - new State_Func1_Called, - new State_Func2_Called, - new State_Func2H_Called, - new State_Func2H_Called, - new State_Func2H_Called, - new State_Func3H_Called, - new State_Func3H_Called, - new State_Func3H_Called, - new State_Func3_Called, - NULL), "Part 3.7"); - - // 4) Shutdown :) - Test_CompleteShutdown(g_SHPtr); - - pInst->Func1(); - pInst->Func2(); - pInst->Func3(); - - CHECK_STATES((&g_States, - new State_Func1_Called, - new State_Func2_Called, - new State_Func3_Called, - NULL), "Part 4"); - - return true; -} diff --git a/metamod-source/core/sourcehook/test/testbail.cpp b/metamod-source/core/sourcehook/test/testbail.cpp deleted file mode 100644 index 46f7b9d3..00000000 --- a/metamod-source/core/sourcehook/test/testbail.cpp +++ /dev/null @@ -1,115 +0,0 @@ -// TESTBAIL -// This test used to be a test for a bug BAIL found. -// That bug is now fixed so I've granted BAIL the pleasure of being a test for -// the correct priority ordering of hook managers based on their version. - -/* - THE PROBLEM: - Old hook funcs don't work right when you combine override returns and recalls. - THE SOLUTION: - Always use a new hook func when possible. For this, hook funcs have to be able to say - " HELLO I'M NEW! " - - This file tests that functionality. - - How it works: - testbail.cpp compiles with old version of sourcehook.h. - It sets everything up, adds a hook on a function - Then testbail2.cpp which has the new version adds a hook on the same function and - does a recall and overrides the value in it. -*/ -#include "sourcehook_test.h" -#include "testbail.h" - -namespace N_TestBail -{ - StateList g_States; - SourceHook::ISourceHook *g_SHPtr; - IGaben *g_Gabgab; -} - -namespace -{ - int EatYams_Handler1(int a) - { - ADD_STATE(State_EatYams_Handler1_Called(a)); - RETURN_META_VALUE(MRES_IGNORED, 0); - } -} - -bool TestBail(std::string &error) -{ - GET_SHPTR(g_SHPtr); - g_PLID = 1; - - g_Gabgab = new IGaben; - - SH_ADD_HOOK(IGaben, EatYams, g_Gabgab, SH_STATIC(EatYams_Handler1), false); - - ADD_STATE(State_EatYams_Return(g_Gabgab->EatYams(0xDEAD))); - - CHECK_STATES((&g_States, - new State_EatYams_Handler1_Called(0xDEAD), - new State_EatYams_Called(0xDEAD), - new State_EatYams_Return(5), - NULL), "Part 1"); - - if (!TestBail2(error)) - return false; - - CHECK_STATES((&g_States, - new State_EatYams_Handler1_Called(0xDEAD), - new State_EatYams_Handler2_Called(0xDEAD), - new State_EatYams_Handler3_Called(0xBEEF), - new State_EatYams_Called(0xBEEF), - NULL), "Part 2.1"); - - // WHAT IF NOW SOMEONE UNLOADS PLUGIN 2 !?!?!?!? - Test_UnloadPlugin(g_SHPtr, 2); - - ADD_STATE(State_EatYams_Return(g_Gabgab->EatYams(0xDEAD))); - - CHECK_STATES((&g_States, - new State_EatYams_Handler1_Called(0xDEAD), - new State_EatYams_Called(0xDEAD), - new State_EatYams_Return(5), - NULL), "Part 3"); - - SH_REMOVE_HOOK(IGaben, EatYams, g_Gabgab, SH_STATIC(EatYams_Handler1), false); - - ADD_STATE(State_EatYams_Return(g_Gabgab->EatYams(0xDEAD))); - - CHECK_STATES((&g_States, - new State_EatYams_Called(0xDEAD), - new State_EatYams_Return(5), - NULL), "Part 4"); - - // Now, heh, try it the other way round. - - Test_CompleteShutdown(g_SHPtr); - - if (!TestBail2(error)) - return false; - - CHECK_STATES((&g_States, - new State_EatYams_Handler2_Called(0xDEAD), - new State_EatYams_Handler3_Called(0xBEEF), - new State_EatYams_Called(0xBEEF), - NULL), "Part 5"); - - SH_ADD_HOOK(IGaben, EatYams, g_Gabgab, SH_STATIC(EatYams_Handler1), false); - - ADD_STATE(State_EatYams_Return(g_Gabgab->EatYams(0xDEAD))); - - CHECK_STATES((&g_States, - new State_EatYams_Handler2_Called(0xDEAD), - new State_EatYams_Handler3_Called(0xBEEF), - new State_EatYams_Handler1_Called(0xBEEF), - new State_EatYams_Called(0xBEEF), - new State_EatYams_Return(6), - NULL), "Part 6"); - - delete g_Gabgab; - - return true; -} diff --git a/metamod-source/core/sourcehook/test/testbail.h b/metamod-source/core/sourcehook/test/testbail.h deleted file mode 100644 index 258a49c3..00000000 --- a/metamod-source/core/sourcehook/test/testbail.h +++ /dev/null @@ -1,39 +0,0 @@ -////////////////////////////////////////////////////////////////////////// -// Shared data for testbail - -#include -#include "testevents.h" - -namespace N_TestBail -{ - extern StateList g_States; - extern SourceHook::ISourceHook *g_SHPtr; - - MAKE_STATE_1(State_EatYams_Called, int); - MAKE_STATE_1(State_EatYams_Handler1_Called, int); - MAKE_STATE_1(State_EatYams_Handler2_Called, int); - MAKE_STATE_1(State_EatYams_Handler3_Called, int); - MAKE_STATE_1(State_EatYams_Return, int); - - class IGaben - { - public: - virtual int EatYams(int a) - { - ADD_STATE(State_EatYams_Called(a)); - return 5; - } - }; - - extern IGaben *g_Gabgab; - - bool TestBail2(std::string &error); -} - -using namespace N_TestBail; - -namespace -{ - SourceHook::Plugin g_PLID; - SH_DECL_HOOK1(IGaben, EatYams, SH_NOATTRIB, 0, int, int); -} diff --git a/metamod-source/core/sourcehook/test/testbail2.cpp b/metamod-source/core/sourcehook/test/testbail2.cpp deleted file mode 100644 index d3f7f28a..00000000 --- a/metamod-source/core/sourcehook/test/testbail2.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// TESTBAIL -// Different compilation unit - -#include "sourcehook.h" -#include "sourcehook_test.h" -#include "testbail.h" - - -int EatYams_Handler2(int a) -{ - ADD_STATE(State_EatYams_Handler2_Called(a)); - RETURN_META_VALUE_NEWPARAMS(MRES_OVERRIDE, 6, &IGaben::EatYams, (0xBEEF)); -} - -int EatYams_Handler3(int a) -{ - ADD_STATE(State_EatYams_Handler3_Called(a)); - RETURN_META_VALUE(MRES_IGNORED, 0); -} - -namespace N_TestBail -{ - bool TestBail2(std::string &error) - { - g_PLID = 2; - - SH_ADD_HOOK(IGaben, EatYams, g_Gabgab, SH_STATIC(EatYams_Handler2), false); - SH_ADD_HOOK(IGaben, EatYams, g_Gabgab, SH_STATIC(EatYams_Handler3), false); - - int ret = g_Gabgab->EatYams(0xDEAD); - - CHECK_COND(ret == 6, "Part 2.1"); - - return true; - } -} diff --git a/metamod-source/core/sourcehook/test/testevents.h b/metamod-source/core/sourcehook/test/testevents.h deleted file mode 100644 index 0a3116ec..00000000 --- a/metamod-source/core/sourcehook/test/testevents.h +++ /dev/null @@ -1,214 +0,0 @@ -/* ======== SourceHook ======== -* Copyright (C) 2004-2008 Metamod:Source Development Team -* No warranties of any kind -* -* License: zlib/libpng -* -* Author(s): Pavol "PM OnoTo" Marko -* ============================ -*/ - -#ifndef __TESTEVENTS_H__ -#define __TESTEVENTS_H__ - -#include -#include -#include -#include -#include - -extern bool g_Verbose; - -static unsigned int MakeHash(const char *name) -{ - int a = 0; - unsigned int res = 0xFFFFFFFF; - - while (*name) - { - res ^= ((unsigned int)*name << ((a++ % 4)*8)); - ++name; - } - return res; -} - -struct State -{ - virtual ~State() - { - - } - - virtual bool IsEqual(State *other) - { - return (MakeHash(GetName()) == MakeHash(other->GetName())) ? true : false; - } - - virtual bool Ignore() - { - return false; - } - - virtual void Dump() = 0; - virtual const char *GetName() = 0; -}; - -struct IgnoreState : public State -{ - virtual bool Ignore() - { - return true; - } - virtual void Dump() - { - } -}; - -typedef std::list StateList; -namespace -{ - void DumpStates(StateList *sl) - { - for (StateList::iterator iter = sl->begin(); iter != sl->end(); ++iter) - (*iter)->Dump(); - } - - bool StatesOk(StateList *sl, ...) - { - StateList requiredstates; - va_list argptr; - va_start(argptr, sl); - while (true) - { - State *cs = va_arg(argptr, State*); - if (!cs) - break; - if (cs->Ignore()) - continue; - requiredstates.push_back(cs); - } - va_end(argptr); - - if (requiredstates.size() != sl->size()) - { - if (g_Verbose) - { - std::cout << std::endl << "FAIL: Should be:" << std::endl; - DumpStates(&requiredstates); - std::cout << std::endl << "FAIL: Is:" << std::endl; - DumpStates(sl); - } - - for (StateList::iterator iter = requiredstates.begin(); iter != requiredstates.end(); ++iter) - delete *iter; - for (StateList::iterator iter = sl->begin(); iter != sl->end(); ++iter) - delete *iter; - sl->clear(); - return false; - } - - bool ok = true; - StateList::iterator req_iter = requiredstates.begin(); - for (StateList::iterator o_iter = sl->begin(); o_iter != sl->end(); ++o_iter, ++req_iter) - { - if (!(*o_iter)->IsEqual(*req_iter)) - { - ok = false; - break; - } - } - - if (!ok && g_Verbose) - { - std::cout << std::endl << "FAIL: Should be:" << std::endl; - DumpStates(&requiredstates); - std::cout << std::endl << "FAIL: Is:" << std::endl; - DumpStates(sl); - } - - for (StateList::iterator iter = requiredstates.begin(); iter != requiredstates.end(); ++iter) - delete *iter; - for (StateList::iterator iter = sl->begin(); iter != sl->end(); ++iter) - delete *iter; - sl->clear(); - - return ok; - } -} - -#define ADD_STATE(name) g_States.push_back(new name) -#define ADD_STATE_PTR(statesptr, name) statesptr->push_back(new name) - -#define CHECK_STATES(mwah, myerr) if (!StatesOk mwah) { error=myerr; return false; } else if (g_Verbose) { std::cout << "No error: " << myerr << std::endl; } - -#define MAKE_STATE(name) struct name : State { \ - virtual void Dump() { \ - std::cout << " " << #name << std::endl; } \ - const char *GetName() { return #name; } \ - }; - -#define MAKE_STATE_1(name, p1_type) struct name : State { \ - p1_type m_Param1; \ - name(p1_type param1) : m_Param1(param1) {} \ - virtual bool IsEqual(State *other) { \ - if (MakeHash(GetName()) != MakeHash(other->GetName())) \ - return false; \ - name *other2 = static_cast(other); \ - return other2->m_Param1 == m_Param1;\ - } \ - virtual void Dump() { \ - std::cout << " " << #name << "; Param1=" << m_Param1 << std::endl; } \ - const char *GetName() { return #name; } \ - } - -#define MAKE_STATE_2(name, p1_type, p2_type) struct name : State { \ - p1_type m_Param1; \ - p2_type m_Param2; \ - name(p1_type param1, p2_type param2) : m_Param1(param1), m_Param2(param2) {} \ - virtual bool IsEqual(State *other) { \ - if (MakeHash(GetName()) != MakeHash(other->GetName())) \ - return false; \ - name *other2 = static_cast(other); \ - return other2->m_Param1 == m_Param1 && other2->m_Param2 == m_Param2;\ - } \ - virtual void Dump() { \ - std::cout << " " << #name << "; Param1=" << m_Param1 << "; Param2=" << m_Param2 << std::endl; } \ - const char *GetName() { return #name; } \ - } - -#define MAKE_STATE_3(name, p1_type, p2_type, p3_type) struct name : State { \ - p1_type m_Param1; \ - p2_type m_Param2; \ - p3_type m_Param3; \ - name(p1_type param1, p2_type param2, p3_type param3) : m_Param1(param1), m_Param2(param2), m_Param3(param3) {} \ - virtual bool IsEqual(State *other) { \ - if (MakeHash(GetName()) != MakeHash(other->GetName())) \ - return false; \ - name *other2 = static_cast(other); \ - return other2->m_Param1 == m_Param1 && other2->m_Param2 == m_Param2 && other2->m_Param3 == m_Param3;\ - } \ - virtual void Dump() { \ - std::cout << " " << #name << "; Param1=" << m_Param1 << "; Param2=" << m_Param2 << "; Param3=" << m_Param3 << std::endl; } \ - const char *GetName() { return #name; } \ - } - -#define MAKE_STATE_4(name, p1_type, p2_type, p3_type, p4_type) struct name : State { \ - p1_type m_Param1; \ - p2_type m_Param2; \ - p3_type m_Param3; \ - p4_type m_Param4; \ - name(p1_type param1, p2_type param2, p3_type param3, p4_type param4) : m_Param1(param1), m_Param2(param2), m_Param3(param3), m_Param4(param4) {} \ - virtual bool IsEqual(State *other) { \ - if (MakeHash(GetName()) != MakeHash(other->GetName())) \ - return false; \ - name *other2 = static_cast(other); \ - return other2->m_Param1 == m_Param1 && other2->m_Param2 == m_Param2 && other2->m_Param3 == m_Param3 && other2->m_Param4 == m_Param4;\ - } \ - virtual void Dump() { \ - std::cout << " " << #name << "; Param1=" << m_Param1 << "; Param2=" << m_Param2 << "; Param3=" << m_Param3 << "; Param4=" << m_Param4 << std::endl; } \ - const char *GetName() { return #name; } \ - } - -#define CHECK_COND(c, err) if (!(c)) { error = err; return false; } - -#endif diff --git a/metamod-source/core/sourcehook/test/testhookmangen.cpp b/metamod-source/core/sourcehook/test/testhookmangen.cpp deleted file mode 100644 index 9c0307e4..00000000 --- a/metamod-source/core/sourcehook/test/testhookmangen.cpp +++ /dev/null @@ -1,1232 +0,0 @@ -#include -#include -#include "sourcehook.h" -#include "sourcehook_test.h" -#include "testevents.h" -#include "sh_memory.h" -#include "sh_pagealloc.h" -#include "sourcehook_pibuilder.h" - -// TESTHOOKMANGEN -// Test automatic hookman generation -// Tests void and non-void functions -// 0 to 6 params: -// integer-type, float-type, plain-old-data struct and objects with ctors/dtors -// both byval and byref -// also tests ignore/supercede -// also tests recalls - -// :TODO: test override as well - -namespace -{ - StateList g_States; - SourceHook::ISourceHook *g_SHPtr; - SourceHook::Plugin g_PLID; - - SourceHook::IHookManagerAutoGen *g_HMAGPtr; - - // PtrBuf(ptr) gives ptrs unique numbers - // in the order they appear - SourceHook::List g_PtrHash; - - bool g_Inside_LeafFunc = false; // inside a hook or a func - bool g_Silent_CtorDtor = false; // inside a hook or a func - - - // POD / Object types - template - struct POD - { - char x[MYSIZE]; - - bool operator==(const POD &other) - { - return memcmp(reinterpret_cast(x), reinterpret_cast(other.x), MYSIZE) == 0; - } - - bool operator==(char other) - { - for (int i = 0; i < MYSIZE; ++i) - { - if (x[i] != other) - return false; - } - return true; - } - }; - - template - std::ostream& operator <<(std::ostream &os, const POD &obj) - { - os << "Some POD!"; - return os; - } - - MAKE_STATE_1(State_ObjOCtor_Called, int /*MYSIZE*/); - MAKE_STATE_1(State_ObjCCtor_Called, int /*MYSIZE*/); - MAKE_STATE_1(State_ObjODtor_Called, int /*MYSIZE*/); - MAKE_STATE_1(State_ObjAssignOp_Called, int /*MYSIZE*/); - - template - struct Object - { - char x[MYSIZE]; - - Object(char initch) - { - memset(reinterpret_cast(x), initch, MYSIZE); - if (!g_Inside_LeafFunc && !g_Silent_CtorDtor) - ADD_STATE(State_ObjOCtor_Called(MYSIZE)); - } - - Object() - { - if (!g_Inside_LeafFunc && !g_Silent_CtorDtor) - ADD_STATE(State_ObjOCtor_Called(MYSIZE)); - } - - Object(const Object & other) - { - memcpy(reinterpret_cast(x), reinterpret_cast(other.x), MYSIZE); - if (!g_Inside_LeafFunc && !g_Silent_CtorDtor) - ADD_STATE(State_ObjCCtor_Called(MYSIZE)); - } - - ~Object() - { - if (!g_Inside_LeafFunc && !g_Silent_CtorDtor) - ADD_STATE(State_ObjODtor_Called(MYSIZE)); - } - - Object & operator = (const Object &other) - { - if (!g_Inside_LeafFunc && !g_Silent_CtorDtor) - ADD_STATE(State_ObjAssignOp_Called(MYSIZE)); - - memcpy(reinterpret_cast(x), reinterpret_cast(other.x), MYSIZE); - - return *this; - } - - bool operator==(const Object &other) - { - return memcmp(reinterpret_cast(x), reinterpret_cast(other.x), MYSIZE) == 0; - } - }; - - template - std::ostream& operator <<(std::ostream &os, const Object &obj) - { - os << "Some Obj" << static_cast(obj.x[0]); - return os; - } - - // Because of some weird bug in MSVC < 1400 -#define MAKE_PODRET(size) \ - struct PodRet##size \ - { \ - POD actPod; \ - bool operator==(const PodRet##size &other) { return actPod == other.actPod; } \ - bool operator==(char other) { return actPod == other; } \ - }; \ - std::ostream& operator <<(std::ostream &os, const PodRet##size &obj) \ - { \ - os << obj.actPod; \ - return os; \ - } \ - template <> struct MakeRet< PodRet##size > \ - { \ - static PodRet##size Do(int a) \ - { \ - PodRet##size x; \ - memset(reinterpret_cast(x.actPod.x), a, size); \ - return x; \ - } \ - }; - -#define MAKE_OBJRET(size) \ - struct ObjRet##size \ - { \ - Object actObj; \ - bool operator==(const ObjRet##size &other) { return actObj == other.actObj; } \ - bool operator==(char other) { return actObj == other; } \ - }; \ - std::ostream& operator <<(std::ostream &os, const ObjRet##size &obj) \ - { \ - os << obj.actObj; \ - return os; \ - } \ - template <> struct MakeRet< ObjRet##size > \ - { \ - static ObjRet##size Do(int a) NO_OPTIMIZE \ - { \ - ObjRet##size *x = new ObjRet##size; /* ptr: otherwise gcc optimizes away the temp obj */ \ - CAutoPtrDestruction< ObjRet##size > apd(x); \ - memset(reinterpret_cast(x->actObj.x), a, size); \ - return *x; \ - } \ - }; - - - - // "Increment" something: (reproducible change for recall tests) - // integer: ++ - // float: += 1.3 - // pod/object: x[i]++, 0 <= i < MYSIZE - template - struct Increment - { - static void Incr(T &what) - { - ++what; - } - }; - - template<> - struct Increment - { - static void Incr(float &what) - { - what += 1.3f; - } - }; - - template<> - struct Increment - { - static void Incr(double &what) - { - what += 1.3; - } - }; - - template - struct Increment< POD > - { - static void Incr(POD &what) - { - for (int i = 0; i < MYSIZE; ++i) - ++ what.x[i]; - } - }; - - template - struct Increment< Object > - { - static void Incr(Object &what) - { - for (int i = 0; i < MYSIZE; ++i) - ++ what.x[i]; - } - }; - - template<> - struct Increment - { - static void Incr(std::string &what) - { - what += "!"; - } - }; - - #include "testhookmangen.h" - - template - int PtrBuf(T ptr) - { - int a = 0; - - const void *vptr = reinterpret_cast(ptr); - for (SourceHook::List::iterator iter = g_PtrHash.begin(); iter != g_PtrHash.end(); ++iter) - { - if (*iter == vptr) - return a; - else - ++a; - } - g_PtrHash.push_back(vptr); - return static_cast(g_PtrHash.size()) - 1; - } - - template - T PtrBufPtr(T ptr) - { - PtrBuf(ptr); - return ptr; - } - - void PtrBuf_Clear(int leave_in = 0) - { - for (SourceHook::List::iterator iter = g_PtrHash.begin(); iter != g_PtrHash.end();) - { - if (--leave_in < 0) - iter = g_PtrHash.erase(iter); - else - ++iter; - } - } - - // MyDelegate base class for other delegates - class MyDelegate : public SourceHook::ISHDelegate - { - // Unneeded - // because we don't use old SH_REMOVE_HOOK syntax - virtual bool IsEqual(SourceHook::ISHDelegate *pOtherDeleg) - { - return false; - } - - virtual void DeleteThis() - { - delete this; - } - }; - - THGM_MAKE_TEST0_void(0); - THGM_SETUP_PI0(0); - - THGM_MAKE_TEST1_void(1, char); - THGM_SETUP_PI1(1, char, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST1_void(2, short); - THGM_SETUP_PI1(2, short, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST1_void(3, int); - THGM_SETUP_PI1(3, int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST1_void(4, float); - THGM_SETUP_PI1(4, float, SourceHook::PassInfo::PassType_Float, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST1_void(5, double); - THGM_SETUP_PI1(5, double, SourceHook::PassInfo::PassType_Float, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST5_void(6, char, short, int, float, double); - THGM_SETUP_PI5(6, - char, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal, - short, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal, - int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal, - float, SourceHook::PassInfo::PassType_Float, SourceHook::PassInfo::PassFlag_ByVal, - double, SourceHook::PassInfo::PassType_Float, SourceHook::PassInfo::PassFlag_ByVal - ); - - THGM_MAKE_TEST2_void(7, char&, double&); - THGM_SETUP_PI2(7, - char&, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByRef, - double&, SourceHook::PassInfo::PassType_Float, SourceHook::PassInfo::PassFlag_ByRef - ); - - THGM_MAKE_TEST1_void(8, POD<7>); - THGM_SETUP_PI1(8, POD<7>, SourceHook::PassInfo::PassType_Object, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST1_void(9, POD<600>); - THGM_SETUP_PI1(9, POD<600>, SourceHook::PassInfo::PassType_Object, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST1_void(10, POD<600> &); - THGM_SETUP_PI1(10, POD<600> &, SourceHook::PassInfo::PassType_Object, SourceHook::PassInfo::PassFlag_ByRef); - - THGM_MAKE_TEST2_void(11, Object<3>, Object<600>&); - THGM_SETUP_PI2(11, - Object<3>, SourceHook::PassInfo::PassType_Object, (SourceHook::PassInfo::PassFlag_ByVal | SourceHook::PassInfo::PassFlag_OCtor | SourceHook::PassInfo::PassFlag_ODtor | SourceHook::PassInfo::PassFlag_CCtor), - Object<600> &, SourceHook::PassInfo::PassType_Object, (SourceHook::PassInfo::PassFlag_ByRef | SourceHook::PassInfo::PassFlag_OCtor | SourceHook::PassInfo::PassFlag_ODtor | SourceHook::PassInfo::PassFlag_CCtor) - ); - - THGM_MAKE_TEST0(101, char); - THGM_SETUP_PI0(101); - THGM_SETUP_RI(101, char, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST0(102, short); - THGM_SETUP_PI0(102); - THGM_SETUP_RI(102, short, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST0(103, int); - THGM_SETUP_PI0(103); - THGM_SETUP_RI(103, int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST0(104, float); - THGM_SETUP_PI0(104); - THGM_SETUP_RI(104, float, SourceHook::PassInfo::PassType_Float, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST0(105, double); - THGM_SETUP_PI0(105); - THGM_SETUP_RI(105, double, SourceHook::PassInfo::PassType_Float, SourceHook::PassInfo::PassFlag_ByVal); - - // pod 1-13 - MAKE_PODRET(1); - THGM_MAKE_TEST1(106, PodRet1, int); - THGM_SETUP_PI1(106, - int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal - ); - THGM_SETUP_RI(106, PodRet1, SourceHook::PassInfo::PassType_Object, SourceHook::PassInfo::PassFlag_ByVal); - - MAKE_PODRET(4); - THGM_MAKE_TEST1(107, PodRet4, int); - THGM_SETUP_PI1(107, - int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal - ); - THGM_SETUP_RI(107, PodRet4, SourceHook::PassInfo::PassType_Object, SourceHook::PassInfo::PassFlag_ByVal); - - MAKE_PODRET(8); - THGM_MAKE_TEST1(108, PodRet8, int); - THGM_SETUP_PI1(108, - int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal - ); - THGM_SETUP_RI(108, PodRet8, SourceHook::PassInfo::PassType_Object, SourceHook::PassInfo::PassFlag_ByVal); - - MAKE_PODRET(13); - THGM_MAKE_TEST1(109, PodRet13, int); - THGM_SETUP_PI1(109, - int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal - ); - THGM_SETUP_RI(109, PodRet13, SourceHook::PassInfo::PassType_Object, SourceHook::PassInfo::PassFlag_ByVal); - - MAKE_OBJRET(13); - THGM_MAKE_TEST1(110, ObjRet13, int); - THGM_SETUP_PI1(110, - int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal - ); - THGM_SETUP_RI(110, ObjRet13, SourceHook::PassInfo::PassType_Object, - (SourceHook::PassInfo::PassFlag_ByVal | SourceHook::PassInfo::PassFlag_OCtor | SourceHook::PassInfo::PassFlag_ODtor | - SourceHook::PassInfo::PassFlag_CCtor | SourceHook::PassInfo::PassFlag_AssignOp)); - - MAKE_OBJRET(111); - ObjRet111 g_O111_0; - ObjRet111 g_O111_1; - ObjRet111 g_O111_2; - ObjRet111 g_O111_3; - ObjRet111 g_O111_4; - - template <> - struct MakeRet< ObjRet111& > - { - static ObjRet111 &Do(int a) - { - switch (a) - { - case 0: - return g_O111_0; - case 1: - return g_O111_1; - case 2: - return g_O111_2; - case 3: - return g_O111_3; - default: - return g_O111_4; - } - } - }; - - THGM_MAKE_TEST0(111, ObjRet111& ); - THGM_SETUP_PI0(111); - THGM_SETUP_RI(111, ObjRet111& , SourceHook::PassInfo::PassType_Object, - (SourceHook::PassInfo::PassFlag_ByRef | SourceHook::PassInfo::PassFlag_OCtor | SourceHook::PassInfo::PassFlag_ODtor | - SourceHook::PassInfo::PassFlag_CCtor | SourceHook::PassInfo::PassFlag_AssignOp)); - - - THGM_MAKE_TEST3_void(150, int, double, int); - THGM_SETUP_PI3(150, - int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal, - double, SourceHook::PassInfo::PassType_Float, SourceHook::PassInfo::PassFlag_ByVal, - int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal); - - // vafmt tests - THGM_MAKE_TEST0_vafmt_void(200); - THGM_SETUP_PI0(200); - - THGM_MAKE_TEST1_vafmt_void(201, char); - THGM_SETUP_PI1(201, char, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST1_vafmt_void(203, int); - THGM_SETUP_PI1(203, int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST5_vafmt_void(206, char, short, int, float, double); - THGM_SETUP_PI5(206, - char, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal, - short, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal, - int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal, - float, SourceHook::PassInfo::PassType_Float, SourceHook::PassInfo::PassFlag_ByVal, - double, SourceHook::PassInfo::PassType_Float, SourceHook::PassInfo::PassFlag_ByVal - ); - - THGM_MAKE_TEST2_vafmt_void(207, char&, double&); - THGM_SETUP_PI2(207, - char&, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByRef, - double&, SourceHook::PassInfo::PassType_Float, SourceHook::PassInfo::PassFlag_ByRef - ); - - THGM_MAKE_TEST1_vafmt_void(208, POD<7>); - THGM_SETUP_PI1(208, POD<7>, SourceHook::PassInfo::PassType_Object, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST1_vafmt_void(210, POD<600> &); - THGM_SETUP_PI1(210, POD<600> &, SourceHook::PassInfo::PassType_Object, SourceHook::PassInfo::PassFlag_ByRef) - - THGM_MAKE_TEST1_vafmt(211, int, int); - THGM_SETUP_PI1(211, - int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal - ); - THGM_SETUP_RI(211, int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST1_vafmt(212, double, int); - THGM_SETUP_PI1(212, - int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal - ); - THGM_SETUP_RI(212, double, SourceHook::PassInfo::PassType_Float, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST1_vafmt(213, PodRet8, int); - THGM_SETUP_PI1(213, - int, SourceHook::PassInfo::PassType_Basic, SourceHook::PassInfo::PassFlag_ByVal - ); - THGM_SETUP_RI(213, PodRet8, SourceHook::PassInfo::PassType_Object, SourceHook::PassInfo::PassFlag_ByVal); - - THGM_MAKE_TEST1_vafmt_void(214, Object<133>); - THGM_SETUP_PI1(214, Object<133>, SourceHook::PassInfo::PassType_Object, - (SourceHook::PassInfo::PassFlag_ByVal | SourceHook::PassInfo::PassFlag_OCtor | SourceHook::PassInfo::PassFlag_ODtor | - SourceHook::PassInfo::PassFlag_CCtor | SourceHook::PassInfo::PassFlag_AssignOp)); - - - MAKE_STATE(State_Hello_Func4_Called); - MAKE_STATE(State_Hello_Func79_Called); - - MAKE_STATE(State_Hello_Func4_PreHook); - MAKE_STATE(State_Hello_Func79_PreHook); - - // Test for larger vtable indices - class Hello - { - public: - virtual void Func0() {} - virtual void Func1() {} - virtual void Func2() {} - virtual void Func3() {} - virtual void Func4() - { - ADD_STATE(State_Hello_Func4_Called); - } - virtual void Func5() {} - virtual void Func6() {} - virtual void Func7() {} - virtual void Func8() {} - virtual void Func9() {} - virtual void Func10() {} - virtual void Func11() {} - virtual void Func12() {} - virtual void Func13() {} - virtual void Func14() {} - virtual void Func15() {} - virtual void Func16() {} - virtual void Func17() {} - virtual void Func18() {} - virtual void Func19() {} - virtual void Func20() {} - virtual void Func21() {} - virtual void Func22() {} - virtual void Func23() {} - virtual void Func24() {} - virtual void Func25() {} - virtual void Func26() {} - virtual void Func27() {} - virtual void Func28() {} - virtual void Func29() {} - virtual void Func30() {} - virtual void Func31() {} - virtual void Func32() {} - virtual void Func33() {} - virtual void Func34() {} - virtual void Func35() {} - virtual void Func36() {} - virtual void Func37() {} - virtual void Func38() {} - virtual void Func39() {} - virtual void Func40() {} - virtual void Func41() {} - virtual void Func42() {} - virtual void Func43() {} - virtual void Func44() {} - virtual void Func45() {} - virtual void Func46() {} - virtual void Func47() {} - virtual void Func48() {} - virtual void Func49() {} - virtual void Func50() {} - virtual void Func51() {} - virtual void Func52() {} - virtual void Func53() {} - virtual void Func54() {} - virtual void Func55() {} - virtual void Func56() {} - virtual void Func57() {} - virtual void Func58() {} - virtual void Func59() {} - virtual void Func60() {} - virtual void Func61() {} - virtual void Func62() {} - virtual void Func63() {} - virtual void Func64() {} - virtual void Func65() {} - virtual void Func66() {} - virtual void Func67() {} - virtual void Func68() {} - virtual void Func69() {} - virtual void Func70() {} - virtual void Func71() {} - virtual void Func72() {} - virtual void Func73() {} - virtual void Func74() {} - virtual void Func75() {} - virtual void Func76() {} - virtual void Func77() {} - virtual void Func78() {} - virtual void Func79() - { - ADD_STATE(State_Hello_Func79_Called); - } - }; - class Hello_Func4_Deleg : public MyDelegate - { - virtual void Func() - { - ADD_STATE(State_Hello_Func4_PreHook); - } - }; - class Hello_Func79_Deleg : public MyDelegate - { - int a; - virtual void Func() - { - ADD_STATE(State_Hello_Func79_PreHook); - } - }; - - bool Tests1(std::string &error) - { - THGM_DO_TEST_void(0, ()); - - THGM_DO_TEST_void(1, (100)); - - THGM_DO_TEST_void(2, (0x1F00)); - - THGM_DO_TEST_void(3, (0x1F000000)); - - THGM_DO_TEST_void(4, (0.5f)); - - THGM_DO_TEST_void(5, (5.5)); - - THGM_DO_TEST_void(6, (100, 0x1f00, 0x1f000000, 0.5f, 5.5)); - - return true; - } - - bool Tests2(std::string &error) - { - char a = 5; - double b = 233.33; - THGM_DO_TEST_void(7, (a, b)); - - POD<7> pod7 = MakeRet< POD<7> >::Do(78); - THGM_DO_TEST_void(8, (pod7)); - - POD<600> pod600 = MakeRet< POD<600> >::Do(34); - THGM_DO_TEST_void(9, (pod600)); - - THGM_DO_TEST_void(10, (pod600)); - - // Test11: Special: constructors/destructors - PtrBuf_Clear(); - Object<3> *obj3_real = new Object<3>(33); - Object<600> *obj600_real = new Object<600>(21); - - Object<3> & obj3 = *obj3_real; - Object<600> & obj600 = *obj600_real; - - CHECK_STATES((&g_States, - new State_ObjOCtor_Called(3), - new State_ObjOCtor_Called(600), - NULL), "Test11 Part0"); - - setuppi_11(); - SourceHook::HookManagerPubFunc myhookman11 = g_HMAGPtr->MakeHookMan(protoinfo_11, 0, 0); \ - CAutoReleaseHookMan arhm_11(myhookman11); \ - int hook1_11, hook2_11, hook3_11, hook4_11; - - TestClass11 *pTest11 = new TestClass11; - CAutoPtrDestruction apd11(pTest11); - - /* no hooks - no hooks */ - PtrBuf_Clear(); - pTest11->Func(obj3, obj600); - - g_Inside_LeafFunc = true; - CHECK_STATES((&g_States, - new State_ObjCCtor_Called(3), - new State_Func11(pTest11, ParamState_m11 (obj3, obj600)), - new State_ObjODtor_Called(3), - NULL), "Test" "11" " Part1"); - g_Inside_LeafFunc = false; - - /* hook1 - no hooks */ - THGM_ADD_HOOK(11, 1); - - PtrBuf_Clear(); - pTest11->Func(obj3, obj600); - g_Inside_LeafFunc = true; - CHECK_STATES((&g_States, - new State_ObjCCtor_Called(3), - - new State_ObjCCtor_Called(3), - new State_Deleg_11(1, pTest11, 0, ParamState_m11 (obj3, obj600)), - new State_ObjODtor_Called(3), - - new State_ObjCCtor_Called(3), - new State_Func11(pTest11, ParamState_m11 (obj3, obj600)), - new State_ObjODtor_Called(3), - - new State_ObjODtor_Called(3), - NULL), "Test" "11" " Part2"); - g_Inside_LeafFunc = false; - - THGM_REMOVE_HOOK(11, 1); - - /* hook1, hook2 - hook3, hook4 */ - THGM_ADD_HOOK(11, 1); - THGM_ADD_HOOK(11, 2); - THGM_ADD_HOOK(11, 3); - THGM_ADD_HOOK(11, 4); - PtrBuf_Clear(); - pTest11->Func(obj3, obj600); - g_Inside_LeafFunc = true; - CHECK_STATES((&g_States, - new State_ObjCCtor_Called(3), - - new State_ObjCCtor_Called(3), - new State_Deleg_11(1, pTest11, 0, ParamState_m11 (obj3, obj600)), - new State_ObjODtor_Called(3), - - new State_ObjCCtor_Called(3), - new State_Deleg_11(2, pTest11, 1, ParamState_m11 (obj3, obj600)), - new State_ObjODtor_Called(3), - - new State_ObjCCtor_Called(3), - new State_Deleg_11(3, pTest11, 2, ParamState_m11 (obj3, obj600)), - new State_ObjODtor_Called(3), - - new State_ObjCCtor_Called(3), - new State_Deleg_11(4, pTest11, 3, ParamState_m11 (obj3, obj600)), - new State_ObjODtor_Called(3), - - new State_ObjODtor_Called(3), - NULL), "Test" "11" " Part3"); - g_Inside_LeafFunc = false; - - /* hook1 - hook3, hook4 WITH RECALLS */ - THGM_REMOVE_HOOK(11, 2); - PtrBuf_Clear(); - TestClass11::ms_DoRecall = true; - pTest11->Func(obj3, obj600); - g_Inside_LeafFunc = true; - CHECK_STATES((&g_States, - new State_ObjCCtor_Called(3), - - new State_ObjCCtor_Called(3), - new State_Deleg_11(1, pTest11, 0 /* first deleg ptr */, ParamState_m11 (obj3, obj600)), - - // recall ! - // second hookfunc -> new copy - new State_ObjCCtor_Called(3), - - // in second hookfunc now - // -> calls orig func - - new State_ObjCCtor_Called(3), - new State_Func11(pTest11, ParamState_m11 (obj3, obj600)(1)), - new State_ObjODtor_Called(3), - - // calls first posthook - new State_ObjCCtor_Called(3), - new State_Deleg_11(3, pTest11, 1 /* second deleg ptr */, ParamState_m11 (obj3, obj600)(1)), - - // recall! - // third hookfunc -> new copy - new State_ObjCCtor_Called(3), - - // calls second posthook - - new State_ObjCCtor_Called(3), - new State_Deleg_11(4, pTest11, 2 /* third deleg ptr */, ParamState_m11 (obj3, obj600)(2)), - - // recall! - // fourth hookfunc -> new copy - new State_ObjCCtor_Called(3), - - // has nothing to do though! - - // fourth hookfunc done -> ret - new State_ObjODtor_Called(3), - - // third hookfunc done -> ret - new State_ObjODtor_Called(3), - // ret from hookhandler which did the recall - new State_ObjODtor_Called(3), - - // second hookfunc done -> ret - new State_ObjODtor_Called(3), - // ret from hookhandler which did the recall - new State_ObjODtor_Called(3), - - // deleg1's instance - new State_ObjODtor_Called(3), - // first hookfunc done -> ret - new State_ObjODtor_Called(3), - NULL), "Test" "11" " Part4"); - g_Inside_LeafFunc = false; - - THGM_REMOVE_HOOK(11, 1); - THGM_REMOVE_HOOK(11, 3); - THGM_REMOVE_HOOK(11, 4); - - delete obj3_real; - delete obj600_real; - - CHECK_STATES((&g_States, - new State_ObjODtor_Called(3), - new State_ObjODtor_Called(600), - NULL), "Test11 Part100"); - - return true; - } - - bool Tests3(std::string &error) - { - THGM_DO_TEST(101, ()); - - THGM_DO_TEST(102, ()); - - THGM_DO_TEST(103, ()); - - THGM_DO_TEST(104, ()); - - THGM_DO_TEST(105, ()); - - // pod returns - THGM_DO_TEST(106, (5)); - THGM_DO_TEST(107, (5)); - THGM_DO_TEST(108, (5)); - THGM_DO_TEST(109, (5)); - - return true; - } - - bool Tests4(std::string &error) - { - // Test110: Special: constructors/destructors on return - PtrBuf_Clear(); - ObjRet13 *obj13_real = new ObjRet13; - ObjRet13 &obj13 = *obj13_real; - - CHECK_STATES((&g_States, - new State_ObjOCtor_Called(13), - NULL), "Test110 Part0"); - - setuppi_110(); - setupri_110(); - - SourceHook::HookManagerPubFunc myhookman110 = g_HMAGPtr->MakeHookMan(protoinfo_110, 0, 0); \ - CAutoReleaseHookMan arhm_110(myhookman110); \ - int hook1_110, hook2_110, hook3_110, hook4_110; - - TestClass110 *pTest110 = new TestClass110; - CAutoPtrDestruction apd110(pTest110); - - /* no hooks - no hooks */ - PtrBuf_Clear(); - obj13 = pTest110->Func(5); - - g_Inside_LeafFunc = true; - CHECK_STATES((&g_States, - new State_Func110(pTest110, ParamState_m110 (5)), - new State_ObjOCtor_Called(13), // MakeRet: Construction of x - new State_ObjCCtor_Called(13), // Return from MakeRet -> construct temporary object in our stack - new State_ObjODtor_Called(13), // MakeRet: Destruction of x - - new State_ObjAssignOp_Called(13), // assign: obj13 = temporary object in our stack - new State_ObjODtor_Called(13), // Func110: destruction of temporary object - NULL), "Test" "110" " Part1"); - g_Inside_LeafFunc = false; - - /* hook1 - no hooks */ - THGM_ADD_HOOK(110, 1); - - PtrBuf_Clear(); - obj13 = pTest110->Func(5); - g_Inside_LeafFunc = true; - CHECK_STATES((&g_States, - // HookFunc: construct orig_ret/override_ret/plugin_ret objects - new State_ObjOCtor_Called(13), - new State_ObjOCtor_Called(13), - new State_ObjOCtor_Called(13), - - // Calling delegate - new State_Deleg_110(1, pTest110, 0, ParamState_m110 (5)), - - new State_ObjOCtor_Called(13), // MakeRet: Construction of x - new State_ObjCCtor_Called(13), // Return from MakeRet -> construct temporary object in HookFunc's stack - new State_ObjODtor_Called(13), // MakeRet: Destruction of x - - // back in hookfunc - new State_ObjAssignOp_Called(13), // assign: plugin_ret = temporary object in HookFunc's stack - new State_ObjODtor_Called(13), // destruction of temporary object in HookFunc's stack - - // Calling orig function Func110 - new State_Func110(pTest110, ParamState_m110 (5)), - new State_ObjOCtor_Called(13), // MakeRet: Construction of x - new State_ObjCCtor_Called(13), // Return from MakeRet -> construct temporary object in HookFunc's stack - new State_ObjODtor_Called(13), // MakeRet: Destruction of x - - // back in hookfunc - new State_ObjAssignOp_Called(13), // assign: orig_ret = temporary object in HookFunc's stack - new State_ObjODtor_Called(13), // destruction of temporary object in HookFunc's stack - - // hookfunc is returning: - new State_ObjCCtor_Called(13), // copy to temp object in our stack - - // hookfunc cleans up its stack -> destroys plugin_ret/override_ret/orig_ret - new State_ObjODtor_Called(13), - new State_ObjODtor_Called(13), - new State_ObjODtor_Called(13), - - // we are in our function: assign - new State_ObjAssignOp_Called(13), // assign: obj13 = temporary object in our stack - new State_ObjODtor_Called(13), // Func110: destruction of temporary object - - NULL), "Test" "11" " Part2"); - - CHECK_COND(obj13 == 0, "Test" "11" " Part 2.1"); - g_Inside_LeafFunc = false; - - THGM_REMOVE_HOOK(110, 1); - - /* hook1, hook2 - hook3, hook4 */ - THGM_ADD_HOOK(110, 1); - THGM_ADD_HOOK(110, 2); - THGM_ADD_HOOK(110, 3); - THGM_ADD_HOOK(110, 4); - - PtrBuf_Clear(); - obj13 = pTest110->Func(5); - g_Inside_LeafFunc = true; - CHECK_STATES((&g_States, - // HookFunc: construct orig_ret/override_ret/plugin_ret objects - new State_ObjOCtor_Called(13), - new State_ObjOCtor_Called(13), - new State_ObjOCtor_Called(13), - - // Calling delegate1 - new State_Deleg_110(1, pTest110, 0, ParamState_m110 (5)), - - new State_ObjOCtor_Called(13), // MakeRet: Construction of x - new State_ObjCCtor_Called(13), // Return from MakeRet -> construct temporary object in HookFunc's stack - new State_ObjODtor_Called(13), // MakeRet: Destruction of x - - // back in hookfunc - new State_ObjAssignOp_Called(13), // assign: plugin_ret = temporary object in HookFunc's stack - new State_ObjODtor_Called(13), // destruction of temporary object in HookFunc's stack - - - // Calling delegate2 - new State_Deleg_110(2, pTest110, 1, ParamState_m110 (5)), - - new State_ObjOCtor_Called(13), // MakeRet: Construction of x - new State_ObjCCtor_Called(13), // Return from MakeRet -> construct temporary object in HookFunc's stack - new State_ObjODtor_Called(13), // MakeRet: Destruction of x - - // back in hookfunc - new State_ObjAssignOp_Called(13), // assign: plugin_ret = temporary object in HookFunc's stack - new State_ObjODtor_Called(13), // destruction of temporary object in HookFunc's stack - - // hookfunc finds out that the hook wanted to SUPERCEDE --> copy to override_Ret - new State_ObjAssignOp_Called(13), - - // SUPERCEDE -> orig function is not called - // instead: orig_ret = override_ret - new State_ObjAssignOp_Called(13), - - // Calling delegate3 - new State_Deleg_110(3, pTest110, 2, ParamState_m110 (5)), - - new State_ObjOCtor_Called(13), // MakeRet: Construction of x - new State_ObjCCtor_Called(13), // Return from MakeRet -> construct temporary object in HookFunc's stack - new State_ObjODtor_Called(13), // MakeRet: Destruction of x - - // back in hookfunc - new State_ObjAssignOp_Called(13), // assign: plugin_ret = temporary object in HookFunc's stack - new State_ObjODtor_Called(13), // destruction of temporary object in HookFunc's stack - - // Calling delegate4 - new State_Deleg_110(4, pTest110, 3, ParamState_m110 (5)), - - new State_ObjOCtor_Called(13), // MakeRet: Construction of x - new State_ObjCCtor_Called(13), // Return from MakeRet -> construct temporary object in HookFunc's stack - new State_ObjODtor_Called(13), // MakeRet: Destruction of x - - // back in hookfunc - new State_ObjAssignOp_Called(13), // assign: plugin_ret = temporary object in HookFunc's stack - new State_ObjODtor_Called(13), // destruction of temporary object in HookFunc's stack - - // hookfunc finds out that the hook wanted to SUPERCEDE --> copy to override_Ret (yes really, we overwrite the old value!) - new State_ObjAssignOp_Called(13), - - // hookfunc is returning: - new State_ObjCCtor_Called(13), // copy to temp object in our stack - - // hookfunc cleans up its stack -> destroys plugin_ret/override_ret/orig_ret - new State_ObjODtor_Called(13), - new State_ObjODtor_Called(13), - new State_ObjODtor_Called(13), - - // we are in our function: assign - new State_ObjAssignOp_Called(13), // assign: obj13 = temporary object in our stack - new State_ObjODtor_Called(13), // Func110: destruction of temporary object - - NULL), "Test" "11" " Part3"); - - CHECK_COND(obj13 == 4, "Test" "11" " Part 3.1"); - g_Inside_LeafFunc = false; - - THGM_REMOVE_HOOK(110, 1); - THGM_REMOVE_HOOK(110, 2); - THGM_REMOVE_HOOK(110, 3); - THGM_REMOVE_HOOK(110, 4); - - delete obj13_real; - - CHECK_STATES((&g_States, - new State_ObjODtor_Called(13), - NULL), "Test110 Part100"); - - - THGM_DO_TEST_void(150, (5, 5.5, 6)); - - return true; - } - - bool Tests5(std::string &error) - { - // RefRet - THGM_DO_TEST(111, ()); - - // Vafmt - - THGM_DO_TEST_void(200, ("Hello %s%d%s", "BA", 1, "L!")); - - THGM_DO_TEST_void(201, (100, "Hello %s%d%s", "BA", 1, "L!")); - - THGM_DO_TEST_void(203, (0x1F000000, "Hello %s%d%s", "BA", 1, "L!")); - - THGM_DO_TEST_void(206, (100, 0x1f00, 0x1f000000, 0.5f, 5.5, "Hello %s%d%s", "BA", 1, "L!")); - - char a = 5; - double b = 233.33; - THGM_DO_TEST_void(207, (a, b, "Hello %s%d%s", "BA", 1, "L!")); - - POD<7> pod7 = MakeRet< POD<7> >::Do(78); - THGM_DO_TEST_void(208, (pod7, "Hello %s%d%s", "BA", 1, "L!")); - - POD<600> pod600 = MakeRet< POD<600> >::Do(34); - THGM_DO_TEST_void(210, (pod600, "Hello %s%d%s", "BA", 1, "L!")); - - - THGM_DO_TEST(211, (5, "Hello %s%d%s", "BA", 1, "L!")); - THGM_DO_TEST(212, (5, "Hello %s%d%s", "BA", 1, "L!")); - THGM_DO_TEST(213, (5, "Hello %s%d%s", "BA", 1, "L!")); - - // Silence Object's ctors/dtors: we only want a forced byref param - g_Silent_CtorDtor = true; - Object<133> *myobj133 = new Object<133>; - THGM_DO_TEST_void(214, (*myobj133, "Hello %s%d%s", "BA", 1, "L!")); - delete myobj133; - g_Silent_CtorDtor = false; - - // Test for high vtable indices - Hello *pHello = new Hello; - CAutoPtrDestruction apdHello(pHello); - SourceHook::CProtoInfoBuilder helloPi(SourceHook::ProtoInfo::CallConv_ThisCall); - SourceHook::HookManagerPubFunc helloHM_4 = g_HMAGPtr->MakeHookMan(helloPi, 0, 4); - SourceHook::HookManagerPubFunc helloHM_79 = g_HMAGPtr->MakeHookMan(helloPi, 0, 79); - - pHello->Func4(); - pHello->Func79(); - SH_CALL(pHello, &Hello::Func4)(); - SH_CALL(pHello, &Hello::Func79)(); - CHECK_STATES((&g_States, - new State_Hello_Func4_Called, - new State_Hello_Func79_Called, - new State_Hello_Func4_Called, - new State_Hello_Func79_Called, - NULL), "Test" "Hello" " Part1"); - - int helloHook4 = g_SHPtr->AddHook(g_PLID, SourceHook::ISourceHook::Hook_Normal, reinterpret_cast(pHello), - 0, helloHM_4, new Hello_Func4_Deleg, false); - - int helloHook79 = g_SHPtr->AddHook(g_PLID, SourceHook::ISourceHook::Hook_Normal, reinterpret_cast(pHello), - 0, helloHM_79, new Hello_Func79_Deleg, false); - - pHello->Func4(); - pHello->Func79(); - SH_CALL(pHello, &Hello::Func4)(); - SH_CALL(pHello, &Hello::Func79)(); - - CHECK_STATES((&g_States, - new State_Hello_Func4_PreHook, - new State_Hello_Func4_Called, - new State_Hello_Func79_PreHook, - new State_Hello_Func79_Called, - new State_Hello_Func4_Called, - new State_Hello_Func79_Called, - NULL), "Test" "Hello" " Part2"); - - g_SHPtr->RemoveHookByID(helloHook4); - g_SHPtr->RemoveHookByID(helloHook79); - - g_HMAGPtr->ReleaseHookMan(helloHM_4); - g_HMAGPtr->ReleaseHookMan(helloHM_79); - - return true; - } -} - -#if !defined( _M_AMD64 ) && !defined( __amd64__ ) && !defined(__x86_64__) -bool TestHookManGen(std::string &error) -{ - GET_SHPTR(g_SHPtr); - GET_HMAG(g_HMAGPtr, g_SHPtr); - g_PLID = 1337; - - // 5 Global constructors (g_O111_*) - CHECK_STATES((&g_States, - new State_ObjOCtor_Called(111), - new State_ObjOCtor_Called(111), - new State_ObjOCtor_Called(111), - new State_ObjOCtor_Called(111), - new State_ObjOCtor_Called(111), - NULL), "GlobCtors"); - - if (!Tests1(error)) - return false; - if (!Tests2(error)) - return false; - if (!Tests3(error)) - return false; - if (!Tests4(error)) - return false; - if (!Tests5(error)) - return false; - - // Shutdown now! - // If we don't SH will auto-shutdown _after_ genc's destructor is called - // -> crash - - Test_CompleteShutdown(g_SHPtr); - - CHECK_COND(sizeof(PodRet1) == 1, "WTF!"); - CHECK_COND(sizeof(PodRet4) == 4, "WTF!"); - CHECK_COND(sizeof(PodRet8) == 8, "WTF!"); - CHECK_COND(sizeof(PodRet13) == 13, "WTF!"); - - return true; -} -#endif - -bool TestCPageAlloc(std::string &error) -{ - using namespace SourceHook; - - CPageAlloc alloc; - int i; - size_t ps = alloc.GetPageSize(); - - char *test1[8]; - - for (i = 0; i < 8; ++i) - test1[i] = (char*) alloc.Alloc(ps / 4); - - CHECK_COND(test1[1] == test1[0] + ps/4, "Part 1.1"); - CHECK_COND(test1[2] == test1[1] + ps/4, "Part 1.2"); - CHECK_COND(test1[3] == test1[2] + ps/4, "Part 1.3"); - - CHECK_COND(test1[5] == test1[4] + ps/4, "Part 1.4"); - CHECK_COND(test1[6] == test1[5] + ps/4, "Part 1.5"); - CHECK_COND(test1[7] == test1[6] + ps/4, "Part 1.6"); - - void *test2 = alloc.Alloc(ps * 3); - - alloc.SetRW(test2); - memset(test2, 0, ps * 3); // should not crash :) - alloc.SetRE(test2); - - alloc.Free(test2); - - // Dealloc a ps/4 block and place two ps/8 blocks into it - alloc.Free(test1[2]); - - char *test3[2]; - test3[0] = (char*) alloc.Alloc(ps / 8); - test3[1] = (char*) alloc.Alloc(ps / 8); - - CHECK_COND(test3[0] == test1[2], "Part 2.1"); - CHECK_COND(test3[1] == test1[2] + ps/8, "Part 2.2"); - - // Isolated - char *test4[8]; - for (i = 0; i < 8; ++i) - test4[i] = (char*) alloc.AllocIsolated(ps / 4); - - // -> The difference is at least one page - CHECK_COND(static_cast(std::abs(test4[1] - test4[0])) >= ps, "Part 3.1"); - CHECK_COND(static_cast(std::abs(test4[2] - test4[1])) >= ps, "Part 3.2"); - CHECK_COND(static_cast(std::abs(test4[3] - test4[2])) >= ps, "Part 3.3"); - - CHECK_COND(static_cast(std::abs(test4[5] - test4[4])) >= ps, "Part 3.4"); - CHECK_COND(static_cast(std::abs(test4[6] - test4[5])) >= ps, "Part 3.5"); - CHECK_COND(static_cast(std::abs(test4[7] - test4[6])) >= ps, "Part 3.6"); - - // Thus i can set everything except for test4[2] to RE and still write to test4[2] - - alloc.SetRW(test4[2]); - - alloc.SetRE(test4[0]); - alloc.SetRE(test4[1]); - alloc.SetRE(test4[3]); - alloc.SetRE(test4[4]); - alloc.SetRE(test4[5]); - alloc.SetRE(test4[6]); - alloc.SetRE(test4[7]); - - memset((void*)test4[2], 0, ps / 4); - - // alignement tests - CPageAlloc alloc1(1); - CPageAlloc alloc4(4); - CPageAlloc alloc16(16); - - void *last1 = alloc1.Alloc(1); - void *last4 = alloc4.Alloc(4); - void *last16 = alloc16.Alloc(16); - void *cur; - for (int i = 0; i < 20; ++i) - { - cur = alloc1.Alloc(1); - CHECK_COND(reinterpret_cast(cur) == reinterpret_cast(last1) + 1, "Part 4.1"); - last1 = cur; - - cur = alloc4.Alloc(1); - CHECK_COND(reinterpret_cast(cur) == reinterpret_cast(last4) + 4, "Part 4.2"); - last4 = cur; - - cur = alloc16.Alloc(1); - CHECK_COND(reinterpret_cast(cur) == reinterpret_cast(last16) + 16, "Part 4.3"); - last16 = cur; - } - - alloc16.Free(alloc16.Alloc(1)); - return true; -} diff --git a/metamod-source/core/sourcehook/test/testhookmangen.h b/metamod-source/core/sourcehook/test/testhookmangen.h deleted file mode 100644 index 984a69c8..00000000 --- a/metamod-source/core/sourcehook/test/testhookmangen.h +++ /dev/null @@ -1,2192 +0,0 @@ -struct CAutoReleaseHookMan -{ - SourceHook::HookManagerPubFunc m_Ptr; - CAutoReleaseHookMan(SourceHook::HookManagerPubFunc ptr) : m_Ptr(ptr) - { - } - ~CAutoReleaseHookMan() - { - g_HMAGPtr->ReleaseHookMan(m_Ptr); - } -}; - -// Strip & -template struct StripRef -{ - typedef T type; -}; - -template struct StripRef -{ - typedef T type; -}; - -// Address of constructor/destructor -// (using wrappers) -template -class Ctor_Thunk -{ -public: - void NormalConstructor() - { - new(this) T; - } - - void CopyConstructor(const T &other) - { - new(this) T(other); - } - - void Destructor() - { - reinterpret_cast(this)->~T(); - } - - const T& AssignOp(const T &other) - { - return (*reinterpret_cast(this) = other); - } -}; - - -template -void *FindFuncAddr(T mfp) -{ - union - { - T a; - void *b; - } u; - u.a = mfp; - return u.b; -} - -// Reference carrier -template struct MyRefCarrier -{ - typedef T type; -}; - -template struct MyRefCarrier -{ - class type - { - T *m_StoredRef; - public: - type() : m_StoredRef(NULL) - { - } - type(T& ref) : m_StoredRef(&ref) - { - } - - T& operator= (T& ref) - { - m_StoredRef = &ref; - return ref; - } - - operator T& () const - { - return *m_StoredRef; - } - - bool operator== (const typename MyRefCarrier::type &other) - { - return m_StoredRef == other.m_StoredRef; - } - - friend std::ostream& operator <<(std::ostream &os,const typename MyRefCarrier::type &obj) - { - os << *obj.m_StoredRef; - return os; - } - }; -}; - -#if SH_COMP==SH_COMP_GCC -#define NO_OPTIMIZE __attribute__((noinline)) -#else -#define NO_OPTIMIZE -#endif - -// Return value maker -template -struct MakeRet -{ - static T Do(int a) - { - return a; - } -}; - -template -struct MakeRet< POD > -{ - static POD Do(int a) - { - POD x; - memset(reinterpret_cast(x.x), a, SIZE); - return x; - } -}; - -// Stores parameter status -template -bool EqualToMyFmtString(T sth) -{ - return false; -} - -bool EqualToMyFmtString(std::string &sth) -{ - if (sth == "Hello %s%d%s") - sth = "Hello BA1L!"; - return true; -} - - - - -template -struct ParamState0 -{ - - - bool operator==(const ParamState0 &other) - { - return true - - ; - } - ParamState0(...) - { - - } - - ParamState0 & operator() (int incrsteps) - { - - - - return *this; - } -}; - - -std::ostream& operator <<(std::ostream &os,const ParamState0<0> &obj) -{ - ; - return os; -} - - - -template -struct ParamState1 -{ - typename MyRefCarrier::type m_1; - - bool operator==(const ParamState1 &other) - { - return true - && m_1 == other.m_1 - ; - } - ParamState1(p1 a1, ...) : m_1(a1) - { - - EqualToMyFmtString(m_1); - - } - - ParamState1 & operator() (int incrsteps) - { - int i; - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_1); - - - return *this; - } -}; - -template -std::ostream& operator <<(std::ostream &os,const ParamState1<0, p1> &obj) -{ - os << obj.m_1; - return os; -} - - - -template -struct ParamState2 -{ - typename MyRefCarrier::type m_1; typename MyRefCarrier::type m_2; - - bool operator==(const ParamState2 &other) - { - return true - && m_2 == other.m_2 && m_2 == other.m_2 - ; - } - ParamState2(p1 a1, p2 a2, ...) : m_1(a1), m_2(a2) - { - - EqualToMyFmtString(m_1); - - EqualToMyFmtString(m_2); - - } - - ParamState2 & operator() (int incrsteps) - { - int i; - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_1); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_2); - - - return *this; - } -}; - -template -std::ostream& operator <<(std::ostream &os,const ParamState2<0, p1, p2> &obj) -{ - os << obj.m_1<< obj.m_2; - return os; -} - - - -template -struct ParamState3 -{ - typename MyRefCarrier::type m_1; typename MyRefCarrier::type m_2; typename MyRefCarrier::type m_3; - - bool operator==(const ParamState3 &other) - { - return true - && m_3 == other.m_3 && m_3 == other.m_3 && m_3 == other.m_3 - ; - } - ParamState3(p1 a1, p2 a2, p3 a3, ...) : m_1(a1), m_2(a2), m_3(a3) - { - - EqualToMyFmtString(m_1); - - EqualToMyFmtString(m_2); - - EqualToMyFmtString(m_3); - - } - - ParamState3 & operator() (int incrsteps) - { - int i; - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_1); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_2); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_3); - - - return *this; - } -}; - -template -std::ostream& operator <<(std::ostream &os,const ParamState3<0, p1, p2, p3> &obj) -{ - os << obj.m_1<< obj.m_2<< obj.m_3; - return os; -} - - - -template -struct ParamState4 -{ - typename MyRefCarrier::type m_1; typename MyRefCarrier::type m_2; typename MyRefCarrier::type m_3; typename MyRefCarrier::type m_4; - - bool operator==(const ParamState4 &other) - { - return true - && m_4 == other.m_4 && m_4 == other.m_4 && m_4 == other.m_4 && m_4 == other.m_4 - ; - } - ParamState4(p1 a1, p2 a2, p3 a3, p4 a4, ...) : m_1(a1), m_2(a2), m_3(a3), m_4(a4) - { - - EqualToMyFmtString(m_1); - - EqualToMyFmtString(m_2); - - EqualToMyFmtString(m_3); - - EqualToMyFmtString(m_4); - - } - - ParamState4 & operator() (int incrsteps) - { - int i; - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_1); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_2); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_3); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_4); - - - return *this; - } -}; - -template -std::ostream& operator <<(std::ostream &os,const ParamState4<0, p1, p2, p3, p4> &obj) -{ - os << obj.m_1<< obj.m_2<< obj.m_3<< obj.m_4; - return os; -} - - - -template -struct ParamState5 -{ - typename MyRefCarrier::type m_1; typename MyRefCarrier::type m_2; typename MyRefCarrier::type m_3; typename MyRefCarrier::type m_4; typename MyRefCarrier::type m_5; - - bool operator==(const ParamState5 &other) - { - return true - && m_5 == other.m_5 && m_5 == other.m_5 && m_5 == other.m_5 && m_5 == other.m_5 && m_5 == other.m_5 - ; - } - ParamState5(p1 a1, p2 a2, p3 a3, p4 a4, p5 a5, ...) : m_1(a1), m_2(a2), m_3(a3), m_4(a4), m_5(a5) - { - - EqualToMyFmtString(m_1); - - EqualToMyFmtString(m_2); - - EqualToMyFmtString(m_3); - - EqualToMyFmtString(m_4); - - EqualToMyFmtString(m_5); - - } - - ParamState5 & operator() (int incrsteps) - { - int i; - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_1); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_2); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_3); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_4); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_5); - - - return *this; - } -}; - -template -std::ostream& operator <<(std::ostream &os,const ParamState5<0, p1, p2, p3, p4, p5> &obj) -{ - os << obj.m_1<< obj.m_2<< obj.m_3<< obj.m_4<< obj.m_5; - return os; -} - - - -template -struct ParamState6 -{ - typename MyRefCarrier::type m_1; typename MyRefCarrier::type m_2; typename MyRefCarrier::type m_3; typename MyRefCarrier::type m_4; typename MyRefCarrier::type m_5; typename MyRefCarrier::type m_6; - - bool operator==(const ParamState6 &other) - { - return true - && m_6 == other.m_6 && m_6 == other.m_6 && m_6 == other.m_6 && m_6 == other.m_6 && m_6 == other.m_6 && m_6 == other.m_6 - ; - } - ParamState6(p1 a1, p2 a2, p3 a3, p4 a4, p5 a5, p6 a6, ...) : m_1(a1), m_2(a2), m_3(a3), m_4(a4), m_5(a5), m_6(a6) - { - - EqualToMyFmtString(m_1); - - EqualToMyFmtString(m_2); - - EqualToMyFmtString(m_3); - - EqualToMyFmtString(m_4); - - EqualToMyFmtString(m_5); - - EqualToMyFmtString(m_6); - - } - - ParamState6 & operator() (int incrsteps) - { - int i; - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_1); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_2); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_3); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_4); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_5); - - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_6); - - - return *this; - } -}; - -template -std::ostream& operator <<(std::ostream &os,const ParamState6<0, p1, p2, p3, p4, p5, p6> &obj) -{ - os << obj.m_1<< obj.m_2<< obj.m_3<< obj.m_4<< obj.m_5<< obj.m_6; - return os; -} - - - -#define CAT2(a, b) a##b -#define CAT3(a, b, c) a##b##c -#define CAT4(a, b, c, d) a##b##c##d - -// hook1: pre ignore -// hook2: pre supercede -// hook3: post ignore -// hook4: post supercede - - - - -#define THGM_MAKE_TEST0_void(id) \ - struct TestClass##id; \ - typedef ParamState0<0 > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func() \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id())); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call() \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id())); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, ()); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - - -#define THGM_MAKE_TEST0(id, ret_type) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState0<0 > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func() \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id())); \ - g_Inside_LeafFunc = false; \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call() \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id())); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, ()); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - -#define THGM_MAKE_TEST0_vafmt_void(id) \ - struct TestClass##id; \ - typedef ParamState1<0, std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(std::string(buf)))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, ("%s!", buf)); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_MAKE_TEST0_vafmt(id, ret_type) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState1<0, std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(std::string(buf)))); \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, ("%s!", buf)); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_SETUP_PI0(id) \ - void setuppi_##id() \ - { \ - \ - } - - - -#define THGM_MAKE_TEST1_void(id, param1) \ - struct TestClass##id; \ - typedef ParamState1<0, param1 > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(param1 p1) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(param1 p1) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1); \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, (p1)); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - - -#define THGM_MAKE_TEST1(id, ret_type, param1) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState1<0, param1 > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(param1 p1) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1))); \ - g_Inside_LeafFunc = false; \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(param1 p1) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1); \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, (p1)); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - -#define THGM_MAKE_TEST1_vafmt_void(id, param1) \ - struct TestClass##id; \ - typedef ParamState2<0, param1, std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(param1 p1, const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, std::string(buf)))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(param1 p1, const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1); \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, (p1, "%s!", buf)); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_MAKE_TEST1_vafmt(id, ret_type, param1) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState2<0, param1, std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(param1 p1, const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, std::string(buf)))); \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(param1 p1, const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1); \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, (p1, "%s!", buf)); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_SETUP_PI1(id, p1_type, p1_passtype, p1_flags) \ - void setuppi_##id() \ - { \ - \ - protoinfo_##id.AddParam(sizeof(p1_type), p1_passtype, p1_flags, \ - (p1_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - } - - - -#define THGM_MAKE_TEST2_void(id, param1, param2) \ - struct TestClass##id; \ - typedef ParamState2<0, param1, param2 > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(param1 p1, param2 p2) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(param1 p1, param2 p2) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2); \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, (p1, p2)); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - - -#define THGM_MAKE_TEST2(id, ret_type, param1, param2) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState2<0, param1, param2 > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(param1 p1, param2 p2) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2))); \ - g_Inside_LeafFunc = false; \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(param1 p1, param2 p2) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2); \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, (p1, p2)); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - -#define THGM_MAKE_TEST2_vafmt_void(id, param1, param2) \ - struct TestClass##id; \ - typedef ParamState3<0, param1, param2, std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(param1 p1, param2 p2, const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, std::string(buf)))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(param1 p1, param2 p2, const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2); \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, (p1, p2, "%s!", buf)); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_MAKE_TEST2_vafmt(id, ret_type, param1, param2) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState3<0, param1, param2, std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(param1 p1, param2 p2, const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, std::string(buf)))); \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(param1 p1, param2 p2, const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2); \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, (p1, p2, "%s!", buf)); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_SETUP_PI2(id, p1_type, p1_passtype, p1_flags, p2_type, p2_passtype, p2_flags) \ - void setuppi_##id() \ - { \ - \ - protoinfo_##id.AddParam(sizeof(p1_type), p1_passtype, p1_flags, \ - (p1_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p2_type), p2_passtype, p2_flags, \ - (p2_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - } - - - -#define THGM_MAKE_TEST3_void(id, param1, param2, param3) \ - struct TestClass##id; \ - typedef ParamState3<0, param1, param2, param3 > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(param1 p1, param2 p2, param3 p3) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(param1 p1, param2 p2, param3 p3) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3); \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, (p1, p2, p3)); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - - -#define THGM_MAKE_TEST3(id, ret_type, param1, param2, param3) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState3<0, param1, param2, param3 > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(param1 p1, param2 p2, param3 p3) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3))); \ - g_Inside_LeafFunc = false; \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(param1 p1, param2 p2, param3 p3) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3); \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, (p1, p2, p3)); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - -#define THGM_MAKE_TEST3_vafmt_void(id, param1, param2, param3) \ - struct TestClass##id; \ - typedef ParamState4<0, param1, param2, param3, std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(param1 p1, param2 p2, param3 p3, const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3, std::string(buf)))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(param1 p1, param2 p2, param3 p3, const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3, buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3); \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, (p1, p2, p3, "%s!", buf)); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_MAKE_TEST3_vafmt(id, ret_type, param1, param2, param3) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState4<0, param1, param2, param3, std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(param1 p1, param2 p2, param3 p3, const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3, std::string(buf)))); \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(param1 p1, param2 p2, param3 p3, const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3, buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3); \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, (p1, p2, p3, "%s!", buf)); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_SETUP_PI3(id, p1_type, p1_passtype, p1_flags, p2_type, p2_passtype, p2_flags, p3_type, p3_passtype, p3_flags) \ - void setuppi_##id() \ - { \ - \ - protoinfo_##id.AddParam(sizeof(p1_type), p1_passtype, p1_flags, \ - (p1_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p2_type), p2_passtype, p2_flags, \ - (p2_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p3_type), p3_passtype, p3_flags, \ - (p3_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p3_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p3_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p3_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - } - - - -#define THGM_MAKE_TEST4_void(id, param1, param2, param3, param4) \ - struct TestClass##id; \ - typedef ParamState4<0, param1, param2, param3, param4 > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3, p4))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(param1 p1, param2 p2, param3 p3, param4 p4) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3, p4))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3);Increment::type>::Incr(p4); \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, (p1, p2, p3, p4)); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - - -#define THGM_MAKE_TEST4(id, ret_type, param1, param2, param3, param4) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState4<0, param1, param2, param3, param4 > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(param1 p1, param2 p2, param3 p3, param4 p4) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3, p4))); \ - g_Inside_LeafFunc = false; \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(param1 p1, param2 p2, param3 p3, param4 p4) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3, p4))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3);Increment::type>::Incr(p4); \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, (p1, p2, p3, p4)); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - -#define THGM_MAKE_TEST4_vafmt_void(id, param1, param2, param3, param4) \ - struct TestClass##id; \ - typedef ParamState5<0, param1, param2, param3, param4, std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3, p4, std::string(buf)))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(param1 p1, param2 p2, param3 p3, param4 p4, const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3, p4, buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3);Increment::type>::Incr(p4); \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, (p1, p2, p3, p4, "%s!", buf)); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_MAKE_TEST4_vafmt(id, ret_type, param1, param2, param3, param4) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState5<0, param1, param2, param3, param4, std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(param1 p1, param2 p2, param3 p3, param4 p4, const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3, p4, std::string(buf)))); \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(param1 p1, param2 p2, param3 p3, param4 p4, const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3, p4, buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3);Increment::type>::Incr(p4); \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, (p1, p2, p3, p4, "%s!", buf)); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_SETUP_PI4(id, p1_type, p1_passtype, p1_flags, p2_type, p2_passtype, p2_flags, p3_type, p3_passtype, p3_flags, p4_type, p4_passtype, p4_flags) \ - void setuppi_##id() \ - { \ - \ - protoinfo_##id.AddParam(sizeof(p1_type), p1_passtype, p1_flags, \ - (p1_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p2_type), p2_passtype, p2_flags, \ - (p2_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p3_type), p3_passtype, p3_flags, \ - (p3_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p3_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p3_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p3_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p4_type), p4_passtype, p4_flags, \ - (p4_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p4_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p4_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p4_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - } - - - -#define THGM_MAKE_TEST5_void(id, param1, param2, param3, param4, param5) \ - struct TestClass##id; \ - typedef ParamState5<0, param1, param2, param3, param4, param5 > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3, p4, p5))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3, p4, p5))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3);Increment::type>::Incr(p4);Increment::type>::Incr(p5); \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, (p1, p2, p3, p4, p5)); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - - -#define THGM_MAKE_TEST5(id, ret_type, param1, param2, param3, param4, param5) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState5<0, param1, param2, param3, param4, param5 > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3, p4, p5))); \ - g_Inside_LeafFunc = false; \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3, p4, p5))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3);Increment::type>::Incr(p4);Increment::type>::Incr(p5); \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, (p1, p2, p3, p4, p5)); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - -#define THGM_MAKE_TEST5_vafmt_void(id, param1, param2, param3, param4, param5) \ - struct TestClass##id; \ - typedef ParamState6<0, param1, param2, param3, param4, param5, std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3, p4, p5, std::string(buf)))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3, p4, p5, buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3);Increment::type>::Incr(p4);Increment::type>::Incr(p5); \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, (p1, p2, p3, p4, p5, "%s!", buf)); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_MAKE_TEST5_vafmt(id, ret_type, param1, param2, param3, param4, param5) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState6<0, param1, param2, param3, param4, param5, std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3, p4, p5, std::string(buf)))); \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3, p4, p5, buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3);Increment::type>::Incr(p4);Increment::type>::Incr(p5); \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, (p1, p2, p3, p4, p5, "%s!", buf)); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_SETUP_PI5(id, p1_type, p1_passtype, p1_flags, p2_type, p2_passtype, p2_flags, p3_type, p3_passtype, p3_flags, p4_type, p4_passtype, p4_flags, p5_type, p5_passtype, p5_flags) \ - void setuppi_##id() \ - { \ - \ - protoinfo_##id.AddParam(sizeof(p1_type), p1_passtype, p1_flags, \ - (p1_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p2_type), p2_passtype, p2_flags, \ - (p2_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p3_type), p3_passtype, p3_flags, \ - (p3_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p3_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p3_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p3_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p4_type), p4_passtype, p4_flags, \ - (p4_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p4_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p4_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p4_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p5_type), p5_passtype, p5_flags, \ - (p5_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p5_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p5_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p5_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - } - - - -#define THGM_MAKE_TEST6_void(id, param1, param2, param3, param4, param5, param6) \ - struct TestClass##id; \ - typedef ParamState6<0, param1, param2, param3, param4, param5, param6 > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3, p4, p5, p6))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3, p4, p5, p6))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3);Increment::type>::Incr(p4);Increment::type>::Incr(p5);Increment::type>::Incr(p6); \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, (p1, p2, p3, p4, p5, p6)); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - - -#define THGM_MAKE_TEST6(id, ret_type, param1, param2, param3, param4, param5, param6) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState6<0, param1, param2, param3, param4, param5, param6 > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3, p4, p5, p6))); \ - g_Inside_LeafFunc = false; \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3, p4, p5, p6))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3);Increment::type>::Incr(p4);Increment::type>::Incr(p5);Increment::type>::Incr(p6); \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, (p1, p2, p3, p4, p5, p6)); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - -#define THGM_MAKE_TEST6_vafmt_void(id, param1, param2, param3, param4, param5, param6) \ - struct TestClass##id; \ - typedef ParamState7<0, param1, param2, param3, param4, param5, param6, std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3, p4, p5, p6, std::string(buf)))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3, p4, p5, p6, buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3);Increment::type>::Incr(p4);Increment::type>::Incr(p5);Increment::type>::Incr(p6); \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, (p1, p2, p3, p4, p5, p6, "%s!", buf)); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_MAKE_TEST6_vafmt(id, ret_type, param1, param2, param3, param4, param5, param6) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState7<0, param1, param2, param3, param4, param5, param6, std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(p1, p2, p3, p4, p5, p6, std::string(buf)))); \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(param1 p1, param2 p2, param3 p3, param4 p4, param5 p5, param6 p6, const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(p1, p2, p3, p4, p5, p6, buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - Increment::type>::Incr(p1);Increment::type>::Incr(p2);Increment::type>::Incr(p3);Increment::type>::Incr(p4);Increment::type>::Incr(p5);Increment::type>::Incr(p6); \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, (p1, p2, p3, p4, p5, p6, "%s!", buf)); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_SETUP_PI6(id, p1_type, p1_passtype, p1_flags, p2_type, p2_passtype, p2_flags, p3_type, p3_passtype, p3_flags, p4_type, p4_passtype, p4_flags, p5_type, p5_passtype, p5_flags, p6_type, p6_passtype, p6_flags) \ - void setuppi_##id() \ - { \ - \ - protoinfo_##id.AddParam(sizeof(p1_type), p1_passtype, p1_flags, \ - (p1_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p1_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p2_type), p2_passtype, p2_flags, \ - (p2_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p2_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p3_type), p3_passtype, p3_flags, \ - (p3_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p3_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p3_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p3_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p4_type), p4_passtype, p4_flags, \ - (p4_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p4_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p4_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p4_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p5_type), p5_passtype, p5_flags, \ - (p5_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p5_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p5_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p5_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - protoinfo_##id.AddParam(sizeof(p6_type), p6_passtype, p6_flags, \ - (p6_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p6_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p6_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p6_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - \ - } - - - -#define THGM_SETUP_RI(id, ret_type, ret_passtype, ret_flags) \ - void setupri_##id() \ - { \ - protoinfo_##id.SetReturnType(sizeof(ret_type), ret_passtype, ret_flags, \ - (ret_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (ret_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (ret_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (ret_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - } - -#define THGM_ADD_HOOK(id, num) \ - CAT4(hook, num, _, id) = g_SHPtr->AddHook(g_PLID, SourceHook::ISourceHook::Hook_Normal, reinterpret_cast(pTest##id), \ - 0, myhookman##id, PtrBufPtr(new TestClass##id::Delegate(num)), num >= 3); - -#define THGM_REMOVE_HOOK(id, num) \ - g_SHPtr->RemoveHookByID(CAT4(hook, num, _, id)); - -#define THGM_CALLS_void(id, call_params) \ - pTest##id->Func call_params; \ - SH_CALL(pTest##id, &TestClass##id::Func) call_params; - -#define THGM_DO_TEST_void(id, call_params) \ - setuppi_##id(); \ - SourceHook::HookManagerPubFunc myhookman##id = g_HMAGPtr->MakeHookMan(protoinfo_##id, 0, 0); \ - CAutoReleaseHookMan arhm_##id(myhookman##id); \ - int hook1_##id, hook2_##id, hook3_##id, hook4_##id; \ - \ - TestClass##id::ms_DoRecall = false; \ - TestClass##id *pTest##id = new TestClass##id; \ - CAutoPtrDestruction apd##id(pTest##id); \ - \ - /* no hooks - no hooks */ \ - PtrBuf_Clear(); \ - THGM_CALLS_void(id, call_params); \ - CHECK_STATES((&g_States, \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part1"); \ - \ - /* hook1 - hook3 */ \ - PtrBuf_Clear(); \ - THGM_ADD_HOOK(id, 1); \ - THGM_ADD_HOOK(id, 3); \ - THGM_CALLS_void(id, call_params); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - new State_Deleg_##id(3, pTest##id, 1, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part4"); \ - THGM_REMOVE_HOOK(id, 1); \ - THGM_REMOVE_HOOK(id, 3); \ - \ - /* hook1, hook2 - hook3 */ \ - PtrBuf_Clear(); \ - THGM_ADD_HOOK(id, 1); \ - THGM_ADD_HOOK(id, 2); \ - THGM_ADD_HOOK(id, 3); \ - THGM_CALLS_void(id, call_params); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params), \ - new State_Deleg_##id(2, pTest##id, 1, ParamState_m##id call_params), \ - new State_Deleg_##id(3, pTest##id, 2, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part5"); \ - /* hook1, hook2 - hook3, hook4 */ \ - THGM_ADD_HOOK(id, 4); \ - THGM_CALLS_void(id, call_params); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params), \ - new State_Deleg_##id(2, pTest##id, 1, ParamState_m##id call_params), \ - new State_Deleg_##id(3, pTest##id, 2, ParamState_m##id call_params), \ - new State_Deleg_##id(4, pTest##id, 3, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part6"); \ - \ - /* hook1 - hook3, hook4, with recalls! */ \ - \ - TestClass##id::ms_DoRecall = true; \ - THGM_REMOVE_HOOK(id, 2); \ - THGM_CALLS_void(id, call_params); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params(0)), \ - new State_Func##id(pTest##id, ParamState_m##id call_params(1)), \ - new State_Deleg_##id(3, pTest##id, 2, ParamState_m##id call_params(1)), \ - new State_Deleg_##id(4, pTest##id, 3, ParamState_m##id call_params(2)), \ - /* sh_call one */ \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part7"); \ - THGM_REMOVE_HOOK(id, 1); \ - THGM_REMOVE_HOOK(id, 3); \ - THGM_REMOVE_HOOK(id, 4); - -template -T ComparableRef(T x) -{ - return x; -} - -template -T* ComparableRef(T& x) -{ - return &x; -} - -#define THGM_CALLS(id, call_params, exp_ret_norm, exp_ret_shcall, err) \ - CHECK_COND(ComparableRef(pTest##id->Func call_params) == ComparableRef(MakeRet< RetType##id >::Do(exp_ret_norm)), err " /retcallnorm"); \ - CHECK_COND(ComparableRef(SH_CALL(pTest##id, &TestClass##id::Func) call_params) == ComparableRef(MakeRet< RetType##id >::Do(exp_ret_shcall)), err " /retcallshcall"); - -#define THGM_DO_TEST(id, call_params) \ - setuppi_##id(); \ - setupri_##id(); \ - SourceHook::HookManagerPubFunc myhookman##id = g_HMAGPtr->MakeHookMan(protoinfo_##id, 0, 0); \ - CAutoReleaseHookMan arhm_##id(myhookman##id); \ - int hook1_##id, hook2_##id, hook3_##id, hook4_##id; \ - \ - TestClass##id::ms_DoRecall = false; \ - TestClass##id *pTest##id = new TestClass##id; \ - CAutoPtrDestruction apd##id(pTest##id); \ - \ - /* no hooks - no hooks */ \ - PtrBuf_Clear(); \ - THGM_CALLS(id, call_params, 0, 0, "Part1"); \ - CHECK_STATES((&g_States, \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part1"); \ - \ - /* hook1 - hook3 */ \ - PtrBuf_Clear(); \ - THGM_ADD_HOOK(id, 1); \ - THGM_ADD_HOOK(id, 3); \ - THGM_CALLS(id, call_params, 0, 0, "Part4"); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - new State_Deleg_##id(3, pTest##id, 1, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part4"); \ - THGM_REMOVE_HOOK(id, 1); \ - THGM_REMOVE_HOOK(id, 3); \ - \ - /* hook1, hook2 - hook3 */ \ - PtrBuf_Clear(); \ - THGM_ADD_HOOK(id, 1); \ - THGM_ADD_HOOK(id, 2); \ - THGM_ADD_HOOK(id, 3); \ - THGM_CALLS(id, call_params, 2, 0, "Part5"); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params), \ - new State_Deleg_##id(2, pTest##id, 1, ParamState_m##id call_params), \ - new State_Deleg_##id(3, pTest##id, 2, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part5"); \ - /* hook1, hook2 - hook3, hook4 */ \ - THGM_ADD_HOOK(id, 4); \ - THGM_CALLS(id, call_params, 4, 0, "Part6"); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params), \ - new State_Deleg_##id(2, pTest##id, 1, ParamState_m##id call_params), \ - new State_Deleg_##id(3, pTest##id, 2, ParamState_m##id call_params), \ - new State_Deleg_##id(4, pTest##id, 3, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part6"); \ - \ - /* hook1 - hook3, hook4, with recalls! */ \ - \ - TestClass##id::ms_DoRecall = true; \ - THGM_REMOVE_HOOK(id, 2); \ - THGM_CALLS(id, call_params, 4, 0, "Part7"); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params(0)), \ - new State_Func##id(pTest##id, ParamState_m##id call_params(1)), \ - new State_Deleg_##id(3, pTest##id, 2, ParamState_m##id call_params(1)), \ - new State_Deleg_##id(4, pTest##id, 3, ParamState_m##id call_params(2)), \ - /* sh_call one */ \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part7"); \ - THGM_REMOVE_HOOK(id, 1); \ - THGM_REMOVE_HOOK(id, 3); \ - THGM_REMOVE_HOOK(id, 4); diff --git a/metamod-source/core/sourcehook/test/testhookmangen.hxx b/metamod-source/core/sourcehook/test/testhookmangen.hxx deleted file mode 100644 index 81b21cc4..00000000 --- a/metamod-source/core/sourcehook/test/testhookmangen.hxx +++ /dev/null @@ -1,584 +0,0 @@ -struct CAutoReleaseHookMan -{ - SourceHook::HookManagerPubFunc m_Ptr; - CAutoReleaseHookMan(SourceHook::HookManagerPubFunc ptr) : m_Ptr(ptr) - { - } - ~CAutoReleaseHookMan() - { - g_HMAGPtr->ReleaseHookMan(m_Ptr); - } -}; - -// Strip & -template struct StripRef -{ - typedef T type; -}; - -template struct StripRef -{ - typedef T type; -}; - -// Address of constructor/destructor -// (using wrappers) -template -class Ctor_Thunk -{ -public: - void NormalConstructor() - { - new(this) T; - } - - void CopyConstructor(const T &other) - { - new(this) T(other); - } - - void Destructor() - { - reinterpret_cast(this)->~T(); - } - - const T& AssignOp(const T &other) - { - return (*reinterpret_cast(this) = other); - } -}; - - -template -void *FindFuncAddr(T mfp) -{ - union - { - T a; - void *b; - } u; - u.a = mfp; - return u.b; -} - -// Reference carrier -template struct MyRefCarrier -{ - typedef T type; -}; - -template struct MyRefCarrier -{ - class type - { - T *m_StoredRef; - public: - type() : m_StoredRef(NULL) - { - } - type(T& ref) : m_StoredRef(&ref) - { - } - - T& operator= (T& ref) - { - m_StoredRef = &ref; - return ref; - } - - operator T& () const - { - return *m_StoredRef; - } - - bool operator== (const typename MyRefCarrier::type &other) - { - return m_StoredRef == other.m_StoredRef; - } - - friend std::ostream& operator <<(std::ostream &os,const typename MyRefCarrier::type &obj) - { - os << *obj.m_StoredRef; - return os; - } - }; -}; - -#if SH_COMP==SH_COMP_GCC -#define NO_OPTIMIZE __attribute__((noinline)) -#else -#define NO_OPTIMIZE -#endif - -// Return value maker -template -struct MakeRet -{ - static T Do(int a) - { - return a; - } -}; - -template -struct MakeRet< POD > -{ - static POD Do(int a) - { - POD x; - memset(reinterpret_cast(x.x), a, SIZE); - return x; - } -}; - -// Stores parameter status -template -bool EqualToMyFmtString(T sth) -{ - return false; -} - -bool EqualToMyFmtString(std::string &sth) -{ - if (sth == "Hello %s%d%s") - sth = "Hello BA1L!"; - return true; -} - - -@[$1,0,$a: - -template -struct ParamState$1 -{ - @[$2,1,$1:typename MyRefCarrier::type m_$2; @] - - bool operator==(const ParamState$1 &other) - { - return true - @[$2,1,$1: && m_$1 == other.m_$1@] - ; - } - ParamState$1(@[$2,1,$1:p$2 a$2, @]...) @[$1!=0::@] @[$2,1,$1|, :m_$2(a$2)@] - { - @[$2,1,$1: - EqualToMyFmtString(m_$2); - @] - } - - ParamState$1 & operator() (int incrsteps) - { - @[$1!=0:int i;@] - @[$2,1,$1: - for (i = 0; i < incrsteps; ++i) - Increment::type >::Incr(m_$2); - @] - - return *this; - } -}; - -@[$1!=0:template<@[$2,1,$1|, :class p$2@]>@] -std::ostream& operator <<(std::ostream &os,const ParamState$1<0@[$2,1,$1:, p$2@]> &obj) -{ - @[$1!=0:os@] @[$2,1,$1:<< obj.m_$2@]; - return os; -} - -@] - -#define CAT2(a, b) a##b -#define CAT3(a, b, c) a##b##c -#define CAT4(a, b, c, d) a##b##c##d - -// hook1: pre ignore -// hook2: pre supercede -// hook3: post ignore -// hook4: post supercede - - -@[$1,0,$a: - -#define THGM_MAKE_TEST$1_void(id@[$2,1,$1:, param$2@]) \ - struct TestClass##id; \ - typedef ParamState$1<0@[$2,1,$1:, param$2@] > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(@[$2,1,$1|, :param$2 p$2@]) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id(@[$2,1,$1|, :p$2@]))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(@[$2,1,$1|, :param$2 p$2@]) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(@[$2,1,$1|, :p$2@]))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - @[$2,1,$1:Increment::type>::Incr(p$2);@] \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, (@[$2,1,$1|, :p$2@])); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - - -#define THGM_MAKE_TEST$1(id, ret_type@[$2,1,$1:, param$2@]) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState$1<0@[$2,1,$1:, param$2@] > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(@[$2,1,$1|, :param$2 p$2@]) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Func##id(this, ParamState_m##id(@[$2,1,$1|, :p$2@]))); \ - g_Inside_LeafFunc = false; \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(@[$2,1,$1|, :param$2 p$2@]) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(@[$2,1,$1|, :p$2@]))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - @[$2,1,$1:Increment::type>::Incr(p$2);@] \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, (@[$2,1,$1|, :p$2@])); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall); - -#define THGM_MAKE_TEST$1_vafmt_void(id@[$2,1,$1:, param$2@]) \ - struct TestClass##id; \ - typedef ParamState@($1+1)<0@[$2,1,$1:, param$2@], std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual void Func(@[$2,1,$1:param$2 p$2, @]const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(@[$2,1,$1:p$2, @]std::string(buf)))); \ - g_Inside_LeafFunc = false; \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual void Call(@[$2,1,$1:param$2 p$2, @]const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(@[$2,1,$1:p$2, @]buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - @[$2,1,$1:Increment::type>::Incr(p$2);@] \ - RETURN_META_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, &TestClass##id::Func, (@[$2,1,$1:p$2, @]"%s!", buf)); \ - } \ - else \ - RETURN_META((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_MAKE_TEST$1_vafmt(id, ret_type@[$2,1,$1:, param$2@]) \ - struct TestClass##id; \ - typedef ret_type RetType##id; \ - typedef ParamState@($1+1)<0@[$2,1,$1:, param$2@], std::string > ParamState_m##id; \ - MAKE_STATE_2(State_Func##id, TestClass##id* /*thisptr*/, ParamState_m##id ); \ - MAKE_STATE_4(State_Deleg_##id, int /*delegnumber*/, TestClass##id* /*ifptr*/, int /*deleg thisptr*/, ParamState_m##id ); \ - \ - struct TestClass##id \ - { \ - static bool ms_DoRecall; \ - \ - virtual ret_type Func(@[$2,1,$1:param$2 p$2, @]const char *fmt, ...) \ - { \ - g_Inside_LeafFunc = true; \ - \ - char buf[9999]; \ - va_list ap; \ - va_start(ap, fmt); \ - vsnprintf(buf, 9998, fmt, ap); \ - buf[9998] = 0; \ - va_end(ap); \ - \ - ADD_STATE(State_Func##id(this, ParamState_m##id(@[$2,1,$1:p$2, @]std::string(buf)))); \ - \ - return MakeRet< ret_type >::Do(0); \ - } \ - \ - struct Delegate : public MyDelegate \ - { \ - int m_DelegNumber; \ - Delegate(int num) : m_DelegNumber(num) { } \ - \ - virtual ret_type Call(@[$2,1,$1:param$2 p$2, @]const char *buf) \ - { \ - g_Inside_LeafFunc = true; \ - ADD_STATE(State_Deleg_##id(m_DelegNumber, META_IFACEPTR(TestClass##id), PtrBuf(this), ParamState_m##id(@[$2,1,$1:p$2, @]buf))); \ - g_Inside_LeafFunc = false; \ - if (ms_DoRecall) \ - { \ - @[$2,1,$1:Increment::type>::Incr(p$2);@] \ - RETURN_META_VALUE_NEWPARAMS((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber), &TestClass##id::Func, (@[$2,1,$1:p$2, @]"%s!", buf)); \ - } \ - else \ - RETURN_META_VALUE((m_DelegNumber & 1) ? MRES_IGNORED : MRES_SUPERCEDE, MakeRet< ret_type >::Do(m_DelegNumber)); \ - } \ - }; \ - }; \ - \ - bool TestClass##id::ms_DoRecall = false; \ - SourceHook::CProtoInfoBuilder protoinfo_##id(SourceHook::ProtoInfo::CallConv_ThisCall | SourceHook::ProtoInfo::CallConv_HasVafmt); - -#define THGM_SETUP_PI$1(id@[$2,1,$1:, p$2_type, p$2_passtype, p$2_flags@]) \ - void setuppi_##id() \ - { \ - @[$2,1,$1: \ - protoinfo_##id.AddParam(sizeof(p$2_type), p$2_passtype, p$2_flags, \ - (p$2_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (p$2_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (p$2_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (p$2_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - @] \ - } - -@] - -#define THGM_SETUP_RI(id, ret_type, ret_passtype, ret_flags) \ - void setupri_##id() \ - { \ - protoinfo_##id.SetReturnType(sizeof(ret_type), ret_passtype, ret_flags, \ - (ret_flags & SourceHook::PassInfo::PassFlag_OCtor) ? FindFuncAddr(&Ctor_Thunk::type>::NormalConstructor) : NULL, \ - (ret_flags & SourceHook::PassInfo::PassFlag_CCtor) ? FindFuncAddr(&Ctor_Thunk::type>::CopyConstructor) : NULL, \ - (ret_flags & SourceHook::PassInfo::PassFlag_ODtor) ? FindFuncAddr(&Ctor_Thunk::type>::Destructor) : NULL, \ - (ret_flags & SourceHook::PassInfo::PassFlag_AssignOp) ? FindFuncAddr(&Ctor_Thunk::type>::AssignOp) : NULL \ - ); \ - } - -#define THGM_ADD_HOOK(id, num) \ - CAT4(hook, num, _, id) = g_SHPtr->AddHook(g_PLID, SourceHook::ISourceHook::Hook_Normal, reinterpret_cast(pTest##id), \ - 0, myhookman##id, PtrBufPtr(new TestClass##id::Delegate(num)), num >= 3); - -#define THGM_REMOVE_HOOK(id, num) \ - g_SHPtr->RemoveHookByID(CAT4(hook, num, _, id)); - -#define THGM_CALLS_void(id, call_params) \ - pTest##id->Func call_params; \ - SH_CALL(pTest##id, &TestClass##id::Func) call_params; - -#define THGM_DO_TEST_void(id, call_params) \ - setuppi_##id(); \ - SourceHook::HookManagerPubFunc myhookman##id = g_HMAGPtr->MakeHookMan(protoinfo_##id, 0, 0); \ - CAutoReleaseHookMan arhm_##id(myhookman##id); \ - int hook1_##id, hook2_##id, hook3_##id, hook4_##id; \ - \ - TestClass##id::ms_DoRecall = false; \ - TestClass##id *pTest##id = new TestClass##id; \ - CAutoPtrDestruction apd##id(pTest##id); \ - \ - /* no hooks - no hooks */ \ - PtrBuf_Clear(); \ - THGM_CALLS_void(id, call_params); \ - CHECK_STATES((&g_States, \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part1"); \ - \ - /* hook1 - hook3 */ \ - PtrBuf_Clear(); \ - THGM_ADD_HOOK(id, 1); \ - THGM_ADD_HOOK(id, 3); \ - THGM_CALLS_void(id, call_params); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - new State_Deleg_##id(3, pTest##id, 1, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part4"); \ - THGM_REMOVE_HOOK(id, 1); \ - THGM_REMOVE_HOOK(id, 3); \ - \ - /* hook1, hook2 - hook3 */ \ - PtrBuf_Clear(); \ - THGM_ADD_HOOK(id, 1); \ - THGM_ADD_HOOK(id, 2); \ - THGM_ADD_HOOK(id, 3); \ - THGM_CALLS_void(id, call_params); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params), \ - new State_Deleg_##id(2, pTest##id, 1, ParamState_m##id call_params), \ - new State_Deleg_##id(3, pTest##id, 2, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part5"); \ - /* hook1, hook2 - hook3, hook4 */ \ - THGM_ADD_HOOK(id, 4); \ - THGM_CALLS_void(id, call_params); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params), \ - new State_Deleg_##id(2, pTest##id, 1, ParamState_m##id call_params), \ - new State_Deleg_##id(3, pTest##id, 2, ParamState_m##id call_params), \ - new State_Deleg_##id(4, pTest##id, 3, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part6"); \ - \ - /* hook1 - hook3, hook4, with recalls! */ \ - \ - TestClass##id::ms_DoRecall = true; \ - THGM_REMOVE_HOOK(id, 2); \ - THGM_CALLS_void(id, call_params); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params(0)), \ - new State_Func##id(pTest##id, ParamState_m##id call_params(1)), \ - new State_Deleg_##id(3, pTest##id, 2, ParamState_m##id call_params(1)), \ - new State_Deleg_##id(4, pTest##id, 3, ParamState_m##id call_params(2)), \ - /* sh_call one */ \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part7"); \ - THGM_REMOVE_HOOK(id, 1); \ - THGM_REMOVE_HOOK(id, 3); \ - THGM_REMOVE_HOOK(id, 4); - -template -T ComparableRef(T x) -{ - return x; -} - -template -T* ComparableRef(T& x) -{ - return &x; -} - -#define THGM_CALLS(id, call_params, exp_ret_norm, exp_ret_shcall, err) \ - CHECK_COND(ComparableRef(pTest##id->Func call_params) == ComparableRef(MakeRet< RetType##id >::Do(exp_ret_norm)), err " /retcallnorm"); \ - CHECK_COND(ComparableRef(SH_CALL(pTest##id, &TestClass##id::Func) call_params) == ComparableRef(MakeRet< RetType##id >::Do(exp_ret_shcall)), err " /retcallshcall"); - -#define THGM_DO_TEST(id, call_params) \ - setuppi_##id(); \ - setupri_##id(); \ - SourceHook::HookManagerPubFunc myhookman##id = g_HMAGPtr->MakeHookMan(protoinfo_##id, 0, 0); \ - CAutoReleaseHookMan arhm_##id(myhookman##id); \ - int hook1_##id, hook2_##id, hook3_##id, hook4_##id; \ - \ - TestClass##id::ms_DoRecall = false; \ - TestClass##id *pTest##id = new TestClass##id; \ - CAutoPtrDestruction apd##id(pTest##id); \ - \ - /* no hooks - no hooks */ \ - PtrBuf_Clear(); \ - THGM_CALLS(id, call_params, 0, 0, "Part1"); \ - CHECK_STATES((&g_States, \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part1"); \ - \ - /* hook1 - hook3 */ \ - PtrBuf_Clear(); \ - THGM_ADD_HOOK(id, 1); \ - THGM_ADD_HOOK(id, 3); \ - THGM_CALLS(id, call_params, 0, 0, "Part4"); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - new State_Deleg_##id(3, pTest##id, 1, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part4"); \ - THGM_REMOVE_HOOK(id, 1); \ - THGM_REMOVE_HOOK(id, 3); \ - \ - /* hook1, hook2 - hook3 */ \ - PtrBuf_Clear(); \ - THGM_ADD_HOOK(id, 1); \ - THGM_ADD_HOOK(id, 2); \ - THGM_ADD_HOOK(id, 3); \ - THGM_CALLS(id, call_params, 2, 0, "Part5"); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params), \ - new State_Deleg_##id(2, pTest##id, 1, ParamState_m##id call_params), \ - new State_Deleg_##id(3, pTest##id, 2, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part5"); \ - /* hook1, hook2 - hook3, hook4 */ \ - THGM_ADD_HOOK(id, 4); \ - THGM_CALLS(id, call_params, 4, 0, "Part6"); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params), \ - new State_Deleg_##id(2, pTest##id, 1, ParamState_m##id call_params), \ - new State_Deleg_##id(3, pTest##id, 2, ParamState_m##id call_params), \ - new State_Deleg_##id(4, pTest##id, 3, ParamState_m##id call_params), \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part6"); \ - \ - /* hook1 - hook3, hook4, with recalls! */ \ - \ - TestClass##id::ms_DoRecall = true; \ - THGM_REMOVE_HOOK(id, 2); \ - THGM_CALLS(id, call_params, 4, 0, "Part7"); \ - CHECK_STATES((&g_States, \ - new State_Deleg_##id(1, pTest##id, 0, ParamState_m##id call_params(0)), \ - new State_Func##id(pTest##id, ParamState_m##id call_params(1)), \ - new State_Deleg_##id(3, pTest##id, 2, ParamState_m##id call_params(1)), \ - new State_Deleg_##id(4, pTest##id, 3, ParamState_m##id call_params(2)), \ - /* sh_call one */ \ - new State_Func##id(pTest##id, ParamState_m##id call_params), \ - NULL), "Test" #id " Part7"); \ - THGM_REMOVE_HOOK(id, 1); \ - THGM_REMOVE_HOOK(id, 3); \ - THGM_REMOVE_HOOK(id, 4); diff --git a/metamod-source/core/sourcehook/test/testlist.cpp b/metamod-source/core/sourcehook/test/testlist.cpp deleted file mode 100644 index bbaa4d31..00000000 --- a/metamod-source/core/sourcehook/test/testlist.cpp +++ /dev/null @@ -1,282 +0,0 @@ -#include -#include "sh_list.h" -#include "sh_stack.h" -#include "sh_tinyhash.h" -#include "sh_vector.h" -#include "testevents.h" - -// TEST LIST -// Tests sh_list, sh_tinyhash, sh_vector - -// :TODO: vector test, list insert test - -namespace -{ - struct Hmm - { - Hmm *m_This; - int m_Int; - Hmm(const Hmm &other) : m_Int(other.m_Int) - { - m_This = this; - } - Hmm(int i) : m_Int(i) - { - m_This = this; - } - Hmm() : m_Int(0) - { - m_This = this; - } - void operator = (const Hmm &other) - { - m_Int = other.m_Int; - } - operator int () const - { - return m_Int; - } - }; - - #define LIST_THIS_CHECK(lst, err) \ - for (ListType::iterator iter = lst.begin(); iter != lst.end(); ++iter) \ - CHECK_COND(&(*iter) == iter->m_This, err); - - bool DoTestList(std::string &error) - { - typedef SourceHook::List ListType; - ListType lst; - - CHECK_COND(lst.empty(), "Part1"); - - for (int i = 1; i <= 100; ++i) - lst.push_back(i); - - LIST_THIS_CHECK(lst, "PartA1"); - - CHECK_COND(!lst.empty(), "Part2"); - - lst.clear(); - - CHECK_COND(lst.empty(), "Part3"); - - for (int i = 1; i <= 100; ++i) - lst.push_back(i); - - CHECK_COND(lst.back() == 100, "Part4"); - LIST_THIS_CHECK(lst, "PartA2"); - - int ver = 1; - for (ListType::iterator iter = lst.begin(); iter != lst.end(); ++iter) - CHECK_COND(*iter == ver++, "Part5"); - - CHECK_COND(ver == 101, "Part 6"); - - ListType::iterator iter50 = lst.find(50); - CHECK_COND(*iter50 == 50, "Part7"); - - iter50 = lst.erase(iter50); - CHECK_COND(*iter50 == 51, "Part8"); - CHECK_COND(*--iter50 == 49, "Part8.2"); - - lst.remove(80); - - ver = 1; - for (ListType::iterator iter = lst.begin(); iter != lst.end(); ++iter) - { - CHECK_COND(*iter == ver++, "Part9"); - if (ver == 50 || ver == 80) - ++ver; - } - CHECK_COND(ver == 101, "Part10"); - LIST_THIS_CHECK(lst, "PartA3"); - - ListType lst2; - lst = lst2; - CHECK_COND(lst.empty(), "Part11"); - - for (int i = 1; i <= 100; ++i) - lst.push_back(i); - lst2 = lst; - CHECK_COND(lst2.size() == 100, "Part11.2"); - - LIST_THIS_CHECK(lst, "PartA4"); - LIST_THIS_CHECK(lst2, "PartA5"); - - ver = 1; - for (ListType::iterator iter = lst2.begin(); iter != lst2.end(); ++iter) - CHECK_COND(*iter == ver++, "Part12"); - - lst.clear(); - for (int i = 401; i <= 500; ++i) - lst.push_back(i); - lst = lst2; - CHECK_COND(lst2.size() == 100, "Part13"); - - ver = 1; - for (ListType::iterator iter = lst.begin(); iter != lst.end(); ++iter) - CHECK_COND(*iter == ver++, "Part14"); - - LIST_THIS_CHECK(lst, "PartA6"); - LIST_THIS_CHECK(lst2, "PartA7"); - - return true; - } - - bool DoTestTinyHash(std::string &error) - { - const int mymax = 5000; - - typedef SourceHook::THash HashType; - HashType hash; - - for (int i = 1; i <= mymax; ++i) - hash[i] = i + 5000; - - for (int i = 1; i <= mymax; ++i) - CHECK_COND(hash[i] == i + 5000, "Part1"); - - // Find - int ver = 1; - HashType::iterator iter; - for (iter = hash.begin(); iter != hash.end(); ++iter) - CHECK_COND(iter->key == ver && iter->val == (ver++) + 5000, "Part2"); - - CHECK_COND(ver == mymax+1, "Part2.1"); - - iter = hash.find(300); - CHECK_COND(iter != hash.end() && iter->val == 300+5000, "Part3.1"); - iter = hash.find(mymax+200); - CHECK_COND(iter == hash.end(), "Part3.2"); - - HashType hash2; - for (int i = 1; i <= mymax; ++i) - hash2[i] = i + 5000; - - hash2.erase(mymax - 100); - CHECK_COND(hash2.find(mymax - 101) != hash2.end(), "Part 4.1"); - CHECK_COND(hash2.find(mymax - 99) != hash2.end(), "Part 4.2"); - CHECK_COND(hash2.find(mymax - 100) == hash2.end(), "Part 4.3"); - hash2.erase(mymax - 99); - CHECK_COND(hash2.find(mymax - 101) != hash2.end(), "Part 4.4"); - CHECK_COND(hash2.find(mymax - 99) == hash2.end(), "Part 4.5"); - CHECK_COND(hash2.find(mymax - 100) == hash2.end(), "Part 4.6"); - - return true; - } - - bool DoTestStack(std::string &error) - { - typedef SourceHook::CStack IntStack; - IntStack stk; - int i; - - CHECK_COND(stk.size() == 0 && stk.empty(), "A0"); - - for (i = 0; i < 5000; ++i) - stk.push(i); - - CHECK_COND(stk.front() == 4999, "1"); - CHECK_COND(stk.size() == 5000 && !stk.empty(), "A1"); - - IntStack::iterator iter; - i = 0; - for (iter = stk.begin(); iter != stk.end(); ++iter, ++i) - CHECK_COND(*iter == i, "2"); - - i = 0; - for (iter = stk.begin(); iter != stk.end(); iter++, ++i) - CHECK_COND(*iter == i, "3"); - - --iter; - iter--; - *iter = 'g'+'a'+'b'+'e'+'n'; - stk.pop(); - - CHECK_COND(stk.size() == 4999 && !stk.empty(), "A2"); - CHECK_COND(stk.front() == 'g'+'a'+'b'+'e'+'n', "4"); - - IntStack stk2(stk); - CHECK_COND(stk2.size() == 4999 && !stk2.empty(), "A3"); - - IntStack::iterator iter2 = stk2.begin(); - for (iter = stk.begin(); iter != stk.end(); ++iter, iter2++) - CHECK_COND(*iter == *iter2, "5"); - - while (!stk2.empty()) - stk2.pop(); - CHECK_COND(stk2.size() == 0 && stk2.empty(), "A4"); - stk = stk2; - CHECK_COND(stk.size() == 0 && stk.empty(), "A5"); - - return true; - } - - bool DoTestVec(std::string &error) - { - typedef SourceHook::CVector IntVector; - IntVector vec1; - IntVector::iterator iter; - int i; - - CHECK_COND(vec1.size() == 0 && vec1.empty(), "V1"); - for (i = 0; i < 500; ++i) - vec1.push_back(i); - - CHECK_COND(vec1.size() == 500 && !vec1.empty(), "V2"); - - for (i = 0; i < 500; ++i) - CHECK_COND(vec1[i] == i, "V3"); - - for (i = 0, iter = vec1.begin(); iter != vec1.end(); ++iter, ++i) - CHECK_COND(*iter == i, "V4"); - - vec1.resize(1000); - for (i = 0; i < 500; ++i) - CHECK_COND(vec1[i] == i, "V5.1"); - for (i = 500; i < 1000; ++i) - CHECK_COND(vec1[i] == 0, "V5.2"); - - vec1.resize(200); - for (i = 0; i < 200; ++i) - CHECK_COND(vec1[i] == i, "V6"); - - vec1.resize(500, 0x12345678); - for (i = 0; i < 200; ++i) - CHECK_COND(vec1[i] == i, "V7.1"); - for (i = 200; i < 500; ++i) - CHECK_COND(vec1[i] == 0x12345678, "V7.2"); - - IntVector vec2(vec1); - CHECK_COND(vec2.size() == vec1.size() && vec2.empty() == vec1.empty(), "V8.0"); - for (i = 0; i < 200; ++i) - CHECK_COND(vec2[i] == i, "V8.1"); - for (i = 200; i < 500; ++i) - CHECK_COND(vec2[i] == 0x12345678, "V8.2"); - - - vec1.clear(); - CHECK_COND(vec1.size() == 0 && vec1.empty() && vec1.begin() == vec1.end(), "V9"); - vec2 = vec1; - CHECK_COND(vec2.size() == 0 && vec2.empty() && vec2.begin() == vec2.end(), "V9"); - - return true; - } -} - -bool TestList(std::string &error) -{ - if (!DoTestList(error)) - return false; - - if (!DoTestTinyHash(error)) - return false; - - if (!DoTestStack(error)) - return false; - - if (!DoTestVec(error)) - return false; - - return true; -} diff --git a/metamod-source/core/sourcehook/test/testmanual.cpp b/metamod-source/core/sourcehook/test/testmanual.cpp deleted file mode 100644 index 41d2c0c7..00000000 --- a/metamod-source/core/sourcehook/test/testmanual.cpp +++ /dev/null @@ -1,382 +0,0 @@ -#include -#include "sourcehook.h" -#include "sourcehook_test.h" -#include "testevents.h" - -// TESTMANUAL -// Test manual hooks -// :TODO: test more extensively - -namespace -{ - StateList g_States; - SourceHook::ISourceHook *g_SHPtr; - SourceHook::Plugin g_PLID; - - MAKE_STATE_1(State_Func1_Called, void*); // param1: This pointer - MAKE_STATE_2(State_Func2_Called, void*, int); // param1: This pointer; param2: parameter - MAKE_STATE_1(State_Func3_Called, void*); // param1: This pointer - MAKE_STATE_2(State_Func4_Called, void*, int); // param1: This pointer; param2: parameter - MAKE_STATE_1(State_Func5_Called, void*); // param1: This pointer - - MAKE_STATE_1(State_Func1H_Called, void*); - MAKE_STATE_2(State_Func2H_Called, void*, int); - MAKE_STATE_1(State_Func3H_Called, void*); - MAKE_STATE_2(State_Func4H_Called, void*, int); - - MAKE_STATE_1(State_Return, short); - - class TheWall - { - public: - virtual void Func1() - { - ADD_STATE(State_Func1_Called(reinterpret_cast(this))); - } - virtual void Func2(int x) - { - ADD_STATE(State_Func2_Called(reinterpret_cast(this), x)); - } - - virtual short Func3() - { - ADD_STATE(State_Func3_Called(reinterpret_cast(this))); - return 3; - } - virtual short Func4(int x) - { - ADD_STATE(State_Func4_Called(reinterpret_cast(this), x)); - return 4; - } - virtual void Func5() - { - ADD_STATE(State_Func5_Called(reinterpret_cast(this))); - } - - virtual const char *Func6() - { - return 0; - } - virtual char *Func7() - { - return 0; - } - }; - - SH_DECL_HOOK0_void(TheWall, Func1, SH_NOATTRIB, 0); - SH_DECL_HOOK1_void(TheWall, Func2, SH_NOATTRIB, 0, int); - SH_DECL_HOOK0(TheWall, Func3, SH_NOATTRIB, 0, short); - SH_DECL_HOOK1(TheWall, Func4, SH_NOATTRIB, 0, short, int); - - SH_DECL_MANUALHOOK0_void(TheWall_Func1, 0, 0, 0); - SH_DECL_MANUALHOOK1_void(TheWall_Func2, 1, 0, 0, int); - SH_DECL_MANUALHOOK0(TheWall_Func3, 2, 0, 0, short); - SH_DECL_MANUALHOOK1(TheWall_Func4, 3, 0, 0, short, int); - - SH_DECL_MANUALHOOK0(TheWall_Func6, 5, 0, 0, const char *); - SH_DECL_MANUALEXTERN0(TheWall_Func6, const char *); - - SH_DECL_MANUALHOOK0(TheWall_Func7, 6, 0, 0, char *); - SH_DECL_MANUALEXTERN0(TheWall_Func7, char *); - - SH_DECL_MANUALEXTERN0_void(TheWall_Func1); - SH_DECL_MANUALEXTERN1(TheWall_Func4, short, int); - - typedef void (SourceHook::EmptyClass::*MFP_Func1)(); - typedef void (SourceHook::EmptyClass::*MFP_Func2)(int); - typedef short (SourceHook::EmptyClass::*MFP_Func3)(); - typedef short (SourceHook::EmptyClass::*MFP_Func4)(int); - - void Handler_Func1() - { - ADD_STATE(State_Func1H_Called(META_IFACEPTR(void))); - } - void Handler_Func2(int x) - { - ADD_STATE(State_Func2H_Called(META_IFACEPTR(void), x)); - RETURN_META_MNEWPARAMS(MRES_IGNORED, TheWall_Func2, (0x87654321)); - } - short Handler_Func3() - { - ADD_STATE(State_Func3H_Called(META_IFACEPTR(void))); - return 0; - } - short Handler_Func4(int x) - { - ADD_STATE(State_Func4H_Called(META_IFACEPTR(void), x)); - - // newparams (recall) using the manual hook declaration! - RETURN_META_VALUE_MNEWPARAMS(MRES_IGNORED, 0, TheWall_Func4, (0x12345678)); - } - - struct AnotherBrick - { - void Handler_Func1() - { - ADD_STATE(State_Func1H_Called(META_IFACEPTR(void))); - RETURN_META(MRES_SUPERCEDE); - } - }; - - TheWall *MyInstanceFactory() - { - return new TheWall; - } -} - -bool TestManual(std::string &error) -{ - GET_SHPTR(g_SHPtr); - g_PLID = 1337; - - TheWall *p = MyInstanceFactory(); - CAutoPtrDestruction apd(p); - - SourceHook::ManualCallClass *cc = SH_GET_MCALLCLASS(p, sizeof(void*)); - - // 1) - // Call each function - p->Func1(); - p->Func2(200); - ADD_STATE(State_Return(p->Func3())); - ADD_STATE(State_Return(p->Func4(400))); - - CHECK_STATES((&g_States, - new State_Func1_Called(p), - new State_Func2_Called(p, 200), - new State_Func3_Called(p), - new State_Return(3), - new State_Func4_Called(p, 400), - new State_Return(4), - NULL), "Part 1"); - - // 1.1) - // Now call each function through the manual call class, using the hook decl and manually - SH_MCALL(cc, TheWall_Func1)(); - SH_MCALL2(cc, MFP_Func1(), 0, 0, 0)(); - SH_MCALL(cc, TheWall_Func2)(200); - SH_MCALL2(cc, MFP_Func2(), 1, 0, 0)(200); - ADD_STATE(State_Return(SH_MCALL(cc, TheWall_Func3)())); - ADD_STATE(State_Return(SH_MCALL2(cc, MFP_Func3(), 2, 0, 0)())); - ADD_STATE(State_Return(SH_MCALL(cc, TheWall_Func4)(400))); - ADD_STATE(State_Return(SH_MCALL2(cc, MFP_Func4(), 3, 0, 0)(400))); - - CHECK_STATES((&g_States, - new State_Func1_Called(p), - new State_Func1_Called(p), - new State_Func2_Called(p, 200), - new State_Func2_Called(p, 200), - new State_Func3_Called(p), - new State_Return(3), - new State_Func3_Called(p), - new State_Return(3), - new State_Func4_Called(p, 400), - new State_Return(4), - new State_Func4_Called(p, 400), - new State_Return(4), - NULL), "Part 1.1"); - - // 2) - // Hook each function normally, call them - SH_ADD_HOOK(TheWall, Func1, p, SH_STATIC(Handler_Func1), false); - SH_ADD_HOOK(TheWall, Func2, p, SH_STATIC(Handler_Func2), false); - SH_ADD_HOOK(TheWall, Func3, p, SH_STATIC(Handler_Func3), false); - SH_ADD_HOOK(TheWall, Func4, p, SH_STATIC(Handler_Func4), false); - - p->Func1(); - p->Func2(200); - ADD_STATE(State_Return(p->Func3())); - ADD_STATE(State_Return(p->Func4(400))); - - CHECK_STATES((&g_States, - new State_Func1H_Called(p), - new State_Func1_Called(p), - new State_Func2H_Called(p, 200), - new State_Func2_Called(p, 0x87654321), - new State_Func3H_Called(p), - new State_Func3_Called(p), - new State_Return(3), - new State_Func4H_Called(p, 400), - new State_Func4_Called(p, 0x12345678), - new State_Return(4), - NULL), "Part 2"); - - // Call them through the mcallclass - // 2.1) - // Now call each function through the manual call class, using the hook decl and manually - SH_MCALL(cc, TheWall_Func1)(); - SH_MCALL2(cc, MFP_Func1(), 0, 0, 0)(); - SH_MCALL(cc, TheWall_Func2)(200); - SH_MCALL2(cc, MFP_Func2(), 1, 0, 0)(200); - ADD_STATE(State_Return(SH_MCALL(cc, TheWall_Func3)())); - ADD_STATE(State_Return(SH_MCALL2(cc, MFP_Func3(), 2, 0, 0)())); - ADD_STATE(State_Return(SH_MCALL(cc, TheWall_Func4)(400))); - ADD_STATE(State_Return(SH_MCALL2(cc, MFP_Func4(), 3, 0, 0)(400))); - - CHECK_STATES((&g_States, - new State_Func1_Called(p), - new State_Func1_Called(p), - new State_Func2_Called(p, 200), - new State_Func2_Called(p, 200), - new State_Func3_Called(p), - new State_Return(3), - new State_Func3_Called(p), - new State_Return(3), - new State_Func4_Called(p, 400), - new State_Return(4), - new State_Func4_Called(p, 400), - new State_Return(4), - NULL), "Part 2.1"); - - // Unhook them - SH_REMOVE_HOOK(TheWall, Func1, p, SH_STATIC(Handler_Func1), false); - SH_REMOVE_HOOK(TheWall, Func2, p, SH_STATIC(Handler_Func2), false); - SH_REMOVE_HOOK(TheWall, Func3, p, SH_STATIC(Handler_Func3), false); - SH_REMOVE_HOOK(TheWall, Func4, p, SH_STATIC(Handler_Func4), false); - - // 3) - // Hook each function manually, call them - - SH_ADD_MANUALHOOK(TheWall_Func1, p, SH_STATIC(Handler_Func1), false); - SH_ADD_MANUALHOOK(TheWall_Func2, p, SH_STATIC(Handler_Func2), false); - SH_ADD_MANUALHOOK(TheWall_Func3, p, SH_STATIC(Handler_Func3), false); - SH_ADD_MANUALHOOK(TheWall_Func4, p, SH_STATIC(Handler_Func4), false); - - p->Func1(); - p->Func2(200); - ADD_STATE(State_Return(p->Func3())); - ADD_STATE(State_Return(p->Func4(400))); - - CHECK_STATES((&g_States, - new State_Func1H_Called(p), - new State_Func1_Called(p), - new State_Func2H_Called(p, 200), - new State_Func2_Called(p, 0x87654321), - new State_Func3H_Called(p), - new State_Func3_Called(p), - new State_Return(3), - new State_Func4H_Called(p, 400), - new State_Func4_Called(p, 0x12345678), - new State_Return(4), - NULL), "Part 3"); - - // Now through the mcallclass - - // Call them through the mcallclass - // 3.1) - // Now call each function through the manual call class, using the hook decl and manually - SH_MCALL(cc, TheWall_Func1)(); - SH_MCALL2(cc, MFP_Func1(), 0, 0, 0)(); - SH_MCALL(cc, TheWall_Func2)(200); - SH_MCALL2(cc, MFP_Func2(), 1, 0, 0)(200); - ADD_STATE(State_Return(SH_MCALL(cc, TheWall_Func3)())); - ADD_STATE(State_Return(SH_MCALL2(cc, MFP_Func3(), 2, 0, 0)())); - ADD_STATE(State_Return(SH_MCALL(cc, TheWall_Func4)(400))); - ADD_STATE(State_Return(SH_MCALL2(cc, MFP_Func4(), 3, 0, 0)(400))); - - CHECK_STATES((&g_States, - new State_Func1_Called(p), - new State_Func1_Called(p), - new State_Func2_Called(p, 200), - new State_Func2_Called(p, 200), - new State_Func3_Called(p), - new State_Return(3), - new State_Func3_Called(p), - new State_Return(3), - new State_Func4_Called(p, 400), - new State_Return(4), - new State_Func4_Called(p, 400), - new State_Return(4), - NULL), "Part 3.1"); - - // Unhook them - SH_REMOVE_MANUALHOOK(TheWall_Func1, p, SH_STATIC(Handler_Func1), false); - SH_REMOVE_MANUALHOOK(TheWall_Func2, p, SH_STATIC(Handler_Func2), false); - SH_REMOVE_MANUALHOOK(TheWall_Func3, p, SH_STATIC(Handler_Func3), false); - SH_REMOVE_MANUALHOOK(TheWall_Func4, p, SH_STATIC(Handler_Func4), false); - - // 4) - // Hook each function manually, then normally, call, unhook - - AnotherBrick handler_inst; - - // Why this? - // 1) tests sh_add_manualhook - // 2) in my tests, the proto of the manual hook was not equal to the proto of the auto hook - // (because there are no attribs for manual hooks). - // sourcehook.cpp did a !strcmp(..), so it assigned a new hook manager even though there - // already was one for this vfnptr. This hook manager stored the pointer of the original - // hook manager's hookfunc as the orig pointer - everything seemingly worked. - // The problem with this is that returning MRES_SUPERCEDE (as AnotherBrick::Handler_Func1 - // does) will supercede the second hook func from being called - thus bypassing the call - // of the auto hook here. - SH_ADD_MANUALHOOK(TheWall_Func1, p, SH_MEMBER(&handler_inst, &AnotherBrick::Handler_Func1), false); - SH_ADD_MANUALHOOK(TheWall_Func2, p, SH_STATIC(Handler_Func2), false); - SH_ADD_MANUALHOOK(TheWall_Func3, p, SH_STATIC(Handler_Func3), false); - SH_ADD_MANUALHOOK(TheWall_Func4, p, SH_STATIC(Handler_Func4), false); - - SH_ADD_HOOK(TheWall, Func1, p, SH_STATIC(Handler_Func1), false); - SH_ADD_HOOK(TheWall, Func2, p, SH_STATIC(Handler_Func2), false); - SH_ADD_HOOK(TheWall, Func3, p, SH_STATIC(Handler_Func3), false); - SH_ADD_HOOK(TheWall, Func4, p, SH_STATIC(Handler_Func4), false); - - p->Func1(); - p->Func2(200); - ADD_STATE(State_Return(p->Func3())); - ADD_STATE(State_Return(p->Func4(400))); - - CHECK_STATES((&g_States, - new State_Func1H_Called(p), - new State_Func1H_Called(p), - //new State_Func1_Called(p), - new State_Func2H_Called(p, 200), - new State_Func2H_Called(p, 0x87654321), - new State_Func2_Called(p, 0x87654321), - new State_Func3H_Called(p), - new State_Func3H_Called(p), - new State_Func3_Called(p), - new State_Return(3), - new State_Func4H_Called(p, 400), - new State_Func4H_Called(p, 0x12345678), - new State_Func4_Called(p, 0x12345678), - new State_Return(4), - NULL), "Part 4"); - - SH_REMOVE_MANUALHOOK(TheWall_Func1, p, SH_MEMBER(&handler_inst, &AnotherBrick::Handler_Func1), false); - SH_REMOVE_MANUALHOOK(TheWall_Func2, p, SH_STATIC(Handler_Func2), false); - SH_REMOVE_MANUALHOOK(TheWall_Func3, p, SH_STATIC(Handler_Func3), false); - SH_REMOVE_MANUALHOOK(TheWall_Func4, p, SH_STATIC(Handler_Func4), false); - - SH_REMOVE_HOOK(TheWall, Func1, p, SH_STATIC(Handler_Func1), false); - SH_REMOVE_HOOK(TheWall, Func2, p, SH_STATIC(Handler_Func2), false); - SH_REMOVE_HOOK(TheWall, Func3, p, SH_STATIC(Handler_Func3), false); - SH_REMOVE_HOOK(TheWall, Func4, p, SH_STATIC(Handler_Func4), false); - - // 5) Reconfigure TheWall_Func1 to actually hook Func5: - SH_MANUALHOOK_RECONFIGURE(TheWall_Func1, 4, 0, 0); - SH_MANUALHOOK_RECONFIGURE(TheWall_Func1, 4, 0, 0); - SH_ADD_MANUALHOOK(TheWall_Func1, p, SH_STATIC(Handler_Func1), false); - - p->Func5(); - - SH_MCALL(p, TheWall_Func1)(); - - CHECK_STATES((&g_States, - new State_Func1H_Called(p), - new State_Func5_Called(p), - new State_Func5_Called(p), - NULL), "Part 5"); - - // 6) Test auto-remove on reconfig - SH_MANUALHOOK_RECONFIGURE(TheWall_Func1, 0, 0, 0); - - p->Func1(); - p->Func5(); - - CHECK_STATES((&g_States, - new State_Func1_Called(p), - new State_Func5_Called(p), - NULL), "Part 6"); - - return true; -} diff --git a/metamod-source/core/sourcehook/test/testmulti.cpp b/metamod-source/core/sourcehook/test/testmulti.cpp deleted file mode 100644 index 8e209239..00000000 --- a/metamod-source/core/sourcehook/test/testmulti.cpp +++ /dev/null @@ -1,106 +0,0 @@ -#include -#include "sourcehook.h" -#include "sourcehook_test.h" -#include "testevents.h" - -// This should probably be done the other way round! -#if SH_XP == SH_XP_POSIX -#define _snprintf snprintf -#endif - -namespace -{ - SourceHook::ISourceHook *g_SHPtr; - SourceHook::Plugin g_PLID; - - unsigned int g_callcount[10]; - - class VMultiTest - { - public: - VMultiTest(unsigned int index) : m_idx(index) - { - } - public: - virtual void HookTarget() - { - } - virtual void Notify() - { - g_callcount[this->m_idx]++; - } - private: - unsigned int m_idx; - }; - - void HookFunction() - { - VMultiTest *pv = META_IFACEPTR(VMultiTest); - pv->Notify(); - } - - SH_DECL_HOOK0_void(VMultiTest, HookTarget, SH_NOATTRIB, false); -}; - -bool TestMulti(std::string &error) -{ - GET_SHPTR(g_SHPtr); - g_PLID = 1337; - - VMultiTest **pv = new VMultiTest *[10]; - for (unsigned int i=0; i<10; i++) - pv[i] = new VMultiTest(i); - - - for (unsigned int i=0; i<10; i++) - SH_ADD_HOOK(VMultiTest, HookTarget, pv[i], SH_STATIC(HookFunction), false); - - pv[0]->HookTarget(); - - if (g_callcount[0] != 1) - { - error.assign("g_callcount[0] != 0"); - return false; - } - - for (unsigned int i=1; i<10; i++) - { - if (g_callcount[i]) - { - error.assign("g_callcount[n] != 0"); - return false; - } - } - - SH_REMOVE_HOOK(VMultiTest, HookTarget, pv[0], SH_STATIC(HookFunction), false); - - for (unsigned int i=1; i<10; i++) - pv[i]->HookTarget(); - - if (g_callcount[0] != 1) - { - error.assign("g_callcount[0] != 0"); - return false; - } - - for (unsigned int i=1; i<10; i++) - { - if (g_callcount[i] != 1) - { - char err[256]; - _snprintf(err, sizeof(err)-1, "g_callcount[%d] != 1", i); - error.assign(err); - return false; - } - } - - for (unsigned int i=0; i<10; i++) - { - SH_REMOVE_HOOK(VMultiTest, HookTarget, pv[1], SH_STATIC(HookFunction), false); - delete pv[i]; - } - - delete [] pv; - - return true; -} diff --git a/metamod-source/core/sourcehook/test/testoddthunks.cpp b/metamod-source/core/sourcehook/test/testoddthunks.cpp deleted file mode 100644 index 7d625834..00000000 --- a/metamod-source/core/sourcehook/test/testoddthunks.cpp +++ /dev/null @@ -1,182 +0,0 @@ -#include -#include -#include -#include "sourcehook_test.h" -#include "sh_pagealloc.h" -#include "testevents.h" - -namespace -{ - StateList g_States; - SourceHook::ISourceHook *g_SHPtr; - SourceHook::Plugin g_PLID; - - MAKE_STATE(State_Func_Called); - MAKE_STATE(State_Pre1_Called); - MAKE_STATE(State_Pre2_Called); - - int g_CallNumber; - - class Test - { - public: - virtual void Func() - { - ADD_STATE(State_Func_Called); - } - }; - - Test *g_pInst; - - void Handler_Func_Pre1() - { - ADD_STATE(State_Pre1_Called); - } - - SH_DECL_HOOK0_void(Test, Func, SH_NOATTRIB, 0); - - void Handler_Func_Pre2() - { - ADD_STATE(State_Pre2_Called); - - ++g_CallNumber; - if (g_CallNumber == 2) - { - // REMOVE ourselves - SH_REMOVE_HOOK(Test, Func, g_pInst, SH_STATIC(Handler_Func_Pre1), false); - SH_REMOVE_HOOK(Test, Func, g_pInst, SH_STATIC(Handler_Func_Pre2), false); - } - - // Call again. - g_pInst->Func(); - } - - Test *MyInstanceFactory() - { - return new Test; - } - - SourceHook::CPageAlloc g_ThunkAllocator(2); - void *g_OddThunkMemory = NULL; - void *g_OddThunk = NULL; - - // Guarantees that Func() - // has a vtable entry showing to an ODD address - void PatchFuncWithOddThunk() - { - g_OddThunkMemory = g_ThunkAllocator.Alloc(10); - unsigned char* base = reinterpret_cast(g_OddThunkMemory); - - if (((ptrdiff_t)base) & 1) - { - // ODD, ok. - } - else - { - // EVEN. make odd. - base += 1; - } - - // Get vtable entry pointer - SourceHook::MemFuncInfo info = {true, -1, 0, 0}; - SourceHook::GetFuncInfo(g_pInst, &Test::Func, info); - - void *adjustediface = NULL; - void **cur_vtptr = NULL; - void **cur_vfnptr = NULL; - - adjustediface = reinterpret_cast(reinterpret_cast(g_pInst) + info.thisptroffs); - - cur_vtptr = *reinterpret_cast( - reinterpret_cast(adjustediface) + info.vtbloffs); - cur_vfnptr = reinterpret_cast(cur_vtptr + info.vtblindex); - - - // Original function - void *origEntry = *cur_vfnptr; - - // Now generate the jump code - g_ThunkAllocator.SetRW(g_OddThunkMemory); - - // destination = src + offset + 5 - // <=> offset = destination - src - 5 - ptrdiff_t offset = reinterpret_cast(origEntry) - base - 5; - - if (offset >= INT_MIN && offset <= INT_MAX) - { - *(base + 0) = 0xE9; // offset jump, immediate operand - ptrdiff_t *offsetAddr = reinterpret_cast(base + 1); - - *offsetAddr = offset; - } - else - { - // mov rax, origEntry - *(base + 0) = 0x48; - *(base + 1) = 0xB8; - void **offsetAddr = reinterpret_cast(reinterpret_cast(base) + 2); - - *offsetAddr = origEntry; - - // jmp rax - *(base + 10) = 0xFF; - *(base + 11) = 0xE0; - } - - g_ThunkAllocator.SetRE(g_OddThunkMemory); - - g_OddThunk = reinterpret_cast(base); - - // Now set the odd thunk as new vtable entry - SourceHook::SetMemAccess((void*)cur_vfnptr, sizeof(void*), SH_MEM_READ | SH_MEM_WRITE); - *cur_vfnptr = g_OddThunk; - } - - void FreeOddThunk() - { - g_ThunkAllocator.Free(g_OddThunkMemory); - g_OddThunk = NULL; - } -} - -bool TestOddThunks(std::string &error) -{ - GET_SHPTR(g_SHPtr); - g_PLID = 1337; - - g_CallNumber = 0; - - g_pInst = MyInstanceFactory(); - - PatchFuncWithOddThunk(); - - SH_ADD_HOOK(Test, Func, g_pInst, SH_STATIC(Handler_Func_Pre1), false); - SH_ADD_HOOK(Test, Func, g_pInst, SH_STATIC(Handler_Func_Pre2), false); - - g_pInst->Func(); - - CHECK_STATES((&g_States, - // FIRST func() call - new State_Pre1_Called(), - new State_Pre2_Called(), // calls Func() again - - // SECOND func() call - new State_Pre1_Called(), - new State_Pre2_Called(), // removes hooks and calls Func() again - - // THIRD func() call - new State_Func_Called(), - - // SECOND func() call - new State_Func_Called(), - - // FIRST func() call - new State_Func_Called(), - NULL), "Part 1"); - - delete g_pInst; - FreeOddThunk(); - - return true; -} - diff --git a/metamod-source/core/sourcehook/test/testrecall.cpp b/metamod-source/core/sourcehook/test/testrecall.cpp deleted file mode 100644 index 67ddc696..00000000 --- a/metamod-source/core/sourcehook/test/testrecall.cpp +++ /dev/null @@ -1,231 +0,0 @@ -#include -#include "sourcehook.h" -#include "sourcehook_test.h" -#include "testevents.h" - -// TESTRECALL -// Test modifying parameters from hook handlers - -namespace -{ - StateList g_States; - SourceHook::ISourceHook *g_SHPtr; - SourceHook::Plugin g_PLID; - - MAKE_STATE_1(State_Func1, int); - MAKE_STATE_1(State_H1_Func1, int); - MAKE_STATE_1(State_H2_Func1, int); - MAKE_STATE_2(State_HP_Func1, int, void*); - - MAKE_STATE_1(State_Func2, int); - MAKE_STATE_1(State_H1_Func2, int); - MAKE_STATE_1(State_H2_Func2, int); - MAKE_STATE_2(State_HP_Func2, int, int); - - MAKE_STATE_2(State_Func22, int, int); - MAKE_STATE_2(State_H1_Func22, int, int); - MAKE_STATE_2(State_HP1_Func22, int, int); - MAKE_STATE_2(State_HP2_Func22, int, int); - - struct Test - { - virtual void Func1(int a) - { - ADD_STATE(State_Func1(a)); - } - - virtual int Func2(int a) - { - ADD_STATE(State_Func2(a)); - return 1000; - } - - // Overloaded version - virtual int Func2(int a, int b) - { - ADD_STATE(State_Func22(a, b)); - return 0xDEADFC; - } - }; - - void Handler1_Func1(int a) - { - ADD_STATE(State_H1_Func1(a)); - RETURN_META_NEWPARAMS(MRES_IGNORED, &Test::Func1, (5)); - } - void Handler2_Func1(int a) - { - ADD_STATE(State_H2_Func1(a)); - RETURN_META_NEWPARAMS(MRES_IGNORED, &Test::Func1, (a - 5)); - } - void HandlerPost_Func1(int a) - { - ADD_STATE(State_HP_Func1(a, META_IFACEPTR(void))); - } - - - int Handler1_Func2(int a) - { - ADD_STATE(State_H1_Func2(a)); - // Pfeeehhh, ugly, I know, but I had to test it :) - RETURN_META_VALUE_NEWPARAMS(MRES_OVERRIDE, 500, - static_cast(&Test::Func2), (a - 10)); - } - - int Handler2_Func2(int a) - { - ADD_STATE(State_H2_Func2(a)); - RETURN_META_VALUE_NEWPARAMS(MRES_IGNORED, 0, - static_cast(&Test::Func2), (a - 10)); - } - - int HandlerPost_Func2(int a) - { - ADD_STATE(State_HP_Func2(a, META_RESULT_ORIG_RET(int))); - RETURN_META_VALUE(MRES_IGNORED, 0); - } - - int Handler1_Func22(int a, int b) - { - ADD_STATE(State_H1_Func22(a, b)); - RETURN_META_VALUE(MRES_IGNORED, 0); - } - - int HandlerPost1_Func22(int a, int b) - { - ADD_STATE(State_HP1_Func22(a, b)); - RETURN_META_VALUE_NEWPARAMS(MRES_IGNORED, 0, static_cast(&Test::Func2), (1, 2)); - } - - int HandlerPost1A_Func22(int a, int b) - { - ADD_STATE(State_HP1_Func22(a, b)); - RETURN_META_VALUE_NEWPARAMS(MRES_OVERRIDE, 0, static_cast(&Test::Func2), (1, 2)); - } - - int HandlerPost2_Func22(int a, int b) - { - ADD_STATE(State_HP2_Func22(a, b)); - RETURN_META_VALUE(MRES_IGNORED, 0); - } - - SH_DECL_HOOK1_void(Test, Func1, SH_NOATTRIB, 0, int); - SH_DECL_HOOK1(Test, Func2, SH_NOATTRIB, 0, int, int); - SH_DECL_HOOK2(Test, Func2, SH_NOATTRIB, 1, int, int, int); - - Test *MyTestFactory() - { - return new Test; - } -} - -bool TestRecall(std::string &error) -{ - GET_SHPTR(g_SHPtr); - g_PLID = 1337; - - Test *ptr = MyTestFactory(); - CAutoPtrDestruction apd(ptr); - - SH_ADD_HOOK(Test, Func1, ptr, SH_STATIC(Handler1_Func1), false); - SH_ADD_HOOK(Test, Func1, ptr, SH_STATIC(Handler2_Func1), false); - SH_ADD_HOOK(Test, Func1, ptr, SH_STATIC(HandlerPost_Func1), true); - - ptr->Func1(77); - - CHECK_STATES((&g_States, - new State_H1_Func1(77), - new State_H2_Func1(5), - new State_Func1(0), - new State_HP_Func1(0, ptr), - NULL), "Part 1"); - - SH_REMOVE_HOOK(Test, Func1, ptr, SH_STATIC(Handler1_Func1), false); - SH_ADD_HOOK(Test, Func1, ptr, SH_STATIC(Handler2_Func1), false); - SH_ADD_HOOK(Test, Func1, ptr, SH_STATIC(Handler2_Func1), false); - SH_ADD_HOOK(Test, Func1, ptr, SH_STATIC(Handler2_Func1), false); - - ptr->Func1(77); - - CHECK_STATES((&g_States, - new State_H2_Func1(77), - new State_H2_Func1(72), - new State_H2_Func1(67), - new State_H2_Func1(62), - new State_Func1(57), - new State_HP_Func1(57, ptr), - NULL), "Part 2"); - - SH_REMOVE_HOOK(Test, Func1, ptr, SH_STATIC(Handler2_Func1), false); - SH_REMOVE_HOOK(Test, Func1, ptr, SH_STATIC(HandlerPost_Func1), true); - - ptr->Func1(77); - - CHECK_STATES((&g_States, - new State_Func1(77), - NULL), "Part 3"); - - // Func2 - - SH_ADD_HOOK(Test, Func2, ptr, SH_STATIC(Handler1_Func2), false); - SH_ADD_HOOK(Test, Func2, ptr, SH_STATIC(HandlerPost_Func2), true); - - int a = ptr->Func2(77); - CHECK_STATES((&g_States, - new State_H1_Func2(77), - new State_Func2(67), - new State_HP_Func2(67, 1000), // 1000 because it's the ORIG_RET - NULL), "Part 4"); - - CHECK_COND(a == 500, "Part 4.1"); - - // Func2, with other handler - SH_REMOVE_HOOK(Test, Func2, ptr, SH_STATIC(Handler1_Func2), false); - SH_ADD_HOOK(Test, Func2, ptr, SH_STATIC(Handler2_Func2), false); - - a = ptr->Func2(77); - CHECK_STATES((&g_States, - new State_H2_Func2(77), - new State_Func2(67), - new State_HP_Func2(67, 1000), // 1000 because it's the ORIG_RET - NULL), "Part 4.2"); - - CHECK_COND(a == 1000, "Part 4.2.1"); // Should return 1000 as well. - - // Func22 -> post recalls - - // 1) WITH OVERRIDE - - SH_ADD_HOOK(Test, Func2, ptr, SH_STATIC(Handler1_Func22), false); - SH_ADD_HOOK(Test, Func2, ptr, SH_STATIC(HandlerPost1A_Func22), true); - SH_ADD_HOOK(Test, Func2, ptr, SH_STATIC(HandlerPost2_Func22), true); - - a = ptr->Func2(10, 11); - CHECK_STATES((&g_States, - new State_H1_Func22(10, 11), - new State_Func22(10, 11), - new State_HP1_Func22(10, 11), - new State_HP2_Func22(1, 2), - NULL), "Part 5"); - - CHECK_COND(a == 0, "Part 5.1"); - - // 2) WITH IGNORE - SH_REMOVE_HOOK(Test, Func2, ptr, SH_STATIC(HandlerPost1A_Func22), true); - SH_REMOVE_HOOK(Test, Func2, ptr, SH_STATIC(HandlerPost2_Func22), true); - - SH_ADD_HOOK(Test, Func2, ptr, SH_STATIC(HandlerPost1_Func22), true); - SH_ADD_HOOK(Test, Func2, ptr, SH_STATIC(HandlerPost2_Func22), true); - - a = ptr->Func2(10, 11); - CHECK_STATES((&g_States, - new State_H1_Func22(10, 11), - new State_Func22(10, 11), - new State_HP1_Func22(10, 11), - new State_HP2_Func22(1, 2), - NULL), "Part 5"); - - CHECK_COND(a == 0xDEADFC, "Part 5.1"); - - return true; -} diff --git a/metamod-source/core/sourcehook/test/testreentr.cpp b/metamod-source/core/sourcehook/test/testreentr.cpp deleted file mode 100644 index f96f74a2..00000000 --- a/metamod-source/core/sourcehook/test/testreentr.cpp +++ /dev/null @@ -1,599 +0,0 @@ -// Reentrancy test -// = calling hooks from hook handlers, etc - -#include -#include "sourcehook_test.h" -#include "testevents.h" - -namespace -{ - StateList g_States; - SourceHook::ISourceHook *g_SHPtr; - SourceHook::Plugin g_PLID; - - struct C1; - struct C2; - struct C3; - struct C4; - struct C5; - struct C6; - struct C7; - struct C8; - - C1 *g_pC1; - C2 *g_pC2; - C3 *g_pC3; - C4 *g_pC4; - C5 *g_pC5; - C6 *g_pC6; - C7 *g_pC7; - C8 *g_pC8; - - // param1: This pointer - MAKE_STATE_1(State_C1_F, C1*); - MAKE_STATE_1(State_C2_F, C2*); - MAKE_STATE_1(State_C3_F, C3*); - MAKE_STATE_1(State_C4_F, C4*); - MAKE_STATE_1(State_C5_F, C5*); - MAKE_STATE_1(State_C6_F, C6*); - MAKE_STATE_1(State_C7_F, C7*); - MAKE_STATE_1(State_C8_F, C8*); - - MAKE_STATE_1(State_C1_G, C1*); - MAKE_STATE_1(State_C2_G, C2*); - MAKE_STATE_1(State_C3_G, C3*); - MAKE_STATE_1(State_C4_G, C4*); - MAKE_STATE_1(State_C5_G, C5*); - MAKE_STATE_1(State_C6_G, C6*); - MAKE_STATE_1(State_C7_G, C7*); - MAKE_STATE_1(State_C8_G, C8*); - - MAKE_STATE_1(State_H_C1_F, C1*); - MAKE_STATE_1(State_H_C2_F, C2*); - MAKE_STATE_1(State_H_C3_F, C3*); - MAKE_STATE_1(State_H_C4_F, C4*); - MAKE_STATE_1(State_H_C5_F, C5*); - MAKE_STATE_1(State_H_C6_F, C6*); - MAKE_STATE_1(State_H_C7_F, C7*); - MAKE_STATE_1(State_H_C8_F, C8*); - - MAKE_STATE_1(State_H_C1_G, C1*); - MAKE_STATE_1(State_H_C2_G, C2*); - MAKE_STATE_1(State_H_C3_G, C3*); - MAKE_STATE_1(State_H_C4_G, C4*); - MAKE_STATE_1(State_H_C5_G, C5*); - MAKE_STATE_1(State_H_C6_G, C6*); - MAKE_STATE_1(State_H_C7_G, C7*); - MAKE_STATE_1(State_H_C8_G, C8*); - - MAKE_STATE_1(State_H2_C4_G, C4*); - - int g_TestID; - - struct C1 - { - virtual void F() - { - ADD_STATE(State_C1_F(this)); - } - virtual int G() - { - ADD_STATE(State_C1_G(this)); - return 1; - } - }; - struct C2 - { - virtual void F() - { - ADD_STATE(State_C2_F(this)); - } - virtual int G() - { - ADD_STATE(State_C2_G(this)); - return 2; - } - }; - struct C3 - { - virtual void F() - { - ADD_STATE(State_C3_F(this)); - } - virtual int G() - { - ADD_STATE(State_C3_G(this)); - return 3; - } - }; - struct C4 - { - virtual void F() - { - ADD_STATE(State_C4_F(this)); - } - virtual int G() - { - ADD_STATE(State_C4_G(this)); - return 4; - } - }; - struct C5 - { - virtual void F() - { - ADD_STATE(State_C5_F(this)); - } - virtual int G() - { - ADD_STATE(State_C5_G(this)); - return 5; - } - }; - struct C6 - { - virtual void F() - { - ADD_STATE(State_C6_F(this)); - } - virtual int G() - { - ADD_STATE(State_C6_G(this)); - return 6; - } - }; - struct C7 - { - virtual void F() - { - ADD_STATE(State_C7_F(this)); - } - virtual int G() - { - ADD_STATE(State_C7_G(this)); - return 7; - } - }; - struct C8 - { - virtual void F() - { - ADD_STATE(State_C8_F(this)); - } - virtual int G() - { - ADD_STATE(State_C8_G(this)); - return 8; - } - }; - - SH_DECL_HOOK0_void(C1, F, SH_NOATTRIB, 0); - SH_DECL_HOOK0(C1, G, SH_NOATTRIB, 0, int); - SH_DECL_HOOK0_void(C2, F, SH_NOATTRIB, 0); - SH_DECL_HOOK0(C2, G, SH_NOATTRIB, 0, int); - SH_DECL_HOOK0_void(C3, F, SH_NOATTRIB, 0); - SH_DECL_HOOK0(C3, G, SH_NOATTRIB, 0, int); - SH_DECL_HOOK0_void(C4, F, SH_NOATTRIB, 0); - SH_DECL_HOOK0(C4, G, SH_NOATTRIB, 0, int); - SH_DECL_HOOK0_void(C5, F, SH_NOATTRIB, 0); - SH_DECL_HOOK0(C5, G, SH_NOATTRIB, 0, int); - SH_DECL_HOOK0_void(C6, F, SH_NOATTRIB, 0); - SH_DECL_HOOK0(C6, G, SH_NOATTRIB, 0, int); - SH_DECL_HOOK0_void(C7, F, SH_NOATTRIB, 0); - SH_DECL_HOOK0(C7, G, SH_NOATTRIB, 0, int); - SH_DECL_HOOK0_void(C8, F, SH_NOATTRIB, 0); - SH_DECL_HOOK0(C8, G, SH_NOATTRIB, 0, int); - - void Handler_C1_F() - { - ADD_STATE(State_H_C1_F(META_IFACEPTR(C1))); - g_pC1->G(); - } - int Handler_C1_G() - { - ADD_STATE(State_H_C1_G(META_IFACEPTR(C1))); - g_pC2->F(); - return 1; - } - void Handler_C2_F() - { - ADD_STATE(State_H_C2_F(META_IFACEPTR(C2))); - g_pC2->G(); - } - int Handler_C2_G() - { - ADD_STATE(State_H_C2_G(META_IFACEPTR(C2))); - g_pC3->F(); - return 2; - } - void Handler_C3_F() - { - ADD_STATE(State_H_C3_F(META_IFACEPTR(C3))); - g_pC3->G(); - } - int Handler_C3_G() - { - ADD_STATE(State_H_C3_G(META_IFACEPTR(C3))); - g_pC4->F(); - return 3; - } - void Handler_C4_F() - { - ADD_STATE(State_H_C4_F(META_IFACEPTR(C4))); - g_pC4->G(); - } - int Handler_C4_G() - { - ADD_STATE(State_H_C4_G(META_IFACEPTR(C4))); - g_pC5->F(); - return 4; - } - int Handler2_C4_G() - { - ADD_STATE(State_H2_C4_G(META_IFACEPTR(C4))); - return 4; - } - void Handler_C5_F() - { - ADD_STATE(State_H_C5_F(META_IFACEPTR(C5))); - g_pC5->G(); - } - int Handler_C5_G() - { - ADD_STATE(State_H_C5_G(META_IFACEPTR(C5))); - g_pC6->F(); - return 5; - } - void Handler_C6_F() - { - ADD_STATE(State_H_C6_F(META_IFACEPTR(C6))); - g_pC6->G(); - } - int Handler_C6_G() - { - ADD_STATE(State_H_C6_G(META_IFACEPTR(C6))); - g_pC7->F(); - return 6; - } - void Handler_C7_F() - { - if (g_TestID == 1 || g_TestID == 2) - SH_REMOVE_HOOK(C4, G, g_pC4, SH_STATIC(Handler2_C4_G), false); - if (g_TestID == 2) - SH_REMOVE_HOOK(C4, G, g_pC4, SH_STATIC(Handler_C4_G), false); - - ADD_STATE(State_H_C7_F(META_IFACEPTR(C7))); - g_pC7->G(); - } - int Handler_C7_G() - { - ADD_STATE(State_H_C7_G(META_IFACEPTR(C7))); - g_pC8->F(); - return 7; - } - void Handler_C8_F() - { - ADD_STATE(State_H_C8_F(META_IFACEPTR(C8))); - g_pC8->G(); - } - int Handler_C8_G() - { - ADD_STATE(State_H_C8_G(META_IFACEPTR(C8))); - return 8; - } - - C1 g_C1; - C2 g_C2; - C3 g_C3; - C4 g_C4; - C5 g_C5; - C6 g_C6; - C7 g_C7; - C8 g_C8; -} - -bool TestReentr(std::string &error) -{ - GET_SHPTR(g_SHPtr); - g_PLID = 1337; - - g_pC1 = &g_C1; - g_pC2 = &g_C2; - g_pC3 = &g_C3; - g_pC4 = &g_C4; - g_pC5 = &g_C5; - g_pC6 = &g_C6; - g_pC7 = &g_C7; - g_pC8 = &g_C8; - - SH_ADD_HOOK(C1, F, g_pC1, SH_STATIC(Handler_C1_F), false); - SH_ADD_HOOK(C1, G, g_pC1, SH_STATIC(Handler_C1_G), false); - SH_ADD_HOOK(C2, F, g_pC2, SH_STATIC(Handler_C2_F), false); - SH_ADD_HOOK(C2, G, g_pC2, SH_STATIC(Handler_C2_G), false); - SH_ADD_HOOK(C3, F, g_pC3, SH_STATIC(Handler_C3_F), false); - SH_ADD_HOOK(C3, G, g_pC3, SH_STATIC(Handler_C3_G), false); - SH_ADD_HOOK(C4, F, g_pC4, SH_STATIC(Handler_C4_F), false); - SH_ADD_HOOK(C4, G, g_pC4, SH_STATIC(Handler_C4_G), false); - SH_ADD_HOOK(C5, F, g_pC5, SH_STATIC(Handler_C5_F), false); - SH_ADD_HOOK(C5, G, g_pC5, SH_STATIC(Handler_C5_G), false); - SH_ADD_HOOK(C6, F, g_pC6, SH_STATIC(Handler_C6_F), false); - SH_ADD_HOOK(C6, G, g_pC6, SH_STATIC(Handler_C6_G), false); - SH_ADD_HOOK(C7, F, g_pC7, SH_STATIC(Handler_C7_F), false); - SH_ADD_HOOK(C7, G, g_pC7, SH_STATIC(Handler_C7_G), false); - SH_ADD_HOOK(C8, F, g_pC8, SH_STATIC(Handler_C8_F), false); - SH_ADD_HOOK(C8, G, g_pC8, SH_STATIC(Handler_C8_G), false); - - g_pC1->F(); - - CHECK_STATES((&g_States, - new State_H_C1_F(g_pC1), - new State_H_C1_G(g_pC1), - new State_H_C2_F(g_pC2), - new State_H_C2_G(g_pC2), - new State_H_C3_F(g_pC3), - new State_H_C3_G(g_pC3), - new State_H_C4_F(g_pC4), - new State_H_C4_G(g_pC4), - new State_H_C5_F(g_pC5), - new State_H_C5_G(g_pC5), - new State_H_C6_F(g_pC6), - new State_H_C6_G(g_pC6), - new State_H_C7_F(g_pC7), - new State_H_C7_G(g_pC7), - new State_H_C8_F(g_pC8), - new State_H_C8_G(g_pC8), - new State_C8_G(g_pC8), - new State_C8_F(g_pC8), - new State_C7_G(g_pC7), - new State_C7_F(g_pC7), - new State_C6_G(g_pC6), - new State_C6_F(g_pC6), - new State_C5_G(g_pC5), - new State_C5_F(g_pC5), - new State_C4_G(g_pC4), - new State_C4_F(g_pC4), - new State_C3_G(g_pC3), - new State_C3_F(g_pC3), - new State_C2_G(g_pC2), - new State_C2_F(g_pC2), - new State_C1_G(g_pC1), - new State_C1_F(g_pC1), - NULL), "1"); - - - SH_ADD_HOOK(C4, G, g_pC4, SH_STATIC(Handler2_C4_G), false); - - g_pC1->F(); - - CHECK_STATES((&g_States, - new State_H_C1_F(g_pC1), - new State_H_C1_G(g_pC1), - new State_H_C2_F(g_pC2), - new State_H_C2_G(g_pC2), - new State_H_C3_F(g_pC3), - new State_H_C3_G(g_pC3), - new State_H_C4_F(g_pC4), - new State_H_C4_G(g_pC4), - new State_H_C5_F(g_pC5), - new State_H_C5_G(g_pC5), - new State_H_C6_F(g_pC6), - new State_H_C6_G(g_pC6), - new State_H_C7_F(g_pC7), - new State_H_C7_G(g_pC7), - new State_H_C8_F(g_pC8), - new State_H_C8_G(g_pC8), - new State_C8_G(g_pC8), - new State_C8_F(g_pC8), - new State_C7_G(g_pC7), - new State_C7_F(g_pC7), - new State_C6_G(g_pC6), - new State_C6_F(g_pC6), - new State_C5_G(g_pC5), - new State_C5_F(g_pC5), - new State_H2_C4_G(g_pC4), - new State_C4_G(g_pC4), - new State_C4_F(g_pC4), - new State_C3_G(g_pC3), - new State_C3_F(g_pC3), - new State_C2_G(g_pC2), - new State_C2_F(g_pC2), - new State_C1_G(g_pC1), - new State_C1_F(g_pC1), - NULL), "2"); - - g_pC1->F(); - - CHECK_STATES((&g_States, - new State_H_C1_F(g_pC1), - new State_H_C1_G(g_pC1), - new State_H_C2_F(g_pC2), - new State_H_C2_G(g_pC2), - new State_H_C3_F(g_pC3), - new State_H_C3_G(g_pC3), - new State_H_C4_F(g_pC4), - new State_H_C4_G(g_pC4), - new State_H_C5_F(g_pC5), - new State_H_C5_G(g_pC5), - new State_H_C6_F(g_pC6), - new State_H_C6_G(g_pC6), - new State_H_C7_F(g_pC7), - new State_H_C7_G(g_pC7), - new State_H_C8_F(g_pC8), - new State_H_C8_G(g_pC8), - new State_C8_G(g_pC8), - new State_C8_F(g_pC8), - new State_C7_G(g_pC7), - new State_C7_F(g_pC7), - new State_C6_G(g_pC6), - new State_C6_F(g_pC6), - new State_C5_G(g_pC5), - new State_C5_F(g_pC5), - new State_H2_C4_G(g_pC4), - new State_C4_G(g_pC4), - new State_C4_F(g_pC4), - new State_C3_G(g_pC3), - new State_C3_F(g_pC3), - new State_C2_G(g_pC2), - new State_C2_F(g_pC2), - new State_C1_G(g_pC1), - new State_C1_F(g_pC1), - NULL), "3"); - - g_TestID = 1; - - g_pC1->F(); - - CHECK_STATES((&g_States, - new State_H_C1_F(g_pC1), - new State_H_C1_G(g_pC1), - new State_H_C2_F(g_pC2), - new State_H_C2_G(g_pC2), - new State_H_C3_F(g_pC3), - new State_H_C3_G(g_pC3), - new State_H_C4_F(g_pC4), - new State_H_C4_G(g_pC4), - new State_H_C5_F(g_pC5), - new State_H_C5_G(g_pC5), - new State_H_C6_F(g_pC6), - new State_H_C6_G(g_pC6), - new State_H_C7_F(g_pC7), - new State_H_C7_G(g_pC7), - new State_H_C8_F(g_pC8), - new State_H_C8_G(g_pC8), - new State_C8_G(g_pC8), - new State_C8_F(g_pC8), - new State_C7_G(g_pC7), - new State_C7_F(g_pC7), - new State_C6_G(g_pC6), - new State_C6_F(g_pC6), - new State_C5_G(g_pC5), - new State_C5_F(g_pC5), - new State_C4_G(g_pC4), - new State_C4_F(g_pC4), - new State_C3_G(g_pC3), - new State_C3_F(g_pC3), - new State_C2_G(g_pC2), - new State_C2_F(g_pC2), - new State_C1_G(g_pC1), - new State_C1_F(g_pC1), - NULL), "4"); - - g_pC1->F(); - - CHECK_STATES((&g_States, - new State_H_C1_F(g_pC1), - new State_H_C1_G(g_pC1), - new State_H_C2_F(g_pC2), - new State_H_C2_G(g_pC2), - new State_H_C3_F(g_pC3), - new State_H_C3_G(g_pC3), - new State_H_C4_F(g_pC4), - new State_H_C4_G(g_pC4), - new State_H_C5_F(g_pC5), - new State_H_C5_G(g_pC5), - new State_H_C6_F(g_pC6), - new State_H_C6_G(g_pC6), - new State_H_C7_F(g_pC7), - new State_H_C7_G(g_pC7), - new State_H_C8_F(g_pC8), - new State_H_C8_G(g_pC8), - new State_C8_G(g_pC8), - new State_C8_F(g_pC8), - new State_C7_G(g_pC7), - new State_C7_F(g_pC7), - new State_C6_G(g_pC6), - new State_C6_F(g_pC6), - new State_C5_G(g_pC5), - new State_C5_F(g_pC5), - new State_C4_G(g_pC4), - new State_C4_F(g_pC4), - new State_C3_G(g_pC3), - new State_C3_F(g_pC3), - new State_C2_G(g_pC2), - new State_C2_F(g_pC2), - new State_C1_G(g_pC1), - new State_C1_F(g_pC1), - NULL), "5"); - - - - SH_ADD_HOOK(C4, G, g_pC4, SH_STATIC(Handler2_C4_G), false); - - g_TestID = 2; - - g_pC1->F(); - - CHECK_STATES((&g_States, - new State_H_C1_F(g_pC1), - new State_H_C1_G(g_pC1), - new State_H_C2_F(g_pC2), - new State_H_C2_G(g_pC2), - new State_H_C3_F(g_pC3), - new State_H_C3_G(g_pC3), - new State_H_C4_F(g_pC4), - new State_H_C4_G(g_pC4), - new State_H_C5_F(g_pC5), - new State_H_C5_G(g_pC5), - new State_H_C6_F(g_pC6), - new State_H_C6_G(g_pC6), - new State_H_C7_F(g_pC7), - new State_H_C7_G(g_pC7), - new State_H_C8_F(g_pC8), - new State_H_C8_G(g_pC8), - new State_C8_G(g_pC8), - new State_C8_F(g_pC8), - new State_C7_G(g_pC7), - new State_C7_F(g_pC7), - new State_C6_G(g_pC6), - new State_C6_F(g_pC6), - new State_C5_G(g_pC5), - new State_C5_F(g_pC5), - new State_C4_G(g_pC4), - new State_C4_F(g_pC4), - new State_C3_G(g_pC3), - new State_C3_F(g_pC3), - new State_C2_G(g_pC2), - new State_C2_F(g_pC2), - new State_C1_G(g_pC1), - new State_C1_F(g_pC1), - NULL), "6"); - - g_pC1->F(); - - CHECK_STATES((&g_States, - new State_H_C1_F(g_pC1), - new State_H_C1_G(g_pC1), - new State_H_C2_F(g_pC2), - new State_H_C2_G(g_pC2), - new State_H_C3_F(g_pC3), - new State_H_C3_G(g_pC3), - new State_H_C4_F(g_pC4), - new State_C4_G(g_pC4), - new State_C4_F(g_pC4), - new State_C3_G(g_pC3), - new State_C3_F(g_pC3), - new State_C2_G(g_pC2), - new State_C2_F(g_pC2), - new State_C1_G(g_pC1), - new State_C1_F(g_pC1), - NULL), "7"); - - SH_REMOVE_HOOK(C1, F, g_pC1, SH_STATIC(Handler_C1_F), false); - SH_REMOVE_HOOK(C1, G, g_pC1, SH_STATIC(Handler_C1_G), false); - SH_REMOVE_HOOK(C2, F, g_pC2, SH_STATIC(Handler_C2_F), false); - SH_REMOVE_HOOK(C2, G, g_pC2, SH_STATIC(Handler_C2_G), false); - SH_REMOVE_HOOK(C3, F, g_pC3, SH_STATIC(Handler_C3_F), false); - SH_REMOVE_HOOK(C3, G, g_pC3, SH_STATIC(Handler_C3_G), false); - SH_REMOVE_HOOK(C4, F, g_pC4, SH_STATIC(Handler_C4_F), false); - SH_REMOVE_HOOK(C4, G, g_pC4, SH_STATIC(Handler_C4_G), false); - SH_REMOVE_HOOK(C5, F, g_pC5, SH_STATIC(Handler_C5_F), false); - SH_REMOVE_HOOK(C5, G, g_pC5, SH_STATIC(Handler_C5_G), false); - SH_REMOVE_HOOK(C6, F, g_pC6, SH_STATIC(Handler_C6_F), false); - SH_REMOVE_HOOK(C6, G, g_pC6, SH_STATIC(Handler_C6_G), false); - SH_REMOVE_HOOK(C7, F, g_pC7, SH_STATIC(Handler_C7_F), false); - SH_REMOVE_HOOK(C7, G, g_pC7, SH_STATIC(Handler_C7_G), false); - SH_REMOVE_HOOK(C8, F, g_pC8, SH_STATIC(Handler_C8_F), false); - SH_REMOVE_HOOK(C8, G, g_pC8, SH_STATIC(Handler_C8_G), false); - - return true; -} diff --git a/metamod-source/core/sourcehook/test/testref.cpp b/metamod-source/core/sourcehook/test/testref.cpp deleted file mode 100644 index 97d5789d..00000000 --- a/metamod-source/core/sourcehook/test/testref.cpp +++ /dev/null @@ -1,227 +0,0 @@ -#include "testevents.h" -#include "sourcehook_test.h" - -// References and private copy constructors and stuff like that! - -/* -BAILOPAN, 29.04.2006 21:51 : -onoto-san, interesting error from VS -we have this function: -void GabHaben(ISomething &sth); - -SomethingDerived sth; -and SH_CALL(cc, &WHAT::GabHaben)(sth); -"No copy constructor available for class 'SomethingDerived'" -*/ - - -namespace -{ - StateList g_States; - SourceHook::ISourceHook *g_SHPtr; - SourceHook::Plugin g_PLID; - - MAKE_STATE_1(State_Result, int); - MAKE_STATE_1(State_Result_InHook, int); - - MAKE_STATE_2(State_F2_Called, int, int); - MAKE_STATE_2(State_F2_Handler_Called, int, int); - - struct POD - { - int a; - int b; - int c; - int d; - int e; - int f; - }; - - class CBase - { - // Private copy constructor! - CBase(CBase &other) - { - } - public: - CBase() - { - } - - virtual int Func() - { - return 0; - } - }; - - class CDerived : public CBase - { - virtual int Func() - { - return 10; - } - }; - - // Complicated derived shit ! - class COtherWeirdBase - { - int member; - }; - class CDerived2 : private COtherWeirdBase, public CBase - { - int m_Return; - public: - CDerived2(int a) : m_Return(a) - { - } - - virtual int Func() - { - return m_Return; - } - }; - - class CHello - { - public: - virtual int Func(CBase &sth) - { - return sth.Func(); - } - - virtual void F2(POD a) - { - } - }; - - - class Test2 - { - public: - virtual void F1(){} - virtual void F2(POD &a) - { - ADD_STATE(State_F2_Called(a.a, a.b)); - } - }; - - class CHook - { - public: - virtual int Func(CBase &sth) - { - ADD_STATE(State_Result_InHook(sth.Func())); - RETURN_META_VALUE(MRES_SUPERCEDE, 20); - } - - virtual void F2(POD &a) - { - ADD_STATE(State_F2_Handler_Called(a.a, a.b)); - } - - virtual void F21(POD a) - { - } - }; - - SH_DECL_HOOK1(CHello, Func, SH_NOATTRIB, 0, int, CBase&); - SH_DECL_HOOK1_void(CHello, F2, SH_NOATTRIB, 0, POD); - SH_DECL_HOOK1_void(Test2, F2, SH_NOATTRIB, 0, POD&); - - CHello *MyInstanceFactory() - { - return new CHello; - } -} - - -bool TestRef(std::string &error) -{ - GET_SHPTR(g_SHPtr); - g_PLID = 1; - - CBase base; - CDerived der; - CDerived2 der2(11); - CDerived2 der3(12); - CHello *pHello = MyInstanceFactory(); - Test2 *pTest2 = new Test2; - CAutoPtrDestruction apd(pHello); - CAutoPtrDestruction apd2(pTest2); - CHook hook; - - SourceHook::CallClass *cc = SH_GET_CALLCLASS(pHello); - - ADD_STATE(State_Result(pHello->Func(base))); - ADD_STATE(State_Result(pHello->Func(der))); - ADD_STATE(State_Result(pHello->Func(der2))); - ADD_STATE(State_Result(pHello->Func(der3))); - - CHECK_STATES((&g_States, - new State_Result(0), - new State_Result(10), - new State_Result(11), - new State_Result(12), - NULL), "Part 1"); - - ADD_STATE(State_Result(SH_CALL(cc, &CHello::Func)(base))); - ADD_STATE(State_Result(SH_CALL(cc, &CHello::Func)(der))); - ADD_STATE(State_Result(SH_CALL(cc, &CHello::Func)(der2))); - ADD_STATE(State_Result(SH_CALL(cc, &CHello::Func)(der3))); - - CHECK_STATES((&g_States, - new State_Result(0), - new State_Result(10), - new State_Result(11), - new State_Result(12), - NULL), "Part 2"); - - SH_ADD_HOOK(CHello, Func, pHello, SH_MEMBER(&hook, &CHook::Func), false); - - ADD_STATE(State_Result(pHello->Func(base))); - ADD_STATE(State_Result(pHello->Func(der))); - ADD_STATE(State_Result(pHello->Func(der2))); - ADD_STATE(State_Result(pHello->Func(der3))); - - CHECK_STATES((&g_States, - new State_Result_InHook(0), - new State_Result(20), - new State_Result_InHook(10), - new State_Result(20), - new State_Result_InHook(11), - new State_Result(20), - new State_Result_InHook(12), - new State_Result(20), - NULL), "Part 3"); - - ADD_STATE(State_Result(SH_CALL(cc, &CHello::Func)(base))); - ADD_STATE(State_Result(SH_CALL(cc, &CHello::Func)(der))); - ADD_STATE(State_Result(SH_CALL(cc, &CHello::Func)(der2))); - ADD_STATE(State_Result(SH_CALL(cc, &CHello::Func)(der3))); - - CHECK_STATES((&g_States, - new State_Result(0), - new State_Result(10), - new State_Result(11), - new State_Result(12), - NULL), "Part 4"); - - // Check for correct ref proto handling - - SH_ADD_HOOK(CHello, F2, pHello, SH_MEMBER(&hook, &CHook::F21), false); - SH_ADD_HOOK(Test2, F2, pTest2, SH_MEMBER(&hook, &CHook::F2), false); - - POD pod = { 1, 2 }; - pTest2->F2(pod); - - int a = 5; - - pHello->F2(pod); - - CHECK_STATES((&g_States, - new State_F2_Handler_Called(1, 2), - new State_F2_Called(1, 2), - NULL), "Part 5"); - - return true; -} diff --git a/metamod-source/core/sourcehook/test/testrefret.cpp b/metamod-source/core/sourcehook/test/testrefret.cpp deleted file mode 100644 index 4fad5b32..00000000 --- a/metamod-source/core/sourcehook/test/testrefret.cpp +++ /dev/null @@ -1,319 +0,0 @@ -#include "testevents.h" -#include "sourcehook_test.h" - -// Tests support for functions which return references - -namespace -{ - StateList g_States; - SourceHook::ISourceHook *g_SHPtr; - SourceHook::Plugin g_PLID; - - MAKE_STATE_1(State_Func1_Pre1, int*); // p1: the ref Func1_Pre1 is going to return - MAKE_STATE_3(State_Func1_Pre2, META_RES, int*, int*); // p1: current status - // p2: override ret - // p3: what this handler is going to supercede with - MAKE_STATE_1(State_Func1, int*); // p1: the ref Func1 is going to return - MAKE_STATE_2(State_Func1_Post1, int*, int*); // p1: orig_ret; p2: override_ret - MAKE_STATE_1(State_Func1_Post2, int*); // p1: what it's going to return - MAKE_STATE_1(State_Func1_Ret, int*); // p1: the ref it returned - - - MAKE_STATE_2(State_Func2_Pre1, int, const int*); // p1: func's p1; p2: what it's going to ret - MAKE_STATE_2(State_Func2, int, const int*); // p1: func's p1; p2: what it's going to ret - MAKE_STATE_3(State_Func2_Post1, int, const int*, const int*); // p1: func's p1; p2: orig ret; p3: override ret - MAKE_STATE_1(State_Func2_Ret, const int*); // p1: ret - - int g_Var; - - class Test - { - public: - int m_Var1; - int m_Var2; - - Test() : m_Var1(87) - { - } - - virtual int& Func1() - { - ADD_STATE(State_Func1(&m_Var1)); - return m_Var1; - } - virtual const int& Func2(int p1) - { - ADD_STATE(State_Func2(p1, &m_Var2)); - m_Var2 = p1; - return m_Var2; - } - }; - - SH_DECL_HOOK0(Test, Func1, SH_NOATTRIB, 0, int&); - SH_DECL_MANUALHOOK0(Manual_Test_Func1, 0, 0, 0, int&); - SH_DECL_HOOK1(Test, Func2, SH_NOATTRIB, 0, const int&, int); - SH_DECL_MANUALHOOK1(Manual_Test_Func2, 1, 0, 0, const int&, int); - - class CHook - { - public: - int m_Var; - virtual int& Func1_Pre1() - { - ADD_STATE(State_Func1_Pre1(&m_Var)); - RETURN_META_VALUE(MRES_OVERRIDE, m_Var); - } - virtual int &Func1_Pre2() - { - int &overrideret = META_RESULT_OVERRIDE_RET(int&); - overrideret = 1337; - ADD_STATE(State_Func1_Pre2(META_RESULT_STATUS, &overrideret, &g_Var)); - RETURN_META_VALUE(MRES_SUPERCEDE, g_Var); - } - virtual int& Func1_Post1() - { - ADD_STATE(State_Func1_Post1(&META_RESULT_ORIG_RET(int&), &META_RESULT_OVERRIDE_RET(int&))); - RETURN_META_NOREF(MRES_IGNORED, int&); - } - virtual int& Func1_Post2() - { - ADD_STATE(State_Func1_Post2(&m_Var)); - RETURN_META_VALUE(MRES_OVERRIDE, m_Var); - } - - virtual const int& Func2_PreRecall_OverrideRet_Normal(int p1) - { - ADD_STATE(State_Func2_Pre1(p1, &m_Var)); - RETURN_META_VALUE_NEWPARAMS(MRES_OVERRIDE, m_Var, static_cast(&Test::Func2), (1337)); - } - - virtual const int& Func2_PreRecall_OverrideRet_Manual(int p1) - { - ADD_STATE(State_Func2_Pre1(p1, &m_Var)); - RETURN_META_VALUE_MNEWPARAMS(MRES_OVERRIDE, m_Var, Manual_Test_Func2, (1337)); - } - - virtual const int& Func2_Post1(int p1) - { - ADD_STATE(State_Func2_Post1(p1, &META_RESULT_ORIG_RET(int&), &META_RESULT_OVERRIDE_RET(int&))); - RETURN_META_NOREF(MRES_IGNORED, const int&); - } - }; - - Test *MyTestFactory() - { - return new Test; - } -} - -class TesterRefRet -{ -public: - Test *pTest; - CHook hook; - - TesterRefRet() - { - pTest = NULL; - } - - bool doTests(std::string &error) - { - GET_SHPTR(g_SHPtr); - g_PLID = 1; - - pTest = MyTestFactory(); - CAutoPtrDestruction apd(pTest); - - int &ret1 = pTest->Func1(); - ADD_STATE(State_Func1_Ret(&ret1)); - - CHECK_STATES((&g_States, - new State_Func1(&pTest->m_Var1), - new State_Func1_Ret(&pTest->m_Var1), - NULL), "Part 1"); - - // Now add Func1_Pre1, which supercedes and returns hook.m_Var - AddHook__Test_Func1__Func1_Pre(); - - int &ret2 = pTest->Func1(); - ADD_STATE(State_Func1_Ret(&ret2)); - - CHECK_STATES((&g_States, - new State_Func1_Pre1(&hook.m_Var), // Pre1 says that it's going to override with hook.m_Var - new State_Func1(&pTest->m_Var1), // Function says that it's going to return pTest->m_Var1 - new State_Func1_Ret(&hook.m_Var), // hook.m_Var is returned - NULL), "Part 2"); - - // Now add Func1_Post1, which only reports orig ret and override ret - AddHook__Test_Func1__Func1_Post(); - - int &ret3 = pTest->Func1(); - ADD_STATE(State_Func1_Ret(&ret3)); - - CHECK_STATES((&g_States, - new State_Func1_Pre1(&hook.m_Var), // Pre1 says that it's going to override with hook.m_Var - new State_Func1(&pTest->m_Var1), // Function says that it's going to return pTest->m_Var1 - new State_Func1_Post1(&pTest->m_Var1, &hook.m_Var), // origret(=p1) is what it wanted to - // return, overrideret(=p2) is pre1's var - new State_Func1_Ret(&hook.m_Var), // hook.m_Var is returned - NULL), "Part 3"); - - // Now add Func1_Pre2, which supercedes and returns g_Var (it also sets the override ret from pre1 to 1337) - // and add Func1_Post2, which overrides and returns hook.m_Var again. - - AddHook__Test_Func1__Func1_Pre2(); - AddHook__Test_Func1__Func1_Post2(); - - int &ret4 = pTest->Func1(); - ADD_STATE(State_Func1_Ret(&ret4)); - - CHECK_STATES((&g_States, - new State_Func1_Pre1(&hook.m_Var), // Pre1 says that it's going to override with hook.m_Var - new State_Func1_Pre2(MRES_OVERRIDE, // current status - &hook.m_Var, // override ret (which it set to 1337) - &g_Var), // what it's going to ret, AND supercede with - - new State_Func1_Post1(&g_Var, &g_Var), // origret(=p1) is what pre2 superceded with, - // so overrideret(=p2) has to be the same - new State_Func1_Post2(&hook.m_Var), // post2 is going to override with hook.m_Var again - new State_Func1_Ret(&hook.m_Var), // ==>>> hook.m_Var is returned - NULL), "Part 4"); - - CHECK_COND(hook.m_Var == 1337, "Part 4.1"); - - // Through a callclass - SourceHook::CallClass *cc1 = SH_GET_CALLCLASS(pTest); - int &ret5 = SH_CALL(cc1, &Test::Func1)(); - ADD_STATE(State_Func1_Ret(&ret5)); - - CHECK_STATES((&g_States, - new State_Func1(&pTest->m_Var1), - new State_Func1_Ret(&pTest->m_Var1), - NULL), "Part 5"); - - SH_RELEASE_CALLCLASS(cc1); - - //////////////////////////////////////////////////////////////////////////////////////// - // Func2 tests - const int &ret21 = pTest->Func2(500); - ADD_STATE(State_Func2_Ret(&ret21)); - - CHECK_STATES((&g_States, - new State_Func2(500, &pTest->m_Var2), - new State_Func2_Ret(&pTest->m_Var2), - NULL), "Part 6"); - - AddHook__Test_Func2__Func2_Pre1(); - AddHook__Test_Func2__Func2_Post1(); - - const int &ret22 = pTest->Func2(500); - ADD_STATE(State_Func2_Ret(&ret22)); - - CHECK_STATES((&g_States, - new State_Func2_Pre1(500, &hook.m_Var), // p1 was 500; it's going to override with hook.m_Var; and also change p1 to 1337 - new State_Func2(1337, &pTest->m_Var2), // p1 was 1337; it's going to ret pTest->m_Var2 - new State_Func2_Post1(1337, // p1 was 1337 - &pTest->m_Var2, // orig ret was pTest->m_Var2 - &hook.m_Var), // override ret was hook.m_Var - new State_Func2_Ret(&hook.m_Var), // really returned hook.m_Var - NULL), "Part 7"); - - return true; - } - - virtual void AddHook__Test_Func1__Func1_Pre() = 0; - virtual void AddHook__Test_Func1__Func1_Post() = 0; - - virtual void AddHook__Test_Func1__Func1_Pre2() = 0; - virtual void AddHook__Test_Func1__Func1_Post2() = 0; - - virtual void AddHook__Test_Func2__Func2_Pre1() = 0; - virtual void AddHook__Test_Func2__Func2_Post1() = 0; -}; - -class TesterRefRetNonManual : public TesterRefRet -{ -public: - void AddHook__Test_Func1__Func1_Pre() - { - SH_ADD_HOOK(Test, Func1, pTest, SH_MEMBER(&hook, &CHook::Func1_Pre1), false); - } - - void AddHook__Test_Func1__Func1_Post() - { - SH_ADD_HOOK(Test, Func1, pTest, SH_MEMBER(&hook, &CHook::Func1_Post1), true); - } - - void AddHook__Test_Func1__Func1_Pre2() - { - SH_ADD_HOOK(Test, Func1, pTest, SH_MEMBER(&hook, &CHook::Func1_Pre2), false); - } - - void AddHook__Test_Func1__Func1_Post2() - { - SH_ADD_HOOK(Test, Func1, pTest, SH_MEMBER(&hook, &CHook::Func1_Post2), true); - } - - void AddHook__Test_Func2__Func2_Pre1() - { - SH_ADD_HOOK(Test, Func2, pTest, SH_MEMBER(&hook, &CHook::Func2_PreRecall_OverrideRet_Normal), false); - } - - void AddHook__Test_Func2__Func2_Post1() - { - SH_ADD_HOOK(Test, Func2, pTest, SH_MEMBER(&hook, &CHook::Func2_Post1), true); - } -}; - -class TesterRefRetManual : public TesterRefRet -{ -public: - void AddHook__Test_Func1__Func1_Pre() - { - SH_ADD_MANUALHOOK(Manual_Test_Func1, pTest, SH_MEMBER(&hook, &CHook::Func1_Pre1), false); - } - - void AddHook__Test_Func1__Func1_Post() - { - SH_ADD_MANUALHOOK(Manual_Test_Func1, pTest, SH_MEMBER(&hook, &CHook::Func1_Post1), true); - } - - void AddHook__Test_Func1__Func1_Pre2() - { - SH_ADD_MANUALHOOK(Manual_Test_Func1, pTest, SH_MEMBER(&hook, &CHook::Func1_Pre2), false); - } - - void AddHook__Test_Func1__Func1_Post2() - { - SH_ADD_MANUALHOOK(Manual_Test_Func1, pTest, SH_MEMBER(&hook, &CHook::Func1_Post2), true); - } - - void AddHook__Test_Func2__Func2_Pre1() - { - SH_ADD_MANUALHOOK(Manual_Test_Func2, pTest, SH_MEMBER(&hook, &CHook::Func2_PreRecall_OverrideRet_Manual), false); - } - - void AddHook__Test_Func2__Func2_Post1() - { - SH_ADD_MANUALHOOK(Manual_Test_Func2, pTest, SH_MEMBER(&hook, &CHook::Func2_Post1), true); - } -}; - -bool TestRefRet(std::string &error) -{ - TesterRefRet *testerNonManual = new TesterRefRetNonManual; - bool resNonManual = testerNonManual->doTests(error); - if (!resNonManual) - { - return false; - } - - TesterRefRet *testerManual = new TesterRefRetManual; - bool resManual = testerManual->doTests(error); - if (!resManual) - { - return false; - } - return true; -} diff --git a/metamod-source/core/sourcehook/test/testvphooks.cpp b/metamod-source/core/sourcehook/test/testvphooks.cpp deleted file mode 100644 index c5894b03..00000000 --- a/metamod-source/core/sourcehook/test/testvphooks.cpp +++ /dev/null @@ -1,274 +0,0 @@ -#include -#include "sourcehook.h" -#include "sourcehook_test.h" -#include "testevents.h" -#include - -// TEST VP HOOKS -// Test vfnptr-wide hooks - -namespace -{ - StateList g_States; - SourceHook::ISourceHook *g_SHPtr; - SourceHook::Plugin g_PLID; - - class IBase; - - MAKE_STATE_1(State_D1_Func1, IBase *); - MAKE_STATE_1(State_D2_Func1, IBase *); - MAKE_STATE_1(State_Func1_Pre, IBase *); - MAKE_STATE_1(State_Func1_Post, IBase *); - - MAKE_STATE_1(State_D1_Func2, IBase *); - MAKE_STATE_1(State_D2_Func2, IBase *); - MAKE_STATE_1(State_Func2_Pre, IBase *); - MAKE_STATE_1(State_Func2_Post, IBase *); - - MAKE_STATE_2(State_D1_Func3, IBase *, int); - MAKE_STATE_2(State_D2_Func3, IBase *, int); - MAKE_STATE_2(State_Func3_Pre, IBase *, int); - MAKE_STATE_2(State_Func3_Post, IBase *, int); - - class IBase - { - public: - virtual void Func1() = 0; - virtual void Func2() = 0; - virtual void Func3(int x) = 0; - }; - - class CDerived1 : public IBase - { - public: - virtual void Func1() - { - ADD_STATE(State_D1_Func1(this)); - } - virtual void Func2() - { - ADD_STATE(State_D1_Func2(this)); - } - virtual void Func3(int x) - { - ADD_STATE(State_D1_Func3(this, x)); - } - }; - - class CDerived2 : public IBase - { - public: - virtual void Func1() - { - ADD_STATE(State_D2_Func1(this)); - } - virtual void Func2() - { - ADD_STATE(State_D2_Func2(this)); - } - virtual void Func3(int x) - { - ADD_STATE(State_D2_Func3(this, x)); - } - }; - - void Handler_Func1_Pre() - { - ADD_STATE(State_Func1_Pre(META_IFACEPTR(IBase))); - } - void Handler_Func1_Post() - { - ADD_STATE(State_Func1_Post(META_IFACEPTR(IBase))); - } - int g_F2_Pre_HookToRemove = 0; - void Handler_Func2_Pre() - { - ADD_STATE(State_Func2_Pre(META_IFACEPTR(IBase))); - SH_REMOVE_HOOK_ID(g_F2_Pre_HookToRemove); - } - void Handler_Func2_Post() - { - ADD_STATE(State_Func2_Post(META_IFACEPTR(IBase))); - } - - - void Handler_Func3_Pre(int x) - { - ADD_STATE(State_Func3_Pre(META_IFACEPTR(IBase), x)); - - RETURN_META_NEWPARAMS(MRES_IGNORED, &IBase::Func3, (x+1)); - } - void Handler_Func3_Post(int x) - { - ADD_STATE(State_Func3_Post(META_IFACEPTR(IBase), x)); - } - - SH_DECL_HOOK0_void(IBase, Func1, SH_NOATTRIB, 0); - SH_DECL_HOOK0_void(IBase, Func2, SH_NOATTRIB, 0); - SH_DECL_HOOK1_void(IBase, Func3, SH_NOATTRIB, 0, int); - - SH_DECL_MANUALHOOK1_void(IBase_Func3_Manual, 2, 0, 0, int); -} - -// Clang is smart enough to see: -// CDerived1 a; -// IBase *p = &a; -// p->Func1() -// -// May bypass the vtable, since p_d1i2 has exactly one assignment. We try to -// defeat the analysis that produces this result here. -template -T defeat_ssa(const T& t) -{ - return time(NULL) ? t : nullptr; -} - -bool TestVPHooks(std::string &error) -{ - GET_SHPTR(g_SHPtr); - g_PLID = 1337; - - CDerived1 d1i1; - CDerived1 d1i2; - CDerived2 d2i1; - - IBase *p_d1i1 = defeat_ssa(&d1i1); - IBase *p_d1i2 = defeat_ssa(&d1i2); - IBase *p_d2i1 = defeat_ssa(&d2i1); - - int hook1 = SH_ADD_VPHOOK(IBase, Func1, p_d1i1, SH_STATIC(Handler_Func1_Pre), false); - - p_d1i1->Func1(); - p_d1i2->Func1(); - p_d2i1->Func1(); - - CHECK_STATES((&g_States, - new State_Func1_Pre(p_d1i1), - new State_D1_Func1(p_d1i1), - - new State_Func1_Pre(p_d1i2), - new State_D1_Func1(p_d1i2), - - new State_D2_Func1(p_d2i1), - NULL), "Part 1"); - - SH_REMOVE_HOOK_ID(hook1); - - p_d1i1->Func1(); - p_d1i2->Func1(); - p_d2i1->Func1(); - - CHECK_STATES((&g_States, - new State_D1_Func1(p_d1i1), - - new State_D1_Func1(p_d1i2), - - new State_D2_Func1(p_d2i1), - NULL), "Part 2"); - - - // Normal hook, then vp hook - - int hook2 = SH_ADD_HOOK(IBase, Func1, p_d1i1, SH_STATIC(Handler_Func1_Pre), false); - hook1 = SH_ADD_VPHOOK(IBase, Func1, p_d1i1, SH_STATIC(Handler_Func1_Pre), false); - - p_d1i1->Func1(); - p_d1i2->Func1(); - p_d2i1->Func1(); - - CHECK_STATES((&g_States, - new State_Func1_Pre(p_d1i1), - new State_Func1_Pre(p_d1i1), - new State_D1_Func1(p_d1i1), - - new State_Func1_Pre(p_d1i2), - new State_D1_Func1(p_d1i2), - - new State_D2_Func1(p_d2i1), - NULL), "Part 3"); - - SH_REMOVE_HOOK_ID(hook1); - - p_d1i1->Func1(); - p_d1i2->Func1(); - p_d2i1->Func1(); - - CHECK_STATES((&g_States, - new State_Func1_Pre(p_d1i1), - new State_D1_Func1(p_d1i1), - - new State_D1_Func1(p_d1i2), - - new State_D2_Func1(p_d2i1), - NULL), "Part 4"); - - SH_REMOVE_HOOK_ID(hook2); - - p_d1i1->Func1(); - p_d1i2->Func1(); - p_d2i1->Func1(); - - CHECK_STATES((&g_States, - new State_D1_Func1(p_d1i1), - - new State_D1_Func1(p_d1i2), - - new State_D2_Func1(p_d2i1), - NULL), "Part 5"); - - // Test this: - // Normal hook AND vp hook on Func2 - // Func2's pre handler removes the VP hook. - - hook1 = SH_ADD_VPHOOK(IBase, Func2, p_d1i1, SH_STATIC(Handler_Func2_Pre), false); - hook2 = SH_ADD_HOOK(IBase, Func2, p_d1i1, SH_STATIC(Handler_Func2_Pre), false); - - g_F2_Pre_HookToRemove = hook1; - p_d1i1->Func2(); - p_d1i1->Func2(); - - CHECK_STATES((&g_States, - new State_Func2_Pre(p_d1i1), - new State_D1_Func2(p_d1i1), - - new State_Func2_Pre(p_d1i1), - new State_D1_Func2(p_d1i1), - - NULL), "Part 6"); - - SH_REMOVE_HOOK_ID(hook1); - - // Hook function 3: - // Using manualhook, VP - hook1 = SH_ADD_MANUALVPHOOK(IBase_Func3_Manual, p_d1i1, SH_STATIC(Handler_Func3_Pre), false); - - // Normally, VP - hook2 = SH_ADD_VPHOOK(IBase, Func3, p_d1i1, SH_STATIC(Handler_Func3_Pre), false); - - // Normally, no VP - int hook3 = SH_ADD_HOOK(IBase, Func3, p_d1i1, SH_STATIC(Handler_Func3_Pre), false); - - p_d1i1->Func3(1); - - CHECK_STATES((&g_States, - new State_Func3_Pre(p_d1i1, 1), // manual vp hook - new State_Func3_Pre(p_d1i1, 2), // normal vp hook - new State_Func3_Pre(p_d1i1, 3), // normal non-vp hook - - new State_D1_Func3(p_d1i1, 4), // function - - NULL), "Part 7.1"); - - p_d1i2->Func3(1); - - CHECK_STATES((&g_States, - new State_Func3_Pre(p_d1i2, 1), // manual vp hook - new State_Func3_Pre(p_d1i2, 2), // normal vp hook - - new State_D1_Func3(p_d1i2, 3), // function - - NULL), "Part 7.2"); - - return true; -} - diff --git a/metamod-source/core/version.rc b/metamod-source/core/version.rc deleted file mode 100644 index 63bde2b5..00000000 --- a/metamod-source/core/version.rc +++ /dev/null @@ -1,101 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" -#include - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION MMS_VERSION_FILE - PRODUCTVERSION MMS_VERSION_FILE - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "Comments", "Metamod: Source" - VALUE "FileDescription", "Metamod: Source" - VALUE "FileVersion", MMS_VERSION_STRING - VALUE "InternalName", "mmsource" - VALUE "LegalCopyright", "Copyright (c) 2004-2010, Metamod: Source Development Team" - VALUE "OriginalFilename", BINARY_NAME - VALUE "ProductName", "Metamod:Source" - VALUE "ProductVersion", MMS_VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/metamod-source/core/vsp_bridge.cpp b/metamod-source/core/vsp_bridge.cpp deleted file mode 100644 index e5ca2f6f..00000000 --- a/metamod-source/core/vsp_bridge.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2009 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#include "metamod.h" -#include "metamod_util.h" -#include -#include -#include -#include -#include -#include -#include -#include "provider/provider_base.h" - -#if SOURCE_ENGINE >= SE_ORANGEBOX -SH_DECL_HOOK1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &); -#else -SH_DECL_HOOK0_void(ConCommand, Dispatch, SH_NOATTRIB, false); -#endif - -ConCommand *g_plugin_unload = NULL; -bool g_bIsTryingToUnload; -SourceHook::String vsp_desc("Metamod:Source"); -static char gamedll_iface_name[128] = { 0 }; - -#if SOURCE_ENGINE >= SE_ORANGEBOX -void InterceptPluginUnloads(const CCommand &args) -#else -void InterceptPluginUnloads() -#endif -{ - g_bIsTryingToUnload = true; -} - -#if SOURCE_ENGINE >= SE_ORANGEBOX -void InterceptPluginUnloads_Post(const CCommand &args) -#else -void InterceptPluginUnloads_Post() -#endif -{ - g_bIsTryingToUnload = false; -} - -class VspBridge : public IVspBridge -{ -public: - virtual bool Load(const vsp_bridge_info *info, char *error, size_t maxlength) - { - if (!g_Metamod.IsLoadedAsGameDLL()) - { - vsp_desc.append(" "); - vsp_desc.append(METAMOD_VERSION); - - CGlobalVars *pGlobals; - IPlayerInfoManager *playerInfoManager; - - playerInfoManager = (IPlayerInfoManager *)info->gsFactory("PlayerInfoManager002", NULL); - if (playerInfoManager == NULL) - { - UTIL_Format(error, maxlength, "Metamod:Source requires gameinfo.txt modification to load on this game"); - return false; - } - - pGlobals = playerInfoManager->GetGlobalVars(); - - for (unsigned int i = 3; i <= 50; i++) - { - UTIL_Format(gamedll_iface_name, sizeof(gamedll_iface_name), "ServerGameDLL%03d", i); - if ((server = (IServerGameDLL *)info->gsFactory(gamedll_iface_name, NULL)) != NULL) - { - g_Metamod.SetGameDLLInfo((CreateInterfaceFn)info->gsFactory, gamedll_iface_name, i, false); - break; - } - } - - if (server == NULL) - { - UTIL_Format(error, maxlength, "Metamod:Source could not load (GameDLL version not compatible)."); - return false; - } - - char gameclients_iface[] = "ServerGameClients000"; - for (unsigned int i = 3; i <= 4; i++) - { - gameclients_iface[19] = '0' + i; - if ((gameclients = (IServerGameClients *)info->gsFactory(gameclients_iface, NULL)) == NULL) - break; - } - - mm_InitializeGlobals((CreateInterfaceFn) info->engineFactory, - (CreateInterfaceFn) info->engineFactory, - (CreateInterfaceFn) info->engineFactory, - pGlobals); - - if (!mm_DetectGameInformation()) - { - UTIL_Format(error, maxlength, "Metamod:Source failed to detect game paths; cannot load."); - return false; - } - - mm_InitializeForLoad(); - g_Metamod.NotifyVSPListening(info->vsp_callbacks, info->vsp_version); - mm_StartupMetamod(true); - } - else - { - vsp_desc.append(" Interface "); - vsp_desc.append(METAMOD_VERSION); - - g_Metamod.NotifyVSPListening(info->vsp_callbacks, info->vsp_version); - } - -#if SOURCE_ENGINE >= SE_ORANGEBOX - g_plugin_unload = icvar->FindCommand("plugin_unload"); -#else - const ConCommandBase *pBase = icvar->GetCommands(); - while (pBase != NULL) - { - if (pBase->IsCommand() && strcmp(pBase->GetName(), "plugin_unload") == 0) - { - g_plugin_unload = (ConCommand *)pBase; - break; - } - pBase = pBase->GetNext(); - } -#endif - - if (g_plugin_unload != NULL) - { - SH_ADD_HOOK_STATICFUNC(ConCommand, Dispatch, g_plugin_unload, InterceptPluginUnloads, false); - SH_ADD_HOOK_STATICFUNC(ConCommand, Dispatch, g_plugin_unload, InterceptPluginUnloads_Post, true); - } - - return true; - } - - virtual void Unload() - { - // Source2 doesn't have the Error function (nor VSP support). - if (g_bIsTryingToUnload) - { - Error("Metamod:Source cannot be unloaded from VSP mode. Use \"meta unload\" to unload specific plugins.\n"); - return; - } - - if (g_plugin_unload != NULL) - { - SH_REMOVE_HOOK_STATICFUNC(ConCommand, Dispatch, g_plugin_unload, InterceptPluginUnloads, false); - SH_REMOVE_HOOK_STATICFUNC(ConCommand, Dispatch, g_plugin_unload, InterceptPluginUnloads_Post, true); - g_plugin_unload = NULL; - } - if (!g_Metamod.IsLoadedAsGameDLL()) - { - mm_UnloadMetamod(); - } - } - - virtual const char *GetDescription() - { - return vsp_desc.c_str(); - } -}; - -VspBridge mm16_vsp_bridge; - -SMM_API IVspBridge * -GetVspBridge() -{ - return &mm16_vsp_bridge; -} - diff --git a/metamod-source/cruft/installer/Attach.cfg b/metamod-source/cruft/installer/Attach.cfg deleted file mode 100644 index 6c576351..00000000 --- a/metamod-source/cruft/installer/Attach.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files\borland\delphi7\Projects\Bpl" --LN"c:\program files\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/metamod-source/cruft/installer/Attach.dpr b/metamod-source/cruft/installer/Attach.dpr deleted file mode 100644 index eb258b42..00000000 --- a/metamod-source/cruft/installer/Attach.dpr +++ /dev/null @@ -1,85 +0,0 @@ -program Attach; - -{$APPTYPE CONSOLE} - -uses - SysUtils, Classes, UnitPackSystem; - -var eStream: TMemoryStream; - eFiles: TStringList; - Version: String; -begin - WriteLn('// File attacher for the MM:S installer'); - WriteLn('// by Basic-Master'); - WriteLn(''); - WriteLn('// Looking up files...'); - { Check files } - if FileExists(ExtractFilePath(ParamStr(0)) + 'files\hl2launch.exe') then - WriteLn('// Found files\hl2launch.exe') - else begin - WriteLn('// Error: Couldn''t find files\hl2launch.exe!'); - ReadLn; - exit; - end; - if FileExists(ExtractFilePath(ParamStr(0)) + 'files\server.dll.source') then - WriteLn('// Found files\server.dll.source') - else begin - WriteLn('// Error: Couldn''t find files\server.dll.source!'); - ReadLn; - exit; - end; - if FileExists(ExtractFilePath(ParamStr(0)) + 'files\server_i486.so.source') then - WriteLn('// Found files\server_i486.so.source') - else begin - WriteLn('// Error: Couldn''t find files\server_i486.so.source!'); - ReadLn; - exit; - end; - if FileExists(ExtractFilePath(ParamStr(0)) + 'files\server.dll.orangebox') then - WriteLn('// Found files\server.dll.orangebox') - else begin - WriteLn('// Error: Couldn''t find files\server.dll.orangebox!'); - ReadLn; - exit; - end; - if FileExists(ExtractFilePath(ParamStr(0)) + 'files\server_i486.so.orangebox') then - WriteLn('// Found files\server_i486.so.orangebox') - else begin - WriteLn('// Error: Couldn''t find files\server_i486.so.orangebox!'); - ReadLn; - exit; - end; - if FileExists(ExtractFilePath(ParamStr(0)) + 'MMS_Installer.exe') then - WriteLn('// Found MMS_Installer.exe') - else begin - WriteLn('// Error: Couldn''t find MMS_Installer.exe!'); - ReadLn; - exit; - end; - { Get version number } - WriteLn('// Please enter the version number:'); - ReadLn(Version); - if (Trim(Version) = '') then begin - WriteLn('// Error: Invalid version number!'); - ReadLn; - exit; - end; - { Compress files } - WriteLn('// Compressing files...'); - eFiles := TStringList.Create; - eFiles.Add(ExtractFilePath(ParamStr(0)) + 'files\hl2launch.exe'); - eFiles.Add(ExtractFilePath(ParamStr(0)) + 'files\server.dll.source'); - eFiles.Add(ExtractFilePath(ParamStr(0)) + 'files\server_i486.so.source'); - eFiles.Add(ExtractFilePath(ParamStr(0)) + 'files\server.dll.orangebox'); - eFiles.Add(ExtractFilePath(ParamStr(0)) + 'files\server_i486.so.orangebox'); - eStream := TMemoryStream.Create; - CompressFiles(eFiles, ExtractFilePath(ParamStr(0)) + 'temp.zip'); - eStream.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'temp.zip'); - WriteLn('// Attaching output to MMS_Installer.exe...'); - AttachToFile(ExtractFilePath(ParamStr(0)) + 'MMS_Installer.exe', eStream, Version); - DeleteFile(ExtractFilePath(ParamStr(0)) + 'temp.zip'); - eStream.Free; - eFiles.Free; - WriteLn('// Done.'); - ReadLn; -end. diff --git a/metamod-source/cruft/installer/HL2Launch.cfg b/metamod-source/cruft/installer/HL2Launch.cfg deleted file mode 100644 index 662b86fe..00000000 --- a/metamod-source/cruft/installer/HL2Launch.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\programme\borland\delphi7\Projects\Bpl" --LN"c:\programme\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/metamod-source/cruft/installer/HL2Launch.dpr b/metamod-source/cruft/installer/HL2Launch.dpr deleted file mode 100644 index 7eacc19a..00000000 --- a/metamod-source/cruft/installer/HL2Launch.dpr +++ /dev/null @@ -1,189 +0,0 @@ -program HL2Launch; - -{$APPTYPE CONSOLE} - -uses - SysUtils, - ShellApi, - Windows, - Classes; - -procedure LaunchFile(eFile, eStartDir, eParams: String); -var eStartInfo: TStartupInfo; - eProcInfo: TProcessInformation; -begin - FillChar(eStartInfo, SizeOf(TStartupInfo), 0); - with eStartInfo do begin - cb := SizeOf(eStartInfo); - dwFlags := STARTF_USESHOWWINDOW; - end; - - if (CreateProcess(nil, PChar(eFile + #32 + eParams), nil, nil, False, NORMAL_PRIORITY_CLASS, nil, PChar(eStartDir), eStartInfo, eProcInfo)) then begin - try - WaitForSingleObject(eProcInfo.hProcess, INFINITE); - finally - CloseHandle(eProcInfo.hProcess); - CloseHandle(eProcInfo.hThread); - end; - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 2); - Write(' Done.' + #13#10); - end - else begin - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 12); - Write(' Couldn''t start hl2.exe!' + #13#10); - end; -end; - -function GetFileSize(eFile: String): Int64; -var eFindHandle: THandle; - eFindData: TWIN32FINDDATA; -begin - Result := 0; - if not FileExists(eFile) then exit; - eFindHandle := FindFirstFile(PChar(eFile), eFindData); - if eFindHandle = INVALID_HANDLE_VALUE then exit; - Result := (eFindData.nFileSizeHigh * (Int64(MAXDWORD) + 1)) + eFindData.nFileSizeLow; - FindClose(eFindHandle); -end; - -var eStream: TFileStream; - ePath, eParams: String; - eModDir: String; - eSearchRec: TSearchRec; - eStr: TStringList; - i: integer; - CheckSuccessful: Boolean; - StartTime: Cardinal; -begin - ePath := ExtractFilePath(ParamStr(0)); - for i := 1 to ParamCount do - eParams := eParams + #32 + ParamStr(i); - Delete(eParams, 1, 1); - if Pos('console', LowerCase(eParams)) = 0 then - eParams := eParams + ' -console'; - eStream := nil; - eModDir := ''; - - SetConsoleTitle('HL2 Launcher'); - Sleep(200); // wait a few ms until the launch program is closed - - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 2); - WriteLn(' _ _ _ ____ _ _ '); - WriteLn('| | | | | |___ \ | | __ _ _ _ _ __ ___| |__ ___ _ __ '); - WriteLn('| |_| | | __) | | | / _` | | | | ''_ \ / __| ''_ \ / _ \ ''__|'); - WriteLn('| _ | |___ / __/ | |__| (_| | |_| | | | | (__| | | | __/ | '); - WriteLn('|_| |_|_____|_____| |_____\__,_|\__,_|_| |_|\___|_| |_|\___|_| '); - WriteLn(' for listen servers using Metamod:Source'); - WriteLn(''); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 7); - { Check files } - WriteLn('Checking files...'); - if not FileExists(ePath + 'hl2.exe') then begin - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 12); - WriteLn('Error: hl2.exe is missing! Maybe wrong directory? If not, start your HL2 Mod again via Steam and try again.'); - ReadLn; - exit; - end; - if not FileExists(Copy(ePath, 1, Pos('\steamapps\', LowerCase(ePath))) + 'steam.exe') then begin - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 12); - WriteLn('Error: Cannot find steam.exe! Make sure this application is located in your listen server''s directory.'); - ReadLn; - exit; - end; - { Verify GameInfo.txt ... } - Write('Verifying GameInfo.txt...'); - if (FindFirst(ePath + '*.*', faDirectory, eSearchRec) = 0) then begin - repeat - if (FileExists(ePath + eSearchRec.Name + '\GameInfo.txt')) then begin - eModDir := eSearchRec.Name; - break; - end; - until (FindNext(eSearchRec) <> 0); - end; - FindClose(eSearchRec.FindHandle); - if eModDir = '' then begin - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 12); - WriteLn(''); - WriteLn('Error: Couldn''t find GameInfo.txt!'); - ReadLn; - exit; - end - else begin - if Pos('game', LowerCase(eParams)) = 0 then // a small test which isn't worth a notice - eParams := '-game ' + eSearchRec.Name + #32 + eParams; - - eStr := TStringList.Create; - eStr.LoadFromFile(ePath + eModDir + '\GameInfo.txt'); - if Pos('|gameinfo_path|addons/metamod/bin', LowerCase(eStr.Text)) = 0 then begin - CheckSuccessful := False; - for i := 0 to eStr.Count -1 do begin - if Pos('searchpaths', LowerCase(Trim(eStr[i]))) = 1 then begin - if i+3 >= eStr.Count then - break; - eStr.Insert(i+2, ' GameBin |gameinfo_path|addons/metamod/bin'); - CheckSuccessful := True; - break; - end; - end; - - if CheckSuccessful then begin - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 2); - SetFileAttributes(PChar(ePath + eModDir + '\GameInfo.txt'), 0); - eStr.SaveToFile(ePath + eModDir + '\GameInfo.txt'); - SetFileAttributes(PChar(ePath + eModDir + '\GameInfo.txt'), faReadOnly); - Write(' Registered MM:S sucessfully' + #13#10); - end - else begin - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 4); - Write(' Unexpected EOF, your GameInfo.txt seems to be corrupt' + #13#10); - end; - end - else begin - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 2); - Write(' Done' + #13#10); - end; - eStr.Free; - end; - { ... and set it to write-protected } - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 7); - Write('Setting GameInfo.txt to write-protected...'); - try - eStream := TFileStream.Create(ePath + eModDir + '\GameInfo.txt', fmShareDenyWrite); - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 2); - Write(' Done.' + #13#10); - except - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 14); - WriteLn(''); - WriteLn('Warning: Couldn''t set GameInfo.txt to write-protected!'); - eStream := nil; - end; - { Launch Steam if not opened } - ShellExecute(0, 'open', PChar(Copy(ePath, 1, Pos('\steamapps\', LowerCase(ePath))) + 'steam.exe'), nil, PChar(Copy(ePath, 1, Pos('\steamapps\', LowerCase(ePath)))), SW_SHOW); - { Launch game } - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 7); - Write('Starting HL2...'); - StartTime := GetTickCount; - LaunchFile(ePath + 'hl2.exe', Copy(ePath, 1, Pos('Steam', ePath)+5), eParams); - if (GetTickCount - StartTime < 10000) then begin - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 14); - WriteLn('Important: If you experience any problems starting HL2 using this program, please start it once via Steam and try again.'); - ReadLn; - end; - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 7); - { Free GameInfo.txt } - Write('Removing read-only again from GameInfo.txt...'); - if Assigned(eStream) then begin - eStream.Free; - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 2); - Write(' Done' + #13#10); - end - else begin - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 4); - Write(' Skipped' + #13#10); - end; - { End message } - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 7); - WriteLn(''); - WriteLn('Thanks for using Metamod:Source! Visit http://www.sourcemm.net/'); - Sleep(2500); -end. diff --git a/metamod-source/cruft/installer/MMS_Installer.cfg b/metamod-source/cruft/installer/MMS_Installer.cfg deleted file mode 100644 index 6c576351..00000000 --- a/metamod-source/cruft/installer/MMS_Installer.cfg +++ /dev/null @@ -1,38 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files\borland\delphi7\Projects\Bpl" --LN"c:\program files\borland\delphi7\Projects\Bpl" --w-UNSAFE_TYPE --w-UNSAFE_CODE --w-UNSAFE_CAST diff --git a/metamod-source/cruft/installer/MMS_Installer.dpr b/metamod-source/cruft/installer/MMS_Installer.dpr deleted file mode 100644 index 09273aca..00000000 --- a/metamod-source/cruft/installer/MMS_Installer.dpr +++ /dev/null @@ -1,72 +0,0 @@ -program MMS_Installer; - -{ - - Metamod:Source installer is published under the zlib/libpng license, as well - as Metamod:Source itself. You can find a copy of it below. - - --------- - - zLib/libpng License - - Copyright (c) 2007, Metamod:Source Development Team - - This software is provided 'as-is', without any express or implied warranty. - In no event will the authors be held liable for any damages arising from the - use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it freely, - subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software in a - product, an acknowledgment in the product documentation would be appreciated - but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source distribution. - - --------- - - Used components: - - - Indy 9 (www.indyproject.org) - - FlatStyle Components (www.torry.net) - - FlatPack Component Pack (www.torry.net) - - JVCL Lib Pack 3.0 (jvcl.sourceforge.net) - - Half-Life 2 Icons by Vasili "vaksa" Vorotnikov, Thanks! - Visit www.vaksa.net for further information - -} - -uses - Forms, - UnitfrmMain in 'UnitfrmMain.pas' {frmMain}, - UnitFunctions in 'UnitFunctions.pas', - UnitfrmProxy in 'UnitfrmProxy.pas' {frmProxy}, - UnitInstall in 'UnitInstall.pas', - UnitSelectModPath in 'UnitSelectModPath.pas' {frmSelectModPath}, - UnitPackSystem in 'UnitPackSystem.pas'; - -{$R *.res} - -begin - Application.Initialize; - Application.Title := 'Metamod:Source Installer'; - Application.CreateForm(TfrmMain, frmMain); - UnitfrmMain.VERSION := GetVersion; - frmMain.lblWelcome.Caption := 'Welcome to the Metamod:Source ' + VERSION + ' Setup Wizard'; - frmMain.lblInfo1.Caption := 'This wizard will guide you through the installation of Metamod:Source ' + VERSION + '.'; - frmMain.lblSubTitle1.Caption := 'Please review the following license terms before installing Metamod:Source ' + VERSION + '.'; - frmMain.lblSelectModInfo.Caption := 'Please select the mod Metamod:Source ' + VERSION + ' shall be installed to.'; - frmMain.lblTitle3.Caption := 'Installing Metamod:Source ' + VERSION + ' via FTP'; - frmMain.lblTitle5.Caption := 'Installing Metamod:Source ' + VERSION; - frmMain.lblSubTitle5.Caption := 'Please wait while Metamod:Source ' + VERSION + ' is being installed.'; - Application.CreateForm(TfrmProxy, frmProxy); - Application.CreateForm(TfrmSelectModPath, frmSelectModPath); - Application.Run; -end. diff --git a/metamod-source/cruft/installer/MMS_Installer.res b/metamod-source/cruft/installer/MMS_Installer.res deleted file mode 100644 index ace3317386baf91cfcde64e0f3db13dbbe283fb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 171456 zcmeEP1$b0P*B+{r0)Y@hummRr*ARjPm*Vd3?k>TCJ0V6~u>>tr1L~y|XekcG9TKYa zYyUm}``+CfHp^}VY5VodeV%u(?v*)bj?K&&rIacHh!}y*6iZxA{rs!ACX041SFSf- z(=T$xMkSyxkVR$1FP68AEA5wmG5$?euU!2R>8MJ#?4#-Yo=PZXrWrQYNgt?Zmrt1X{*|_ZL1o#>!vz%=%BiG?yNd?>83h$ z?W(!~J$v*}-Fo#>y@9@c`lxPw`l`nL#;BeH2CCk}MyQ4ZC#mMcXQ*x?#;YC^W~c!J z2B?8R-$8@a;DG~Gzab;kfDt3r$Ppvd*wLd^-;rb0fU)D%(20{(|B2JouxT^ZxUpl^ z#0eABf(eqS;@k>?rX$w`mDa%ynSu0eJ*~`>`Sqs&$S@YDmne$X0 z@4c$%yj{v|-gf1&e6OnO`+@4SV4WH@Z;={2cZnM3y--b^w?NHYyiyHV9;Ak@3{=C` zgs5r0p{n8Xc-3sh7S(Zir0TjVMzveDNxic=UiDZLqdKimP~FyTR$eQ2s+Q{jzx}F7 zz=x_;zyZ~9!w%IcaIfkeuw8Ws`9O6G-lqoQ{{#FstFiuZYWT)oYJA8ZH7VwOHG9(m zWxwcSRbbhtD);iQl+((uR1V+sDu@3M%E9-P%J2J~a`yjT<@P+RW$aVa*e&Mif?+L%5Hg}D#u(=)i&Kw9$Rjxs$1_WkNCUFefvXId*?${ zVoQ=L8=s^qCnTw=J07XpyC10rfgh`uA%|7_(9hM_0~eLo_B*QOyZ2T7cOR*y`+ig{ z5B#J$eDIU%@!=!Y|HB8W$HAY~&_fT^^n=&c^sf@tkWYS5!#@2*P5k^vHTCl(HRZ^! zYU+_+)V#TKm5+~)TD)kHTDEkl^6?8+t5>g4enFusz~5i_21lq>VKHi5)K=xa)XGmgE#+UCJ_EDnx4yx44UX^`4q>hVe^7q^P-I(DpBwwM$D>|*;5E_e$Uk74g^ z+_*g%qis16Kfm`=#%RVf7 z_wU`mf8XA{34tB(2g`3j$+*22zU5tg(f*c@fYrN!8!9?EI$6AtlY`6XWsz|$%9Ss_ zivNj=!%y3yZF+2dcWdM-H%Et*p8zs-S{@b~x%f3FmokxYv2nOQHr&Ofh)dD7D!|+OVkDh}c|t3OaR<K~8$)V5E(5Q&mh-I%h zIc1NEz!DpgJ-_3tS@OKLAT}y&Y|00?IJk`W;YASEi@9Gpg*UI!O+ z&EnvgGa@3pgG1KjgQ2U6IX-!zdU>2CC7+6j$N{$Qwjhr~o?QCvBSL*y>vS%1cS>>n zf-HHQoSQi~yf)YDdRIr(B-0n;{!^a3e?&yCJWei71)Z`bUmk(?VbwEn-AVKBjg8wI zn6G&8(#4Ckem744htC=pUSH7k00*bei;N!-yLTVhzh&vll`9w94t_TM!)J&S-p9e= zJL4Z5oZJGm@{iqj;J~3nhxU|pcXw}p2$k}{yV@fbcGND{naIVVu(5y+eQaE&d)0IQ z0GpqD{4t*p>g&e4V=>+z1na#FFSPG-)6)OMi7uZSw?D@9J|i{Jg6pfAUdW-?`?&tl z*T&_;lP6EkHf?_$8{xCW6VeVPmdr$6;GiWw5uYE!a^?KlvuDnn`jXpRaQz6U!n5XJ z>Fns_WqbhY;|!nBLl3cBy~O1_H@O^(@LBEV==9-3@0l|_9d&W{Lmr3XQ+*;I{`AvN z*R|_!V@q2O`)u&cLnkN52d7>S z2N&cYOkb>A9G%>zE#3a(ALh&NUoTtbX%yK`vmW$KA%9T<#Rdf}`|Nkomp|`sUo@_| zsVJRXZv9MYuk(abU=b&e89__8fBoRcUw{4StAopzOz5QX4TZc*zUqH`kL!yV3y8nf z98kd32TonLWYMxki-IPMs$JOlE)EWbf4S)7_MdauHCG^)@lFm-g^Jgz-MMouHy7-o z>S&A8HN(YwhWh5Oqdf~S*dA*&D^_#}$D}DW{@%@z9 zn(s~jkl(>Izl&?p*WRZ6gIME#qJ1FNyb#Z2X=>$@#ySqJX%YNIgnsNR*iy>Uk1c{@ zUO=)Ro9yLk2etRYma1E)j;hq4rK;Abm8#R^9p%=%yQ=w4CsnT9AXTEnNL9PrQ03WU zl&UshhHBvDrTME(8#gxktj(IM#_zOA_E%fJ(=yp-ZPnW7v(|6dLpAQyTeXG%+Od6m z)uCf2)wyFw)u|i&*B-r8=bpV)cWn2f58Jbs>eIWo=EJt_(N}fu(@%Bn(_i)M*H3lt zJ5aUnH&k^VGD`IvG)#3FHb(UrIzsgvK3aJVouyh2pQhRm9jCgE7^ixU8mGFAnWEZ{ znyT83o2~le|MYk1>y8*cT=R2Bj~b;$PMWHQO@89rPMSDT^KEC(o~`orU#wh)tWbqV z`zyz>A~5>;k$i1L^fs+=Z9D#xjtRf*}bs`{)5ReMgjYBgz*YCdVP>M_GdwVkn2 zHJ9sv3b`D)*qTRjt4;R0;o+s`$p!s?^3) zszUI$s%-H0s(8pnRVw@kRW;(A$`N=KzUg(9Blsr#(>uyO@UqGmd{sGw-c(K@S5!{; zsV?wS9m4OZT-dgcN>q8HAF4u8cUAtFhbljO)`IX^OUK+)Wg@SrvQbx6*|=M(WZXSf zYD=Q35TB^3##~mF1&_c9PrntkAV z)oS}S)qKZI)fm2Q^Zh@mHU}Q5t{?rRx_$Js>V4>EHR|vKHS4Q~YT{SFs5xIHshLNO zzU;yU3)G@@8`QG(>($~7A!>uKuk!cvQ>#Mb)S@j1)MEIs0b6&gkc4+t(DwH=Up8jf z0Tr|Rfb!mTRIS;6R7HLCwc2*%jN0+_8MXh|88!FoAJx(mzbe0zKdaEQk5%N+D=Pfd zBNcx37q#uuZz}BEW3}h%@2tlE@TH!!BbH)~tiPtSy}hHoqobX@y?wE#uc&43=+b%8 zM~4o5IJTyvqrK%lob8>*uGzL@HZ zT8`yc#u>R^ZZR(Q6=sG8hc>r!oED0ufMXWBH$p@E**ls}H?kYME;u;Y z_Z7QrSoN^CYtghtsP7C{yKjvbI6E%z#fjiH+3orU2fuCiDtCg{b+mIf-QIZ_4+I9k zZkOM8T`s$3+zVdU%O1*vi=Ep{oDB>N?w-Z2Wn23!)3v?8-gc&P*3R>Sz^rz;-?Dqt zc-ptOouly$?Obqw{y%h?qf0U8o}t>c>wDSR*=e7syr!?dGtKb>sOAjAD+%1>!3tbkkJ8|dEr5}Fy;o2Q8U#uONtK2tJ zy1E$o;Cs8uD|bIkx_;%#l?O>!?)Z<(YnN;AC(gO;ja00V%WXmY!$+p&_Nvi&@$z<4 z&*2@k2dD~;g@>;E^!UTX#Jfkg3~+a}$G7DzeBaCTf2B^^*}HU_IAHOD$%EV-`DeTO zH(hRYOD3{XwQvmVPyWV-Vf(_Z3k6NLH$LP{J!cdNPVzLbaI9lI@lt;^GeiG5SP!O$ zo%{(4>oKeSS3KWW4vDBRi*{D6;5bN-TDocM}uanX0vvxTo1(7drnr> z5MyuBsF7x?G;ZE9*-mMVxO(Gv+NxIVI;i^Xd#Wa#`=~bEdZ~8p+Nq9+uhT~91RI5M z_V!(2r*!MC+V|+KI(F}=+V||EdUWq@jJfyjlN@tz*rmT}+_k@I(`Tsa(4((v-^*yb zwCXopwe2@Vbp*Qg9iY1PhaJ;@m}bYc8#-RK89N(s_#ueF4_Cv74O6sB#*P`IhK--B z22Px%#*Z7P#oY^!2~ zv2u^9vvRkpynMeJ?Y%^^Gg>T)P)(P_sRqlosfH`JtH!JMsEz^etMQ>b)uhPxR34v0 zs_@c7ntkE8{(I%@dqU+4I1l~*gDM<&R=I@!pvoiOU1h^(s$$qVwFRJi7+;e$8EvRJ}bvss>?S ztLB?dtKqSqtI0c$s_8qvP)*{msgAp@sm^tq|MpfB0uL_>-U2 zoNsmvqgK-xOzxWUtVD)ZF=VM|8@cRga+H0+;NaX3bl?1k1dU4YF6!|Kgs#{ep#P z-th66H^*mYqpU%u6WQOH*gu!owCM|{wJzCo$l%i1jmN9zA2fOL>)G2(o;XN7iE5YxD5fx>>c>P3=CDedZJ|;xcT(Wc;&!wyf1~efGwq zCrtPC_3h!_a=q`8$rHwv%$k)?aL+$@!UjJ-zg|Hr@Vj_I+w57hYu}c&`Dnj@P2pi- zTebuQtRLXoa#hcgEWgO?-R383j*5yycz)ZA2HA72EM%CWKbMR>WkM2Bg14}ZeK zqV=QcUqdC)_f~?S!((WwBm@mEt9t67a?#)o=lluY#5VD&30ZKB5ts4EBy9f)2+r&G z9s0UbMR3mOufK+^r}Z4onIeF$=dkf);kIeN4%(6{cO0TB^qHm_Hg2lvwuUWQs}{|h z!}o5j+O=t;wH3GO&_%WA+FP{*+QIK`-=U*XuXX9F>8z$bho~0a`$JDbXZ0PT-sw9+ zbsaiJH5@!ewHiE5wHPu{y)$&OYA|@JYBF**+K;EHW}{}QVMB+ifn%qranMVZhxw>V zBbF-9nL(=d%s}NdXSb?2Gg6hE6{{MKU8ow4U#yx=TBe##S*d!@TCSWIy|2nI-KWYg ze^2%BUav+h*`UTPTBoK5#;K`M)F+2kq2-^c+#Aj*Pd~Jc`hKCR2OU#I1HM-!LN2HZ zp=Xp^*m>n1b`m-S`UC!Eo*?RtyPA*b5P1)NWuhv*`M#>X?WU@ca9`06)b#*;z*@VK zRGmGKRO_Has_W)&)wq3V)5Jd8DCc^6Yi*G$R;*CoD}B|%fGFj+X@`p0nxHntC#d*6 zdsO7k0}8H&@;i1<%|DW)RviCPtv>l1+7XGzYRe_G9sU5TCv(Xxfxn~#&;jJh(luMb z3KjBY?PfYsv`~YV?b@~UG_|92bE#LmMXT0z8rC=J3%k0_vXp7oJYUu_RkUs{&P|%Q zzR}p@wVJgW@q+%Pnlx?tO34zhHfh?VFvPjG?~(28N=>m3nWkKtG;iO&YO&63n>Kkn zYf+_g*KOaWQ&0CUUD{O1>jWRPugg0_`}H0$bZGtT6|3>3su%1yX!!7f9kRckwT4}B z+@X(M!3t#^vcCR$k6yV=?`(U;*yx|YWhk|SxV<-lcq{>NtHB#`QUi7m0++GR{}HZP zv#26CW|YJHfT!iKHxJ@J#w)Rn|70$iC6HMHnI(`}0+}U{Spu0QkXZtmC6HMHnI(`} z0+}W7ZzutDRLqhV{te&xKmH92WU%#=0cZw47&T#VJsZGqPYx3>N=oU_kMTUO z|Idhvd21|oGnao*36S2T5oyKn9%;yC26k~}vw9%_ku=3PTuGob;A#at&hzY>!|VCK zd_W$69ZlW_$P?tNOnyKi{EdrFbJBzKW+NPFO}deWlI$qEJ)c`mep)61WC=9U65BZC7;thbjm%02kCBU-QY0i3C5FouP0HhVW6Oo3^ zfOmk_Ks%s4&=KflhR)d5p&#cp1g~!k@c+C|Q=kDro~Qg!cLe~_yb{1Zj-*R-fV67=>Z`AIK_9fqF3!$tN)#`?san;lAJ(Z| z`#8ofpTQX9ySBjdwQJQnTBUO3_lg%Q7VBKN@Nx`*7>|2)0mvuh3-VG+fc)SEP`*&s z6agH8oB;VVQzoDgo@X(mJL?wfI%PZS9m||Dx&_eot*lvlgVw9dmn*lYftS~1j4}VS zdDEuyqJS{~ztyW#=le3Qu3HNfC@}B!*I)02=aL^f0OUFH0`)~zpcFvE@(k=nk7uFklpa?*^Q>QmWz3ap>|2t@Ii#Ny%)v8oE z=#($tEWBeEfI5OQp%G9MC<9O)P%pe;;%#hZF6Jd*Di_*M^t0%9QKz!LH+%c-xBFEn zUw$Xb`e$2o_$M5%U$5TfVnvJkz52>4-SOV$d{6`X)C;r^-UeRHJ`#R?U6y=b~4*N|vv-dxa!^a)JI(@Wp+r4qDC(iL2f0e!~d7ixgx~V*{`9HDH7AEhr4$w}nn>%;zAttt3yh|CCymC51TWPHR985^<7 zi13{z_=FWA${L}W2``@J?-D>dF<_n!9Kc^p7P=~EMv-G>gusG zXNq^gMi~)(Kx&12Ek*pklj4D=rL0bG(wg**y(-l=T^IMwH^hC*O{ux{rg&_3zg_A%l|y-^-*0onxR0k&b$7y38xfI01JAco`3xJi0w&-%_f)@R^Anc(d$-eED) zCF)~MrWZxsbPGK%7dJmT+2t@yj*nQ%{P@3=2@lJP+5 z?lc3A*VWH$zc017-xE*#uNMAa6ZawSRExW=@f3Lhc`BuN&>6`Oxll9k3mF-_O(rc| zB>jdC)$~zDOw0lgVNWXy;ifK~XlWPusTBAB7P|Y4xP@Ji@{y>UG1sI@9O^4*USlih1-f~Vex&1$2U2I} zLqV<-skz8In~|Dl<`YXd9eP_4;wmeoXqtPl-@CiHN8%{mjT_&MO~JPpnK&_sFz#rNDa`Y zX2N~Y{ejfl@lZT>CQ5D4vCgg}K@J??k<{Ij67{f;G4g=E*0;G2;D2=q?LN34c)=6A z-~n0UzU?mf?Y2~btf?4tRmw&DAf>i`yfWH+}<~{gjjr zIWKM~=klO?rA@b_$`;UI8)%X6Kx%G(C>}c!#balZc!1^@_bQ&CIZ+!lwnQBqvxT}i zXM~Yo$U7QvPx2Ibs}|&n2l&k$d{+&8P#N;4eDqau3%>-ta8{hwosf3HAIRk8t2F(in=<18IIc9g-RN6Wmx zjnXOlGjV}GR$}8hDIIo6+@h{Y`M8@>Y4aVa0=id=e;_qLcX!aeCg@Ih?0f|J6F-W_ z?v$v7eRFtX-xg})oF&g7KeUObjQr&RKJb97q1+)KR@r=8D#l)yvd~Gcp%Ts)r5yqZF{0r-;o47668DqeiU~C zv^Pgh>|2AzBjginu;85(yrl6Ld5ru9z61Xur?^y)zb{qreib2`%0*w3GLQwuAPWjW z79hX6jQ5_a`K+3ckVgE7Jdizm_Ms?0`i5)+D+bVSrY-ePUvyi)cwPsGL21QxSRVA{ zC&6x-wt2slg#TV7@QjoQy(pz4uS%KNn^JD`T|wR(skH5(R8B~gDhWwaW&0zkN`U@E zH4Q&vZA5jflL5Y{4v+#yiQ!z<2K80eA3W4e%pn5@l0G$SCBa2k%~% z62TY55q3e7jfZ8*(iMXIj#}&}tvb=b%j*Vw!(JdZV?;Fo+ECg4$+m!*&M$OpGXN!y6_{q&_vWyIz~QrP!f(Eh9x54|L%BCmt?x25dnds1%81E~PoR|M@Vg7%dN z(4MGl0rG_g@Iw_d=zLpadYp=al z8Gh}zseK!1&$=*c#Y*WH_o?PXIR~DTVqvH=Q8%P?>>Vis+Pi`FWw#|tx%fmWAD<-U z6COzg8>oom6+wSX=)7XNw&WdsKchU9%u^cgC22CM(zXXu9z5U%9w-glh4QSxhSO4J z!x5RZE>MdZrH2P9lq(mHGNn(z_G8)tY&-rZ>H)qJ+pWo@7wj+X=db&yZ2 zA)~xQUb5sHeP8F76l;@wstA6q03Ij@9xfAi8}jU$6brc|1^iBntFMs<*!D;sNUf}R z4igRdpj>GScmRx}Wcw%e9WcEMgB&Ezy8r!MC7Oz-4o+|HTkbgAZF_%H0e_6;Z>MrUqSIB`mY;&R%-<%}HL4O^XuSu*y z;}H{|kXOuM&Ntjnjc@dG*7(HySiSkt;<@U8l-&gT#D@H#>@l88(sUPfm@9aoblg2D z0UjtCeoYE*yeN6sf3Nuk^bOfZC9N0{`naz^IkPWWb%1RIjIsRP3+ui^zI^#QrWV&{ zEPv3*k+Lv)vy=%uE{?E;oPwYa!>&u=s5{~ub5C629!L?;zsROUDGK`A0`i_qG0@x+ zIh*(s^=4|EuHS*cAA zqy%`NXw)rn3A-uT~BEJ>~@V#T;1#t>N8ARNYLeY1naO?vq9QP1N)MP;g&jy0| z8U%9#N(Yn+=23VG$XhI)Q~kj&Nm2wnp~Dv6@VLf1&&WTu=0*$hBn##tOh$KXckDMz z8q5xsiW^T_l|LF^QAR
    iSEi@7TPRPDST6;k%@geks-j4Ea z1u!PS*!tfo1GKsixirca?J4)!UuM$0c`|a_CmO%!^*bky!B+&ikEKA=T`3UrKnlh_ z1QG@F`DrLNB|RI3~w`Jf_VCDh2IZf1~g9w?pqx6*Yq3o9Q7UbUV)95G+F58 zcSLJ1VE?t$^Z;b+e-IlS47%$wfIipXWd~$Kf41U~OF!76Km8lV^cQW}fqoh%B#-YI z$s6>8IELPke35s=DeAspUJM{nFgJ!^PDd#K9w1MYsozRGYSxsdO_~Vi29@@0+iHA3 zUNA@95%UCdY9#ZH&O?^#!nmd|=xq(D@ej|HU-6OlOlxw8JYk8>ox4c0QFEpG@_kY~ z7BXMsE9f=owj$7TF3@*{@%;rtuZa_6q5ayETALBu4cT^Vt2}v}ed0lL+5y!7wh{gv zz5w-3?$RYoPPO%}wD)P-&RxG=nnfLz+-tv=JpLENA^4g&hTjJL?@7MshmsGp&j-5e zaKbiGXx?5ypGiS1N$Yn>9zf1tjSt8RI(WR)>d!R((RhgbV*})q)L_Xo`o7oT=|&j@ zU1UuTb%JcNg$`Z1OTF>S#ckDL$f!hdhMse#zJuN?5OGtSAPe)t7S6NgxYl;e{sXD` z1GKYp=FB+=P2;{Rs@#Z~^dZ2!N%@&|8AiXWou;*}bihiK+jm|%oYw|{FNR~Yo zyi+9ToU}%~(p=_P-6n5X0qqyQH~M}`h1R{L5cM4OUCezc02z=k^g8UJi(JMPkak}V=>37VXwQCIwD}eVhe-91V`8`Vl;rZi zD7k~LOP;Vhk|*MxIDq~RsQ(V&0U|HtfF+z(d?{{a%SkQjfyRxc6>LeCr6ouox4H3F zdB~EdlK0JIj-~7|=bfq(H)#B3P4?(AD77_tmF0wZzLXfb#weS>0|lt}q96ld2jztf z$OF45=jv}|82S;hFIj4FA&!xNFVGcq;CK?Y4Ke=qS1q*r^1|l-*cSa+_s2}1E|U`u zOU_j%#LoAe*acpZ+#$EbKK!oOM?R1|Q4b{#=$;zL7tS5WN+s%nx^=a3BoA0allEQ3 z33bVmhxC2Qm$Z<~8zwpA6nR&gwCkFJ-^^tX`H;M)gXhR6=HR>5_wte|RjUc+BhzG% z6L{ST^v?&Gl`rCs;crT&Z{Lf3N zGG(QDwQ8C_!24UHKYhhY6MUcICtbdzwbuE>d|hh6ZlNsG>1!@`c#P*Lm!Jm)cCaS1 z`EER?^9J;_X2+K7Fe0UX18+N`4miRNazMG*2VIq1(2+TzE7_-%W0X>}15p1ig6@B{ z9jM8E=%01A=+9Wsh{=;>&W?{H2kL&#^=Bn#z!k9zz9n{HcR~LLk_)uY1zKCek{|T_ z{QVY5xw2)&vsNuZJY2H}$p@Bb+M=c8_doj-59vIWnyj&Qu2!!xn%!ZG-$-+eVGxV~ z*Z7m~2fAqQNZ*%bN9II*aYw)635W}7F`-ms z0PMcu-~lh-ud)MaXE=ZcSFF*W-`u5pcbU6xoivI1MzXK@UUF=>D3~)*>_TsgUHE;m z1O4qH6Q6=5FQnKHM*Bd;8iL#`T6wZg@mbbTZSb5FGDYX1^sIG0;kp3&ZSXmiE7s5q zbYYB&J_^Py3goe%f3v2mYE-W-bv!+#ZtdE_?b0>tC)+u?9Mbp=^`E+sIx$zsP3XwW z#`?1AxJ<ToM zm1Er*$>D!lFkhzR481Ek!$JFqhfmSo8b4Sb%R4GSTuYZ0di@Qj0wk_rPfAFJCJ!XKyZ#DW7{zM z+`h~u8`}5R*rGq>6~}1|+xEF+U;Ulr@I5a%0`W~D__nZnk`r}5C+dDikjw}8zjJl3 zYBsn(TK;6f;LH1*Q z+zip)l27cXZQpA(<_tYjXtqIayFE8@LVv+JzUp3kG+ryMF( zwH9>Ry{C9B_p&b~Z~O7$RHUTjZQ9SKEHXaZNPn$3SmOa6^J>*m)2Ws`l-53JQmxl`n{}V}rj1vHHeIhdPtiUF zKSA!vYStHlm!wJfTJ%uonG<{Elj4&)Ijv z+BfRQYSyUnIp|JbkU8jHR-3?^(042KXIieQr)I5ODQ)6RcE6v|?tf9T-@Lr?w;ie3 zSM(Q=3xHcw6Z(FU$sVm#=-gz8z!p~c8LSp zv2uWSjk^EVGu!><^tQI`*n7U_Z?lb&c=s*ukInmn=gjl4gfQ}kLM1^9io%F$u?25~J_N?`wJZ3C&vfTG^p zQ>9sM@Kb}vO>N2%%6|GBjO*Ah_%PLb*?QkJkJAP~oQ&}@#sP954&dsKH~?}|rDX$> zCZ;w4-4}de{liFqQNq2ppai6Iev)yOg*P#DN@b1gA{Zf=6V?tGoaTvy0NhAH8 z%-7@#uhyLrgGL;}Mm;P(H7eErGv1)Z`)W3_c@JCnPWSN?HXwXw=+S&@k7;?y*mvIi zn`~_(7wuHkefol>fE+KPZwToR*)qh|Gim$JUbRZvY&wS6r5^XWuIVz(uc2(SQSQ%s z+oI?G<124=MG|_*dwde5|`>ihCxKV0`S@HdzA?Baa z^31*H;}kI=TlDAgN<-#9MZeOc(O#K~?qHm$D%yCRoA-I@zZrekRIk^40L=#^{ow;5 zmNq72n-&L75B*6Gw3TlK{W)H&0`T1Z!_uOEcl7gI78WK|LRkMzzQ5k)_ZQHgWtzYB zuynS6 zo{V##J$=FF9xId@{mE;Z{0|M4YN3Ch{MYIwV?t%hYxH9KJn5&)Df2b$0Iv?c&>!uN zc%YA$EqlSdttXd_ww@O%4{XqXbm;aB$$$M@IS&@--vD?nU(iJV`TBh=*R=l@1qDgn zNR$1~*oD^aZ)*2Vul#!f*X13$E?qGpenYtl{?e?O^|p2L#7k@IvGtuP=x?(BVE<1D z-KyoDPOtr^(+6XP4ukg0Ayfrm{+MSTD+K>4P_w|+LvDW&1Ag0Cdvh~d` z`gl5HLYCiPxv$xMFRQJ`);F`9v^F4<|BrqkIY9sEAu(F6q>R!ZJp3P%FIX3}FA6+! z?hw%5=6DbGRcG68m#vKdpwB1cf9UW1GTMIA!$*0iY}R}Mw$-s;3dd(~Y!1h0>0|gf zW{=w(N6h0q&+FKCpW|?;JG4GNFQcu;CjCuqzDW(_xW<@V04>tyvawbEX&vWWrl3E4!7>2zMr7C*%#|ybovr7v-}jJl<7DN# zXct4jMaHeQJ}k-YzmRLTWL^f3v#yf{r9t!LygTux{7n|?8vUn96UcGO_MV`9AH=Ep zB36+acujZ2v&qwS+x4*e4Ca;Mm~Qsve^K9+?E7hbz}WtKQEN+SjCo8r=Rtbfe{InR zzR+pVT+bW9+%aze8C|l#p15u88SIm2=r}u9MWpf?1=9y3&JMaZ+TyBA2C3V^ed$J{aTcQv^r#Ws2L znQQ~reJi$Kfpy0)r&WN~zNVM+v##k2B9CAn@IW0v^98Za&;lQzy{+eSoD%arEZ+CA zHgZj6grdQ5d6U4Lmmh*N|5ltpD(tp38i& zlvf#&1-k4{*8P{XcJw+SUupB2r8N%J7ELUVWBgnc2;LMZ4`kRE#5{euE$^xCvkxfy zsjiLRE~NvY1JHL#>%;VneSk~CzN`Q4kJ4c8^P}Oe2hw%O7_IJ)9yLnFjT!S4#v)JA zNbm*gf5+YfrNN%0XMQ&G%4diNOtRmy?=R;yT_TNaP03q!~r{Q0sS$Ckv0tbvT|HYM&ba>)7E(3kJ5DCPcIDZf)2?jvg< z=-vo;CSMSJ;1=7ucU#0v=&Q`z%Q%3kA27$WVN63#-4EdRTG~El`^*Q`6tr)7;HMXg zwmYxOM9_W;auZCof=L)>HJbECPWslH&b*Lk(=JTyTeWjGWWRgx*V_DsY2^X2MGITU z5fl9uw5Knq=Ml}2F9;i;j;(t$)~e}%ZShaWfn;zDD0O7xetLxKFBnL2}*K`}{rW^D`Xt8#1Pn*4RH=v`FnZ<{26b`qLLI z0b~cV0O?+!1Fl)UKXd^5sm@xlLWb_7AE1u`H;)C{ZVzJYw#$b(#1j_RIOb30EpcJ zs0`!KPNf~l91v^|=2)=Q$ALG3-0ykt=NFDX`)-N% zoH;Tdc}N#nfX8@lDrCdRG2^7?`ww2|^LyZXm_za@9x$u>$#x&d{i4orj!Wv%v~oe( zqCr~6=?fxXdruIYzF-j`8(_KElnKxQuC|^*e&u+@`REVaBOdL6h+%1Vpk*Eie!rRC zXDqeXp`WGS;TMlFm}A5T^FuF29NiL&Fm7QUa?(>b3||@kQl4K6{($+nYTH)p{u#_4 zcU-(fV~peep-*j<^Yb3Z9K_)uIDNr#fHhw*)iwg~&_P@8z*seNK&{^Qp_T{ci43sF z1!2Ym^!EmT^2{yOcod=DJ&kG3A@N5)GEtUspBb<6pVE#v)^t1MT>S<(x(eWqqVAeWO52u@$n zS`NWf>woTCxn6?|IB$ywC<8bqbnTw~Qq0e+O+b$au%8R#9wr{(yqn{`{58Xvy7#oq z+I383?>S)=3palt>yeMl8rH2{D=T5EE`)BF68%AjpPkwAXz>&N*z}KP*-H z<64FGpuYOOEZ2N*#)Ie!OnMjN0vQj`$Azb`1&usF`cFCXYlg9SW2{D7f5@7E41m{f zK&*=Lzz250)Q|6E_}S@w-w8VX$?K%O*2jyvUf9lOZ09W(cvQSG-!bXN`mL8IY1g*@ za2XtsAd{l@VP0JLv76pc6H{Xk$fS@28ID*d`N@_X$YXCm3Z(P`EPcT=>5uyV8s5{U z3}D=nc>z|(ZIUK2kO7)4$edu%cUs>7)A%ry3+4Z;qrYYtE5bHQfWN8OX7y@W7`!RN&&|lYj`$q)-=^F@gWTUIwE2$dH(9px)Bo=N4>rpS zhdRM|f94(gEyGwF6|d1e9OI8Nf-v+~4+;#FwQJUh&;IW+{M?MZYcKeKny%AzKF4<_ z=lS|hI!1k_&3Vn(i6xy#|4vgD$^_JnjM9JJm-l1_d>d_kA;@E0rkJlG!+(P>$a!Tf za|qh>|44W91w3%X{GR69lx6e>IX-y$K8(B4^ne}{pg&;jBgPzf6Co!TgU2(14RJd( zx<^GuN_13Iy1;8AFkXc+V4Z)EEIyv`=Vs&`IX|`5{-KTSXWw3vy}#yrVgD}9dChsx zt?6kV>pXCn4Epe93i_|y_mwP--6}ITY?KMh*2uWUD^pVI_CJyp-~E;$ z1Z~};(L63TRx$$eKrnJtuibe#L(j|T`^`J{EAl*3=c8XA`*u+0vv1ehQ{s#`-`tpO z+8imCa$he)$^**KUNd}T+>xJ?d0_50Kgycecr7;w=ZxSOY}Ruf9kJaW{T^Gx4o@q0 z5ON#b0NwSmLeJDc4DTDHzq93<-@sTF`!TKEmLQFyO}2pEN5Etc=8wKFKF5ERwcr0{ z!egvcM`-+BiH(VoO>uGQ2KgikvLY1ymDV4*mF6?jdI#(0jo;ArJ+uL(pgr66Piymi zaL#Mad)@(bvXuMgWyp3F(zo}TXqg6n()GZCBll#{`VCr}3(Hsc_joVuel}#j`MvdR z_=5Am1NxY8YwP#2DkO=|U3^G~Jsh z{-=Kf9;XXo+xJOybhN~P2ht5(ABp-OvUOLwo{`>nNqOCGGXK~wnCHg4-h=jthcm}J z=e*{;=d{hzs-L70ZE23P?Gt@iW*>iI2QE2$L1rR`Nxy-9qE63@u94U3b5NJ@KwSr< z%lvJggw*#ql}zvqYYM`~(+%mq;s! z*|tMsAeKtlJTMpb>&i{Lv|O=_6Pd>k%*#HlZHyCOJdoo=m`6B6{Q`9Qhn+Z) z6})sTwP*3WIcAhRuoiNl3UvWv1GEX*RtOu(8S{d!IPtS=y7<_H-(}OKe<&{Ey)-q5B&PN(T@Fwe&>qliLd`FLZ^-xn>P?}D zTQc|SpCtZ=$0q!aHE@~u&p!aB_u)I?9iu?|7VkdL`n+kfjQLxj-}0kPk8@sg-gD+j zeOB7*<*AolAH)P_!d}*SV9^&hW&Wx)T7Pl+6PgVOy{rE(tu^`w-T@8k1I2(0+kiU# zxrQESgy;Q{+B5kbv%H0Wm-vp^yR>u*PQp9@pyi7YGsn%bF}rSL;7t!BHpkE zbskvu(J7e@x!Rq4_6+u5wzuA5dq8pEx#&+G@aQ_!X3jYMJ82WrFQ9M8_yA)>1sNyQ z^#S{jp-gLRyCWM;{w({hJqCUU{__OavHe%T{F&N2{4NRL%b|xbpH~>#@o2xW9T)PR zc3xx5cf1gDUXPkGMdR}qMSGSV>vmhz@xCKQ%ZjgWOB8ft1awgF`QIgQ-zPE_ecI?V zX4Doy&WK(hUC|doe-jVP(P?dKt$hppSH_4KCuFQxYcJ4b0rCmbM}%F#xkKCUyDyRF zew7bz{BFX3um*1G_ygN78m4>mIi}~555154C~mQc>1cW$I?Gh&3;Q0IQJC+Tb6#`a zbH;Dd^`+UmYuZ?ZT=s%$KAz^=V@Il^?Ytri7dlGQ!7dd?E zclr3%e=P6^_JP~a2>w@t<$Zsb-B*5-$)98FX`G4flusD%N?dBAc zzestn)5qGH^kv_G1v@{HUC>dxO$gt2Nb8Gf-k-qQ|ILr(&6}5PfiGn)G4Q|)^Jm%G z)?@*`sSETM`;f37(dxY)YWAVlrxFKWlp3GoJHvg67oi&le0kP)(%l_%TymaM&UMT2 zZ;a`%4=lgI*7s%fICTeQBinHZZky{9K8tc@;P^=rckvh5cjFHY2`8`14A_FHwf~yG z3;gy!UwiE}#{Y5x8IJ#@M=*c~*j}8fU!cE}{#`875tAlqeM;G{c*u^U#_?+fpD5w5APDdNUS5Uz9Y*d`4`uVP7`RZPyg@8*+|IpN+xVT(^|dVH0SyZS zFHHAa;|cJ97vAMoTJNKu=Xa97X&bPQ1p5@N!5EYI7-!UR%Q544L-GRk18AhpJIEXq zq#NY}X{hl9=t-Jdg6A}tXiZ+CY=?|7*7I+*IjuY+j%#zMh4p+He9gnKdx-b1{3JfG0oZPk9{OW0 z1-1iQ>kDj+jL&tf;PlOfP);`IkhWHa{6>B=V+I^&q>VL0AFj3W39@+a$J*HQx}cHE zhU3OK0^&&;Pf%8~?rH!{N!Jv>IqGrp4|NN2ZgC!ya+u48^BHkYtCg77jC0#DUd1^s z*|&{6X_ra197&D{DHr<9X<>|95_5B>Rt?&Pcf=UkhHK&p^4rv69qv zj3aRD9O=fqWTYYU6Ea8TQuO;;jyMzZ6*Ffw^OiGrJ>w3X!-Dge(B@>nMb;(|PruPnO`jYy| z{GQgfF}Ghg(8F>JfKH;9zDB#zYls=sKlshs`=$FB`2qF<>nPhxSzpN)tOIO!B!5sJ zYQQ$zp;&iFXI`t(8ZwtW^>@(Q+IRAuhEAC&hj08WClmin#y58#%ll`q%lj8@%kc+) zBp>HBpI*8vb1=4r-p1;)i?Uvu?d62dN`d`&RgT_mSI;IiX&Pzn2=VQ#*%psRSgXr+oew zuA%;+j2b#=ss!)(Kt8$hP|ha(As2uAKMkiI{*F3-M19L^N z-{(Jy_U3#6+Li-?falW-FUdapD|wGPiS?OwDD4yKecHWjKOH$`iq?kKchDeBpJ_3u z)P4RxFqd7|e=_YY_`m^WJpp(&JMmvYf1TGfdlxZ4@&aS!8fd#nnJ9u;d$sY{dRcem@2i%>Di@vY@ z-RuSjwbM^-;BDO3i^g=j zJurFK_yx(2Hx)th<4rG+{P?H$wHHc$9n%Y4esX`U2+j7j7d-gny!L|Lw)eFcesWqp zwLeG1?De%0OtD|j;ym`vK2Q4~%YC!Y)y}8b#|K;Pn|;1k02$gxfm}BKKFfU+P>S=G z`zVkU=dJ7?G`~M6p89@0i}RNIE*9t0+PAZ~-g5s7ALjRRx z2Jqg0^`e(I%Z}y9oI1>_S`?t^Tpp+ba2{57D_~#kN&x3)*1@nrt3@B6b0pwTak@f`r+mMrPHU2*dxrutiVto!OKue1iQE=L~aBPg$5S-v`+rOZ?NFYnLi6f9V9IqFw8JfCwpvQAK+P{&Y* zzk#t{|0=lz8N%De~_ zueELc80e7bR;J7r%wy0W???Ua1yENzfCO)pt6cfNwl2JFXZJe3gZ2h_-m6&AqHCc) z@9^8xf~kxR7#D27_+SIZ4I7Y8!hpOd2INCAAkU2k{5B<;y@7fHY%|spjR+WYg|Eu&uw-F=AGxV1z=c^)D#$Znm zj}s^lO}6X2$9?l{mKVoia~wW%&mc#YVI;=tkM~(3V^#+mhHQwDeu3MiSMXj#kB|e> zJ@h^49=zYsD`=1O^~ao0YaxeJ)X$H4r8%#)3LaHL0yXPZA)-{!hj&6?lk z%$aix-kZ9iE>HrW$5Y<88OS-(0A})EguVVa_DkQU#H*!(f~3k3HFk& z$yREJZ=pQOUAAo5e>4ru%H9QbcLU@G+|BQ?22;5kkZ*~6Y8W@i+b}jD#?UnlZGGL#8D zZzvIX%1|-jsG+(40mH~ufrg>u$7?c-GK%kD?cGer{;XKO{62g~SCl>dKl)}v-)`$!tJb&t4y!y5+06V^EJn*!kT=+$) z7eaif^Oj}#Gp`nMiW$aw&y^v;JEZ!?qlS_j&q~?wOHwfg zyu0b9RNs0>YR2CakL~vjo;w~&?VX8IXIG-3&h8|sYlNX5*7f#0l6t!z8H{V}?@lt* z-IXXrot+Qx-}~Z`a8E!(Lp9vDQp{Cx3%_Upou#V(7luJ=!e!9dam)qslz!lQ>-g5W6eUX2bEMk1JAj-Z?y}ETTn(A+gx=nf@*NFjh-593$g&Mpejo48u9lHHMc)Bc!Ksd{vEvIWu0ft`G+$bXg&&Yo0pA%)hFp*` zkyoUA+)YE}EqA3V<~^&P@X+ACBT?Kj_i4?YkEABbz2>eT#Y4j*1J|`QJTlbUjcpCa zZBJ}_qTG#ZeftrQ;Xg^FrFft&xq}YXw%$b!_?w2ZQCFly@Hr{rcihl-eVhzL4tB^z zo3f~0ojRA{uMNZZ(pM`5WN&MfyV(5emvWw-q0OMcpqM3f&leUCM2`BNeyaH&l*)C{+^@rRw%11LxGPPVD>~gbj88OFN=VXB8Rf5|%JxSFb5z~&$Y2i8iL^=vXl6(OjdrBp z)2O}!bl#q5s1lFoZ@FtI8++4GI{dQ1+5fb`)9a2JFu*W1C`u{@9TVrkbB1E!SEW?UZE@Xn&)~N8 zft1~rDCOdl4CNCZi4n%_3fMOy$xsp7Mm*Wp=(YWkRMJ42JrX0HY*zs-K|e7;+Xnqm z$22|NhQ?13S00#vA3jD#1(N4IBTfv_qmK*u!On$Z0cpk#PR)XXQ%|&<*~Q_ z%XC3mcXv(hAYR)WarmFj%U_o{^gXBghZ@SG>4l znQcjgq0F{N;-(?V;1-W7jli}}Gc)>CKs_?29k)}^4)mzVx<%y)&YbKbIkvd+?vowm-;K-;na_^EK{6+_Xe+lJzC_YEaCKQxrwl4vNk zH7OaTv26)g97_ghHT^y@jD(-S*c186@>{*?*1h)T8*lVN`Liw5(G+XM=F3|!*BO2Ad}ZC-{K*$O zbh(51vkg<0t&oOcUr9c{Gll{oSEO*{Z7C9a&ro#JLn*d7QHpO)G!);GBqkV2VB3V` z?UFbKfL7XC+b*^Bkr+YR8MlpednBc?Z@z7$-6L_u@y6494Yil=kqWSPNJrK;z1}5n zZ%q={Ef1wMWMlE@TjCOWMVvOAHZ=8rPX>=0&-p{1(#8CCw9D;7dC)g21F$XcWiQ!s z=g!>>a_2|A>`iL}<7UWhY3LU9u{drxB~BZEFcgfqC55B!iF51&gG(IBe%VJ-alEg= zeMX3Q&Iy;=b0Q1?*V?vQ;CE7VbCL$o%1{j3MqnGXAc}8JNAYrMOveNmWaD2MIvuXq2Nn~e7+~8`}(b#F4J=~ z>b%D9#`Yif_VyD|=(U0TZ)MH;GGj!P`;O56PuV-j8Efb>Xpmu2M1mpT`tJ;R11=cy zg2S=f@8@5or(ZOEkOF!o3PT*1$wlrIY5v0{e~Or&kQnD2s}YrJ^}tyY|{fn(U`l2 z!r?az`2#N)oYx;Sj99kbfLN+kIaISojc;HFvh9FzI>umL){-^9lT$a){C9I6ARo|H zn6}neDs4Pw$m4fT@?ze*d=YmHPSFn}e@vp}k4-e>k4=&Sv8V(6=NW2wcxZWk+qG$9 z=zv`BCK%eaZ71ay@0EgaNkV!R($*=r3*&fU95>?0wlj`9Z%Psk*e)J&QCfHDDViV?AQ6D+MbJm-MZmIIVkYNMg zwN2~Rsx9_ZBvYLIPBiiVh_`IlQEGP|rV7p8Cb<)CN-p%n98oAo$SKLV><86#`D(qF zHG=Iq{#m7SLlE1^!c~!V_nG&->gmU8M>Y;@H;=0`K+NAaJBr zo49={J=(rU@M)DH;*!c3eO+aYxv4V7-c*@fkXP7wRk&6Yh5p2{DE0$0HEG^jU zbiJ|e94HH}T@vbveXY>E9qPSi%~_vz1Rg7%!SGxBANn5qoDLhl^Ny-et(M9jc|m1E z8rkA+s;sf-!;zQSr=FMJeL*SukV_waNqIzF7mw(h;sO49#N0wi zx~V+DM@>dN;2NNtu`4?<3UmuSV}SQ@Iv@YpK6v>M|qJW?y5-@w(Bw zx}6(!sq2;LlJBKTln}^GROwQs1o}XN`cRN7#F^h%!$5LX{|9LZR*H{)}?y@yH0PbsMfcqpqPIS(nbl zKITZpMu+P(to6w{)r50hRla-$m2J>6mG#{|Dp#RmDu2Fwigf{bj>=cJrDfdI^=KJ8 zGcf(=8_I*_3O=jgV@`1`gmY@jcAdr`@aY)VqSUXWeEPY_Bp}-_z_G{N{>dNuIvNwZ zNj#Ur|5?CEl`ia}q>H>pzDs(vd0ht#lZoeix0k@LfIx>+k7;a6R#J@`Hc=-jAzUZm0{@*;?;AuWG`D&<;;~^yoQGAG1IP} zvhT7lqg?4i;jbIM0W&T+s(j`w(pdWZj*(w$`}`}jm)98Zz6vPgbI@sgDSP(pt&sL# zX8uzzXApcjbc)|&@lh9aMx_hCEa{@I+xVZ3eZb29q~e})zm_7U$_e%a3iZsn#nzu0 zuhY6K%74|CR#NqvbM9_w)KJ%-jsN5k$G0k#DoOSMOZ1q?G;DQ8Wy_RN(9g1c$M_z@qGKXclxDf!lU%+J zS)nRfx~%dD_$@`_qON1>7^=&{a$yWg7km!oJ+99Q`V1MO$2D_48Ao0JkuGgop4n^J zGI)vrj!D6CRTcIz z@{Y9+n7>!Qc{_zQxE{;geIpar==Gbn)cwc&F83HrH*d4Pw*0wEBgy+%*QEPCR7U%6QL9lK%zACn)6AHg;L_tml>Tm|wicueasz zsqz_x_JuhvZNLeYap`w5c)maVDB9YjiT{GR{u*_=!GFqxo?0#no$)M8*GybbP>-R{ zs$B~HNmW|Q*#FdH4|$>afjZ1zv6jM`kbT(hoBaMeP2N-47w&gC4spDw-nO^XJ6!K` z%~_=S+bTW!sPV0*3ONUaT~cWSPb>IvR=roO)Ox38-k9UiC*@kS1}KYF_a4zF`(?|P zt&(H^;<}%E-c|_*EWYLG``NPYw6!meHJYc%w0Xy8yoN_h$&#fg2he*Z^S4npsnTr( z=0mJ+9n#IZ_z=decgTNR`)Axb@2VW#r`h!#$L~6(=Q96MH-u{pwm164Z5yyfIzbQE zoJVtBPF6jd+guwX6{totqe$Da48%4Oyy%9p2h zb1fUDxx0%a<+t1$eL5qO>PK{E2?xe;>#8Pu)%5#fw#m5csO5zw!|5 zOSnGAK80mSQC~Ko8W~d|Sab#by64>pf3-L|##KT6J;yKi5xHt5i|B-XHl~^Q8BfmiDhI z2klc<{yTl&;1xs6V^>Y*lTWl31^;_H_91{Ak(8Q_6najaiU=DX)+-s(9_jdJN)O zRXgZQ@H`#o=9;W$>-s*<@by_1bul>hWcObFe8(Ow1Gn`^)rZ#TO zjp-?C$N34)bR{qJ7z`brlD?~T`)`GLza!4uI>QDM#Ly|;3IC@qMcsFrz=r8(tqZ~P zNKc3FJyrXse8sf?>Jq$}=ka#!+>uwjW*soZT(%Ybe+!fcD!VBN!&{)-6?9yj?ZM znId)BdO`Nr8+z@os9TpV+NQ6{!p~i%1)W^zZQW*nc=EAHpTS&IY5h;Atjll)Gk>YJ z=`r&rxj1Cek>I^vi=r-4v=&9ZeP*sl#;FT7Ju*h}1sv69LKgWm_9iaoI(Op_b+O2E z!>)q5`bM0g-8Jkc8Vr~q?Vv+NzW0aE?*6bT1u1JN{rdD#;J-9&-&Lx@hRI0FoDSo( z=U{zvoO72q=lhU3S@vFBbEuL52W03ZU)t}bc>E#Xur9j<{UGYCQ(rVix^ksUmYiv> zSGIrZqmG|9Pt}X&`O9&AF7YIDFxz~MEwJf=%~ndOZp2~LrhP}%7j^~S9RD0>;D7v*1?P{{J#X;I9eK+_${O<89Cy4{ zZ+-l`wDt>va@*tLJkRXFxw z>`xbPQqnH|K@ARCCG9a6u`L=rG4m&>c(tlk55YE_I@5(f$*x5)1!u*YTH`ht-{Nc`M1FE&EOeJ=$h-CahWi}KTXL^BqDIZ0 zOIy9C;y-x#2$&2*!Fys%5CbaNwJ7vs?DS7qzm!9apT9uW=NPo?XWch-A9b@2fXHWa1Pn9V(k45_I9qWEA_dlkZhVRsJ zPmTfP!_yGX`L=-XT#M!gCA$_aRIs3yLmTa%-=sb~_J1;F-IuygvTx#iPM-t2l7-T? zvBQ^tNc%7EDuzkLUH|W{427Mj-{i^4&(~M1q;M_cfYUK(_!!mklS@gaYkb=X&EJ9T zjIE#A`U2X1dVTJDQSqER6V4q!2#8TQ|4w$#Yvz?>oNH0&6m|peiEEG!lw==(3^hA= ze#J2z=3{zrh?D_l1N0#D-kf`M=wR8Eg?rhyU)+^$U;RN+)-b8K)Bk#Waa|_QUL-T7 zPggUiPZtv7)2B|A@#DwKfQ3;=H^tv@%0tu7?oe0HelD=?xr{THnj!mS=!A*HxOpc2 zv;Cq?hl205LBxqk12TS2bphE$YRH1a9QzvAUju<@F=YK7l^$oJRy{21ULa8y1-kmG z@9saIiH2_ZS@OUzS#Jj4$V03}r-Jv@LFTonQ~SsN^$+iS;>dr>gD8jPJdgqVVXHonMJ9@Ih;u;& z*hi1te_t$g&ux74u4^(oe6=i$TrG>DR;xu(YY>uFtL1^g;=f`ANm)Z#zI3UYJ7=zp zU%4G=yHD5o+peGG+L-y(x->j%w61x)mL63j1EU34TQ(jxYu-XS4H%*ZjGGLMp{XQg z4ejECCQea(d`3`Kp>>SS{DPc*wdlh;>Q~kqKyvEfNlD zofPN-gd|CPCcxic&0n-sP1K-yf-id&_M1mRo&=c87=Agmv* zNe@O~LJXTBmX1j}lay-nxtGT`&G%J1j{Ax%ASLrwkqlKAeq zAd`2WS0IKuK4s%x=?R$$$18(xMmpBDXan#)MQhQy>(`gXyH56}90!TJHg5fwl9hWh zeKrZ*6v%ATLx+6u-almScMnL)8al=2AGjtFF>w+fr%72uUOUBOV`3x(ePqFxKPQ{6 zi|;w*q3e#jY%7#AP{#yq=of{(mJAP!(Rx0V`1|uigTEeW&q<=|RWf25=!ef&aAINcMbk&Dpc5yA2#ThxKPB zq{TL(Mq^DlVBJ3Df%Ssk7gIMEvJ+zZEc)TTTJqxqx3uigbrlo8O07&tP%BriOp@Ya zV^wJEO11Rp9k=Nv^)2)N7JPr7m=rpn`g{v*$8*VdYH-wtTFzsYv)PrG`!C`#_Fet8 znrt0|=6rToeK2;MwpC?YH;B(R!5BdvnR#Z!^XJd+58hKI?uYY$lHCup5@xSiQy=wu*Zd8p z$#qso$bqM<2v98(zLoUQ(Y5r0b5bDws?0fZPeuLmP)L!#K2%Y^A`a5=qgNy@K0(M| zkg|qu<5AyTwSV87RuXajEq)&~<=`JGYqaLQ&L?@_A?i!{VB#bN{n{jX$a*24yNsMD z!}na(bHUVuzsvNncs(Cl_h~Nc&dh(r{|4@553sc;D8;&p{l|=%$aKuaJh9*LjAm+3 zuxhvJTa^wn!?dtXgq2Pr1g-q_o?3bIf?9dxeDZ|n_|6lP z@lAYx{?R{FfjG#OIoCq2pMLT8s%y-4iN zb45*>yFg=+aO`pQp5s02hXcTSo{gp0cJI^s_y5zmckfk93;D3?Upxn=jCAtiB{E>$ z*NU!hUJ>Ss7N6Q8$t@Ftmb_@1y1W_|UWj0DbLTikb?yB&E& z{=pu44|q@e;q;&s|DwPDK10KIn;mjYlkI|bowUy$4H?16^=` zc*Hs(J}B2Uj%6|0S5o)c-r9HTE+aM{lqJU=szpCNkR_jfBi@jarzB0{`QTihST;|@ ze^yk^ajWv94o*7uDb@k^2Hc+!8)e$6P3rAf=&f)(qTLeO9`PaPAGxcxoqwdhxM0v@ z#6cIIf%v{AOPX8HJycV^y`##k#96ha&FeKfU919-=j6)?|^(fX4pu0G1{cb7BecF;AslzDggHB7OHJ6m%f#2oB(+_0#rN^@C(j&!i z_oY8&*X74*_vJr@lx&>OU&8bH-N&*XJQ%$XI9DsJV-0l1Xg^UV_>c^X-6F%G%S1bJ z%vsF0EzjosKS`YWY5gZmRq?<5Asf%&`zP)yzxfM=>%yec$3EZ;_+K9UO!53{@ZJbn z2j~aCk?*eZ%<%|v5C!`UnHC){J=T1!^79OTDb6s_A86y8C+eIu*>Y8;p{=eyabLc? z@JPPC@>uP^`dF-l_@9WAcwdJ)zVFIo`QpMuiTm}wn)nT{mo{IK9O1Cr<+&lo`1Ft^ z6b(EqJ>#~k@r##9&jAC3xTGl=pIIiya&c~Dy|G-@^*uvrjeU?`%qH1_@${qfk5%}m zJB1k39HU&NLteoK`g`c87XU9)wEi@B?igCfqWw(Mk??KZzlkYN9Qk3BCaD>5t5sj@ z*GlmW0qYOymT~V)nQsQ@zZH(Xpz5r@tU7#lU3u@krN(`ITTMmX%shBUO*wE!joo)! z4gBh+YPa>8s<93@XEDGEz#Px_xu)TKlOB7)a-m1mfP^pAME@Wy%b^Yj*J;d?V?L9+ z<~u9{vDS#wPOL#Ij;>CR_0oITD7E3_9kmT(==y`dszHzqa13&nHs;^W;3e_;UCN&w z`JB`>`hiE?R-L2V)wRBlcEU1HrU-pHnU1yU#I>JE+l2jsx_~V8JJ?yFUqA+jtjykBKr{=H;g_Pt~Q))vqIbK`#Tpu?(Gr zt(Nf%7t0{5KWMAZy%gJ}wfsi-L_FuaMp@c*>?ErWpHg36`%8A6yDKx7txz4X?*xxE zj_$B&bL6Xw59I4>f2t1;{wxEauVI~ooyIYwc?ai_dBNXjZu^dPG<)ObDv+7F9FJHQ zgIE__E3u8RFVnWI@6e&jXW~SKwyUNF2B~QgF=|TmD&-ryPE97otW|zd32JIsr1D+9 zLXDX@Qw_oSJjQiBHc&^v7-N{e@vUbKnHJ}bMeDYzLpT0ZhpzvrK0frb8b526>I=JU z$l%oG?@n3%hyO=x`b2f@)r+zLmw5no&2sR~kpDZf@R_gIUAXYl=!FZ1gST3jk?n{? zKDdfo@9BAw^BdQNw7cQh!TFo(749qAb?88>TF!U6&9NWpxzO6L+Z)ZZ9Z1+ng=GOb2u~Z{EDbOZmrnZ>~Fhw-9J9=myATpZvdY zpZsLsguGGtz|YAH%mH(8em8S@fEqn@x?UR*6VP&;?vSLipTx#Iy{)8=?8$zYu5pzXiRM<h29Lq0t~l|j_IBmT{L z&_U37&|Q#YU;bacCT`MM&}Pt3Q2zf}roYJ83l6;CzzYt%;J^zGyx_nK4!q#N3l6;C zzzYuif5-uO*59JU1pHEY7#9yA<}>1_!PdIg3v$@{kYYTIFM>D!isEXi2DeA{wgCu+of@%(A){kn+nu*UNu?&l)Tk6CZ?W7f~= z58L7>fi(-dG`2X3Z_SQog)NQ@8QEcp6XU*i@zch4Q~BDmOg1LoH^=kZiUKHJQ`{p3 z@mEdHnB!?o_s#Ltru**VsZ7t<#eH|!%9Y9-uWPzrH?fSV%<;UY`{uYuA`erU003MdWeUp;62FV+LgNj*B+Gf}52Cx|wd#J!=8dpQtw9ZAF{Ed?q9$^*&*q7E=8 zp8wj}D8Btq{D`?kyn!4b@`C!#4M0txd)OK{1ARO_Jca?EV+3daeGTf>yFlC$ zoL})gin`V0Si3_X&Y@I`pEMDgMqvS!IL9lEsLkrw$?7et(g>^N(G1Gwn_XWA6} zNU*(R1hK8u15bRQGw?C^;fRN$&xwum;*^BM1}1Oe$9E?9!qpqw7408#fd8+7_y4o) z30MTIL-wOWz=mi5oX}bDjeZ>MLhBVchUT+v$Nw4ENj*b;7c5X90&S`rzDYiD4D*8B zW{NP>@a(_#^YrrKxSJJJ3H@NKnJ-DT3+e|^e~fw))T1CV&U;qfp=8?__;eNhD*$!E z_EZ~`4{htY>69Y9XZpST$}7~Z&j(%0mcaM^(x`jK5PYH@q}H{gPU^t1<7B|}`KtH) zVCk_WR&`sxO1dpurMfMSm7a5hRljNTWx$wmLLaci8K5qTmDeuYBk*C5W1Js}yl@*u zyI+sC-roP!{svz`!~iLZ@nCd=`t@zT_RMXDx`-@aU!P$zXx<8G7q~_0hJ7Pt!+wyG z5yz!exlaCzV%UkZNl$sT%9ANX_+ERjmzI1*F58>#wNl>n=;xH5aAQ%5$n*>?tW4 zc3hQ*@AwwWHmZITr%=~Z+mhj1M!VAAXC5k)E4Kr7Qyst`t|h$E6s`WR@(AB1Z%P42 zU>)+K@nLLjhPD{cSsgTCvUCiF5ALwKm_1%}qC@_J_Bm z&KA;bscT2L$Nz118>$E?ZpV$W-wmJz~wPgDeSN+67idqjz6c$ zuf8mm*I!rFHr|x#n{TNaAKsRlTYe|0S_na^_D6T5Hn1CYi0e8Z{myHt&1d-h=9_r` zx>R0!MU?}eibbAKC4vr1C*T#pR>RKL$;eNwnl*pL7{GNVF^WC9O`iOZ@~B9~ikv(1 zU_BFW zKY&NkosZ!B!B3yQZyF*VAWMAv+jnJ zTYpQ+Z@euPHvVp-ioks{h!}8Ys*LN(8f%q!tBGV_r;@)_!0SrjdHJ>1q-4THpxoTmPr&yAZ!J_Bp@qkm(8OOUjrLh`%?&A*O}(La<2!x z^fBNM=l$p1&pa{aM4G;*Z3w-`j8$)i@00AozpC7@OV6KhO%+&mQwjnzwBVZC3V7%m z6Ws_4;~Jz2gLlBKBB>(ap%H?oswl3F(860{d}Hic{001&?w1m4ZYT?nZ!7Y)_`2Jw z_}W`iZ1r_16n9DG2|Foe{l8XyMvS)Ej2Z16{!LC}pVk8W$%lPm8idc|_X_-sH)g-G z@dxv1w?2KPL&P@ii#|L2ap#J=DtT7IPkrQBDcg67)b^Px4Mr}sQO!va@MV9K*s_{{ zt43@!8-btXsg0~WC4Z$z!c}S0wYPMHeM{>;L#4i7l#~rWCPmOrt$fz;LTJ1B(1uZ8 zQh)h2;k;(cvvqxj^;#5|QXTZfHs!9EiMiYpz6G`$b-?dYzu(6{TC)59sIr8fk!&$n z6!50#!(8LK7V9!b;0s6*Ki}{_-=6)ACt}tq6`cv z+Zqxwliy#rU=QVkuhwU6Lus;P&fEgL(LULw_S{=qV|%;*j(mJ>F?Q0{PTRw1rC8 z)0#07T{Vy7?!5^gupg5zM*E>1SKsgtmFMzfk|Fe*$`pN7yx{+se#EUl-x*5YKC=|| zjPz%%{Qy{eiZ_$elUKoC_-*(LC(-vid3p=j=JsJWTxSFC3M@aQnzv|49@AHbUDz7! z6Qu9c2WXK&3luThv&Yc~{6)#+|BGt6bd$C@Gx{0Jfwp}EYocZ-d{*?gr(H9qhL6JX zNY7^Tz`dpqaAr#e9}(K6djg**1Mpxoz$Z6-x?6mHTf$5sr=@tc`oz*Qe12Q}t+#3~ z*}~3fzwL%^cE^zXHK_8CdD>@t3(Q9(tIu|62%j$W3(tEDtJSE5{(eliUtqRLX4G3o z`0vfN{D|}&?`tP7A&=niV?Ov(;*B@npq%q*erez*d%D4QhTJ=Qhpi``h@^)PK=^33 z`dzp9T&K?sn=fbZE8EausSF>)7~8dfb=u63%K0p@_*lm?j(j!qICI2BY1piljlbjr z+X-wZg+A5k-m)twqgyRqC$KNI8>@lCco0mf1EMVZ ziGLWE-@v!OGx`JUy#lbnQ!<_`<-Mv|-&c4j&%tB*O+i?A;wsyFcvp|H^uL$0?|jM9VZ6#!vZ53$SWsc@ zCs`(Kw)v|^d!~mFn<223{N+J#0oKBhE zsD;ZU`-<=3KjsXvLN!jP<_me_hBA#?C*@Gz^sC7>Xi(*zW0QQ}130ABI}X&(TluQf zC{wkzc!r!M?yz_u%rq=oGB@cXp73?8@9{o~n4t7;91J``U{&;+xme33jqfwWnr;jD zQx$C??UObj?6b6=FN5F2Mi>yjS=;i{-yZM_ZFtTGmb?+#u&T*3V8-Tor;`AySo`8N z(nBb@X7AAL&3MloW?S^FG_?8+XIc0j+hLxLV=QgdXsbrZZy9lh#ONnpE&cNX$D`TO zjan9B`ab=j{f={%cHm8}CpiP@-@kuq_;Flr=5;r$wVFr6_c}2VEPcyun{jMQ8D{R3 zQf12Ov6_4_(yiIPANl~WvspF=D&;+&Jh44XpMaGrRhEo1wmUuR_^$1mIQqnP1a3n` z|J?$6a9euTJSh022?T%2p$$<^oT4B2lLqpoFO7O*NdHWg!VhbI3B+F182;A!GS|D2 zH@kbN%bcwSE7-_6`M@oNF~;s$@W}&yi|aQ{#0DjwAct2)>NT^Bd3eV09e&sG9>_O z9JoL9tHSnc@FFFl=VIVJl&wg=RCev6LGyN4N1e4xEANyo(#X_y$RGITm2BQC?4C>Z zyLt?Qj~ifvW?J@x^!J^i=TDZ&Af&CbX3aVY{3-tCn{TE__5uF9j`wW#=p36TEb~_x z@eO{<(YK~!y}7H)Y+e00-z)YN=8t(}*-QB>OB{z#rb^vL>HEer9NWuQs){w~&o0}D z!6(Oj=xdJAA@B#c^e5>vYnjuYm3cs(z5#!DHslFP_6PpF$@dH%Q&uoGAOijof7J5< z=Y=P2KP-a>)|7=S)zs@1^2JF1ohHpB3wY0G;L~2-YNTe;7^tqI^7mVXTRlIrw`m{*wgQoOs>AJY5|7YP3F`~eqNR3})eA67F&)}V?GU%0{2^vM`d6<7p)UKE@qMiMmV-ZKv3Ip7xZ=Xq5Bzx*d9xdzCoWx~ zy!7~twX@adkWqJzA^G5V&$!k;7qPZ1+_ALx*b$m{b@wxx(r7p*3@`vpK>(7&rc~I9ObMa!u+_oX`hu8(b8hqva zK6=JXDHMeH9ljB@Ka?k&-?h9O_C(QlG&FFk;}+Y@+KAX|ug+AnA2nHy~H;ax4irtE|5 z(A-YVaidK!)ayfFR~CZYzTdFn?7MdBL$(`pIV)GJxEK7X1xj+RuT-JJ624~;vHUy4 z?Z*BBK6S9CVZTmlj^`ecvSyxbSL!1vr{VdH|x09YddWiNPh_hECgik?f(XOLZ z!Fjaf`#d9~te<=QB-;^v{$Srq{~NUecS;w0$0(1x5cB2Zv~RxI6a2{!a=Wk3pD$k* zreW}x_*^5RHexUQlU{G>y|J75i@aew(dWa)nXyx7IZtjpDNy@Y91Qux5ct;v>97y> zd+&~0l6dCq^uFah4Duq&e${czL*LT-Q_k)1SJ+|sT8#%~l*e7jGGm{y4!q%+wA;BJ zI+6vDhE2Xf+2Pm)i=;rHWej4wU4irZ5zU{8G*mhTek_z?zT5i29BjAT+ z{J3!f(jk51^&BxtTHt>vNJpQqI*mV;zD3`sQaSh=;>&5i80B#n8hr+9pvB+~b@trO z^=M}k`Mg1tQI3mTowyEi*r#%iYW4YD>A3xm6jRT2KhS@gO!4#6L?3GKT_-&PKT2^L z?Y_JVS-z3NI$F8D#my08a)v>CYZMp=>zYuBuK0!`#C@W%_}@`p3Vg5a}FKF@jn zgYgrj4(2h)SgmrP#BrMQcF&!ENUtZL(cxQUHe>?^!MB!-#W#9?cIk=Ip}vFeW8{r) zJCysJ#F_j-83;W+Lk5`~UyT2w+<#-P=XrDykg>0~>uca&YOG&3@ExN)Qde$t^akwZ zu@?izyq-VdUx)o2V}YX2DJvOqccBd4{kxjGB1HSVg5N70&YeA5#w?4*JAb4!9i2XW zTUyqT9GB^14Ce>wfD_x@e~s38WEsdK>M>Fel9-ToA?|aGHJ26ol)Jzi>ZN;t__N~= zZ{U2W4tVpY!B@5+ViCU^135kY=V5*@_8atzI_kiE3&A&zj+?@n(VJvRc)To)uu^!e zz#o#0=%Z=@FjvQI`7X(H9Mk1>8~EzeV>0&>l&PY9R|wiK{UH-$p2?dweTT^41tH?I zG{T8KSQ0J+CrmYbbZS0fu78MiB6ZU9fvEH0#2?&C1^#GXn+A`d^Qa~Ugi8KE;L&Oy zkC(Ks@tSBqzK8CMm5jJ8TnhZt@USoy5gsliBW{HBFSRfrMErmuoK!ll(ti)W0xka0 z(68Y8HVd#=2QLcJ7?sGk_QBC1#YWcTUOz+sg@0gx(J!bzO zLSH!A*9@?g8-;$Q`T`r*ijim=JBb(Hb3ufnKZmK`-h{8&CED*e_rd6c#`&D>d6tue zv(|ZFK~a!f-F)~^O4qzai(icTU`V-#&!ov3KbZ3zKDh$US!c&`k`{Kv7^oL3`GOx1odU$B44^xbDM zA5V0tw`e@i5a$Yq!J8_eB=s4Ve)d^y@bf--YJFeP=kUmB(^c!ZZ@Bk>-;~qP3%n{} zKR*E8{X>a|ZYwI5{_Q7J!^T#@}BX&T?k(-(Z4*9cecPs zl*J#T)C$?BhWJjQywh&aY09t0gm2fSn+*N*XYHG4=BI~L??HoXau1fvc-{ypf5kaj zQ}8FrJuCj7YV49FgOG;7A6-Y3FZxWHB)t-L3g>;`uuGX$m&O0bd$RHLL(n7b7l6J2 zo|%{yDDwDysl5UFhrm`F$W_-@yVpyIm43GO5K2a=wX>vrM{qDXco6kIyt>+%e z*7J{_nLa-IP$upFT?)ild}n80@tyPv`%pOEFb^z$N{DAN{iiOFQ1Ch8_&u2w97Vq} zZr_FN6vrUiZ6*6lKYP!As&({^GTNUJay;amF>ytZG>`p8p9c|RzF6FO8L{V<+H~rH z?1Y~S_`0CK3v2vO;JxD>{AAcd{S19#;GXq)@J0E8FBMi<{3?4a`%%>m`&vdU2~-^+ zD`J~4>deTGV@SRk_xLQwh6&+o)w(l}WbN^rYB+qQa@;bWF^5C1;_*Sp$Cl|C1ax2N`vTwmOcl$QP$AY(qQ9d8MXH|`o}%_{QN`NbNR7+ z10NL!;LC!<_+H%G4j&iszuuRL-`tj_@O_ah0&-oPZG$gbU)DQh4d+k&EtWeaL>}_2 zO1CqME{U{l-$6pZIUygTZLe6nMeFdmN-I~+oI_D`w|iArd_y}*gLX6te0H)=;e1Jb zA^N}>8=fF-WB00}!QW|r9D3c2eRam*Q>sApIVqEHK~-LTQL3!DsLHLpAcbPiDKF?( zX@3XMEr7ouy%v2paEWZxy`Ul=K6NL=Gf9_{_v$Jg_zbNE9z2!abn!v+nl)0-^%+@+vS7M)iQGC9D!d9!{=j)+KV|q z%*TXfVX_atRX+Ldl=L4uRQDzB>jOX8rSHdmzDL?aN7nov<2au@jIC&j`v2btTrWdUl;ickTmF-rqv?EHmln6ICHhCbow z2b1+|&9}SslWaeHw}IKWeq_A*=E_4k49x#|fuXv;n%fWJ ze?u13^J&|TnOE~SZA#s>fB$C4%Moi?oa(}SpLNQ$Yg5c6*1fbopVI4D{LlRC^N4fo znI0G+hp#@6W4Hg3pKkrB!yj%wmW0o~()usVllfb)Z`qvYrI(&oN72k4TO8@X2EKPk zc*I;6{H}3rjvMzJ!<0N@ypxh=`3%>NgGP>#rO_)@_`1y!xN5zchL}lUob?Fw z=!i}5kNuFRI-oGnMUc@)?CJ>j|J7@@5w3r@A7h&`_+sP(JpT*l-|^Y9WqT^!&8J}| zzMU3S7c?0}o$7O-hak$9oYn}q_pkEInuj~!&1UG`H2^);T=g`(are&ABS+F5J$ke# z!YT;sBCKl{y1M81jB%ZkXOn)W9KN08{?lDKUfh4dffpQj!GRYXc)@}Hbq?5o8j;Zy z#&-}HlAwid2cgjOBLAEwN|8lw^~F#eGD>ssP?RlkhCa++~`f$<%T z1Co+)KgNME$vC437+P^Pb=(Sp>C5}pcwNTzr}(kNcwWZ!X9;|o824cOGzdR){8irH z!Mn^H{_J4PKAy&O-yBcP`+j_y1;8Ia#_&r?+!xRJ@nQVT@w&M7<4yd`@w~Y9<4yb+ z-@yoe<~R>Ockm{D<~W5pJ9ra6#!oYXpE=G&;%VN*k8vvx^|h7HPH}5p==86 z;+CJ~{!_<`HLx6}T5w7&CL4}8rS2`2RMXNSBU#u zPf%u1c2G_$QD2WZZ9FHU%_4_Sw>qHs-~WXl%S^mCmbD;=_@1>uZ-bhEh{s6%h33|f z=d6uD^*}t6E(RiB$d8vn|0jOXjbmO}$1HO-=*_>I3HT+zFN*>`*H^FuJ`Nes6`U>q zVGwLIZo_8z4E$by3;p_yIkIP;hjZudc%M9?Ep!P`X5cft3foqfx-j_vfAwd@j9|Ho z;mn}{u;ctt-d!l$y{D16L0&te@?zn1qM<;jj|Q6B@kxtqZ6PWUG626GiGTh`FQ#O1&D zD_XWJ`*}{(Nh|2l9CFMnuPHC*IUTXx22GwS-RFf!yXEVpSn}|33p0^G7P-;gUl44;$OPT1CQX&3~R9<;bs;oLMRjtJ9N(sOZiXq?c|4|;4ty`CClH9-_2{f0Rakg{s z$y4OL&>hG(Fg|0?N(JCLR#}fS0n@R@=37z|ID5n`wA!Btu?p>o{{!A*E#Ny63$n`E zD?-e|!r{M4^}s#S+jo`|UI@Ppo2s8+v2rp$_uCl#QBZ{Q9xG;jwkn1jx^gZ7w%`2R*=8EVYI3sL|$ zhYeP2lO6*HIgO7M%a`Ac@^ehgS+qn6&P~tdmo;zRSAf6$7Hw&bx@Xym2mF56Hpw0Q z3v^>H82Ey~#3Q~SFz~cpo+I|11!J%*{-+5xM;2^BOK8CsB)(uGZes<+i78kXxQ@gW z%n#hfYAbe1Pwyd4JRnXw3e9yk#V*hMBlb7eusLAQ@SRb1hHQhK!#)r|9s z_W38U@`s_|C9qC>=CuLWcHqGbbJ?ly*FR`A@XCHBrkdmhwi+?+Y`Au?5p;)XXT=H> zVg)AR1rjUJLgZbs)ifeJJk(Z`hna zoWY;OyvX%3_g>HPBOZTAth;P;Jm+Gcxr-!U;P;Xhcv?AQp(6*ZwcMccjoWEVC<9-O zVWsKofLllGIs>;3A?!0r1|}dw8}AUWIDe~j!1}Ob`}WXl>MV_i&yvbZc1Yn>z(NFX z3$2DdFxp!lw7YBpKkNCC>qj#Wux|)J!OJ}3Ug1^X^@f|%?E^c=dg0%QSI`N`5_MU! z0rQJCSj45vGyPL-w@z#@D~6ghd%uh1Mm`N(IwQ;ltU5C#V*lNiclwU8Vbqa_!1&YD zx>I+lH)gq%Tya410&_7pbkehjpOu3Chotu~*rQ-fGV%&6wwss_xX-39g{S(V?hB*t zZTmOQ@dE=_2{Gz2hF=h`nCmvYG+@pVcTS2l>nYgZY8?>+JFW7FAMk_F#@*nb4)I;99lX9zT#^D)Ka`yDHzZs1W$_C9O&Tx#(1Q7lvB}^8^t+a# z;6<=cdKy`Z6V4j-J}ZPC5|5x$+HN6Z%nf_&IoJVaS+HL!RH&%)K+HH&)AyQ7u7ICx zIA{jOoH;c3SIK9w9q)*(#_|B?PxFQ8RjS(%*pk2Bh^)&0k*Rjv|&EO^b*WiFS+Kfng*k*aa9?B!;rnZH4#Fxwc{s@5`q0WoebHlp0 zYM%+oV#|3&UY3Tt~I3*v^YK?j&A55t5@uQ-N$j3Kc3WUQ55z?T&V*8Bhlv zuoq4bTZsI?t?W6_f~{uc9pl%hD0D^2j#66qx^?TO#v0$(NQ3zqF>Qv{ZzT?qVVCD* zyNvP}_pnr+6+z`Cmfbw;JWAuA6sY0J)jk@d|5ADO0(+q$lQq8-CgD({>YhX0%Ow zcgZF@TSJziP=NwrD1S+-Y%9?HTxoLvT5^DF<`IWj~U-%h;ic*Ws)d( ziq^!CLwT9sXWxG-azFb1sVBoQ0me$fnvFCTrqK@=0(Z;4TzIbDdx zKkF*fgiQi_U}1YU(rnoHUCHeKv#o5or*E~@J)hzFp(ruy+?ChWeJkFNC$O#tj2&opDcqtqVd`x5PbM^fs?&W=_qY%Tw z;5F&PXDa_dzZteP&EH}iYp7t9zeG}VAX zd{1-vDT8kk4Le_A4ru%w_iJBszPUf490a}$EdC`^7b$IZc;wWB$V$xKO|m>E*BnHkXBQ*sM-M`3od97owlq?80a-*DdOE3&t&Q zom}Aune)ZEraX&sJ4dQMb)^uWj5t$$u&ywO*R65pQwi8q=68tcMVWy)eWy6rf2bF( ze`*Bo7W$uZEVKC&Nd$xV++J{(vgJ#UP?Kf@tN1Jzymn>0Y6Uxr>beCu8@ZV70{0{Ap+r;cK z?E&ofK*ZT=23#m&L?uUUHl2~Nzo( z&;iKg`#Y7@Tn-~nSw7B;sDI+tb{*?b8SWu#QGSN`^X2nL`HO>G%EzE< zGS2*bU(ADVMSrVt47lIa`(WgOa;)CF{*XQ?B)?_hLcAi<9MEK7B=p~OEXD7az2JcI{(BVzpg4@#l>; zz&UQ{*Y{kK&#oIX@{6-F>dSMQ#(eghELprnmM*an@tY>kU+(fI@eU~)#qr(yy5FjBzK~5Bmd&`$C6Tfx4T)yir%{uUTXJB~|2dO;pnAkR% zKgt`sEsB!~+kTdbUmUlm&yUMk{}{VI0$j?kQOv3!>QLC#Kdw`?@7gsRc#wGh0r~5w z*>kiFxLyyTA7p|Y*bn$iGmboPqWRmtm#D}{iHVMOqUfk72?z|7nfq@zz2_<|<6fzC zR!kwZ`z)|K_nx!VhGD_-_Xz$_{Ej}5Y5T9qlur-JIPiDu+MSw)!B?mGtb}tRu&BDB zsMJSvDnEHJa^Ad=<~Bfm9rlA9{=g--Vk~vraYq*a@W6@uzd9xf@$nYiAYuoZC_XMu z0@rVKddF2d#=VK(-V;yaBeMSi-=t@N#woMw_iej$m*Lyb0#E6lOp9709lLhb?VkPD z71oCpSCTp;)a`KkeSG)s%Pm{CK49hn&-{nSY=-^61!pRE>=jw`{e21f`Jo+!@A}Dt z352r7IZ!O{g2KK&Y4^P2`{wJQV-K{CLYAGl&+S5h&%(7i+P#_BzdH^cC1dyBmZ=AC z%jj9~W#e!@W_}*?+%3q*sAuT*oFEeRqG&6&^KY(+`0Zh_TO{)e@PM*6;QvGb=g5Np zLkyos0&E{yx$}r?+I7V4*+lFg%e%Jg-yTWauMefoXISULw+=Cx+J%0m=XW-b$T zkh)J_CX;}NG-L01@g6x!+b)}*F~@=F_W{bEBu>k;n3#5W$7YMoZ*yHVI&v*>F!b7} z9PoWYkKLC|z~b2i{F6<<_IY~3`$%W?i3ig3Bkb?MW8#|i2-yrjY`_`C_swN+jI+-B zg>6AUz__&asMc3-r&9)BG?Wo1Ytvq#$5^{H0l(P}`?+z;0;O)`LESESE<9w{E!hJ6 zo^9tJ$+ioRpPcaCXTbiMe(;VIfnQ5vlN5*F(!p3ev`61FpZPnM+kD*yvg-vqev;Ue zk7Oyv8u-t3$usya;(FNaS`h!U{lJ4+=5H{r&&S}WbWrT48tmev9pq{3TvW@0ib}WGMOs&SZElQ3!Z4 zEkC|0!+`5F`_LWn|KSe_J9bZke*8n`AGs@IQQi()ujw+=9|PAkxdXnJ))CufIP?uV zKwjXk?Hc7YLh4RZ50CQ{?{Q9?91<^|UHnsmHhreCSd3?l5IP>SP=1$tAzQ^eL`n>t z(-QCBHqtOcevf<@HrZE(hpp24rZQpQNe0MfG(XTbh-b~Z)r7Xq^3o4MVPK^Msj+w#&;Q#M+-N62^=HL|4UZrwIJ(d^t`3A8|^LX(;YUxnBT*BXFU|p z<^1nZY`e>mTXq*{->utDb6U1IzRP~Wx*)da_(e-(L{O{@2-_$lT>up-L1h*8geC>+U_I{|cxzXdTG5e?;8Y zPXCQK+Y{HjZm?ReVDHn?T^XL&eU$Tc5YLl{sl5ht7)1LBjZKE|-{i^f_}*7&^FCPf zrg*MhsA~=LTHreHh1>f79=7nbzJ66F%Y-f0X>{`Zzz+TY z)V9#idTj}4Wg`z z@?KlpM*P3_d*k)jQ{&_8a5+Kcp_|Y&gQw>Q(9xI=ot-e+&y!%+5eVDYX*jd!W3_Q1 zRshSF7U#Jv_rLyw4KQ^I3%&O0t1Xe&5MZbNi1XzK*k@?@7(>T6uK$Lv*EQ&8e}Vn? zWW3)9R0_Jv9!dGwd!B`ZPAKa>7jz*ymMc@{3*_mk_hdLrJ)b9c?iHw$cadgc;4;7Z zJoD<9R=$!YUq>6M3|_5*zU(6tkG0Pc$W~O>zWr3U5s)WMn58=VE>N8&&6UohCaZ3P z2CMgBdk$F)>&LE+pnG`|x?yASy=rMaJ>BX^Ip*g{u5;zeg`?$kZ6J3#WwZ+q_%n*O)8%4Msj`v3sOn*dq{-rqs?*r%it=~J z!)77|-tZpcXQX=h)nv~l zQc}3W<;%Z@v7;~grp=cHyG7Q;@M7Kp7gp_Qo3=i=X<} zV$h&8@CE!X^8SY*GwC*9pfn8nQVK<$g551_rPtqt?ilRnT-w;u52D2vqRqY*Hpa9~ zrj2sNb=Re2{COz_{PK=tr`w$o;A~(!GF~HV?%b9I(NmNHdZ&e;dwANKch!B6x2hGq zPx42eQAJl>lM-uhDd_fSveox zE852v3OT0QPt<<%Y<&XbawxK09N`ns5$LP0W1NmR`fBGMJynCCohny2Y;F>+DcU2# zE>S^eQ4{sRK#F9sht;97*m2%g(1!%UrWgIVT+B&D`_~dEJM>yq@wGRlP~0U|Am~Tw zG;%V1+vv80dVh#~^hKY3Vtc*}88S3N-v4C&X~WlU`399WU=C z{vJ49Q>o?qCEu!BD&Oi`%4(y@P+4s>>33B79&I#qs_M|OlX`E6uT-D^i7J+GndO&4 zt8OUTW|r_jpgQ*MYwHVDD_1^@I;e(!{bK=ohXQa3Eh3O-zE6R2p% zR-oHN`e#?L^CL-#sT&paNJ-Qk)^Y07f)uIZ=pdF?wQA8q`vf-Pl=qhG<*Tyu*{I7Z ztN$_8d6?D*)_nm!*Ll`a47%_snG;?z*}tm(Q|Btr6+csFUwOh$ti|pRA@tEQ2K=hZ zSFgjmRy_ZDyLBh!6>&jPS1n`gO@t)vi&uF?UsDZRb)apef_5(1Q@f62 zpSMR*rwsO`$}{+ks<&`6W!O6Z;N@S?-*4rS0?ZTGzrG1M?`5_f>OH*|xYeS=4Sh*h zHcZ+3Ez~~Utz(pw8Xn+aYi7|$&OhxV-4@v%Y15FeyRT#(xJ+_aX&`xOy{B#RXqyKf z!G7zKWLxpQbm`mACg(0%xNscmAdj2&Zo7^3Z#8S%k?#HaDfpI9v_I4ScU}2-4ZWaB z)O?%mh&BbPVUzciSHLeUEBy>w{IMde(rtw9ldP-i)vK!vOTM=}1Al}b0l%TliO2eWTc>hc+7$~+=Q z(dLuykt+7{v;B|HdHMgW8aA@buk0^H-|KGkSL`y)sO#EK)LZk{6UW~+7Uj&Db2hS^ zq#Z<=Ql*x%ysYP*^F#GHwxRQ<^$*Q@xJDdy7)9#0wAs2ehX41R^Y_|xR*R1ave|pk z#x3jUc-#M6rb*pq=$lqrzSGXO75dr7kpFTxw{|<9L8oCgdC2qQ4$Iak=#OZBfd;P) zz8j%&Ka<}lQnhMT&3~4^MkjB+r{As9x~tI-r9#d6Dt+krr1{UfhJI>M|8EuWo^1R_ zzWzr09t0b6L-*3D1pz;76Z6kA)3*Mbk^j>v%0K&d{`Yz*_-U|xufUW|D%-;Su(7nX ztGC&2yG*cahc4TX&Ob0W{EsN;k=fE?zPM*XrVC?z)!{>eY)zn%Xkt)rZj?!3AF zGtA#F6)Pv&&(?3*QA&TXM7JG$8@5C>VIR0F>9)f*N&RSyK?R^6OFcN|#~|*T!2jm3 zk#@PRL;hE>oNPaxm#oi8uo(nhtoTK0uswM5%IX|dU4cj7b@Zkpj zn%kcdH$vSeG3IeC;n03`T>y_K3U!dnsqx@O+0vyKG5^#R>boFB(PtKXoZ5{ij^C$W zbz)U;?Z!2I!=^2ybEi(KYv;}+VF-I2RbgT@F)LK|1dE?*oljF)67!ETqW@M~v4cJ_ z?b;9P0k)}Eus^7Yy|~j@3VFu>qprMtr%9$2@I~mx{+9C%*P7NaMGQ^KAQeHb(x{BrpkvM z!Tfar{I{=nu77}!r0RZrM^n9z?}#nF@rraE_<h%L8l+l{nWyZY;qxEe z(d$x!??wpyaMrtYnLLmAaNj$i}+68~YF%*7sui4ry zY*JJ`=p#4#?5;AA`C9rcidV3AAc@ZhAE?$5`}nNgGko_wP#(0s#5M^&gFN!AM)>Xrj4=5hSfD>>MYpZq77j@;J82@(Kf5|jz8Sf_B%3h_ClF9 zb*fB-4a_k3CGGsB`*)h6TufJwJG4m#znU&y?-Ik!Xxj|YS3g7kDWkL-OCf8h$a-Tv zwQb*Cy%)Zd<0$&^HSIgO(WiIRz&-Z_#Lytywa?a*^!=+ybLY&F;o%=SJ!5{q|L%LV zXF%GRcfou3^in;1Msm!gTuG0GTt`@mYXjY`FqS@q?5-*DPr0kz4|(5al-1jJy5tFj zzO1&Rx}p6GkA&zj$3d<=+de{B~5 zUv8~{7e@Kad(B(Oz>rNcD&g})ivJw`WvA-(4fBWbhB}~>zuMJ7m%e?u4%Pcd>MHdP zSgkx({GvD(z4OWMY8G_OK@2r5`)D6^-BoN%3`rRBdRg3h^K&laV-G;TI|}^^y6qMH z_ozd3#7OuPS>F+prY zOpEh)oA57GI;?B6$6Qf!kKUIRKRr+eg>BnUopog;9fz*E3fg(h^xQ+2@g|>u_rYgX z!GOckYeZt+@Lknm@JKa&|1I%b^Q8i&0{8a1UGaa+7xM?))QQNy)0$}G)vKPZ+O)CR zBX#fBUz$arFQ5$7)?brI_(Y9`-&IolH@`^2wmnW1`^!DsGqKRAHl8=)Blq1AkC3xc zfHss9r)#}Q=F1@FmpawH@WVT9MTEwwG5%+SSaWhs#4`t{U)X^I<***6FC>;%QHQx> z*rzHZumGy8xun8>zOOc)d89ULGE6}n&u@S))qy*2sSH6URk^@#r1zLfx}Wkp zMx7gRuEo4D2FyKjTMdJqFxMjHXRKHe`JFOvy^()-2-wiXCO_nwWFUNe!zUnQDkoL1 zFK?(d(AVB^@v+hbf1Equ!_Z2J@r%%jKL1F~Jak7@Sb3h~vTEVKMRkWv&pM{q_CVyV zk$=WpwP~xCef6VC`0k?g=&R)`w)TVh>UYdrdEMoo_fdu>s0Zpo>AEFP`uYr)Zb2Kh z&TfVP;4QAXAOoPgJooS&35T9;0(6*Tez`BpzyCw)>bCgkisT7DC0YD`l7_+CrSIgK zT9?sC(=lY*q5To{9r?c=gMH+qa}Q-^K$va(;eGJ`G_shi+&%Z0xYBPoZF$V7JG`qX zBk1itSPfVhEG>C+cs z{Ca5mmL3;)765;Ws=v=L@t!bQ4VpYn4VvgD14fQkz>`(9@8TT9ay#bL;E5?s{cQLr zJJo@UcO`VgM{3jlAJn&(?}^Wtakexthuz1yO&R3>iGKKg2~Yy)sn3sChUAF4{L5lj z%cfoXW%cKL6e=|Ei8Ai+F!+@VME%vT5hi(l$Gn>P>lkb&2xwkvQ(I8*MeHo@Cp2BCxAg#tAr!~(rW&Xv>FF5dj zoC6l6BkB?HX9^Y7$8dd{T44xJ^M4>es*xc?x$EK&^~2~GiE3pGA0nhfBx*I$=@COZ zIXZ0$`SK22+d|(|sr-2D7}mAkH^RKuYa_($tKV}BaiXv98zE*neT{HOD*Ui(Fv8Qk z#_zQLo9MqtYh~dc%flbb$Dc(X&Qg9}Yc(#UNB(d&)p}m|E_ub(fo3b>?!uLxsZ!;` zqZU0bs%JRsapl9kdLWw~7v6dCdnyiay~8~VT2QLepo*YMpt7I>AfA`K40^6V$o`-L z@^apc88h}L7CiKBe#UvvZOp}wxF3ffhHE%~KZG;ih}U0#y#w}!h4bdki&pgPKj!a`u6ek2Vd4oJP2AEaLNQF$wPmo%OoC#{E!wVh#tFOR{Gurx2f zT%zZ+#jLj{`en|Xxe72i&+*%Bp+nPbc8pYv{zWRSxdhC1;Mh~g0~qe4+R*zT=6!kW zZ)ya8Ev<%4w#g8&PW~cwnwQJ^u32Lzb4w~Sd5RP%j5Cw7{C4|+A4t`ZZ>8kQOHu*Y z*ant3bsVVEP!+lj7QA(YxULKw^^(A(e|z>yeHO?xaK7`|>uJ*#OzNA)|B9C>^BS=B zwVhiB?_p9h47PeJuSs#pTub0A-@vdoV^_G3upI*mV7PMCq+mt-zX^(b;^dJY+z3lE4g^g8EHOfoYbDZ zUP{KD(-_@(aW?h13&-UDC!8-AZxF}g5v&{zm zhuRIB3eKRV=FmAB1DQC!=5zPTlcJ?9_I#u^ZQDt`0h6$AJSjOsPDtwk!!!>{l_;^< zD^n)7Jb-+;Gt1t2fVX4~`b9i}kEO9sA@j~XG*IJa@{A(Sk^_>7XUsf124w~|>^tqc zX$)TIr|C1fYE9cA?>EIO>WWmJ|FQ0) zD%apWU5=Wahw$vwc4nM+_LrK+JR{CFGDfoYnk`v;!ZjY42jq)5GnaPVdl~IuLH>OC zoW`bzh=`Xkrd{H>e$~LeTCS(RYdK@lveqnPSMyAk`w`*UwDJE+y)C$cmEH!HBG0@{ z?`Zif@WPsmnytSNtl-laOY=E0AU-}`V}a3EOTkcJ|2n2)mGzcr(n){6eyh&V54a*3 zgHKDt#%M1%|H<2bf&I4)`7q?rb*4t^@BhE{t~4sDBMUb%iId6V7L8*xqVbqva6=Ob ziU#E%i!6c&&7uv6G$4-3>L5zHfdV2XB7z3Q4HOVJaLs@o6E%UONgSibg~YfdQAbTw z%*@oC@7C+rb^}gka!$_7k9p_Ze*LzpdR6tRZr%IUSDe471Jl7vWYH#pFQN}$V-C(& z3cpl1XUyNj_`l1NIvR~K=6h|Di>Y5~nM}_+z=d>r_jK#{@f>qzIV`I-#gB6S2v|r9 zpD^OL<}jJ-pgZ{1{}uOZzlm}3eO=%)atw-=@elBw)@IyX7B3cmOC!wUNBR97I9Ly0 zAxz&QY>*u|e#ZFqUkCoJHu9fw7(L*>>9^)I?4%PY1apsrQC`d&ZnI#!5kJSnYZ)Q_XVoSEJ1^ZT@QKgjfV!@CFQ zXV8R@Fw!qApy*|aXpQX=bgC$%!SpRoiHXs18ku`xSm6okfb^#|-lwe39!goe+}~)rrryJQp96O#Uz69OBH1?jg-6r8k8e|Q;TDRVzl)$(|T}&Y^rOZEqe|qviks)p1CW}^ED~wn<@L#`&hH! zYjVk{H0eY9PP&CFY5sw~Sm005Zv73I#i42);C=Ot8(p2fCSK%cLiMq7O&Z6_YgBsf z0o8)5qV~#9ZA#78k7z-|J$fDMc6gx=Y01UHFd zBriMLQv)*B5_1c<@4QCo;Cm@Ocb}>+Kcvb_52*kg3p0+~qG4N_THGE@_UbE&}W3+cJJWb}Bjca$s~^jap}!>mXziy>XnB+9t*>IMELMKzzCub=seW8q>?bv7sOy%EJI>5=p-{l$e z@c4bWuVg)(ZO-P`+WPM~-jfO|_t5^6XQ{ZlR^`_a=!^Aj#o6*4!nA@gUuquY1mqUP zVqGX4|7<$sSi#MWeQXWr%iGNNmT~|8_}9+?#lC=FLvKtmYma$)Ry?zeCA|q!4|5Hq zx8bp{9?QbI91FLh?F@=oVb3D%B=y)gK@gU-hrkBHCLLv3p)um6K;~HEx?;yr=$Ts1 zN9&I3++nJAjIcJ*Jh&!zla#}3&EHII3_+1 z?CM46t+RXd>eUMW@}zh2@bIt(2kQy;^Z7={lS^I=Ic&Kg>?^L3L)8te|8|ueOFtJp zM)L_$@OIG4D!TT0qt}zdRL^_s^<9CV{2b#;;kv9`3@p1U-mLzsz?fJt#>T-+hF9Mb zb{oDF987yD*)Pwb-sPdL zS=cSo($YFXXL#hEnkR7)QqKh*jK?0M$2ij%zfjR}J=P6@-qAorI;S09tu7kR(&*$x=XIgE7^F5qtN z2L3S@cTalT&DVqll<&&n18X&U&MFx`^7;h6AJaGj;RkSiAG-P@V5b!Pmx`I=eXp5C z(hunz7$Nb2ePfZ2IBy|J_|i{{e)1piRl2Adl#`u3n)AmocaKH>u)fdpF$PuM6h69W z3J14P2y|GUL&ftMfL&K`(VYJGuM5|iivEG{d40)k?P09rIOe6Ly@Yd*yi#+4$+|An z19KJ}lzMk7N{)wDBNiW@J!o*)cvR)bnp)d<8rdy_sDj=e}_{a$a+OpbU5{ zBkQV-t?elOzI@VG$u)eUj{YdpnYXh360KXmQ4|-K(3*9{WccJB;k>-Y`*C~k%CYx^ zaJ`s}c{Qm!k5hcfF2Q33wi_UP)BLQs^z>408=Z4^h!NYr73)ccMt%)hL3(rpjY32jB>`Y97_xyY~Vx$PKJRdt`19 zzvwu0&qN?j8?4^oit}l1r{hm{S)voq(OcgLY-H_tdC1>s>;A{&V)jhu4jd zPA2>HrzL0U2(10e>%ZDp-=vWRACgCK1licwZ1vXZT4}3xc6Q6%VYBX6e1V4MAIEx! zHzl^2^^CXHo+P^s7w8Y`vG$=>$L-r3^Opz+2>2baj?I0Fu-+QhNE_uhnFgnAl z{3+K^z4SrY&MTvVIR_>F8t=(PBRBA}Pa79EU$&>*uXRt~L(U%F)MafG_00K@oLyY0 zOU4oEwE8@3AlJxKJB2VOeVY0_Fupk>)7CP!U9ok+R%Pd}ry2I>A}vVn1% zJvM3%@fyCE>ni&hJfH2DRwUbhwO{SI{21dO$!lUDy_R{%;(6z&6xr?|ADlQ1z)45C z&6tPueC~{T`In^lkI<{YRz`P7EtzvJ1PPPq?TLlINcJua`@UTze zX}L}>V`FFUyGTn4H_@C;2N_o@WdL~C2WIUfzsV7#jh;#F9v%;%i}&R;L?tF>jE_ks z$Es_Lk)(~gV3(<^rh=2-`1ws|&OGCwjj8q2 zCy;jAXSDp(J=ipwsp3*IE&AjRd9OW8o 0) then begin - eOld := eNew - eOld; - //eOld := eOld *2; // this is only used for faster updates... - Result := 'Metamod:Source - Uploading with ' + FloatToStr(RoundTo(eOld / 1024, -2)) + ' kb/s'; - end; -end; - -function GetAllFiles(Mask: String; Attr: Integer; Recursive: Boolean; ShowDirs: Boolean; ShowPath: Boolean = True): TStringList; -var eSearch: TSearchRec; -begin - Result := TStringList.Create; - - // Find all files - if FindFirst(Mask, Attr, eSearch) = 0 then - begin - repeat - if eSearch.Name[1] <> '.' then begin - if ShowPath then begin - if ((eSearch.Attr and Attr) = eSearch.Attr) and ((eSearch.Attr and faDirectory) <> eSearch.Attr) then - Result.Add(ExtractFilePath(Mask) + eSearch.Name) - else if (ShowDirs) and ((eSearch.Attr and faDirectory) = eSearch.Attr) then - Result.Add(ExtractFilePath(Mask) + eSearch.Name); - end - else begin - if ((eSearch.Attr and Attr) = eSearch.Attr) and ((eSearch.Attr and faDirectory) <> eSearch.Attr) then - Result.Add(eSearch.Name) - else if (ShowDirs) and ((eSearch.Attr and faDirectory) = eSearch.Attr) then - Result.Add(eSearch.Name); - end; - - if ((eSearch.Attr and faDirectory) = eSearch.Attr) and (Recursive) then begin - with GetAllFiles(ExtractFilePath(Mask) + eSearch.Name + '\' + ExtractFileName(Mask), Attr, True, ShowDirs, ShowPath) do begin - Result.Text := Result.Text + Text; - Free; - end; - end; - end; - until FindNext(eSearch) <> 0; - end; -end; - -function GetAllDirs: TStringList; -var eList: TStringList; - i: integer; -begin - eList := TStringList.Create; - frmMain.IdFTP.List(eList); - frmMain.IdFTP.DirectoryListing.LoadList(eList); - eList.Clear; - for i := 0 to frmMain.IdFTP.DirectoryListing.Count -1 do begin - if frmMain.IdFTP.DirectoryListing.Items[i].ItemType = ditDirectory then - eList.Add(frmMain.IdFTP.DirectoryListing.Items[i].FileName); - end; - Result := eList; -end; - -{ This is another possibility I coded because I couldn't find another bug... - -function GetAllDirs: TStringList; -var eList: TStringList; - i, eStart: integer; -begin - eList := TStringList.Create; - frmMain.IdFTP.List(eList, '', True); - eStart := 0; - - - // +----------------------------------------------------------------+ - // | drwxr-xr-x 5 web3 ftponly 2048 Jun 25 19:43 files | - // | drwxr-xr-x 2 web3 ftponly 2048 Jun 25 19:57 html | - // | drwxr-xr-x 3 root root 2048 Jun 20 05:03 log | - // | drwxrwxrwx 2 web3 ftponly 2048 Jun 19 2004 phptmp | - // +----------------------------------------------------------------+ - - - // at first remove all non-directories from the list - for i := eList.Count -1 downto 0 do begin - if Pos('d', eList[i]) <> 1 then - eList.Delete(i); - end; - // then we have to find the position where ALL filenames start... - for i := 0 to eList.Count -1 do begin - if (eStart = 0) and (Pos(':', eList[i]) <> 0) then - eStart := Pos(':', eList[i]); - end; - - if eStart = 0 then - eList.Clear - else begin - // find the position - for i := 0 to eList.Count -1 do begin - if Pos(':', eList[i]) <> 0 then begin - while (eStart <> Length(eList[i])) and (eList[i][eStart] <> #32) do - Inc(eStart, 1); - end; - end; - // remove the detail stuff... - for i := 0 to eList.Count -1 do - eList[i] := Copy(eList[i], eStart +1, Length(eList[i])); - end; - - Result := eList; -end; } - -end. - - diff --git a/metamod-source/cruft/installer/UnitInstall.pas b/metamod-source/cruft/installer/UnitInstall.pas deleted file mode 100644 index 95622ba9..00000000 --- a/metamod-source/cruft/installer/UnitInstall.pas +++ /dev/null @@ -1,560 +0,0 @@ -unit UnitInstall; - -interface - -uses SysUtils, Classes, Windows, Graphics, Forms, ShellAPI, Controls, Messages, - TlHelp32, IdFTPCommon, ComCtrls; - -type TOS = (osWindows, osLinux); - -procedure AddStatus(Text: String; Color: TColor; ShowTime: Boolean = True); -procedure AddDone(Additional: String = ''); -procedure AddSkipped; -procedure AddNotFound; -procedure DownloadFile(eFile: String; eDestination: String); - -procedure BasicInstallation(ePath: String; SteamInstall, ListenInstall: Boolean; OS: TOS; const Source: Boolean); -procedure InstallDedicated(eModPath: String; const UseSteam, Source: Boolean); -procedure InstallListen(ePath: String; const Source: Boolean); -procedure InstallCustom(ePath: String; eOS: TOS; const Source: Boolean); -procedure InstallFTP(OS: TOS; const Source: Boolean); - -var StartTime: TDateTime; - SteamPath: String; - StandaloneServer: String; - Cancel: Boolean = False; - -implementation - -uses UnitfrmMain, UnitfrmProxy, UnitFunctions, UnitPackSystem; - -// useful stuff - -function InstallTime: String; -begin - Result := Copy(FormatDateTime('HH:MM:SS', Now - StartTime), 4, 5); -end; - -procedure AddStatus(Text: String; Color: TColor; ShowTime: Boolean = True); -begin - frmMain.rtfDetails.SelStart := Length(frmMain.rtfDetails.Text); - if ShowTime then begin - frmMain.rtfDetails.SelAttributes.Color := clBlack; - if frmMain.rtfDetails.Text = '' then - frmMain.rtfDetails.SelText := '[' + InstallTime + '] ' - else - frmMain.rtfDetails.SelText := #13#10 + '[' + InstallTime + '] '; - frmMain.rtfDetails.SelStart := Length(frmMain.rtfDetails.Text); - end - else - frmMain.rtfDetails.SelText := #13#10; - - frmMain.rtfDetails.SelStart := Length(frmMain.rtfDetails.Text); - frmMain.rtfDetails.SelAttributes.Color := Color; - frmMain.rtfDetails.SelText := Text; - frmMain.rtfDetails.Perform(WM_VSCROLL, SB_BOTTOM, 0); - - frmMain.Repaint; - Application.ProcessMessages; -end; - -procedure AddDone(Additional: String = ''); -begin - frmMain.rtfDetails.SelStart := Length(frmMain.rtfDetails.Text); - frmMain.rtfDetails.SelAttributes.Color := clGreen; - if Additional = '' then - frmMain.rtfDetails.SelText := ' Done.' - else - frmMain.rtfDetails.SelText := ' Done, ' + Additional + '.'; - frmMain.rtfDetails.Perform(WM_VSCROLL, SB_BOTTOM, 0); - - frmMain.Repaint; - Application.ProcessMessages; -end; - -procedure AddSkipped; -begin - frmMain.rtfDetails.SelStart := Length(frmMain.rtfDetails.Text); - frmMain.rtfDetails.SelAttributes.Color := $004080FF; // orange - frmMain.rtfDetails.SelText := ' Skipped.'; - frmMain.rtfDetails.Perform(WM_VSCROLL, SB_BOTTOM, 0); - - frmMain.Repaint; - Application.ProcessMessages; -end; - -procedure AddNotFound; -begin - frmMain.rtfDetails.SelStart := Length(frmMain.rtfDetails.Text); - frmMain.rtfDetails.SelAttributes.Color := clRed; - frmMain.rtfDetails.SelText := ' Not found.'; - frmMain.rtfDetails.Perform(WM_VSCROLL, SB_BOTTOM, 0); - - frmMain.Repaint; - Application.ProcessMessages; -end; - -procedure FileCopy(Source, Destination: String; CopyConfig: Boolean; AddStatus: Boolean = True); -begin - if (not CopyConfig) and (Pos('config', Source) <> 0) then begin - if AddStatus then - AddSkipped; - exit; - end; - - if not FileExists(Source) then begin - if AddStatus then - AddNotFound; - exit; - end; - - try - if FileExists(Destination) then - DeleteFile(PChar(Destination)); - CopyFile(PChar(Source), PChar(Destination), False); - except - Application.ProcessMessages; - end; - - if AddStatus then - AddDone; -end; - -procedure DownloadFile(eFile: String; eDestination: String); -var TransferType: TIdFTPTransferType; -begin - // There's only one file to download and it's ASCII :] - TransferType := ftASCII; - if frmMain.IdFTP.TransferType <> TransferType then - frmMain.IdFTP.TransferType := TransferType; - // download the file - frmMain.IdFTP.Get(eFile, eDestination, True); -end; - -procedure UploadFile(eFile: String; eDestination: String; CopyConfig: Boolean = True); -var TransferType: TIdFTPTransferType; -begin - if (Pos('config', eFile) > 0) and (not CopyConfig) then begin - AddSkipped; - exit; - end; - - eDestination := StringReplace(eDestination, '\', '/', [rfReplaceAll]); - - // the same as in DownloadFile() - TransferType := ftBinary; - if ExtractFileExt(LowerCase(eFile)) = '.txt' then TransferType := ftASCII; - if frmMain.IdFTP.TransferType <> TransferType then - frmMain.IdFTP.TransferType := TransferType; - // upload the file - frmMain.IdFTP.Put(eFile, eDestination); - AddDone; -end; - -procedure FTPMakeDir(eDir: String); -begin - eDir := StringReplace(eDir, '\', '/', [rfReplaceAll]); - try - frmMain.IdFTP.MakeDir(eDir); - except - Application.ProcessMessages; - end; -end; - -function FSize(eFile: String): Cardinal; -var eRec: TSearchRec; -begin - if FindFirst(eFile, faAnyFile, eRec) = 0 then - Result := eRec.Size - else - Result := 0; -end; - -// stuff for killing processes - -function GetProcessID(sProcName: String): Integer; -var - hProcSnap: THandle; - pe32: TProcessEntry32; -begin - result := -1; - hProcSnap := CreateToolHelp32SnapShot(TH32CS_SNAPPROCESS, 0); - if hProcSnap = INVALID_HANDLE_VALUE then - exit; - - pe32.dwSize := SizeOf(ProcessEntry32); - if Process32First(hProcSnap, pe32) = true then begin - while Process32Next(hProcSnap, pe32) = true do begin - if pos(sProcName, pe32.szExeFile) <> 0then - result := pe32.th32ProcessID; - end; - end; - CloseHandle(hProcSnap); -end; - -procedure KillProcess(dwProcID: DWORD); -var - hProcess : Cardinal; - dw : DWORD; -begin - hProcess := OpenProcess(SYNCHRONIZE or PROCESS_TERMINATE, False, dwProcID); - TerminateProcess(hProcess, 0); - dw := WaitForSingleObject(hProcess, 5000); - case dw of - WAIT_TIMEOUT: begin - CloseHandle(hProcess); - exit; - end; - WAIT_FAILED: begin - RaiseLastOSError; - CloseHandle(hProcess); - exit; - end; - end; - CloseHandle(hProcess); -end; - -// Installation here - -{ Basic Installation } - -procedure BasicInstallation(ePath: String; SteamInstall, ListenInstall: Boolean; OS: TOS; const Source: Boolean); -var eStr: TStringList; - i: integer; - CopyConfig: Boolean; - eFound: Boolean; -begin - frmMain.ggeAll.MaxValue := 8; - frmMain.ggeAll.Progress := 0; - frmMain.ggeItem.MaxValue := 1; - frmMain.ggeItem.Progress := 0; - - {if (GetProcessID('Steam.exe') <> -1) and (SteamInstall) then begin - if MessageBox(frmMain.Handle, 'Steam is still running. It is necersarry to shut it down before you install Metamod:Source. Shut it down now?', PChar(frmMain.Caption), MB_ICONQUESTION + MB_YESNO) = mrYes then begin - AddStatus('Shutting down Steam...', clBlack, False); - if GetProcessID('Steam.exe') = -1 then - AddDone - else - KillProcess(GetProcessID('Steam.exe')); - - while GetProcessID('Steam.exe') <> -1 do begin // sure is sure... - Sleep(50); - Application.ProcessMessages; - end; - AddDone; - end - else begin - Application.Terminate; - exit; - end; - end;} - frmMain.ggeAll.Progress := 1; - frmMain.ggeItem.Progress := 1; - { Unpack } - frmMain.ggeItem.Progress := 0; - AddStatus('Unpacking files...', clBlack); - if not Unpack(Source) then begin - AddStatus('No files attached!', clRed); - Screen.Cursor := crDefault; - exit; - end; - AddDone; - frmMain.ggeAll.Progress := 2; - frmMain.ggeItem.Progress := 1; - { Check for installation / Create directories } - CopyConfig := True; - AddStatus('Creating directories...', clBlack); - if DirectoryExists(ePath + 'addons\metamod\bin') then begin - case MessageBox(frmMain.Handle, 'A Metamod:Source installation was already detected. If you choose to reinstall, your configuration files will be erased. Click Yes to continue, No to Upgrade, or Cancel to abort the install.', PChar(frmMain.Caption), MB_ICONQUESTION + MB_YESNOCANCEL) of - mrNo: CopyConfig := False; - mrCancel: begin - Application.Terminate; - exit; - end; - end; - AddSkipped; - end - else begin - frmMain.ggeItem.Progress := 0; - ForceDirectories(ePath + 'addons\metamod\bin'); - AddDone; - end; - frmMain.ggeItem.Progress := 1; - frmMain.ggeAll.Progress := 3; - - { gameinfo.txt } - if not FileExists(ePath + 'gameinfo.txt') then begin - if MessageBox(frmMain.Handle, 'The file "gameinfo.txt" couldn''t be found. Continue installation?', PChar(frmMain.Caption), MB_ICONQUESTION + MB_YESNO) = mrNo then begin - AddStatus('Installation canceled by user!', clRed, False); - Screen.Cursor := crDefault; - Cancel := True; - exit; - end; - end - else begin - eStr := TStringList.Create; - { Metaplugins.ini } - frmMain.ggeItem.Progress := 0; - AddStatus('Creating metaplugins.ini...', clBlack); - if CopyConfig then begin - eStr.SaveToFile(ePath + 'addons\metamod\metaplugins.ini'); - AddDone; - end - else - AddSkipped; - frmMain.ggeItem.Progress := 1; - frmMain.ggeAll.Progress := 4; - { Gameinfo.txt } - frmMain.ggeItem.Progress := 0; - eFound := False; - AddStatus('Editing gameinfo.txt...', clBlack); - eStr.LoadFromFile(ePath + 'gameinfo.txt'); - for i := 0 to eStr.Count -1 do begin - if Trim(LowerCase(eStr[i])) = 'gamebin |gameinfo_path|addons/metamod/bin' then begin - eFound := True; - break; - end; - end; - - if not eFound then begin - for i := 0 to eStr.Count -1 do begin - if Trim(eStr[i]) = 'SearchPaths' then begin - eStr.Insert(i +2, ' GameBin |gameinfo_path|addons/metamod/bin'); - break; - end; - end; - SetFileAttributes(PChar(ePath + 'gameinfo.txt'), 0); - eStr.SaveToFile(ePath + 'gameinfo.txt'); - SetFileAttributes(PChar(ePath + 'gameinfo.txt'), faReadOnly); // important for listen servers - AddDone; - end - else - AddSkipped; - eStr.Free; - frmMain.ggeItem.Progress := 1; - frmMain.ggeAll.Progress := 5; - end; - { Copy files } - frmMain.ggeItem.Progress := 0; - AddStatus('Copying server.dll...', clBlack); - CopyFile(PChar(ExtractFilePath(ParamStr(0)) + 'server.dll'), PChar(ePath + 'addons\metamod\bin\server.dll'), False); - AddDone; - frmMain.ggeItem.Progress := 1; - frmMain.ggeAll.Progress := 6; - if ListenInstall then begin - ePath := ExtractFilePath(Copy(ePath, 1, Length(ePath)-1)); - AddStatus('Copying hl2launch.exe...', clBlack); - CopyFile(PChar(ExtractFilePath(ParamStr(0)) + 'hl2launch.exe'), PChar(ePath + 'hl2launch.exe'), False); - AddDone; - end; - { Remove files } - frmMain.ggeItem.Progress := 0; - AddStatus('Removing temporary files...', clBlack); - DeleteFile(PChar(ExtractFilePath(ParamStr(0)) + 'hl2launch.exe')); - DeleteFile(PChar(ExtractFilePath(ParamStr(0)) + 'server.dll')); - DeleteFile(PChar(ExtractFilePath(ParamStr(0)) + 'server_i486.so')); - AddDone; - frmMain.ggeItem.Progress := 1; - frmMain.ggeAll.Progress := 8; - { Finish } - AddStatus('', clBlack, False); - AddStatus('Finished installation!', clBlack, False); - frmMain.cmdNext.Enabled := True; - frmMain.cmdCancel.Hide; - Screen.Cursor := crDefault; - - if ListenInstall then - MessageBox(frmMain.Handle, PChar('The Source launcher "hl2launch.exe" has been copied to ' + ePath + '. You can use it to start your game with Metamod:Source enabled.'), PChar(Application.Title), MB_ICONINFORMATION); -end; - -{ Dedicated Server } - -procedure InstallDedicated(eModPath: String; const UseSteam, Source: Boolean); -begin - StartTime := Now; - Screen.Cursor := crHourGlass; - AddStatus('Starting Metamod:Source installation on dedicated server...', clBlack, False); - BasicInstallation(eModPath, UseSteam, False, osWindows, Source); -end; - -{ Listen Server } - -procedure InstallListen(ePath: String; const Source: Boolean); -begin - StartTime := Now; - Screen.Cursor := crHourGlass; - AddStatus('Starting Metamod:Source installation on the listen server...', clBlack); - BasicInstallation(ePath, True, True, osWindows, Source); -end; - -{ Custom mod } - -procedure InstallCustom(ePath: String; eOS: TOS; const Source: Boolean); -begin - StartTime := Now; - Screen.Cursor := crHourGlass; - AddStatus('Starting Metamod:Source installation...', clBlack); - BasicInstallation(ePath, False, False, eOS, Source); -end; - -{ FTP } - -procedure InstallFTP(OS: TOS; const Source: Boolean); -function DoReconnect: Boolean; -begin - Result := False; - if MessageBox(frmMain.Handle, 'You have been disconnected due to an error. Try to reconnect?', PChar(Application.Title), MB_ICONQUESTION + MB_YESNO) = mrYes then begin - try - frmMain.IdFTP.Connect; - Result := True; - except - MessageBox(frmMain.Handle, 'Failed to reconnect. Installation aborted.', PChar(Application.Title), MB_ICONSTOP); - end; - end; -end; - -label CreateAgain; -label UploadAgain; -var eStr: TStringList; - i: integer; - CopyConfig, eFound: Boolean; -begin - frmMain.cmdCancel.Show; - frmMain.cmdNext.Hide; - Screen.Cursor := crHourGlass; - - frmMain.ggeAll.MaxValue := 6; - frmMain.ggeAll.Progress := 0; - frmMain.ggeItem.MaxValue := 1; - frmMain.ggeItem.Progress := 0; - - { Unpack } - frmMain.ggeItem.Progress := 0; - AddStatus('Unpacking files...', clBlack); - if not Unpack(Source) then begin - AddStatus('No files attached!', clRed); - Screen.Cursor := crDefault; - exit; - end; - AddDone; - frmMain.ggeAll.Progress := 2; - frmMain.ggeItem.Progress := 1; - { Check for installation } - AddStatus('Editing gameinfo.txt...', clBlack); - eStr := TStringList.Create; - DownloadFile('gameinfo.txt', ExtractFilePath(ParamStr(0)) + 'gameinfo.txt'); - eStr.LoadFromFile(ExtractFilePath(ParamStr(0)) + 'gameinfo.txt'); - - CopyConfig := True; - eFound := False; - for i := 0 to eStr.Count -1 do begin - if Trim(LowerCase(eStr[i])) = 'gamebin |gameinfo_path|addons/metamod/bin' then begin - eFound := True; - case MessageBox(frmMain.Handle, 'A Metamod:Source installation was already detected. If you choose to reinstall, your configuration files will be erased. Click Yes to continue, No to Upgrade, or Cancel to abort the install.', PChar(frmMain.Caption), MB_ICONQUESTION + MB_YESNOCANCEL) of - mrNo: CopyConfig := False; - mrCancel: begin - Application.Terminate; - eStr.Free; - exit; - end; - end; - break; - end; - end; - - if not eFound then begin - for i := 0 to eStr.Count -1 do begin - if Trim(eStr[i]) = 'SearchPaths' then begin - eStr.Insert(i +2, ' GameBin |gameinfo_path|addons/metamod/bin'); - AddDone; - break; - end; - end; - eStr.SaveToFile(ExtractFilePath(ParamStr(0)) + 'gameinfo.txt'); - UploadFile(ExtractFilePath(ParamStr(0)) + 'gameinfo.txt', 'gameinfo.txt'); - try - AddStatus('Trying to set gameinfo.txt to read-only...', clBlack); - frmMain.IdFTP.Site('CHMOD 744 gameinfo.txt'); - AddDone; - except - AddStatus('Warning: CHMOD not supported.', clMaroon); - end; - DeleteFile(PChar(ExtractFilePath(ParamStr(0)) + 'gameinfo.txt')); - end - else - AddSkipped; - frmMain.ggeAll.Progress := 3; - frmMain.ggeItem.Progress := 1; - - { Create directories } - frmMain.ggeItem.Progress := 0; - frmMain.ggeItem.MaxValue := 3; - AddStatus('Creating directories...', clBlack); - if not eFound then begin - FTPMakeDir('addons'); - frmMain.IdFTP.ChangeDir('addons'); - frmMain.ggeItem.Progress := 1; - FTPMakeDir('metamod'); - frmMain.IdFTP.ChangeDir('metamod'); - frmMain.ggeItem.Progress := 2; - FTPMakeDir('bin'); - frmMain.ggeItem.Progress := 3; - AddDone; - end - else - AddSkipped; - frmMain.ggeAll.Progress := 4; - frmMain.ggeItem.Progress := 3; - { Upload metaplugins.ini } - frmMain.ggeAll.Progress := 4; - frmMain.ggeItem.MaxValue := 1; - frmMain.ggeItem.Progress := 0; - AddStatus('Uploading metaplugins.ini...', clBlack); - if CopyConfig then begin - eStr.Clear; - eStr.SaveToFile(ExtractFilePath(ParamStr(0)) + 'metaplugins.ini'); - UploadFile(ExtractFilePath(ParamStr(0)) + 'metaplugins.ini', 'metaplugins.ini'); - DeleteFile(PChar(ExtractFilePath(ParamStr(0)) + 'metaplugins.ini')); - end - else - AddSkipped; - frmMain.ggeAll.Progress := 5; - frmMain.ggeItem.Progress := 1; - { Upload server.dll / server_i486.so } - frmMain.tmrSpeed.Enabled := True; - frmMain.ggeItem.Progress := 0; - frmMain.IdFTP.ChangeDir('bin'); - if OS = osWindows then begin - AddStatus('Uploading server.dll...', clBlack); - frmMain.ggeItem.MaxValue := FSize(ExtractFilePath(ParamStr(0)) + 'server.dll'); - UploadFile(ExtractFilePath(ParamStr(0)) + 'server.dll', 'server.dll'); - end - else begin - AddStatus('Uploading server_i486.so...', clBlack); - frmMain.ggeItem.MaxValue := FSize(ExtractFilePath(ParamStr(0)) + 'server_i486.so'); - UploadFile(ExtractFilePath(ParamStr(0)) + 'server_i486.so', 'server_i486.so'); - end; - { Remove created files } - AddStatus('Removing temporary files...', clBlack); - DeleteFile(PChar(ExtractFilePath(ParamStr(0)) + 'hl2launch.exe')); - DeleteFile(PChar(ExtractFilePath(ParamStr(0)) + 'server.dll')); - DeleteFile(PChar(ExtractFilePath(ParamStr(0)) + 'server_i486.so')); - AddDone; - { End } - frmMain.IdFTP.Disconnect; - frmMain.ggeAll.Progress := frmMain.ggeAll.MaxValue; - frmMain.ggeItem.Progress := frmMain.ggeItem.MaxValue; - AddStatus('', clBlack, False); - AddStatus('Finished installation!', clBlack, False); - frmMain.tmrSpeed.Enabled := False; - eStr.Free; - - Screen.Cursor := crDefault; - frmMain.cmdNext.Enabled := True; - frmMain.cmdCancel.Hide; - frmMain.cmdNext.Show; - frmMain.tmrSpeed.Enabled := False; - frmMain.Caption := Application.Title; -end; - -end. diff --git a/metamod-source/cruft/installer/UnitPackSystem.pas b/metamod-source/cruft/installer/UnitPackSystem.pas deleted file mode 100644 index db98ca95..00000000 --- a/metamod-source/cruft/installer/UnitPackSystem.pas +++ /dev/null @@ -1,222 +0,0 @@ -unit UnitPackSystem; - -interface - -uses SysUtils, Classes, Zlib; - -procedure CompressFiles(Files: TStrings; const Filename: String); -function DecompressStream(Stream: TMemoryStream; DestDirectory: String; const Source: Boolean): Boolean; -function AttachToFile(const AFileName: string; MemoryStream: TMemoryStream; Version: String): Boolean; -function LoadFromFile(const AFileName: string; MemoryStream: TMemoryStream): Boolean; -function Unpack(const Source: Boolean): Boolean; -function GetVersion: String; - -implementation - -uses UnitfrmMain; - -procedure CompressFiles(Files : TStrings; const Filename : String); -var - infile, outfile, tmpFile : TFileStream; - compr : TCompressionStream; - i,l : Integer; - s : String; - -begin - if Files.Count > 0 then - begin - outFile := TFileStream.Create(Filename,fmCreate); - try - { the number of files } - l := Files.Count; - outfile.Write(l,SizeOf(l)); - for i := 0 to Files.Count-1 do - begin - infile := TFileStream.Create(Files[i],fmOpenRead); - try - { the original filename } - s := ExtractFilename(Files[i]); - l := Length(s); - outfile.Write(l,SizeOf(l)); - outfile.Write(s[1],l); - { the original filesize } - l := infile.Size; - outfile.Write(l,SizeOf(l)); - { compress and store the file temporary} - tmpFile := TFileStream.Create('tmp',fmCreate); - compr := TCompressionStream.Create(clMax,tmpfile); - try - compr.CopyFrom(infile,l); - finally - compr.Free; - tmpFile.Free; - end; - { append the compressed file to the destination file } - tmpFile := TFileStream.Create('tmp',fmOpenRead); - try - l := tmpFile.Size; - outfile.WriteBuffer(l, SizeOf(l)); - outfile.CopyFrom(tmpFile,0); - finally - tmpFile.Free; - end; - finally - infile.Free; - end; - end; - finally - outfile.Free; - end; - DeleteFile('tmp'); - end; -end; - -function DecompressStream(Stream : TMemoryStream; DestDirectory : String; const Source: Boolean): Boolean; -var - dest,s : String; - decompr : TDecompressionStream; - outfile : TFilestream; - i,l,lr,c : Integer; -begin - // IncludeTrailingPathDelimiter (D6/D7 only) - dest := IncludeTrailingPathDelimiter(DestDirectory); - - Result := False; - try - { number of files } - Stream.Read(c,SizeOf(c)); - for i := 1 to c do begin - { read filename } - Stream.Read(l,SizeOf(l)); - SetLength(s,l); - Stream.Read(s[1],l); - Stream.Read(l,SizeOf(l)); - Stream.Read(lr,SizeOf(lr)); - { check if this is the right file } - if (s = 'hl2launch.exe') or ((Pos('.source', s) <> 0) and (Source)) or ((Pos('.orangebox', s) <> 0) and (not Source)) then begin - { remove extension and read filesize } - if (s <> 'hl2launch.exe') then - s := ChangeFileExt(s, ''); - { decompress the files and store it } - s := dest+s; //include the path - outfile := TFileStream.Create(s,fmCreate); - decompr := TDecompressionStream.Create(Stream); - try - outfile.CopyFrom(decompr,l); - finally - outfile.Free; - decompr.Free; - end; - end - else - Stream.Position := Stream.Position + lr; - end; - finally - Result := True; - end; -end; - -function AttachToFile(const AFileName: string; MemoryStream: TMemoryStream; Version: String): Boolean; -var - aStream: TFileStream; - iSize: Integer; -begin - Result := False; - if not FileExists(AFileName) then - Exit; - - try - aStream := TFileStream.Create(AFileName, fmOpenWrite or fmShareDenyWrite); - MemoryStream.Seek(0, soFromBeginning); - // seek to end of File - // ans Ende der Datei Seeken - aStream.Seek(0, soFromEnd); - // copy data from MemoryStream - // Daten vom MemoryStream kopieren - aStream.CopyFrom(MemoryStream, 0); - // save Stream-Size - // die Streamgröße speichern - iSize := MemoryStream.Size + SizeOf(Integer); - aStream.Write(iSize, SizeOf(iSize)); - // save version number+length - iSize := aStream.Position; - aStream.Write(Version[1], Length(Version)); - aStream.Write(iSize, SizeOf(iSize)); - finally - aStream.Free; - end; - Result := True; -end; - -function LoadFromFile(const AFileName: string; MemoryStream: TMemoryStream): Boolean; -var - aStream: TMemoryStream; - iSize: Integer; - EndPos: Integer; -begin - Result := False; - if not FileExists(AFileName) then - Exit; - - try - aStream := TMemoryStream.Create; - aStream.LoadFromFile(AFileName); - // drop version part - aStream.Seek(-SizeOf(Integer), soFromEnd); - aStream.Read(EndPos, SizeOf(Integer)); - aStream.SetSize(EndPos); - // seek to position where Stream-Size is saved - // zur Position seeken wo Streamgröße gespeichert - aStream.Seek(-SizeOf(Integer), soFromEnd); - aStream.Read(iSize, SizeOf(iSize)); - if iSize > aStream.Size then - begin - aStream.Free; - Exit; - end; - // seek to position where data is saved - // zur Position seeken an der die Daten abgelegt sind - aStream.Seek(-iSize, soFromEnd); - MemoryStream.SetSize(iSize - SizeOf(Integer)); - MemoryStream.CopyFrom(aStream, iSize - SizeOf(iSize)); - MemoryStream.Seek(0, soFromBeginning); - finally - aStream.Free; - end; - Result := True; -end; - -{ Unpack function } - -function Unpack(const Source: Boolean): Boolean; -var eStream: TMemoryStream; -begin - eStream := TMemoryStream.Create; - try - // Get ZIP - LoadFromFile(ParamStr(0), eStream); - DecompressStream(eStream, ExtractFilePath(ParamStr(0)), Source); // Unpack files - - Result := True; - except - Result := False; - end; - eStream.Free; -end; - -function GetVersion: String; -var FileStream: TFileStream; - EndPos, Size: Integer; - Version: String; -begin - FileStream := TFileStream.Create(ParamStr(0), fmOpenRead or fmShareDenyWrite); - FileStream.Seek(-SizeOf(Integer), soFromEnd); - FileStream.Read(EndPos, SizeOf(EndPos)); - FileStream.Position := EndPos; - Size := FileStream.Size - EndPos - SizeOf(Integer); - SetString(Result, nil, Size); - FileStream.Read(Pointer(Result)^, Size); // YAMS - FileStream.Free; -end; - -end. diff --git a/metamod-source/cruft/installer/UnitSelectModPath.dfm b/metamod-source/cruft/installer/UnitSelectModPath.dfm deleted file mode 100644 index 436262ce6c27b2c60427026c017b384104e95075..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1148 zcmc&z%Z}496m^nL9!;kdA+bP08a6D^u!U8dHnf@!i5d^H1UI>D!nk(jxb5_B=115e zu|fO;OFm%44se{#qe!gT<@(z9JnqTwCc@$5G#QKs0X~iTaTgEKafdVz!f|-~5YNOS z0Sc)+lv?p0eQfP&o$rnLRLw`| zvoU@j47-zLfSYw!ziFlPykHsMV7QdNZqz8|wWq7MWC6B~NzNCfeyCads2$NP5I`hE zl@`~Hd0ABSo%WI^sQ_Ss;tb+2E-rzVF^CaMbMr&9g4%%`A{)nq0ri%Q_Mt51Oj~6( zDyPiGK`rqb**op8jb;zlK%#0LL#K4aX1pF~?+v`V z8E78fy8bMtK$PpH-sI7iuf)-UXLnn8g-{zOIZ%p~x_1R^T2ie0H%q#Y^LR)6#|@74 z)bOL}N3~A8T|()5T!x$~-%8Y&a4v06%#{8M$(QZ35;V$aLFQ0;es?AL1ZD!t+_gt6 zQ?8ni{Fn&!p*Qb#CRH$0DAJ2Mhn}0{d{Yf}?>mE#k3&jiZzUyX2k9b2!G`Oa|jNgb}n*Ds$?OQVH6U6qhEzJ33RJblvV8>UNNmvy)uU&k@YiAq;nH-?Jk zxMI53s~^?(_8PaFv7SdKdwTCQnZEkv2%SK=qS7?>1$s(gKv)X2-c9%~jsHuSU9-EB LW9-RMSw?>V>;-uw diff --git a/metamod-source/cruft/installer/UnitSelectModPath.pas b/metamod-source/cruft/installer/UnitSelectModPath.pas deleted file mode 100644 index 368d478e..00000000 --- a/metamod-source/cruft/installer/UnitSelectModPath.pas +++ /dev/null @@ -1,26 +0,0 @@ -unit UnitSelectModPath; - -interface - -uses - SysUtils, Windows, Messages, Classes, Graphics, Controls, - StdCtrls, ExtCtrls, Forms, FileCtrl, ComCtrls, ShellCtrls, - TFlatComboBoxUnit, TFlatButtonUnit; - -type - TfrmSelectModPath = class(TForm) - pnlDesign: TPanel; - lblInfo: TLabel; - trvDirectory: TShellTreeView; - cmdOK: TFlatButton; - cmdCancel: TFlatButton; - end; - -var - frmSelectModPath: TfrmSelectModPath; - -implementation - -{$R *.DFM} - -end. diff --git a/metamod-source/cruft/installer/UnitfrmMain.dfm b/metamod-source/cruft/installer/UnitfrmMain.dfm deleted file mode 100644 index 14b183cb..00000000 --- a/metamod-source/cruft/installer/UnitfrmMain.dfm +++ /dev/null @@ -1,11577 +0,0 @@ -object frmMain: TfrmMain - Left = 333 - Top = 271 - BorderIcons = [biSystemMenu, biMinimize] - BorderStyle = bsSingle - Caption = 'Metamod:Source Installer' - ClientHeight = 355 - ClientWidth = 527 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - Icon.Data = { - 000001000C003030000001000800A80E0000C60000002020000001000800A808 - 00006E0F00001818000001000800C80600001618000010100000010008006805 - 0000DE1E0000808000000100200028080100462400006060000001002000A894 - 00006E2C010048480000010020008854000016C1010040400000010020002842 - 00009E1502003030000001002000A8250000C65702002020000001002000A810 - 00006E7D0200181800000100200088090000168E020010100000010020006804 - 00009E9702002800000030000000600000000100080000000000000900000000 - 0000000000000001000000010000000000003535360031393E003B3B3B00403E - 3E001D3642001E3C4C002A3B4400323B4100264150002C465400274C5F003E52 - 5D00214C62003A5A6B00205A7700205D7C00365E73002B627F00454343004846 - 46004647490048474800464A4D004A4848004C4A4A004D4D4D00504E4E004F4F - 50004F5050004351590053535300585656005457590055585800595858005C5B - 5B00595D5D005E5D5D00605F5F00595F600045616F005C6364005E696B004364 - 7500496A7B00596B72005B737B00636363006463630060656500666464006167 - 6B00636B6C006C6B6B00706E6E00606C70006370720068747600627479006979 - 7C007170700074737300767575007877770070777900797979007C7B7B007D7C - 7C0019668E0015699300336680002D6F91002C72970029729800337699003D7D - 9D001674A400327CA200476E820042728A005A79850051778B00567D8D005B7E - 8B00637D8500697D8200717C82001380B7002182B3002A82B000398CB7003E95 - BD005F8493006D8287006681890071808500788284007C888E00638C9B00688E - 9A0069919E0079959F00438CAE00488DAB00548CA300588FA600518FA9004B90 - AE005B91A6005594AF005993AA00408EB2004C93B2004C97B9004699BE004D99 - BA005496B100559AB7005E99B000539EBD00599DB800648FA6006397AA007098 - A8006A9CB300729EB50075A6BC007EA9BA001287C3001A8BC500118CCA00188E - CA000D95DB000D98DF001495D6001995D3001E98D5001195D800159ADD001C9B - DB00298EC2002596CD002A95CA003395C3003895C0003D9AC500329ACB00399B - CB002196D000239AD6002B9BD200239BD900319DD00024A0DF002CA1DC0032A0 - D70030A2DD000D9BE3000D9EE800119CE2001A9DE0000DA2EE001EA2E50013A4 - ED0019A5ED001DA8EF001AA7F0001CA8F00022A2E4002BA6E50021A7EB0028A7 - E80023A9ED002BABED0031A6E10034A9E50039ABE50033ACEA0039AEEA0037B0 - EE003CB2EE0024ABF0002BAEF00031AFF00033B1F1003CB4F100429AC3004C9E - C200529FC70070BADD0040B0E9004CB6EC0041B6F10047B8F2004CBAF30053BD - F3005BBEF10062BEED005BC0F40068C1EE007AC0E4007ACAEF0067C4F50069C5 - F50074C7F20078C7F00077CBF60078CBF5008281810086868600888787008B8A - 8A0086979D0090909100979B9F0099989800959DA2008FA0A60093A4AC0080AB - BE009AAEB500A5A4A400A3ADAD00AEBABA0084AFC60093B5C7009EB7C2009DBB - CA00A7BBC500AABCC30093C1D50099C2D700B1C3CA00A6C9DA00B1CAD40084CD - F1008ACFF20087D1F7008AD0F30094D5F6009ED7F5009ED8F60095D6F800A7D2 - E600B4DBED00A3DAF600ABDDF700A4DCF800AFE0F800BFE5F600B2E1F900BBE4 - F900CBE6F300CCE8F500C0E6FA00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - D13F3F3F42D10000000000000000000000000000000000000000000000000000 - 00000000000000000000000042231814141413141418181B3100000000000000 - 0000000000000000000000000000000000000000000000000000311814141414 - 141414141414141414141F420000000000000000000000000000000000000000 - 00000000000000003F14141414181F2A2F5154542F2B2218181414141F000000 - 00000000000000000000000000000000000000000000001F1314141F3969BB9C - 9CB0AFAFAF9D9471511F181414143F0000000000000000000000000000000000 - 000000000000181814183B729DAFB2B5B5B5B5C1B5B5B3B09D94531F18141331 - 000000000000000000000000000000000000000000181814236F9BAFAEB4B5B5 - B5B5B5B5B5B5B5B5B4B2AF912B18161323000000000000000000000000000000 - 000000001818182BBB9AAAAEB4B9B9B9B9B9B9B9B5B9BAB9B5B9B2AF96511818 - 183100000000000000000000000000000000002018182B929AACB7B7B7B7B7B7 - B8B8B8B8B7B9B7B9B9B8B7B7AF9A531818183F00000000000000000000000000 - 00003F14142ABBA1ABB6B6B6B6B6B6B6B6B6B7B7B7B7B7AFAFB7B7B7B69A962F - 18161800000000000000000000000000000018141F6E8BA3A84A2C2D2D8FB6B6 - B6B6A8A8B6B6B650214F5BACB6ACA38F2A161423000000000000000000000000 - 00311814558CA0A7A38804181F29A3A8A7A8A8A8B6A7A11F1F201F21508DA3A3 - 671818180000000000000000000000000014142292A0A4A7A2A710131B185AA7 - A7A7A7A7A2A74B1F1B1B1B1B1812A8A4872F1814230000000000000000000000 - 4218145F8A9FA4A2A7A28B0218180CA4A2A2A2A2A7A20C19160301130484A7A4 - A07018181800000000000000000000001F141F7286A2A2A2A2A2A24504181449 - A2A4A2A2A25916191410460506A4A2A486882A18183F00000000000000000000 - 14142A9B86A2A2A2A2A2A286071314178AA2A2A2A21116140383A2A285A2A2A2 - A28553181418000000000000000000001414568A9FA2A2A2A2A2A2A24D041314 - 47A2A2A28B1616140BA2A2A2A2A2A2A2A28670181818D10000000000000000D1 - 18186385A2A2A2A2A2A2A2A2A20913141684A7A24A1614044DA2A2A2A2A2A2A2 - A286901F14182300000000000000003F14186E86A2A2A2A2A2A2A2A2A2580114 - 160EA2A20C14140886A2A2A2A2A2A2A2A29F8F2216141800000000000000003F - 13187586A2A2A2A2A2A2A2A2A2A20D131414598413141310A2A2A2A2A2A2A2A2 - A29F952318141431000000000000003718187586A2A2A2A2A2A2A2A2A2A28401 - 13181E4814140481A2A2A2A2A2A2A2A2A29F952816141418000000000000003F - 13187785A2A2A2A2A2A2A2A2A2A2A21013181F181B180AA2A2A2A2A2A2A2A2A2 - A29F8F22141414143F000000000000D418186385A2A2A2A2A2A2A2A2A7A8B79A - 1723232723204EB6A8A2A2A2A2A2A2A2A286911F141414141B00000000000000 - 1418568786A2A2A2A2A2A7B7B8B9B9B94C2731313122B0B9B9B8A8A2A2A2A2A2 - A28667181614141414D300000000000014182A999FA2A2A2A2A7B8BABAC1C1C1 - B52B37373752C1B5C1B5BAB6A2A2A2A2A2855416141414141423000000000000 - 1F141D7586A2A2A2A2C1C3C3C3C3C3C3C37A403F37BDC3C3C3C4C3C3A8A2A2A2 - 9F952A14141414141414000000000000D118185E8B86A2A2B8C7C7C7C7C7C7C7 - C762D1D157C5C7C7C7C7C7C7C3A2A2A2866C1818141414141414330000000000 - 00141422BC86A2A2C1CCCCCCCCCCCCCCBED4D4D47ECCCCCCCCCCCCCCCCA7A286 - 893B141818181B18181418000000000000401414568986A2C7CFCFCFCFE1DBD9 - D9D8D8D6C9CFCFCFCFCFCFCFCFA7A2866B181D7D7F7F7F7F5616184000000000 - 000018141F7B869FC1EEEEEEEEE2DEDEDEDEDEDBEEEEEEEEEEEEEEEECFA28690 - 2A1618BEEE807C7C3B16141F000000000000DF1314237886A3EEF3F3F3E4DEDE - DEDEDEE8F3F3F3F3F3F3F3F3C286963B1318182ECA7F23141414141400000000 - 00000037131832BC86B4F8F8F8EAE6E6E6E6E5F6F8F8F8F8F8F8F8CDA0965518 - 181618185DEE661B1414141433000000000000001F16182A798AB0F2FBFBFBFB - FBFBFBFBFBFBFBFBFBF9CC8B8F3B181414141414187DED60181414141F000000 - 000000000018181822659B8BC6F9FFFFFFFFFFFFFFFFFFFCECB0877135181814 - 14141414181FE7F4311814141B0000000000000000001F141418397B9B8AB0CC - EDF2F6F6F3CAC08C8973551F141414141414181F1F1735FBD518141420000000 - 0000000000000034141814183564789389878B87879B736D3C1D181414141414 - 14141DF5DD182AFADA181414420000000000000000000000E018181814181C23 - 3A3C56563A2A1F181818131414141414141418E3FEDDEBFE4114141B00000000 - 00000000000000000000D1181814181818181414141414181418181414141414 - 1416181FDBE9E661181814000000000000000000000000000000000000371814 - 1414141414141414141414141414141414141418181818181823000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFF - FFFFFFFF0000FFFFFFFFFFFF0000FFFFC0FFFFFF0000FFFC001FFFFF0000FFF0 - 0003FFFF0000FFC00001FFFF0000FF8000007FFF0000FF0000003FFF0000FE00 - 00001FFF0000FC0000000FFF0000F800000007FF0000F000000007FF0000F000 - 000003FF0000E000000003FF0000E000000001FF0000C000000001FF0000C000 - 000000FF0000C000000000FF0000C0000000007F000080000000007F00008000 - 0000007F000080000000003F000080000000003F000080000000001F00008000 - 0000001F0000C0000000000F0000C0000000000F0000C0000000000F0000C000 - 000000070000E000000000070000E000000000030000F000000000030000F000 - 000000030000F800000000010000FC00000000010000FE00000000010000FF00 - 000000010000FF80000000010000FFC0000000030000FFF0000000070000FFFE - 0000000F0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFF - FFFFFFFF0000FFFFFFFFFFFF0000280000002000000040000000010008000000 - 00000004000000000000000000000001000000010000000000003E3D3D003042 - 4C0034444D003D464B002A495A00384B55002C51650024536C003C5968003B5B - 6D0034637B004240400045434300474545004846460046484900454B4F004A48 - 48004C4A4A004C4B4C004D4D4D00504E4E004D4E50004F50500041515B004555 - 5E005050500054525200535455005654540055595900555B5D00565C5E005A59 - 59005D5B5B00595C5D005F5E5E00605F5F00505B6000565F6100585F62005C61 - 61005A6064005261680056676D005C65690057696F005B686B005C6A6E004068 - 7D004E6A790052687100586B71005C6D7100596F7700526D780051717E006261 - 610064636300666464006B6A6A006C6B6B006E6D6D006C75780069767C007170 - 70007473730075747400787777007E7E7E00176288001F678D001D6E98001670 - 9E003B6E890029769E00397D9F001874A3001678AA00247AA700357DA2003C7F - A1004D758700497588005B7B8600507B8E00457A9500647E8900757F82001385 - BF001F88BE002981AE003E82A2003989AF003D88AE002183B500358CB6003C8D - B3003A95BF004D839A004D849C005F82910056879B0051879E005A879E006788 - 9700688997004083A1004583A0004C87A0004D88A3004888A5004488A800468C - AC00498DAB00508EA9004892B5004093B9007699A60071A1B6001E91CB001192 - D4001297DB001698D900199ADA001A9BDD001E9EDE002491C8002999CF002E99 - CE003D97C1003798C6003A98C4003399C900369AC900379BCC003A9AC8002498 - D400239CD700269CD6002E9DD2002B9DD500239EDD0026A1DF0033A2DA000D9A - E2000D9BE4000D9DE6000D9EE900129AE000179DE200149FE600189EE1000EA2 - EE001FA2E50014A1E90010A2EE0012A4EF0015A5EE001CA4EA0019A6EE0019A7 - F0001BA8F00027A6E60029A3E1002BA4E2002BA8E70025A8EB0026ABEF002EAE - EF0033A6E00031A8E40034ABE7003CACE60037AEEB0032AFEF0035AFED003AAF - EA0039B0ED003DB3EE0022AAF00024ABF00027ACF0002AADF0002DAEF10030B0 - F10035B1F10038B2F1003DB4F000439AC300429FCB0040A2D10040A3D40069AD - D00062B0D8007EBAD5004DB0E30049B1E60045B8F20049B9F3004FBAF10058BF - F30059BFF4005EC1F4006DC2ED007DCAEE0074CAF5007FCAF0007CCDF5008281 - 810085848400879396008B94940088969E0096959500989797008F9FA80087AB - BA0088ABBE0099ACB4009EAFB6009BB0BC00A5A4A400A6B3BA00A6B4BA0080B3 - CD0091B9CD00A4BFCC00ADCBD800B1CCD800B9CFD80081CCF2008AD1F60097D4 - F4009FD9F800A3CDE100A1D6F100A1D9F500ADDEF700A0DAF800B5E2F9000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 3F1E161616162244000000000000000000000000000000000000000000001E12 - 12161216160F121212220000000000000000000000000000000000003A12161F - 5675BFC1C1BE7038161612440000000000000000000000000000001E121E7091 - ADB1B4B4B4B4B2AD8439160F3A000000000000000000000000001E123488A7B1 - BBBBBBBBBBBCBBBCB1A57116163A00000000000000000000003A162D8EA8B7B7 - B7B7B7B7BBB9B9BBB7B1A461160F4600000000000000000000121F82A0804D52 - A5B6B6B6B6B6A5395FA5A89B6D16120000000000000000001E1672989F990416 - 4BA2A2A2A2A3511E1B1E327F7E34123F0000000000000000122E7C9F9D9F490F - 16799F9F9F9F1A16010F069F9F61121600000000000000440F70939D9D9D9502 - 0F0A9D9D9D5B120F4A474A9F957B280FD20000000000001E1684959D9D9D9D4F - 0C0F609D9D0B0F039D9D9D9D9D93540F1E000000000000121E8B9D9D9D9D9A9D - 050F199593100F489D9D9D9D9D935D120F0000000000000F2A7C9D9D9A9A9A9D - 5A010F4C5012017A9D9D9A9A9A9A5E0F122200000000000F2A7C9D9D9D9A9A9A - 9A080F11090F079D9D9A9A9A9A955E0F161600000000000F1F8B9D9D9A9A9A9D - 9F8B161F221E5C9F9D9A9A9A9A945D0F0F0F3F000000001E1684959D9A9AA3BB - BBBB573A3D29B1BBB99D9A9A9A94540F0F0F1600000000441268939D9AA3C8C8 - C8C8C5444469C8C8C8C89D9D9A7A28100F0F12D200000000122A7E9A9DCACCCC - CCCCC2D2D2C3CCCCCCCCBD9A9561160F12120F1E00000000221674939FCFCFCF - E2DBD9D7D6CFCFCFCFCFCA9D7B2D276A6A6A2A1000000000000F1F8893D1E9E9 - DEDFDFDFE3E9E9E9E9E9C89264102CCE77581F0F3A00000000D50F318EB4EEF0 - E4E1E1E1EDF0F0F0F0E99871150F1066C41E11121200000000002E102A84AEEE - F1F1F1F1F1F1F1F1E88F6E150F0F0F0F78DA160F120000000000002E161D688E - C5D0EEEFEFEACDAB633716120F0F16151DEC40121200000000000000D40F121F - 5574638884766537160F0F0F0F0F41E61FE55912160000000000000000003A0F - 0F0F1616160F12121212120F0F0F16DCE7DC1B12000000000000000000000000 - D83F1E0F0F1212120F120F0F0F0F0F0F16163D00000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF - FFFFFFC03FFFFF000FFFFC0003FFF80001FFF00000FFE000007FE000007FC000 - 003FC000003F8000001F8000001F8000001F8000000F8000000F800000078000 - 000780000003C0000003C0000003E0000001E0000001F0000001F8000001FC00 - 0001FF000003FFC00007FFFFFFFFFFFFFFFFFFFFFFFF28000000180000003000 - 0000010008000000000040020000000000000000000000010000000100000000 - 00003E41430039424800384851002C5B73002B5C7600345E7300464444004846 - 460045494C004A4848004C4A4A004E4D4D00454B50004D51530041525C004656 - 5F004F595D005151510054535300535455005554540058565600525859005559 - 5A00525B5E00545A5C00525C5F005B5A5A005C5B5B00595E5F005E5D5D00605F - 5F0043576200455862004F5F6800535B6000525D6100585F62004D616A005061 - 67005461670059606300596264005262690056676D00516872004F707E006065 - 670061676A006A6969006E6D6D00706F6F006972760064747D00727171007473 - 73001D6F9A002164860033658000226A900029779F003E7894001478AC00436B - 8100466F82004A7183004C74850048758A004D7A8E005D7C8B0042779300497A - 90004F7F9400467F9900497F9800607C8B001682B9003882A8002686B800348B - B500398EB5003D8EB400318CB9006E8089004583A0004A87A2004789A800428B - AD00438EB0004590B5005499BC00729FB20075A3BB001386C1001D8AC1001192 - D4001694D5001E95D1001799DB00129ADF001D9AD9001F9FDF002D95CA003296 - C6002FA0DA0037A1D6003CA1D30031A2DB0039A6DC000F9AE0000D9CE6000D9E - E900109AE0000DA0EB000DA2EE0018A1E70010A0E90011A3EE0011A4EF0014A4 - EE001CA8EF001EA9F00022A1E10027A5E5002DA7E50023A7EA002EABEB002EAC - EC0036AAE50035AFEE0039ADE80022AAF00026ACF00029ADF0002CAEF00036B2 - F10038B3F1003FB5F20042A0CC0049A9D7006AA7C70076B2CD007AB1C80046AE - E30054B3E30056B5E5005BB8E70045B7F10046B8F2004DBAF30062C2F40066C4 - F4007FCEF60081818100868686008A8989009897970099989800989C9E009E9D - 9E009CA0A3008BA5B000A2AEAE00A7B1B600B2B1B1008DB9CC00A9BDC500A2BF - CD0085C0DE009FCDE50080CBF20086CEF20091D4F6009CD7F6009CD8F800B8E3 - F900B9E4FA000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000331F1F1F370000000000 - 00000000000000000000009C0C08122528190C08120000000000000000000000 - 0000200C2E5A6D8183816B55190833000000000000000000001F0C557D828889 - 898989826C420C320000000000000000370C5284858686868686827F867C4408 - 9B000000000000000C4B74621040797A85794E25476766270C00000000000033 - 19657676050C4F767676220A080676500A9B00000000000C4470737360011070 - 765F08053F5E7671190C00000000000851737373733A083D733B084D73737370 - 400C00000000000C68737373736E020D60090373737373733E081F0000000008 - 6873737373733908220C3C73737373703E080800000000085173737376867F23 - 201F69847673736E410A08340000000C456E737A9595955B374C949589767371 - 2508080C00000037196673969797975D9B8D9797978873500C080C089B000000 - 08496E9799A9A1A0A0ABAB99999463284C8F5C2512000000A30C5983AFAAA4A4 - A8AFAFAFAD7B420C0E8E26080800000000360C5690AEB1B1B1B1B1996B2F0808 - 0828A612089C00000000540C28598C9293928B4B190808083530A23508000000 - 0000000016080C262B190C080808080831A7A71220000000000000000000A5A0 - 9D9D9D9D9D9D9D9D9DA0A0A50000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FFFFFF00FF07FF00F801FF00F0007F00E0003F00C0001F00C0001F008000 - 0F0080000F0080000F008000070080000700800003008000030080000100C000 - 0100C0000100E0000000F0000100FC000100FF000300FFFFFF00FFFFFF002800 - 0000100000002000000001000800000000000001000000000000000000000001 - 000000010000000000003D525D00315467002E5F79004345470048464600434A - 4E004A4949004D4D4E00514F4F004F5050004D5357004A585E004C585E005152 - 52005253540053545500555758005E5D5D00475C67004A5A6200525D62004F60 - 67004B606B0058686F00436677004D6671004A6774004B68760042667800466C - 7E00496A7900486D7D0069686800647077007171710031698600306B8A003B7C - 9B003C7C9A00187FB4002F7CA3002B7DA700437085004372880047758B004777 - 8E005E7D8C001E87BC002D8AB8002D8CBB005B8094006B899600718793007A9A - A80078A4BB001386C2001C8CC6001196DA003B97C5003295C800359BCF002199 - D500249EDC002E9FD8002AA0DB0037A0D40031A2DC000F9DE600139BE0000DA0 - EA000EA2EE0014A3EB0015A5EF0027AAEC003CADE60036AFEC0027ACF00029AD - F0002CAEF00035B1F1003AB3F0003DB5F1004E9BC10058AAD20071B8DD0040B5 - F10069C5F500818080008B8A8A008D8D8D00808E95008599A40097A9B100A6AC - AF00A9AEAF00AEB5B500A3B2BA00B4B4B40097CFEB0083CBF0008DD0F20090D4 - F70095D6F70095D6F800ABDEF800AFDFF8000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000058580000 - 000000000000000000580A1B2E2E17085900000000000000211C424C51514C3B - 14230000000000591F3F3C4A4D4E3D43410C00000000000F3E48012948491708 - 293209000000001E46462806453904383A440C00000062264647470225240346 - 47461D1200006226464747390A0B304747461D050000001F4649525233225650 - 47460B08210000113E5257555C3757574F3215180F0000601F4B68615E636868 - 410C2F3408590000351B54656A6A64530C0508360F230000005F0F1B2E2B1408 - 05055B5D11000000000000000000000000000000000000000000000000000000 - 000000000000FFFF0000FCFF0000E01F0000C00F0000800F0000800700008007 - 00000003000000030000800100008001000080000000C0000000E0010000FFFF - 0000FFFF00002800000080000000000100000100200000000000000801000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000007F7F - 7F017F7F7F017F7F7F017F7F7F017F7F7F017F7F7F017F7F7F017F7F7F017F7F - 7F01000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000100000002000000040000000500000007000000080000000A0000 - 000C0000000D0000000D0000000E0000000E0000000E0000000D0000000D0000 - 000C0000000A0000000800000007000000050000000300000002000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000100000003000000050000 - 00090000000C0000001000000014000000180000001C0000001F000000230000 - 0025000000270000002800000028000000280000002800000028000000270000 - 0025000000220000001F0000001C00000017000000130000000F0000000B0000 - 0007000000040000000200000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000100000003000000070000000C00000012000000180000 - 001F000000250000002C00000032000000370000003B0000003E000000410000 - 0043000000450000004500000046000000460000004600000045000000450000 - 0043000000410000003E0000003B00000036000000310000002B000000240000 - 001D00000016000000100000000A000000060000000300000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0003000000070000000C000000130000001B000000250000002E000000360000 - 003D00000043000000480000004B0000004E0000005100000052000000540000 - 0055000000550000005500000056000000560000005600000055000000550000 - 00540000005400000052000000500000004E0000004B00000047000000420000 - 003B000000340000002B0000002200000019000000110000000A000000050000 - 0001000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000001211110100000004000000090000 - 00100000001A00000025000000300000003A00000042000000490000004E0000 - 005203030357161616761F1E1E91242323A9343333BE3D3C3CD0403E3ED84543 - 43EA454343EA454343EA454343EA454343EA454343EA454343EA403E3ED83C3A - 3ACD323131BB232222A71E1D1D8C141414720000005700000056000000540000 - 00510000004C0000004700000040000000370000002C00000020000000160000 - 000E000000070000000300000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000012111101000000040000000A000000130000001F0000 - 002B00000037000000410000004A000000500908085E1F1E1E902D2C2CB54240 - 40E0484646FC494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF474545F73F3D3DD5292828AC1A1A - 1A820505055D00000056000000530000004E000000470000003E000000330000 - 00260000001A0000001000000008000000030000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000012111101000000040000000A00000014000000210000002F0000003B0000 - 00460000004E0F0F0F69262525A5403E3ED7494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF474545F7393737C8201F1F940707076000000055000000510000004B0000 - 0043000000370000002A0000001B000000100000000700000002000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00030000000800000012000000200000002F0000003D0000004805050555201F - 1F94403E3ED7494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF474545F7343232C01817177D000000570000 - 00540000004E0000004400000038000000290000001A0000000E000000061211 - 1101000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000012111101000000050000 - 000F0000001C0000002C0000003B000000480B0B0B612E2D2DB2474545F44947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF413F3FE02221 - 21970302025A000000540000004E000000440000003600000026000000160000 - 000B000000031211110100000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000300000009000000160000 - 002600000037000000460D0D0D65353333BF484646FA494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF454444EF262525A10505055C000000540000004C00000041000000310000 - 001F000000100000000712111101000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000002F3F3F01000000050000000E0000001D0000002F0000 - 0040090909572F2E2EB3484646FA494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF4A4848FF4A48 - 48FF4A4949FF4A4949FF4A4949FF4A4949FF4A4848FF4A4848FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF444242E7212020940000005700000052000000490000 - 003A00000028000000170000000A000000030000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000002F3F3F0100000007000000130000002400000037000000472524 - 2497474545F4494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF4A4949FF4C4B4BFF4F4F4FFF515353FF555757FF585C5CFF5B6060FF5D63 - 63FF5F6565FF606767FF606767FF5F6565FF5E6363FF5C6060FF585C5CFF5558 - 58FF525353FF4F4F4FFF4C4C4CFF4B4949FF494848FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF3F3D3DDB12121277000000550000 - 004E00000042000000300000001D0000000E000000052F3F3F01000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000020000000A000000170000002A0000003E111111673F3D3DD94947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF4A4949FF4D4C4CFF515252FF585B - 5BFF5F6565FF677070FF707B7BFF778787FF7D9293FF7D999EFF7B9EA7FF76A1 - ADFF72A2B1FF70A2B3FF70A2B3FF70A1B2FF73A0AEFF779EA9FF7B9AA0FF7B92 - 95FF78898AFF717E7EFF697272FF616767FF595C5CFF525353FF4D4D4DFF4B49 - 49FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF484646FC2F2E2EB30505 - 055C0000005200000048000000370000002300000011000000062F3F3F010000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00030000000C0000001B0000002F000000422928289B484646F9494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF4A4848FF4D4D4DFF535555FF5C6060FF687070FF768484FF7F97 - 9AFF74A1AEFF5DA1BCFF479FC6FF379DCDFF2899D1FF1F97D2FF1E96D4FF2098 - D5FF229AD6FF249BD7FF259BD7FF229AD6FF2199D6FF1E96D4FF1D96D3FF2197 - D1FF2D9ACFFF3C9CC8FF4F9DBEFF669EB2FF78989FFF778788FF6A7474FF5D63 - 63FF545656FF4E4E4EFF4A4949FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4341 - 41E512121277000000550000004B0000003C0000002800000014000000073F3F - 3F01000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000030000 - 000D0000001E000000330B0A0A543B3939CD494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4B4A - 4AFF505151FF595D5DFF677070FF798889FF7E9EA5FF65A4BCFF409FCAFF2498 - D1FF1E97D5FF269CD8FF2CA0DBFF2EA2DDFF30A3DEFF31A4DFFF32A5E0FF33A6 - E1FF33A6E1FF34A6E1FF34A6E1FF34A6E1FF33A6E1FF33A5E0FF32A5E0FF31A4 - DFFF30A2DDFF2DA1DCFF279DD9FF1F98D6FF1B94D2FF2C99CDFF4E9DBFFF709D - ABFF798C8EFF6A7474FF5C6060FF515252FF4C4B4BFF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF484646FC2726269F000000560000004E000000400000002B000000170000 - 0008000000020000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000030000000D0000 - 001F0000003513121269444242E9494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF4C4B4BFF525353FF5E63 - 63FF707C7CFF80999CFF6BA5BAFF3A9ECCFF2097D3FF239AD7FF2BA0DBFF2EA2 - DDFF30A4DFFF32A6E1FF34A7E2FF35A9E4FF37AAE5FF37ABE6FF38ACE6FF39AC - E7FF39ADE8FF3AADE8FF3AADE8FF3AADE8FF3AACE7FF39ACE7FF38ACE6FF38AB - E6FF37AAE5FF35A9E3FF33A7E2FF32A5E0FF30A4DFFF2DA1DCFF269CD8FF1B95 - D4FF2697CFFF4D9DBFFF7599A3FF738181FF606767FF535555FF4C4C4CFF4948 - 48FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF363434C30707075E00000050000000420000002D0000 - 0018000000090000000200000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000030000000D0000001F0000 - 0036201F1F80474545F7494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF4B4A4AFF515252FF5F6464FF738080FF80A0 - A6FF57A4C3FF2899D1FF2198D6FF2A9FDBFF2DA2DEFF30A5E0FF32A7E3FF34A9 - E5FF36ABE7FF37ACE8FF39AEE9FF3AAEEAFF3BAFEBFF3CB1ECFF3DB1ECFF3DB1 - ECFF3DB1EDFF3EB2EDFF3EB2EDFF3EB2EDFF3EB1ECFF3EB1ECFF3DB1ECFF3DB0 - ECFF3CB0EBFF3BAEEAFF3AAEE9FF38ACE8FF37ABE6FF34A8E4FF32A6E1FF30A4 - DFFF2CA1DCFF239BD8FF1994D2FF389AC8FF6C9DADFF758587FF616868FF5355 - 55FF4C4B4BFF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF3F3D3DDD0B0B0B6700000051000000440000 - 002F000000190000000903223202000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000030000000C0000001F000000362928 - 2894484646FC494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF4A4848FF4F4F4FFF5B6060FF717C7CFF82A0A5FF51A3C5FF2398 - D2FF249BD8FF2AA0DCFF2DA3E0FF30A6E3FF32A8E5FF35ABE7FF36ACE9FF38AE - EAFF39B0EBFF3BB0ECFF3CB1EDFF3DB2EEFF3DB3EEFF3EB3EFFF3EB3EFFF3FB4 - F0FF3FB4F0FF3FB4F0FF40B4F0FF40B4F0FF40B4F0FF40B4EFFF3FB4EFFF3FB3 - EFFF3EB2EEFF3EB2EEFF3DB2EDFF3CB1ECFF3BB0EBFF39AEEAFF37ADE9FF35AA - E6FF33A8E4FF30A5E1FF2DA2DEFF279DDAFF1A95D3FF3099CAFF6A9CAEFF7483 - 83FF5E6464FF505151FF4A4949FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF444242EA0F0E0E71000000520000 - 00440000002F00000018000000082F3F3F010000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000020000000B0000001D000000352A2929974947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF4C4B4BFF555858FF687171FF81989AFF5EA6C2FF2498D1FF249BD8FF29A0 - DCFF2CA4E0FF2FA6E3FF31A9E6FF34ABE9FF36AEEAFF38AFECFF39B0EDFF3AB1 - EEFF3BB2EFFF3CB3EFFF3DB3F0FF3DB4F0FF3DB4F1FF3EB5F1FF3EB5F1FF3EB5 - F1FF3EB5F1FF3FB5F1FF3FB5F2FF3FB5F1FF3FB5F2FF3FB5F2FF3FB5F1FF3FB5 - F1FF3FB5F1FF3FB4F0FF3EB4F0FF3EB3EFFF3DB3EFFF3CB2EDFF3BB1ECFF39AF - EBFF37ADEAFF35ABE8FF32A9E5FF2FA6E2FF2CA2DFFF269DDAFF1894D3FF3699 - C7FF7399A4FF6C7777FF585B5BFF4D4C4CFF494848FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF454444EF121111740000 - 0052000000430000002D00000017000000072F3F3F0100000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000002F3F3F01000000090000001A000000322B292996494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF4A4848FF4F4F - 4FFF5D6262FF778686FF79A8B5FF319CCEFF2098D6FF279EDBFF2AA2DFFF2DA6 - E3FF30A9E7FF32ABEAFF35ADEBFF37AFEDFF38B0EEFF39B1EFFF39B2F0FF39B3 - F0FF3AB3F0FF3BB4F1FF3BB4F1FF3CB5F2FF3CB5F2FF3CB5F2FF3CB5F2FF3CB5 - F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF3EB5 - F2FF3EB5F2FF3EB5F1FF3EB5F1FF3DB4F1FF3DB4F1FF3DB3F0FF3CB3EFFF3BB2 - EFFF3AB1EDFF39AFECFF37AEEAFF34ABE8FF31A8E5FF2DA5E2FF2AA1DEFF239B - D9FF1893D1FF519DBDFF768C8FFF616767FF515252FF4A4949FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF474545F71413 - 137C00000051000000420000002B00000014000000062F3F3F01000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00002F3F3F0100000007000000160000002F2B2A2A94494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF4B4949FF535454FF666E - 6EFF829A9CFF55A5C6FF1F96D3FF249CDAFF27A0DEFF2AA4E3FF2DA8E6FF30AA - E9FF32ADEBFF34AEEDFF36B0EEFF37B1EFFF38B2F0FF38B2F0FF39B2F1FF39B3 - F1FF39B3F2FF39B4F2FF39B4F2FF39B4F2FF39B4F2FF3AB4F2FF3AB4F2FF3AB4 - F2FF3AB4F2FF3BB4F2FF3BB4F2FF3BB4F2FF3BB4F2FF3BB4F2FF3BB4F2FF3BB4 - F2FF3CB4F2FF3CB5F2FF3CB5F2FF3CB5F2FF3CB5F2FF3CB4F1FF3BB4F1FF3BB4 - F0FF3AB3F0FF39B2EFFF39B1EEFF38AFECFF35ADEBFF32AAE8FF2FA7E4FF2BA3 - E0FF289FDCFF1C97D6FF2B98CBFF6F99A7FF6A7575FF555757FF4C4B4BFF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4544 - 44EF0F0E0E71000000500000003F000000270000001100000004000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000500000012000000292322227E494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF4C4B4BFF565858FF6E7979FF81A5 - ADFF369DCEFF1E97D6FF249EDCFF28A2E1FF2AA5E5FF2DA9E8FF2FACEAFF31AD - ECFF33AFEEFF34B0EFFF35B1F0FF35B1F1FF36B2F1FF36B2F2FF37B2F2FF37B3 - F2FF37B3F2FF37B3F2FF37B3F2FF38B3F2FF38B3F2FF38B3F2FF38B3F2FF38B3 - F2FF38B3F2FF39B3F2FF39B3F2FF39B3F2FF39B3F2FF39B3F2FF39B3F2FF39B3 - F2FF39B4F2FF39B4F2FF39B4F2FF39B4F2FF39B4F2FF39B4F2FF39B4F2FF39B3 - F1FF39B3F1FF39B3F0FF39B2F0FF38B1EFFF37B0EEFF35AEECFF32ACEAFF2FA9 - E7FF2CA5E3FF29A1DEFF229BD9FF1A93D1FF599DB8FF728081FF595D5DFF4C4C - 4CFF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF454444EF0C0C0C680000004E0000003B000000220000000D000000030000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00030000000D0000002315141465484646F9494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF4C4C4CFF595D5DFF758383FF79AAB9FF2598 - D1FF209AD8FF249FDDFF27A3E2FF29A7E6FF2CAAEAFF2EACECFF30ADEEFF31AF - EFFF32AFF0FF32B0F1FF33B0F1FF33B1F1FF33B1F1FF34B1F1FF34B1F2FF34B1 - F2FF34B1F2FF35B1F2FF35B1F2FF35B1F2FF35B2F2FF35B2F2FF36B2F2FF36B2 - F2FF36B2F2FF36B2F2FF36B2F2FF36B2F2FF37B2F2FF37B2F2FF37B3F2FF37B3 - F2FF37B3F2FF37B3F2FF37B3F2FF38B3F2FF38B3F2FF38B3F2FF38B3F2FF38B3 - F2FF38B3F2FF38B3F2FF38B2F1FF37B2F0FF37B1F0FF36B0EFFF34AEEDFF32AD - EBFF2FAAE9FF2BA6E5FF28A2E0FF249DDCFF1694D3FF469CC2FF778A8DFF5C61 - 61FF4E4E4EFF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF424040E50707075D0000004B000000360000001D0000000A2F3F - 3F01000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000002F3F3F010000 - 00090000001C0D0D0D4B464444ED494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF4D4C4CFF5B6060FF7A8A8AFF6BAAC1FF1D95D2FF209A - D9FF239FDEFF26A3E4FF29A7E8FF2BAAEBFF2CABEDFF2EADEEFF2FAFEFFF2FAF - F0FF30AFF0FF30B0F1FF30B0F1FF31B0F1FF31B0F1FF31B0F1FF31B0F1FF32B0 - F1FF32B0F1FF32B1F1FF32B1F1FF32B1F1FF32B1F1FF33B1F1FF33B1F1FF33B1 - F1FF33B1F1FF33B1F1FF33B1F1FF34B1F1FF34B1F1FF34B1F2FF34B1F2FF35B1 - F2FF35B1F2FF35B1F2FF35B1F2FF35B2F2FF35B2F2FF35B2F2FF36B2F2FF36B2 - F2FF36B2F2FF36B2F2FF36B2F2FF36B2F2FF36B1F1FF35B1F0FF34B0F0FF33AF - EEFF31ADECFF2FABEAFF2BA7E7FF28A3E2FF249EDDFF1995D5FF3298C8FF7891 - 95FF5F6565FF4E4E4EFF4A4848FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF3A3939D003030357000000470000002F000000160000 - 0006000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000050000 - 0015040404313F3D3DD2494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF4D4C4CFF5C6161FF7D8D8EFF61A8C5FF1A95D3FF1E9ADAFF22A0 - E0FF24A4E5FF27A7E9FF29AAEBFF2AABEDFF2BADEFFF2CAEEFFF2DAEF0FF2DAF - F1FF2EAFF1FF2EAFF1FF2EAFF1FF2EAFF1FF2EAFF1FF2EAFF1FF2FAFF1FF2FB0 - F1FF2FB0F1FF2FB0F1FF2FB0F1FF2FB0F1FF30B0F1FF30B0F1FF30B0F1FF30B0 - F1FF30B0F1FF30B0F1FF31B0F1FF31B0F1FF31B0F1FF31B0F1FF31B0F1FF31B0 - F1FF32B0F1FF32B0F1FF32B1F1FF32B1F1FF32B1F1FF32B1F1FF33B1F1FF33B1 - F1FF33B1F1FF33B1F1FF33B1F1FF33B1F1FF33B1F1FF33B1F1FF33B0F1FF32B0 - F0FF31AFEFFF30ADEDFF2DABEAFF2AA7E7FF27A4E3FF249FDDFF1A96D7FF2996 - CBFF75939AFF606767FF4E4E4EFF4A4848FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF2E2C2CAE0000005200000041000000270000 - 0010000000030000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000030000000E0000 - 0025302F2FA2494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF4C4B4BFF5B5F5FFF7C8D8EFF62AAC6FF1894D3FF1D9ADBFF209FE1FF23A4 - E6FF26A7E9FF28A9EBFF28ABEEFF29ACEFFF29ADF0FF2AADF0FF2AAEF1FF2BAE - F1FF2BAEF1FF2BAEF1FF2BAEF1FF2BAEF1FF2BAEF1FF2CAEF1FF2CAFF1FF2CAF - F1FF2CAFF1FF2DAFF1FF2DAFF1FF2DAFF1FF2DAFF1FF2DAFF1FF2DAFF1FF2EAF - F1FF2EAFF1FF2EAFF1FF2EAFF1FF2EAFF1FF2EAFF1FF2FAFF1FF2FB0F1FF2FB0 - F1FF2FB0F1FF2FB0F1FF2FB0F1FF2FB0F1FF30B0F1FF30B0F1FF30B0F1FF30B0 - F1FF30B0F1FF30B0F1FF31B0F1FF31B0F1FF31B0F1FF31B0F1FF31B0F1FF31AF - F0FF30AFF0FF2FAEEFFF2EADEDFF2CAAEBFF29A8E8FF26A3E3FF229EDEFF1A97 - D7FF2895CBFF75939AFF5F6565FF4E4E4EFF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF1B1B1B860000004E000000390000 - 001F0000000A1211110100000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000012111101000000080000001B1A19 - 1966494747FF494747FF494747FF494747FF494747FF494747FF494747FF4C4B - 4BFF585C5CFF798989FF67ABC4FF1894D3FF1B9ADAFF1E9EE0FF21A3E5FF24A7 - E9FF25A8ECFF27AAEEFF27ABEFFF28ACF0FF28ADF1FF28ADF1FF28ADF1FF28AD - F1FF28ADF1FF28ADF1FF29ADF1FF29ADF1FF29ADF1FF29ADF1FF29ADF1FF29AD - F1FF29ADF1FF2AADF1FF2AAEF1FF2AAEF1FF2AAEF1FF2AAEF1FF2AAEF1FF2BAE - F1FF2BAEF1FF2BAEF1FF2BAEF1FF2BAEF1FF2BAEF1FF2BAEF1FF2CAEF1FF2CAF - F1FF2DAFF1FF2DAFF1FF2DAFF1FF2DAFF1FF2DAFF1FF2DAFF1FF2DAFF1FF2DAF - F1FF2EAFF1FF2EAFF1FF2EAFF1FF2EAFF1FF2EAFF1FF2FAFF1FF2FAFF1FF2EAF - F1FF2EAFF0FF2EAEF0FF2DAEEFFF2CACEDFF2AAAECFF28A7E9FF24A2E4FF219E - DEFF1997D7FF2896CBFF789195FF5C6161FF4C4C4CFF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF464444F20A0A0A62000000480000 - 0030000000150000000500000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000400000012090909344543 - 43E6494747FF494747FF494747FF494747FF494747FF494747FF4B4949FF5558 - 58FF748181FF73ADC0FF1793D2FF1A99DAFF1C9EE0FF1FA2E5FF22A6E9FF23A8 - ECFF24A9EEFF25ABEFFF25ABF0FF25ACF1FF26ACF1FF26ACF1FF26ACF1FF27AC - F1FF27ACF1FF27ACF1FF27ACF1FF27ACF1FF27ACF1FF27ACF1FF27ACF1FF28AD - F1FF28ADF1FF28ADF1FF28ADF1FF28ADF1FF28ADF1FF28ADF1FF28ADF1FF28AD - F1FF28ADF1FF28ADF1FF29ADF1FF29ADF1FF29ADF1FF29ADF1FF29ADF1FF29AD - F1FF2AADF1FF2AADF1FF2AAEF1FF2AAEF1FF2AAEF1FF2AAEF1FF2AAEF1FF2BAE - F1FF2BAEF1FF2BAEF1FF2BAEF1FF2BAEF1FF2BAEF1FF2CAEF1FF2CAEF1FF2CAF - F1FF2CAFF1FF2CAEF0FF2BADF0FF2BADEFFF2AABEDFF28AAEBFF26A6E8FF23A2 - E4FF1F9DDEFF1796D6FF3298C8FF768A8DFF595D5DFF4C4B4BFF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF373535C8000000510000 - 0040000000240000000D00000002000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000121111010000000A0000001F313030A64947 - 47FF494747FF494747FF494747FF494747FF494747FF4A4848FF525353FF6D78 - 78FF80ACB7FF1F96D1FF1897D9FF1A9DDFFF1CA1E5FF1FA5E9FF21A7ECFF22A9 - EEFF22AAEFFF23AAF0FF23ABF0FF23ABF0FF23ABF0FF24ABF0FF24ABF0FF24AB - F0FF24ABF0FF24ABF0FF24ABF0FF25ABF0FF25ABF0FF25ACF1FF25ACF1FF25AC - F1FF25ACF1FF25ACF1FF26ACF1FF26ACF1FF26ACF1FF26ACF1FF27ACF1FF27AC - F1FF27ACF1FF27ACF1FF27ACF1FF27ACF1FF27ACF1FF27ACF1FF27ACF1FF28AD - F1FF28ADF1FF28ADF1FF28ADF1FF28ADF1FF28ADF1FF28ADF1FF28ADF1FF3F83 - A5FF3B8FBAFF2BA9E9FF29ADF1FF29ADF1FF29ADF1FF29ADF1FF29ADF1FF29AD - F1FF2AADF1FF29ADF1FF29ADF0FF29ADF0FF29ACEFFF28ABEDFF27A8EBFF24A6 - E8FF21A1E3FF1D9CDDFF1594D5FF469CC2FF728081FF555757FF4A4949FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF1F1E1E8D0000 - 004C000000350000001900000007000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000040000001417171754484646FC4947 - 47FF494747FF494747FF494747FF494747FF494747FF4F4F4FFF656C6CFF85A5 - AAFF299AD0FF1696D7FF189BDEFF1AA0E4FF1DA4E9FF1EA6EBFF1FA8EDFF20A9 - EEFF20A9EFFF21AAF0FF21AAF0FF21AAF0FF21AAF0FF21AAF0FF21AAF0FF21AA - F0FF22AAF0FF22ABF0FF22ABF0FF22ABF0FF22ABF0FF22ABF0FF23ABF0FF23AB - F0FF23ABF0FF23ABF0FF23ABF0FF23ABF0FF23ABF0FF24ABF0FF24ABF0FF24AB - F0FF24ABF0FF24ABF0FF24ABF0FF24ABF0FF25ABF0FF25ACF1FF25ACF1FF25AC - F1FF25ACF1FF25ACF1FF26ACF1FF26ACF1FF26ACF1FF26ACF1FF2AA3E1FF5658 - 5AFF5B5959FF595D60FF497790FF3596C8FF28ABEEFF27ACF1FF27ACF1FF28AD - F1FF28ADF1FF28ADF1FF28ADF1FF28ADF1FF28ACF0FF27ABEFFF26A9EDFF24A8 - EBFF21A4E7FF1FA0E2FF1B9ADBFF1292D2FF599CB8FF6A7575FF515252FF4948 - 48FF494747FF494747FF494747FF494747FF494747FF494747FF454343EC0707 - 075B00000043000000270000000F000000030000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000010000000B00000021413F3FCC494747FF4947 - 47FF494747FF494747FF494747FF494747FF4C4B4BFF5C6161FF839798FF46A3 - CCFF1494D5FF169ADCFF189EE2FF1BA2E7FF1CA5EAFF1DA7EDFF1DA8EEFF1DA8 - EFFF1FA5E9FF2E3B42FF3E3D3DFF4C4A4AFF535252FF565454FF565454FF5654 - 54FF565454FF565454FF555454FF3B7898FF20A9F0FF20AAF0FF20AAF0FF20AA - F0FF21AAF0FF21AAF0FF21AAF0FF21AAF0FF21AAF0FF21AAF0FF21AAF0FF22AA - F0FF22AAF0FF22ABF0FF22ABF0FF22ABF0FF22ABF0FF22ABF0FF23ABF0FF23AB - F0FF23ABF0FF23ABF0FF23ABF0FF23ABF0FF23ABF0FF24ABF0FF3A81A5FF5856 - 56FF595858FF595858FF595858FF5A5858FF546169FF427E9DFF2F9CD4FF25AC - F1FF25ACF1FF25ACF1FF26ACF1FF26ACF1FF25ACF1FF25ABF0FF25AAEFFF24A9 - EDFF22A6EAFF1FA3E6FF1C9EE0FF1999DAFF1892D0FF6F99A7FF616767FF4D4C - 4CFF494747FF494747FF494747FF494747FF494747FF494747FF494747FF2E2D - 2DB00000004D000000360000001A000000070000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000004000000141F1E1E6D494747FF494747FF4947 - 47FF494747FF494747FF494747FF4A4848FF545656FF758282FF6CADC4FF1292 - D2FF1597DAFF169DE1FF18A1E7FF1AA4EAFF1AA6EDFF1BA7EEFF1BA7EFFF1CA8 - F0FF1CA8F0FF2277A2FF343333FF434242FF4F4D4DFF535151FF545353FF5453 - 53FF545353FF545353FF545353FF515253FF249CD9FF1EA9F0FF1EA9F0FF1EA9 - F0FF1EA9F0FF1EA9F0FF1EA9F0FF1EA9F0FF1FA9F0FF1FA9F0FF1FA9F0FF1FA9 - F0FF1FA9F0FF20A9F0FF20A9F0FF20A9F0FF20AAF0FF20AAF0FF20AAF0FF20AA - F0FF21AAF0FF21AAF0FF21AAF0FF21AAF0FF21AAF0FF22A9EDFF4D5A61FF5755 - 55FF585656FF585656FF585656FF585656FF585656FF585656FF585757FF4F67 - 73FF3B86ACFF28A3E1FF23ABF0FF23ABF0FF23ABF0FF23AAF0FF23AAEFFF22A9 - EEFF22A7ECFF1FA5E9FF1CA1E5FF1A9CDEFF1696D7FF2A97CBFF768C8FFF585B - 5BFF4A4949FF494747FF494747FF494747FF494747FF494747FF494747FF4846 - 46FA0C0C0C6600000043000000270000000E0000000200000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000A05050523454343DF494747FF494747FF4947 - 47FF494747FF494747FF494747FF4E4E4EFF666E6EFF87ABB1FF2097D1FF1395 - D8FF159BDFFF169FE5FF17A3E9FF18A4ECFF19A6EEFF19A6EFFF19A7F0FF1AA7 - F0FF1AA8F0FF1AA6EDFF29414DFF393838FF474646FF504E4EFF525050FF5351 - 51FF535151FF535151FF535151FF535151FF3E6B82FF1BA8F0FF1CA8F0FF1CA8 - F0FF1CA8F0FF1CA8F0FF1CA8F0FF1CA8F0FF1CA8F0FF1CA8F0FF1DA8F0FF1DA9 - F0FF1DA9F0FF1DA9F0FF1DA9F0FF1DA9F0FF1DA9F0FF1EA9F0FF1EA9F0FF1EA9 - F0FF1EA9F0FF1EA9F0FF1EA9F0FF1EA9F0FF1EA9F0FF2D8DBFFF535151FF5654 - 54FF565454FF565454FF565454FF565454FF575555FF575555FF575555FF5755 - 55FF575555FF565657FF486D81FF358CB8FF23A7EBFF21AAF0FF21AAEFFF21A9 - EFFF20A8EDFF1FA6EBFF1DA3E9FF1A9FE3FF189ADCFF1292D4FF519DBDFF6C77 - 77FF505151FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF353333BF0000004C00000034000000170000000500000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000030000001127252578494747FF494747FF494747FF4947 - 47FF494747FF494747FF4B4949FF595D5DFF819494FF48A4CDFF1192D5FF1398 - DCFF149DE3FF16A1E8FF17A3EBFF17A5EEFF17A6EFFF17A7F0FF17A7F0FF17A7 - F0FF18A7F0FF18A7F0FF1C82B7FF2F2E2EFF3F3D3DFF4B4949FF504E4EFF514F - 4FFF525050FF525050FF525050FF525050FF504E4EFF2690C6FF19A7F0FF19A7 - F0FF1AA8F0FF1AA8F0FF1AA8F0FF1AA8F0FF1AA8F0FF1AA8F0FF1AA8F0FF1BA8 - F0FF1BA8F0FF1BA8F0FF1BA8F0FF1BA8F0FF1BA8F0FF1BA8F0FF1BA8F0FF1CA8 - F0FF1CA8F0FF1CA8F0FF1CA8F0FF1CA8F0FF1CA8F0FF40667AFF535151FF5452 - 52FF545353FF545353FF545353FF545353FF545353FF555353FF555353FF5553 - 53FF555353FF555353FF555353FF555353FF53575AFF3F728CFF2A8FC2FF1EA9 - EFFF1EA8EEFF1EA7EDFF1DA5EAFF1AA2E6FF189DE1FF1597D9FF1391D0FF7399 - A4FF5E6464FF4C4B4BFF494747FF494747FF494747FF494747FF494747FF4947 - 47FF484646FC0E0E0E6500000040000000230000000B12111101000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000070000001B444242D8494747FF494747FF494747FF4947 - 47FF494747FF494747FF505151FF6D7878FF7CAFBEFF1090D1FF1196DAFF129B - E1FF149FE7FF15A2EAFF15A4EDFF16A5EFFF16A5EFFF16A6F0FF16A6F0FF17A6 - F0FF17A6F0FF17A6F0FF17A6F0FF23495CFF343333FF434141FF4C4A4AFF4F4D - 4DFF504E4EFF504E4EFF504E4EFF504E4EFF504E4EFF435C6AFF18A5EDFF18A7 - F0FF18A7F0FF18A7F0FF18A7F0FF18A7F0FF18A7F0FF18A7F0FF19A7F0FF19A7 - F0FF19A7F0FF19A7F0FF19A7F0FF19A7F0FF19A7F0FF19A7F0FF1AA7F0FF1AA8 - F0FF1AA8F0FF1AA8F0FF1AA8F0FF1AA8F0FF209BDAFF4E4C4CFF535151FF5351 - 51FF535151FF535151FF535151FF535151FF535151FF535151FF535252FF5452 - 52FF545252FF545252FF545252FF545252FF535252FF4F4D4DFF434141FF2E4E - 5EFF1CA7EFFF1CA7EEFF1BA6ECFF1AA3E9FF179FE4FF169ADDFF1294D6FF3699 - C8FF748383FF535555FF494848FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF2F2E2EB5000000490000002F0000001300000003000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000010000000D1F1E1E64494747FF494747FF494747FF494747FF4947 - 47FF494747FF4B4A4AFF5C6161FF879D9EFF359ECFFF0F92D6FF1098DDFF119D - E4FF13A0E9FF13A2EBFF14A4EDFF14A5EEFF14A5EFFF14A5EFFF15A6EFFF15A6 - EFFF15A6EFFF15A6EFFF15A6EFFF188DC9FF2A2B2CFF3A3838FF474545FF4D4B - 4BFF4F4D4DFF4F4D4DFF4F4D4DFF4F4D4DFF4F4D4DFF4E4C4CFF2A81AEFF16A6 - F0FF17A6F0FF17A6F0FF17A6F0FF17A6F0FF17A6F0FF17A6F0FF17A6F0FF17A6 - F0FF17A6F0FF17A6F0FF17A7F0FF17A7F0FF17A7F0FF17A7F0FF17A7F0FF18A7 - F0FF18A7F0FF18A7F0FF18A7F0FF18A7F0FF337496FF504E4EFF514F4FFF5250 - 50FF525050FF525050FF525050FF525050FF525050FF525050FF525050FF5250 - 50FF525050FF525050FF525050FF525050FF504E4EFF494747FF3A3939FF246C - 91FF1AA8F0FF1AA7EFFF1AA6EEFF19A4EBFF17A1E7FF159DE1FF1397DAFF0E90 - D2FF699CAEFF616868FF4C4C4CFF494747FF494747FF494747FF494747FF4947 - 47FF494747FF474545F4070707580000003A0000001D00000008000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000400000015413F3FC3494747FF494747FF494747FF494747FF4947 - 47FF494747FF505151FF6F7A7AFF76AFC2FF0E8FD1FF0F95DAFF0F9AE1FF119E - E7FF12A1EAFF12A3EDFF13A4EEFF13A5EFFF13A5EFFF13A5EFFF13A5EFFF13A5 - EFFF13A5EFFF13A5EFFF13A5EFFF14A5EFFF1E5470FF302E2EFF3F3E3EFF4947 - 47FF4D4B4BFF4D4B4BFF4D4B4BFF4D4B4BFF4D4B4BFF4D4B4BFF465258FF189F - E4FF15A6EFFF15A6EFFF15A6EFFF15A6EFFF15A6EFFF15A6EFFF16A6F0FF16A6 - F0FF16A6F0FF16A6F0FF16A6F0FF16A6F0FF16A6F0FF16A6F0FF16A6F0FF17A6 - F0FF17A6F0FF17A6F0FF17A6F0FF18A3EAFF465158FF4F4D4DFF4F4D4DFF4F4D - 4DFF504E4EFF504E4EFF504E4EFF4F4D4DFF4E4C4CFF4E4C4CFF4E4C4CFF504E - 4EFF514F4FFF514F4FFF514F4FFF514F4FFF4D4B4BFF414040FF323334FF1A9B - DDFF19A7F0FF18A6EFFF18A6EEFF17A5EDFF17A2E9FF159EE5FF1399DFFF1093 - D6FF2F98CAFF758587FF535555FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF2423239900000044000000280000000E000000020000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000815141439494747FF494747FF494747FF494747FF494747FF4947 - 47FF4B4949FF5B5F5FFF869D9DFF389FCFFF0D92D6FF0E98DEFF0F9CE4FF10A0 - E8FF10A2ECFF11A3EDFF11A3EEFF11A4EFFF11A4EFFF11A4EFFF11A4EFFF12A4 - EFFF12A4EFFF12A4EFFF12A4EFFF12A4EFFF1398DBFF26292BFF353434FF4342 - 42FF4B4949FF4D4B4BFF4D4B4BFF4D4B4BFF4D4B4BFF4D4B4BFF4C4A4AFF3073 - 95FF13A5EFFF13A5EFFF13A5EFFF13A5EFFF14A5EFFF14A5EFFF14A5EFFF14A5 - EFFF14A5EFFF14A5EFFF14A5EFFF14A5EFFF14A5EFFF14A5EFFF15A6EFFF15A6 - EFFF15A6EFFF15A6EFFF15A6EFFF2684B4FF4B4A4AFF4E4C4CFF4E4C4CFF4F4D - 4DFF4F4D4DFF4F4D4DFF4E4C4CFF4B4A4AFF474545FF444242FF454343FF4948 - 48FF4D4B4BFF4E4C4CFF4F4D4DFF4E4C4CFF484646FF393838FF25536BFF17A6 - F0FF17A6F0FF17A6F0FF17A5EFFF16A4EEFF16A3EBFF14A0E8FF129BE2FF1096 - DAFF0E90D1FF6C9DADFF606767FF4C4B4BFF494747FF494747FF494747FF4947 - 47FF494747FF494747FF413F3FDD0000004C0000003400000017000000050000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00010000000D2F2E2E93494747FF494747FF494747FF494747FF494747FF4947 - 47FF4F4F4FFF6B7676FF7FB1BFFF0D8FD1FF0E94D9FF0E99E1FF0F9DE7FF0FA0 - EAFF10A2EDFF10A3EEFF10A4EFFF10A4EFFF10A4EFFF10A4EFFF10A4EFFF11A4 - EFFF11A4EFFF11A4EFFF11A4EFFF11A4EFFF11A4EFFF196187FF2C2B2BFF3B3A - 3AFF464444FF4B4949FF4B4949FF4B4949FF4B4949FF4B4949FF4B4949FF474A - 4CFF1998D9FF12A4EFFF12A4EFFF12A4EFFF12A4EFFF12A4EFFF12A4EFFF13A5 - EFFF13A5EFFF13A5EFFF13A5EFFF13A5EFFF13A5EFFF13A5EFFF13A5EFFF13A5 - EFFF13A5EFFF13A5EFFF13A5EFFF3A5D6FFF4C4A4AFF4D4B4BFF4D4B4BFF4D4B - 4BFF4D4B4BFF4D4B4BFF4C4A4AFF454343FF3B3939FF343232FF353434FF3B3A - 3AFF413F3FFF464444FF4A4848FF494747FF403F3FFF313030FF1A81B6FF15A6 - EFFF15A6EFFF15A6EFFF15A6EFFF15A5EEFF14A3ECFF13A1E9FF119DE4FF0F98 - DDFF0E92D6FF379AC8FF738081FF515252FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF1211116A00000040000000230000000B1211 - 1101000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000300000014464444E1494747FF494747FF494747FF494747FF494747FF4A48 - 48FF575A5AFF819393FF46A4CEFF0C91D5FF0D96DDFF0D9BE4FF0F9FE8FF0FA1 - ECFF0FA2EDFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF10A4EFFF10A4 - EFFF10A4EFFF10A4EFFF10A4EFFF10A4EFFF10A4EFFF109DE5FF222F36FF3231 - 31FF403F3FFF484646FF4A4848FF4A4848FF4A4848FF4A4848FF4A4848FF4A48 - 48FF34667FFF11A4EFFF11A4EFFF11A4EFFF11A4EFFF11A4EFFF11A4EFFF11A4 - EFFF11A4EFFF11A4EFFF11A4EFFF11A4EFFF11A4EFFF11A4EFFF11A4EFFF12A4 - EFFF12A4EFFF12A4EFFF1A94D3FF484646FF4C4A4AFF4C4A4AFF4C4A4AFF4C4A - 4AFF4C4A4AFF4C4A4AFF484747FF3E3D3DFF2F2E2EFF252424FF242323FF2928 - 28FF302E2EFF363535FF3D3B3BFF3E3C3CFF363535FF273841FF14A5EFFF14A5 - EFFF14A5EFFF14A5EFFF13A5EFFF13A4EEFF12A3EDFF12A1EAFF109EE6FF0F9A - E0FF0E94D9FF0E8FD0FF7499A3FF5C6161FF4A4949FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF2E2D2DB20000004900000030000000140000 - 0004000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00061C1B1B44494747FF494747FF494747FF494747FF494747FF494747FF4C4B - 4BFF636B6BFF8AADB4FF1692D0FF0D93D8FF0D98E0FF0D9DE6FF0E9FEAFF0EA1 - EDFF0FA2EEFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3 - EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF156D99FF2827 - 27FF393737FF444242FF494747FF4A4848FF4A4848FF4A4848FF4A4848FF4A48 - 48FF484646FF1C8DC6FF10A4EFFF10A4EFFF10A4EFFF10A4EFFF10A4EFFF10A4 - EFFF10A4EFFF10A4EFFF10A4EFFF10A4EFFF10A4EFFF10A4EFFF10A4EFFF10A4 - EFFF10A4EFFF11A4EFFF2C6E90FF494747FF4B4949FF4B4949FF4B4949FF4B49 - 49FF4B4949FF4A4848FF444242FF363434FF224558FF185A7BFF1A252AFF1D1D - 1DFF212020FF252525FF2B2A2AFF2D2B2BFF282828FF1A678EFF12A4EFFF12A4 - EFFF12A4EFFF12A4EFFF12A4EFFF12A4EFFF11A3EDFF10A1EBFF109FE8FF0E9B - E3FF0E96DCFF0C91D4FF4D9DBFFF6A7474FF4E4E4EFF494747FF494747FF4947 - 47FF494747FF494747FF494747FF474545F4050505550000003C0000001F0000 - 0009000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000A302F2F91494747FF494747FF494747FF494747FF494747FF494747FF5152 - 52FF738080FF69ADC7FF0C90D3FF0D95DBFF0D9AE3FF0E9EE8FF0EA0EBFF0EA2 - EDFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0FA3EFFF0FA3EFFF0FA0EBFF1E35 - 40FF2F2E2EFF3F3D3DFF474545FF4A4848FF4A4848FF4A4848FF4A4848FF4A48 - 48FF494747FF3B5767FF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3 - EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3 - EFFF10A4EFFF11A0E9FF404A50FF494747FF4A4848FF4A4848FF4A4848FF4A48 - 48FF4A4848FF474646FF3F3D3DFF2F2E2EFF167BAFFF10A4EFFF109FE8FF1374 - A4FF17394AFF1B1A1AFF1D1D1DFF1F1E1EFF1E2123FF1299DEFF11A4EFFF11A4 - EFFF11A4EFFF11A4EFFF10A4EFFF10A4EFFF10A3EEFF0FA2EDFF0F9FE9FF0E9C - E6FF0D98DFFF0C93D7FF2195CEFF788C8EFF545656FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF24232399000000460000002B0000 - 0011000000030000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000010000 - 000E454343CE494747FF494747FF494747FF494747FF494747FF4A4848FF585C - 5CFF85999AFF3BA1D0FF0C92D6FF0D97DEFF0D9CE5FF0E9FE9FF0EA1ECFF0EA2 - EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF127A - B0FF262424FF363434FF434141FF484646FF494747FF494747FF494747FF4947 - 47FF494747FF484646FF237FAEFF0EA3EFFF0EA3EFFF0FA3EFFF0FA3EFFF0FA3 - EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3 - EFFF0FA3EFFF2080B2FF474545FF4A4848FF4A4848FF4A4848FF4A4848FF4A48 - 48FF494747FF454343FF393737FF26333AFF0FA1EBFF0FA3EFFF0FA3EFFF0FA3 - EFFF0FA3EFFF118BC9FF155272FF182025FF154761FF10A4EFFF10A4EFFF10A4 - EFFF10A4EFFF10A4EFFF10A4EFFF0FA3EFFF0FA3EEFF0FA2EDFF0EA0EBFF0E9E - E7FF0D99E1FF0D95DAFF0C8FD1FF709DABFF5E6363FF4B4949FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF424141E20000004E000000370000 - 001B000000070000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000030E0D - 0D21494747FF494747FF494747FF494747FF494747FF494747FF4C4A4AFF636A - 6AFF8DAFB4FF1592D0FF0D94D8FF0D99E0FF0D9DE6FF0EA0EAFF0EA2EDFF0EA2 - EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF1B4053FF2D2C2CFF3C3A3AFF454343FF484646FF494747FF494747FF4947 - 47FF494747FF484646FF404D54FF109EE6FF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0FA3EFFF345D72FF494747FF4A4848FF4A4848FF4A4848FF4A4848FF4A48 - 48FF484646FF413F3FFF323030FF1A5D7FFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3 - EFFF0FA3EFFF0FA3EFFF0FA3EFFF0F9EE8FF0F96DAFF0FA3EFFF0FA3EFFF0FA3 - EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0EA2EEFF0EA1ECFF0E9F - E8FF0D9BE4FF0D96DCFF0C91D4FF4E9DBFFF6A7474FF4D4D4DFF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF1A19197E000000430000 - 00270000000E1211110200000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000042120 - 205A494747FF494747FF494747FF494747FF494747FF494747FF4F4F4FFF6F7B - 7BFF72B0C4FF0C8FD2FF0D95DBFF0D9AE3FF0E9EE8FF0EA0EBFF0EA2EEFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF1089C7FF242323FF343333FF413F3FFF474545FF494747FF494747FF4947 - 47FF494747FF494747FF484646FF297298FF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF1496D8FF444242FF484646FF494747FF494747FF494747FF494747FF4947 - 47FF454343FF3B3939FF2A2828FF118ECEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF0FA3 - EFFF0FA3EFFF0FA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA1EDFF0E9F - E9FF0D9CE6FF0D98DFFF0C92D7FF2897CDFF778788FF525353FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF383636C70000004C0000 - 0033000000170000000500000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000072F2E - 2E8E494747FF494747FF494747FF494747FF494747FF494747FF545656FF7D8E - 8EFF4FA8CEFF0C91D5FF0D97DDFF0D9BE4FF0E9FE9FF0EA1ECFF0EA2EEFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF19506CFF2B2A2AFF3B3939FF454343FF484646FF494747FF4947 - 47FF494747FF494747FF494747FF444749FF1398DCFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF286F94FF474545FF494747FF494747FF494747FF494747FF494747FF4846 - 46FF424040FF343333FF1F3F50FF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EDFF0EA0 - EBFF0D9DE7FF0D99E1FF0D94D9FF0F8FD0FF78989FFF595C5CFF494848FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF484646FC0E0E0E650000 - 003F000000220000000B12111101000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000094442 - 42BA494747FF494747FF494747FF494747FF494747FF4A4848FF5B5F5FFF8BA1 - A2FF2D9CD0FF0C92D7FF0D98DFFF0D9CE6FF0E9FEAFF0EA1EDFF0EA2EEFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0F94D7FF222628FF323131FF403E3EFF474545FF494747FF4947 - 47FF494747FF494747FF494747FF484646FF316580FF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA1 - ECFF3D4C54FF484646FF494747FF494747FF494747FF494747FF494747FF4644 - 44FF3D3C3CFF2E2D2DFF16709EFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA0 - EBFF0E9EE8FF0D9AE3FF0D95DBFF0C90D3FF679EB2FF616767FF4B4949FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF2D2B2BAF0000 - 00490000002F0000001300000004000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000B4745 - 45E2494747FF494747FF494747FF494747FF494747FF4B4A4AFF626969FF8FAF - B3FF1491D0FF0D94D9FF0D99E0FF0D9DE7FF0EA0EBFF0EA2EDFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF165E83FF292828FF393838FF444242FF484646FF4947 - 47FF494747FF494747FF494747FF494747FF474545FF198DC9FF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF1C86 - BDFF454343FF494747FF494747FF494747FF494747FF494747FF484646FF4442 - 42FF383737FF262C30FF0E9CE5FF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA1 - ECFF0E9FE9FF0D9BE4FF0D96DCFF0C91D5FF4E9DBFFF697272FF4C4C4CFF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF464444F20505 - 05550000003B0000001E00000009000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F010E0D0D184947 - 47FF494747FF494747FF494747FF494747FF494747FF4C4C4CFF697272FF85B3 - BEFF0C8ED1FF0D95DAFF0D9AE2FF0E9EE7FF0EA0EBFF0EA2EEFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0E9AE1FF202B31FF302F2FFF3F3D3DFF474545FF4947 - 47FF494747FF494747FF494747FF494747FF484646FF395869FF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF3160 - 79FF474545FF494747FF494747FF494747FF494747FF494747FF474545FF403F - 3FFF323131FF1B536FFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA1 - EDFF0E9FE9FF0D9CE5FF0D97DEFF0C92D6FF3B9BC8FF717E7EFF4F4F4FFF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF2322 - 2297000000460000002A00000010000000030000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F011F1E1E374947 - 47FF494747FF494747FF494747FF494747FF494747FF4F4F4FFF707D7DFF71B0 - C6FF0C90D3FF0D95DBFF0D9AE3FF0E9EE8FF0EA1ECFF0EA2EEFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF146A96FF282626FF383636FF434242FF4846 - 46FF494747FF494747FF494747FF494747FF494747FF474545FF2180B0FF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF119AE1FF4245 - 47FF484646FF494747FF494747FF494747FF494747FF494747FF464444FF3C3A - 3AFF2B2A2AFF1284BEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2 - EDFF0E9FEAFF0D9DE6FF0D98DFFF0D93D7FF2898CEFF78898AFF525353FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF413F - 3FDD0000004E000000370000001A000000070000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F01222121514947 - 47FF494747FF494747FF494747FF494747FF494747FF515252FF788686FF5FAD - CCFF0C90D4FF0D97DDFF0D9BE4FF0E9FE9FF0EA1ECFF0EA2EEFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA0EBFF1E323DFF2F2E2EFF3E3C3CFF4644 - 44FF494747FF494747FF494747FF494747FF494747FF484646FF404E56FF0F9F - E9FF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF2378A4FF4644 - 44FF494747FF494747FF494747FF494747FF494747FF484646FF434141FF3634 - 34FF223844FF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2 - EDFF0EA0EBFF0D9DE7FF0D99E0FF0D94D9FF1792CFFF7B9295FF555858FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF1817177800000043000000260000000D1211110100000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F01232222674947 - 47FF494747FF494747FF494747FF494747FF494747FF545656FF7E8F8FFF4FA9 - CFFF0C91D6FF0D97DEFF0D9CE4FF0E9FE9FF0EA1EDFF0EA2EEFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF1278ADFF262525FF363434FF4240 - 40FF484646FF494747FF494747FF494747FF494747FF494747FF484646FF2874 - 9BFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF375463FF4846 - 46FF494747FF494747FF494747FF494747FF494747FF474545FF3E3D3DFF2F2E - 2EFF17668EFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2 - EEFF0EA0EBFF0D9EE7FF0D9AE1FF0D94DAFF0E8FD0FF7A99A0FF585C5CFF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF373636C40000004C00000033000000170000000500000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F012423237E4947 - 47FF494747FF494747FF494747FF494747FF494747FF565959FF849696FF43A5 - D1FF0C92D6FF0D97DEFF0D9CE5FF0E9FEAFF0EA1EDFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF1B4053FF2D2C2CFF3C3B - 3BFF464444FF484646FF494747FF494747FF494747FF494747FF494747FF4349 - 4CFF1399DEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF1592D2FF444242FF4846 - 46FF494747FF494747FF494747FF494747FF484646FF444343FF393838FF2829 - 2AFF0F96DBFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2 - EEFF0EA0EBFF0E9EE8FF0D9AE2FF0D95DAFF0C8ED1FF769DA8FF5C6060FF4A48 - 48FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF484646FC0B0B0B620000003F000000220000000B12111101000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F01242323854947 - 47FF494747FF494747FF494747FF494747FF494747FF585B5BFF889C9CFF38A0 - D0FF0C92D7FF0D98DFFF0D9CE6FF0E9FEAFF0EA2EDFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF1187C3FF242323FF3433 - 33FF413F3FFF484646FF494747FF494747FF494747FF494747FF494747FF4846 - 46FF306783FF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF276E93FF464444FF4947 - 47FF494747FF494747FF494747FF494747FF484646FF413F3FFF333232FF1E49 - 5FFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2 - EEFF0EA1ECFF0E9EE8FF0D9AE2FF0D95DBFF0C8FD2FF6F9EADFF5E6363FF4A48 - 48FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF2C2B2BAC000000480000002E0000001300000003000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F01242323854947 - 47FF494747FF494747FF494747FF494747FF494747FF5A5D5DFF8BA0A0FF329E - D1FF0C92D7FF0D98DFFF0D9DE6FF0E9FEAFF0EA2EDFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF194E69FF2B2A - 2AFF3B3939FF454343FF484646FF494747FF494747FF494747FF494747FF4947 - 47FF474545FF188FCBFF0EA3EFFF0EA3EFFF0EA3EFFF3A4D58FF484646FF4947 - 47FF494747FF494747FF494747FF494747FF464444FF3D3B3BFF2D2B2BFF137A - AEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2 - EEFF0EA1ECFF0E9EE8FF0D9AE3FF0D95DBFF0C8FD2FF6B9FB1FF5F6565FF4A49 - 49FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF464444EF050505550000003A0000001D00000008000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F01242323844947 - 47FF494747FF494747FF494747FF494747FF4A4848FF5A5E5EFF8CA2A2FF309D - D0FF0C92D7FF0D98DFFF0D9DE6FF0E9FEAFF0EA2EDFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0F92D4FF2226 - 28FF323131FF403F3FFF474545FF494747FF494747FF494747FF494747FF4947 - 47FF484646FF385A6BFF0EA3EFFF0EA3EFFF1594D6FF444242FF484646FF4947 - 47FF494747FF494747FF494747FF484646FF444242FF373535FF243138FF0EA1 - EBFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2 - EEFF0EA1ECFF0E9EE8FF0D9AE3FF0D95DBFF0C8FD2FF6B9FB2FF606767FF4A49 - 49FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF1F1E1E91000000450000002A00000010000000020000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F01242323844947 - 47FF494747FF494747FF494747FF494747FF4A4848FF5A5E5EFF8CA1A1FF319D - D0FF0C92D7FF0D98DFFF0D9DE6FF0E9FEAFF0EA2EDFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF165C - 7FFF2A2828FF393838FF444242FF484646FF494747FF494747FF494747FF4947 - 47FF494747FF474545FF2182B3FF0EA3EFFF2677A0FF464444FF494747FF4947 - 47FF494747FF494747FF494747FF474545FF403E3EFF312F2FFF195C7EFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2 - EEFF0EA1ECFF0E9EE8FF0D9AE3FF0D95DBFF0C8FD2FF6B9FB2FF606767FF4A49 - 49FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF403E3EDA0000004E000000360000001A000000070000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F01242323844947 - 47FF494747FF494747FF494747FF494747FF494747FF5A5D5DFF8B9F9FFF349F - D1FF0C92D7FF0D98DFFF0D9DE6FF0E9FEAFF0EA2EDFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0E9A - E1FF20292DFF312F2FFF3F3D3DFF474545FF494747FF494747FF494747FF4947 - 47FF494747FF484646FF40535DFF0FA0E9FF395D6FFF484646FF494747FF4947 - 47FF494747FF494747FF494747FF454343FF3B3939FF2A2828FF108ECEFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2 - EEFF0EA1ECFF0E9EE8FF0D9AE3FF0D95DBFF0C8FD2FF6E9FB0FF5F6565FF4A49 - 49FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF1616167600000042000000260000000D1211 - 1101000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000007F7F7F01242323834947 - 47FF494747FF494747FF494747FF494747FF494747FF585B5BFF879B9BFF3EA3 - D1FF0C92D6FF0D98DFFF0D9CE5FF0E9FEAFF0EA2EDFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF156893FF282626FF383636FF434242FF484646FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF2C7398FF484849FF494747FF494747FF4947 - 47FF494747FF494747FF484646FF424040FF343333FF1F3F50FF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2 - EEFF0EA1ECFF0E9EE8FF0D9AE2FF0D95DBFF0C8ED1FF739FACFF5D6363FF4A48 - 48FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF353333C20000004B00000032000000160000 - 0005000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000002423237B4947 - 47FF494747FF494747FF494747FF494747FF494747FF565858FF839595FF49A7 - D0FF0C92D6FF0D97DEFF0D9CE5FF0E9FE9FF0EA1EDFF0EA2EEFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA0EBFF1E323DFF2F2E2EFF3E3C3CFF464444FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF464444FF3D3C3CFF2E2D2DFF16709EFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2 - EEFF0EA0EBFF0E9EE7FF0D9AE1FF0D95DAFF0D8ED1FF7A9EA6FF5B6060FF4A48 - 48FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF484646FA0B0B0B620000003E000000210000 - 000A121111010000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000242323644947 - 47FF494747FF494747FF494747FF494747FF494747FF535555FF7D8E8EFF57AC - CFFF0C91D5FF0D97DDFF0D9CE4FF0E9FE9FF0EA1ECFF0EA2EEFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF1577AAFF2B2A2AFF3D3C3CFF4C4A4AFF525050FF545252FF5553 - 53FF565454FF565454FF575555FF565454FF555454FF555353FF545252FF5250 - 50FF514F4FFF4D4C4CFF474545FF393737FF262C30FF0E9CE5FF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2 - EDFF0EA0EBFF0D9EE7FF0D99E1FF0D94D9FF1291D0FF7D999EFF585C5CFF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF2A2929A7000000480000002E0000 - 0012000000030000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000002322224C4947 - 47FF494747FF494747FF494747FF494747FF494747FF515252FF778585FF69B0 - CBFF0C90D4FF0D96DCFF0D9BE3FF0E9EE8FF0EA1ECFF0EA2EEFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0FA3EFFF15A5EFFF1CA8 - F0FF20AAF0FF23ABF0FF304F5FFF403F3FFF4E4C4CFF575555FF595757FF5957 - 57FF595757FF595757FF595757FF595757FF595757FF595757FF595757FF5957 - 57FF595757FF585656FF525050FF434242FF2B5E79FF18A6EFFF12A4EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2 - EDFF0EA0EAFF0D9DE6FF0D98E0FF0D93D8FF1F95CFFF7D9293FF555757FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF464444EF030303520000003A0000 - 001D000000080000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000222121334947 - 47FF494747FF494747FF494747FF494747FF494747FF4F4E4EFF6F7B7BFF7DB5 - C5FF0C8FD2FF0D95DBFF0D9AE2FF0E9EE8FF0EA0EBFF0EA2EEFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF15A5EFFF1FA9F0FF26ACF0FF28ACF1FF28AC - F1FF28ACF1FF28ACF1FF2A92C7FF3C3B3BFF4A4949FF565454FF5C5A5AFF5D5B - 5BFF5D5B5BFF5D5B5BFF5D5B5BFF5D5B5BFF5D5B5BFF5D5B5BFF5D5B5BFF5D5B - 5BFF5D5B5BFF5A5858FF514F4FFF424141FF2B91C5FF28ACF1FF28ACF1FF23AB - F0FF1AA7EFFF11A4EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA1 - EDFF0E9FEAFF0D9CE6FF0D98DFFF0C92D7FF339BCDFF778787FF515353FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF1E1D1D8C000000450000 - 00290000000F0000000200000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000001010100F4947 - 47FF494747FF494747FF494747FF494747FF494747FF4C4B4BFF677171FF8EB6 - BEFF0E8FD1FF0D94DAFF0D99E1FF0D9EE7FF0EA0EBFF0EA2EDFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0FA3EFFF1AA7EFFF27ACF0FF2CAEF1FF2CAEF1FF2CAEF1FF2CAEF1FF2CAE - F1FF2CAEF1FF2CAEF1FF2CAEF1FF366279FF464545FF545252FF5C5B5BFF5F5D - 5DFF605E5EFF605E5EFF605E5EFF605E5EFF605E5EFF605E5EFF605E5EFF605E - 5EFF5F5D5DFF5A5959FF4F4E4EFF3E515BFF2CAEF1FF2CAEF1FF2CAEF1FF2CAE - F1FF2CAEF1FF2AAEF1FF21AAF0FF14A5EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA1 - ECFF0E9FE9FF0D9CE5FF0D97DDFF0C91D6FF459FC6FF707C7CFF4F4F4FFF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF3F3D3DD70000004D0000 - 0036000000190000000600000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000014846 - 46E8494747FF494747FF494747FF494747FF494747FF4B4949FF606767FF93AF - B1FF1F95D0FF0D93D8FF0D98E0FF0D9DE6FF0EA0EAFF0EA2EDFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF19A7 - EFFF2AADF0FF30B0F1FF30B0F1FF30B0F1FF30B0F1FF30B0F1FF30B0F1FF30B0 - F1FF30B0F1FF30B0F1FF30B0F1FF319FD7FF414547FF4F4E4EFF5B5A5AFF615F - 5FFF626161FF626161FF626161FF626161FF626161FF626161FF626161FF6261 - 61FF615F5FFF5A5858FF4D4B4BFF387B9EFF30B0F1FF30B0F1FF30B0F1FF30B0 - F1FF30B0F1FF30B0F1FF30B0F1FF2EAFF1FF23AAF0FF12A4EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA1 - ECFF0E9EE8FF0D9BE3FF0D96DCFF0C90D4FF5DA1BCFF677070FF4C4B4BFF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF141414720000 - 0041000000250000000D12111101000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000004745 - 45B9494747FF494747FF494747FF494747FF494747FF494848FF595D5DFF899E - 9EFF3EA3D0FF0C92D6FF0D97DEFF0D9CE5FF0E9FE9FF0EA1ECFF0EA2EEFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF13A5EFFF29ADF1FF35B1 - F2FF35B1F2FF35B1F2FF35B1F2FF35B1F2FF35B1F2FF35B1F2FF35B1F2FF35B1 - F2FF35B1F2FF35B1F2FF35B1F2FF35B1F2FF3C7491FF4C4B4BFF595858FF6261 - 61FF666464FF666464FF666464FF666464FF666464FF666464FF666464FF6664 - 64FF626161FF595858FF4B4C4CFF36A7E1FF35B1F2FF35B1F2FF35B1F2FF35B1 - F2FF35B1F2FF35B1F2FF35B1F2FF35B1F2FF35B1F2FF31B0F1FF1DA9F0FF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EDFF0EA0 - EBFF0D9EE7FF0D9AE2FF0D95DAFF0C8FD1FF75A1AEFF5F6565FF4A4949FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF343232BD0000 - 004B000000320000001600000005000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000003534 - 348D494747FF494747FF494747FF494747FF494747FF494747FF535555FF7B8B - 8BFF63B0CDFF0C90D4FF0D96DCFF0D9BE3FF0E9EE8FF0EA1ECFF0EA2EEFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF1BA8F0FF35B2F1FF39B3F2FF39B3 - F2FF39B3F2FF39B3F2FF39B3F2FF39B3F2FF39B3F2FF39B3F2FF39B3F2FF39B3 - F2FF39B3F2FF39B3F2FF39B3F2FF39B3F2FF39ACE7FF484F53FF565555FF6261 - 61FF686666FF696868FF696868FF696868FF696868FF696868FF696868FF6967 - 67FF636161FF585656FF46697BFF39B3F2FF39B3F2FF39B3F2FF39B3F2FF39B3 - F2FF39B3F2FF39B3F2FF39B3F2FF39B3F2FF39B3F2FF39B3F2FF39B3F2FF29AD - F1FF11A4EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA2EDFF0EA0 - EAFF0D9DE6FF0D98E0FF0D93D8FF1A93CFFF7F9799FF585B5BFF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF484646FA0A0A - 0A5F0000003D000000210000000A000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000002322 - 2252494747FF494747FF494747FF494747FF494747FF494747FF4E4E4EFF6D78 - 78FF88B8C3FF0C8FD1FF0D95DAFF0D99E1FF0D9EE7FF0EA0EBFF0EA2EDFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF22ABF0FF3CB4F2FF3DB5F2FF3DB5F2FF3DB5 - F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5 - F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF4485A6FF565555FF6462 - 62FF6B6969FF6D6B6BFF6D6B6BFF6D6B6BFF6D6B6BFF6D6B6BFF6D6B6BFF6B69 - 69FF636262FF565555FF4294BEFF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5 - F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5F2FF3DB5 - F2FF33B1F1FF13A5EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA1ECFF0E9F - E9FF0D9CE5FF0D97DEFF0C92D6FF3D9ECAFF768484FF515252FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF2827 - 27A4000000470000002D00000012000000030000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001111 - 1111494747FF494747FF494747FF494747FF494747FF494747FF4B4A4AFF6167 - 67FF92AEB0FF2799D0FF0C93D7FF0D98DFFF0D9CE6FF0E9FEAFF0EA1EDFF0EA2 - EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF25ACF0FF41B6F2FF42B7F2FF42B7F2FF42B7F2FF42B7 - F2FF42B7F2FF42B7F2FF42B7F2FF42B7F2FF42B7F2FF42B7F2FF42B7F2FF42B7 - F2FF42B7F2FF42B7F2FF42B7F2FF42B7F2FF42B7F2FF43B3EDFF58676FFF6866 - 66FF6E6D6DFF716F6FFF716F6FFF716F6FFF716F6FFF716F6FFF706E6EFF6C6B - 6BFF636161FF545E64FF42B5F0FF42B7F2FF42B7F2FF42B7F2FF42B7F2FF42B7 - F2FF42B7F2FF42B7F2FF42B7F2FF42B7F2FF42B7F2FF42B7F2FF42B7F2FF42B7 - F2FF42B7F2FF39B3F2FF13A5EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EDFF0EA0EBFF0E9E - E8FF0D9AE3FF0D95DBFF0C90D3FF65A4BCFF687070FF4D4C4CFF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4543 - 43EC03030352000000390000001C000000080000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000484646D0494747FF494747FF494747FF494747FF494747FF494848FF575A - 5AFF829595FF54ABD0FF0C91D4FF0D96DCFF0D9BE4FF0E9FE8FF0EA1ECFF0EA2 - EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF22AAF0FF45B8F2FF47B8F3FF47B8F3FF47B8F3FF47B8F3FF47B8 - F3FF47B8F3FF47B8F3FF47B8F3FF47B8F3FF47B8F3FF47B8F3FF47B8F3FF47B8 - F3FF47B8F3FF47B8F3FF47B8F3FF47B8F3FF47B8F3FF47B8F3FF519BC1FF6D6C - 6CFF737272FF747373FF747373FF747373FF747373FF747373FF737171FF6D6C - 6CFF616161FF50839DFF47B8F3FF47B8F3FF47B8F3FF47B8F3FF47B8F3FF47B8 - F3FF47B8F3FF47B8F3FF47B8F3FF47B8F3FF47B8F3FF47B8F3FF47B8F3FF47B8 - F3FF47B8F3FF47B8F3FF39B3F1FF11A4EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA2EDFF0EA0EAFF0D9D - E6FF0D99E0FF0D94D9FF1291D0FF7E9EA5FF5C6161FF4A4949FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF1D1C1C8900000044000000290000000F0000000200000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000036343488494747FF494747FF494747FF494747FF494747FF494747FF5050 - 50FF707C7CFF82B7C5FF0C8FD1FF0D95DAFF0D99E1FF0D9DE7FF0EA0EAFF0EA2 - EDFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF17A6EFFF47B8F2FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBA - F3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBA - F3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF50B2E4FF7472 - 72FF777676FF787676FF787676FF787676FF787676FF787676FF757474FF6E6C - 6CFF616060FF4EA9D8FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBA - F3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBAF3FF4CBA - F3FF4CBAF3FF4CBAF3FF4CBAF3FF31B0F1FF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA1ECFF0E9FE9FF0D9C - E5FF0D97DEFF0C92D6FF379DCCFF798889FF535555FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF3D3C3CD20000004D00000035000000190000000600000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00002322223D494747FF494747FF494747FF494747FF494747FF494747FF4C4A - 4AFF616767FF92ADAEFF2D9CD0FF0C92D7FF0D97DEFF0D9CE5FF0E9FE9FF0EA1 - ECFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF3DB5F2FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BC - F3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BC - F3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF619CBBFF7978 - 78FF7C7B7BFF7C7B7BFF7C7B7BFF7C7B7BFF7C7B7BFF7B7A7AFF777676FF6D6C - 6CFF5E7581FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BC - F3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BCF3FF51BC - F3FF51BCF3FF51BCF3FF51BCF3FF50BCF3FF1DA9F0FF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA2EDFF0EA0EBFF0D9EE7FF0D9A - E2FF0D95DBFF0C8FD2FF6AA5BAFF677171FF4D4D4DFF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF1413137000000041000000240000000C00000001000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000484646E3494747FF494747FF494747FF494747FF494747FF4948 - 48FF555858FF7D8D8DFF68B2CDFF0C90D3FF0D95DBFF0D9AE2FF0E9EE8FF0EA0 - EBFF0EA2EDFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF20AA - F0FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BE - F4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BE - F4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF728995FF7F7D - 7DFF807E7EFF807E7EFF807E7EFF807E7EFF807E7EFF7E7D7DFF787777FF6D6C - 6CFF5C9AB9FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BE - F4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF57BE - F4FF57BEF4FF57BEF4FF57BEF4FF57BEF4FF45B7F2FF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA1ECFF0E9FE9FF0D9CE6FF0D98 - DFFF0C93D7FF1F95CFFF80999CFF595D5DFF4A4848FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF333131BA0000004A000000310000001500000004000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000003635358C494747FF494747FF494747FF494747FF494747FF4947 - 47FF4E4E4EFF687171FF93B6BBFF1B94D0FF0C93D8FF0D98DFFF0D9CE6FF0E9F - E9FF0EA1ECFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF44B8 - F2FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0 - F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0 - F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5FB8E7FF807F7FFF8382 - 82FF848282FF848282FF848282FF848282FF838282FF807F7FFF787878FF6C6F - 71FF5CBCEDFF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0 - F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0 - F4FF5CC0F4FF5CC0F4FF5CC0F4FF5CC0F4FF5BC0F4FF1EA9F0FF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA2EDFF0EA0EBFF0E9EE8FF0D9AE3FF0D96 - DCFF0C90D3FF57A4C3FF707C7CFF505151FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF484646FA0909095C0000003D000000200000000A000000000000 - 0000000000000000000000000001000000000000000000000000000000000000 - 00000000000023222228494747FF494747FF494747FF494747FF494747FF4947 - 47FF4A4848FF595C5CFF839696FF5BAECFFF0C90D4FF0D96DCFF0D9AE3FF0E9E - E8FF0EA0EBFF0EA2EDFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF14A5EFFF5DC1 - F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2 - F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2 - F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF6FA8C5FF868484FF8887 - 87FF888787FF888787FF888787FF888787FF878686FF828181FF797878FF6A8E - A1FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2 - F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2 - F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF61C2F4FF3AB3F2FF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA1ECFF0E9FE9FF0D9CE6FF0D98DFFF0C93 - D8FF1893D0FF809FA6FF5E6363FF4B4A4AFF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF272626A1000000470000002C00000012000000030000 - 0000000000000000000000000002000000000000000000000000000000000000 - 00000000000000000000484646C0494747FF494747FF494747FF494747FF4947 - 47FF494747FF4F4F4FFF6B7676FF90B8BEFF1692D0FF0C93D8FF0D98DFFF0D9C - E5FF0E9FE9FF0EA1ECFF0EA2EEFF0EA2EEFF0EA3EFFF0EA3EFFF25ACF0FF66C4 - F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4 - F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4 - F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF7F98A5FF8B8A8AFF8C8A - 8AFF8C8A8AFF8C8A8AFF8C8A8AFF8C8A8AFF8A8888FF838282FF797878FF69AF - D3FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4 - F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4 - F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF66C4F5FF52BCF3FF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA2EEFF0EA2EDFF0EA0EBFF0D9EE7FF0D9AE2FF0D96DBFF0C90 - D3FF50A2C5FF738080FF525353FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF444242E70000004F000000390000001C000000070000 - 0000000000000000000000000003000000000000000000000000000000000000 - 0000000000000000000024232350494747FF494747FF494747FF494747FF4947 - 47FF494747FF4B4949FF595D5DFF849797FF60B0CFFF0C90D3FF0D95DBFF0D9A - E2FF0D9DE7FF0EA0EAFF0EA1EDFF0EA2EEFF0EA3EFFF0EA3EFFF34B1F1FF6CC6 - F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6 - F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6 - F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6EC2EDFF8E8F8FFF8F8E8EFF908F - 8FFF908F8FFF908F8FFF908F8FFF8F8E8EFF8C8B8BFF848383FF78848BFF6CC6 - F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6 - F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6 - F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF6CC6F5FF63C3F4FF0EA3EFFF0EA3 - EFFF0EA2EEFF0EA2EDFF0EA1ECFF0E9FE9FF0D9CE5FF0D98DFFF0C93D7FF1A94 - CFFF82A0A5FF5F6464FF4C4B4BFF494747FF494747FF494747FF4A4848FF4B49 - 49FF4B4A4AFF4B4A4AFF4B4A4AFF4B4A4AFF4B4A4AFF4B4A4AFF4B4A4AFF4B4A - 4AFF4B4A4AFF4B4A4AFF4B4A4AFF4A4949FF4A4848FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF1C1B1B8600000044000000280000000E0000 - 0002000000000000000000000002000000000000000000000000000000000000 - 0000000000000000000011101004484646DB494747FF494747FF494747FF4947 - 47FF494747FF494747FF4F4F4FFF697272FF92B5B9FF2297D0FF0C92D6FF0D97 - DEFF0D9BE4FF0E9FE8FF0EA0EBFF0EA2EDFF0EA2EEFF0EA3EFFF3EB5F2FF71C9 - F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF71C9 - F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF78B7D7FF7DB3CFFF7EB5D1FF7EB5 - D1FF7EB5D1FF7EB5D1FF7EB5D1FF7EB5D1FF85AABDFF949393FF949393FF9493 - 93FF949393FF949393FF949393FF939292FF8E8D8DFF858484FF77A5BDFF71C9 - F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF71C9 - F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF71C9 - F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF71C9F6FF70C9F5FF0EA3EFFF0EA3 - EFFF0EA2EEFF0EA1EDFF0E9FEAFF0D9DE7FF0D99E1FF0D95DAFF0C8FD2FF5FA6 - C2FF717C7CFF515252FF494747FF494747FF4A4848FF4E4D4DFF545656FF5A5D - 5DFF5C6161FF5C6161FF5C6161FF5C6161FF5C6161FF5C6161FF5C6161FF5C61 - 61FF5C6161FF5C6161FF5B6060FF585C5CFF525353FF4C4B4BFF494747FF4947 - 47FF494747FF494747FF494747FF3D3B3BCF0000004D00000035000000180000 - 0005000000000000000000000002000000000000000000000000000000000000 - 000000000000000000000000000047454560494747FF494747FF494747FF4947 - 47FF494747FF494747FF4A4848FF575A5AFF7D8D8DFF75B6CCFF0C8FD1FF0D94 - D9FF0D99E0FF0D9CE6FF0E9FE9FF0EA1ECFF0EA2EDFF0EA2EEFF3EB5F2FF77CB - F6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF77CB - F6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF889CA7FF949393FF989797FF9997 - 97FF999797FF999797FF999797FF999797FF999797FF999797FF999797FF9997 - 97FF999797FF999797FF989797FF969595FF908F8FFF868787FF78C3E9FF77CB - F6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF77CB - F6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF77CB - F6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF77CBF6FF73C9F5FF0EA3EFFF0EA2 - EEFF0EA1EDFF0EA0EBFF0E9EE8FF0D9BE3FF0D96DDFF0C91D6FF2C9ACDFF8098 - 9AFF5B6060FF4B4A4AFF494747FF494747FF4C4B4BFF50626AFF6699AFFF75A4 - B8FF79A8BBFF79A9BCFF79A9BCFF79A9BCFF79A9BCFF79A9BCFF79A9BCFF79A9 - BCFF79A9BCFF79A9BCFF78A7BAFF759EAFFF6A6F6FFF515252FF4A4848FF4947 - 47FF494747FF494747FF494747FF494747FF1312126D00000040000000240000 - 000C000000010000000000000002000000000000000000000000000000000000 - 000000000000000000000000000048464604494747DB494747FF494747FF4947 - 47FF494747FF494747FF494747FF4D4C4CFF626969FF90A8A9FF46A6D0FF0C90 - D4FF0D96DBFF0D9AE2FF0D9EE7FF0EA0EAFF0EA1EDFF0EA2EEFF34B1F1FF7DCD - F6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCD - F6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF8DA0AAFF999898FF9C9B9BFF9D9C - 9CFF9D9C9CFF9D9C9CFF9D9C9CFF9D9C9CFF9D9C9CFF9D9C9CFF9D9C9CFF9D9C - 9CFF9D9C9CFF9D9C9CFF9C9B9BFF999898FF919090FF859DA9FF7DCDF6FF7DCD - F6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCD - F6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCD - F6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF7DCDF6FF6BC7F5FF0EA2EEFF0EA2 - EDFF0EA1ECFF0E9FE9FF0D9CE5FF0D98DFFF0C93D8FF1391D1FF79A8B5FF6871 - 71FF4F4F4FFF494747FF494747FF494747FF4D4D4DFF537684FF70CCF6FF80D1 - F7FF80D1F7FF80D1F7FF80D1F7FF80D1F7FF80D1F7FF80D1F7FF80D1F7FF80D1 - F7FF80D1F7FF80D1F7FF80D1F7FF83CAEBFF7D8383FF565858FF4A4848FF4947 - 47FF494747FF494747FF494747FF494747FF302E2EB70000004A000000300000 - 0014000000040000000000000002000000000000000000000000000000000000 - 00000000000000000000000000000000000048464660494747FF494747FF4947 - 47FF494747FF494747FF494747FF4A4848FF525353FF6F7B7BFF90B8BFFF1C94 - CFFF0C92D7FF0D97DDFF0D9BE3FF0E9EE8FF0EA0EBFF0EA1EDFF22AAEFFF82CF - F7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF82CF - F7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF92A4AEFF9D9C9CFFA1A0A0FFA1A0 - A0FFA1A0A0FFA1A0A0FFA1A0A0FFA1A0A0FFA1A0A0FFA1A0A0FFA1A0A0FFA1A0 - A0FFA1A0A0FFA1A0A0FFA09F9FFF9B9A9AFF929191FF86B9D3FF82CFF7FF82CF - F7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF82CF - F7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF82CF - F7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF82CFF7FF5DC0F4FF0EA2EDFF0EA1 - ECFF0E9FE9FF0D9DE6FF0D99E1FF0D95DAFF0C8FD3FF54A4C6FF778686FF5558 - 58FF4A4848FF494747FF494747FF494747FF4D4D4DFF557785FF73CDF6FF80D1 - F7FF80D1F7FF80D1F7FF80D1F7FF80D1F7FF80D1F7FF80D1F7FF80D1F7FF80D1 - F7FF80D1F7FF80D1F7FF80D1F7FF82C9EBFF7B8181FF555757FF4A4848FF4947 - 47FF494747FF494747FF494747FF494747FF474545F70909095B0000003C0000 - 001F000000090000000000000001000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000484646CB494747FF4947 - 47FF494747FF494747FF494747FF494747FF4B4A4AFF595C5CFF7E8F8FFF7AB8 - CBFF0E8FD1FF0D94D8FF0D98DFFF0D9CE5FF0E9FE8FF0EA0EBFF0FA2EDFF74C9 - F5FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF88D1 - F7FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF96A8B1FFA1A0A0FFA4A3A3FFA5A4 - A4FFA5A4A4FFA5A4A4FFA5A4A4FFA5A4A4FFA5A4A4FFA5A4A4FFA5A4A4FFA5A4 - A4FFA5A4A4FFA4A3A3FFA2A1A1FF9C9B9BFF93989BFF88D0F5FF88D1F7FF88D1 - F7FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF88D1 - F7FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF88D1 - F7FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF88D1F7FF38B2F0FF0EA1ECFF0E9F - EAFF0D9DE7FF0D9AE2FF0D96DBFF0C91D5FF339BCDFF829A9CFF5D6262FF4C4B - 4BFF494747FF494747FF494747FF494747FF4C4B4BFF566469FF65BEE6FF80D1 - F7FF80D1F7FF80D1F7FF8EB8CAFF8AA7ACFF7C969CFF738B91FF71888EFF7188 - 8EFF71888EFF71888EFF70878DFF6B7E84FF5F6363FF4F5050FF494848FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF2423239C000000460000 - 002B000000100000000300000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000083A2A238494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF4D4D4DFF606767FF8BA1 - A1FF5CAECFFF0C8FD2FF0D94D9FF0D99E0FF0D9CE5FF0E9FE9FF0EA0EBFF4BB9 - F1FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3 - F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3F7FF9BACB5FFA5A4A4FFA8A7A7FFA8A7 - A7FFA8A7A7FFA8A7A7FFA8A7A7FFA8A7A7FFA8A7A7FFA8A7A7FFA8A7A7FFA8A7 - A7FFA8A7A7FFA8A7A7FFA4A3A3FF9D9D9DFF92B2C2FF8DD3F7FF8DD3F7FF8DD3 - F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3 - F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3 - F7FF8DD3F7FF8DD3F7FF8DD3F7FF8DD3F7FF82CFF6FF16A4EDFF0EA0EAFF0D9E - E7FF0D9BE3FF0D97DDFF0C92D6FF1E95CFFF81A6ADFF666E6EFF4F4F4FFF4947 - 47FF494747FF494747FF494747FF494747FF4A4848FF525353FF5D7B86FF71CB - F4FF80D1F7FF80D1F7FF81CEF2FF91A7AEFF717E7EFF5E6464FF565959FF5557 - 57FF555757FF555757FF545757FF525454FF4E4F4FFF4B4949FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF434141E50000004E0000 - 0036000000190000000600000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000004947479B4947 - 47FF494747FF494747FF494747FF494747FF494747FF4A4848FF505151FF6770 - 70FF92ADAFFF44A5D0FF0C90D4FF0D95DAFF0D99E1FF0D9CE6FF0E9FE9FF19A5 - ECFF86D0F6FF92D5F7FF92D5F7FF92D5F8FF92D5F8FF92D5F8FF92D5F8FF92D5 - F8FF92D5F8FF92D5F8FF92D5F8FF92D5F8FF9FAEB7FFA7A6A6FFA9A8A8FFA9A8 - A8FFA9A8A8FFA9A8A8FFA9A8A8FFA9A8A8FFA9A8A8FFA9A8A8FFA9A8A8FFA9A8 - A8FFA9A8A8FFA8A7A7FFA4A4A4FF9F9E9EFF94CBE7FF92D5F8FF92D5F8FF92D5 - F8FF92D5F8FF92D5F8FF92D5F8FF92D5F8FF92D5F8FF92D5F8FF92D5F8FF92D5 - F8FF92D5F8FF92D5F8FF92D5F8FF92D5F8FF92D5F8FF92D5F8FF92D5F8FF92D5 - F8FF92D5F8FF92D5F8FF92D5F7FF92D5F7FF50BBF1FF0EA0EAFF0D9EE7FF0D9B - E3FF0D97DEFF0C92D7FF1391D0FF79AAB9FF6E7979FF535454FF4A4848FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF4C4A4AFF565959FF5E91 - A5FF79CFF6FF80D1F7FF80D1F7FF84CBEBFF879496FF616767FF505151FF4A49 - 49FF4A4848FF4A4848FF4A4848FF494848FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF1C1B1B820000 - 003F000000220000000A00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000A0D0D0104947 - 47E3494747FF494747FF494747FF494747FF494747FF494747FF4A4848FF5354 - 54FF6E7979FF93B5B9FF319ED0FF0C91D4FF0D95DBFF0D99E1FF0D9CE6FF0E9F - E9FF47B7EFFF98D7F7FF98D7F8FF98D7F8FF98D7F8FF98D7F8FF98D7F8FF98D7 - F8FF98D7F8FF98D7F8FF98D7F8FF98D7F8FFA0B0B8FFA5A5A5FFA6A6A6FFA6A6 - A6FFA6A6A6FFA6A6A6FFA6A6A6FFA6A6A6FFA6A6A6FFA6A6A6FFA6A6A6FFA6A6 - A6FFA6A6A6FFA6A5A5FFA3A3A3FF9EACB3FF98D7F8FF98D7F8FF98D7F8FF98D7 - F8FF98D7F8FF98D7F8FF98D7F8FF98D7F8FF98D7F8FF98D7F8FF98D7F8FF98D7 - F8FF98D7F8FF98D7F8FF98D7F8FF98D7F8FF98D7F8FF98D7F8FF98D7F8FF98D7 - F8FF98D7F8FF98D7F8FF98D7F7FF83CFF5FF17A3EAFF0D9EE7FF0D9BE3FF0D97 - DEFF0C93D8FF0E90D1FF6BAAC1FF758383FF565858FF4B4949FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF4D4C4CFF5A5E - 5EFF5FA5C2FF7ED0F7FF80D1F7FF80D1F7FF89C2DCFF7C8686FF5B6060FF4E4D - 4DFF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF383737C70000 - 00470000002B0000001000000002000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000006674 - 744C494747FF494747FF494747FF494747FF494747FF494747FF494747FF4B49 - 49FF555858FF738080FF91B8BEFF2899CFFF0C91D5FF0D95DBFF0D99E1FF0D9C - E5FF11A0E9FF6FC6F3FF9ED9F7FF9ED9F8FF9ED9F8FF9EDAF8FF9EDAF8FF9EDA - F8FF9EDAF8FF9EDAF8FF9EDAF8FF9EDAF8FFA3ABAFFFA4A4A4FFA5A4A4FFA5A4 - A4FFA5A4A4FFA5A4A4FFA5A4A4FFA5A4A4FFA5A4A4FFA5A4A4FFA5A4A4FFA5A4 - A4FFA5A4A4FFA4A4A4FFA3A3A3FFA0C3D5FF9EDAF8FF9EDAF8FF9EDAF8FF9EDA - F8FF9EDAF8FF9EDAF8FF9EDAF8FF9EDAF8FF9EDAF8FF9EDAF8FF9EDAF8FF9EDA - F8FF9EDAF8FF9EDAF8FF9EDAF8FF9EDAF8FF9EDAF8FF9EDAF8FF9EDAF8FF9ED9 - F8FF9ED9F8FF9ED9F8FF97D6F6FF32AEECFF0D9EE7FF0D9BE3FF0D97DEFF0C93 - D8FF0D8FD1FF61A8C4FF7A8A8AFF595D5DFF4C4B4BFF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF4A4848FF4F4E - 4EFF5D6668FF65B9DCFF80D1F7FF80D1F7FF80D1F7FF8DB7C9FF737D7DFF575B - 5BFF4C4B4BFF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF484646F90707 - 0755000000330000001600000004000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000066757597494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF4C4B4BFF575B5BFF768484FF93BAC0FF2899CFFF0C91D4FF0D95DAFF0D99 - E0FF0D9CE5FF1BA3E9FF86CFF4FFA3DBF8FFA3DBF8FFA3DBF8FFA3DCF9FFA3DC - F9FFA3DCF9FFA3DCF9FFA3DCF9FFA3DCF9FFA6ADB1FFA7A7A7FFA7A7A7FFA7A7 - A7FFA7A7A7FFA7A7A7FFA7A7A7FFA7A7A7FFA7A7A7FFA7A7A7FFA7A7A7FFA7A7 - A7FFA7A7A7FFA7A7A7FFA7A8A9FFA3D9F5FFA3DCF9FFA3DCF9FFA3DCF9FFA3DC - F9FFA3DCF9FFA3DCF9FFA3DCF9FFA3DCF9FFA3DCF9FFA3DCF9FFA3DCF9FFA3DC - F9FFA3DCF9FFA3DCF9FFA3DCF9FFA3DCF9FFA3DCF9FFA3DCF9FFA3DCF9FFA3DB - F8FFA3DBF8FFA1DAF7FF4BB7EEFF0D9DE6FF0D9AE2FF0D97DDFF0C93D8FF0E8F - D1FF61A9C5FF7D8D8EFF5B6060FF4C4B4BFF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4A48 - 48FF515252FF5E7379FF6DC5ECFF80D1F7FF80D1F7FF81D0F5FF8EA9B3FF6A74 - 74FF545656FF4B4A4AFF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF1E1D - 1D860000003A0000001B00000006000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000A0D1D108484646CF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF4C4B4BFF585B5BFF768484FF92B8BEFF329ED0FF0C90D4FF0D94 - D9FF0D98DFFF0D9BE3FF1EA4E9FF8DD1F4FFA9DDF8FFA9DDF8FFA9DDF9FFA9DE - F9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DE - F9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DE - F9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DE - F9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DE - F9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DEF9FFA9DDF9FFA9DDF9FFA9DD - F8FFA5DBF7FF54BAEFFF0D9CE6FF0D99E1FF0D96DCFF0C92D7FF0F8FD0FF67AB - C4FF7C8D8EFF5C6161FF4D4C4CFF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF4B4A4AFF545656FF5E8492FF75CDF5FF81D1F7FF81D1F7FF83CDF0FF8B9C - A0FF646B6BFF515252FF4A4848FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF3635 - 35BD0000003E0000001F00000008000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000A0D1D124494747EF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF4C4B4BFF575B5BFF738080FF93B5B9FF44A5D0FF0C8F - D2FF0D94D8FF0D97DDFF0D9AE2FF1CA2E7FF81CCF3FFAEDFF8FFAEDFF8FFAEDF - F9FFAEDFF9FFAEE0F9FFAEE0FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0 - FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0 - FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0 - FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0 - FAFFAEE0FAFFAEE0FAFFAEE0FAFFAEE0F9FFAEDFF9FFAEDFF9FFAEDFF8FFA4DB - F7FF4AB6EDFF0D9BE4FF0D99E0FF0D95DBFF0C91D5FF1993D0FF73ADC0FF7989 - 89FF5B5F5FFF4D4C4CFF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF4C4B4BFF575B5BFF5F99AFFF7CD0F6FF81D1F7FF81D1F7FF87C8 - E6FF838F91FF5F6565FF4F4F4FFF4A4848FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4543 - 43E900000041000000220000000A000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000066757544494747FB494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF4C4B4BFF555858FF6E7979FF92ADAFFF5CAE - CFFF0E8FD1FF0C92D7FF0D96DBFF0D99E0FF159EE5FF65C1F0FFAEDFF7FFB3E1 - F9FFB3E1F9FFB3E2F9FFB3E2FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2 - FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2 - FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2 - FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2FAFFB3E2 - FAFFB3E2FAFFB3E2FAFFB3E2F9FFB3E1F9FFB3E1F9FFB3E1F8FF97D5F5FF30AB - E9FF0D9AE2FF0D97DEFF0D94D9FF0C90D4FF2598CFFF80ACB7FF748181FF585C - 5CFF4C4B4BFF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF4E4D4DFF5B6060FF61ACCBFF80D0F7FF81D1F7FF81D1 - F7FF8BBFD6FF7A8484FF5A5F5FFF4D4D4DFF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF0A09094D000000230000000A000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000039586867494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF4B4949FF535454FF677070FF8BA1 - A1FF7AB8CBFF1B94CFFF0C90D4FF0D94D9FF0D97DEFF0D9AE2FF36ADE9FF96D4 - F4FFB8E3F8FFB8E3F9FFB8E3FAFFB8E3FAFFB8E3FAFFB8E4FAFFB8E4FAFFB8E4 - FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E4 - FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E4 - FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E4FAFFB8E3 - FAFFB8E3FAFFB8E3FAFFB8E3F9FFB8E3F9FFAFDFF7FF68C1EFFF18A0E5FF0D99 - E0FF0D96DBFF0C92D7FF0D8FD1FF45A3CCFF85A5AAFF6D7777FF555858FF4C4B - 4BFF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF4A4848FF504F4FFF606B6EFF8DCCE8FFA4DEF9FFA2DD - F9FF9DDBF9FF9AB8C4FF707A7AFF565959FF4B4A4AFF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF1616165D000000210000000A000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000003958687F494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF4A4848FF505151FF6067 - 67FF7E8F8FFF90B8BFFF46A6D0FF0C8FD1FF0C92D6FF0D95DBFF0D98DFFF149D - E3FF52B8ECFFA3DAF6FFBEE5F9FFBEE5F9FFBEE5FAFFBEE5FAFFBEE6FAFFBEE6 - FAFFBEE6FBFFBEE6FBFFBEE6FBFFBEE6FBFFBEE6FBFFBEE6FBFFBEE6FBFFBEE6 - FBFFBEE6FBFFBEE6FBFFBEE6FBFFBEE6FBFFBEE6FBFFBEE6FBFFBEE6FBFFBEE6 - FBFFBEE6FBFFBEE6FBFFBEE6FBFFBEE6FBFFBEE6FBFFBEE6FAFFBEE6FAFFBEE5 - FAFFBEE5F9FFBEE5F9FFB8E3F8FF80CBF2FF2AA7E7FF0D99E1FF0D96DDFF0D94 - D9FF0C90D4FF1D95D0FF6DADC4FF839798FF656C6CFF525353FF4B4949FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF4A4949FF525353FF677C82FF9CD9F5FFAAE0 - FAFFAAE0FAFFA9DFF9FF96A8AEFF666F6FFF515252FF4A4848FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF1D1C1C6B0000001E00000008000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000003958688F494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF4A4848FF4D4D - 4DFF595C5CFF6F7B7BFF8FA8A9FF77B7CCFF2297D0FF0C90D3FF0C93D8FF0D96 - DCFF0D98DFFF159EE3FF4DB6EBFF99D6F5FFC2E7F9FFC3E7FAFFC3E7FAFFC3E7 - FAFFC3E7FAFFC3E7FBFFC3E7FBFFC3E8FBFFC3E8FBFFC3E8FBFFC3E8FBFFC3E8 - FBFFC3E8FBFFC3E8FBFFC3E8FBFFC3E8FBFFC3E8FBFFC3E8FBFFC3E8FBFFC3E8 - FBFFC3E8FBFFC3E7FBFFC3E7FBFFC3E7FAFFC3E7FAFFC3E7FAFFC3E7FAFFC3E7 - F9FFB4E1F7FF76C7F0FF2CA8E7FF0D99E1FF0D97DEFF0D94DAFF0C91D5FF0E8F - D1FF48A4CDFF88ABB1FF748282FF5C6161FF4F4F4FFF4A4848FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF4B4A4AFF555757FF71939FFFA9E0 - FAFFAFE1FAFFAFE1FAFFACD9EFFF848F8FFF5C6060FF4C4C4CFF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF1B1A1A620000001900000005000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000003958688F4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF4B4A4AFF525353FF626868FF7C8D8DFF93B5B9FF60B0CFFF1792D0FF0C90 - D4FF0C93D8FF0D95DBFF0D97DEFF0D99E1FF30A9E7FF6DC3EFFFA4DAF6FFC6E8 - F9FFC8E9FAFFC8E9FAFFC8E9FAFFC8E9FBFFC8E9FBFFC8E9FBFFC8E9FBFFC8E9 - FBFFC8E9FBFFC8E9FBFFC8E9FBFFC8E9FBFFC8E9FBFFC8E9FBFFC8E9FBFFC8E9 - FBFFC8E9FBFFC8E9FBFFC8E9FAFFC8E9FAFFC8E9FAFFBAE3F8FF8ED1F3FF4AB4 - EBFF189FE4FF0D98E0FF0D96DDFF0D94D9FF0C91D6FF0C8FD1FF349ECFFF7CAF - BEFF819393FF666E6EFF545656FF4C4B4BFF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF4C4C4CFF5A5D5DFF84B2 - C4FFB3E3FAFFB4E3FAFFB4E3FAFFA1B8C1FF687171FF515252FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF1515154A0000001400000004000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000003958 - 687B494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF4A4848FF4D4C4CFF575959FF697272FF849797FF90B7BEFF5CAE - CFFF1B94D0FF0C90D3FF0C92D7FF0D95DAFF0D96DCFF0D98DFFF0D99E1FF28A6 - E6FF4EB6EBFF82CCF2FFA3DAF5FFC0E6F8FFCDEBFAFFCDEBFAFFCDEBFAFFCDEB - FBFFCDEBFBFFCDEBFBFFCDEBFBFFCDEBFBFFCDEBFBFFCDEBFBFFCDEBFAFFCDEB - FAFFCAEAF9FFB2E0F7FF94D3F4FF68C1EFFF3BAEE9FF159EE4FF0D99E0FF0D97 - DEFF0D95DBFF0D93D8FF0C91D5FF0C8FD1FF379FCFFF76AFC2FF879D9EFF6D78 - 78FF595D5DFF4E4E4EFF4A4848FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF4B4949FF4D4D4DFF4F50 - 50FF4F5050FF4D4D4DFF4B4949FF494747FF494747FF4A4848FF4F4F4FFF6472 - 75FFA8DDF5FFB8E5FBFFB8E5FBFFAFD4E4FF7B8484FF565858FF4A4848FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4846 - 46FC0404042B0000000E00000002000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000039586860494747FB494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF4A4848FF4F4F4FFF595D5DFF6B7575FF8396 - 96FF93B6BBFF67B1CDFF2D9CD0FF0C8FD1FF0C91D4FF0C93D7FF0D95DAFF0D96 - DCFF0D97DEFF0D98E0FF0D99E1FF109BE3FF26A5E6FF3BAFE9FF4DB6EBFF5BBB - EDFF66C0EFFF6CC3EFFF6EC4EFFF69C2EFFF61BEEEFF55B9ECFF44B2EAFF31AA - E8FF1AA0E4FF0D9AE2FF0D99E0FF0D98DFFF0D97DDFF0D95DBFF0D94D8FF0C92 - D6FF0C90D3FF1692D0FF47A4CEFF7FB1BFFF869C9DFF6F7A7AFF5C6161FF5051 - 51FF4B4949FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF4B4949FF515252FF5D6161FF656D - 6DFF656D6DFF5D6262FF525252FF4B4949FF494747FF494747FF4A4949FF585C - 5CFF93C0D2FFBDE7FBFFBDE7FBFFB7E0F3FF848D8DFF595D5DFF4A4949FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4543 - 43D80000001D0000000800000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000039586840494747E7494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF4B4949FF4F4F4FFF595C - 5CFF687171FF7D8D8DFF91ADAEFF83B7C5FF54ABCFFF2799D0FF0C8FD1FF0C90 - D4FF0C92D6FF0D93D8FF0D94DAFF0D95DBFF0D96DCFF0D97DDFF0D97DEFF0D98 - DFFF0D98DFFF0D98DFFF0D98DFFF0D98DFFF0D98DFFF0D97DEFF0D97DEFF0D97 - DDFF0D95DBFF0D95DAFF0D94D9FF0C92D7FF0C91D5FF0C8FD2FF1592D0FF3BA2 - D0FF69ADC7FF8BAEB4FF819393FF6B7676FF5B5F5FFF505151FF4B4A4AFF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF4C4C4CFF637C87FFAEDCF0FFB8E0 - F2FFB8E0F2FF95A8AFFF5E6464FF4E4E4EFF494747FF494747FF4A4848FF5658 - 58FF8BACB7FFC2E8FBFFC2E8FBFFBCE1F3FF868F8FFF5A5E5EFF4A4949FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF302F - 2F9C000000120000000300000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000001B7AAA1C494747C3494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4A48 - 48FF4E4E4EFF555858FF616767FF707C7CFF829595FF92AEAFFF88B7C3FF63B0 - CDFF3EA2D0FF1F96D0FF0E8FD1FF0C8FD2FF0C90D4FF0C91D5FF0C92D6FF0C92 - D6FF0C92D7FF0C92D7FF0C92D7FF0C92D7FF0C92D7FF0C92D6FF0C91D6FF0C90 - D4FF0C90D3FF0C8ED1FF1491D0FF2C9CD0FF4FA8CEFF72B0C4FF8EAFB4FF8599 - 9AFF738080FF636B6BFF575A5AFF4F4F4FFF4B4949FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF4D4C4CFF677E86FFBEE8FBFFC6EA - FCFFC6EAFCFFADC1CAFF6E7979FF545656FF4A4848FF494747FF4C4A4AFF5B5F - 5FFF9DC9D9FFC6EAFCFFC6EAFCFFBFE2F3FF848D8DFF595D5DFF4A4949FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF1C1B - 1B4A000000090000000100000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000001B7AAA0439586887494747FB494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494848FF4C4A4AFF505050FF575A5AFF616767FF6D7878FF7B8B - 8BFF899E9EFF93AFB1FF8EB6BEFF7DB5C5FF69B1CBFF57ACCFFF49A7D0FF3DA2 - D1FF369FD1FF319DD0FF309DD0FF329ED1FF38A0D0FF43A5D1FF4FA9CFFF5FAD - CCFF71B0C6FF85B3BEFF8FAFB3FF8BA1A2FF7D8E8EFF6F7B7BFF626A6AFF585C - 5CFF515252FF4C4B4BFF4A4848FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF4C4A4AFF5D6465FFBAE5F8FFCBEC - FCFFCBECFCFFC2E1F0FF899697FF646B6BFF545555FF505151FF565959FF7083 - 87FFC1E8FAFFCBECFCFFCBECFCFFBBD8E5FF7A8484FF565858FF4A4848FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF454343D10000 - 0010000000030000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000083A3A338494747D74947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494848FF4B4A4AFF4E4E4EFF5355 - 55FF595D5DFF606767FF677171FF6F7B7BFF778585FF7D8E8EFF839595FF879B - 9BFF8A9F9FFF8CA1A1FF8CA2A2FF8BA0A0FF889C9CFF849696FF7E8F8FFF7886 - 86FF707D7DFF697272FF626969FF5B5F5FFF545656FF4F4F4FFF4C4A4AFF4A48 - 48FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF4A4848FF555858FF9ABECDFFCFED - FCFFCFEDFCFFCFEDFCFFB8D1DCFF869596FF6E7979FF697373FF788B8FFFB8DA - E7FFCFEDFCFFCFEDFCFFCFEDFCFFA9BBC2FF687171FF505151FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF212020590000 - 0007000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000A0D1D1046675 - 757B494747F7494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494848FF4B4949FF4C4B4BFF4F4E4EFF515252FF535555FF565858FF575B - 5BFF595D5DFF5A5E5EFF5A5E5EFF5A5D5DFF585B5BFF565959FF545656FF5152 - 52FF4F4F4FFF4C4C4CFF4B4A4AFF4A4848FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF4F4F4FFF68777CFFC2E5 - F4FFD4EFFCFFD4EFFCFFD4EFFCFFCEEAF8FFBCD9E4FFBCDCE8FFD0EDFBFFD4EF - FCFFD4EFFCFFD4EFFCFFC5DEEAFF7F8888FF5A5E5EFF4C4B4BFF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF424040B9000000090000 - 0001000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00006675751C4947479F494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF4A4848FF4A4848FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF4B4949FF535555FF7688 - 8EFFC6E5F3FFD8F1FDFFD8F1FDFFD8F1FDFFD8F1FDFFD8F1FDFFD8F1FDFFD8F1 - FDFFD8F1FDFFC8DFEBFF869394FF606767FF505050FF4A4848FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF484646EC10101025000000020000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000049474730494747AF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF4C4A4AFF5456 - 56FF687578FF9DB5BDFFC4E1EEFFD9F0FBFFDDF2FDFFDDF2FDFFD6EEF9FFC5DE - E9FFA3B6BBFF778283FF5F6565FF515252FF4B4949FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FB2C2B2B4600000002000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000004947472C4947479B494747F74947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4B4A - 4AFF505050FF585C5CFF626969FF697373FF6D7878FF6E7979FF6C7777FF6770 - 70FF606565FF565959FF4E4E4EFF4A4949FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FB323131580000000200000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000494747144947 - 4773494747D7494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF4B4A4AFF4E4D4DFF505050FF525353FF525353FF525252FF4F50 - 50FF4D4C4CFF4A4949FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF484646E732303042000000010000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000004947473049474787494747DB494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF464444A82322221500000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000004947472449474768494747A74947 - 47DF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FB484646B04846 - 4634000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000049474714494747444947476C4947478F494747AF494747C7494747DF4947 - 47EB494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747F3494747D3494747A34947476448464618000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFF007FFFFFFFFFFFFFFFFFFFFFFFFFFF800001FFFFFFFFFFFFFFFFFFF - FFFFFF80000001FFFFFFFFFFFFFFFFFFFFFFFC000000003FFFFFFFFFFFFFFFFF - FFFFF00000000007FFFFFFFFFFFFFFFFFFFF800000000001FFFFFFFFFFFFFFFF - FFFE0000000000007FFFFFFFFFFFFFFFFFF80000000000001FFFFFFFFFFFFFFF - FFF000000000000007FFFFFFFFFFFFFFFFC000000000000001FFFFFFFFFFFFFF - FF8000000000000000FFFFFFFFFFFFFFFE00000000000000007FFFFFFFFFFFFF - FC00000000000000001FFFFFFFFFFFFFF800000000000000000FFFFFFFFFFFFF - F0000000000000000007FFFFFFFFFFFFE0000000000000000003FFFFFFFFFFFF - C0000000000000000001FFFFFFFFFFFF80000000000000000000FFFFFFFFFFFF - 000000000000000000007FFFFFFFFFFE000000000000000000003FFFFFFFFFFC - 000000000000000000001FFFFFFFFFF8000000000000000000001FFFFFFFFFF8 - 000000000000000000000FFFFFFFFFF00000000000000000000007FFFFFFFFE0 - 0000000000000000000007FFFFFFFFE00000000000000000000003FFFFFFFFC0 - 0000000000000000000001FFFFFFFF800000000000000000000001FFFFFFFF80 - 0000000000000000000000FFFFFFFF000000000000000000000000FFFFFFFF00 - 00000000000000000000007FFFFFFE0000000000000000000000007FFFFFFE00 - 00000000000000000000003FFFFFFE0000000000000000000000003FFFFFFC00 - 00000000000000000000001FFFFFFC0000000000000000000000001FFFFFF800 - 00000000000000000000001FFFFFF80000000000000000000000000FFFFFF800 - 00000000000000000000000FFFFFF000000000000000000000000007FFFFF000 - 000000000000000000000007FFFFF000000000000000000000000007FFFFF000 - 000000000000000000000003FFFFE000000000000000000000000003FFFFE000 - 000000000000000000000001FFFFE000000000000000000000000001FFFFE000 - 000000000000000000000000FFFFE000000000000000000000000000FFFFE000 - 000000000000000000000000FFFFC0000000000000000000000000007FFFC000 - 0000000000000000000000007FFFC0000000000000000000000000003FFFC000 - 0000000000000000000000003FFFC0000000000000000000000000001FFFC000 - 0000000000000000000000001FFFC0000000000000000000000000001FFFC000 - 0000000000000000000000000FFFC0000000000000000000000000000FFFC000 - 00000000000000000000000007FFC00000000000000000000000000007FFE000 - 00000000000000000000000003FFE00000000000000000000000000003FFE000 - 00000000000000000000000003FFE00000000000000000000000000001FFE000 - 00000000000000000000000001FFE00000000000000000000000000000FFF000 - 00000000000000000000000000FFF00000000000000000000000000000FFF000 - 000000000000000000000000007FF000000000000000000000000000007FF800 - 000000000000000000000000003FF800000000000000000000000000003FF800 - 000000000000000000000000001FFC00000000000000000000000000001FFC00 - 000000000000000000000000001EFC00000000000000000000000000000EFE00 - 000000000000000000000000000EFE000000000000000000000000000006FE00 - 0000000000000000000000000006FF000000000000000000000000000002FF00 - 0000000000000000000000000002FF800000000000000000000000000002FFC0 - 0000000000000000000000000001FFC00000000000000000000000000001FFE0 - 0000000000000000000000000001FFE00000000000000000000000000000FFF0 - 0000000000000000000000000000FFF80000000000000000000000000000FFF8 - 0000000000000000000000000000FFFC0000000000000000000000000000FFFE - 0000000000000000000000000000FFFF0000000000000000000000000000FFFF - 8000000000000000000000000000FFFFC000000000000000000000000000FFFF - E000000000000000000000000000FFFFF000000000000000000000000000FFFF - F800000000000000000000000001FFFFFC00000000000000000000000001FFFF - FE00000000000000000000000001FFFFFF00000000000000000000000003FFFF - FFC0000000000000000000000007FFFFFFE0000000000000000000000007FFFF - FFF800000000000000000000000FFFFFFFFE00000000000000000000001FFFFF - FFFF80000000000000000000003FFFFFFFFFE0000000000000000000007FFFFF - FFFFFC00000000000000000001FFFFFFFFFFFF80000000000000000007FFFFFF - FFFFFFF800000000000000001FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFF2800000060000000C0000000010020000000 - 0000809400000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000009F9F9F019F9F - 9F019F9F9F010000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000010000 - 000300000006000000080000000B0000000E0000001000000011000000120000 - 00120000001200000011000000100000000D0000000A00000007000000050000 - 0002000000010000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000100000003000000070000000D000000140000 - 001B00000021000000280000002D000000320000003500000037000000370000 - 0037000000370000003700000034000000300000002C000000250000001F0000 - 0018000000100000000A00000005000000020000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000002000000070000000F00000019000000240000002F000000390000 - 0040000000460000004B0000004E000000500000005200000052000000530000 - 0053000000530000005200000051000000500000004D00000049000000440000 - 003D000000340000002A0000001E000000130000000A00000004000000010000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000025242401030303040000 - 000B0000001700000025000000330000004000000049030303530F0F0F711B1A - 1A8B292828A9302E2EC13D3B3BD4424040E1464444EF464444EF464444EF4644 - 44EF464444EF434141E53E3C3CD7323030C4292828AD1D1C1C900F0F0F750404 - 045B000000520000004C00000045000000390000002C0000001D000000100000 - 0007141313020000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000050505040000000D0000001A0000 - 002B0000003B01010149090909621F1E1E92343333C4413F3FE9474545F84947 - 47FE494747FF484646FE494747FF494747FF484646FE494747FF494747FF4846 - 46FE494747FF494747FF484646FE494747FF494747FF484646FE474545F94140 - 40EA353434C5201F1F960B0A0A6A010101540000004C00000041000000320000 - 0022000000130202020716161602000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000D0D0D020000000A000000190000002C0000003E0302 - 024E1D1C1C8C363535CB474545F6494747FF494747FF494747FF484646FE4947 - 47FF494747FF484646FE494747FF494747FF484646FE494747FF494747FF4846 - 46FE494747FF494747FF484646FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE494747FF474545F6363535CB1B1B1B8C030303590000004F0000 - 0045000000350000002100000011000000062322220100000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00001B1A1A010000000700000015000000290000003D0A0A0A5F282626A64543 - 43EE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE444242ED262525A60A0A - 0A680000005100000045000000330000001E0000000C03030303000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000606 - 06030000000D0000001F0000003608080857292828A6454343F1484646FE4846 - 46FE494747FF494747FF484646FE494747FF494747FF494747FF484646FE4947 - 47FF494747FF494747FE494747FF494747FF494747FE494747FF494747FF4947 - 47FE494747FF494747FF494747FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE494747FF484646FE494747FF4442 - 42EF2A2929AB070707620000004E000000400000002A00000014030303062C31 - 3101000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000B0F0F050000 - 0013000000290000004022212192424040E9484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE494747FE494747FE4A49 - 49FE4D4C4CFE505050FE535555FE565959FE595D5DFE5B5F5FFE5B5F5FFE5A5E - 5EFE585B5BFE555757FE515353FE4E4F4FFE4C4B4BFE4A4848FE494747FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE414040E91F1E1E940101015500000048000000340000001D0000 - 0009324343020000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000596B6B0100000008000000190000 - 0033101010663B3939D1494747FF494747FF484646FE494747FF494747FF4846 - 46FE494747FF494747FF494747FE4A4949FF4E4E4EFF565858FF616767FE6C78 - 78FF728689FF6F909AFE6796A6FF619AB0FF5D9DB7FE5B9EBAFF5A9FBBFF5A9D - B9FE5D9BB5FF6098ADFF6692A2FE6D8C95FF6F8184FF687171FE5C6161FF5354 - 54FF4C4C4CFE4A4848FF494747FF484646FE494747FF484646FE494747FF4947 - 47FF484646FE494747FF484646FE3A3838D30E0E0E6F0000004F0000003E0000 - 00240000000E1A23230300000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000073737301000000090000001D0201013A2121 - 2190454343F1484646FE494747FF494747FF484646FE494747FF494747FF4947 - 47FE4A4848FF4E4D4DFF575A5AFE666F6FFF71868AFF6B98A7FF529CBCFE3B9D - CAFF2D9BD1FF299CD6FE299DD9FF2A9FDBFF2CA0DCFE2DA1DCFF2EA1DCFF2DA1 - DCFE2BA0DBFF2A9EDAFF289DD8FE289BD5FF2B99CFFF3B9AC7FE5198B6FF6890 - 9EFF6B7D80FE606666FF535555FF4C4A4AFE494747FF494747FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE444242F0201F1F95010101540000 - 00430000002A000000112B2B2B03000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000073737301000000090000001F04040442302F2FB44846 - 46FE484646FE484646FE484646FE484646FE484646FE494747FE4A4848FE4F4E - 4EFE5C6161FE717F80FE7099A6FE499DC3FE309CD1FE269BD7FE2BA0DBFE30A4 - DFFE32A6E1FE34A8E3FE36A9E4FE37AAE5FE38ABE6FE39ABE6FE39ABE6FE39AB - E6FE38ABE6FE37AAE5FE36A9E4FE34A8E2FE32A6E1FE30A3DEFE299FDBFE249A - D6FE2F99CDFE4998BAFE6C8F9AFE687272FE565959FE4C4B4BFE494747FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FC2F2D2DB80404 - 0458000000460000002D00000012070707040000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000006B6B6B010000000A000000200B0B0B503B3A3AD2484646FE4947 - 47FF494747FF484646FE494747FF494747FF494848FE4F4F4FFF5E6363FF7386 - 89FE649FB5FF389ECEFF239AD7FE2CA1DDFF2FA4E0FF32A7E3FF35AAE6FE37AC - E8FF39AEEAFF3BAFEBFE3CB1ECFF3DB1EDFF3DB1EDFE3EB2EDFF3EB2EDFF3EB2 - EDFE3EB2EDFF3EB1ECFF3DB1ECFE3CB0EBFF3BAFEAFF39ADE8FE36AAE6FF33A8 - E3FF30A5E0FE2AA0DCFF1F98D6FF399AC8FE6294A6FF6A797BFE565959FF4C4B - 4BFF494747FE494747FF494747FF484646FE494747FF494747FF484646FE3A38 - 38D209090965000000490000002F0000001301131C0400000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000090000001F0C0C0C51403F3FE0494747FE484646FE4947 - 47FF494747FF484646FE494747FF4C4B4BFF575B5BFE708081FF679DB1FF359C - CDFE259CD9FF2BA1DEFF2FA6E2FE32A9E6FF35ACE9FF38AEEBFF39B0ECFE3BB1 - EEFF3CB2EFFF3DB3EFFE3DB4F0FF3EB4F0FF3EB4F0FE3FB4F0FF3FB5F1FF3FB4 - F1FE3FB5F1FF3FB4F0FF3FB4F0FE3EB3EFFF3EB3EFFF3DB2EDFE3BB1ECFF39AF - EBFF37ACE8FE34A9E6FF30A6E2FF2AA1DDFE239AD7FF3398C8FE6591A1FF6570 - 71FF525353FE4A4848FF494747FF484646FE494747FF494747FF484646FE4947 - 47FF3D3C3CDD0B0B0B6A000000480000002E00000012202B2B03000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000060000001B0C0C0C4F3F3E3EDD484646FE484646FE484646FE4846 - 46FE484646FE494747FE4F5050FE646B6BFE77979FFE409EC9FE239AD7FE28A0 - DDFE2CA5E3FE30A9E7FE33ACEAFE36AEECFE38B0EEFE39B1EFFE39B2F0FE3BB3 - F0FE3BB3F1FE3CB4F1FE3CB4F1FE3CB4F1FE3DB4F1FE3DB5F1FE3DB5F1FE3DB5 - F1FE3DB5F1FE3DB5F1FE3EB5F1FE3EB5F1FE3EB4F1FE3DB4F0FE3DB3F0FE3CB2 - EFFE3AB1EEFE38AFECFE36ADEAFE32A9E6FE2EA5E2FE29A0DDFE2098D4FE4297 - BEFE6E878CFE595D5DFE4C4B4BFE494747FE484646FE484646FE484646FE4846 - 46FE484646FE413F3FE60B0A0A6A000000470000002B0000000F202B2B020000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000080B - 0B04000000160C0C0C4B413F3FE0484646FE494747FF494747FF484646FE4947 - 47FF4A4949FF545757FE718182FF61A1BAFF2699D3FE259EDCFF29A3E1FF2DA8 - E6FE31ABEAFF33AEECFF35AFEEFE37B1EFFF37B2F0FF38B2F1FF38B3F1FE38B3 - F2FF39B3F2FF39B3F1FE39B3F2FF3AB3F2FF3AB3F1FE3AB4F2FF3AB4F2FF3AB4 - F1FE3AB4F2FF3BB4F2FF3BB4F1FE3BB4F2FF3BB4F2FF3BB4F1FE3BB4F1FF3BB4 - F1FF3AB3F0FE39B2F0FF39B1EEFF37AFECFE34ACEAFF30A9E6FE2BA4E1FF249D - DAFF2497D0FE6094A8FF646E6EFF4F4F4FFE494747FF494747FF484646FE4947 - 47FF494747FF484646FE3F3D3DE00A0A0A6900000045000000260000000C506B - 6B01000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000002C3B3B020000 - 0011050505373D3B3BD4494747FF484646FE494747FF494747FF494747FE4B4A - 4AFF5A5E5EFF778C8FFE49A0C6FF219AD7FF259FDEFE29A5E4FF2CA9E9FF2FAC - ECFE31AEEEFF33AFEFFF33B0F0FE34B1F1FF35B1F1FF35B2F2FF35B2F1FE36B2 - F2FF36B2F2FF36B2F1FE37B2F2FF37B2F2FF37B2F1FE37B3F2FF37B3F2FF37B2 - F1FE38B3F2FF38B3F2FF38B3F1FE38B3F2FF38B3F2FF38B3F1FE38B3F2FF39B3 - F2FF38B3F1FE38B3F1FF38B2F0FF38B1EFFE36B0EEFF34AEECFE30AAE9FF2CA6 - E4FF27A0DEFE1E97D4FF4C97B8FF6A797BFE515252FF4A4848FF494747FE4947 - 47FF494747FF484646FE494747FF3C3A3AD7070707600000003F000000200000 - 0008000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000000000B0202 - 022A333131B6484646FE484646FE484646FE484646FE494747FE4B4A4AFE5D61 - 61FE79959BFE3B9DCBFE1F9AD8FE24A0E0FE28A6E6FE2AAAEAFE2DACEDFE2FAE - EFFE30AFF0FE30AFF0FE31B0F0FE31B0F0FE31B0F0FE32B0F1FE32B0F1FE32B0 - F1FE32B0F1FE33B1F1FE33B1F1FE33B1F1FE33B1F1FE34B1F1FE34B1F1FE34B1 - F1FE34B1F1FE35B1F1FE35B1F1FE35B1F1FE35B1F1FE35B2F1FE36B2F1FE36B2 - F1FE36B2F1FE36B2F1FE36B2F1FE36B2F1FE35B1F0FE34B0EFFE32AEEDFE2FAB - EAFE2BA7E6FE27A1E0FE1E98D7FE3B97C2FE6E7F81FE535555FE4A4848FE4846 - 46FE484646FE484646FE484646FE484646FE353434C801010152000000380000 - 0018040404040000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000050000001C2726 - 268E494747FF484646FE494747FF484646FE494747FF4B4A4AFF5D6363FE789B - A4FF2F9BCFFF1E9ADAFE22A1E2FF26A6E8FF28A9EBFE2AACEDFF2BADEFFF2CAE - F0FE2DAFF1FF2DAFF1FF2DAFF0FE2DAFF1FF2EAFF1FF2EAFF1FF2EAFF0FE2FAF - F1FF2FAFF1FF2FAFF0FE2FAFF1FF2FAFF1FF30AFF0FE30B0F1FF30B0F1FF30B0 - F0FE31B0F1FF31B0F1FF31B0F0FE31B0F1FF31B0F1FF32B0F0FE32B0F1FF32B0 - F1FF32B0F1FE32B0F1FF33B1F1FF33B0F1FE33B1F1FF32B0F0FE32AFF0FF30AE - EEFF2EABEBFE2AA7E7FF26A2E1FF1E99D9FE3197C7FF6C8489FF545656FE4A48 - 48FF494747FF484646FE494747FF494747FF484646FE292828A90000004D0000 - 00300000000F1312120200000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000002B373702000000111616165E4644 - 44F4494747FF484646FE494747FF494747FE4B4A4AFF5C6161FF78989FFE2D9B - CFFF1C9ADAFF20A0E2FE24A6E8FF26A9EBFF27ABEEFE28ACEFFF29ADF0FF29AD - F0FE29ADF1FF2AADF1FF2AADF0FE2AAEF1FF2AAEF1FF2BAEF1FF2AAEF0FE2BAE - F1FF2BAEF1FF2BAEF0FE2CAEF1FF2CAEF1FF2CAEF0FE2CAFF1FF2DAFF1FF2DAE - F0FE2DAFF1FF2DAFF1FF2EAFF0FE2EAFF1FF2EAFF1FF2EAFF0FE2EAFF1FF2FAF - F1FF2FAFF0FE2FAFF1FF2FB0F1FF2FAFF0FE30B0F1FF30AFF0FE2FAFF0FF2FAE - F0FF2EADEEFE2BABECFF28A7E8FF24A1E2FE1C99D9FF3296C6FF6B8287FE5253 - 53FF494747FF484646FE494747FF494747FF484646FE474545F8181717830000 - 0044000000220101010800000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000008050505283F3E3EDB4846 - 46FE484646FE484646FE484646FE4A4848FE575A5AFE799397FE359CCDFE1A99 - D9FE1D9FE1FE21A4E8FE23A8ECFE25AAEEFE25ABEFFE26ACF0FE26ACF0FE26AC - F0FE27ACF0FE27ACF0FE27ACF0FE27ACF0FE27ACF0FE28ACF0FE28ACF0FE28AC - F0FE28ADF0FE28ADF0FE28ADF0FE28ADF0FE28ADF0FE29ADF0FE29ADF0FE29AD - F0FE29ADF0FE29ADF0FE2AADF0FE2AADF0FE2AAEF0FE2AAEF0FE2BAEF0FE2BAE - F0FE2BAEF0FE2BAEF0FE2CAEF0FE2CAEF0FE2CAEF0FE2CAEF0FE2CAEF0FE2CAE - F0FE2CADEFFE2BACEEFE29AAECFE26A6E8FE22A0E1FE1B98D9FE3897C4FE6C79 - 7BFE505050FE494747FE484646FE484646FE484646FE484646FE403E3EE30706 - 065D000000370000001606060603000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000A090903000000172B2A2A98494747FF4947 - 47FF494747FF484646FE494747FF525454FE778B8DFF43A0CAFF1797D8FE1A9E - E1FF1DA3E8FF20A7EBFE21A9EEFF22AAEFFF23AAEFFE23ABF0FF23ABF0FF23AB - F0FE24ABF0FF24ABF0FF24ABF0FE24ABF0FF24ABF0FF25ABF0FF25ABF0FE25AB - F0FF25ABF0FF25ABF0FE26ACF1FF26ACF1FF26ACF0FE26ACF1FF26ACF1FF27AC - F0FE27ACF1FF27ACF1FF27ACF0FE27ACF1FF27ACF1FF28ACF0FE28ACF1FF28AC - F1FF457995FE3C8CB5FF2EA4E1FF28ADF0FE29ADF1FF29ADF0FE29ADF1FF29AD - F1FF29ADF0FE29ACF0FF28ABEEFF27A9EBFE23A5E7FF1F9FE1FF1896D7FE4798 - BBFF667172FF4D4D4DFE494747FF494747FF484646FE494747FF494747FF302E - 2EB800000049000000290000000B000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000A11111148464444F2494747FF4947 - 47FF494747FF494747FE4E4E4EFF6D7878FE59A4C3FF1696D6FF189CDFFE1BA2 - E7FF1DA5EBFF1EA7EDFE1FA8EFFF238BBFFF2F7295FE377B9EFF3B7FA1FF3C7F - A2FE3C7FA2FF3C7FA2FF3C7FA2FE2A9AD3FF21AAF0FF21AAF0FF22AAEFFE22AA - F0FF22AAF0FF22AAEFFE22ABF0FF22ABF0FF23AAF0FE23ABF0FF23ABF0FF23AB - F0FE23ABF0FF24ABF0FF24ABF0FE24ABF0FF24ABF0FF24ABF0FE25ABF0FF2F98 - CEFF585757FE5A5859FF565F63FF48768DFE3692C2FF29A6E7FE26ACF1FF26AC - F1FF27ACF0FE27ACF1FF26ABF0FF25AAEEFE24A8EBFF20A3E6FF1C9DDEFE1795 - D4FF5A94ACFF5D6363FE4A4949FF494747FF484646FE494747FF494747FF4846 - 46FB121212740000003C00000019090808030000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000200000016353434B6484646FE484646FE4846 - 46FE484646FE4B4949FE5F6565FE75A2AFFE1794D3FE1599DCFE179FE4FE1AA4 - EAFE1BA6EDFE1CA7EEFE1CA8EFFE1F92CDFE33393DFE474646FE525050FE5453 - 53FE545353FE545353FE545353FE44677AFE1FA6EBFE1EA9EFFE1EA9EFFE1EA9 - EFFE1FA9EFFE1FA9EFFE1FA9EFFE1FA9EFFE1FA9EFFE20A9EFFE20A9EFFE20A9 - EFFE20AAEFFE20AAEFFE21AAEFFE21AAEFFE21AAEFFE21AAEFFE22AAEFFE3F73 - 8EFE575656FE585656FE585656FE585656FE585757FE52616AFE417C9BFE2E9A - D1FE23ABF0FE23ABF0FE23ABF0FE23AAEFFE22A9EDFE21A6EAFE1DA1E5FE199A - DCFE1E94CFFE6B8B94FE535454FE494747FE484646FE484646FE484646FE4846 - 46FE383636CE0202024E0000002A0000000A0000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000819181859484646F9484646FE494747FF4947 - 47FF494747FF545656FE799295FF309CCFFE1397DAFF159DE3FF17A2E9FE18A5 - EDFF19A6EFFF19A7EFFE19A7F0FF1AA7EFFF236282FE3A3939FF4B4949FF514F - 4FFE535151FF535151FF535151FE515051FF2D88B7FF1BA8F0FF1CA8EFFE1CA8 - F0FF1CA8F0FF1CA8EFFE1CA8F0FF1CA8F0FF1DA8EFFE1DA8F0FF1DA8F0FF1DA8 - EFFE1DA8F0FF1DA8F0FF1EA8EFFE1EA9F0FF1EA9F0FF1EA8EFFE239EDDFF4E57 - 5CFF565454FE565454FF565454FF565454FE565454FF565454FE565454FF5755 - 55FF4E626EFE3A82A7FF299CD7FF21A9EFFE20A9EEFF1FA7ECFF1DA4E9FE1A9F - E2FF1697D9FF3698C6FE697576FF4D4D4DFF494747FE494747FF494747FF4846 - 46FE484646FE1A1919840000003B000000151312120200000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000002000000123B3939BE494747FF484646FE494747FF4947 - 47FF4C4B4BFF6B7575FE5BA4C1FF1193D6FE139AE0FF15A0E7FF16A3ECFE16A5 - EEFF16A6EFFF16A6EFFE17A6F0FF17A6F0FF189CE0FE2C363BFF413F3FFF4D4B - 4BFE504E4EFF514F4FFF514F4FFE514F4FFF465B67FF1CA1E5FF19A7EFFE19A7 - F0FF19A7F0FF19A7EFFE19A7F0FF19A7F0FF1AA7EFFE1AA7F0FF1AA7F0FF1AA7 - EFFE1AA7F0FF1AA8F0FF1BA8EFFE1BA8F0FF1BA8F0FF1BA8EFFE317FA7FF5250 - 50FF535252FE545252FF545252FF535252FE545252FF545252FE545353FF5453 - 53FF545252FE545353FF505559FF3D5F71FE2488BBFF1DA7EEFF1CA6EBFE1AA1 - E7FF169BDFFF1293D4FE5D94AAFF5A5E5EFF4A4848FE494747FF494747FF4846 - 46FE494747FF393737D00101014A000000240101010800000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000611111142484646FC494747FF484646FE494747FF4947 - 47FF565959FF7C9CA3FE1F96D1FF1096DBFE129DE4FF13A1EAFF14A4EDFE14A5 - EEFF14A5EFFF15A5EFFE15A6EFFF15A6EFFF15A5EFFE1D6B92FF343333FF4644 - 44FE4E4C4CFF4F4D4DFF4F4D4DFE4F4D4DFF4E4D4DFF2F7BA2FF16A6EFFE17A6 - F0FF17A6F0FF17A6EFFE17A6F0FF17A6F0FF17A6EFFE17A6F0FF17A7F0FF17A6 - EFFE17A7F0FF18A7F0FF18A7EFFE18A7F0FF18A7F0FF19A4EBFE435C69FF514F - 4FFF525050FE525050FF525050FF525050FE525050FF525050FE525050FF5250 - 50FF525050FE525050FF4E4C4CFF3E3D3DFE23749DFF1AA7EFFF1AA6EDFE19A3 - EAFF169FE4FF1497DBFE2795CBFF6B7E82FF4E4E4EFE494747FF494747FF4846 - 46FE494747FF474545F914131375000000320000001022212101000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000D343232A5484646FE484646FE484646FE494747FE4D4C - 4CFE6C7777FE53A5C7FE0E93D6FE0F9AE0FE119FE7FE12A2ECFE12A3EEFE12A4 - EEFE13A4EEFE13A4EEFE13A4EEFE13A4EEFE13A4EEFE149DE4FE253C49FE3B39 - 39FE494747FE4D4B4BFE4D4B4BFE4D4B4BFE4D4B4BFE494E52FE1A9BDDFE15A5 - EFFE15A5EFFE15A5EFFE15A5EFFE15A5EFFE15A5EFFE16A5EFFE16A5EFFE16A5 - EFFE16A5EFFE16A5EFFE16A5EFFE16A6EFFE16A6EFFE248BC0FE4C4D4EFE4F4D - 4DFE4F4D4DFE4F4D4DFE4F4D4DFE4E4C4CFE4C4A4AFE4D4B4BFE4F4D4DFE504E - 4EFE514F4FFE504E4EFE464545FE32383CFE19A0E5FE18A6EFFE18A6EEFE17A4 - ECFE16A0E8FE139AE0FE0F92D5FE5696B1FE5C6161FE494747FE484646FE4846 - 46FE484646FE484646FE313030BB000000410000001C00000005000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000209090928464444EA494747FF494747FF484646FE494747FF5658 - 58FF809CA1FF1A94D1FE0E96DBFF0E9CE4FE10A0EAFF10A2EDFF10A3EEFE11A4 - EFFF11A4EFFF11A4EEFE11A4EFFF11A4EFFF11A4EEFE11A4EFFF1777A8FF2D2D - 2EFE413F3FFF4B4949FF4C4A4AFE4C4A4AFF4C4A4AFF4C4A4AFF336C89FE13A4 - EDFF13A4EFFF13A4EEFE13A5EFFF13A5EFFF13A5EEFE13A5EFFF13A5EFFF13A5 - EEFE14A5EFFF14A5EFFF14A5EFFE14A5EFFF14A5EFFF36667FFE4D4B4BFF4E4C - 4CFF4E4C4CFE4E4C4CFF4D4B4BFF474545FE3E3C3CFF3D3B3BFE434242FF4947 - 47FF4C4A4AFE4B4949FF3D3C3CFF235C79FE16A6EFFF16A6EFFF16A5EFFE15A4 - EDFF14A1EAFF129DE4FE0F96DAFF2695CBFF6C7E81FE4D4C4CFF494747FF4846 - 46FE494747FF494747FF474545F5050505520000002B0000000C000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000005201F1F68484646FE494747FF494747FF484646FE4B4A4AFF676F - 6FFF60A6C1FF0C91D6FE0D98E0FF0E9EE7FE0FA1ECFF0FA2EEFF0FA3EEFE0FA3 - EFFF0FA3EFFF0FA3EEFE10A4EFFF10A4EFFF10A3EEFE10A4EFFF109FE8FF1F42 - 54FE373535FF454343FF4A4848FE4A4848FF4A4848FF4A4848FF474A4DFE1C90 - CCFF11A4EFFF11A3EEFE11A4EFFF11A4EFFF11A4EEFE11A4EFFF11A4EFFF11A4 - EEFE11A4EFFF12A4EFFF12A4EEFE12A4EFFF169BDFFF474A4CFE4C4A4AFF4C4A - 4AFF4C4A4AFE4C4A4AFF4A4848FF3D3B3BFE2C2A2AFF272626FE2D2C2CFF3635 - 35FF3E3C3CFE3F3D3DFF313335FF1887BFFE14A5EFFF14A5EFFF14A5EEFE13A4 - EEFF12A2EBFF109EE7FE0E98DEFF0F91D4FF6094A9FE565959FF494747FF4846 - 46FE494747FF494747FF484646FE1E1D1D8E0000003B00000017121111020000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000A3B3939B8484646FE484646FE484646FE494747FE515151FE7A8F - 91FE2D9BCFFE0C95DAFE0D9BE3FE0D9FE9FE0EA1EDFE0EA2EEFE0EA2EEFE0EA2 - EEFE0EA2EEFE0EA2EEFE0EA2EEFE0EA2EEFE0EA2EEFE0EA2EEFE0EA2EEFE1283 - BDFE2A292AFE3D3C3CFE484646FE494747FE494747FE494747FE494747FE385E - 72FE10A1EBFE0FA3EEFE0FA3EEFE0FA3EEFE0FA3EEFE0FA3EEFE0FA3EEFE10A3 - EEFE10A3EEFE10A3EEFE10A3EEFE10A3EEFE28769EFE494747FE4A4848FE4A48 - 48FE4A4848FE4A4848FE444242FE313132FE186A93FE174A64FE1C2428FE2120 - 20FE272626FE292828FE203F50FE12A2ECFE12A4EEFE12A4EEFE12A4EEFE11A3 - EEFE10A2EDFE0F9FE9FE0E9AE2FE0D94D9FE3698C6FE666F6FFE4B4A4AFE4846 - 46FE484646FE484646FE484646FE3B3939D70202024C00000026000000080000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000C0C0C22464444EA484646FE494747FF494747FF494747FE5B5F5FFF77A4 - B1FF1092D3FF0C97DEFE0D9DE6FF0DA0EBFE0EA2EEFF0EA3EFFF0EA2EEFE0EA3 - EFFF0EA3EFFF0EA2EEFE0EA3EFFF0EA3EFFF0EA2EEFE0EA3EFFF0EA3EFFF0EA2 - EEFE1B4A62FF323131FF434141FE494747FF494747FF494747FF494747FE4748 - 49FF2183B5FF0EA2EEFE0FA3EFFF0FA3EFFF0FA3EEFE0FA3EFFF0FA3EFFF0FA3 - EEFE0FA3EFFF0FA3EFFF0FA3EEFE119FE7FF3B5461FF494747FE4A4848FF4A48 - 48FF4A4848FE484646FF3E3C3CFF254150FE109FE7FF10A3EDFE1192D4FF1461 - 88FF192F3BFE1B1C1DFF146E9CFF10A3EEFE10A4EFFF10A4EFFF10A3EEFE10A3 - EFFF0FA2EEFF0FA0EBFE0D9CE5FF0D96DCFF1291D1FE70898FFF505050FF4947 - 47FE494747FF494747FF484646FE484646FC1514147700000036000000121616 - 1602000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000219191951484646FC484646FE494747FF494747FF4A4949FE6A7373FF5AA6 - C5FF0C92D6FF0C99E1FE0D9EE8FF0DA1ECFE0EA2EEFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2 - EEFE108AC8FF262C30FF3A3939FE464444FF484646FF494747FF484646FE4846 - 46FF3E525DFF0FA0EAFE0EA3EFFF0EA3EFFF0EA2EEFE0EA3EFFF0EA3EFFF0EA2 - EEFE0EA3EFFF0EA3EFFF0EA2EEFE1B8AC4FF474647FF494747FE4A4848FF4A48 - 48FF494747FE454343FF363434FF196891FE0FA3EFFF0EA2EEFE0FA3EFFF0FA3 - EFFF0F9EE7FE117BB2FF0F9AE1FF0FA3EEFE0FA3EFFF0FA3EFFF0FA3EEFE0FA3 - EFFF0EA2EEFF0EA1ECFE0D9EE7FF0D98E0FF0C91D5FE5C96ACFF585C5CFF4947 - 47FE494747FF494747FF484646FE494747FF323131BF000000440000001F0505 - 0506000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00032B2A2A8B484646FE484646FE484646FE494747FE4E4E4EFE7B8D8EFE309B - CEFE0C94DAFE0D9BE4FE0D9FEAFE0DA1EDFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE18597BFE2F2E2EFE424040FE484646FE484646FE484646FE4846 - 46FE484646FE2777A0FE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE30637DFE484646FE484646FE484646FE4846 - 46FE484646FE3F3E3EFE2B2D2FFE0F97DCFE0EA2EEFE0EA2EEFE0EA2EEFE0EA2 - EEFE0EA2EEFE0EA2EEFE0EA2EEFE0EA2EEFE0EA2EEFE0EA2EEFE0EA2EEFE0EA2 - EEFE0DA2EEFE0DA1EDFE0D9FE9FE0D9AE3FE0C94D9FE3B97C2FE646D6DFE4A48 - 48FE484646FE484646FE484646FE484646FE454343F40D0C0C65000000300000 - 000F252424010000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00063F3E3EBB494747FF484646FE494747FF494747FF545656FE7E9FA6FF1994 - D2FF0D96DDFF0D9CE5FE0EA0EBFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2 - EEFE0EA3EFFF0F93D7FF233037FE393737FF454444FF484646FF484646FE4947 - 47FF494747FF414E55FE1497DBFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2 - EEFE0EA3EFFF0EA3EFFF1397DBFE414B50FF484646FF484646FE494747FF4947 - 47FF464444FE393737FF1F4D65FF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3 - EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA0EAFF0D9CE4FF0C95DBFE2295CDFF6C7E82FF4C4C - 4CFE494747FF494747FF484646FE494747FF494747FE282727A60000003F0000 - 001B030303040000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0008474545E4494747FF484646FE494747FF494747FF5B6060FE74A7B7FF0F92 - D4FF0D98DFFF0D9EE7FE0EA1ECFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2 - EEFE0EA3EFFF0EA3EFFF16658DFE2E2D2DFF403E3EFF484646FF484646FE4947 - 47FF494747FF484646FE2E6B8BFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2 - EEFE0EA3EFFF0EA3EFFF237AA7FE474545FF494747FF484646FE494747FF4846 - 46FF434141FE313131FF147AAEFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3 - EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA1EBFF0D9DE6FF0C97DDFE1292D2FF6C8C96FF5051 - 51FE494747FF494747FF484646FE494747FF494747FF444242EB0302024E0000 - 002A0000000B0000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000D0D - 0D16484646FE484646FE484646FE484646FE4A4848FE646B6BFE64A9C3FE0C92 - D6FE0C99E1FE0D9EE8FE0DA1EDFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0E9EE7FE21333CFE363535FE454343FE484646FE4846 - 46FE484646FE484646FE45494CFE198ECAFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0EA2EEFE395463FE484646FE484646FE484646FE484646FE4745 - 45FE3D3B3BFE263944FE0E9CE5FE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA1ECFE0D9DE7FE0C98E0FE0C91D4FE6395A8FE5557 - 57FE484646FE484646FE484646FE484646FE484646FE484646FE1F1E1E8E0000 - 003A000000160D0D0D0200000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001818 - 1834494747FF494747FF484646FE494747FF4B4A4AFF6C7777FE51A7CBFF0C93 - D8FF0D9AE2FF0D9FE9FE0EA1EDFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2 - EEFE0EA3EFFF0EA3EFFF0DA2EEFE1472A2FF2B2B2CFF3E3D3DFF474545FE4947 - 47FF494747FF484646FE484646FF365E73FF0EA2EDFE0EA3EFFF0EA3EFFF0DA2 - EEFE0EA3EFFF1790CEFF454445FE484646FF494747FF484646FE484646FF4543 - 43FF363434FE1A5F83FF0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3 - EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA1EDFF0D9EE8FF0C99E1FE0C92D6FF5497B4FF5A5F - 5FFE494747FF494747FF484646FE494747FF494747FF484646FE3A3838D20202 - 024B000000250000000800000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001A19 - 194B494747FF494747FF484646FE494747FF4D4C4CFF748181FE40A3CFFF0C94 - D9FF0D9BE3FF0D9FE9FE0EA2EDFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2 - EEFE0EA3EFFF0EA3EFFF0DA2EEFE0E9EE8FF1E3D4EFF343333FF444242FE4846 - 46FF494747FF484646FE494747FF474546FF1D87BDFE0EA3EFFF0EA3EFFF0DA2 - EEFE0EA3EFFF2A6C8FFF484646FE494747FF494747FF484646FE484646FF413F - 3FFF2D2F30FE118BCAFF0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3 - EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA1EDFF0D9FE9FF0D9AE2FE0C93D8FF4798BCFF5F66 - 66FE494747FF494747FF484646FE494747FF494747FF484646FE484646FB1312 - 127300000035000000111A191901000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001B1A - 1A60484646FE484646FE484646FE484646FE4E4E4EFE7A8A8AFE349FD1FE0C95 - DAFE0D9BE4FE0D9FEAFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE1280B9FE282A2BFE3D3B3BFE4745 - 45FE484646FE484646FE484646FE484646FE3C5563FE109DE5FE0DA2EEFE0DA2 - EEFE109DE4FE3C4F59FE484646FE484646FE484646FE484646FE464444FE3A39 - 39FE21465AFE0EA0EBFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0D9FE9FE0D9AE3FE0C94D9FE3E99C3FE646C - 6CFE494747FE484646FE484646FE484646FE484646FE484646FE484646FE312F - 2FBD000000440000001F03030306000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001B1A - 1A64494747FF494747FF484646FE494747FF4F4F4FFF7F9090FE2A9BD2FF0C95 - DBFF0D9BE5FF0DA0EAFE0EA2EEFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2 - EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA0EBFF1B4B63FF323131FE4341 - 41FF484646FF484646FE494747FF494747FF484646FE2679A4FF0EA3EFFF0DA2 - EEFE1B87BFFF454444FF484646FE494747FF494747FF484646FE434242FF3331 - 31FF1672A1FE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3 - EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA2EEFF0E9FEAFF0D9BE4FE0C94D9FF3799C6FF6771 - 71FE4A4848FF494747FF484646FE494747FF494747FF484646FE494747FF4543 - 43F20C0C0C630000002F0000000E292727010000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001B1A - 1A64494747FF494747FF484646FE494747FF505050FF819393FE279AD1FF0C95 - DBFF0D9CE5FF0DA0EAFE0EA2EEFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2 - EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF108CCCFF27282AFE3B39 - 39FF464444FF484646FE494747FF494747FF484646FE414E56FF1399DDFF0DA2 - EEFE2B6A8BFF474545FF484646FE494747FF494747FF484646FE3E3D3DFF2930 - 34FF0E9CE4FE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3 - EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA2EEFF0E9FEAFF0D9BE4FE0C94D9FF3498C7FF6973 - 73FE4A4848FF494747FF484646FE494747FF494747FF484646FE494747FF4947 - 47FF262525A20000003E0000001A060606040000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001B1A - 1A64484646FE484646FE484646FE484646FE505050FE819393FE289AD1FE0C95 - DBFE0D9BE5FE0DA0EAFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE185878FE302E - 2EFE414040FE484646FE484646FE484646FE484646FE484646FE2F6B8BFE0FA0 - E9FE3E515CFE484646FE484646FE484646FE484646FE454343FE373636FE1C56 - 74FE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0D9FEAFE0D9BE4FE0C94D9FE3599C7FE6973 - 73FE4A4848FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE444242EA0202024E0000002A0000000B0000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001B1A - 1A63494747FF494747FF484646FE494747FF4F4F4FFF7F9090FE2D9DD2FF0C95 - DBFF0D9BE4FF0DA0EAFE0EA2EEFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2 - EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0EA3EFFF0F92D4FE242F - 36FF393737FF464444FE484646FF494747FF484646FE494747FF46494CFF2381 - B1FE46494BFF494747FF484646FE494747FF484646FF424040FE2F3032FF1382 - BCFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3 - EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA2EEFF0E9FEAFF0D9BE3FE0C94D9FF3999C6FF6770 - 70FE4A4848FF494747FF484646FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE1B1B1B880000003A000000161312120200000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001B1A - 1A5E494747FF494747FF484646FE494747FF4E4E4EFF7A8989FE38A0D1FF0C95 - DAFF0D9BE4FF0D9FEAFE0EA2EEFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2 - EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0EA3EFFF0DA2EEFE1662 - 89FF2E2C2CFF413F3FFE484646FF494747FF484646FE494747FF494747FF454B - 4FFE494747FF494747FF484646FE494747FF474545FF3B3A3AFE243D4AFF0E9F - EAFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3 - EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA2EDFF0E9FE9FF0D9AE3FE0C93D9FF419AC2FF646C - 6CFE494747FF494747FF484646FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE393737CF0202024A000000240000000700000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001A1A - 1A48484646FE484646FE484646FE484646FE4C4C4CFE738080FE47A5CFFE0C94 - D9FE0C9AE3FE0D9FE9FE0DA1EDFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0FA3EFFE149B - E1FE293D48FE414040FE504E4EFE555353FE565454FE575555FE575555FE5654 - 54FE565454FE555353FE535151FE514F4FFE4B4949FE373636FE196B94FE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA1EDFE0D9FE8FE0C9AE2FE0C93D7FE4D9ABBFE5F65 - 65FE494747FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FB1212127200000035000000111D1C1C01000000000000 - 0000000000000000000000000000000000000000000000000000000000001A19 - 1931494747FF494747FF484646FE494747FF4B4A4AFF6B7575FE59A9CAFF0C93 - D7FF0D99E2FF0D9EE9FE0EA1EDFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2 - EEFE0EA3EFFF0EA3EFFF0EA3EEFE10A4EFFF17A6EFFF1FA9F0FF24ABF0FE25AB - F0FF2B7FAAFF413F3FFE515050FF595858FF5B5959FE5B5959FF5B5959FF5B59 - 59FE5B5959FF5B5959FF5B5959FE5A5858FF535151FF3F4549FE269BD8FF1EA9 - F0FF16A6EFFE10A3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3 - EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA1ECFF0D9EE8FF0C99E1FE0C92D6FF5C9AB2FF5A5E - 5EFE494747FF494747FF484646FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE494747FF302E2EB9000000430000001E04040405000000000000 - 0000000000000000000000000000000000000000000000000000000000000F0F - 0F0F494747FF494747FF484646FE494747FF4A4848FF626A6AFE6CACC3FF0C92 - D6FF0D98E0FF0D9EE8FE0EA1ECFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2 - EEFE0EA3EFFF12A4EFFF1FA9F0FE28ADF0FF2BAEF1FF2BAEF1FF2BAEF0FE2BAE - F1FF2BACEEFF3A525FFE4E4C4CFF5B5959FF5F5D5DFE5F5D5DFF5F5D5DFF5F5D - 5DFE5F5D5DFF5F5D5DFF5F5D5DFE5D5B5BFF525050FF3A6378FE2BADEFFF2BAE - F1FF2BAEF0FE27ACF0FF1EA9F0FF11A4EFFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3 - EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA1ECFF0D9DE7FF0C98DFFE0D91D4FF6A96A5FF5456 - 56FE494747FF494747FF484646FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE494747FF444242F00A09095F0000002E0000000D222121010000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0001484646E6484646FE484646FE484646FE494747FE5A5E5EFE7CA9B6FE1292 - D3FE0C97DEFE0D9DE7FE0DA0EBFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE11A4 - EFFE22AAF0FE2FAFF1FE30B0F1FE30B0F1FE30B0F1FE30B0F1FE30B0F1FE30B0 - F1FE30B0F1FE3490BFFE484A4CFE585757FE626060FE636161FE636161FE6361 - 61FE636161FE636161FE636161FE5E5C5CFE4F4E4EFE368EBCFE30B0F1FE30B0 - F1FE30B0F1FE30B0F1FE30B0F1FE2EAFF1FE20A9F0FE10A3EFFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA0EBFE0D9CE6FE0C96DDFE1793D1FE708C92FE4F50 - 50FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE252424A00000003E0000001A0A0909040000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000444242BA494747FF484646FE494747FF494747FF535454FE84A0A3FF2097 - D1FF0D96DCFF0D9CE5FE0EA0EAFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF1AA7EFFF30B0 - F1FE37B2F2FF37B2F2FF36B2F1FE37B2F2FF37B2F2FF37B2F2FF36B2F1FE37B2 - F2FF37B2F2FF37B1EFFE42687BFF555454FF636161FE676565FF676666FF6766 - 66FE676666FF676666FF666464FE5E5C5CFF4B575DFF37B0EEFE37B2F2FF37B2 - F2FF36B2F1FE37B2F2FF37B2F2FF36B2F1FE36B2F2FF2FAFF1FE17A6EFFF0EA3 - EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EDFE0E9FEAFF0D9BE4FF0C95DAFE2B97CBFF6E7D7FFF4C4B - 4BFE494747FF494747FF484646FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE494747FF494747FF424040E70101014D000000290000000A0000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00002D2B2B86484646FE484646FE484646FE494747FE4D4D4DFE7A8B8BFE40A2 - CEFE0C94D9FE0D9AE3FE0D9FE9FE0DA1EDFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE22AAF0FE3AB4F1FE3CB5 - F1FE3CB5F1FE3CB5F1FE3CB5F1FE3CB5F1FE3CB5F1FE3CB5F1FE3CB5F1FE3CB5 - F1FE3CB5F1FE3CB5F1FE3F9FCFFE535759FE656363FE6B6A6AFE6C6A6AFE6C6A - 6AFE6C6A6AFE6C6A6AFE696868FE5D5C5CFE477E9AFE3CB5F1FE3CB5F1FE3CB5 - F1FE3CB5F1FE3CB5F1FE3CB5F1FE3CB5F1FE3CB5F1FE3CB5F1FE39B3F1FE1EA9 - EFFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA1EDFE0D9EE8FE0D9AE2FE0C93D7FE4A9BBFFE636B6BFE4A48 - 48FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE1A19198300000038000000150000 - 0002000000000000000000000000000000000000000000000000000000000000 - 00001C1B1B46494747FD484646FE494747FF494747FF4A4949FE677070FF6BAC - C3FF0C91D5FF0C98E0FE0D9EE7FF0DA1ECFE0EA2EEFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF26ACF0FE42B7F2FF43B7F2FF43B7 - F2FE43B7F2FF43B7F2FF43B7F2FE43B7F2FF43B7F2FF43B7F2FF43B7F2FE43B7 - F2FF43B7F2FF43B7F2FE43B6F1FF528099FF6A6868FE706F6FFF716F6FFF716F - 6FFE716F6FFF716F6FFF6B6969FE5B5F61FF46A5D5FF43B7F2FE43B7F2FF43B7 - F2FF43B7F2FE43B7F2FF43B7F2FF43B7F2FE43B7F2FF43B7F2FE43B7F2FF41B6 - F2FF21AAF0FE0EA3EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA2EEFF0DA0EBFE0D9DE7FF0D97DEFF0C90D4FE6C99A9FF575959FF4947 - 47FE494747FF494747FF484646FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE383737CE02010149000000240000 - 0007000000000000000000000000000000000000000000000000000000000000 - 00000F0F0F17474545E9484646FE494747FF494747FF494747FE595D5DFF81A6 - ADFF1894D2FF0C96DCFE0D9CE5FF0DA0EAFE0EA2EEFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF21AAF0FF47B8F2FE49B9F3FF49B9F3FF49B9 - F2FE49B9F3FF49B9F3FF49B9F2FE49B9F3FF49B9F3FF49B9F3FF49B9F2FE49B9 - F3FF49B9F3FF49B9F2FE49B9F3FF4DAFE1FF717070FE757474FF767474FF7574 - 74FE767474FF747373FF6B6A6AFE597380FF4AB8F1FF49B9F2FE49B9F3FF49B9 - F3FF49B9F2FE49B9F3FF49B9F3FF49B9F2FE49B9F3FF49B9F2FE49B9F3FF49B9 - F3FF46B8F2FE1BA7EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0EA2EDFF0D9FEAFE0D9BE4FF0C95DBFF1D95D0FE75888AFF4F4F4FFF4947 - 47FE494747FF494747FF484646FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE474545F91010106E000000340000 - 0010000000010000000000000000000000000000000000000000000000000000 - 0000000000003F3D3DB8484646FE484646FE484646FE484646FE505050FE7A8C - 8DFE41A2CEFE0C93D8FE0D9AE2FE0D9EE8FE0DA1EDFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA2EEFE0DA2EEFE13A5EFFE47B8F2FE50BCF3FE50BCF3FE50BCF3FE50BC - F3FE50BCF3FE50BCF3FE50BCF3FE50BCF3FE50BCF3FE50BCF3FE50BCF3FE50BC - F3FE50BCF3FE50BCF3FE50BCF3FE5AA7CFFE797777FE7B7979FE7B7979FE7B79 - 79FE7B7979FE777676FE6B6A6AFE5698B9FE50BCF3FE50BCF3FE50BCF3FE50BC - F3FE50BCF3FE50BCF3FE50BCF3FE50BCF3FE50BCF3FE50BCF3FE50BCF3FE50BC - F3FE50BCF3FE41B6F2FE11A4EFFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0DA1ECFE0D9EE8FE0C99E1FE0C92D7FE4B9EC2FE646C6CFE4A4949FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE2E2D2DB4000000430000 - 001D000000050000000000000000000000000000000000000000000000000000 - 00000000000024232360484646FE494747FF494747FF484646FE4A4949FF646C - 6CFF77ADBEFF0C90D4FE0D97DEFF0D9DE6FE0EA0EBFF0EA2EEFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE34B1F1FF58BEF4FF57BEF3FE58BEF4FF58BEF4FF57BE - F3FE58BEF4FF58BEF4FF57BEF3FE58BEF4FF58BEF4FF58BEF4FF57BEF3FE58BE - F4FF58BEF4FF57BEF3FE58BEF3FF6E94A8FF807E7EFE807F7FFF807F7FFF807F - 7FFE807E7EFF797878FF6A7277FE59B7E7FF58BEF4FF57BEF3FE58BEF4FF58BE - F4FF57BEF3FE58BEF4FF58BEF4FF57BEF3FE58BEF4FF57BEF3FE58BEF4FF58BE - F4FF57BEF3FE58BEF4FF2AADF0FF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA2 - EDFF0EA0EAFF0D9CE6FE0D96DDFF1392D2FF6F97A3FE545656FF494747FF4846 - 46FE494747FF494747FF484646FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE494747FF444242F00909095E0000 - 002D0000000D0000000100000000000000000000000000000000000000000000 - 0000000000000C0C0C19484646E9494747FF494747FF484646FE494747FF5456 - 56FF849A9BFF2E9CD1FE0C94DAFF0D9AE3FE0E9FE9FF0EA1EDFF0DA2EEFE0EA3 - EFFF0EA3EFFF0FA3EFFE54BDF3FF5EC1F4FF5EC1F4FE5EC1F4FF5EC1F4FF5EC1 - F4FE5EC1F4FF5EC1F4FF5EC1F4FE5EC1F4FF5EC1F4FF5EC1F4FF5EC1F4FE5EC1 - F4FF5EC1F4FF5EC1F4FE60BDECFF7E888FFF858484FE868484FF868484FF8584 - 84FE848282FF7A7A7AFF688EA1FE5EC1F3FF5EC1F4FF5EC1F4FE5EC1F4FF5EC1 - F4FF5EC1F4FE5EC1F4FF5EC1F4FF5EC1F4FE5EC1F4FF5EC1F4FE5EC1F4FF5EC1 - F4FF5EC1F4FE5EC1F4FF4BBAF2FF0FA3EFFE0EA3EFFF0EA3EFFF0DA2EEFE0EA1 - ECFF0D9EE8FF0D9AE2FE0C93D8FF3B9BC7FF6E7B7CFE4C4B4BFF494747FF4846 - 46FE494747FF494747FF484646FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE494747FF484646FE2423239C0000 - 003D000000190000000300000000000000000000000100000000000000000000 - 000000000000020202013B39399D484646FE484646FE484646FE484646FE4C4B - 4BFE697272FE6DAEC5FE0E91D4FE0C97DEFE0D9DE6FE0DA0EBFE0DA2EDFE0DA2 - EEFE0DA2EEFE1DA8F0FE65C4F4FE65C4F4FE65C4F4FE65C4F4FE65C4F4FE65C4 - F4FE65C4F4FE65C4F4FE65C4F4FE65C4F4FE65C4F4FE65C4F4FE65C4F4FE65C4 - F4FE65C4F4FE65C4F4FE6EB4D8FE898889FE8B8989FE8B8989FE8B8989FE8A89 - 89FE868585FE7B7A7AFE68B0D5FE65C4F4FE65C4F4FE65C4F4FE65C4F4FE65C4 - F4FE65C4F4FE65C4F4FE65C4F4FE65C4F4FE65C4F4FE65C4F4FE65C4F4FE65C4 - F4FE65C4F4FE65C4F4FE5FC1F4FE18A6EFFE0DA2EEFE0DA2EEFE0DA1EDFE0DA0 - EAFE0D9CE5FE0C97DDFE1091D3FE6B9AAAFE595D5DFE494747FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE413F3FE30000 - 0049000000280000000A00000000000000000000000200000000000000000000 - 000000000000000000001A1A1A2E494747FD494747FF484646FE494747FF4947 - 47FF545656FF849C9DFE329DCFFF0C93D8FE0D9AE2FF0D9EE8FF0DA1ECFE0EA2 - EEFF0EA3EFFF2CAEF1FE6DC7F5FF6DC7F5FF6CC7F5FE6DC7F5FF6DC7F5FF6CC7 - F5FE6DC7F5FF6DC7F5FF6CC7F5FE6DC7F5FF6DC7F5FF6DC7F5FF6CC7F5FE6DC7 - F5FF6DC7F5FF6CC7F5FE81A5B8FF908F8FFF908F8FFE908F8FFF908F8FFF8F8E - 8EFE898787FF7A8890FF6CC7F5FE6DC7F5FF6DC7F5FF6CC7F5FE6DC7F5FF6DC7 - F5FF6CC7F5FE6DC7F5FF6DC7F5FF6CC7F5FE6DC7F5FF6CC7F5FE6DC7F5FF6DC7 - F5FF6CC7F5FE6DC7F5FF6BC6F5FF22AAF0FE0EA2EFFF0EA2EEFF0DA1ECFE0D9E - E7FF0D99E1FF0C93D8FE3E9CC6FF6E7B7CFF4D4D4DFE494747FF494848FF4B4A - 4AFE4D4D4DFF4E4D4DFF4E4D4DFE4E4D4DFF4E4D4DFF4E4D4DFE4E4D4DFF4E4D - 4DFF4D4D4DFE4C4B4BFF4A4949FF494747FE494747FF494747FF484646FE1A19 - 1982000000390000001500000002000000000000000100000000000000000000 - 0000000000000000000000000000484646B7494747FF484646FE494747FF4947 - 47FF4B4A4AFF677070FE77ADBEFF1192D3FE0D96DDFF0D9CE5FF0D9FEAFE0EA1 - EDFF0EA2EEFF32B1F1FE74CAF6FF74CAF6FF74CAF5FE74CAF6FF74CAF6FF74CA - F5FE74CAF6FF74CAF6FF74CAF5FE76C3EBFF889EAAFF8EA0AAFF8FA1AAFE8FA1 - ABFF8FA1ABFF8FA1AAFE94989AFF969595FF969595FE969595FF969595FF9492 - 92FE8A898AFF7AA8BFFF74CAF5FE74CAF6FF74CAF6FF74CAF5FE74CAF6FF74CA - F6FF74CAF5FE74CAF6FF74CAF6FF74CAF5FE74CAF6FF74CAF5FE74CAF6FF74CA - F6FF74CAF5FE74CAF6FF74CAF6FF26ACF0FE0EA2EEFF0EA1ECFF0D9FE9FE0D9B - E4FF0C95DBFF1492D1FE7498A2FF585B5BFF494747FE494747FF4D4E4FFF5A68 - 6DFE68797EFF6B7D82FF6B7D82FE6B7D82FF6B7D82FF6B7D82FE6B7D82FF6B7D - 82FF6A7C81FE647073FF545656FF4A4848FE494747FF494747FF484646FE3735 - 35CA010101480000002300000006000000000000000100000000000000000000 - 000000000000000000000000000048464640484646F8484646FE484646FE4846 - 46FE494747FE525353FE7B8E8EFE4FA7CDFE0C92D6FE0D98DFFE0D9DE7FE0DA0 - EBFE0DA1EDFE2CAEF0FE7BCDF5FE7BCDF5FE7BCDF5FE7BCDF5FE7BCDF5FE7BCD - F5FE7BCDF5FE7BCDF5FE7BCDF5FE7EC5E8FE93979AFE9B9A9AFE9C9B9BFE9C9B - 9BFE9C9B9BFE9C9B9BFE9C9B9BFE9C9B9BFE9C9B9BFE9C9B9BFE9B9A9AFE9796 - 96FE8C8F92FE7DC3E6FE7BCDF5FE7BCDF5FE7BCDF5FE7BCDF5FE7BCDF5FE7BCD - F5FE7BCDF5FE7BCDF5FE7BCDF5FE7BCDF5FE7BCDF5FE7BCDF5FE7BCDF5FE7BCD - F5FE7BCDF5FE7BCDF5FE78CBF5FE22AAEFFE0DA1EDFE0DA0EAFE0D9DE6FE0C97 - DEFE0D92D5FE56A1C0FE677070FE4C4B4BFE494747FE494747FE515B5EFE66BB - E3FE7FD0F6FE7FD0F6FE7FD0F6FE7FD0F6FE7FD0F6FE7FD0F6FE7FD0F6FE7FD0 - F6FE7FD0F6FE86BCD6FE646969FE4C4A4AFE484646FE484646FE484646FE4745 - 45F80F0E0E6A000000330000000F000000010000000100000000000000000000 - 000000000000000000000000000048464601535858B1484646FE494747FF4947 - 47FF494747FF4A4848FE5C6161FF87A5A9FE2699D1FF0C94D9FF0C99E1FE0D9E - E8FF0EA0EBFF1AA6EEFE81CFF6FF83CFF7FF83CFF6FE83CFF7FF83CFF7FF83CF - F6FE83CFF7FF83CFF7FF83CFF6FE85C8EAFF9A9EA0FFA1A0A0FFA1A0A0FEA1A0 - A0FFA1A0A0FFA1A0A0FEA1A0A0FFA1A0A0FFA1A0A0FEA1A0A0FFA09F9FFF9998 - 98FE8CA3AFFF83CFF7FF83CFF6FE83CFF7FF83CFF7FF83CFF6FE83CFF7FF83CF - F7FF83CFF6FE83CFF7FF83CFF7FF83CFF6FE83CFF7FF83CFF6FE83CFF7FF83CF - F7FF83CFF6FE83CFF7FF76CAF6FF16A5EEFE0EA0EBFF0D9DE7FF0C99E1FE0C93 - D8FF329ACAFF75898CFE515252FF494747FF484646FE494747FF535B5FFF68BC - E2FE80D1F7FF80D1F7FF82CBEDFE82C8E7FF7FC5E5FF7EC4E4FE7EC4E4FF7EC4 - E4FF7EC4E4FE81B0C6FF616565FF4B4A4AFE494747FF494747FF484646FE4947 - 47FF2E2D2DB4000000420000001D000000050000000000000000000000000000 - 0000000000000000000000000000000000008AAEAE2F484646F2494747FF4947 - 47FF494747FF494747FE4D4D4DFF687171FE79AEBEFF1794D2FF0C95DBFE0D9B - E3FF0D9EE8FF0EA1EBFE6CC6F4FF8AD2F7FF8AD2F7FE8AD2F7FF8AD2F7FF8AD2 - F7FE8AD2F7FF8AD2F7FF8AD2F7FE8CCBEBFF9FA3A5FFA6A5A5FFA6A5A5FEA6A5 - A5FFA6A5A5FFA6A5A5FEA6A5A5FFA6A5A5FFA6A5A5FEA6A5A5FFA4A3A3FF9B9B - 9BFE8DBED8FF8AD2F7FF8AD2F7FE8AD2F7FF8AD2F7FF8AD2F7FE8AD2F7FF8AD2 - F7FF8AD2F7FE8AD2F7FF8AD2F7FF8AD2F7FE8AD2F7FF8AD2F7FE8AD2F7FF8AD2 - F7FF8AD2F7FE8AD2F7FF5DC0F3FF0EA0EBFE0D9EE8FF0D9AE2FF0C94DAFE1D95 - D0FF7298A3FF5A5F5FFE4A4848FF494747FF484646FE494747FF4F5050FF5D8E - A3FE7CCFF6FF80D1F7FF86C7E4FE899DA0FF6E7B7DFF636D6FFE626B6DFF626B - 6DFF616B6CFE5C6263FF515151FF4A4848FE494747FF494747FF484646FE4947 - 47FF434141ED0808085A0000002B0000000B0000000000000000000000000000 - 000000000000000000000000000000000000ABE2E2015E696989484646FE4846 - 46FE484646FE484646FE494747FE515252FE768484FE68ADC7FE0F91D3FE0C96 - DCFE0D9BE4FE0D9EE8FE39B1EFFE8FD4F6FE91D5F7FE91D5F7FE91D5F7FE91D5 - F7FE91D5F7FE91D5F7FE91D5F7FE93CEECFEA3A6A9FEA8A7A7FEA8A8A8FEA8A8 - A8FEA8A8A8FEA8A8A8FEA8A8A8FEA8A8A8FEA8A8A8FEA8A8A8FEA5A4A4FE9CA4 - A8FE92D1F2FE91D5F7FE91D5F7FE91D5F7FE91D5F7FE91D5F7FE91D5F7FE91D5 - F7FE91D5F7FE91D5F7FE91D5F7FE91D5F7FE91D5F7FE91D5F7FE91D5F7FE91D5 - F7FE91D5F7FE8DD3F6FE2AACEDFE0D9EE8FE0D9AE3FE0C95DBFE1091D2FE6CA1 - B3FE636B6BFE4C4B4BFE494747FE484646FE484646FE484646FE4A4949FE5659 - 59FE65AAC8FE7ED0F6FE7FD0F6FE89BACFFE6F7879FE535454FE4B4A4AFE4B4A - 4AFE4B4A4AFE4A4949FE494848FE494747FE484646FE484646FE484646FE4846 - 46FE484646FE2121219600000038000000140000000100000000000000000000 - 00000000000000000000000000000000000000000000ADE4E409494747D64947 - 47FF494747FF484646FE494747FF494747FE555757FF7C8E8FFF5BAACAFE0D91 - D4FF0C96DDFF0D9BE4FE11A0E9FF6DC6F3FF99D7F7FE99D7F8FF99D7F8FF99D7 - F7FE99D7F8FF99D7F8FF99D7F7FE9AD0ECFFA3A6A8FFA6A5A5FFA6A5A5FEA6A5 - A5FFA6A5A5FFA6A5A5FEA6A5A5FFA6A5A5FFA6A5A5FEA5A5A5FFA4A3A3FF9DBA - C9FE99D7F8FF99D7F8FF99D7F7FE99D7F8FF99D7F8FF99D7F7FE99D7F8FF99D7 - F8FF99D7F7FE99D7F8FF99D7F8FF99D7F7FE99D7F8FF99D7F7FE99D7F8FF99D7 - F8FF99D7F7FE5DBFF1FF0F9FE8FF0D9AE3FE0C96DBFF1092D3FF5FA2BCFE6973 - 73FF4E4E4EFF494747FE494747FF494747FF484646FE494747FF494747FF4B4A - 4AFE596467FF6BB8DAFF7FD0F6FE80D0F6FF88ABBAFF656C6CFE4E4D4DFF4947 - 47FF484646FE494747FF494747FF484646FE494747FF494747FF484646FE4947 - 47FF494747FF3F3D3DDD000000430000001E0000000500000000000000000000 - 000000000000000000000000000000000000000000000000000088ABAB414A49 - 49F3494747FF484646FE494747FF484646FE4A4949FF595C5CFF819597FE50A7 - CCFF0E92D4FF0C96DCFE0D9BE3FF22A6EAFF89D0F5FEA1DAF8FFA1DAF8FFA0DB - F8FEA1DBF8FFA1DBF8FFA0DBF8FEA1D1E9FFA5A6A7FFA5A5A5FFA5A5A5FEA5A5 - A5FFA5A5A5FFA5A5A5FEA5A5A5FFA5A5A5FFA5A5A5FEA5A5A5FFA5A5A5FFA1D2 - EAFEA1DBF8FFA1DBF8FFA0DBF8FEA1DBF8FFA1DBF8FFA0DBF8FEA1DBF8FFA1DB - F8FFA0DBF8FEA1DBF8FFA1DBF8FFA0DBF8FEA1DBF8FFA0DBF8FEA1DAF8FFA0DA - F8FF81CDF4FE17A2E8FF0D9AE3FF0C96DCFE1092D3FF58A1BEFF6F7C7DFE5051 - 51FF494747FF484646FE494747FF494747FF484646FE494747FF494747FF4947 - 47FE4E4D4DFF5C747CFF72C5EAFE80D1F7FF82CDF1FF849DA6FE5C6161FF4C4B - 4BFF494747FE494747FF494747FF484646FE494747FF494747FF484646FE4947 - 47FF494747FF484646FD0E0E0E60000000270000000800000000000000000000 - 0000000000000000000000000000000000000000000000000000000000006777 - 777C484646FE484646FE484646FE484646FE494747FE4B4A4AFE5A5E5EFE8299 - 9AFE55A9CCFE0D90D4FE0C96DBFE0D9AE2FE2AA9E9FE98D6F6FEA7DCF8FEA7DD - F8FEA7DDF8FEA7DEF8FEA7DEF8FEA8DBF5FEA8D1E5FEA8D0E4FEA8D0E4FEA8D0 - E4FEA8D0E4FEA8D0E4FEA8D0E4FEA8D0E4FEA8D0E4FEA8D0E4FEA8D1E5FEA7DE - F8FEA7DEF8FEA7DEF8FEA7DEF8FEA7DEF8FEA7DEF8FEA7DEF8FEA7DEF8FEA7DE - F8FEA7DEF8FEA7DEF8FEA7DEF8FEA7DEF8FEA7DDF8FEA7DDF8FEA7DCF8FE8CD1 - F4FE22A5E8FE0D99E1FE0C95DAFE0E90D3FE5DA3BFFE707E7FFE525353FE4947 - 47FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE494747FE505151FE5E8594FE7ACEF5FE80D0F6FE85C9E9FE7D8A8DFE575A - 5AFE4A4949FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE242323970000002E0000000C00000000000000000000 - 000000000000000000000000000000000000000000000000000000000000B8F6 - F6065B6363A9484646FE494747FF484646FE494747FF494747FF4B4949FE595D - 5DFF7E9091FF68ADC8FE1392D2FF0C94DAFF0C99E0FE26A6E8FF8BD0F4FFAFDF - F8FEAFDFF9FFAFE0F9FFAFE0F9FEAFE0FAFFAFE0FAFFAFE0FAFFAFE0F9FEAFE0 - FAFFAFE0FAFFAFE0F9FEAFE0FAFFAFE0FAFFAFE0F9FEAFE0FAFFAFE0FAFFAFE0 - F9FEAFE0FAFFAFE0FAFFAFE0F9FEAFE0FAFFAFE0FAFFAFE0F9FEAFE0FAFFAFE0 - FAFFAFE0F9FEAFE0FAFFAFE0FAFFAFE0F9FEAFDFF9FFAFDFF8FE7FCCF3FF1EA2 - E6FF0C98DFFE0C94D9FF1994D1FF69A4B9FE6D7878FF515252FF494747FE4947 - 47FF494747FF484646FE494747FF494747FF484646FE494747FF494747FF4846 - 46FE494747FF4A4848FF535555FE639AB1FF7DCFF5FF80D0F6FE87C1DCFF7480 - 81FF545555FE4A4848FF494747FF484646FE494747FF494747FF484646FE4947 - 47FF494747FF484646FE343333C5000000320000000E00000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000A2D3D311464A4DCE494747FF484646FE494747FF494747FF494747FE4B49 - 49FF565959FF768585FE74AEC1FF2398D1FF0C92D7FE0D97DDFF1AA0E4FF6BC3 - F0FEAFDFF8FFB6E2F9FFB5E2F9FEB6E3FAFFB6E3FAFFB6E3FAFFB5E3F9FEB6E3 - FAFFB6E3FAFFB5E3F9FEB6E3FAFFB6E3FAFFB5E3F9FEB6E3FAFFB6E3FAFFB5E3 - F9FEB6E3FAFFB6E3FAFFB5E3F9FEB6E3FAFFB6E3FAFFB5E3F9FEB6E3FAFFB6E3 - FAFFB5E3F9FEB6E3FAFFB6E2F9FFB5E2F8FEAADDF7FF61BFEEFE149DE3FF0C96 - DDFF0C92D6FE2998CEFF729FADFF687272FE4F5050FF494747FF484646FE4947 - 47FF494747FF484646FE494747FF494747FF484646FE494747FF494747FF4846 - 46FE494747FF494747FF4B4949FE575E5FFF73B2CDFF91D7F8FE8FD6F7FF91B8 - C9FF6B7474FE4F5050FF494747FF484646FE494747FF494747FF484646FE4947 - 47FF494747FF484646FE3F3E3EDB040404370000000E00000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000001B79A921464A4DDE484646FE484646FE484646FE484646FE4947 - 47FE4A4848FE525353FE6D7878FE83A9B1FE44A4CFFE0C90D4FE0C94DAFE0D98 - DFFE37ACE8FE8CD0F3FEBBE4F9FEBDE5F9FEBDE5F9FEBDE5FAFEBDE5FAFEBDE6 - FAFEBDE6FAFEBDE6FAFEBDE6FAFEBDE6FAFEBDE6FAFEBDE6FAFEBDE6FAFEBDE6 - FAFEBDE6FAFEBDE6FAFEBDE6FAFEBDE6FAFEBDE6FAFEBDE6FAFEBDE5FAFEBDE5 - FAFEBDE5F9FEBDE5F9FEB9E3F8FE81CCF2FE2EA8E7FE0D98DFFE0C94D9FE0F91 - D3FE49A2C9FE7A969BFE606767FE4D4D4DFE494747FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE494747FE4C4C4CFE5F6C70FE95CDE6FEA9E0F9FEA8DE - F7FE94ABB4FE5F6565FE4C4B4BFE494747FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE444242E6060606390000000C00000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000001A7BAC29454B4FDD494747FF494747FF484646FE4947 - 47FF494747FF494747FE4E4D4DFF5E6464FF809393FE71AEC4FF2799D1FF0C91 - D5FE0C95DBFF0E99E0FF34ABE7FE80CBF1FFB3E0F7FFC4E7FAFFC3E7F9FEC4E7 - FAFFC4E7FBFFC3E8FAFEC4E8FBFFC4E8FBFFC3E8FAFEC4E8FBFFC4E8FBFFC3E8 - FAFEC4E8FBFFC4E8FBFFC3E8FAFEC4E8FBFFC4E7FBFFC3E7FAFEC4E7FAFFC4E7 - FAFFAEDEF7FE76C7F0FF2EA8E6FF0C98DFFE0C95DAFF0C91D4FE2E9ACEFF71A4 - B4FF728080FE565858FF4B4A4AFF494747FE494747FF494747FF484646FE4947 - 47FF494747FF484646FE494747FF494747FF484646FE494747FF494747FF4846 - 46FE494747FF494747FF484646FE494747FF4E4E4EFF677B82FEA6DCF4FFB0E1 - FAFFAEDDF3FE808C8EFF555757FF494747FE494747FF494747FF484646FE4947 - 47FF494747FF484646FE434141E1060606310000000800000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000001A7BAC29464A4DDC494747FF484646FE4947 - 47FF494747FF484646FE494747FF4B4949FF545656FE6C7777FF83A2A6FF60AB - C8FE2197D1FF0D92D5FF0C94DAFE0E98DEFF1EA1E3FF49B4EAFF83CCF2FEAADD - F6FFBEE5F9FFC8E9FAFECAEAFAFFCAEAFAFFCAEAFAFECAEAFBFFCAEAFBFFCAEA - FAFECAEAFBFFCAEAFAFFCAEAFAFEC7E9FAFFBDE5F8FFA5DBF6FE7CC9F1FF45B2 - E9FF1A9EE2FE0D97DEFF0C94D9FF0E92D5FE2798CFFF61A5BFFE7A9093FF6168 - 68FF4F5050FE4A4848FF494747FF484646FE494747FF494747FF484646FE4947 - 47FF494747FF484646FE494747FF494747FF484646FE494747FF494747FF4A49 - 49FE4B4A4AFF4B4949FF494848FE494747FF494848FF525252FE80A3B1FFB4E3 - FAFFB5E4FAFE9EB8C2FF606666FF4B4949FE494747FF494747FF484646FE4947 - 47FF494747FF484646FE3D3C3CD3030303220000000500000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000001B79A921464A4DCA484646FE4846 - 46FE484646FE484646FE484646FE494747FE494747FE4D4C4CFE595D5DFE717D - 7DFE85A5AAFE65ADC7FE2C9CD1FE0C90D3FE0C93D7FE0C95DBFE0C97DDFE119B - E1FE25A4E5FE3EAEE8FE58BAECFE6BC2EFFE79C8F0FE82CCF2FE86CDF2FE81CB - F2FE78C7F0FE69C1EEFE55B9EBFE3AADE8FE23A3E4FE0F99E0FE0C97DDFE0C95 - DAFE0C92D7FE0E91D3FE309CD0FE68A7BEFE7C9699FE677070FE535454FE4B4A - 4AFE494747FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE494747FE4D4C4CFE575A - 5AFE616767FE5D6363FE525353FE4A4848FE494747FE4A4949FE637175FEAFDE - F2FEBBE6FAFEAECDDBFE6A7171FE4C4B4BFE484646FE484646FE484646FE4846 - 46FE484646FE484646FE343333B2000000130000000200000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000001A7BAC0F3F515BA14947 - 47FF494747FF484646FE494747FF494747FF484646FE494747FF494848FF4D4C - 4CFE585B5BFF6B7575FF84999AFE7CACBAFF54A7CAFF2C9CD1FF1192D2FE0C91 - D5FF0C93D8FF0C94D9FE0D95DBFF0D96DCFF0C96DDFE0D97DDFF0D97DDFF0C96 - DDFE0D96DDFF0D96DCFF0C95DBFE0C94D9FF0C93D7FF0C91D5FE1492D2FF2F9C - CFFF57A5C5FE7AA4B0FF7B8C8CFF626969FE525454FF4B4A4AFE494747FF4947 - 47FF484646FE494747FF494747FF484646FE494747FF494747FF484646FE4947 - 47FF494747FF484646FE494747FF494747FF484646FE494747FF555C5FFFA2D0 - E4FEBBE2F5FFAECEDDFF6B7272FE4D4D4DFF494747FF494848FE5C6263FFB0D9 - EBFFC2E8FBFEB4D1DEFF6C7474FF4C4C4CFE494747FF494747FF484646FE4947 - 47FF494747FF484646FE21202070000000090000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000E87C4053859 - 6A70484849EF484646FE494747FF494747FF484646FE494747FF494747FF4947 - 47FE494747FF4C4B4BFF535555FE606666FF717E7EFF80979AFF7FA9B3FE6AAA - C2FF51A6CBFF3AA0CEFE2799D0FF1C96D2FF1894D2FE1594D3FF1593D3FF1694 - D3FE1894D2FF1D96D2FF2999CFFE3CA0CDFF52A5C8FF6BA7BDFE7CA1AAFF7A8E - 90FF6A7474FE5B5F5FFF505151FF4A4949FE494747FF494747FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE494747FF494747FF484646FE4947 - 47FF494747FF484646FE494747FF494747FF484646FE494747FF55595AFFA9CF - DFFEC8EBFCFFC3E3F3FF869395FE585C5CFF4C4C4CFF4F4F4FFE718389FFC1E6 - F7FFC8EBFBFEB3CDD8FF686F6FFF4C4B4BFE494747FF494747FF484646FE4947 - 47FF494747FF484646F20909091F000000020000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000088B0B236535858CA484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE494747FE4A4848FE4C4C4CFE525353FE5A5F5FFE656E - 6EFE707C7CFE7B8C8CFE829899FE839FA3FE81A2A9FE7FA4ADFE7EA4ADFE7EA3 - ACFE80A1A7FE829DA0FE7F9495FE778686FE6D7777FE616868FE575A5AFE5050 - 50FE4B4A4AFE494747FE494747FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE494747FE4F5050FE8FAD - B9FECEEDFBFECEECFBFEB6CED8FE7A8787FE656D6DFE6E7B7DFEB2D2DFFECEED - FBFECEEDFBFE9FB1B7FE5D6262FE4A4949FE484646FE484646FE484646FE4846 - 46FE484646FE3130309400000006000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000ADE5E502768E8E724C4C4CE6484646FE494747FF494747FF4846 - 46FE494747FF494747FF484646FE494747FF494747FF494747FF494747FE4A48 - 48FF4B4A4AFF4D4D4DFE505050FF525454FF545656FE565858FF565959FF5558 - 58FE535555FF525252FF4F4F4FFE4C4B4BFF4B4949FF494747FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE494747FF484646FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE494747FF494747FF484646FE4947 - 47FF494747FF484646FE494747FF494747FF484646FE494747FF4B4949FF5F68 - 6AFEBCDCEAFFD4EFFCFFD4EFFCFECEE9F6FFC2DEEAFFCEECF9FED4EFFCFFD4EF - FCFFBFD7E2FE717A7AFF515252FF494747FE494747FF494747FF484646FE4947 - 47FF444242DC0B0A0A1D00000001000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000004A49491C4846468E494747F0494747FF4846 - 46FE494747FF494747FF484646FE494747FF494747FF494747FF484646FE4947 - 47FF494747FF484646FE494747FF494747FF494747FE494747FF494747FF4947 - 47FE494747FF494747FF494747FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE494747FF484646FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE494747FF494747FF484646FE4947 - 47FF494747FF484646FE494747FF494747FF484646FE494747FF494747FF4E4D - 4DFE697578FFB0CBD5FFD2EBF7FED9F1FCFFDAF1FDFFD9F0FCFED2EAF6FFB4CA - D2FF798385FE565858FF4A4949FF494747FE494747FF494747FF484646FE4846 - 46F31F1F1F4C0000000100000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000484646244846468A4846 - 46ED484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4947 - 47FE4D4D4DFE595C5CFE707D80FE859395FE8A979AFE869497FE768284FE6167 - 67FE525454FE4B4949FE494747FE484646FE484646FE484646FE484646FC2D2C - 2C63010101020000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000004846 - 460B49474765494747BD484646F6494747FF494747FF494747FF484646FE4947 - 47FF494747FF484646FE494747FF494747FF484646FE494747FF494747FF4846 - 46FE494747FF494747FF484646FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE494747FF484646FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE494747FF494747FF484646FE4947 - 47FF494747FF484646FE494747FF494747FF484646FE494747FF494747FF4846 - 46FE494747FF4A4848FF4C4B4BFE4E4E4EFF505050FF4F4F4FFE4D4D4DFF4B49 - 49FF494747FE494747FF494747FF484646FE494747FF464444E1302F2F4C0000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000049474704484646224947476E494747B4494747E5484646F94947 - 47FF494747FF484646FE494747FF494747FF484646FE494747FF494747FF4846 - 46FE494747FF494747FF484646FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE494747FF484646FE494747FF4947 - 47FF484646FE494747FF494747FF484646FE494747FF494747FF484646FE4947 - 47FF494747FF484646FE494747FF494747FF484646FE494747FF494747FF4846 - 46FE494747FF494747FF484646FE494747FF494747FF484646FE494747FF4947 - 47FF484646FE494747FF494747FE484646EF413F3F943837371D000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000004846460F484646354846 - 46604846468B484646AE484646CD484646E4484646F3484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FE484646FE484646FE484646FE484646FE484646FE484646FE484646FE4846 - 46FC484646E2484646B24846466E484646210000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8FFFFFFFFFFFFFFFFF - FFFF80000FFFFFFFFFFFFFFFFFF8000001FFFFFFFFFFFFFFFFE00000003FFFFF - FFFFFFFFFF000000000FFFFFFFFFFFFFFE0000000003FFFFFFFFFFFFF8000000 - 0000FFFFFFFFFFFFE000000000007FFFFFFFFFFFC000000000001FFFFFFFFFFF - 8000000000000FFFFFFFFFFE00000000000007FFFFFFFFFC00000000000003FF - FFFFFFF800000000000001FFFFFFFFF000000000000000FFFFFFFFF000000000 - 0000007FFFFFFFE0000000000000003FFFFFFFC0000000000000001FFFFFFF80 - 000000000000001FFFFFFF80000000000000000FFFFFFF000000000000000007 - FFFFFE000000000000000007FFFFFE000000000000000003FFFFFC0000000000 - 00000003FFFFFC000000000000000001FFFFF8000000000000000001FFFFF800 - 0000000000000000FFFFF0000000000000000000FFFFF0000000000000000000 - 7FFFF00000000000000000007FFFE00000000000000000007FFFE00000000000 - 000000003FFFE00000000000000000003FFFE00000000000000000001FFFC000 - 00000000000000001FFFC00000000000000000000FFFC0000000000000000000 - 0FFFC00000000000000000000FFFC000000000000000000007FFC00000000000 - 0000000007FFC000000000000000000003FFC000000000000000000003FFC000 - 000000000000000001FFC000000000000000000001FFC0000000000000000000 - 01FFC000000000000000000000FFC000000000000000000000FFC00000000000 - 00000000007FC0000000000000000000007FC0000000000000000000003FC000 - 0000000000000000003FE0000000000000000000003FE0000000000000000000 - 001FE0000000000000000000001FE0000000000000000000000FF00000000000 - 00000000000FF00000000000000000000007F00000000000000000000006F000 - 00000000000000000006F80000000000000000000002FC000000000000000000 - 0002FC0000000000000000000000FC0000000000000000000001FE0000000000 - 000000000001FE0000000000000000000000FF0000000000000000000000FF80 - 00000000000000000000FFC000000000000000000000FFC00000000000000000 - 0000FFE000000000000000000000FFF000000000000000000000FFF800000000 - 000000000000FFFC00000000000000000000FFFE00000000000000000000FFFF - 00000000000000000001FFFF80000000000000000001FFFFE000000000000000 - 0003FFFFF0000000000000000003FFFFFC000000000000000007FFFFFF000000 - 00000000000FFFFFFFC0000000000000003FFFFFFFF0000000000000007FFFFF - FFFF00000000000001FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF28000000480000009000 - 0000010020000000000060540000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000003737370137373702373737043737370637373707373737073737 - 3707373737063737370537373703373737010000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000001000000050000 - 000B000000130000001B00000023000000290000002E00000030000000310000 - 00310000002F0000002C000000260000001E000000160000000E000000070000 - 0002000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000040000000D0000001A000000290000 - 00370000004200000049030303520C0C0C64100F0F7110101073101010741010 - 10740E0D0D6B0707075B000000500000004C000000460000003B0000002F0000 - 0020000000110000000600000001000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000028272701070707060000001300000026000000390303034E121111742423 - 23A1333232C7424040E5474545F9484646FC484646FD484646FD484646FD4846 - 46FD484646FC474545FA444242EE383636D12A2929AF171616840606065F0000 - 004C0000003F0000002D000000190101010A1F1E1E0200000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000D0C - 0C04000000120000002900000040121111702D2C2CB6424040E9484646FE4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF454343F23332 - 32C7181717860101015400000046000000320000001A03030308242323010000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000001A1A1A020000000D0000 - 0024020202421B1A1A873C3A3AD9484646FE494747FF484646FE494747FF4846 - 46FE494747FF494747FF484646FE494747FF484646FE494747FF484646FE4947 - 47FF484646FE494747FF494747FF484646FE494747FF484646FE494747FF4846 - 46FE494747FF424040E92322229F0606065E000000460000002E000000140808 - 0804000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000001014140500000017000000341716 - 16783C3A3AD9484646FE494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF4A4949FF4C4B4BFF4D4D4DFF4E4E4EFF4E4E4EFF4D4D - 4DFF4C4B4BFF4A4949FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF424040EA1F1E1E97020202540000003D0000 - 0020010101090000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000040505080000002009090950323131BE4846 - 46FE494747FF484646FE494747FF484646FE494747FF494747FE4C4C4CFF5456 - 56FE606666FF697879FF68848CFE638C9AFF6091A4FE5E94A9FF5E93A9FE5E90 - A4FF618A9AFE66838CFF687779FF5F6565FE545656FF4C4B4BFE494747FF4947 - 47FE494747FF484646FE494747FF484646FE494747FF3B3A3AD9100F0F740000 - 00480000002B0000000F546B6B01000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000505050A0000002718171776424141EA494747FF4947 - 47FF494747FF494747FF494747FF4B4A4AFF545656FF657071FF6A8B95FF5598 - B4FF3F9DC9FF2F9DD4FF2B9FD9FF2CA0DCFF2EA2DDFF30A3DEFF30A3DEFF2EA2 - DDFF2CA0DCFF2B9ED9FF2C9CD4FF399BCAFF4C95B5FF638895FF636E70FF5355 - 55FF4B4949FF494747FF494747FF494747FF494747FF494747FF464444F62322 - 229E010101500000003300000012515151020000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000606060A0101012B25242498484646FA494747FF484646FE4947 - 47FF494747FF4B4A4AFE575A5AFF6C7F82FE5A98B1FF399ECEFE289DD9FF2EA3 - DFFE33A7E3FF35AAE5FF38ACE7FE3AAEE9FF3BAEEAFE3CAFEAFF3CAFEAFE3CAF - EAFF3BAEE9FE39ADE8FF37ABE6FF34A8E3FE30A4DFFF279DD9FE319BCFFF4F93 - B0FE667C81FF565959FE4B4949FF494747FE494747FF494747FF484646FE4846 - 46FE323030C00404045800000037000000140327390200000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000404040A0101012C2E2D2DAD484646FD494747FF494747FF494747FF4948 - 48FF525454FF6A7B7EFF599AB5FF2E9DD3FF2AA0DDFF2FA6E3FF34AAE7FF37AD - EAFF39B0ECFF3BB1EEFF3DB3EFFF3EB4EFFF3EB4F0FF3FB4F0FF3FB4F0FF3FB4 - F0FF3FB4EFFF3EB3EFFF3EB2EEFF3CB1ECFF3AAFEBFF36ACE8FF32A7E4FF2BA1 - DEFF289AD4FF4B95B5FF65787CFF525454FF494848FF494747FF494747FF4947 - 47FF494747FF393737D30606065D0000003700000013526E6E01000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000D12 - 1206010101282E2D2DAC484646FE494747FF484646FE494747FF4B4A4AFE5F65 - 65FF6994A3FF349DCFFE269FDCFF2DA6E3FE31AAE8FF35AEECFE38B0EEFF39B2 - EFFE3AB3F0FF3BB4F1FF3BB4F1FE3CB4F1FF3CB4F1FE3DB5F2FF3DB5F1FE3DB5 - F2FF3DB4F1FE3EB5F1FF3DB5F1FF3DB4F1FE3CB3F0FF3BB2EEFE38B0ECFF35AC - E9FE30A7E4FF28A0DDFE2A99CFFF5A8EA3FE5D6363FF4B4A4AFF494747FE4947 - 47FF484646FE494747FF3C3B3BDB0505055B000000350000000F5E7E7E010000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000263333040000 - 001E2D2C2CA6484646FE494747FF494747FF494747FF4E4E4EFF6A7778FF539D - BDFF239BD8FF28A2E1FF2DA8E7FF31ADECFF33AFEEFF35B1F0FF36B2F1FF37B2 - F1FF37B2F2FF37B3F2FF38B3F2FF38B3F2FF38B3F2FF39B3F2FF39B3F2FF39B3 - F2FF39B3F2FF39B3F2FF3AB4F2FF3AB4F2FF3AB4F2FF39B3F1FF39B3F0FF38B1 - EFFF36AFEDFF31ABE9FF2BA5E2FF229BD9FF4196BDFF647478FF4E4D4DFF4947 - 47FF494747FF494747FF494747FF393838D4050505580000002E0304040B0000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000526E6E0100000014201F - 1F82484646FE494747FF494747FF494747FF505050FF6F8285FF419DC7FF219C - DBFF27A4E4FF2BA9EAFF2EADEDFF30AEEFFF31B0F0FF32B0F1FF32B0F1FF32B0 - F1FF33B1F1FF33B1F1FF33B1F1FF34B1F1FF34B1F1FF34B1F1FF34B1F1FF35B1 - F1FF35B2F2FF36B2F2FF36B2F2FF36B2F2FF36B2F2FF37B2F2FF37B2F2FF37B2 - F1FF36B1F0FF34AFEEFF31ACEBFF2BA7E6FF239EDDFF3197C8FF657D83FF4F50 - 50FF494747FF494747FF494747FF494747FF333232C40000004B000000240E11 - 1105000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000B131313584745 - 45F7484646FE494747FF494747FE505151FF70878CFE359CCDFF1F9CDDFE24A4 - E6FF28A9EBFF2AACEEFE2BADF0FF2CAEF0FE2DAFF1FF2DAFF0FE2DAFF1FF2EAF - F0FE2EAFF1FF2EAFF1FF2EAFF0FE2FAFF1FF2FAFF0FE2FB0F1FF30B0F0FE30B0 - F1FF30B0F0FE30B0F1FF31B0F1FF31B0F0FE31B0F1FF32B0F1FE32B0F1FF32B0 - F1FE32B0F1FF32B0F0FE31AFEFFF2EACECFE29A7E7FF239FDFFF2797CEFE6481 - 8AFF505050FE494747FF484646FE494747FF484646FE262525A4000000420000 - 00181B1A1A020000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000001315150405040428413F3FDF4947 - 47FF494747FF494747FF4E4E4EFF6F8285FF379CCCFF1C9CDDFF21A3E6FF25A8 - ECFF27ABEFFF27ACF0FF28ACF1FF28ADF1FF28ADF1FF28ADF1FF29ADF1FF29AD - F1FF29ADF1FF29ADF1FF2AADF1FF2AADF1FF2AAEF1FF2BAEF1FF2BAEF1FF2BAE - F1FF2BAEF1FF2CAEF1FF2CAEF1FF2CAEF1FF2DAEF1FF2DAFF1FF2DAFF1FF2DAF - F1FF2EAFF1FF2EAFF1FF2EAFF0FF2DAEEFFF2BABEDFF27A7E8FF219EDFFF2796 - CDFF647D83FF4D4D4DFF494747FF494747FF494747FF474545F9121212770000 - 00330000000B0000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000102D2C2CA0494747FF4947 - 47FF494747FE4B4A4AFF6B7778FE439EC7FF199ADBFE1DA2E6FF21A7EBFE22A9 - EEFF23AAF0FF23ABF0FE24ABF0FF24ABF0FE24ABF0FF24ABF0FE25ABF0FF25AB - F0FE25ACF0FF26ACF0FF26ACF0FE26ACF1FF26ACF0FE26ACF1FF27ACF0FE27AC - F1FF27ACF0FE27ACF1FF28ADF1FF28ADF0FE28ADF1FF3990BDFE3698CAFF2AAB - EDFE29ADF1FF29ADF0FE2AADF1FF29ADF0FE29ACEFFF28AAECFF24A5E7FE1E9D - DEFF2F96C8FE647376FF4B4A4AFE494747FF484646FE494747FF3E3D3DE00303 - 034F000000201211110300000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000511111148474545F7494747FF4947 - 47FF494848FF5E6465FF589FBBFF1697D9FF199FE4FF1CA5EAFF1EA8EEFF1FA0 - E2FF2F6581FF3D708AFF42748EFF42748EFF42748EFF3B7D9FFF21A9EEFF21AA - F0FF21AAF0FF22AAF0FF22AAF0FF22AAF0FF22AAF0FF23ABF0FF23ABF0FF23AB - F0FF23ABF0FF24ABF0FF24ABF0FF24ABF0FF26A7EAFF535D63FF595959FF5264 - 6EFF4180A1FF2F9ED7FF26ABEFFF26ACF0FF26ACF0FF26ABEFFF24A8ECFF20A3 - E6FF199ADBFF4194BBFF5D6363FF494747FF494747FF494747FF484646FE2524 - 24A1000000390000000E00000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000001010110373636BF484646FE494747FF4947 - 47FF525454FE7096A2FF1996D5FE169CE1FF18A3E9FE1AA6EEFF1AA7EFFE1BA7 - EFFF285C77FF434242FE515050FF535252FE545252FF535152FE2B8EC1FF1DA8 - EFFE1DA8F0FF1DA8F0FF1DA8EFFE1EA9F0FF1EA9EFFE1EA9F0FF1EA9EFFE1FA9 - F0FF1FA9EFFE1FA9F0FF20A9F0FF20A9EFFE3288B4FF565454FE575555FF5755 - 55FE575555FF575657FE4B6979FF3986AEFE27A2E1FF22AAEFFF22A9EEFE20A6 - EBFF1BA0E4FE1796D7FF5B8DA1FE515252FF494747FE494747FF494747FF4442 - 42F10908085A0000002016161603000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000031615154F484646FC494747FF494747FF4B49 - 49FF6D7B7DFF359BCCFF1298DDFF15A0E7FF16A4EDFF17A6EFFF17A6F0FF17A6 - F0FF1998D9FF32373AFF494747FF504E4EFF514F4FFF514F4FFF465D6AFF1BA3 - E9FF19A7F0FF19A7F0FF19A7F0FF1AA7F0FF1AA7F0FF1AA8F0FF1AA7F0FF1AA8 - F0FF1BA8F0FF1BA8F0FF1BA8F0FF1CA7EEFF446272FF545252FF545252FF5452 - 52FF545252FF545353FF555353FF555353FF525659FF40697FFF2689BCFF1DA7 - EDFF1BA3E9FF179CDFFF2295CEFF65767AFF4B4949FF494747FF494747FF4947 - 47FF282727A8000000340202020A000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000B363434B6494747FF484646FE494747FF5658 - 58FF659EB3FE1094D7FF119CE3FE13A2EAFF14A4EEFE14A5EFFF15A5EFFE15A5 - EFFF15A5EFFF1F6487FE3B3A3AFF4C4A4AFE4E4C4CFF4E4C4CFE4E4C4DFF2D7E - A9FE16A6F0FF16A6F0FF16A6EFFE16A6F0FF17A6EFFE17A6F0FF17A6EFFE17A6 - F0FF17A6EFFE18A6F0FF18A7F0FF2294CEFE4E4F50FF514F4FFE514F4FFF514F - 4FFE514F4FFF514F4FFE525050FF525050FE514F4FFF454444FF266A8DFE1AA7 - EFFF19A5ECFE16A0E6FF1396DAFE4B92B1FF555858FE494747FF494747FF4846 - 46FE434242ED0505054D00000017252424010000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000010D0D0D31484646F9494747FF494747FF4B4A4AFF707F - 7FFF2B9AD0FF0E98DEFF109FE8FF11A2EDFF11A4EEFF11A4EFFF12A4EFFF12A4 - EFFF12A4EFFF139BE0FF293841FF434141FF4C4A4AFF4C4A4AFF4D4B4BFF4751 - 57FF189DE1FF13A5EFFF14A5EFFF14A5EFFF14A5EFFF14A5EFFF14A5EFFF14A5 - EFFF15A5EFFF15A5EFFF15A5EFFF356D8BFF4E4C4CFF4F4D4DFF4F4D4DFF4D4B - 4BFF474545FF464545FF4C4A4AFF4F4D4DFF4C4A4AFF383A3CFF1996D7FF17A6 - F0FF16A5EEFF15A2EAFF129AE1FF1C94D0FF657A7FFF4A4949FF494747FF4947 - 47FF484646FE1D1C1C8C0000002A0A0A0A060000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000327262684494747FF494747FF494747FF535555FF6B9D - AEFF0C92D7FF0E9BE3FF0FA0EBFF0FA2EEFF0FA3EFFF0FA3EFFF10A3EFFF10A4 - EFFF10A4EFFF10A4EFFF186E9AFF353434FF474545FF4A4848FF4A4848FF4A48 - 48FF307091FF11A4EFFF11A4EFFF11A4EFFF12A4EFFF12A4EFFF12A4EFFF12A4 - EFFF12A4EFFF12A4EFFF159FE6FF464D51FF4C4A4AFF4C4A4AFF4C4A4AFF4544 - 44FF313030FF2C2A2AFF363434FF403E3EFF3F3E3EFF265065FF14A5EFFF14A5 - EFFF14A5EEFF13A2ECFF109DE5FF0E94D9FF5192ADFF525353FF494747FF4947 - 47FF494747FF373535CD0000003E000000110000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000101010A403E3ED2484646FE494747FF494747FE666F70FF3E9E - CAFF0C96DCFE0D9DE7FF0EA1EDFE0EA2EEFF0EA2EEFE0EA3EFFF0EA2EEFE0EA3 - EFFF0EA3EFFF0EA2EEFE0F9FE9FF233B48FE3E3C3CFF494747FE4A4848FF4947 - 47FE464A4DFF1993D1FF0FA3EEFE0FA3EFFF0FA3EEFE0FA3EFFF0FA3EEFE10A3 - EFFF10A3EEFE10A3EFFF257CA9FF494747FE4A4848FF4A4848FE494747FF3A39 - 39FE1B658CFF16587AFE1C2B33FF232323FE262525FF167DB2FF12A4EEFE12A4 - EFFF11A4EEFE10A2EDFF0F9FE8FE0D97DEFF2696CCFE636B6BFF494747FF4846 - 46FE494747FF484646FC0E0E0E68000000231414140300000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000C0C0C2B484646F7494747FF494747FF4C4B4BFF758E93FF1995 - D3FF0D99E1FF0D9FEAFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF1379ADFF303030FF454343FF494747FF4947 - 47FF494747FF356178FF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0FA1EDFF395969FF494747FF4A4848FF494747FF454343FF2E37 - 3DFF109BE2FF0FA3EFFF0F9BE2FF1371A2FF154964FF109EE7FF0FA3EFFF0FA3 - EFFF0FA3EFFF0FA2EEFF0EA0EBFF0D9AE3FF0D92D5FF668690FF4C4B4BFF4947 - 47FF494747FF494747FF2D2C2CB4000000370101010C00000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000201F1F63494747FF484646FE494747FF535454FE689EB2FF0C93 - D7FF0D9BE4FE0EA1EBFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0EA1ECFE1E455AFF3B3939FE474545FF4846 - 46FE494747FF484646FF1C88C0FE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3 - EFFF0DA2EEFE188FCCFF464647FF494747FE494747FF484646FE3E3C3CFF1E59 - 77FE0EA3EFFF0EA2EEFE0EA3EFFF0EA2EEFE0EA3EFFF0EA3EFFF0EA2EEFE0EA3 - EFFF0EA2EEFE0EA2EEFF0DA1ECFE0D9DE6FF0C94DAFE4D92B0FF525454FF4846 - 46FE494747FF484646FE444242F1070707550000001C1F1E1E02000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000067676701312F2F94494747FF494747FF494747FF5E6363FF4EA2C5FF0C95 - DBFF0D9DE7FF0EA1EDFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF1186C2FF2C2E2FFF434141FF4846 - 46FF494747FF494747FF3B5766FF0F9FE9FF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF2C6B8CFF484646FF494747FF494747FF464444FF343435FF1285 - BFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA2EDFF0D9EE8FF0D97DDFF3396C4FF5D6262FF4947 - 47FF494747FF494747FF494747FE222121980000003001010108000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000067676703393737BE494747FF484646FE494747FF6B7575FE349ECFFF0D97 - DEFF0D9EE8FE0EA2EDFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA2EEFF1B516CFE383737FF4745 - 45FE494747FF494747FF484646FE247CA9FF0DA2EEFE0EA3EFFF0DA2EEFE0EA3 - EFFF0F9EE7FE414B52FF494747FF484646FE484646FF424040FE26404DFF0EA1 - EDFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0DA2EEFE0EA3EFFF0DA2EEFE0D9FE9FF0D99E0FE1E94CFFF657274FF4947 - 47FE494747FF484646FE494747FF3F3D3DE201010145000000162A2929010000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000069696907464444DC494747FF494747FF4A4949FF778787FF1E97D2FF0D99 - E0FF0E9FEAFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF1090D2FF292F33FF413F - 3FFF484646FF494747FF494747FF424E55FF119CE2FF0EA3EFFF0EA3EFFF0EA3 - EFFF1F81B4FF474646FF494747FF494747FF484646FF3A3838FF186B95FF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA0EAFF0D9AE2FF1393D4FF677F85FF4A48 - 48FF494747FF494747FF494747FF484646FE1717177D000000290B0B0B050000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000069696909484646F0494747FF484646FE4C4B4BFF7B9396FE1293D4FF0D9A - E2FF0DA0EAFE0EA2EEFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE185D80FF3534 - 34FE464444FF494747FF484646FE484646FF2C7093FE0EA3EFFF0DA2EEFE0EA2 - EEFF345E75FE484646FF494747FF484646FE454343FF2F3437FE1094D8FF0DA2 - EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA0EBFF0D9BE3FE0D92D6FF648793FF4B4A - 4AFE494747FF484646FE494747FF484646FE353434C90000003D000000100000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00006969690B484646FE494747FF494747FF4D4D4DFF78979FFF0F92D5FF0D9A - E3FF0EA0EBFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0F98DEFF2534 - 3BFF3F3E3EFF484646FF494747FF494747FF45494DFF1693D4FF0EA3EFFF1397 - DBFF43474AFF494747FF494747FF484646FF3F3D3DFF205069FF0EA2EEFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA1ECFF0D9BE5FF0C92D7FF608C9DFF4C4B - 4BFF494747FF494747FF494747FF494747FF474545F90E0E0E67000000211414 - 1403000000000000000000000000000000000000000000000000000000000000 - 00006969690B494747FF494747FF494747FF4E4E4EFF769AA3FF0E92D5FF0D9A - E3FF0EA0EBFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF166A - 96FF333232FF454444FF494747FF494747FF484646FF34637BFF0EA3EFFF227C - AAFF474545FF494747FF494747FF474545FF363536FF147CB2FF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA1ECFF0D9CE5FF0C93D7FF5E8EA1FF4D4C - 4CFF494747FF494747FF494747FF494747FF494747FF2B2929B0000000350100 - 000B000000000000000000000000000000000000000000000000000000000000 - 00006969690B484646FE494747FF484646FE4E4E4EFF7799A2FE0E92D5FF0D9A - E3FF0DA0EBFE0EA2EEFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0E9F - E9FE223A46FF3D3C3CFF484646FE494747FF484646FE474748FF1D89C1FE3561 - 77FF484646FE494747FF494747FF434141FE293942FF0EA0EAFE0EA3EFFF0DA2 - EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA1ECFF0D9CE5FE0C93D7FF5E8EA0FF4D4C - 4CFE494747FF484646FE494747FF484646FE494747FF464444F30504044F0000 - 001B1F1E1E010000000000000000000000000000000000000000000000000000 - 00006969690A484646FE494747FF494747FF4D4C4CFF7A989EFF0F92D5FF0D9A - E2FF0EA0EBFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF1478ABFF302F2FFF454343FF484646FF494747FF494747FF3E5866FF454B - 4FFF494747FF494747FF484646FF3C3A3AFF1B6185FF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA2EFFF0EA1ECFF0D9BE4FF0C92D7FF628D9CFF4C4B - 4BFF494747FF494747FF494747FF494747FF494747FF494747FF201F1F940000 - 002F050505070000000000000000000000000000000000000000000000000000 - 000069696907484646F0494747FF484646FE4C4B4BFF7C9295FE1493D4FF0D9A - E1FF0DA0EAFE0EA2EEFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3 - EEFE10A1EBFF25485BFF434141FE504F4FFF525151FE535151FF535151FE5351 - 51FF525050FE504E4EFF4B4949FF333638FE118ECDFF0DA2EEFE0EA3EFFF0DA2 - EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA0EBFF0D9BE3FE0E92D6FF678892FF4B4A - 4AFE494747FF484646FE494747FF484646FE494747FF484646FE3E3C3CDE0202 - 0246000000152928280100000000000000000000000000000000000000000000 - 000069696904484646DB494747FF494747FF4A4949FF768586FF2499D2FF0D98 - E0FF0E9FE9FF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF11A4EFFF1BA7EFFF22AA - F0FF26ACF0FF2992C7FF434243FF565555FF5B5959FF5B5959FF5B5959FF5B59 - 59FF5B5959FF5B5959FF545353FF395A6BFF23A9EFFF1CA8EFFF13A4EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA0EAFF0D9AE2FF1694D3FF697E84FF4A48 - 48FF494747FF494747FF494747FF494747FF494747FF494747FF484646FE1514 - 147A000000270B0B0B0500000000000000000000000000000000000000000000 - 0000000000003A3838BC494747FF484646FE494747FF697373FE3CA1CFFF0D97 - DDFF0D9EE8FE0EA2EDFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3 - EFFF0EA3EFFF0DA2EEFE0EA3EFFF13A5EFFE23ABF0FF2DAEF0FE2EAFF1FF2DAF - F0FE2EAFF1FF2EAFF1FF3A667DFE535151FF605E5EFE615F5FFF615F5FFE615F - 5FFF615F5FFE605E5EFF535151FF3586AFFE2EAFF1FF2DAFF0FE2DAFF0FF25AB - F0FE15A5EFFF0EA3EEFE0EA3EFFF0DA2EEFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0DA2EEFE0EA3EFFF0DA2EEFE0D9FE9FF0D98DFFE2496CDFF667172FF4947 - 47FE494747FF484646FE494747FF484646FE494747FF484646FE494747FF3533 - 33C60000003C0000001000000000000000000000000000000000000000000000 - 00000000000034323291494747FF494747FF494747FF5C6161FF58A5C4FF0C95 - DAFF0D9DE6FF0EA1ECFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0FA3EFFF21AAF0FF34B1F1FF36B2F2FF36B2F1FF36B2F2FF36B2 - F1FF36B2F2FF36B2F2FF38A1D8FF4D5255FF616060FF676565FF676565FF6765 - 65FF676565FF636161FF4F5559FF36ADEAFF36B2F2FF36B2F1FF36B2F2FF36B2 - F1FF35B1F1FF25ABF0FF10A3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA1EDFF0D9EE7FF0D96DDFF3C98C2FF5C6060FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4745 - 45FA0C0B0B610000002100000003000000000000000000000000000000000000 - 0000000000002120205C494747FF484646FE494747FF525353FE73A1B0FF0D92 - D6FF0D9BE3FE0EA0EBFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0EA3 - EFFF0FA3EFFF2DAFF0FE3DB5F1FF3DB5F1FE3DB5F2FF3DB5F1FE3DB5F2FF3DB5 - F1FE3DB5F2FF3DB5F2FF3DB5F1FE487D98FF636161FE6C6B6BFF6D6B6BFE6D6B - 6BFF6D6B6BFE646363FF4A7991FF3DB5F1FE3DB5F2FF3DB5F1FE3DB5F2FF3DB5 - F1FE3DB5F2FF3DB5F1FE32B0F1FF12A4EFFE0EA3EFFF0EA3EFFF0DA2EEFE0EA3 - EFFF0DA2EEFE0EA2EEFF0DA1ECFE0D9CE5FF0C94D9FE5894ACFF515252FF4846 - 46FE494747FF484646FE494747FF484646FE494747FF484646FE494747FF4947 - 47FF2A2929AD000000350000000B000000000000000000000000000000000000 - 0000000000000E0D0D22484646F7494747FF494747FF4B4A4AFF788D8FFF2298 - D2FF0D98E0FF0D9FE9FF0EA2EDFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0FA3 - EFFF32B0F1FF46B8F2FF46B8F3FF46B8F2FF46B8F3FF46B8F2FF46B8F3FF46B8 - F2FF46B8F3FF46B8F3FF46B8F2FF48B1E7FF697075FF737272FF737272FF7372 - 72FF727070FF636464FF4AA2CFFF46B8F2FF46B8F3FF46B8F2FF46B8F3FF46B8 - F2FF46B8F3FF46B8F2FF46B8F3FF3AB3F1FF10A4EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA2EEFF0EA0EAFF0D99E1FF1092D4FF6E868BFF4B4A4AFF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF434141ED050505500000001A000000010000000000000000000000000000 - 00000000000002010101424141D1484646FE494747FF494747FE646C6CFF4EA3 - C8FF0C95DBFE0D9DE6FF0DA1ECFE0EA2EEFF0DA2EEFE0EA3EFFF0DA2EEFE27AC - F0FF4EBBF3FF4FBBF3FE4FBBF3FF4FBBF3FE4FBBF3FF4FBBF3FE4FBBF3FF4FBB - F3FE4FBBF3FF4FBBF3FF4FBBF3FE50B9F0FF737D82FE7A7979FF7A7979FE7A79 - 79FF757474FE61737DFF4FB9F0FF4FBBF3FE4FBBF3FF4FBBF3FE4FBBF3FF4FBB - F3FE4FBBF3FF4FBBF3FE4FBBF3FF4FBBF3FE31B0F1FF0EA3EFFF0DA2EEFE0EA3 - EFFF0DA2EEFE0EA1EDFF0D9EE7FE0C96DDFF359AC9FE616868FF494747FF4846 - 46FE494747FF484646FE494747FF484646FE494747FF484646FE494747FF4947 - 47FF484646FE1F1E1E900000002E000000070000000000000000000000000000 - 000000000000000000002A29297C494747FF494747FF494747FF525353FF79A0 - AAFF0F92D5FF0D9AE2FF0E9FEAFF0EA2EEFF0EA3EFFF0EA3EFFF11A4EFFF51BC - F3FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF59BF - F4FF59BFF4FF59BFF4FF59BFF4FF61ADD4FF807E7EFF818080FF818080FF807F - 7FFF777676FF6098B5FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF59BF - F4FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF55BEF3FF18A7EFFF0EA3EFFF0EA3 - EFFF0EA2EEFF0EA0EBFF0D9BE4FF0D93D7FF6094A8FF505151FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF3D3B3BDD01010143000000140000000000000000000000000000 - 0000000000000000000012111123484646F9494747FF494747FF4A4949FF6F7A - 7BFF3EA1CFFF0C96DCFF0D9DE7FF0EA1ECFF0EA2EEFF0EA3EFFF26ACF0FF61C2 - F4FF62C2F4FF62C2F4FF62C2F4FF62C2F4FF62C2F4FF62C2F4FF62C2F4FF62C2 - F4FF62C2F4FF62C2F4FF62C2F4FF769EB4FF888787FF888787FF888787FF8685 - 85FF787A7BFF63BAE7FF62C2F4FF62C2F4FF62C2F4FF62C2F4FF62C2F4FF62C2 - F4FF62C2F4FF62C2F4FF62C2F4FF62C2F4FF62C2F4FF33B1F1FF0EA3EFFF0EA2 - EEFF0EA1EDFF0D9EE8FF0D97DEFF2797CDFF697779FF4A4848FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF484646FD15141477000000260000000500000000000000010000 - 00000000000000000000010101013C3A3AAF494747FF484646FE494747FF5456 - 56FF76A2AFFE1293D5FF0D99E1FE0D9FE9FF0DA1EDFE0EA2EEFF3AB3F1FE6BC6 - F5FF6BC6F5FF6BC6F5FE6BC6F5FF6BC6F5FE6BC6F5FF6BC6F5FE6BC6F5FF6BC6 - F5FE6BC6F5FF6BC6F5FF6CC4F1FE8A959BFF8F8E8EFE8F8E8EFF8F8E8EFE8A88 - 88FF7793A2FE6BC6F4FF6BC6F5FF6BC6F5FE6BC6F5FF6BC6F5FE6BC6F5FF6BC6 - F5FE6BC6F5FF6BC6F5FE6BC6F5FF6BC6F5FE6BC6F5FF49B9F2FF0DA2EEFE0EA2 - EEFF0DA0EAFE0D9BE3FF0D92D7FE5F96ABFF545656FE494747FF4A4848FF4C4B - 4BFE4C4C4CFF4C4C4CFE4C4C4CFF4C4C4CFE4C4C4CFF4C4B4BFE4B4A4AFF4947 - 47FF484646FE494747FF323131C30000003B0000000F00000000000000010000 - 00000000000000000000000000002524243E484646FB494747FF494747FF4A49 - 49FF6C7777FF4AA3CAFF0C94DAFF0D9CE5FF0EA0EBFF0EA2EEFF43B7F2FF75CB - F6FF75CBF6FF75CAF6FF75CBF6FF75CAF6FF75CBF6FF75CAF6FF86A2B1FF919E - A6FF929FA6FF929FA6FF929EA4FF979696FF979696FF979696FF969595FF8D8C - 8CFF79B4D2FF75CBF6FF75CBF6FF75CAF6FF75CBF6FF75CAF6FF75CBF6FF75CA - F6FF75CBF6FF75CAF6FF75CBF6FF75CAF6FF75CBF6FF53BDF3FF0EA2EEFF0EA1 - ECFF0D9DE6FF0C96DCFF3299CAFF677274FF4A4949FF4A4848FF53656DFF6C8D - 9BFF70929FFF70929FFF70929FFF70929FFF70929FFF6F919EFF697B82FF4F4F - 4FFF494747FF494747FF474545F80B0B0B5F0000002000000002000000010000 - 000000000000000000000000000000000000484646B8484646FE494747FF4947 - 47FF515151FE7C979CFF2198D2FE0C97DEFF0D9DE7FE0EA1ECFF3BB3F1FE7FCE - F6FF7FCEF6FF7FCEF6FE7FCEF6FF7FCEF6FE7FCEF6FF7FCEF6FE92A1AAFF9E9D - 9DFE9F9E9EFF9F9E9EFF9E9D9DFE9F9E9EFF9E9D9DFE9F9E9EFF9C9B9BFE8E97 - 9BFF80CBF2FE7FCEF6FF7FCEF6FF7FCEF6FE7FCEF6FF7FCEF6FE7FCEF6FF7FCE - F6FE7FCEF6FF7FCEF6FE7FCEF6FF7FCEF6FE7FCEF6FF4CBAF2FF0DA1ECFE0D9E - E8FF0D98E0FE1693D3FF6C8F99FE505050FF494747FE4A4949FF5A8CA1FF7FD0 - F6FE80D1F7FF7FD0F6FE80D1F7FF7FD0F6FE80D1F7FF7FD0F6FE82ADC0FF5456 - 56FF484646FE494747FF484646FE282727A9000000340000000A000000010000 - 000000000000000000000000000000000000748A8A33484646F7494747FF4947 - 47FF494747FF5C6060FF71A5B7FF1294D5FF0D99E0FF0D9EE8FF1EA7EDFF86D0 - F6FF89D2F7FF89D2F7FF89D2F7FF89D2F7FF89D2F7FF89D2F7FF9AA9B0FFA5A4 - A4FFA6A5A5FFA6A5A5FFA6A5A5FFA6A5A5FFA6A5A5FFA5A4A4FF9F9F9FFF90B1 - C3FF89D2F7FF89D2F7FF89D2F7FF89D2F7FF89D2F7FF89D2F7FF89D2F7FF89D2 - F7FF89D2F7FF89D2F7FF89D2F7FF89D2F7FF88D1F7FF2FAEEFFF0D9FE9FF0D9A - E2FF0E93D6FF5A9AB4FF5B5F5FFF494747FF494747FF4A4848FF566F79FF78CB - F1FF80D0F6FF8BB5C4FF758C92FF697C82FF687B81FF687B81FF606B6EFF4D4D - 4DFF494747FF494747FF494747FF424141EB0404044D00000018000000010000 - 00000000000000000000000000000000000000000000626F6F91494747FF4947 - 47FF484646FE4B4A4AFF687272FE5FA7C3FF0D92D7FE0D99E1FF0D9EE8FE65C3 - F3FF92D5F7FF92D5F7FE92D5F8FF92D5F7FE92D5F8FF92D5F7FEA0ADB4FFA8A7 - A7FEA8A8A8FFA8A8A8FFA8A7A7FEA8A8A8FFA8A7A7FEA8A7A7FFA1A1A2FE94CC - E9FF92D5F7FE92D5F8FF92D5F8FF92D5F7FE92D5F8FF92D5F7FE92D5F8FF92D5 - F7FE92D5F8FF92D5F7FE92D5F8FF92D5F7FE77CAF4FF11A0E9FF0D9AE3FE0C93 - D8FF479CC1FE656F6FFF4B4949FE494747FF484646FE494747FF4E4D4DFF618D - 9FFE7DCFF5FF82CCEEFE7A8C91FF535454FE4B4949FF4A4949FE4A4848FF4947 - 47FF484646FE494747FF484646FE484646FE1D1C1C8B00000027000000040000 - 00000000000000000000000000000000000000000000ABE2E20D4E4F4FDA4947 - 47FF494747FF494747FF4D4C4CFF707D7EFF52A5C8FF0D93D7FF0D99E1FF1FA5 - EAFF8DD2F6FF9DD9F8FF9DD9F8FF9DD9F8FF9DD9F8FF9DD9F8FFA3ACB1FFA5A4 - A4FFA5A4A4FFA5A4A4FFA5A4A4FFA5A4A4FFA5A4A4FFA5A4A4FFA2B0B8FF9DD9 - F7FF9DD9F8FF9DD9F8FF9DD9F8FF9DD9F8FF9DD9F8FF9DD9F8FF9DD9F8FF9DD9 - F8FF9DD9F8FF9DD9F8FF9DD9F8FF97D6F7FF2CABEBFF0D9AE3FF0C94D9FF3B9A - C6FF6C7A7BFF4C4C4CFF494747FF494747FF494747FF494747FF494747FF5152 - 52FF66A3BDFF7FD0F6FF84C4E2FF6F7A7CFF4E4D4DFF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF383737CF000000360000000A0000 - 000000000000000000000000000000000000000000000000000092BABA3D4846 - 46F6484646FE494747FF494747FE4F4F4FFF748384FE52A5C9FF0D92D6FE0D99 - E0FF31ACEAFF9DD8F7FEA6DCF8FFA6DDF8FEA6DDF9FFA6DDF8FEA8C9D9FFA8C6 - D5FEA8C6D5FFA8C6D5FFA8C6D5FEA8C6D5FFA8C6D5FEA8C6D5FFA7D1E7FEA6DD - F9FFA6DDF8FEA6DDF9FFA6DDF9FFA6DDF8FEA6DDF9FFA6DDF8FEA6DDF9FFA6DD - F8FEA6DDF9FFA6DCF8FEA2DAF7FF45B4EDFE0D99E1FF0C93D8FF3C9BC7FE6D7F - 81FF4E4E4EFE494747FF484646FE494747FF484646FE494747FF494747FF4948 - 48FE555C5EFF6EB8D8FE80D0F6FF86B8CEFE636A6AFF4B4A4AFE494747FF4947 - 47FF484646FE494747FF484646FE494747FF474545F90707074B000000100000 - 0000000000000000000000000000000000000000000000000000000000007891 - 916A494747FE494747FF494747FF494747FF4E4E4EFF707D7DFF62A7C2FF1293 - D5FF0C97DDFF2EA9E8FF96D5F5FFB0E0F8FFB0E0F9FFB0E1FAFFB0E1FAFFB0E1 - FAFFB0E1FAFFB0E1FAFFB0E1FAFFB0E1FAFFB0E1FAFFB0E1FAFFB0E1FAFFB0E1 - FAFFB0E1FAFFB0E1FAFFB0E1FAFFB0E1FAFFB0E1FAFFB0E1FAFFB0E1FAFFB0E0 - F9FFB0E0F9FFA0D9F6FF3DAFEAFF0D98DFFF0F93D6FF4C9DC1FF6C797AFF4E4D - 4DFF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF4A4949FF596A70FF75C5E9FF81D1F7FF84A9B8FF5C6060FF4A4848FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF17161674000000140000 - 000000000000000000000000000000000000000000000000000000000000B9F8 - F80138586992494747FE494747FF494747FF494747FF4D4C4CFF677171FF72A5 - B6FF2398D2FF0C94DAFF1A9FE2FF6FC4EFFFB2E1F8FFB9E3F9FFB9E4FAFFB9E4 - FAFFB9E4FAFFB9E4FAFFB9E4FAFFB9E4FAFFB9E4FAFFB9E4FAFFB9E4FAFFB9E4 - FAFFB9E4FAFFB9E4FAFFB9E4FAFFB9E4FAFFB9E4FAFFB9E4FAFFB9E4FAFFB6E2 - F8FF7DCAF1FF22A3E4FF0C95DBFF1995D2FF629DB3FF656F6FFF4D4C4CFF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF4C4B4BFF67828DFF9CD9F6FF9FD9F5FF879AA1FF545555FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF2423238B000000120000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000E88C50638596BA1484646FE494747FF484646FE494747FF4B4949FE5B5F - 5FFF7C9599FF4EA4C9FE1293D4FF0C95DBFE28A5E4FF73C5EFFEB1DFF7FFC2E7 - FAFEC3E7FAFFC3E7FAFFC2E7FAFEC3E7FBFFC2E8FAFEC3E8FBFFC2E8FAFEC3E8 - FBFFC2E7FAFEC3E7FBFFC3E7FBFFC2E7FAFEC3E7FAFFB6E2F8FE7FCAF1FF32A9 - E6FE0D96DDFF0F93D5FE3F9DC8FF739198FE595E5EFF4A4949FF494747FE4947 - 47FF484646FE494747FF484646FE494747FF484646FE494747FF494747FF4846 - 46FE494747FF494747FE4F4F4FFF7B9EACFEADE1F9FFACD9EEFE727B7CFF4C4C - 4CFF484646FE494747FF484646FE494747FF484646FE252424890000000D0000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000E88C60638596A9C494747FD494747FF494747FF494747FF4947 - 47FF505050FF6A7475FF77A1ACFF42A2CDFF1293D5FF0C95DAFF179CE0FF42B0 - E8FF75C6F0FFA0D9F5FFBCE4F8FFC5E8FAFFC9E9FAFFCBEAFAFFCBEAFAFFC9E9 - FAFFC6E8FAFFBFE5F9FFA6DBF6FF7CC9F0FF4BB4EAFF1C9FE1FF0D95DBFF0F93 - D5FF379CCCFF6B9BABFF687272FF505050FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF4A4949FF4D4D - 4DFF4D4C4CFF494848FF494747FF545758FF9CC9DDFFB6E4FAFF95ACB4FF5355 - 55FF494747FF494747FF494747FF494747FF494747FF1C1B1B6E000000070000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000E88C50338596B7D484646FA494747FF484646FE4947 - 47FF494747FF4A4949FE535555FF6D7878FE789EA7FF54A4C6FE279AD2FF0E92 - D5FE0C94DAFF0D96DDFF129ADFFE22A2E3FF2EA7E5FE35AAE6FF36ABE6FE30A8 - E5FF24A3E3FE149BE0FF0D97DDFF0C94DAFE0C92D6FF2198D2FE4AA0C6FF7099 - A6FE6B7677FF535555FE4A4949FF494747FE494747FF494747FF484646FE4947 - 47FF484646FE494747FF484646FE494747FF484646FE4A4848FF64747AFF8DA5 - AFFE7F8F94FF525353FE494747FF4B4A4AFE84A1ACFFBFE7FAFEA5BEC9FF585B - 5BFF484646FE494747FF484646FE494747FF484646FE0F0E0E38000000020000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000296A8B4D47494BE7494747FF4947 - 47FF494747FF494747FF494747FF4A4848FF515252FF616868FF76888AFF769F - ABFF5CA4C0FF43A1CCFF2C9BD0FF1C96D3FF1594D4FF1394D4FF1394D4FF1594 - D4FF1A96D3FF299AD1FF3E9FCCFF56A1BFFF6F9CAAFF748689FF616767FF5151 - 51FF4A4848FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF4A4848FF7B939DFFC7EA - FBFFB7D2DFFF676E6EFF4C4C4CFF505151FF98B7C3FFC7EAFBFFA5BCC5FF5759 - 59FF494747FF494747FF494747FF494747FF3F3D3DCF0101010D000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000097CDD11E5C6666AE4947 - 47FE494747FF484646FE494747FF484646FE494747FF494747FE4B4A4AFF5151 - 51FE5A5F5FFF666F6FFF728080FE798D8FFF799397FE77959CFF77959CFE7792 - 97FF788C8EFE717F80FF666F6FFF5A5E5EFE515151FF4B4A4AFE494747FF4947 - 47FE494747FF484646FE494747FF484646FE494747FF494747FF484646FE4947 - 47FF484646FE494747FF484646FE494747FF484646FE494747FF606B6FFFC7E9 - F8FECEECFAFFA4B9BFFE778588FF8CA0A6FEC9E9F8FFCFEDFBFE8B989CFF5050 - 50FF484646FE494747FF484646FE484646FD1F1E1E6100000002000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000008CB1B1015D67 - 674D494747D0494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF4A4848FF4B4949FF4B4B4BFF4C4C4CFF4C4C4CFF4C4B - 4BFF4B4949FF4A4848FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF4D4D4DFF8498 - 9FFFCFEAF7FFD7F0FCFFD6EFFBFFD7F0FCFFD4EEFAFFA7BAC1FF5D6262FF4A48 - 48FF494747FF494747FF494747FF393838B20302020600000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000494747084846465F494747D0484646FE494747FF484646FE494747FF4846 - 46FE494747FF494747FF484646FE494747FF484646FE494747FF484646FE4947 - 47FF484646FE494747FF494747FF484646FE494747FF484646FE494747FF4846 - 46FE494747FF484646FE494747FF484646FE494747FF494747FF484646FE4947 - 47FF484646FE494747FF484646FE494747FF484646FE494747FF494747FF4E4E - 4EFE6A7477FF92A2A8FE9EADB2FF98A9AEFE7C888AFF5A5E5EFE4B4A4AFF4947 - 47FF484646FE494747FF434141D00C0C0C160000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000004947473E4947479D494747E6494747FE4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF4A4848FF4C4B4BFF4E4D4DFF4D4D4DFF4B4A4AFF494747FF494747FF4947 - 47FF484646FC3D3C3CA618181811000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000004947470C4947473F4947 - 477E494747B6494747E3494747F8494747FB494747FD494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FD494747F24846 - 46B2444242424442420200000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000D1D0D00DD1D1D127D1D0D036D1D1D13FD1D0D03FD1D1 - D13FD1D0D03FD1D1D13FD1D1D13FD1D0D03FD1D1D13FD1D0D03FD1D1D13FD1D0 - D03FD1D1D13FD1D0D03FD1D1D13FD1D0D03FD1D1D13FD1D1D13FD1D0D03FD1D1 - D13FD1D0D03FD1D1D13FD1D0D03FD1D1D13FD1D0D03FD1D1D13FD1D1D13FD1D0 - D03FD1D1D13FD1D0D03FD1D1D13FD1D0D03FD1D1D13FD1D0D030D1D1D10A0000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFF00 - 0000FFFFFFFFFFFFFFFFFF000000FFFFFFC007FFFFFFFF000000FFFFFC00007F - FFFFFF000000FFFFF000000FFFFFFF000000FFFF80000003FFFFFF000000FFFF - 00000000FFFFFF000000FFFC000000007FFFFF000000FFF8000000003FFFFF00 - 0000FFF0000000000FFFFF000000FFE00000000007FFFF000000FFC000000000 - 03FFFF000000FF800000000001FFFF000000FF000000000000FFFF000000FE00 - 0000000000FFFF000000FC0000000000007FFF000000FC0000000000003FFF00 - 0000F80000000000003FFF000000F80000000000001FFF000000F00000000000 - 001FFF000000F00000000000000FFF000000E00000000000000FFF000000E000 - 000000000007FF000000C000000000000007FF000000C000000000000007FF00 - 0000C000000000000003FF000000C000000000000003FF000000C00000000000 - 0001FF0000008000000000000001FF0000008000000000000000FF0000008000 - 000000000000FF0000008000000000000000FF00000080000000000000007F00 - 000080000000000000007F00000080000000000000003F000000800000000000 - 00003F00000080000000000000001F00000080000000000000001F000000C000 - 0000000000001F000000C0000000000000000F000000C0000000000000000F00 - 0000C00000000000000007000000C00000000000000007000000E00000000000 - 000007000000E00000000000000002000000E00000000000000002000000F000 - 00000000000000000000F80000000000000000000000F8000000000000000000 - 0000FC0000000000000000000000FC0000000000000000000000FE0000000000 - 000000000000FF0000000000000000000000FF0000000000000000000000FF80 - 00000000000000000000FFC000000000000000000000FFE00000000000000000 - 0000FFF800000000000001000000FFFC00000000000001000000FFFE00000000 - 000003000000FFFF80000000000007000000FFFFF000000000000F000000FFFF - FC00000000001F000000FFFFFFE000000000FF000000FFFFFFFFFFFFFFFFFF00 - 0000FFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFF - FFFFFF000000FFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFF0000002800 - 0000400000008000000001002000000000000042000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000020000 - 00050000000A0000001000000015000000190000001B0000001B0000001A0000 - 0017000000120000000C00000007000000030000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000020000000900000015000000230000 - 00310000003C00000044000000490000004C0000004D0000004E0000004D0000 - 004B000000470000004000000036000000280000001A0000000C000000040000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000121111040000001000000023000000380202024A131212772322 - 22A1323030C13A3939D9444242E9474545F4474545F4474545F4464444F0403E - 3EE1343333CC292828B01A19198B0707075F0000004C0000003E0000002A0000 - 0015090808072D2C2C0100000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000001616 - 160300000010000000280101014218171780323030C3464444F5494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF484646FD3A3939D6201F1F9B0605055C0000 - 0047000000300000001709080806000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000040404090000 - 00220303034422212198414040E9494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF474545F72D2B - 2BB70A0A0A68000000460000002B0000000F1B1A1A0200000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000475F5F0200000012000000331D1C - 1C88424040EA494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF4B4A4AFF4E4E4EFF515252FF545656FF555858FF545656FF525353FF4E4E - 4EFF4B4A4AFF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF474545F92A2929B10404045A0000003D0000001C232F2F05000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000272F2F040000001B0A0A0A51383737CE4947 - 47FF494747FF494747FF494747FF494747FF4A4848FF505151FF5F6565FF6A7E - 82FF5F8B9BFF5594AEFF4D99BBFF4B9DC2FF4A9EC5FF499DC3FF4B99BCFF5093 - B0FF598A9EFF667E85FF606767FF515252FF4A4949FF494747FF494747FF4947 - 47FF494747FF494747FF424040EB1616168200000048000000260B0F0F090000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000002F2F2F050000002018181876454343F2494747FF4947 - 47FF494747FF494747FF4C4B4BFF5A5E5EFF6B8389FF5497B3FF3D9FCEFF289D - D8FF2EA2DEFF32A6E1FF35A8E3FF36A9E4FF37A9E4FF37A9E4FF35A8E3FF34A7 - E2FF2FA3DFFF279DDAFF339DD0FF4A95B7FF62838EFF5C6161FF4C4C4CFF4947 - 47FF494747FF494747FF494747FF484646FE292828AD0101014F0000002C0000 - 000B000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000002F2F2F040000002024232392484646FD494747FF494747FF4947 - 47FF4A4949FF5A5E5EFF698A94FF479EC5FF289DD9FF2EA4E0FF33A9E5FF37AC - E8FF3AAFEBFF3CB1ECFF3DB2EDFF3EB2EEFF3FB3EEFF3FB3EEFF3EB2EDFF3DB1 - EDFF3CB0EBFF39AEE9FF36AAE6FF31A6E1FF269DDAFF399AC9FF5C899AFF5C61 - 62FF4B4A4AFF494747FF494747FF494747FF494747FF363434CB030303560000 - 002E00080C0B0000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00002F3F3F030000001D27262698494747FF494747FF494747FF494747FF5051 - 51FF6B7E81FF4C9CC0FF269DD9FF2CA4E2FF32AAE7FF36AEEBFF39B1EEFF3AB2 - EFFF3BB3F0FF3CB4F1FF3DB5F1FF3DB5F1FF3EB5F1FF3EB5F1FF3EB5F1FF3EB5 - F1FF3EB4F1FF3DB4F0FF3CB2EEFF39B0ECFF36ACE9FF30A7E4FF259EDBFF3998 - C5FF637F87FF525353FF494747FF494747FF494747FF494747FF3A3838D60504 - 04580000002C0B0F0F0800000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000005F7F - 7F010000001625242490494747FF494747FF494747FF494848FF585B5BFF6892 - A1FF2D9CD3FF27A1DFFF2DA8E7FF31ADECFF34B0EEFF36B1F0FF37B2F1FF38B3 - F1FF38B3F2FF38B3F2FF39B3F2FF39B3F2FF3AB4F2FF3AB4F2FF3AB4F2FF3AB4 - F2FF3BB4F2FF3BB4F2FF3AB4F1FF3AB3F1FF39B2EFFF37AFEDFF32ABE9FF2BA4 - E1FF249BD6FF538FA9FF5B6060FF4A4848FF494747FF494747FF494747FF3837 - 37D30303035100000025232F2F05000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000D1A191970484646FD494747FF494747FF4A4848FF5F6464FF5E9BB3FF229B - D8FF26A3E3FF2BA9EAFF2FADEEFF30AFF0FF31B0F1FF32B0F1FF32B1F1FF33B1 - F1FF33B1F1FF33B1F1FF34B1F1FF34B1F1FF35B1F1FF35B2F1FF35B2F2FF36B2 - F2FF36B2F2FF36B2F2FF37B2F2FF37B2F2FF37B2F1FF36B1F1FF35B0EFFF31AC - EBFF2BA7E5FF229CDBFF4295BBFF60696AFF4A4949FF494747FF494747FF4947 - 47FF333131C4000000480000001B272A2A020000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000171F1F050D0C - 0C43464444F3494747FF494747FF4A4848FF606666FF569DBBFF1D9ADAFF24A3 - E5FF28A9EBFF2AACEEFF2BAEF0FF2CAEF1FF2CAFF1FF2DAFF1FF2DAFF1FF2EAF - F1FF2EAFF1FF2EAFF1FF2EAFF1FF2FAFF1FF2FAFF1FF2FB0F1FF30B0F1FF30B0 - F1FF30B0F1FF31B0F1FF31B0F1FF31B0F1FF32B0F1FF32B0F1FF32B0F1FF31AF - EFFF2FADEDFF29A7E7FF219EDDFF3895C2FF616B6DFF4A4949FF494747FF4947 - 47FF494747FF242323A10000003C0000000F0000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000242323010202021A3C3A - 3AD2494747FF494747FF494747FF5B6060FF5B9DB8FF1A99D9FF20A2E5FF24A8 - ECFF26ABEFFF27ACF0FF27ACF1FF27ACF1FF28ACF1FF28ADF1FF28ADF1FF28AD - F1FF29ADF1FF29ADF1FF29ADF1FF29ADF1FF2AADF1FF2AAEF1FF2AAEF1FF2BAE - F1FF2BAEF1FF2BAEF1FF2CAEF1FF2CAEF1FF2DAFF1FF2DAFF1FF2DAFF1FF2DAF - F0FF2DAEF0FF2BABEDFF26A6E8FF1F9DDDFF3A95BFFF5E6565FF494848FF4947 - 47FF494747FF484646FB101010710000002A0908080500000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000004040409242323854947 - 47FF494747FF494747FF545555FF6799AAFF1998D8FF1BA0E4FF1FA6EBFF21A9 - EEFF22AAF0FF22AAF0FF22ABF0FF23ABF0FF23ABF0FF23ABF0FF24ABF0FF24AB - F0FF24ABF0FF25ABF0FF25ABF0FF25ACF0FF25ACF0FF26ACF0FF26ACF1FF26AC - F1FF26ACF1FF27ACF1FF28AAEDFF4B7185FF3D8BB2FF2CA7E6FF28ADF1FF28AD - F1FF28ADF0FF28ACF0FF27AAEDFF22A5E7FF1B9ADBFF4993B3FF565A5AFF4947 - 47FF494747FF494747FF3D3C3CDE010101470000001500000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000010707072B474545F24947 - 47FF494747FF4C4C4CFF708A8FFF2098D3FF179DE1FF1BA4EAFF1CA7EEFF1DA7 - EEFF314855FF4C4A4AFF555353FF555353FF555353FF3484ADFF1FA9F0FF1FA9 - F0FF20A9F0FF20A9F0FF20AAF0FF20AAF0FF21AAF0FF21AAF0FF21AAF0FF22AA - F0FF22AAF0FF22AAF0FF338CB9FF585656FF595757FF57595BFF487287FF3591 - C0FF25A9ECFF24ABF0FF24AAEFFF22A8ECFF1EA2E5FF1897D8FF5C899AFF4E4E - 4EFF494747FF494747FF494747FF201F1F970000002E09080806000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000072E2D2D9E494747FF4947 - 47FF494747FF646B6BFF409EC9FF1499DDFF16A1E8FF18A5EEFF18A7EFFF19A7 - F0FF1E84B8FF3C3A3AFF4F4D4DFF525050FF525050FF4D565CFF1DA2E5FF1BA8 - F0FF1BA8F0FF1BA8F0FF1BA8F0FF1CA8F0FF1CA8F0FF1CA8F0FF1CA8F0FF1DA8 - F0FF1DA8F0FF1DA8F0FF456577FF555353FF555353FF555353FF565454FF5654 - 54FF525A5FFF407794FF2B95CBFF1FA8EEFF1DA5EAFF199EE2FF2396CEFF6371 - 74FF4A4848FF494747FF494747FF434242EE0303034900000013000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000007070725474545F5494747FF4947 - 47FF505151FF6998A9FF1094D7FF129EE5FF14A3ECFF15A5EFFF15A5EFFF16A6 - EFFF16A6EFFF264D61FF444242FF4E4D4DFF4F4D4DFF4F4D4DFF357394FF17A6 - F0FF17A6F0FF17A6F0FF18A6F0FF18A7F0FF18A7F0FF18A7F0FF18A7F0FF19A7 - F0FF19A7F0FF2197D4FF504E4EFF525050FF525050FF525050FF525151FF5351 - 51FF535151FF525050FF454343FF2282B3FF1BA6EDFF18A2E8FF1498DCFF4892 - B3FF525454FF494747FF494747FF494747FF1F1E1E92000000261B1A1A030000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000327262684494747FF494747FF4947 - 47FF687272FF329CCEFF0F99DFFF11A0E9FF12A3EDFF12A4EFFF12A4EFFF12A4 - EFFF13A4EFFF168DCAFF323233FF494747FF4D4B4BFF4D4B4BFF4B4C4EFF1C97 - D6FF14A5EFFF14A5EFFF15A5EFFF15A5EFFF15A5EFFF15A5EFFF15A5EFFF16A6 - EFFF16A6EFFF347090FF4E4D4DFF4F4D4DFF4F4D4DFF4C4A4AFF494747FF4E4C - 4CFF504E4EFF4D4B4BFF343F46FF18A3EBFF17A6EFFF16A3ECFF139CE3FF1794 - D3FF65787CFF4A4848FF494747FF494747FF3D3C3CDD0000003B0000000B0000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000009424040DC494747FF494747FF4E4E - 4EFF6C97A5FF0D92D7FF0E9CE5FF0FA1ECFF0FA3EEFF10A3EFFF10A3EFFF10A4 - EFFF10A4EFFF10A4EFFF1D5673FF3D3B3BFF4A4848FF4B4949FF4B4949FF3764 - 7BFF11A4EFFF11A4EFFF11A4EFFF12A4EFFF12A4EFFF12A4EFFF12A4EFFF12A4 - EFFF14A0E8FF464E52FF4C4A4AFF4D4B4BFF4B4949FF3B3939FF2C2B2BFF3534 - 34FF413F3FFF3F3E3EFF216385FF15A5EFFF14A5EFFF14A4EDFF119FE7FF0E96 - DBFF4B90AFFF505151FF494747FF494747FF494747FF100F0F690000001C2927 - 2701000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000013121239494747FF494747FF494747FF5D62 - 62FF459FC7FF0D97DDFF0D9EE9FF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF1094D8FF2C3033FF454343FF4A4848FF4A4848FF4947 - 47FF1D8AC2FF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EFFF10A3EFFF10A3EFFF10A3 - EFFF247FAEFF4A4848FF4A4848FF4A4848FF454343FF27485AFF14709FFF1A3A - 4BFF222121FF242425FF1492D2FF12A4EFFF11A4EFFF11A3EEFF0FA0EAFF0E99 - E1FF2195CEFF616969FF494747FF494747FF494747FF2E2D2DB8000000330908 - 0807000000000000000000000000000000000000000000000000000000000000 - 000000000000000000003F3F3F012726267F494747FF494747FF4A4848FF7383 - 85FF1A96D3FF0D9AE2FF0EA0EBFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF186085FF383737FF484646FF494747FF4947 - 47FF3D5663FF0EA1ECFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF395A6CFF4A4848FF4A4848FF494747FF3C3A3AFF1775A5FF0FA3EFFF0FA3 - EFFF1189C6FF136792FF0FA3EFFF0FA3EFFF0FA3EFFF0FA3EEFF0EA1ECFF0D9C - E5FF0C92D7FF618490FF4A4949FF494747FF494747FF474545F7060606510000 - 0015000000000000000000000000000000000000000000000000000000000000 - 000000000000000000003F3F3F02383737B9494747FF494747FF4D4D4DFF6B98 - A7FF0C93D8FF0D9CE6FF0EA1EDFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0E9CE5FF27343BFF424040FF484646FF4947 - 47FF484646FF247DABFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF1692 - D2FF474545FF494747FF494747FF464444FF2E3539FF0E9DE6FF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0D9E - E8FF0C96DCFF4A91B1FF4F4F4FFF494747FF494747FF494747FF2422229D0000 - 002B121111040000000000000000000000000000000000000000000000000000 - 000000000000000000003F3F3F05474545E6494747FF494747FF545656FF569F - BDFF0C96DCFF0D9EE8FF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF156E9CFF353434FF474545FF4947 - 47FF494747FF424E54FF109DE5FF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF2B6D - 90FF484646FF494747FF484646FF403E3EFF1E5978FF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0E9F - EAFF0D98DFFF3397C6FF585B5BFF494747FF494747FF494747FF413F3FE70101 - 01420000000F0000000000000000000000000000000000000000000000000000 - 000000000000000000004B4A4A14494747FF494747FF494747FF5D6262FF43A0 - CAFF0D97DFFF0E9FE9FF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA0EBFF233B47FF403E3EFF4846 - 46FF494747FF484646FF2C7093FF0EA3EFFF0EA3EFFF0EA3EFFF0EA0EBFF404C - 53FF494747FF494747FF474545FF363535FF1287C2FF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA0 - EBFF0D9AE2FF1F96D1FF626A6AFF494747FF494747FF494747FF494747FF1918 - 1882000000231B1A1A0200000000000000000000000000000000000000000000 - 000000000000000000005150502F494747FF494747FF494747FF676F6FFF319E - D1FF0D99E1FF0EA0EAFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF137BB1FF323131FF4644 - 44FF494747FF494747FF46484AFF1596D8FF0EA3EFFF0EA3EFFF1D84B9FF4846 - 46FF494747FF494747FF444242FF27404DFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA1 - ECFF0D9BE4FF1092D5FF68787AFF494747FF494747FF494747FF494747FF3836 - 36CE0000003A0404040A00000000000000000000000000000000000000000000 - 0000000000000000000051515141494747FF494747FF494747FF6E7A7AFF259A - D3FF0D9AE2FF0EA0EBFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF1F4559FF3E3C - 3CFF484646FF494747FF494747FF33647DFF0EA3EFFF0EA3EFFF31627BFF4846 - 46FF494747FF484646FF3C3B3BFF196B95FF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA1 - EDFF0D9CE5FF0C92D6FF678086FF494747FF494747FF494747FF494747FF4846 - 46FE0E0D0D650000001B29272701000000000000000000000000000000000000 - 0000000000000000000052515143494747FF494747FF494747FF737F7FFF1F98 - D3FF0D9AE2FF0EA0EBFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF1189C6FF2F2E - 2FFF454343FF494747FF494747FF484646FF1B8BC5FF0F9FE8FF434649FF4947 - 47FF494747FF464545FF313335FF0F98DEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA1 - EDFF0D9CE5FF0C92D6FF65828BFF494848FF494747FF494747FF494747FF4947 - 47FF2D2B2BB50000003209080807000000000000000000000000000000000000 - 0000000000000000000052515142494747FF494747FF494747FF727F7FFF1F98 - D3FF0D9AE2FF0EA0EBFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF1C52 - 6EFF3B3A3AFF484646FF494747FF494747FF3C5867FF1F85BAFF484646FF4947 - 47FF494747FF424040FF215069FF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA1 - EDFF0D9CE5FF0C92D6FF66838BFF494848FF494747FF494747FF494747FF4947 - 47FF464444F50505054F00000015000000000000000000000000000000000000 - 0000000000000000000051515140494747FF494747FF494747FF6E7979FF289B - D3FF0D99E1FF0EA0EBFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0F93 - D7FF2B2F32FF444242FF494747FF494747FF494747FF41525BFF494747FF4947 - 47FF484646FF383737FF147DB3FF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA1 - EDFF0D9CE5FF0C92D6FF698085FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF2221219A0000002A121111040000000000000000000000000000 - 000000000000000000005151512C494747FF494747FF494747FF666E6EFF369F - D0FF0D99E0FF0EA0EAFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF10A3EFFF16A6 - EFFF256789FF464444FF555353FF575555FF585656FF575555FF575555FF5553 - 53FF4F4E4EFF334148FF11A2ECFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA1 - ECFF0D9BE3FF1293D4FF6A7779FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF403E3EE5000000400000000F0000000000000000000000000000 - 000000000000000000004C4C4C10494747FF494747FF494747FF5C6161FF49A2 - C9FF0D97DEFF0D9FE9FF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF17A6EFFF23ABF0FF29ADF0FF2AAD - F1FF2AA6E6FF404B50FF585757FF5E5C5CFF5E5C5CFF5E5C5CFF5E5C5CFF5E5C - 5CFF555353FF367494FF2AADF1FF25ABF0FF1BA7EFFF0FA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA0 - EBFF0D99E1FF2497D0FF626969FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF1716167D000000221B1A1A0200000000000000000000 - 0000000000000000000000000000484646E7494747FF494747FF535555FF5EA1 - BCFF0C95DBFF0D9EE7FF0EA2EDFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF16A6EFFF2BAEF1FF32B0F1FF32B0F1FF32B0F1FF32B0 - F1FF32B0F1FF3982A8FF545353FF636161FF646262FF646262FF646262FF6361 - 61FF525252FF34A1D8FF32B0F1FF32B0F1FF32B0F1FF2EAFF1FF1BA8F0FF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0D9F - E9FF0D98DFFF3A98C4FF575A5AFF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF363535CB000000390404040A00000000000000000000 - 00000000000000000000000000003A3939B7494747FF494747FF4D4C4CFF759A - A5FF0C92D6FF0D9CE5FF0EA1ECFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF22AAF0FF3AB4F1FF3BB4F2FF3BB4F2FF3BB4F2FF3BB4F2FF3BB4 - F2FF3BB4F2FF3BB2EFFF4E6069FF666565FF6B6969FF6B6969FF6B6969FF6665 - 65FF4D6A79FF3BB4F2FF3BB4F2FF3BB4F2FF3BB4F2FF3BB4F2FF3BB4F2FF2BAE - F0FF0FA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EDFF0D9E - E7FF0C95DBFF5393AEFF4F4F4FFF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF484646FD0C0C0C620000001A00000001000000000000 - 000000000000000000000000000028272778494747FF494747FF494848FF7381 - 81FF259AD3FF0D99E1FF0EA0EBFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF26ACF0FF44B7F2FF45B7F2FF45B7F2FF45B7F2FF45B7F2FF45B7F2FF45B7 - F2FF45B7F2FF45B7F2FF4C9BC4FF6D6C6CFF727171FF727171FF727070FF6766 - 66FF4B93B9FF45B7F2FF45B7F2FF45B7F2FF45B7F2FF45B7F2FF45B7F2FF45B7 - F2FF33B1F1FF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0EA1ECFF0D9B - E4FF0E92D6FF6A858CFF4A4848FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF2B2A2AB10000003000000006000000000000 - 000000000000000000000000000016151531494747FF494747FF494747FF5B5F - 5FFF53A3C5FF0C96DCFF0D9EE8FF0EA2EDFF0EA3EFFF0EA3EFFF0EA3EFFF1CA8 - EFFF4DBBF3FF4EBBF3FF4EBBF3FF4EBBF3FF4EBBF3FF4EBBF3FF4EBBF3FF4EBB - F3FF4EBBF3FF4EBBF3FF53B1E1FF787777FF7A7878FF7A7878FF787676FF666B - 6EFF4FB7ECFF4EBBF3FF4EBBF3FF4EBBF3FF4EBBF3FF4EBBF3FF4EBBF3FF4EBB - F3FF4EBBF3FF2BAEF0FF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0D9FEAFF0D98 - E0FF2E99CBFF606667FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF464444F30504044D00000014000000000000 - 000000000000000000000000000000000000444242DB494747FF494747FF4D4D - 4DFF7899A1FF1093D5FF0D9BE4FF0EA0EBFF0EA2EEFF0EA3EFFF0EA3EFFF46B8 - F2FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF59BF - F4FF59BFF4FF59BFF4FF6A9FBBFF818080FF828080FF818080FF7C7B7BFF648C - A1FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF59BFF4FF59BF - F4FF59BFF4FF54BDF3FF12A4EFFF0EA3EFFF0EA2EEFF0EA1ECFF0D9DE6FF0C94 - D9FF5993AAFF4F4F4FFF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF2120209600000029000000030000 - 0000000000000000000000000000000000002D2C2C79494747FF494747FF4947 - 47FF656E6EFF43A2CCFF0C97DDFF0D9EE8FF0EA1EDFF0EA2EEFF15A5EFFF63C3 - F4FF64C3F4FF64C3F4FF64C3F4FF64C3F4FF64C3F4FF64C3F4FF64C3F4FF64C3 - F4FF64C3F4FF64C3F4FF80939EFF8A8888FF8A8888FF898888FF7E7D7DFF67B1 - D7FF64C3F4FF64C3F4FF64C3F4FF64C3F4FF64C3F4FF64C3F4FF64C3F4FF64C3 - F4FF64C3F4FF64C3F4FF2AADF0FF0EA3EFFF0EA2EEFF0D9FEAFF0D99E1FF2096 - D0FF697577FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF3F3D3DE10000003F0000000E0000 - 0000000000010000000000000000000000000D0D0D15484646F6494747FF4947 - 47FF4F4F4FFF789BA4FF1293D5FF0D9AE3FF0EA0EBFF0EA2EEFF23ABF0FF6EC8 - F5FF6EC8F5FF6EC8F5FF6EC8F5FF6EC8F5FF6EC8F5FF70C3EDFF74BDE2FF75BE - E3FF75BEE3FF77BADCFF919091FF929191FF929191FF8F8E8EFF7E8C94FF6EC8 - F5FF6EC8F5FF6EC8F5FF6EC8F5FF6EC8F5FF6EC8F5FF6EC8F5FF6EC8F5FF6EC8 - F5FF6EC8F5FF6EC8F5FF3CB4F2FF0EA2EEFF0EA1ECFF0D9CE5FF0C93D8FF5B95 - ACFF515252FF494747FF4D4D4DFF535454FF545555FF545555FF545555FF5455 - 55FF535555FF4F5050FF4A4848FF494747FF494747FF16151579000000210000 - 000200000001000000000000000000000000000000004846468F494747FF4947 - 47FF494747FF616767FF56A5C6FF0C95DAFF0D9DE6FF0EA1ECFF23AAF0FF7ACC - F6FF7ACCF6FF7ACCF6FF7ACCF6FF7ACCF6FF7ACCF6FF82B5CFFF989797FF9B99 - 99FF9B9999FF9B9999FF9B9999FF9B9999FF9A9999FF949393FF80ADC3FF7ACC - F6FF7ACCF6FF7ACCF6FF7ACCF6FF7ACCF6FF7ACCF6FF7ACCF6FF7ACCF6FF7ACC - F6FF7ACCF6FF7ACCF6FF3EB5F2FF0EA1EDFF0D9EE8FF0C97DEFF3199CAFF656E - 6EFF494747FF4B4949FF5E8FA5FF7BBBD8FF7CBDD9FF7CBDD9FF7CBDD9FF7CBD - D9FF7CBCD9FF7896A3FF4F4F4FFF494747FF494747FF353333C8000000370000 - 00090000000100000000000000000000000000000000575D5D18484646F24947 - 47FF494747FF4C4B4BFF758889FF2C9BD0FF0D97DEFF0D9EE8FF13A3EDFF80CE - F6FF85D0F7FF85D0F7FF85D0F7FF85D0F7FF85D0F7FF8CBBD3FFA1A0A0FFA3A2 - A2FFA3A2A2FFA3A2A2FFA3A2A2FFA3A2A2FFA2A1A1FF979898FF86CAEDFF85D0 - F7FF85D0F7FF85D0F7FF85D0F7FF85D0F7FF85D0F7FF85D0F7FF85D0F7FF85D0 - F7FF85D0F7FF85D0F7FF2CADEFFF0D9FE9FF0D99E1FF1694D4FF6B8992FF4D4C - 4CFF494747FF4B4949FF609AB3FF80D1F7FF83CAEBFF81B8CDFF79ADC3FF78AC - C2FF78ACC2FF718B95FF4E4E4EFF494747FF494747FF484646FD0B0B0B5E0000 - 0019000000010000000000000000000000000000000000000000748B8B744947 - 47FF494747FF494747FF525353FF789BA4FF1A96D4FF0D99E0FF0D9EE8FF5EC0 - F2FF90D4F7FF90D4F7FF90D4F7FF90D4F7FF90D4F7FF96C1D7FFA7A6A6FFA8A8 - A8FFA8A8A8FFA8A8A8FFA8A8A8FFA8A8A8FFA6A5A5FF98AEB9FF90D4F7FF90D4 - F7FF90D4F7FF90D4F7FF90D4F7FF90D4F7FF90D4F7FF90D4F7FF90D4F7FF90D4 - F7FF90D4F7FF7CCCF5FF10A0EAFF0D9AE3FF0E93D6FF6197ABFF545656FF4947 - 47FF494747FF494747FF545C5FFF72BFE2FF80D0F5FF83A1ABFF595D5DFF4F50 - 50FF4F4F4FFF4D4C4CFF494747FF494747FF494747FF494747FF2A2929AD0000 - 002C000000040000000000000000000000000000000000000000B6F3F3045052 - 52CB494747FF494747FF494747FF585B5BFF72A3B2FF1394D5FF0D99E0FF1DA4 - E9FF8FD3F6FF9BD8F8FF9BD8F8FF9BD8F8FF9BD8F8FF9EC3D6FFA5A4A4FFA5A5 - A5FFA5A5A5FFA5A5A5FFA5A5A5FFA5A5A5FFA4A4A4FF9DC8DEFF9BD8F8FF9BD8 - F8FF9BD8F8FF9BD8F8FF9BD8F8FF9BD8F8FF9BD8F8FF9BD8F8FF9BD8F8FF9BD8 - F8FF99D7F7FF36AFEDFF0D9AE3FF0C93D7FF559BB8FF5C6161FF494747FF4947 - 47FF494747FF494747FF4A4848FF596E75FF78CAF0FF82CDF0FF76878BFF4E4E - 4EFF494747FF494747FF494747FF494747FF494747FF494747FF444242EF0101 - 013E0000000B000000000000000000000000000000000000000000000000A0D1 - D127484646F3494747FF494747FF494848FF5C6161FF71A4B4FF1595D5FF0D98 - DFFF33ACEAFF9FD9F7FFA6DCF8FFA6DDF9FFA6DDF9FFA7D1E7FFA8C2D0FFA8C2 - D0FFA8C2D0FFA8C2D0FFA8C2D0FFA8C2D0FFA8C3D0FFA6DCF8FFA6DDF9FFA6DD - F9FFA6DDF9FFA6DDF9FFA6DDF9FFA6DDF9FFA6DDF9FFA6DDF9FFA6DCF9FFA5DB - F8FF53BAEEFF0D9AE1FF0D93D7FF559CBAFF606667FF4A4848FF494747FF4947 - 47FF494747FF494747FF494747FF4C4B4BFF5F8493FF7DD0F6FF85C6E4FF6B74 - 75FF4C4B4BFF494747FF494747FF494747FF494747FF494747FF494747FF1514 - 146F000000120000000000000000000000000000000000000000000000000000 - 000083A3A355494747FE494747FF494747FF4A4848FF5B5F5FFF76A0ACFF2198 - D2FF0C96DCFF30A9E8FF9CD7F6FFB1E0F9FFB1E1F9FFB1E1FAFFB1E1FAFFB1E1 - FAFFB1E1FAFFB1E1FAFFB1E1FAFFB1E1FAFFB1E1FAFFB1E1FAFFB1E1FAFFB1E1 - FAFFB1E1FAFFB1E1FAFFB1E1FAFFB1E1FAFFB1E1F9FFB1E0F9FFAADDF7FF4BB5 - ECFF0D98DFFF1294D5FF609BB2FF5E6464FF4A4848FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF4E4E4EFF669DB4FF80D0F7FF85B9 - D1FF606666FF4A4949FF494747FF494747FF494747FF494747FF494747FF2625 - 259D000000160000000000000000000000000000000000000000000000000000 - 00000000000032607879494747FF494747FF494747FF494747FF555757FF7993 - 98FF3FA0CDFF0C93D7FF179DE1FF6DC3EFFFB4E1F8FFBBE4F9FFBBE5FAFFBBE5 - FAFFBBE5FAFFBBE5FAFFBBE5FAFFBBE5FAFFBBE5FAFFBBE5FAFFBBE5FAFFBBE5 - FAFFBBE5FAFFBBE5FAFFBBE5FAFFBBE4F9FFBAE3F9FF84CDF2FF26A4E4FF0C94 - DAFF2999CFFF6C939EFF575B5BFF494848FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF535656FF8DC0D6FFA4DE - F9FF92AEB9FF565959FF494747FF494747FF494747FF494747FF494747FF3130 - 30B1000000140000000000000000000000000000000000000000000000000000 - 0000000000000000000032607887494747FF494747FF494747FF494747FF4E4E - 4EFF6C7778FF6AA4B8FF2499D2FF0C94D9FF1FA0E2FF66C0EDFFA5DBF6FFC5E8 - FAFFC5E8FAFFC5E8FBFFC5E8FBFFC5E9FBFFC5E9FBFFC5E9FBFFC5E8FBFFC5E8 - FBFFC5E8FAFFC5E8FAFFB3E1F8FF76C7F0FF2FA7E5FF0C95DBFF1695D4FF549D - BCFF6D7C7DFF505050FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF5B6568FFA4D5 - ECFFB0E0F7FF7A8688FF4C4B4BFF494747FF494747FF494747FF494747FF302F - 2FAA0000000D0000000000000000000000000000000000000000000000000000 - 000000000000000000000000000032607876494747FE494747FF494747FF4947 - 47FF4A4848FF565959FF76888AFF63A3BCFF2B9CD2FF0C92D7FF0C96DCFF24A2 - E3FF50B6EAFF71C4EFFF88CEF2FF96D4F4FF9DD7F5FF99D5F4FF8CD0F3FF78C7 - F0FF58B9EBFF2FA7E5FF0F98DEFF0C93D8FF1D97D3FF529FBFFF728A8FFF585C - 5CFF4A4949FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF515252FF5A5E5EFF525353FF494747FF4B4949FF7E9B - A6FFBAE6FBFF99B1BAFF515151FF494747FF494747FF494747FF494747FF2423 - 2387000000060000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000002A698950494747F0494747FF4947 - 47FF494747FF494747FF4B4949FF565959FF717E7FFF729DA9FF53A3C5FF2E9D - D2FF1193D4FF0C92D7FF0C94D9FF0C95DAFF0C95DBFF0C95DBFF0C94DAFF0C93 - D8FF0E92D5FF2599D2FF48A0C7FF679AACFF718183FF585B5BFF4B4A4AFF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF4A4949FF8EAFBEFFBFE5F7FF839195FF4D4D4DFF4A4848FF768B - 92FFC4E9FBFFA1B8C0FF525353FF494747FF494747FF494747FF494747FF1312 - 1240000000010000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000074B4C422575E5EC24947 - 47FF494747FF494747FF494747FF494747FF494848FF4E4E4EFF5A5E5EFF6C77 - 77FF7A8F91FF7399A4FF689DB0FF619FB7FF5E9FB9FF5F9FB7FF659DB1FF6E98 - A5FF788F93FF6E7979FF5B5F5FFF4F4F4FFF4A4848FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF4A4848FF8198A0FFCDECFCFFB5CDD7FF6B7474FF626A6BFFAECC - D9FFCDECFCFF91A2A7FF4E4E4EFF494747FF494747FF494747FF3E3C3CCA0000 - 0006000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000099C5C5016675 - 7563494747E7494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF4A4848FF4C4B4BFF4F4F4FFF515151FF525353FF515252FF4F4F4FFF4C4C - 4CFF4A4949FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF55595AFFB4D0DCFFD6F0FCFFCEE9F5FFCFEAF7FFD6F0 - FCFFB9D0D9FF626767FF4A4848FF494747FF494747FF484646FA1414143A0000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00004947470C49474776494747E4494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494848FF56595AFF87979CFFA3B3B9FFA3B4B9FF8C9A - 9EFF5E6364FF4C4A4AFF494747FF494747FF494747FE2A282867000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000004947470549474752494747AD494747F6494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF4A4949FF4D4C4CFF4D4D4DFF4B4A - 4AFF494747FF494747FF494747FF484646E93533335000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000049474709494747434947 - 477C494747AB494747CF494747E9494747FA494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747F1494747C1484646704442420D0000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFF8001FFFFFFFFFFFC00003FFFFFFFFFF0000007FFFFFFFFC - 0000003FFFFFFFF80000000FFFFFFFE000000007FFFFFFC000000003FFFFFF80 - 00000001FFFFFF0000000000FFFFFE00000000007FFFFC00000000003FFFFC00 - 000000001FFFF800000000001FFFF000000000000FFFF000000000000FFFE000 - 0000000007FFE0000000000007FFE0000000000003FFC0000000000003FFC000 - 0000000001FFC0000000000001FF80000000000001FF80000000000000FF8000 - 0000000000FF800000000000007F800000000000007F800000000000003F8000 - 00000000003F800000000000003F800000000000001F800000000000001F8000 - 00000000000FC00000000000000FC000000000000007C000000000000007C000 - 000000000007E000000000000003E000000000000002E000000000000000F000 - 000000000000F000000000000000F800000000000000F800000000000000FC00 - 000000000000FE00000000000000FF00000000000000FF80000000000000FFC0 - 000000000000FFE0000000000000FFF0000000000001FFF8000000000003FFFE - 000000000007FFFF80000000000FFFFFF0000000001FFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFF2800000030000000600000000100200000000000802500000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000200000008000000110000001A000000210000 - 002400000025000000230000001D000000140000000B00000004000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000A09 - 0901000000090000001B000000310404044B1110106F1B1A1A8C2221219D2322 - 22A1232222A1201F1F98161616830B0B0B640101014700000036000000210000 - 000C050404020000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000A0A0A0A0000 - 0024080707502221219B393838D5464444F7484646FE494747FF484646FE4846 - 46FE494747FF484646FE484646FE484646FD424040EB2E2D2DBD1414147E0000 - 00470000002C0606060F29282801000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000191818040000001C0C0C0C59302E - 2EBD484646FA494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF3F3D - 3DE41E1D1D950101014A000000250F0E0E070000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000202B2B0904040435292828A9474545F94846 - 46FE484646FE494747FE4A4949FF525353FE5D6566FE5E7379FF5B7B87FE5B7F - 8DFE5A7D8AFF5B757EFE5E6A6CFE565858FF4C4B4BFE494747FE494747FF4846 - 46FE484646FE3C3B3BDE12111178000000380C10100F00000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000001C1C1C0D0D0D0D533E3C3CDF484646FE494747FF4947 - 47FE4F5050FE617073FE548CA3FF439CC5FE32A0D7FE2FA3DDFF31A5E0FE33A6 - E1FE32A6E1FF30A4DFFE2FA0DAFE399DCEFF4990B0FE5A7884FE555757FF4948 - 48FE484646FE494747FF474545FB262525A7010101430A0A0A15467287010000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000001A1A1A0D16151568454343F3494747FF494747FF4D4D4DFF6174 - 79FF4C97B9FF2DA0D9FF31A7E3FF36ACE8FF3AAFEBFF3CB2EDFF3EB3EEFF3FB3 - EFFF3FB3EFFF3EB3EEFF3DB1EDFF3AAEEAFF35AAE6FF2BA2DEFF3A9AC9FF567F - 8FFF535555FF494747FF494747FF494747FF323131C50202024A000407160000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00002531310816161665464444F6484646FE494747FF585C5CFE588FA6FF2C9E - D7FE2DA6E4FE33ADEBFE37B0EEFF39B2F0FE3AB3F1FE3BB4F1FF3BB4F1FE3CB4 - F1FE3CB4F2FF3CB4F1FE3DB4F1FE3CB4F1FF3BB3EFFE38B0EDFE33ABE8FF29A1 - DEFE3E95BDFE5A6A70FF4A4949FE494747FF484646FE353333CB02020248080A - 0A11000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000004F6A - 6A030E0E0E4A464444F4494747FF494747FF5E6869FF4699BEFF24A0DFFF2BA9 - E9FF30AEEEFF32B0F0FF33B1F1FF34B1F1FF34B1F1FF35B1F1FF35B2F1FF35B2 - F1FF36B2F1FF36B2F2FF37B2F2FF37B2F2FF37B3F1FF37B2F1FF36B1F0FF33AD - ECFF2BA6E4FF2C9AD1FF597884FF4C4B4BFF494747FF494747FF302F2FBF0000 - 003A171D1D090000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000505 - 0524403E3EE0494747FF494747FE5F6A6BFE3C9AC7FF21A0E1FE27A9EBFF2AAC - EFFE2BAEF0FE2BAEF0FE2CAEF1FF2CAEF0FE2DAFF0FE2DAFF1FF2EAFF0FE2EAF - F0FE2EAFF1FF2FAFF0FE30B0F0FE30B0F1FF30B0F1FE31B0F1FE31B0F1FF31AF - F0FE2FADEEFE29A7E7FF249BD7FE577C8BFF4B4A4AFE484646FE494747FF2221 - 219C000000292221210200000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000000D0D0D092E2D - 2DA6484646FE494747FF5B6061FE4299C2FE1C9EE1FF21A7EBFE24AAEFFF24AB - F0FE25ABF0FE25ABF0FE26ACF0FF26ACF0FE26ACF0FE27ACF0FF27ACF0FE27AC - F0FE28ADF1FF28ADF0FE29ADF0FE29ADF1FF31A0DAFE30A3DEFE2AAEF1FF2AAE - F0FE2AADF0FE29ACEEFF24A5E7FE2299D5FF5A747EFE4A4848FE494747FF4644 - 44F80D0D0D650101011300000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000111111474846 - 46FB484646FE505151FF5594AFFE179BDDFE1BA4EAFF1DA8EFFE297298FF4364 - 75FE48697AFE48697AFE2C94CAFF20A9EFFE20AAEFFE21AAF0FF21AAF0FE21AA - F0FE22AAF0FF22AAF0FE23ABF0FE23ABF0FF476E82FE58595AFE4C6D7FFF398C - B7FE28A7E8FE25ABF0FF24A9EDFE1EA2E5FF2A96CBFE596365FE494747FF4846 - 46FE373535CF000000331E1D1D03000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000007393737C34947 - 47FF4A4848FF658088FF1A98D8FF16A0E8FF17A5EEFF18A7EFFF1B93D0FF3C3E - 3FFF504E4EFF525050FF45616FFF1BA6EDFF1AA7F0FF1AA7F0FF1BA8F0FF1BA8 - F0FF1BA8F0FF1CA8F0FF1CA8F0FF239BD9FF525354FF555353FF555353FF5553 - 53FF53575AFF42728AFF298EC2FF1DA6ECFF189DE0FF448DAEFF4E4E4EFF4947 - 47FF484646FE1514147605040411000000000000000000000000000000000000 - 000000000000000000000000000000000000000000001111113E484646FE4947 - 47FE565959FE3F9AC4FF109BE2FE13A3ECFE13A5EFFF14A5EFFE14A5EFFF225E - 7CFE464444FE4E4C4CFE4E4C4CFF2A82B0FE16A6EFFE16A6EFFF16A6EFFE16A6 - EFFE17A6EFFF17A6EFFE17A6EFFE337699FF504E4EFE514F4FFE504E4EFF504E - 4EFE514F4FFE4D4C4CFF2B627FFE19A6EFFF17A1E8FE1796D7FE5B7179FF4947 - 47FE484646FE353434CA000000282D2B2B010000000000000000000000000000 - 000000000000000000000000000000000000000000022E2D2D9E494747FF4947 - 47FE67828AFE1095D8FF0F9FE8FE10A3EEFE10A3EFFF10A4EEFE10A4EFFF1297 - DBFE31393EFE494747FE4B4949FF44525AFE149FE5FE12A4EFFF12A4EEFE12A4 - EEFE12A4EFFF13A4EFFE14A2EBFE465158FF4D4B4BFE4C4A4AFE3B3A3AFF3534 - 34FE424141FE3E3D3EFF198BC5FE15A5EFFF14A3ECFE109AE1FE408EB2FF4D4D - 4DFE484646FE484646FC090808510F0F0F090000000000000000000000000000 - 0000000000000000000000000000000000000303030B444242E8494747FF4F50 - 50FF4C98B9FF0D99E0FF0EA1ECFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF19668EFF3F3D3DFF494747FF494747FF2C7297FF0FA3EFFF0FA3EFFF0FA3 - EFFF0FA3EFFF0FA3EFFF2183B5FF4A4848FF4A4848FF454343FF205F7FFF1569 - 93FF1D3642FF1E3C4CFF11A3EEFF11A4EFFF10A3EEFF0E9DE7FF1895D3FF5C65 - 66FF494747FF494747FF272525A50000001E0000000000000000000000000000 - 00000000000000000000000000000000000011101038484646FE494747FF5F66 - 66FE299AD1FE0D9CE6FF0DA2EEFE0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2 - EEFE0E9CE5FE2A3B44FE464444FF484646FE46494CFE1497DAFF0EA2EEFE0EA2 - EEFE0EA3EFFF0EA2EEFE365E73FE494747FF494747FE393939FE1191D3FF0EA2 - EEFE0EA1EDFE0F97DCFF0FA3EEFE0EA3EFFF0EA2EEFE0EA0EAFE0C96DCFF557D - 8EFE494747FE494747FF424040EC0303033E1B1A1A0500000000000000000000 - 0000000000000000000000000000000000002120206B484646FE494747FF687F - 85FE1095D8FE0D9FE9FF0DA2EEFE0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2 - EEFE0DA2EEFE1573A3FE3B3939FF484646FE484646FE336680FF0DA2EEFE0DA2 - EEFE0EA3EFFF1496D8FE464749FE494747FF464444FE274C5FFE0EA3EFFF0DA2 - EEFE0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0DA1ECFE0D99E1FF438C - AEFE4B4A4AFE494747FF484646FE1B1B1B880000001500000000000000000000 - 0000000000000000000000000000000000002E2C2C92494747FF4A4848FF618C - 9CFF0C96DCFF0EA0EBFF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA1EDFF264150FF454343FF494747FF484748FF1B8CC6FF0EA3 - EFFF0EA3EFFF297399FF484646FF494747FF403E3EFF1776A6FF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EDFF0D9BE4FF3494 - C2FF505151FF494747FF494747FF3A3939D70000003024232302000000000000 - 000000000000000000000000000000000000313030AA484646FE4B4A4AFF5893 - ABFE0D98DFFE0EA1ECFF0DA2EEFE0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2 - EEFE0DA2EEFE0DA2EEFE1380B7FF373737FE484646FE494747FF3A5A6BFE0EA1 - ECFE0EA1ECFF3E525DFE484646FE484646FF323B41FE0E9CE4FE0EA3EFFF0DA2 - EEFE0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0DA2EEFE0D9DE6FF2796 - CCFE555858FE494747FF484646FE484646FD1110106A0707070E000000000000 - 000000000000000000000000000000000000323030B1484646FE4C4B4BFF5496 - B2FE0D98E0FE0EA1ECFF0DA2EEFE0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2 - EEFE0DA2EEFE0DA2EEFE0EA2EEFF214C62FE434141FE494747FF484646FE2281 - B1FE188ECAFF474546FE484646FE444343FF205C7BFE0DA2EEFE0EA3EFFF0DA2 - EEFE0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0DA2EEFE0D9DE7FF2196 - D0FE595D5DFE494747FF484646FE484646FE302E2EBD00000025302F2F010000 - 000000000000000000000000000000000000323030B1494747FF4C4B4BFF5596 - B1FF0D98E0FF0EA1ECFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF118CCAFF333537FF484646FF494747FF4150 - 59FF2D6F91FF484646FF484646FF3B3A3BFF1287C3FF0EA3EFFF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0D9DE7FF2296 - D0FF595D5DFF494747FF494747FF494747FF474545F90707074E100F0F090000 - 000000000000000000000000000000000000323030A9484646FE4B4A4AFF5B94 - AAFE0D97DEFE0EA1ECFF0DA2EEFE0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2 - EEFE0DA2EEFE0DA2EEFE0EA3EFFF0EA3EFFE205A77FE464545FF4F4D4DFE504E - 4EFE4F4F50FF4E4C4CFE4B4949FE2C4654FF0EA2EDFE0DA2EEFE0EA3EFFF0DA2 - EEFE0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0DA2EEFE0D9CE6FF2A96 - CBFE555858FE494747FF484646FE484646FE494747FF252424A10000001C0000 - 0000000000000000000000000000000000002F2D2D8F484646FE494848FF658D - 9BFE0C95DBFE0DA0EAFF0DA2EEFE0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2 - EEFE0DA2EEFE13A5EFFE1FA9F0FF26ACF0FE29A1DEFE464B4FFF5B5A5AFE5D5B - 5BFE5D5B5BFF5D5B5BFE575555FE327CA2FF22AAF0FE19A7EFFE0EA3EFFF0DA2 - EEFE0DA2EEFE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0DA2EDFE0D9BE4FF3895 - C0FE505050FE494747FF484646FE484646FE494747FF413F3FE90202023B1918 - 18050000000000000000000000000000000023222268494747FF494747FF6B7F - 83FF1395D7FF0D9EE8FF0EA2EEFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF11A4 - EFFF27ACF0FF33B1F1FF34B1F1FF34B1F1FF34B1F1FF3D7D9DFF5C5B5BFF6563 - 63FF656363FF656363FF555759FF35A8E3FF34B1F1FF34B1F1FF2FAFF1FF19A7 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA1ECFF0D99E0FF488D - ABFF4B4A4AFF494747FF494747FF494747FF494747FF494747FF1A1919840202 - 02140000000000000000000000000000000012111133484646FE494747FF5E64 - 64FE319DD0FE0D9CE5FF0DA2EDFE0DA2EEFE0EA3EFFF0DA2EEFE14A5EFFF38B3 - F1FE3FB6F2FE3FB6F2FE40B6F2FF3FB6F2FE3FB6F2FE40B0E9FF5D696FFE6E6D - 6DFE6F6D6DFF6C6A6AFE51778BFE40B6F2FF3FB6F2FE3FB6F2FE40B6F2FF3FB5 - F2FE23ABF0FE0EA3EFFF0DA2EEFE0EA3EFFF0DA2EEFE0D9FEAFE0C95DBFF5C7E - 8BFE494747FE494747FF484646FE484646FE494747FF484646FE393737D40000 - 002F0000000200000000000000000000000003030305464444E8494747FF4F4F - 4FFE559AB7FE0D98DFFF0DA0EBFE0DA2EEFE0EA3EFFF0FA3EFFE40B5F2FF4DBA - F3FE4DBAF3FE4DBAF3FE4DBAF3FF4DBAF3FE4DBAF3FE4DBAF3FF648FA6FE7877 - 77FE787777FF706F6FFE529FC7FE4DBAF3FF4DBAF3FE4DBAF3FE4DBAF3FF4DBA - F3FE4CBAF3FE1EA9F0FF0DA2EEFE0EA3EFFF0DA2EDFE0D9DE6FE2097D1FF5D63 - 63FE484747FE494747FF484646FE484646FE494747FF484646FE484646FD0F0F - 0F660000000D00000000000000000000000000000000302F2F98494747FF4947 - 47FF6D8287FF1596D7FF0D9DE7FF0EA2EEFF0EA3EFFF29ADF0FF5BC0F4FF5BC0 - F4FF5BC0F4FF5BC0F4FF5BC0F4FF5BC0F4FF5BC0F4FF5BBFF2FF7C888EFF8382 - 82FF828181FF717C82FF5BBEF0FF5BC0F4FF5BC0F4FF5BC0F4FF5BC0F4FF5BC0 - F4FF5BC0F4FF4BBAF3FF0EA3EFFF0EA2EEFF0DA0EBFF0D98DFFF4B90AEFF4C4C - 4CFF494747FF494747FF494747FF494747FF494747FF494747FF494747FF2F2D - 2DBA000000240000000100000000000000000000000016151533494747FE4846 - 46FE545757FE4C9EC2FF0D98E0FE0DA0EBFE0EA2EEFF47B8F2FE69C5F5FF69C5 - F5FE69C5F5FE69C5F5FE69C5F5FF69C5F5FE69C5F5FE70B9DEFF8D8C8CFE8D8C - 8CFE8A8989FF729EB5FE69C5F5FE69C5F5FF69C5F5FE69C5F5FE69C5F5FF69C5 - F5FE69C5F5FE67C4F5FF15A5EFFE0EA2EDFF0D9DE6FE1A96D3FE607074FF4947 - 47FE4A4949FE4B4A4AFF4B4A4AFE4B4A4AFE4B4A4AFF4A4848FE494747FE4745 - 45F80606064B0000000800000000000000000000000000000000484646BB4947 - 47FF494747FF6B7F84FF1E98D5FF0D9CE5FF0EA1EDFF53BDF3FF78CBF6FF78CB - F6FF78CBF6FF78CBF6FF84AFC6FF959DA2FF959EA3FF979B9FFF999898FF9998 - 98FF909091FF7AC0E4FF78CBF6FF78CBF6FF78CBF6FF78CBF6FF78CBF6FF78CB - F6FF78CBF6FF77CBF6FF19A6EFFF0D9FEAFF0D96DDFF518FA9FF4D4D4DFF4C4E - 4FFF699BB1FF75A7BCFF75A7BCFF75A7BCFF75A6BCFF687B82FF4A4848FF4947 - 47FF2322229D0000001B000000010000000000000000000000005C6565384846 - 46FB484646FE4F4F4FFF6397AAFE0F95DAFE0D9EE8FF45B7F1FE87D1F7FF87D1 - F7FE87D1F7FE87D1F7FE93B5C7FFA3A2A2FEA4A3A3FEA4A3A3FFA4A3A3FEA3A2 - A2FE93A5AEFF87D1F7FE87D1F7FE87D1F7FF87D1F7FE87D1F7FE87D1F7FF87D1 - F7FE87D1F7FE78CBF5FF10A1EBFE0D99E1FF3396C5FE5A6061FE494747FF4D4E - 4FFE70BBDCFE82CDF0FF7EA9BAFE7098A9FE7098A8FF647278FE494848FE4947 - 47FF413F3FE80202023900000004000000000000000000000000000000006777 - 7799484646FE494747FF595D5DFE539EBDFE0D96DCFF19A3E9FE8AD1F6FF95D6 - F7FE95D6F7FE95D6F7FE9DBBCAFFA7A6A6FEA7A6A6FEA7A6A6FFA7A6A6FEA6A5 - A5FE99C2D7FF95D6F7FE95D6F7FE95D6F8FF95D6F7FE95D6F7FE95D6F8FF95D6 - F7FE95D6F7FE49B7EFFF0D9AE2FE2397CFFF627378FE494848FE494747FF4947 - 47FE586C74FE7ACAEFFF80ABBEFE545656FE4A4848FF494747FE494747FE4947 - 47FF484646FE1817177C0000000E00000000000000000000000000000000B0EA - EA10515353DB494747FF494747FF5F6667FF4D9FC2FF0D96DCFF38AEEBFFA0DA - F7FFA4DCF8FFA4DCF8FFA6C9DAFFA7BBC5FFA7BBC5FFA7BBC5FFA7BBC5FFA7BB - C5FFA4DAF5FFA4DCF8FFA4DCF8FFA4DCF9FFA4DCF8FFA4DCF8FFA4DCF9FFA4DC - F8FF74C7F2FF0F9BE2FF2297D0FF627C84FF4B4949FF494747FF494747FF4947 - 47FF4A4848FF5F8493FF7FCFF5FF79959FFF4E4D4DFF494747FF494747FF4947 - 47FF494747FF313030BD0000001A000000000000000000000000000000000000 - 00009DCBCB30484748F2484646FE494747FE5E6464FF599DB8FE1296D8FF36AB - E7FE9ED8F6FEB2E1F9FEB2E2FAFFB2E2F9FEB2E2F9FEB2E2FAFFB2E2F9FEB2E2 - F9FEB2E2FAFFB2E2F9FEB2E2F9FEB2E2FAFFB2E2F9FEB2E1F9FEAFE0F8FF69C2 - EFFE1199DEFE3098C9FF63777DFE4B4A4AFF484646FE484646FE494747FF4846 - 46FE484646FE4C4B4BFF6B9EB5FE8AD0F0FE718085FF4B4949FE484646FE4947 - 47FF484646FE413F3FE701010121000000000000000000000000000000000000 - 00000000000021729B4A484849F6484646FE494747FF555858FE69919EFF2C9B - D0FE179BDEFE62BEEDFEABDDF7FFC0E6FAFEC0E6FAFEC0E7FAFFC0E7FAFEC0E7 - FAFEC0E7FAFFC0E7FAFEC0E7FAFEC0E6FAFFBBE4F9FE86CEF2FE32A8E4FF1596 - D7FE4F96B4FE5F6869FF4A4848FE494747FF484646FE484646FE494747FF4846 - 46FE484646FE494747FF515354FE93C1D5FEA7D2E6FF606565FE494747FE4947 - 47FF484646FE464444F10303031F000000000000000000000000000000000000 - 0000000000000000000021729B49484748F1494747FF494747FF4C4B4BFF6570 - 72FF5E99B0FF2B9CD2FF1197DBFF39ABE5FF68C0EDFF8ACFF2FF9ED7F5FFA7DB - F6FFA3DAF6FF94D3F4FF78C7F0FF4FB5E9FF1E9EDFFF1696D6FF469ABFFF657E - 86FF515252FF494747FF494747FF494747FF494747FF494747FF494747FF4A48 - 48FF535555FF515252FF494747FF606C70FFB5E3F8FF86979DFF4A4848FF4947 - 47FF494747FF413F3FE00000000F000000000000000000000000000000000000 - 00000000000000000000000000001D77A52D444B50D7484646FE494747FF4947 - 47FE4D4D4DFE636B6CFE688E9AFF4F9BBCFE359DCEFE1E98D5FF1396D7FE1195 - D8FE1295D8FF1897D6FE2A9BD1FE429BC3FF5B91A6FE68787BFE525353FF4947 - 47FE484646FE494747FF484646FE494747FF484646FE484646FE494747FF4F51 - 52FEB4DBEDFE99AEB6FF4F4F4FFE595F60FEBFE5F6FF8FA0A6FE4A4949FE4947 - 47FF484646FE2F2D2DA000000003000000000000000000000000000000000000 - 000000000000000000000000000000000000A5E4E80D7084848F494848F84846 - 46FE484646FE494747FE4A4848FF4F5050FE5A5F5FFE677071FF6B7B7EFE6A7E - 83FE6A7C80FF687476FE5F6565FE535454FF4B4A4AFE494747FE494747FF4846 - 46FE484646FE494747FF484646FE494747FF484646FE484646FE494747FF4B4A - 4AFE9EB7C2FECBE6F3FF9CAFB5FEB1CAD4FECCE8F5FF707779FE494747FE4947 - 47FF474545F60F0E0E2E00000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000000000004947472A4947 - 47A7494747FA494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4947 - 47FF535656FF93A4AAFFB1C3CAFFAABCC3FF788284FF4D4C4CFF494747FF4947 - 47FE262424690000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00004846461C48464676494747C8484646F7484646FE494747FF484646FE4846 - 46FE494747FF484646FE484646FE494747FF484646FE484646FE494747FF4846 - 46FE484646FE494747FF484646FE494747FF484646FE484646FE494747FF4846 - 46FE494747FE4A4848FF4C4B4BFE4B4A4AFE494747FF484646FE474545E03C3B - 3B52000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000A3A2A211A3A2A23BA4A3A35FA3A2A276A3A2 - A27FA4A3A37FA3A2A27FA3A2A27FA4A3A37FA3A2A27FA3A2A27FA4A3A37FA3A2 - A27FA3A2A27FA4A3A37FA3A2A27FA4A3A37FA3A2A27FA3A2A27FA4A3A37FA3A2 - A27FA3A2A27FA4A3A37FA3A2A27FA3A2A27FA4A3A377A3A2A248A3A2A2080000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFF - FFFFFFFF0000FFFE001FFFFF0000FFF00003FFFF0000FFE00000FFFF0000FF80 - 00007FFF0000FF0000003FFF0000FE0000000FFF0000FC0000000FFF0000F800 - 000007FF0000F000000003FF0000F000000001FF0000E000000001FF0000E000 - 000000FF0000C000000000FF0000C0000000007F000080000000007F00008000 - 0000007F000080000000003F000080000000003F000080000000001F00008000 - 0000001F000080000000000F000080000000000F000080000000000F00008000 - 000000070000800000000007000080000000000300008000000000030000C000 - 000000010000C000000000010000E000000000000000E000000000000000F000 - 000000000000F000000000000000F800000000000000FC00000000000000FE00 - 000000000000FF00000000000000FF80000000010000FFE0000000030000FFF8 - 000000070000FFFF0000000F0000FFFFFFFFFFFF0000FFFFFFFFFFFF0000FFFF - FFFFFFFF0000FFFFFFFFFFFF0000280000002000000040000000010020000000 - 0000801000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000030000 - 000E0000001F0000002D00000033000000340000002F00000022000000110000 - 0004000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000252424040404041F121212672928 - 28AD393838D8444242F0484646F9474545F8414040EB353333CE2221219F0909 - 0958020202251F1F1F0700000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000B0B0B14181818763D3B3BDF494747FF4947 - 47FF494747FF4C4B4BFF4F4F4FFF4E4D4DFF4B4949FF494747FF494747FF4846 - 46FD323030C60B0B0B5F0606061A526262010000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000BBC3C3011011112D343232C4494747FF494848FF565C5EFF507B - 8EFF4892B5FF429FCBFF40A3D4FF40A2D1FF439AC3FF4888A5FF526D78FF4E4E - 4EFF494747FF474545FA2221219D0304042A6183900300000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000151515363F3E3EE3494747FF545858FF4D88A3FF33A2DAFF34AB - E7FF39B0EDFF3DB3EFFF3EB4F0FF3EB4F0FF3DB3EEFF3AAFEBFF31A8E4FF3A9A - C8FF51717EFF4B4A4AFF494747FF2F2D2DBD0103042F7FABAB02000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00001E262625403E3EE2494747FF57696FFF379BCCFF2BA8E7FF32AFEFFF35B1 - F1FF35B2F1FF36B2F1FF37B2F1FF37B3F1FF38B3F2FF38B3F1FF38B2F1FF35AF - EDFF2BA4E2FF4488A8FF4F5050FF494747FF2E2C2CBA090C0C23000000000000 - 000000000000000000000000000000000000000000000000000000000000292E - 2E08363434C2494747FF586B71FF2B9DD5FF25A8EBFF29ACF0FF2AADF1FF2AAE - F1FF2BAEF1FF2CAEF1FF2CAEF1FF2DAFF1FF2EAFF1FF2EAFF1FF2FAFF1FF2FAF - F1FF2EAEEFFF27A6E6FF3C8DB3FF4E4F4FFF494747FF1F1E1E920F0F0F0F0000 - 0000000000000000000000000000000000000000000000000000000000001E1D - 1D6B494747FF565C5EFF2E99CEFF1CA4EAFF2491C8FF397D9FFF3C7FA1FF26A1 - DFFF22AAF0FF22AAF0FF23ABF0FF23ABF0FF24ABF0FF29A3E1FF4E6A79FF3D88 - AEFF2BA5E3FF26ABEFFF1FA2E5FF4583A0FF4A4848FF464444F6080808493230 - 30010000000000000000000000000000000000000000000000000101010B4240 - 40E44B4949FF478DADFF149FE6FF16A5EFFF189EE1FF3D464BFF514F4FFF3B6E - 89FF19A7F0FF19A7F0FF1AA7F0FF1AA7F0FF1BA8F0FF357DA2FF545252FF5452 - 52FF535455FF40687DFF1E9EDEFF1A9BDDFF526871FF494747FF2C2A2AB21413 - 130F0000000000000000000000000000000000000000000000001A19195B4947 - 47FF5B686BFF1799DAFF10A2ECFF11A4EFFF11A4EFFF1D6E98FF474545FF4B4A - 4AFF1E91CBFF13A4EFFF13A5EFFF14A5EFFF15A4EDFF45555EFF4D4B4BFF3F3D - 3DFF454343FF384B55FF16A5EEFF14A1E9FF358CB6FF4B4949FF464444F60403 - 0333000000000000000000000000000000000000000000000000333131AD4947 - 47FF4C87A0FF0D9CE5FF0EA2EEFF0EA3EFFF0EA3EFFF0E9FE9FF30424CFF4947 - 47FF3B5B6DFF0FA3EEFF0FA3EFFF0FA3EFFF1F88BEFF4A4848FF454343FF1874 - A3FF176288FF16709EFF10A3EFFF0FA2EDFF1297DBFF555F62FF494747FF1F1E - 1E8D21202007000000000000000000000000000000009F9F9F02444242E74D4C - 4CFF3798C6FF0D9FEAFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF1678AAFF4240 - 40FF484646FF2183B5FF0EA3EFFF0EA3EFFF34637BFF484646FF34444DFF0EA1 - ECFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0D9BE3FF497588FF494747FF3D3C - 3CE00404042000000000000000000000000000000000A6A6A610494747FF5558 - 58FF239CD7FF0EA1ECFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF2A49 - 5AFF484646FF41515BFF0F9FE9FF129AE0FF464849FF474545FF1F678DFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0D9DE7FF3E82A2FF494747FF4947 - 47FF1413136B2B2A2A03000000000000000000000000A8A8A821494747FF5D62 - 62FF1799DBFF0EA1EDFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF1385 - BFFF3E3D3DFF494747FF29769EFF247AA7FF484646FF3F3E3FFF1192D4FF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0D9FE9FF3989AFFF494747FF4947 - 47FF333131C60C0C0C15000000000000000000000000A8A8A820494747FF5C61 - 61FF189ADBFF0EA1EDFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3 - EFFF24536CFF474545FF454B4FFF3C5968FF484646FF2C5165FF0EA3EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF0D9EE9FF3A89AFFF494747FF4947 - 47FF484646FC0A09094A353434010000000000000000A7A6A60F494747FF5557 - 57FF269CD6FF0DA1ECFF0EA3EFFF0EA3EFFF0EA3EFFF0EA3EFFF10A3EFFF1AA7 - EFFF2498D4FF4D4E50FF5B5959FF5A5858FF565454FF2981AEFF17A6EFFF0EA3 - EFFF0EA3EFFF0EA3EFFF0EA3EFFF0EA2EEFF0D9DE7FF4083A1FF494747FF4947 - 47FF494747FF282727A81616160D000000000000000000000000454343E74C4C - 4CFF3B99C4FF0D9FEAFF0EA3EFFF0EA3EFFF0EA3EFFF20AAF0FF35B1F1FF36B2 - F1FF36B2F1FF457A95FF666464FF676666FF5A6064FF37AEEBFF36B2F1FF30B0 - F1FF15A5EFFF0EA3EFFF0EA3EFFF0EA2EEFF0D9AE3FF4D7587FF494747FF4947 - 47FF494747FF444242F104040430000000000000000000000000343232A94947 - 47FF51879EFF0D9BE4FF0EA2EEFF0EA3EFFF27ACF0FF49B9F3FF49B9F3FF49B9 - F3FF49B9F3FF4DB0E3FF747373FF757474FF5A879EFF49B9F3FF49B9F3FF49B9 - F3FF45B8F2FF15A5EFFF0EA3EFFF0DA1ECFF1598D9FF575F60FF494747FF4947 - 47FF494747FF494747FF1D1C1C880000000600000000000000001C1B1B554947 - 47FF5D6769FF1B9AD9FF0DA1ECFF0FA3EFFF59BFF4FF5EC1F4FF5EC1F4FF5EC1 - F4FF5EC1F4FF69ADD0FF858484FF818080FF62B0D8FF5EC1F4FF5EC1F4FF5EC1 - F4FF5EC1F4FF3DB4F2FF0EA2EEFF0D9EE7FF3C8DB3FF4A4949FF494747FF4947 - 47FF494747FF494747FF3C3A3ADD0000001E0000000000000000030303054846 - 46E14A4949FF508EA9FF0D9BE3FF18A6EEFF74CAF5FF74CAF5FF74CAF5FF80B3 - CDFF88ABBEFF8F9FA8FF969595FF88969EFF74CAF5FF74CAF5FF74CAF5FF74CA - F5FF74CAF5FF58BFF3FF0DA1ECFF1698D9FF56676DFF505B60FF678897FF6889 - 97FF688997FF585F62FF494747FF121212660000000300000000000000005E69 - 695F494747FF575B5BFF3399C9FF0F9EE7FF7CCDF5FF8AD2F7FF8AD2F7FF9BB0 - BCFFA5A5A5FFA5A5A5FFA5A4A4FF91B9CDFF8AD2F7FF8AD2F7FF8AD2F7FF8AD2 - F7FF8AD2F7FF4FBAF1FF0D99E1FF4D839AFF4A4848FF526168FF7DCAEEFF7699 - A6FF647E89FF555B5DFF494747FF313030C200000012000000000000000090B7 - B701606C6CB9494747FF5C6A6EFF2999CFFF3BAFEAFF9FD9F8FFA0DBF8FFA4BF - CCFFA6B4BAFFA6B4BAFFA6B3BAFFA1D6F1FFA0DBF8FFA0DBF8FFA0DBF8FFA0DA - F8FF8BD1F5FF179DE2FF458CACFF4E4E4EFF494747FF494747FF5F8291FF7EBA - D5FF535555FF494747FF494747FF474545FB0505053200000000000000000000 - 0000AFE8E815434D53DD494747FF5C676AFF3998C5FF3CACE6FFA1D9F6FFB6E3 - F9FFB6E3FAFFB6E3FAFFB6E3FAFFB6E3FAFFB6E3FAFFB6E3FAFFB5E2F9FF81CC - F2FF239EDDFF4D87A0FF4E4E4EFF494747FF494747FF494747FF4A4949FF71A1 - B6FF87ABBAFF4C4C4CFF494747FF494747FF1515155E00000000000000000000 - 0000000000001580B621434D53DC494747FF535555FF56879BFF2E9DD2FF49B1 - E6FF7FCAF0FFA1D9F5FFAFDFF7FFACDEF7FF97D4F4FF6DC2EDFF33A6E0FF3A95 - BFFF596F77FF4A4949FF494747FF494747FF494747FF4B4A4AFF4F4F4FFF4E4F - 50FFA3CDE1FF6C7578FF494747FF494747FF1514145100000000000000000000 - 00000000000000000000409FC71457686CB5494747FF494747FF565959FF5B7B - 86FF498DABFF3D97C1FF369AC9FF3799C7FF4093B9FF4D849CFF5C6D71FF4D4D - 4DFF494747FF494747FF494747FF494747FF494747FF69767CFFB1CCD8FF595C - 5DFFADCBD8FF757F82FF494747FF464444F10404041200000000000000000000 - 00000000000000000000000000000000000050525255494747D6494747FF4947 - 47FF494747FF4B4A4AFF4D4C4CFF4C4B4BFF4A4848FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF4C4B4CFF99ACB4FFB9CF - D8FF9EAFB6FF505050FF494747FE212020670000000000000000000000000000 - 0000000000000000000000000000000000000000000049474701494747404947 - 4790494747C9494747ED494747FD494747FF494747FF494747FF494747FF4947 - 47FF494747FF494747FF494747FF494747FF494747FF494747FF494747FF4B49 - 49FF494848FB484646CC42404051000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFF80 - 1FFFFE0007FFFC0001FFF00000FFF000007FE000007FC000003FC000001F8000 - 001F8000001F8000000F0000000F000000070000000700000003000000038000 - 0003800000018000000180000000C0000000C0000000E0000000F0000000F800 - 0000FE000001FF000003FFFFFFFFFFFFFFFFFFFFFFFF28000000180000003000 - 0000010020000000000060090000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000006767 - 67066767670F6767671267676710676767076767670100000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000021202002040404201616166F2928 - 28AC333232C9363434D0323030C6252424A510101064010101201D1C1C040000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000262B2B101F1E1E86424040ED494747FF5051 - 51FE535F63FF526269FF525B5EFF4D4C4CFE494747FF3B3A3ADD141313711A1D - 1D14000000000000000000000000000000000000000000000000000000000000 - 000000000000000000004A4A4A20363535C94A4848FE516872FF4590B5FF39A6 - DCFE37ABE6FF39ADE8FF36AAE5FF3CA1D3FE4583A0FF4F595DFE484646FE2827 - 27AB1521271D0000000000000000000000000000000000000000000000000000 - 0000000000004E6767153B3939D34E4F4FFE4789A8FE2DA7E5FE34AFEFFE37B2 - F1FE38B3F1FE39B3F1FE39B3F1FE39B3F1FE36AFEDFE31A2DBFE4A7183FE4948 - 48FE2C2B2BB42B39391500000000000000000000000000000000000000000000 - 0000171A1A022F2D2DAA4D4D4DFF3E8FB5FF23A7EAFE27ACF0FF29ADF0FF29AD - F0FE2AADF0FF2BAEF1FF2CAEF1FF2EABEBFE2FACECFF2DAEF0FE27A5E5FF4875 - 8AFF494747FE1D1C1C892B2A2A05000000000000000000000000000000000000 - 000012121245494747FE497F98FF18A1E7FF1E95D1FE46565FFF436B81FF1DA8 - EFFE1EA9F0FF1EA9F0FF1FA9F0FF3882A8FE535B60FF427793FE2D95CAFF1F9F - DFFF4D616AFE444242F30E0D0D2F000000000000000000000000000000000000 - 0000343333B6545A5CFE1C9ADAFE11A3EEFE12A4EFFE2B5C76FE4C4A4AFE2686 - B8FE14A5EFFE14A5EFFE15A5EEFE455862FE4A4848FE464444FE345E73FE16A4 - ECFE318CB9FE4A4848FE21202090333232020000000000000000000000007C7C - 7C11474545F9497A90FE0D9EE8FF0EA3EFFF0EA2EEFE1192D4FF3E4143FF4152 - 5CFE10A0E9FF0EA3EFFF1D8AC1FF494747FE2C5B73FF1478ACFE1386C1FF0FA3 - EEFF109AE0FE515C60FF3E3D3DE4151515180000000000000000000000008B8A - 8A3F494747FF398EB5FE0DA1ECFF0EA3EFFF0DA2EEFE0EA3EFFF216486FF4746 - 46FE29779FFF0EA3EFFF336580FF464444FE1682B9FF0DA2EEFE0EA3EFFF0EA3 - EFFF0D9EE8FE456F83FF494747FF16151569000000000000000000000000908F - 8F574A4848FF3296C7FE0EA2EDFF0EA3EFFF0DA2EEFE0EA3EFFF0F9AE0FF3942 - 48FE454B50FF1694D5FF45494CFF384851FE0EA1ECFF0DA2EEFE0EA3EFFF0EA3 - EFFF0D9FEAFE3E7894FF494747FF343333C91F1E1E0D0000000000000000908F - 8F564A4848FE3296C6FE0DA2EDFE0DA2EEFE0DA2EEFE0DA2EEFE0DA2EEFE1D6F - 9AFE494747FE435762FE4B4949FE226A90FE0DA2EEFE0DA2EEFE0DA2EEFE0DA2 - EEFE0D9FEAFE3E7894FE484646FE484646FD0F0E0E4500000000000000008C8B - 8B3E494747FF3C8EB4FE0DA1ECFF0EA3EFFF0DA2EEFE15A5EFFF26ACF0FF2EAC - ECFE4F5F68FF615F5FFF5B5B5BFF2FA0DAFE22AAF0FF10A4EFFE0EA3EFFF0EA3 - EFFF0D9DE7FE476F82FF494747FF484646FE292828AA07060606000000007D7C - 7C0E484646F94D7A8EFE0D9DE7FE0DA2EEFE1CA8EFFE44B7F2FE46B8F2FE46B8 - F2FE5499BCFE737272FE607C8BFE46B8F2FE46B8F2FE3FB5F2FE12A4EFFE0DA2 - EEFE129ADFFE525C5FFE484646FE484646FE454343F304030329000000000000 - 0000363434B2555A5BFE1F9BD8FF0DA2EDFF4DBAF3FE62C2F4FF62C2F4FF62C2 - F4FE75A3BBFF878686FF6AA7C7FF62C2F4FE62C2F4FF62C2F4FE35B2F1FF0DA0 - EBFF348BB5FE4A4949FF4A4848FF4A4848FE494747FF1F1E1E88000000020000 - 0000292B2B3D494747FE4F7F94FF0E9CE5FF66C4F4FE7FCEF6FF85C0DEFF9CA0 - A3FE9E9E9FFF989C9EFF80CBF2FF7FCEF6FE7FCEF6FF7FCEF6FE46B7F1FF1799 - DBFF506167FE5D7C8BFF7AB1C8FF729FB2FE585F62FF3D3C3CE0000000160000 - 0000000000006C7F7FA14D4C4CFE438EB0FE3AAEE9FE9CD8F8FE9FCDE5FEA7B1 - B6FEA7B1B6FEA2BFCDFE9DD9F8FE9DD9F8FE9DD9F8FE91D4F6FE22A1E1FE4C74 - 85FE494747FE4D5153FE76B2CDFE596063FE494747FE484646FE121111580000 - 000000000000B5F2F20C3E525DCC4E4E4EFF4A87A2FE46AEE3FF9CD7F6FFB9E4 - FAFEB9E4FAFFB9E4FAFFB9E4FAFFB8E3F9FE86CEF2FF37A1D6FE4F707EFF4947 - 47FF484646FE494747FF546167FF8DB9CCFE4F4F4FFF494747FF232222860000 - 000000000000000000001184BF123C5461BD494848FE56676DFF428BADFF49A9 - D7FE56B5E5FF5BB8E7FF54B3E3FF42A0CCFE467F99FF525859FE494747FF4947 - 47FF484646FE687277FF606567FF8BA5B0FE6A7275FF494747FF1C1B1B640000 - 00000000000000000000000000007B9EA1035459596C484646E8494747FE4F4F - 4FFE595E5FFE596264FE56595AFE4C4B4BFE494747FE484646FE484646FE4846 - 46FE484646FE61676AFEAABFC7FEA8BCC4FE535455FE3F3E3ED70303030B0000 - 00000000000000000000000000000000000000000000767575077675754F7675 - 7590767575B4767575BF767575BF767575BF767575BF767575BF767575BF7675 - 75BF767575BF767575BF777676BF777676BD7674748C58575714000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FF00FF03FF00F800FF00F0007F00E0003F00C0001F0080000F0080000F008000 - 0700000007000000070000000300000003000000010000000100800000008000 - 0000C0000000C0000000E0000000F0000000FC000100FFFFFF00FFFFFF002800 - 0000100000002000000001002000000000004004000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000001B1A1A01050505221818186D2322 - 2292222121911615156802020220191818010000000000000000000000000000 - 00000000000000000000000000006C7B7B0B2827279349494AF74A6774FF4777 - 8EFF47758BFF4B606BFF444343F01F1E1E844E63660B00000000000000000000 - 0000000000000000000073959509373636BF4B6876FF37A0D4FF36AFEDFF3AB3 - F0FF3BB3F0FF37AFECFF3B97C5FF4A5A62FF292929A94E5F5F09000000000000 - 000000000000000000003131318D496A79FF249EDCFF3295C8FF27AAECFF27AC - F0FF29ADF0FF359BCFFF31A2DCFF2AA0DBFF49585FFF1F1E1E78000000000000 - 000000000000565656194C4E4FF8219AD6FF14A3EBFF3D525DFF2F7CA3FF16A6 - EFFF17A6EFFF475C67FF4B4A4AFF2B7DA7FF2D8CBBFF413F3FE9282727100000 - 0000000000006D6C6C65466C7EFF0DA0EBFF0EA3EFFF187FB4FF434A4EFF139B - E0FF1C8CC5FF434547FF1386C2FF1196DAFF0F9EE6FF4C585EFF201F1F650000 - 0000000000007877778C3B7C9BFF0EA2EDFF0EA3EFFF0EA2EEFF315467FF306B - 8AFF316986FF2E5F79FF0EA3EFFF0EA3EFFF0DA0EBFF426678FF363434CB3231 - 3106000000007877778B3C7C9AFF0DA2EDFF0EA3EFFF0EA3EFFF1C8DC7FF4D4E - 4FFF4D5357FF1E87BCFF0EA3EFFF0EA3EFFF0DA0EBFF436677FF484646FE1F1E - 1E40000000006E6D6D64486D7DFF0DA0EAFF14A5EFFF3AB3F1FF40B6F2FF5B80 - 94FF647077FF40B5F0FF35B1F1FF0FA3EFFF0F9DE6FF4D585DFF494747FF2B2A - 2AAA00000001575757164E4F50F72199D4FF3DB5F1FF69C5F5FF71B8DDFF8599 - A4FF78A4BBFF69C5F5FF69C5F5FF2CAEF0FF2D8AB8FF525D62FF58686FFF494A - 4AF60404042200000000667474864B6976FF3CADE6FF95D6F7FFA3B2BAFFA6AC - AFFF97CFEBFF95D6F8FF90D4F7FF2E9FD8FF4B585DFF5E7D8CFF6B8996FF4C4C - 4CFF1F1F1F8000000000A4D6D605395869B64C6773FF58AAD2FF8DD0F2FFAFDF - F8FFABDEF8FF83CBF0FF4E9BC1FF4C595FFF494747FF4B4A4AFF7A9AA8FF5253 - 54FF2F2E2EAB00000000000000005897AD05586263824C4B4BF44E6570FF4372 - 88FF437085FF4F6067FF4A4848FF494747FF494747FF808E95FF97A9B1FF5557 - 58FE1B1A1A5A00000000000000000000000000000000A4A3A310A4A3A356A4A3 - A37AA4A3A37FA4A3A37FA4A3A37FA4A3A37FA4A3A37FA4A3A37FA4A3A37EA2A1 - A147000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000FFFF0000E01F0000C00F00008007000080070000000300000003 - 0000000100000001000000000000000000008000000080000000C0000000F001 - 0000FFFF0000} - OldCreateOrder = False - Position = poScreenCenter - OnClose = FormClose - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object bvlSpace: TBevel - Left = 0 - Top = 314 - Width = 527 - Height = 3 - Align = alBottom - Shape = bsBottomLine - end - object jplWizard: TJvPageList - Left = 0 - Top = 0 - Width = 527 - Height = 314 - ActivePage = jspWelcome - PropagateEnable = False - Align = alClient - OnChange = jplWizardChange - object jspWelcome: TJvStandardPage - Left = 0 - Top = 0 - Width = 527 - Height = 314 - Color = clWhite - object imgInstall: TImage - Left = 0 - Top = 0 - Width = 164 - Height = 314 - Align = alLeft - AutoSize = True - Picture.Data = { - 07544269746D6170AE5B0200424DAE5B0200000000003600000028000000A400 - 00003A0100000100180000000000785B0200C40E0000C40E0000000000000000 - 00008C00018900028400047800036E02085F06094B02043500003404022F0401 - 3100004303024D00006200007300008304068000018200008600008700008700 - 018400018000047800046700016508094D00004D01024300004400014804053E - 00004300033C00003E00004302043D00004201034403053E00004201033C0000 - 3E00004302043D00004201034403053E00004201033C00003E00004302043D00 - 004201034403053E00004201033C00003E00004302043D00004201034403053E - 00004201033C00003E00004302043D00004201034403053E00004201033C0000 - 3E00004302043D00004201034403053E00004501023F00004100004603024000 - 004502014504033F00004302013C00003E00004104023900003E030140050338 - 00003B03023300003800003F04023B00004302014D03014C00005D0302570000 - 7002027A03047C00008702058700008A00028400018200018000018000018000 - 018000018400018400018300008000017B00027101016705055D08064E03013F - 00004003003F02004100004D02005200005E00006A00007A05087B00027F0002 - 8200018200018200018000018001008001008601008700008900008700008400 - 017D01017201046604045300014300003E00003F03043D00014300064B000845 - 00014C06063C00004F0A074000008A00018700028000047500046A03085D0609 - 4903043500003303013606043000004908074C00006701027000008405078000 - 018200008600008700008700018400017D0004760104640000680B0C49000051 - 07073E00004804054501024100003F0000420103390000500F113900004E0D0F - 3E00004201033E0000420103390000500F113900004E0D0F3E00004201033E00 - 00420103390000500F113900004E0D0F3E00004201033E000042010339000050 - 0F113900004E0D0F3E00004201033E0000420103390000500F113900004E0D0F - 3E00004201033E0000420103390000500F113900004E0D0F3E00004202024100 - 004502013C000053100F3C0000510E0D3F00004302013F00004202013900004E - 110F3700004C0F0D3C00003E03013800003C03013500004E110F3A0000530E0B - 4800005300005F03025A00007002027B03047C00008702058700008A00028600 - 018200018000017F00017F00017F00017F00017F00017E00017B00027601026A - 03016206055809064904013D0000420200490401430000580704520000670102 - 6800007D06077D00028000028200018400018200018200018001008001008200 - 008401008400008200007F00017801026D02046205044E00004901013900004E - 0F11390000510B124500024B00034D01024300005609074A0000880006820004 - 7D01076D00026403074F00004301023800003403013401003A00004A00005D03 - 036E03057B02068000028301028301018600008500008500007F000079000470 - 02046200015600004F01024500004701024100004600014300004100013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000014000013F00004201033E00004201033E000041000240 - 00014000013F00004201033E00004201033E00004100024000014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000004300004200004502014100004302013F000042010041 - 00004000003E00004303023F00004404034000004303024101003E01003E0100 - 4101004300004700004C00005100005900006804046D02047402027B00028000 - 028600028700028900018700018400007F00007C000078000176000076000074 - 00007502056B00006400005600005001004200003C05003C0200480000520000 - 5A03016104036A04057103037801027C00018300038500028700028600018400 - 018100008100007F00007E03017C03017E06067903027606066900005F000051 - 00004C00014500004300033D00004300054000004700034B00005400005B0000 - 6101016303037D00047D04086B00006D06095100005006063D00003A02013802 - 013900004200004F00006202027103037E010382000183010183010184000084 - 00008100007E00007500036D02045C00005704034500004C06063C0000490506 - 3F00004501024000004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004100023F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004101014000004704033D000048 - 07063A00004706053D00004101003E00004404033B00004908073B0000480706 - 4000004502014300004300004800004C00005201005601005E01006400006D02 - 047201047801027D00028200028600028700028700018600008300007E000078 - 00007301016F01016E01036A0203680203670505550000570402400000440802 - 3500003F03005300005F00006602026D03027303037902037F00028100018500 - 028700028700028600018400018200018000017D01017501007708066B000073 - 0C0A6000006407065100004F00004A00004A04043C00004702054000004F0307 - 4800005801056200006A00006E00027002027602076900006E070C5200005908 - 0B3E00004405073800003D01014100004A000058000069010277020380010382 - 00018301018301018200008200007F00007A00007100036602025A0202480000 - 4F09093A00004B090A3A00004905064200004300033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073E00004201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004301023B00004A09083A00004B0A093900004606053E00004202013B0000 - 4A09083C00004F09093E00004C04044600004900004E00005300005700005D02 - 006403006904027004037402027801027D000280000282000284000286000286 - 00018500008100007A00007302006C02016703036302046104055F0505530000 - 5A0706470000520B083A00004309034400006102006E01007202027703027D03 - 038001028200018300008600018600018600018500028101028001027E020279 - 03026F05046200006B0C09540000630C0A4A00005106044700004C0404420000 - 5006064300005605084900005D080C6102066F00017900007D00027E02026500 - 016906085000005B080A4000004A08093700004203054100004A000055000162 - 00006E00027901028000018400018102018102018001008001007C0000740000 - 6D00026101015100005107053A00004A0D0B3700004B0B0B3B00004503043E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004201033E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004202023E00004707063A00004C0C0B390000480B09 - 3700004003013F00004807063C0000500A0A4000005208084300005000005500 - 005B00005E00006400006902006F03027404047A03047B00027D000280000282 - 00028400028400028400028400028301017E03017602016E03006402025D0302 - 5603025503025000005704064A00005C0A09470000590E0C4700005806016F04 - 017A02027D03037F03038202038301028400018600018600018400018200017F - 00017C02027903027703027103036200006309094C00005E0C0B430000540A08 - 3F00004904014700005105064900005F0909500000690A0E5E000172070A7B00 - 028301028402038402035C03064D00005608094000004B090A37000045060840 - 00004900005300016000036B00027500037C00018200018400008001007F0100 - 8002017D02007800007001006700005C00005202013F00004B0B0A350000480C - 0C3700004808084100004201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E00004201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420202370000 - 4A0A093700004A0D0B3500004308063C00004404033B00004F09094000005509 - 0A4500005505065200006302006A01006D02006F02007302007802017C010380 - 01038200028200028400028400028400028400028400048000028204037A0502 - 6F04016504005A03015102004A00004900004D00014900005E05085200006B0D - 0E5A00006A0D0C6702007B030382030282030284020286020285010184000184 - 00018100007E00007B01017802017203017003016D04016804025E04044E0000 - 57090A420000500A0A3C00004B08074600004B00004A0000630909570000760D - 106500007A090C7700018102038602028602028602024A00004E06063C000047 - 0A083500004408083900004601044D00005900016700057300037A00017F0000 - 8300008400008001007F01008002017C03017802016D00006300005700004900 - 00470703350000430C09330000460A0A3C00004604053E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004201033E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004202023C0000440705370000460B09350000450A083600004003014000 - 004807063E00005208084500005808094D00005D03036D030274030176020179 - 01017D0101800001820002860002870002870002860002860002840002820002 - 8200047F00027A03017305006804005C03004F02004500004200004300004800 - 005702065300006F080D6500007F0C0F7300017F050584020285010187010187 - 01018701018701018500028101027E00007800007501006F0200690200660300 - 6302005E02015200005405084200004C08093A00004808073E00004B03034C00 - 005F05045D0000790C0E6D0000830B0C77000080010282030283010183010183 - 01014302013D00004206063300003E08083400004304064700015000005F0002 - 6E00067901057E00018200008500008400007F00007D02007E03017A03017602 - 016C01005E00005400004B01003C000040070530000040080736000044060642 - 02024100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053F - 00004100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00003F01013800004207053300004108 - 063400004005033D00004303024000004D05054300005606074D00005D060960 - 02037203017B02007D01018000018200018600018700018900018B0002890002 - 8700028600028400028200028000047B00027100006702005E02005301004801 - 004001003D00004000005104085400016A030A6A000085070D8000008E02098A - 0000870000860100870000860000860000840000830101800201790101750100 - 6D02006602006002005A02005700005300005000024700004D03093A00004706 - 083B00004805044900005A04045F000075070972000087080A7F00008B030584 - 00008001007F01007F01007F01003F00003F02003900003D05043701003E0504 - 4000004A00015400006300027201057C01058000018200008500008400007F00 - 007D01017A02027504026F03026302005700004C00004500003F02003800003B - 03023800003F03033F01014404044000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004000013E00013D01023C00004201033E0000430003 - 4000004100014100014200023F00004201033E00004001033D00003C00013901 - 003A03003700003B04013800003E03013D00004100004600004C01004C000055 - 00005600006103046401036D05067501007A01007F0100800001840001880002 - 8A00028C00038B00028900048600048000047D00047900047800057002046100 - 005A00005600005100004B00004A00004A00014D00015C05096605096D00057B - 03087F00038A01058B00008B0000890000860000860000860000860000860001 - 8301027F03037801026F01016602025E02015302004B01004500004500004C00 - 004E00024900004C01034600004D03034E000057000068060672060576000080 - 01038000008700028700008701018001007C01007E00007C0100430000400000 - 4002023A00003C03023C00004401004A00005E04046802037301017B01018000 - 018301018501018301018301027D00027806066800015F02034F00004A000142 - 00004000013D00004001033C00004002023E00003F02003E00004000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000014000013F00004201033E00004201033E000041000240 - 00014000013F00004201033E00004201033E00004100023E0001390100360000 - 3C03023C00004301024100004600024700014700014400004500053F00014000 - 053800013A01043501013202013000003403013200003D04023C00004502004A - 00005000005800006301016A0203730205770205790102780000770500770500 - 7A04007D020080010083000086000086000187000484000582040A7901067303 - 0A6600026000025400004C00004A00004E00005200005800005F00016700066F - 03096F01057201047402027802017B01017D0200820100840100820000850000 - 8700008800018800028800038500057F00047A04096900055A00034800004201 - 033400002F03043100004600005100005500005900005F02016703016E040374 - 04047801027B01017F00018000018200018200018200018200018000017F0001 - 8000017F00014400004703043A00004507073500004606054100004F00006004 - 036A03017301017B01018001008301018301018301018100018205076E00006C - 0A0A4E00004F05053D00003F00023B00024003073A00004706083A0000460606 - 3C00003F02003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00003D01023600003B05043300004307073900004905064100004800024600 - 004902053D000047050A3500003F06093300003402023101003606042D00003E - 09063500004906034600005200005B00006300006D01007601027E0103810003 - 8400018100007A04007705007A04007B03008001008200018400028400028000 - 0580040A6E000172060C5C00005F03084E00004C00034300034400044E000558 - 00026200026D00037600057C00067B00047B00027901017902007902007B0300 - 7F02008002008401008600008701018500028500038000027C00047600036D00 - 056402084C00004C040A34000039070B2800003200004A00005700005E000064 - 01006B02007203017A02027F0303800001820001820001820001800001800001 - 7F00017F00018000018000018000018000014701023D0000490909370000480B - 093900004D06034E00006104036A03017402027B010180010082000083010183 - 0101820104760000790B0D5A00005E0A0C4000004605073B00003E0105360000 - 49080A3900004B090A3900004606053C00004201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073C00003B0302330000430A093500004A0A - 0A3A00004904074100004500033D00004A070A390000460A0B3300003F060735 - 0000390302340000430A083700004D0A09420000560403530000610101690200 - 7202027A02038102038301028600018300007F02007D02007F01008002018101 - 028101028100037E01037D03096C000070060C5500005F050A47000051040846 - 00024200024801045200055E00056700047100047A00047E00057D00027D0002 - 7D01017D02007F01007F02008201008401008802028801038402038001027901 - 027200006A00026200015E00044D00005506094000004F0A0D3A000045050A40 - 00005601006002006502006902006F02007602017C0202800102800001820001 - 8200018200018000018000017F00017F00018000018000018000018000014300 - 004A06073900004A0C0C3700004B0A094200005200006404046D03027601027D - 01018001008200008200008001007D00007F08096500006D0D0D490000510909 - 3A00004004053A000145050A3900004C0B0D3A00004A0A0A3900004003013E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004001033A00 - 00410807350000480C0C370000480A0A3900004201033E00004706083900004A - 0B0D370000460A0B3500003E02023C00004707033C0000540D0A4500005C0B08 - 5300006203006904027103037803047D03038202038500028700018600008400 - 008201008200008001008001027E02027A02037702056C00026C07095200005C - 080A4300004E08093B00004503044502014D03035804066403076F0105770004 - 7D00048100038000028000027F00018000018001008200008600008600008902 - 048502057F02047702036C02016000005700004F000049000050060642000055 - 080B4500005D090D4E00005C03066303036804006C0300700301740301790101 - 7E02028101028200018200018200018200018000017F00017D01017D01018000 - 018000018000018000014501023C00004A0A0A3900004C0C0B3C00005106044F - 00006604046F03027801027D01018001008200008001007F01007F02046F0000 - 760B0D5300005B0B0C3E00004807093C00013E01053700004A090B3A00004D0B - 0C3900004707063C00004201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E0000400202370000480A0A350000480C0C35000041080738 - 00003C0302350000460A0A3700004A0C0C390000470707410000490000450000 - 5809064A0000650E0C5500006C0B086801007205037804037D03038103028402 - 028701018700008700008600008500008400018000017D00027801027002046B - 030460000150000059090A4000004D0B0C3700004007063B00004A0300560502 - 6206056B05067502057B00028000028301028200018200018000018000018200 - 018400018700018600018400067C01057502056A02035C02015101004401003F - 00004205013B000050090647000062070A59000074060C6F0004700403700502 - 7304027703027A02027E02028000018200018200018400018200018200018000 - 017F00017D01017D01018000018000018000018000014100004705063900004A - 0A0A3900004E08084600005700006905057103037901027F0001800100820000 - 7F00007C01007600007707075E0000640A094500004D07073B00004105063A00 - 014404093900004B080B3A00004909093A00004003013E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004201033F000046060639000048 - 0A0A330000420A093300003B03023700003F0706350000480A0A3A00004C0809 - 3F00004C00015000005D04005300006A0C075C0000740D0A6B00007708067804 - 037A02028002018102018501018701018800018800018600008300008100007C - 00007400006D01006501015E02014C00004F04023E00004C0C0B350000420A09 - 3000003E01005204006105006B07037205037A02028000018400018500028400 - 018200017F00017F00018000018200018400028000027700037000036600025E - 01024F02004502003A02003602003901004809054200006009075A0000780508 - 79000085050A7902037504027903027A02027E02028101028200018400018400 - 018400018200018000018000017F00017D01017D01017F000180000180000180 - 00014200013D00004606063900004807064100005402015800006C0405750303 - 7C01038000018200008100007F00007A01007601026A00006907075100005004 - 053C00004304063E02033F00043A00004605073A00004806073A00004404033D - 00004100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A000044030540 - 00004400023F00004605073700004108073300003B0504360000380300350000 - 4207053900004C06064300004E02035000006102006200007007046700007609 - 076F00007B08057A03017D02007F010080010082000084000084000087010185 - 01018200017E00017700007100006700005F00005500004E01004700003C0000 - 4407053400004209083400003C04034100005E03006C04007504017A03018001 - 008600008700008802028200017F00017B00027901027901027901027B000478 - 00046600005D00005700015000014701013F02003902003801003C0200410000 - 5B0A075C00007606067500008B02068800037F00017B01017D01017F00018000 - 018200018500028700028600018400018200018000018000017F00017D01017D - 01017F00018000018000018000014100004200013E00004301024100004B0101 - 5000005C00007003057902038001038200018200008100007E00007A01007000 - 006B04025D00005502004600004201003E00014004053E00034100043F000043 - 00033F00004202023D00003E01004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004100014300014400023F00004001033800003B0302 - 3600003701003902003B02003E00004502014700005000005000005900006D03 - 027605037401007B06037700007D04027C01008002018001007F00007F00007F - 00007F00008001008102017F03037801027301016D00026600015C0000520000 - 4A00004500003F00003D03003700003C03013700003E02023E00004C01006703 - 007804007C04008103008500008800008700008602027F000179010174020270 - 02027002047002047002046B02055500004E00004900004700004201003F0200 - 3E01004001004000005103005F0400710A077802018402038700008900018100 - 007F00007F000082000184000186000187000287000286000184000182000180 - 00018000017F00017D01017D01017F0001800001800001800001420202410101 - 4404044000004701014A00005901016300027002047901028000028400018400 - 008200007F01007902007103036400005B01004E00004A02023F00003D01023A - 00003E00033F00024300034100004301023E00003F02003E01004000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000014000013F00004201033E00004201033E000041000240 - 00014000013F00004201033E00004201033E0000410002410001440002420000 - 4300033E00003E02023800003B02003900004005034202014400004700004E00 - 005600005E01026804047403017B02007D02007D02007F010080010080010082 - 00008001007F00007E00007C01007B02007A03017A02027605036D0506640202 - 6103045400005000004500004502003F02003C01003900003C03013A00004202 - 013F00004400015100006F03007D010080000084000087000088000088000281 - 01027901027101016F07086503036706085F00005F00005600004C0103430102 - 4400014300004200004500004700004D00005D06046405026D03027403017B01 - 0182000086000087000084000184000184000186000186000186000186000186 - 00018400018400018200018000018000017F00017D01017D01017F0001800001 - 8000018000014000004606063C00004907084000005404055600006801047401 - 047D00028200028400018400008200007F01007803006C02016506034F000053 - 06033F00004707063800003B01023D00024402073B00004A05083A0000460606 - 3A00003D02003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004200024200004702053B00004805083900004305053900004000004502 - 014801004C00005000005A00006000006703037004037B010180010080010082 - 00008200008200008400008200007E00007C01007C03017A0502750402720301 - 6E01006601005F02035B08074B00005207053E00004607033B00003D05003900 - 003E05033600004707063C00004D050545000056000074060281040085020087 - 01018700008600008100007A00017202026E08095C0000620A0A5100005A0608 - 5100004E00014100003C00004000004600004B00005200005900006000006B04 - 027002027602017B01017F010080010082010084000086000186000186000186 - 00018700018600018600018400018400018200018200018000017F00017F0001 - 7D01017F00018000018000018000018000014103033A00004B0B0B3C00005309 - 094900006305066900017800047F00028400028600018400008200007D020076 - 03006B06045800005B08064300004E0B0A3700004206073800004000053A0000 - 4A070A3C00004B090A3900004407053A00004201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073E00004401063C00004A070A3A00004C08 - 093C00004903034500004D00005200005800005F00006600016C020171030379 - 05047F01008200008200008400008400008400008200018000017D0000790101 - 7804037205036E04036702006000005700005404034400004F09093A00004909 - 083500004108063A01003C0301360000470A083A000051090943000052040553 - 00006F04017A03018103028303048402038201047B00027300036F07085C0000 - 610B0B47000057090A4300005104074700003E00003C00004300004C00015700 - 036201036D02057502057901027D00027F00018000017F01007F01007D02007F - 0100840001870001870001870001860001860001860001840001840001820001 - 8200018000017F00017F00017F00017F00018000018000018000018000013C00 - 00460808390000500C0D4300005C080A5900007002067B000482000286000287 - 00018600008200007D0200740300650100600905470000550C083A0000480D0B - 3400003C02033C000147050A3A00004F0A0D3A00004A0A0A3700003E03013E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004201033E00 - 0147050A3A00004F0A0D3E00005207094500005200005900005D00006501016B - 01007202027703027903027D0303800100840000840000840000840000820001 - 8000017F00017B01017702036F03026903046101015A00005300004C00004400 - 00480706390000490C0A350000460B093400003E05033A00004508063900004F - 0C0B4000005309094300005300006100006A00007000007702037B0307790407 - 7204066D04075F0102600A0A450000560C0C42000051080A4200004A01034400 - 004700004E000159010165020470030579040781030880000284000284000182 - 00018001007F01007B02007D0200840001870001870001860001860001840001 - 8400018200018200018200018000018000017F00017F00017F00017F00018000 - 018000018000018000013E02023800004C0C0C3C0000560A0B4C00006906086D - 00027D00048400028700028900018600008200007D0200720400670603500000 - 570A074000004D0D0C3500004208093800004000053900004B080B3C00004D0B - 0C3900004508063A00004201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083C00004101063700004A090B3C0000550A0C4700005C030658 - 00006601036C01037201047702037A02037E02027F00017F0000820001820001 - 8200018200018200018000027F00027B00027803046F02046501015C00005300 - 004E0000480000450000430201390000470909370000490B0B3700004507073D - 00004202013900004B0A093C0000510B0B3E00004C06064800004F0000570000 - 5D00006402026803056803056502046002065801044A0000560B0D400000560B - 0D4200005104074B00005600005B01006100026701027002047702037F020483 - 02058400028600028600018400018200017F00017D01017F0001840001860001 - 8600018400018400018400018400018200018200018000018000018000018000 - 018000018000018000018000018000018000018000013A000044060639000050 - 0A0B4300005D06095F00007403077D0004860002890002890001860000800100 - 7D02007204006001005A08034300004F0B06370000450C0A3500003D03043C00 - 014604093C00004D080B3A00004909093800003E03013E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A000040010338000140050939000050 - 090C4500005F080C5A00006900037001057702057C0103800102810102820001 - 8100008100008200018200018200018200018000027F00027B00027801027002 - 046701025C00005000004800004300004000004002023D00004505053900004A - 0A0A3A00004A08093C00004301023F00004706053C00004B0A093A00004A0908 - 3A00004302014401004800004D01025101025600025500015400015100004A00 - 004F0406400000530A0C42000057080B4C00005A00026802036E020171000374 - 02027801027C0103800103830003840002840002840001840001820001800001 - 8000018000018400018400018400018400018400018200018200018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00013D01013A00004707073F00005305065100006A03067300047F0004870002 - 8B00028B00018600008001007D02007204006104014F00004F06023C00004609 - 073600003F06073A00013F00043C00004904073C00004806073A00004205033B - 00004100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053D - 000039000335000045060841000059080B5700006C050A6E00037800057D0004 - 8200028400018600018600008701018501018200018000018000028000027F00 - 027D00027900047401046800006000005500004B00004300003D00003A02013C - 02034201033E00004A05083D00004D07084000004B02044300004600013F0000 - 4706053900004508063600003E05033601003704023903023E02024200014800 - 014900004900004900004A00024300004C03054200005405084D00005C050963 - 00047800047F00017F00027F00017F00017F00017F0002800002800002800002 - 8200028200028400028400028400028400028400018400018400018200018200 - 018000018000017F00017F00017F00017F00017F000180000180000180000180 - 00018000018000018000018000013E00003F01013F0000460203480000590003 - 6700017901068400048900028900028700018400008001007D02007203015C03 - 004E04004500004303003D00004005033B02013E02034000014200023F000043 - 01023F00004202023D00003E01004000004101013E00004202023E0000420202 - 3F00004000004000014101013E00004202023E00004202023F00004000004100 - 014200013E00004202023E00004001033D00003C00013E00013F00023C000042 - 01033F00004300034200004100013E00004200014600005404055A0002690406 - 7201057B02067E00028200008500008800008900008800018901028703037F00 - 017B00027B00047900047601047201046F02046902055800005200004D000047 - 00004200013D01013A02013900013F0002430204410001470205420000480203 - 4500004700004700004600014100004202023C00003E02023800003502003002 - 013002013301013900014000014400024900024D00034B00014D00014B000052 - 00005300006100026702047406087E0001850000840001820001800001800001 - 8001038001037F00027F00028000028200028400028400028600028600028400 - 018200018200018200018000018000017F00017F00017F00017F00017F00017F - 00018000018000018000018000017F00017F00017F00017F0001460001400000 - 3F03033B00004701015200006E00047F00058900048D00028700028200017F01 - 007D02008001007403015100004200004303003F00004202013E000041010040 - 00004100004000004301023E00004202013C00003F02003E01004000003F0000 - 4301023F00004301023F00004200014100004100004000004301023F00004202 - 023E00003F01014000004300004200004301023E00004002023800003A020137 - 01003C03043A01023F03043E00004500034500004B00054A00004D0000540000 - 5E02016703017004037902037F00028500008900018D00008C00008A00008800 - 008700008502008203027800047100047304086C01046805075B00005400004B - 00004A00004400004502013E00004003013C00003D02003A0100390100380000 - 3C03023A00004202023F00004600024700014700014600004700034100004300 - 033E00004100023A00013503053001033604043800004103034200004C000150 - 00005600005D00006600016E02017503037903027B01017E0000800001820001 - 8200018000018000018000018000018000018000018000018000018000018200 - 0182000182000182000182000180000180000180000180000180000180000180 - 00018000018000018000018000018000018000018000017F00017D00027B0002 - 7B00027B00024600004703043500004108073C00005804066C00008400078D00 - 048F00028600028000017B02007B02008200007602014F00004404033A000047 - 07063A00004706053D00004201004000004504033A0000470706370000440705 - 3A00003F02003F00004404033B00004807063A00004706053F00004201004000 - 004504033B00004707063900004407053A00004101004200004903033B000047 - 07063500004007053300003802013701013E0405380000480508400000530308 - 4C00005700045B00006100006902007203017A02028101028600008A00008D00 - 008F00008D00008900008600008302008102017C020272010571050B62000067 - 060A510000570406460000470101400000420503360000430806370000440705 - 3C00003F02003900003D05043400004307073700004606063F00004400024400 - 004902053F00004A040A3A00004704093C00003D00043700033B060933000042 - 08093A00004D05054A00005600005E0000660000700000790101800201830101 - 8601008500008200018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000017F00027D00027F00027D00024900023E0000430A093300004D0A - 094A00007504088100048D00048F00028600028000017B02007B020082000076 - 02015200003B00004A09083A00004B0A093A00004706053F00004302013B0000 - 490908390000480B093700004407053C00004202013B00004A09083A00004B0A - 093A00004706053F00004302013A0000490908370000480B093500004207053C - 00004301023D00004A0809390000460A0A3300004007063800003D0101390000 - 4B070842000059080B4B00005F050A5D00006501006B03007004007704017F04 - 028301018700008800008B00018900018901038602028102037C030179010173 - 01017305096300016A060B5200005B0407450000500606440100420201380000 - 450A08350000480B093900004706053F00004301023A00004A08093900004B09 - 0A3A00004704073F00004201033A000049080A37000048090B3500004206073A - 00003D030437000048090B3A000052090B4500005805045900006501016B0100 - 7402027A02028103028301018401008300008200018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018200018600028600028700028600024500 - 004A0607330000460D0C3C00005D090B6700008501088D00048D000286000280 - 00017B02007D02008200007602014F00004807063A00004D0C0B3A00004B0A09 - 3A00004302013F00004807063900004C0C0B370000480B093700004202013F00 - 004807063A00004D0C0B3A00004B0A093A00004202013E000045080637000048 - 0D0B350000460B093500004003013F00004806073900004C0C0C370000480A0A - 3700004202023C00004C04044300005C090B4E0000690B0C5E00006B05066F04 - 017504017A05027D040282030285010186000087000087000185000284020380 - 03057B04057303036E00006A000165000268070B5200005F0609490000520607 - 3F00004605043E0000450806350000480D0B3900004A0A093A00004502014500 - 004E05073E00004F0B0C3C00004B090A3900004001033A000043070833000046 - 0C0D330000440A0B3300004001033D00004B0407420000570A0D470000610A0D - 5700006604046B03047103037804037B03038103028102018401008400008200 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018200018900 - 018B00018B00028B00014A01033D0000450C0B3300004C0B0A4A00007305097E - 00038B00048D00028600027F00017B02007D02008200007802015500003C0000 - 4D0A093C00004F0C0B3C00004807063F00004202013900004A0A093900004C0C - 0B3900004707063E00004302013C00004D0A093C00004D0C0B3A00004707063C - 0000400301350000460B09350000480D0B3300004108063A0000420103390000 - 4A090B3900004C0C0C3A00004A07064300004C00014700005E0808520000700B - 0D5F000076090B7301017B04027F040081040082040086020285010186000184 - 00018200028001037B03047704076F04066802036000005D00005E0004500000 - 5E070A49000055090A4000004906053E0000400301350000460B093500004C0C - 0B3900004807064300004C000245000054070A4000004F0B0C39000045070738 - 00003B0302300000410B0A300000450D0C3300004108073F00004B00004A0000 - 5D060A4E00006A0C10590000700B0D6B03047204067604047A04037D03037F04 - 0281020182000082000080000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018200018900018B00008B00018B000045000049050633000044 - 0B0A3A00005A07096700008201088900048B00028400027F00017B02007D0200 - 8200007802015100004B05053E00004D0A093C00004C09083B00004302013E00 - 004606053900004A0A093900004909083A00004302014100004906053C00004D - 0A093A00004909083800003E03013A0000420705350000460B09330000430A08 - 3400003E02023C00004604093900004B080B3C00004E08094300004E00015200 - 00600605570000700B096400007C0A0A73000081050582040085020085020085 - 02008701018501018301028101027D00027901057103056A03066302045C0104 - 5500015100004E0000560305450000560A0B4000004C09083A00003F02003A00 - 00420705350000480B093900004909083B00004701014A000054030643000051 - 080A3C00004709093400003B03023500003B0806300000430B0A350000470909 - 3A00004B00025200006400055800006F090E5E0000750C0F6D000278070A7604 - 047902037A02027C02027E030180020181020181020180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000182000186000086000087000086 - 00004B00024000004007063200004606054A00006E03067C0004870004890002 - 8200027D01017B02007D02008200007802015600004300004D05053E00004A07 - 063D00004504034000004101003C00004407053700004707063A000044040340 - 00004401004100004906053C00004807063A00004205033B00003D0200360000 - 4007053300004308063600004005033B00003F00023C00004704093C00004E05 - 074400005401035400006305066400007408076C00007E080777000085060584 - 01008700008701008700008700008600008200008001027C0103770205700305 - 6702045F01055700034E00024A00014700004A00004500004D05053F00004B08 - 073B00004306043B00003D02003800004407053700004707063A000045040344 - 00004B00014800004F03073C00004707073600003D0504360000380300330000 - 4007053700004A07064100004D03035000006801066A00007405096B00007908 - 0C7000007C070A7901057901027901027B01017D01017F00017F000180020181 - 0201800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00017F01007D02007F01007D02004900004501023900003B03023D0000510102 - 6700017C00068700048900028200027D01017B02007D02008200007901015700 - 004A00004700004901014300004502014000004000004000004101003C000040 - 03013E00004202013F00004100004300004600004100004302013F0000400301 - 3D00003C01003A01003B02003800003E03013A00004003013D00004000004100 - 014400044300014B00034A00005300015600005C00006C06077406067602017E - 05037D00008403008500008902008901008800008800008500008100007F0001 - 7A02037603067104066803055D02055400044C00024600024100014000014400 - 014701014100004302013E00004104023D02004005033C01003D02003C000040 - 03013E00004202014000004300004700014800024100004201033A00003C0302 - 3600003701003902003D02003F00004901014A00005300005400005E00007403 - 077D03097900057D04087800037D02067A00037B00027D00027C00017C00007C - 00007E00007F0001800201810302800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000017F00017B0200790200790200790200490000430000 - 3E05043800004205034D00006902057A00068600048700028000027D01017B02 - 007D02008400007B01015F02034E00014C00014600004701014100004302013F - 00004000003D00004003013C00004202013E0000420100410000430000440000 - 4502013F00004302013C00003F02003C01003D02003B00003F04023D00004404 - 034000004403024400014801044900034900004C00005300005C00026502046D - 05066F01037500017A00008001008400008702008A01008A0200890000860000 - 8500008100007F00017A02027503036F04065E00005600005200014700004500 - 033E00013D00043C00014000004000004202013C00004003013A00003D02003C - 01003C01003B00004003013C00004202013E00004201004100004100023D0000 - 3F03043900003D05043800003C05023B02004303024701014B00005100005900 - 006100006A01047403067B000480000480000480000480000480000280000280 - 00027F00027F00017F00017F00017F00017F00017F00017F0001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018000018000018000017F00017F04027D0402 - 7C03017B02004800004804053600004109083800005406076300007A02078400 - 048600027F00027B01017902007D02008400007B010161000255050646000050 - 04054000004906053D00004101003D0000420503380000450806390000460605 - 3D00004401004400004903033D00004807063900004407053800003D02003B00 - 004205033B00004807063D00004C06064400004B01014B00004E000052000158 - 00025F00046601036D02047303037700017A00007E0000820000860100880100 - 8A02008801008400008100008101027F03037903027202026901026300025600 - 005401034400004A06073900004205093500003A01023B000042050338000045 - 08063500004207053800003D02003B0000400503380000450806390000460605 - 3D00004101013900003B05053400004007083300004108073B00004302014600 - 004E00005800006100006A00017000027601047C010382000484000284000484 - 00028400028200028200028200028200018000018000017F00017F00017F0001 - 7F00017F00018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000017D00007E00007F00018002014C0002400000440B0A320000490C - 0A4400006B06087400038200048400027F00027B01017902007D02008400007D - 01016603054F00005707084500005309093E00004706053E0000400301360000 - 450A083700004A0A093900004706054100004701013F00004C09083A00004A0A - 093700004207053A00004104023B00004A09083E00005309094300005404054E - 00004F00005400005C00026302046B04077104067502057901027C00017E0000 - 8200008400008401008601008702008502007D00007901017A03047404047004 - 036701025C00005500005200014400004E0809390000460A0B3300003F060937 - 00003E0202360000450A08350000460B093500004407053C0000400301380000 - 4909083900004A0A093900004706053C00003A04042E00003E0A0A300000440B - 0A3900004B05054800004D00005800006400006F01037803067D020480010382 - 0001860002860001860002860001860001840001840001820001820001800001 - 8000018000018000018000017F00017F00018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018200018300008500008500018500004800 - 004D0708330000440E0D350000550B0B5C00007802078000048200027D000279 - 01017902007D02008400007D01016400015E070A490000580A0B420000500A0A - 3B00004104023C0000430806350000480D0B3900004A0A093C00004502014300 - 004A07063A00004C0C0B390000480B093500004003013E00004807063E000055 - 0B0B4500005B080A4D00005A00025A00006000006701026E0305750407780304 - 7C01037F00018000018200018400008200008201008201008002007D02007601 - 027103056D02046902056100025A00005100004A00004700004A07063A00004A - 0C0C350000440A0B3200003C02033A0000430806350000480D0B370000480B09 - 3700004003013C00004508063900004C0C0B3900004A0A093A00004002023300 - 003A080A300000460C0D39000052090B4800005800025C000065000070000279 - 0203800305820203830102840001860001860001860001840001860001840001 - 8400018400018200018200018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018200018400 - 028400028500038300014D00033F0000460D0C300000480D0B42000068050770 - 00017F00048200027D00027901017902007B02008400007D0101690406530000 - 5D090B470000560C0C3E00004908073C0000400301350000460B093500004C0C - 0B3900004A07064100004502013C00004B0A093900004C0C0B3700004508063C - 00004403023F0000540A0A4700005F0B0D4E00006204085E00006802036C0201 - 7002027402027901027D01018000018400018400018400008400008001007F01 - 007D02007B02007602016D05066403055F01025A00025100004E000048000045 - 0000430102390000480A0A350000480C0C3500004307073A0000400301370000 - 480B093700004C0C0B3900004707063E00004202013900004A0A093900004C0C - 0B3900004707063C00003C0304310000470B0C3A0000570C0E4A000062040861 - 00006E00047300037900047D00027F0002800001800001820000820000840000 - 8400008200008400008200008200018200018200018200018200018200018200 - 0182000182000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000017F00027A00017900027C00047C01054900004C060733000041 - 0B0A3500005008085900007300047F00048000027B00027901017803007B0200 - 8400007D010166000260070A4A000059090A430000500A0A3D00004104023A00 - 00420705350000460B093900004909083D00004502014100004906053A00004A - 0A09390000470A083800004202014100004D05054500005D090B50000067080C - 5E00006B02057305057605027802017900007D00008000008500008700018701 - 018701018200008001007B02007902007502006E02016204055902065300024D - 00004700004300004100004202023C0000420606350000460A0A350000470909 - 3A00004202023C00004407053900004A0A093900004909083A00004202013E00 - 004606053900004A0A093900004909083A00004002023A00004205093A000055 - 090D4A000067070D6300007201057B03087D02067F00027D00007D00007D0000 - 7C01007F01008001008001008001008001008200008200008200018200018200 - 0182000182000182000182000182000182000182000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000017B00027100046C01046D00056A - 00024C00024200004108073000004007054100006201036D00007D0004800002 - 7B00027901017803007B02008400007F00016C03065800005B04074800005206 - 074400004706053E01003D02003600004207053500004707063A000047040342 - 00004401003F0000470605390000470706380000440403400000450000450000 - 5505064F000065070B5F000070060C6F01057703027903007C01007E00008200 - 008400008800008900008800018701018301027F000179010175010071020068 - 03015600034E00034A00014600004100003F00003D01023C02033B0201360000 - 4207053500004508063A00004504034000004101003C00004706053A00004807 - 063B00004504034000004201003D00004706053A00004707063A00004205033D - 00004000013F00005004084C000065070C62000177050C7900057E0006800004 - 7F00017E00007B00007700007702007902007D02007F02007F01007F01008001 - 0080010080010080010080000180000182000182000182000182000182000282 - 0002800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000178 - 01026201035602045600035200004A00004802033B00003B0401380000460100 - 5A00006C00017900047F00027D01017B01017B02007D02008200007D01016F01 - 036502045900005400024800004805043F02003C03013A01003B02003A000040 - 02023E00004301024000004100004000004101013E00004202013F0000430201 - 4400004900004C00005200005600006201036500017204087302067A05087800 - 007B00007F01008100008601008700008900008700018700028101027C010376 - 01026F03026802036503035C04044800004400004200004100004100023F0101 - 3D01023C00003C00003D01013C00004202013F00004502014400004300003E01 - 003D02003C00004202013F000043020142000045000045000044010043000045 - 02014100004303003F00004300004A000052000156000062010567000375030A - 7901068103097C00017E00007F00007F00007D02007902007803007902007D02 - 007F01007F01007F01007F01007F010080010080010080000180000182000182 - 0001820001820001820002820002820001800001800001800001800001800001 - 8000018000018000017F00018000018000018000018000018000018001007F01 - 007F01007F01008001008001008001008000018000017F00017F00017D01017D - 00027B00027901027901026F02044F00004600004800014A01034B0002450000 - 4303023C00004104024400005401005F00007302057D02048202038301027E00 - 007C01007C03017C04047800037502056B04075100004600003A000039060333 - 03003701003900004201033F00004300033F00004100043C0003380000360000 - 3E04054000004802024600005000005500006605026B04027002027402027900 - 047B00047F00047F000481020382030284020285010186000086000085000081 - 000183030879010672040A6200035902054B00004800013F00004100003F0000 - 4202023E00004202023F00004200014100004300004200004502014300004701 - 014300004800004100003901003500003C04033B00004404044300004802024A - 00004900004A00004B00004A00004700004400004200004A0000680404720104 - 7401047402027801027901027B00027B00027D00027F00017F00017F00017F00 - 017F00017D01017F00017F000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001820001820002820002 - 8200018200018000018000017F00017F00017F01007D02007F01007F01007F01 - 007F01007F01007F02007E04007C04007D03007F03008002007F01007F00007E - 00007D01017B00027D06077502057305076800006300005600004D0003430003 - 4100013E00004700004A04053C00004707063900004906034B00005C00006F03 - 027B03048202038500028200007C01007904017A04037C000081060A6700005E - 04033E00004008033101003405013401003E05043A00004A040A3C0000470409 - 3C00003D00053600023C06063800004806074300005603015600006502006F04 - 017602017901017F000180000282000284000484000282020381020182000081 - 000083000083000182000480000578000774060C5F00015F080C460000480508 - 3600003900013B00004205033800004707063A00004706053F00004600004400 - 004903033F00004C06063E00004B05054100004201003A00003D050435000044 - 08083800004707073E00004701014902004A00004900004A00004D0000500000 - 5201005D00007601027F00017F00017D01017D01017D01017D01017D01017D01 - 017D01017F00017F000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018200028400028200018200018000018000017F00017F00017F01 - 007F01007F01007F01007F01007F01008002007F02008004008004007F030080 - 02008002008002007F01007D01017901027B06076A00007008095C0000620405 - 5400005200024000003D00003F00004302044903043F0000490909370000480B - 093C00005306045700006C02017902038102038301028001007E00007A03017B - 0303800103760000770A0C5000005208063500003C0906320200390302340000 - 49080A3A00004D070D3A000046030A3C00024003073B00004E0A0B4200005A08 - 075000006908056B02007403017902007D010180000182000284000286000284 - 00028101027F01007E00007D00007E00017F00027F01067B0307720007610000 - 66080D4A000055090D3A00004005093800004002023A00004909083900004B0A - 093A00004706054100004502013D00004C09083C00004D0A093C000047060541 - 00004701024000004C0809390000460B093300003E0704370000400300410100 - 4700004E00005600006000006901027202027B00028000018000017F00017F00 - 017F00017F00017F00017F00017F00017F00017F000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018200018200018200018200018000 - 0180000180000180000180000180000180010080010080010080010082000082 - 01008402008601008702008502008302008102017E03017A0202780606690000 - 6E070A5500006106094A00005703074B00014702054201034000013D00004000 - 004907083700004A0C0C3700004C0B0A4500005901016701027402027E010381 - 01028000017E00007B02007D04027D00008207096400006A0D0C4300004A0B07 - 3300003B06033700004307073900004D0A0D3C00004B080D3900004200054100 - 00500709450000610E0D5200006D0C096600007807047902007D020080000182 - 00018400028400028600028200027F00017B02007B0101790101790102760102 - 7300036E00046100006304084C00005A0B0E4000004B0A0C3600003F03043C00 - 004707063900004C0C0B3A00004B0A093A00004202013E00004707063900004C - 0C0B3900004A0A093700004302014900005304074200004E0A0B370000430A08 - 3200003B04013C02004200004C00005700006400006F00017900047F02048000 - 018000018000018000018000017F00018000017F00018000017F00017F00017F - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0182000182000182000180000180000180000180000182000182000182000082 - 00008400008400008400008600008900008900008800018701018301017E0202 - 7903027303036A00016A07095200005E070A4700005306094100004903043E00 - 003E0000400001430204440404390000470B0B3500004A0D0B3A000051070552 - 00006400006E00007A02038001028000018000017F0100800201830205760000 - 7A0C0C5600005F0E0B3E00004508063A01003C03023500004A090B3A00004D0A - 0F3A000047050A4100014C00004C0000650C0F56000075100E6400007B0A0877 - 00007F01008201008400008400008600018600018400028200027A0000780201 - 7803047604047103056B00026200005C00005A00024B000057080B4200004F0A - 0D39000045050A3C00004202023A00004B0A093A00004C0C0B3900004707063C - 0000400301370000460B09350000480D0B3500004308063E00004E0104480000 - 5408093E00004C0B0A3900004508043F00004300004C00005A00006501017201 - 047B000483000384000282000182000182000182000182000180000182000180 - 00018200018000018000018000018000018000017F00017F0001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000182000182000182000182 - 00018400018400018400018400018600018600018600018700018C00018C0001 - 8700018400017F00017700016F01036801045E00014E000059090A420000510B - 0C3A00004605073B00004302044201034000013D00003C000043070733000044 - 0B0A3500004A09084500005502015F00006A00017601027F0204810102820001 - 8001008101028100008205076A0000720E0C4D00005208043D00004306043C00 - 004406063900004B080B3A00004A070C3A00004900034E00006204055D000078 - 10116800007F0C09740000810201840100860100860000860000840001840001 - 8200027F00027700017402027103036E04036703035D00005400004D00004A00 - 004F05053E00004D090A3A000049080A3B00004302043F00004706053A00004B - 0A09390000470A083800003E03013A0000400705330000440B09330000430A08 - 3400004003014500005005074200005008084200005309094900005604035500 - 005E00006901027302057B020681010684000282000084000182000182000182 - 0001820001820001820001820001820001820001820001800001800001800001 - 7F00017F00018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000017F00017F000180000180 - 0001820001820001840001840001840001840001860001860001860001860001 - 8600028700028800038700038200027C00037400026C00016400015A00004C00 - 004E04043E00004C0C0C37000045090A3300003A00013A00003E000040000143 - 02043D03043700003F06073300004307073B00004C04044E00005B0000660001 - 7202027B03048001028200018400018400018503047800007B0607650000660A - 094A00004C02004502004101003C00004606063900004706083A000045020748 - 00005A00006200007407096C00007F0908770000830403820000870000870000 - 8600008400008200018000017F00027B00027301016B00026600015F00005900 - 005200004C00004600004502013D00004707073800004706083B000044030540 - 00004200013F00004706053A00004707063800004005033900003B0200350000 - 3F08053200004009063300003E05033900003F04023D00004906054200005906 - 055600006A05076D00037100017600027B00047E00058102048001037E00017D - 0000820001820001820001820001840001840001840001840001840001820001 - 8200018200018000018000017F00017F00018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00017F00017D01017F0001800001820001820001840001840001860002860002 - 8600028600028400028400028400048200048101067A01057601046E00036500 - 015C00005300004C00004500003B000042060734000041080B3400003C030638 - 00014304064302044100023D00003A01023C03043800003D03043A0000430303 - 4500004E00015400006000006D02047604047C01038000018400018600018301 - 027D01017500007307066400005800004B00004B04014300004101003E000042 - 02023E00004201034000024A00015E00006D00026E0000790302760000800100 - 8200008702008700008700008400008200017F00017D00027901027601046C01 - 036501015D00005300004E00004900004502014404033D02003D040239000040 - 04043D00004302044000004200014300004401003F00004202013E00003E0301 - 3B00003A01003902003A03003800003C03013800003E03013B00003C01003B02 - 004003014300005000015800006A01047400037F010784000687000587000584 - 00027F00017E00017C00017D00027F0001800001800001820001820001840001 - 8600018600018400018400018400018200018200018000017F00017F00018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000017F00017F00017D01017F00017F0001800001820001 - 8400018400018400028400028400028200028200048000047F00047900047203 - 076A03066502045E00045500014E00004500003E00003B00003A020136000039 - 03033400003B02053900033C01053B00003E0000400001430204370003380002 - 3B02033800003E02023E00004401004900005100005A00006301016F03027902 - 038001038500008400008200017F00017A02027403016B010061000054000049 - 00004901014100004303033C00004302043F00004401044B00016502046F0103 - 7200007600007B00007F00008401008601008802028300008202037B00007C04 - 057601047605087005086000005800005700014E00004C00014100003F02003A - 01003901003600003B03023800003E02033E0000420002430000430000420000 - 4302013E00004202013A00003D02003A01003B02003A01004005033E01004205 - 033F00004201004000004101004300004B00005800006500027200037C000384 - 00048A00058C00058C00038700028400027F00007C00007A00008004047F0303 - 8001028000018200018400018700028700028600018400018400018200018200 - 018000017F00017F000180000180000180000180000180000180000180000180 - 00018000018000018000018000018000018000018000017F00017E00007C0100 - 7E00007F00018000018101028300038300038300057E00028100057B00007C00 - 067700037B03087203075A00004F00004E00014700004701023F00003F010139 - 00003C03043802023B05053500003B02033700003B0002390000430204420103 - 4000013D00003600023D04073400004307083700004606063F00004800004B00 - 005300005E02016802037503037D00028500008600008200017F00017E020279 - 03027101016700005B00005000004A00004805043B0000450707390000460507 - 3E00004D00036201036D00027000027500017B01017F01008200008200008200 - 008505067500007C07086A000072070A6500016504085800005700034A000051 - 05063E00004606053600003A03003600003B0504310000400807350000460507 - 3D00004400014200004504033B00004707063700004407053800003D02003C01 - 004306043B00004908073F00004D05054600004C00015101005401005B010163 - 00026D00037600057D0004850005870004890002880001860001830000810000 - 7F00007C00007B03037A02027C02027D01018000018200018500028700028600 - 018600018600018400018400018200018000017F000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000017E00007C01007E00007F00018000018101028100038100037D00 - 0281030876000080080D6E000075060A6A00006302064900004504033A000045 - 07073500003F06053400003901003700003D0405340000410708350000440507 - 3C00004100023B00003D00003F00004302043B020533000045080C3700004A09 - 0B3A00004705064100004800004E01005702006303037002027B000284000286 - 00008100008001008001027E02027801027000006500005A0000500301410000 - 490908350000480A0A3900004806074A00005C00006500006B00027202027702 - 037A02027E02027D01017F05057400007C0A0A6300006F0A0C57000060040954 - 00015200024600005207093E00004B090A370000400706370000390302310000 - 420A09330000480A0A3900004705064100004302013B00004A0908390000480B - 093700004407053C00004303023E00004E08084200005608094900005A030659 - 00006702046C01046E00047001057201047502057901057A01057B00007D0000 - 8100018100008300008500008500008100007802017203017602017901017D01 - 0180000183010287000286000186000186000184000184000182000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000017E00007E00008001008001008000 - 018000018001037E01037C01057200007E0A0F660000730C115B00006203074F - 0000430303320000400A09320000420A093300004004043800003F0000390000 - 4806073A00004D090A3E00004D07084500014502054201034000013D00003700 - 0141060A3700004C0A0F3A00004B080B3A00004301024300004800005202015D - 03026C01037901028400028600018100008001008200018101027E0103780102 - 6E01036303034F00004F0805390000480D0B3700004B0B0B3C00004D02045400 - 005D00006601036C040571040674040477020376010273010177090B5F00006E - 0B0D5000005C070B4500004C00034700004E05073E00004D0B0C390000460A0A - 3300003C0302370000410807330000480C0C3900004B090A3A00004301023F00 - 004707063900004C0C0B370000480B093700004202014200004E06064500005C - 090B4E000066070B5800006900057701067C00067A00067A0006790105780004 - 7601047800047800017800017C00007E00008000018400018600018000016F00 - 006B02006F02007403017901017D010180000184000186000187000186000186 - 0001860001840001820001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018001 - 008001008001008001008000017F00017D00027901027500037A090D61000071 - 0D125200005F080C4900004800013800003A0907300000450D0C350000490909 - 3C0000460001460000500306430000560A0B430000540A0A4500004B02043E00 - 003E00004000014302043C00063500004A080D3A00004F0A0D3C00004806073E - 00004000004201004B01005702006701027601048200028700028100007F0000 - 8400008501018301027E02027303036905055502014200004B0B0A350000480C - 0C3700004B07084600004D00005200005B01016104036905056C04056F02046E - 01036F0406610000690A0E4C000058080D4000004603083B00004300033A0000 - 4A090B3900004A0B0D3700004307083A0000400103370000480A0A3900004C0C - 0C3A00004806073F0000420201370000480B093700004A0D0B37000047070641 - 00004A02024600005C080A5200006C080D5D000074040B7100027F0005820004 - 8000048000047E00037C00037A00017A00017901027901027901017A02027C03 - 017C03017E03017904016800006401006902006F02007602017A02027F000182 - 0001860001860001870001860001860001840001820001820001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018001008002008001008001007F00017D01017B000276 - 010475060A6500006B0A0E4E00005A090C4200004A05083C00003C0403320000 - 460B09390000530B0B4300005704065100005D020554000062090C4C00005D0A - 0C4700005204054600004602034201034000013D00003A000242040A3A00004D - 070D3E00004E070A3B00004002023C01003E0100470200510100630101730003 - 8100038700037F00007F00008300008600008600018101027902036C05035300 - 00500604390000460B093500004709093F00004B02044800004B000051010258 - 02025F02036202026501016501016100006305094D000057070C3E000046060C - 3200003A000538000142060735000048090B37000047080A3A00004201033F00 - 004704073A00004B090A3A00004A08093B00004202023C000044070537000048 - 0B093700004909083B00004701014800005703055300006F090E6300007B070E - 7200007E00067E00048100038100038300038300038300038400008200008300 - 038001037C02027802017403006F03006E03006804005C00005E00006401006C - 03007203017903027D0101800001840001860001870001870001860001860001 - 8400018200018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180010083010183020082000080 - 01007F00017D01017800037300036C01046A07094E00005405083E0000450608 - 3400003E05063A00004606053C000055090A4A000063080B5A00006600056700 - 056E070A5C0000690B0C4E00005A07064700004900003F00003E000040000143 - 02043F00053A00004903093E00004E040A3F00004503043D00003900003A0100 - 4202004F02006101017100038000058601047F00007F00008500008600008600 - 008200017901026E040358010046000046070333000043080639000048040545 - 00004300004600004A00005000005500005A00005D00005D00005B0003510000 - 5504073E000045050B31000036030A3200063801043500004005093500004505 - 0A3A00004502054200004600024100004905063C00004806073B00004404043F - 00003F02003800004207053500004508063A00004704034600004E0000520000 - 67060A6600007D091077000385020C7D00037800047800037E00038300038A00 - 018E00019400029400029100028900018200017600006802005E030056030054 - 03005200005800006002006804006F04017504027B0101800001840001860001 - 8700018700018600018600018400018200018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 01008301018302008301018001007F00017C00007700036F0103660002570000 - 5603054000004203053000003706083602024000004500005505065100006706 - 0863000073040872000378040970000373080B5F00006408074F000052030047 - 00004804054302044100023D0000400003410004410000470003430000470003 - 4000003E00003900003C01004101004C01005901016802037501067D02067C00 - 007F00008200008500008700008500007C00017202025F000054010048000044 - 04003E00004303024100004301023F01014101014300004700004C0000510000 - 5500015500015100005000024700004300033A00013802073300073503073900 - 033D01023A00014001033E000143000344000045000147000146000243000045 - 01024100004301024000003E00003C00003B02003A00004003013F0000470101 - 49000050000055000061000069000177060A7A020783050B8000058100067C00 - 037C00017F00018600028900028E00039000038E000389000281000176000068 - 01005C01004F01004501004501004A00005100005D00006902007403017C0202 - 8000018300008400018400018400018400018400018400018600018400017F00 - 027B00027D00027D00027F00027F000180000180000182000182000182000180 - 00018000018001008000018001008301018301018001027B01017601026F0101 - 6802036104035200004C00004400004301023900003B02033501013C02034700 - 005400005900006700036B00007702057800047B02067E03077D040877000374 - 03066400005F03025100004B01014000003E0000400001430204410000400000 - 4301023F00004301023F00004101004000004101004000004603024500005000 - 015000005D02056803057801027F00008300008400008500008500008300017C - 00017705056C05035F03025201004900004000003C00003900003B0203390001 - 3F03043C00004601044400004C01034B00014900004600004701023F00003E02 - 0337000038020239000140000142000045000341000047000343000046000245 - 00014600024400004700034100004500054100004400043D00003D0504390302 - 3B00004000004800005200005F01026902057001057401047800047900047B00 - 027B00027B00027F00028600018800008600008500008200018001037A020374 - 03066D04076201035C03064D00004901013F00004002023F01014502014E0100 - 5D00006D00018000028B00038E00028D00008700008200007F01007D02007F00 - 018200018700028400027800047201057401047800047B00047D000280000282 - 00028702048601038501018200007F00007E00007D00007E00008202037F0002 - 7901056A00006202025000004A00003E00003A01003A03003A03003B02003E00 - 003F00004200004800005C04046802037101017901027F00018001027C02027C - 02027D01017E00008300018000047901056A0104540002460000440104420103 - 4000013D00004200004504033B00004707063900004606053C00004101004000 - 004605043E00004C06064200005105064B000060060675030380000182000183 - 00008600008600008500018100017F02047601026901025D0100520100470000 - 3F01003800003900013E050834000043060A3700004704094000004601044200 - 004702053B00004707073700004206063600003D01014200004B02043F00004C - 06073E00004B05063F00004400024200004702053D00004A040A3C0000480208 - 3E00004100013C03023D01014100004900005400006000016C01047702057B00 - 047D00027F00027F00027D01017B01017901017F00018700008C000088000184 - 02027C02027402026901026101015B02055808094600004B0708370000420607 - 3700003D03043E02034901015B00016D00018400049100039300028F00008700 - 008001007902007803007D010180000187000286000478000572010574000578 - 00057B00047F00048200028400028500028500028400018200007F01007D0200 - 7D02007B02007700027703086500006507084C00004C07043800003503003405 - 013404003601003A00004200004A00005200025A00026503036F01017A000082 - 00018600008301017E03017C03017D02008100008800018700028000066E0004 - 5600034600003C00003D00003F00004302044302013B00004A09083900004A0A - 093700004407053C00004202013C00004D0A093E000051090942000053070859 - 01017103037E02028001028200018600028500018500018300017F0002780102 - 6E02016403005902004E010047000040000042040438000045090A3700004A09 - 0B3900004805084100014300033A0000490909370000480A0A3500004206063A - 00004202023B00004A08093A00004A0A0A3900004605073E00004401043C0000 - 4A070A3A00004C070A3C00004902054100004600014A00004F00005800026300 - 046C01047701067E03078000048200028200028200018000017F00017B02007D - 02008200008400008202037D03037702036D0100620000590000570305490000 - 51080A3C000049080A35000043060A3A00013C02034201005500016800017F00 - 048B00038E00028B00008400007D02007803007603007B01017F000186000286 - 00027F00047B00047D00047F0004800004820004840002840002830001810000 - 8000018001027C02027A03017903027203016B00035C000065070B4A00005509 - 0A3C00004407053800003C04003C02003F00004700004F000057000060010568 - 03056A02037101017D01018400018600008400007E03017C03017D0200810000 - 8600018600027E00066C01045400034400004502054201034000013D00003F00 - 004707063900004A0D0B370000480B093700004003013B00004808073A000050 - 0D0C3E00005109094500005805046E04037903027C0202800102830003840002 - 8500018300017F00017B00027402026B04026202025902005201004A00004400 - 004906093A00004C0B0D3900004B0A0C3900004203053C000045060835000048 - 0C0C370000480A0A3700004002023C00004507073700004A0C0C350000460A0A - 3500004001033C00004706083A00004F0A0D3E00004E070A4000004B00015300 - 015A00006100046700037001057901057E000584010484000286000286000184 - 00018200017F00017D02007B02007D02007C03017802017403016C0000640000 - 5A00005300004F00005105064000004E0A0B39000048090B3800003E04053802 - 023F02005000016200007800048500028800028600008200007B020078030076 - 03007901017D0101840002860002840002840002840004840004860004860004 - 8600028400027F00017F00027C01037A02027702037203016F01016702005500 - 00570406450000550B0B3E00004B0A093900004303024300004600004E000055 - 00005F00006600016F02047204066F03027402027F0001860001870000840000 - 7D02007B02007D02007F00008600018600027E00066C01045400034400003E00 - 003E00004000014302044202013900004A0A093700004A0D0B3500004308063A - 00003E03013800004C0C0B3A00004F0C0B3E00004D07074F0000670303710101 - 7601027A02037E01038000028400028300018100017F00027A02037303036D03 - 026602005E010057000052020344000052090B3E00004D0B0C37000044080839 - 00003B0302320000440B0A330000480C0C3700004707073E00003E0202350000 - 440B0A330000460D0C3300004108073A00004103033900004D090A3E0000530A - 0C4300005304075100006601036E01037201057702057E000581000386000286 - 00018900028900018700018600018200007F01007D02007902007605036F0401 - 6A00006400005E00005900005200005000004C00014000004E08093C00004B0A - 0C39000047050A3B00003602023B02004A00005D01007100037E020284000183 - 00008001007B02007803007603007901017D01018200028600028B00028B0001 - 8B00028B00028900028700028400028000027F02047902037503037002026B00 - 026601006100005900004A00013900004909093900004C0C0C3A00004C060647 - 00004C00005300005D00006601007002047801027C01037B0002760102780102 - 8200018700018700008600007D02007B02007D02007F00008600018400027C00 - 066A01045300034200004401044201034000013D00003E000046060537000048 - 0B09350000450A083600003E03013900004207053700004B0B0A3A00004B0807 - 3E00005003015D00006700006D01007202027902037E01038000028100018500 - 038100038001037A02037601026F01016B010066020257000058030747000053 - 080A3C00004909093600003D05043500003D0706300000440B0A350000490909 - 3B00004202023C0000400706330000430B0A320000420A093400003E02023C00 - 004705063E000054090B4700005C080C5100006201057401047C010380000581 - 00038500038700028800018A00018900018700018600018200017F01007B0200 - 7902007403006905016203005C00005600005100004E00004C00004B01004400 - 004A04043C00004B090A3A000049080A3B00003E02033802013902004800005B - 01006E01037901018000018100008001007D02007902007902007B01017D0101 - 8200028700028D00019000018F00018D00018900028400028000027B00027904 - 057103036A02036301015D00005800005600004D00003A00003B050533000045 - 09093900004E08094500005401005900006200006D01007503037D0204820203 - 8400017E00007A02037A02038400018900018900008600007C01007801007B02 - 007E00008500018400027C00066A01045300034200003D00003E000040000143 - 02044101003C00004407053700004308063600003E05033900003A0100380000 - 4409073900004707063A00004403024800005200005B00006400006C01037302 - 057A01057F00028200028601048601048301028000017D010179010178020171 - 03036300005600005B02054700004E06063C0000410604370200360301310000 - 3D07063200004506083A00004702054000004100023800004206073300004108 - 073400004004043D00004000004100005105064C000060070A59000067060A6B - 00037D00028600018600028700018900018900018A00028A0002870001840001 - 8000017D01017902007603007403006B04015C01005300005000004D00004800 - 004800004600004502014302013E00004806073B00004906093C00004502053C - 00003901003A01004800005801006C0103790101800001820000820000800100 - 7D02007D02007F00018000018200028700028F00019000008D00008900008600 - 017F00017901027202026E03056503035D00015400004F00004A00004A000043 - 01023900013000003E05063700004A06074400005501035900006600016E0002 - 7801027E02028202038501018600008200007E02027E01038800028B00018B00 - 008500007C01007801007B02007E00008500018200027A00066A010453000342 - 00004603064302044100023D00004000004101003E00004003013A00003E0301 - 3900003A01003800003C03013C01004005033B00004101003F00004500004B00 - 005200005C00006402026D02047502057B000280000287020586010487000283 - 00008100008000018102037C04056900006300005900005600024A0000480202 - 3E01003B04013701003603013500003B03023C00004300034200004300014100 - 014100023E00004001033A00003E02023D00004000004100004A00004F00005D - 02056100026C03066F01077A0207820000870000870000880000890001880002 - 8801038702048000017D01017901017602017003016D05006B04016406014E00 - 0048000048000047000044010042020041010040000041010043030240000045 - 03044000004401044100004000013A01003E01004A00005A00006B0002780201 - 7F00008200008400008400008200008200008200018200018400028600018B00 - 018B00008700008400007D01017802017002026904026205045803014F000047 - 00004200004000004202024004043800003A01043C0000450003480000530001 - 5900006200007403067902037E02028001008300008500008500008400007E02 - 028001038A00028D00018D00008600007E00007801007B02007E000083000182 - 00027A00066A01045300034400003E00003E0000400001430204430201400000 - 4303023C00003F04023B00003D04023B02003A01003900003E03013A00004003 - 013C00004101004300004A00004B00005300005500006501016B00007A050681 - 04068100038500038700028600018600008500008300007F00007B0307700305 - 6700035C00005100004900004100003D00003B04013702003C04033800004102 - 044000004601044600024500014400004500033F00004202023E000042010043 - 00004900004F00005800006300026B00037401047900057F0004870002890001 - 8900018700018500008100007D00007800007C05067303037206056500006403 - 005900005A00004F00004900004000004302013E00004202013C00003D02003C - 01003C00003D00004202023F00004300034100004600024100014002023F0000 - 4C00005500006C01037500008000018300008800018800018800018600008600 - 018300008300018300008500028301018405067A02027606066700005F000053 - 00005200004A00004701013E00004002023900003B02013B00003D0000410000 - 4900015000035A00056302066C03067403077800047B00027F00018001008200 - 008201008201008002007D01018000028900018D00018D00008700007F010079 - 02007C03017F0100830001820002790005690003540003450000440104420103 - 4000013D00004300004605043C00004707063700004207053900003D04023900 - 003E05033600004308063700004407053C00004201004200004B040144000058 - 05045500006D07086D00017D06077E0103830102870002870000870000860000 - 8600008300007D02047601046D00026400005B00005000004800004100003E01 - 004106043500004307073700004704074000004801044800004D01054100004C - 05083C00004705063F00004600004A00005200005D00016701027201047B0004 - 8000048400028700028600008400008200007E00007A00007802017303036D03 - 026E09075D0000630A064F00005805034A00004A000042000042050338000043 - 08063500004207053600003B02003B00004004043A00004707073C0000490407 - 4100004400024100004603024500005E04036100007C08077C00008701018900 - 008B00008800008800008500008300008100017F00017C00007D070670000077 - 0B0A6000006308044F00004D00004500004603003B0000440907340000400706 - 3500004000004900005000005500035D00046600056D02057501067A02067D00 - 027F00027F00018001007F01007F02007D02007D02007D01018000028B00018F - 00018D00008700007F01007902007C03017F01008500018400027B00056B0003 - 5600034700003C00003D00003F00004302044903033F00004C09083A00004A0A - 093700004308063C01003E0301360000450A08350000480B093700004606053E - 00004202013B00004D0707450000600A0A59000071090A7202027A0203800102 - 8200018600008600008601008600008300007F00017901027500016D01006400 - 005B00005000004900004903033D00004909093700004A090B39000048050A43 - 00034C000546000052060A4000004D090A3C0000490605430000490000530000 - 6100026D02047702058001038700038700028600028300017E00007B00007700 - 007402026F05046B07076205045700005E0B09470000560B094000004D060341 - 0000420201380000470909350000460A0A3300004007063800003E0202360000 - 4909093900004D090A3C00004B05064300004501023F0000560607500000700A - 0B6A00008408088300008700008900008A00008800008500008100007E000178 - 00017404046500006F0B09550000630C0A480000500604410000410100370000 - 470A083500004A0D0B3700004505044300005A00026200036600056B00057100 - 067600057A00067E00057F00027F00027F00017F01007D02007B030079030079 - 02007D01018000028B00018F00018D00008600007D02007803007A03017F0100 - 8500018600027F00056F00045B00044A00014702054201034000013D00004600 - 004D07073E00004F0C0B3A00004B0B0A3900004005033A000043080635000048 - 0D0B370000480B093900004003013900004308063A0000540C0C490000650B0B - 5F00007105047601027B01018001008200008401008401008601008401007F00 - 007D01017901027402026D00026400005B00005100004B00004F07073C00004D - 0B0C3900004B0A0C39000045020747000153030A420000510A0D3C00004B090A - 3A00004502014800005201005F02016D03027803048102038700028700018200 - 027F00027D00027801027202026D020465030360030453000057070643000055 - 0D0D3C00004C0B0A3A00004303033E0000450707370000480C0C350000440B0A - 3300003C03023A00004307073700004C0C0C3A00004D090A3E00004501024000 - 004B0505450000610C0A570000790E0B74000085060585000088000088000085 - 00008000017D01017801027002026400006508094E00005E0D0A430000520B08 - 3B00004405013B00004407033900004D0C0B3C0000520B084400005502016801 - 047100047300047600057900057D00048000058000058000028000027F00017F - 00017D01017B02007902007902007B01018000028900018D00018B0000860000 - 7B02007803007A03017F01008600018700028100067100045D00044E00024000 - 003E00004000014302044D0303440000520A0A3E00004F0C0B3A00004808073D - 0000400301370000480B093700004C0C0B3900004807063C00003B0302320000 - 460B093A0000580D0B4A00006508076300007002027602017B02007F01008002 - 008201008402008201008100008001007E02027A02027402026D01006400005C - 000057000349000054090B3E00004C0B0D37000044070B3D0002490005430000 - 51070B3C00004A0C0C3500004308063C00004300004B01005902006703017503 - 037E02028500028600018000027C01057A02067704076E03056601035B000051 - 00004F0102430000500A0B3A00004C0C0C3700004506083C00004300033A0000 - 4B080B3900004A0B0D3500004307083A00003E0203350000480A0A3900004D0B - 0C3A00004A06074100004200013C0000540A0A490000670D0C5C00007A0B097B - 02008001008400008400008102017C02027504027004036905055E04044D0000 - 57090A4000004E0B0A3900004609073B00004205013B00004E09064200005909 - 084C00006309096501017502057C01057C01057E000580000580010380000280 - 00028000028000028000027F00027F00027D01017D01017D01017B0002800002 - 8700018B00018900008400007B02007803007A03017F01008700028900028300 - 067600056100055100034801044201034000013D00004A000051050642000051 - 09093E00004C09083D00004404033E0000440705370000480B09390000490908 - 3B00004003013400003A07053300004B0B0A4000005808075300006201006C02 - 017102007803007B02007D02007F02008103008103008301018301018001027E - 02027901027500016D00026701025A00005C030647000051080A3A000045090A - 3500004003074300014D03093C00004A090B330000400A093100003B04003E01 - 004801005402006103006E01007800008200008200017D000279010578030672 - 04066801045D00005200004A00004700004B05063A000048090B35000045080C - 3700004101064100014904073C00004B080B39000047080A3800003E02033A00 - 004206073700004A0A0A3A00004A08093D00004301023D00004606053E000056 - 0C084A0000660A056600007706037E03018002018002017B02007403016C0300 - 6703015E04034F00005106083E00004A09083700004409073700004005034102 - 004C07044300005B08065200006B09096500007606067C010381010281000381 - 0003810003810003800002800002800002800002800002800002800002800002 - 8000028000027D00027F00028700018900018700008200007902007803007902 - 008001008900028A00038400077901066400065400044100003E000040000143 - 02044F01024700005004054200004C06063E00004605044000004101003C0000 - 4606053900004807063B00004704033D00003701002F00003F07063800004D08 - 054700005902005B00006803016E03007302007803007903007C04007E040080 - 04008402028402028301018001007D0101790102760104700305630002560000 - 5702064200004805083700003E05083A00034200044100004605073500003E08 - 072D00003707033402003B03004202004D01005901006600007401007F010081 - 01027C01057600057200036C00026300025A00005100004B0000490003400000 - 47050A38000043060A3700004002083F00024600044300004B03093C00004805 - 0A3A00004403053D00003F00023A00004606063900004806073B000047030440 - 00003E00003B00004808074000005306035000006704006C0100790401790200 - 7902007401006C01006401005C01005401004B00024000004704073700004307 - 073700004106043E01004502004600005906045700007008096C00007D06077D - 0002820001840000840001820001800001800001810102810102800002800002 - 8200028400028400048600048600048400027D00027D00028600018900018700 - 008200007902007603007902008001008900028C00038600077A000667000755 - 00044A03064302044100023D00005600005600005000005101004800004A0300 - 4300004202013E01003F02003C00004202023F00004301024200004000003700 - 003603013500003D04033E00004702004A00005100006005016504016A030070 - 03017603007A04007C0400800300830403840202830101810000810000800001 - 7F02047B03076B00006600005900005400024800004602033E00014001034300 - 014400023E00003E02033500003704023202003502003A030040020048000050 - 00005B00006501007101017303037103076A01046300005C00005300004F0000 - 4C00024A01034200024302043D00024003073D00024101073D00034200044900 - 014D00024A00004E00034A00005000024D00005000005000005100004C00004E - 00014800004901014400004100003E0000400301410000490401460000520000 - 5700006103006904026804006702006302005D00005800005100004A00004100 - 004001033D00004103033D00004404034300004901014900005500005D00006E - 06077302057D06077D0004800002830000830000830000820000800001800001 - 8101028101028000028000028200028400028600028600028700048400027F00 - 027F00028400018600018400008001007902007902007D02008200018900018A - 00038400067A02076801045801044400003E00004000014302047207046E0502 - 6602005B00005100004900004100003D00003E03013A01003F03033C00004302 - 044200004800064400043C00033800003902053700003B02033800003F010141 - 00004B01005000005E02016200007002027600007F02048001028001007F0000 - 8100008200008500008500008500008300017F00027900047302056903045F03 - 025401004B00004600004A01034400014703043F00004103033A00003B020139 - 00003E03014000004603024700004F01024F00005800025400005000004B0000 - 4C00014700004701013F00003F01013C00003C02033A00013D03043B00004102 - 043F00024200054500014D00005600005C02026103046905056E040374020277 - 00017B03047901027301016B00025F02015300004700003E0000430000440000 - 4901014700004E01004A00004D00004C00004A00004700004C02024600004D03 - 034A00004F00034800013D04023904013B02003E01004400004800004E000054 - 00006603056B02057001057400057800057900047B00057D0004800001820001 - 8200018000018000018000018000018000018000018000018000018200018200 - 018200018200028200018000018000018000017F00017F00017D01017D01017F - 00018100008700028700028300007D00027503036902005800004A0103420103 - 4000013D00007B04027603006E01006501005B00005000004600003E00003C01 - 003F06053500004307083900004903094200014800073F000240030734000040 - 070A3000003D07073500003B02014100004D05054D00006306075F0000740608 - 7300007A02037C02027D02008000018300008600008800008800008800008600 - 028000027C01037303036A03016001005800005000004900004B02044000004A - 06073B00004707073B00004103033E00004305053B00004806073E00004B0506 - 4400004A01034200004404033A00004508063500004007053500003A02013900 - 014006073800004607093B00004904074100004B00015700015F00006602026B - 04027503037C02028200008600008C00018900008100007800006A02035C0201 - 4C01004400004400004903034100005006064300004F05054100004200013C00 - 003E05043500004408083A00004A05084400004701023C01003902003E010044 - 01004D00005700005E00006500007201057600057900057B00057D00057D0005 - 7D00057D00047F00028000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018200018000017F00017D - 01017B01017D01017F00018200018500008700028700027F0000790101730402 - 6B02005A00004400003D00003F00004302047F00017B01017501006B02006001 - 005501004A000042000044040338000045090A3500004A080D3A00004A040A43 - 00034300053A000047080A350000440A0B3300004206063C0000450403430000 - 570A084A0000660A095900006B05066900007504027A02027E02027F00018400 - 018500008600018600018500018200027E01037702036F03026702006200005A - 00005100004300005106084000004E0A0B3A00004808083F0101400404380000 - 4709093700004B090A3A00004A06074300004301023A0000490909370000460A - 0A3500004206063A00004103033B00004D090A3E000054090B43000053040751 - 00006300026900036D02047103037803047C0202820000850000890000860000 - 8100007901016E03056105045303024902004502013B00004C09083C00004F09 - 093C00004706053C00003C0302340000420A09330000480A0A3A00004A040544 - 00004100004100004900005001005902006202026B03047302057800047B0004 - 7D00047F00048000048000047F00047F00048000028000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018200018000017F00017D01017B01017D01017F0001820001850000870002 - 8700027F00007901017304026B02005A00004D02044201034000013D00008300 - 008000017B01017203016902005D02005300004900004200004808073700004A - 0B0D3900004B090E3C00004701074100014A040A3A00004C0B0D39000048090B - 3900004202024000004D0707400000570C0A4700005C09074D00005D00006E04 - 037504027703027C02028001028200018500018500018500018400027F00027C - 01037702037002026E0103670303530000580408470000570A0D420000510B0C - 3C00004404043D0000460808350000480C0C370000490B0B3B00004404043E00 - 004707073700004A0C0C370000480A0A3900004301023F00004D050543000059 - 0B0C490000610B0B5300006204056F01057501067603067803047B03047E0202 - 8001008400008700008500007F00007901016F02046303035701014B00003F00 - 004508063900004C0C0B3A00004A0A093700003E030139000041080733000047 - 0B0B3900004C08093E00004B01014B00005000005700005E0100670303700305 - 7704077D04087D00048000048200048200048200048200048200048000028000 - 0280000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018200018000017F00017D01017B01017D0101 - 7F00018200018500008700028700027F00007901017304026B02005A00004600 - 003E00004000014302048800008600018101027A02027202026602005D010052 - 00004E02034000004E0A0B3A00004C0B0D3900004807094000004500033E0000 - 4D080B3C00004F0B0C3C00004806073F00004504033B00004E0B0A3C00004F0C - 093E00004C07044900006304016C02017002027503037A02037F000282000283 - 00018500018300018200028100037E01037A0203790203710305650106550000 - 630A0D4A00005C0C0D4300004E06064300004504033B0000490C0A350000480D - 0B3500004209073B00004001033700004A090B3900004C0C0C3A00004C060645 - 00004900004700005B08075000006B0D0E5B0000700C0C6F02047B01077F0107 - 7F01067D02047D02047E02028001008200008501018400007E00007800006F01 - 036501015B00004D0000430201350000460B09350000480D0B35000043080638 - 0000400503360000480B093900004C0B0A3E00004E06064D00005C0000640000 - 6600016D00027401047901057F01068302078400048600048600048600048600 - 0484000484000482000280000280000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001820001800001 - 7F00017D01017B01017D01017F00018200018500008700028700027F00007901 - 017304026B02005A00004C01034201034000013D00008E00028C000287000281 - 01027801026E02016602025D03025100005305064000004F090A3A00004A070A - 3C00004502053F00004904073C00004D080B3E00004E08093D00004501024200 - 00470605390000490C0A350000450B063600004502005601006201006701026D - 03027303037902037D00027F0001830001830001830001840002820002810003 - 8001037A01056D00036D070C5C0000690A0E5000005E070A4B00004E00014700 - 004A07063A0000480B09370000450A083600004004043C00004604093900004B - 080B3C00005007094400005000014E00005D03025400006F0B09600000790D0C - 7000007E07088400068700068300058100038001038001028002018102018301 - 018200007E00007800007100036800015D00004F000041000042070533000044 - 0B09330000430A083400003E03013E01004707063C00004E0808420000540809 - 4700005903036802037100037300037800047B00048000058300058500058600 - 0487000487000486000486000484000484000482000280000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018200018000017F00017D01017B01017D01017F00018200018500 - 008700028700027F00007901017304026B02005A00004500003E000040000143 - 02049200039100038A00038400027D00027601026F02046905055C00004E0000 - 5204054200004C06063E00004604054000003F01013A00004606063A00004A06 - 073D00004903034200004502013D00004606053600004209073400003C07043E - 01004D00005800005D00016503036C04057302057800047D00047F0003810003 - 8300018500018500018600028400028100057A02076F000275060A6700006D06 - 095D00006104055700005301004900004D06033E00004808043B00004306023E - 01004100023D00004903093E0000500507460000540103540000610304620000 - 7107066900007B0A087400008108068101028900048B00058700048400028000 - 027F00018002018002018102018001007E00007B01017702056E010365000159 - 00004800003A00004207053300004108063400004005033F0000460300440000 - 5205034900005906054E00005B08076002037201047B00027D00027F00028200 - 0284000286000286000287000287000286000286000284000282000282000280 - 0002800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018200018000017F00017D01017B01 - 017D01017F00018200018500008700028700027F00007901017304026B02005A - 00004E03054302044100023D00009300049100038C00038500018100017B0002 - 7803067205076100005C00005200005101024800004A02024500004301023C00 - 003A02013A00004002023E00004501024200004500004200004401003E000041 - 04023900003B06033803003F04024600004F00005600005D03036403056C0405 - 7002047601047A00037E00038000008200008400008600018600018600027F00 - 037E00067900037A02077100027102066800026702045B00005800005000004F - 02004800004A03004700004701014500014600044500014C00034C0000530001 - 5600005C00006B05067307067403017C07047C01008104008100008600008D00 - 048C00048800038300017F00017D01017E03017F04027E00007F00007E00007E - 02027B03077403066D02055F01024A00004200013C00003E03013800003E0301 - 3F00004300004B00005300005500005C00005B00006303036002036B05067700 - 017F000180000282000284000286000287000387000386000286000284000282 - 00028200028000027F00027F0002800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018200 - 018000017F00017D01017B01017D01017F00018200018500008700028700027F - 00007901017304026B02005A00004600003E00004000014302048D00028A0001 - 8A00018500008200007E00007A00037300037003056804046104035A02025301 - 004D00004900004100003D04023603003D06033900004104023E000044010042 - 00004500004200004501023E00004002023800003B02013C0000460001490000 - 5202035200005E03066100026A03066F01057502057B02068102048401048601 - 048800038700018600018800058700058500058200047F00047A000375000371 - 00036C01036602026101015D01005700005100005000004D00004D00014E0003 - 5000035300035900045E00046401036901026F01037500017800007D02008200 - 008502008702008A00018F00068C00068600038000007B00007A00007C03017D - 04027F01007F01008000018001027B02067601046C0001610000500000440000 - 4301023E00004003013E00004401004A00005200005D00006800016E01037003 - 057004036D02046F01017B000282000282000282000284000284000284000284 - 00028200028200028000027F00027F00027D00027B00027B00027F0001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018200018000017F00017D01017B01017D01017F000182 - 00018500008700028700027F00007901017304026B02005A00004C0103420103 - 4000013D00008800038700028700028500018300018100017E00037800037702 - 056F02046802036202025D01005500005100004A00003C02003C070434000042 - 09073600004606053D00004502014400004903033D00004A06073A0000460606 - 3A00004101014100004B02044400005406074C00005F06095B00006601036D02 - 047201047902037E01038100038500038600018700018A00038A00038A000587 - 00028600048100017E00037A00017601047101016E01036902006400005F0000 - 5F00005B00005700015600035800035D00036100046700036C01037101017500 - 017800007C010080010084010087020088020088000188000587000683000580 - 01037901027802017801007A01007F01008001008000018001027F0106780004 - 7100026300005200004D02043D00004707073700004606054300005100005E00 - 006800007400027901027A02037A02037601027700017F000282000282000282 - 00028200028200028200028200028000027F00027F00027D00027B0002790102 - 7801027901027F00018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018200018000017F00017D - 01017B01017D01017F00018200018500008700028700027F0000790101730402 - 6B02005A00004400003D00003F00004302048001038100038100038200028200 - 028100017F00017E00017B00027801027101016C02016602006102005E020154 - 0300430300360000450B06350000490C0A3900004706054000004501023D0000 - 4E08093E00004D080B3C00004904074100004400023C00004D06094200005607 - 0A4900005A03065800006301016901026E00007301017901017D010180010283 - 01028800028A00028900028900018700028600018300017F00008001037C0202 - 7801027403017101016E03006D01006902006200016100046300046700036C01 - 046F01037401047801027A00017C000080010082000084010086010087020085 - 01018000047E00067B02067A0304780304760201760100780000800201820000 - 8200018101028101067900047300026600005700024400004E0809390000480B - 093900004D06035100006600017400027F00048300038401048101027D01017C - 00007F00018000018000018000018000018000017F00017F00017F00017D0101 - 7D01017B01017B01017901017802017901017F00018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018200018000017F00017D01017B01017D01017F0001820001850000870002 - 8700027F00007901017304026B02005A00004D02044201034000013D00007702 - 037902037A02037E01038001038000028100018100018000027D000279010276 - 01027002026B04026804026106024900004C07043E00004F0C093C00004E0B0A - 3B00004504033F00004806073C00004F0B0C3C00004D080B3E00004500033E00 - 004704073C000050090C4000005306094500005300015800005D00006400006A - 00006E01007403017903027D0303820001860001860001860001870001860001 - 8600018400018200018000017F00017D01017901017903027703027304026D00 - 026C01036E01036F01037401047801027C01037E02027F000180000182000082 - 00008201008201008201007F01007901057302067002046F03026F0302710200 - 7502007A01008102018400008400018400018000057C01057400036900035300 - 005104073C00004A0C0C350000480B094000005500006D02047A02038601048B - 00038B00038701018200007F01008000018000018000018000017F00017F0001 - 7D01017D01017D01017D01017D01017D01017B01017B01017B01017B01017F00 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018200018000017F00017D01017B01017D0101 - 7F00018200018500008700028700027F00007901017304026B02005A00004600 - 003E00004000014302046A02036C01037002027702037C01037F000282000283 - 00018500018400028000017D01017903027504027205036B06045C00004D0000 - 5C0907470000570C0A4000004D070740000042020239000048090B3900004C0B - 0D3A00004A040A4100014502073B00004C090E3C00004F0A0D3E00004D050547 - 00004F00005200005800005E00006401006902006F04017304027902007F0100 - 7F01008001008200008200008400008400008300008300008100008001007F01 - 007D02007E03017A02027602017601027801027901027C010380010281010283 - 01028200018200008200008001008001007F01007F01007802016D0506660305 - 6301016100006400006A01007403007D04028402028600008600008600018100 - 057C01057600056900055500024200004A0A0A330000430E0B3300004C070451 - 00006F04067D02048900048F00038D00038A0001820000800100800001800001 - 7F00017F00017F00017F00017F00017F00017F00017F00017F00017F00017F00 - 017F00017F000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001820001800001 - 7F00017D01017B01017D01017F00018200018500008700028700027F00007901 - 017304026B02005A00004C01034201034000013D00005D000062000067020070 - 02027902037E01038400028600018800018700028600018200018001027A0202 - 7A04037405036700006B0506590000660A094A0000570A084300004504033C00 - 00420606330000440A0B35000047080A3A000043000541000348050A3A00004C - 090E3A00004B080B3C00004603024801004A00005000005300005B0000600200 - 6403006B04017103007502007803007B02007D02007F01008301018501018300 - 008300008300008300008200008001008001007F01007D02007D020080010281 - 02018301028500028500028700028501018501018001007F01007D02007B0200 - 7A01007102006205045802025600005600005C00006501007305017F06048402 - 028800018800008700018300057D02067701066A00064F00004B040735000041 - 0B0A2C0000400B083B00005201006D05067C01038800028E00018E00018A0100 - 8302008103008001008000018000017F00018000017F00018000018000018000 - 0180000182000182000182000182000184000184000182000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018200018000017F00017D01017B01017D01017F00018200018500 - 008700028700027F00007901017304026B02005A00004500003E000040000143 - 02045400005800006201006C02017503037E01038400028900028B00018B0001 - 8900018700018400018001027E03017A02027A02037100007605085F00006306 - 074D00004D05054000003D01013500003D070730000040070A3400004003073D - 00024300063E00014704093A0000480709390000430505400000420200450100 - 4800004D00005100005701005E04006204006A04006E03006F03007403007803 - 007C030180020181020183010184000084000084000084000082000082000082 - 0000820000840100840000860100860000870000870000870000870101850101 - 8101027D01017B01017701007701006C02015500004B00004B00005000005700 - 006401007004007E05038602028A00018800008700018300057D020678020769 - 02074F00013D00003F07062B0000350B062C00004205014D0000690304790102 - 8700018D00008D00008700008103008003008001008200008200008001008200 - 0080010082000082000082000084000086000086000087000087000089000087 - 0000820001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018200018000017F00017D01017B01 - 017D01017F00018200018500008700028700027F00007901017304026B02005A - 00004E03054302044100023D00004700004D00005600006003026D0204750205 - 7D00048400028900028B00018B00018900018600018400018001008000018100 - 038102047700027401046500006100025300004E00014700004200013E000040 - 01033A00003E02033B00023C00033C00013E00033B00003E02033A00003F0304 - 3C00003E02023F02004001004200004500004900004F01005302005804005E05 - 016105006504016B04017003017703027A02027C02027F030381020382020383 - 0101850101840000840000860000870000870000870000890000890000870000 - 8700008600018301028001027C01037601027202026E01036C01036104034700 - 004100004500004C00005501006001006E03007901018503048800028A000086 - 00008300037F02047A02066C03065000004200013700003505012E0100350501 - 3D00004E00006903047800018500008A00008A00008700008103008104008001 - 0082000082000082000082000082000082000082000082000084000086000086 - 0000870000870000870000860000820001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018200 - 018000017F00017D01017B01017D01017F00018200018500008700028700027F - 00007901017304026B02005A00004600003E00004000014302043E02033F0000 - 4701024A00005B00036200017102067A00067D00018200008600008600008700 - 008800018802028602028200018000017F00027D00027B00027800047201046D - 02056200005B00015500015000024B00024400014200023F00023B0203370101 - 3A04043500003B03023600003901003800003B02013B00004202013E00004401 - 004100004600004400004A00004A000055010357000067020469000171030575 - 02057400007600007B00027B00008402038400008B00038B00008A00008A0000 - 8A00008900008900008700028300038101067D02067600057002086400026001 - 055600005400014A00004400013F000046030244000050000056000068020374 - 01047F00028600028900018900018400018000017B01016F0302530000450000 - 4102003700003D06033A01004701014F00006A03067A02078600068A00038800 - 0085000083010183040380010080000180000180000180000180000180000180 - 0001800001820001820001820001820001820001820001820001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018200018000017F00017D01017B01017D01017F000182 - 00018500008700028700027F00007901017304026B02005A00004C0103420103 - 4000013D00003700033E05083800004B04074800006004096300017102067800 - 057D000482000284000186000186000087010187010182000182000182000182 - 00018200028200027F00047B00047400036C00026500035D00025300024D0001 - 4A00014300003B00003E05043400004108073500004206063800003D01013B00 - 004004043800004507073700004505053C00004101013D000045030443000058 - 04085200006504086200006A01046F01057507096F00007F0809760000850506 - 8100008700018600008600008500008500008300008000027D00047800047000 - 0570040A5E000062060B4C00005104084500004300013D00004204043B00004C - 06074300005A03066200007403077D0004840002890002890001860000820000 - 7D02007203015600004D03003C00004508043700004808074300005300006B01 - 077A020784000788000387000285000083010182030280000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018200018000017F00017D - 01017B01017D01017F00018200018500008700028700027F0000790101730402 - 6B02005A00004400003D00003F00004302043D04073500004807093E00005607 - 0A4C00006504086500007102067702057C01037F000180000182000181000081 - 00008200008001008200018200018400018200018000027D00027A0105740104 - 6E00046601035E00035700015200004D00004B00024100005007094000005108 - 0A3E00004905064200004301023A0000490909370000490B0B3500004307073B - 00003E02033700004B07084200005A060A4E00006002065C0000680507620000 - 730B0C6400007C0B0E6F00007E06077800007E03017D02007D01017B01017901 - 027801027300036E01036700055A000063070C49000055080C3E00004903093E - 00004001033900004909093E00005408094C00006906086F00047B0004820002 - 8700028700018600008200007D02007203015D02004700004D0805390000490C - 0A3900004D05054E000068010677010682000787000387000285000083010182 - 0302800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018200018000017F00017D01017B01017D01017F0001820001850000870002 - 8700027F00007901017304026B02005A00004D02044201034000013D00003B00 - 0246060B3900004E090C42000058070A4F00005D00026702046C010371000376 - 01027901027D01017F00017F01007F0100800100800001820001840001840001 - 8200028000028000057A01057601046F00046900036300026000035D00035700 - 005E04094E000060090D4A00005A060A4500004C00024600004B05063C00004D - 0B0C370000470B0B3600003D04033800004307083900004E0A0B420000570609 - 4900005500015400005F05055200006D0D0D5A0000750D0E6A00007406067205 - 037206027205037104026F03026D03026802036502045700005A030647000055 - 0A0C3E00004A090B3700003F03043A00004507073900004F0B0C4300005F080B - 5D00007304087B00048200028700028700018600008200007D02007203015B00 - 005607044000004D0D093700004C0C0B41000053000166000576000581000687 - 0003870002850000820000820302800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018200018000017F00017D01017B01017D0101 - 7F00018200018500008700028700027F00007901017304026B02005A00004600 - 003E00004000014302044301063A00004B080B3C0000500A0B4200005204054E - 00005A00005D00006400006B01007101017703027A04037B03037D02007F0100 - 8001008200008400018400018400018400018300017F00017C00017900047601 - 047201047001056F010570020864000072080E5A00006C080D5300005D02054F - 00005200014500005309093E00004D0C0B3900004508063900003E0405350000 - 490A0C3900004C090C3E00004E05074700004A00004500005808094A0000640B - 0E52000066090A5F02016304016305006304016003005F02015E02015B010157 - 01015100004300005007093A00004A0B0D33000040070A3700003F0304380000 - 4B0B0B3C000055090A4A00006807096D00037900048200028700028700018600 - 008200007D02007403016304014C00005309073A00004B0E0C3900004D07074D - 0000620003720003800006850003860002840001820000810201800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001820001800001 - 7F00017D01017B01017D01017F00018200018500008700028700027F00007901 - 017304026B02005A00004C01034201034000013D00004100014704093A00004B - 080B3C00004B07083F00004A00004C00005100005900006000006701026D0302 - 7103037605037902007B02007D02007F01008200018400018600018600018400 - 008500018300018200028001037E01037D02067B02067800047E050D6C00007C - 080F62000070040A5D00005F00025900005A030649000057090A4200004D0707 - 3F000042000140000146060B370000490A0C37000049080A3B00004503044200 - 004B0506400000540A0A43000055070848000052000052000054000052000052 - 00005100004E00004E00004A0000430000470403390000450909330000400A0A - 3200003A04043A00004406063900004D090A4200005B07095C00007204087900 - 048000028600028700018600008200007D02007403016201005C07054300004D - 0A073700004A0A094000005000016100026F00027D0005860104870003840001 - 8200008102018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018200018000017F00017D01017B01017D01017F00018200018500 - 008700028700027F00007901017304026B02005A00004500003E000040000143 - 02044600023F00004704073B00004808083900004306043F0000420000470000 - 4D00005300005D01006101016602026C02017403017803007902007B02007F00 - 0182000184000186000187000187000189000187000187000187000287000383 - 00038100067B000182040A7300007F050B6D00007203076A00026801045E0000 - 6306075200005C06064C00005402014B00004A00044000004704093900004306 - 0A3700004105063D01024302043F00004A05083D00004C05083F000048010444 - 00004800004900004900004900004900004700004700004300004100003B0000 - 4105053300004007083100003B05053600003E02023B00004606063C00004F05 - 054C00006305066C01047800048000028600028700018600008200007F010076 - 02016A05035800005505043E00004707063900004805044B00005E00016D0002 - 7B00058401048500038400018200008001008000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018200018000017F00017D01017B01 - 017D01017F00018200018500008700028700027F00007901017304026B02005A - 00004E03054302044100023D00004400004400024000004403053C00003E0504 - 3A01003C03013C01004000004601004B00005200005801005C00006100006D04 - 017004007403017602017901017D01018000018400018800028A00028A00028B - 00018B00018A00008A00008600018100018000057D00028100077B00037D0309 - 7701067504087102066F04076900036803056000006100025C00005900015000 - 004D00044400004400043B00003C01053900013D03043B00004100023F000044 - 0104400000450205410002440203450000470000480100470200470200460300 - 4403024403023F00003F02003A00003E02023800003C02033800003A01023C00 - 004002023F00004301024400005101025D00016C03067601047F000284000286 - 00018400008200007F01007802016B04026003024F00004B01003E0000410402 - 4100004B00005A00006900017900058201048500038400018200008001008000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018200 - 018000017F00017D01017B01017D01017F00018200018500008700028700027F - 00007901017304026B02005A00004600003E0000400001430204450001420000 - 4300033C00003C03023700003802013701003902003900004202014100004B01 - 014C00005200005700006605026703006E04036B00007402027400007A00017D - 00008300008500008800008A00008A00008C00008C00008700008200047F0004 - 7F00047D00047D00047B00047900047800047800047601047401047401047201 - 047201047201046D02056400065800025000014500004302043A00013B020339 - 00003E00013F00004500054100014300053E00013F0004400001430000440000 - 4701014300004701014100004201004100004000003F00004002023C00004001 - 033C00003F00023E00013F01014000004303033F00004901014D00005F020369 - 02057401047D00028200028400018400008200007F01007802016C00005E0000 - 5400004500004201003C00004201004700005C01046A01047A02078102048300 - 0384000182000080010080000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018200018000017F00017D01017B01017D01017F000182 - 00018500008700028700027F00007901017304026B02005A00004C0103420103 - 4000013D00004200004702053A00004506083300003F07063300003802013601 - 003D06033600004707063E00004F05054600005100005600005F02015900006B - 07056200007408077100007C04057D00028000018400018600018900018B0001 - 8B00018700028000027B00027B00047D00027D00047D00027D00047D00027D00 - 047D00027D00047D00027D00047D00027D00047900046E000668010851000052 - 03063D00004307083700003B01023D00004502053F00004C040A3C0000470409 - 3A00003F00024200004903033F00004C06063C00004906053D00004201003F00 - 004404043A00004806073A00004704073D00004200023F00004505053B000048 - 06074000005305065800006904067401047B0002800002840001840000820000 - 7F01007901016F00006802035200005205033A00004508063D00004800005900 - 036801047501067F020481000382000182000080010080000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018200018000017F00017D - 01017B01017D01017F00018200018500008700028700027F0000790101730402 - 6B02005A00004400003D00003F00004302044301023A0000490909370000440B - 0A3200003F07063700003B03023300004509093700004B090A3C00004B050647 - 00004D00004A00005E0606500000690B0C5C000071090A6E0103750205790203 - 7C01038001038300038500038700038500037D00027901017901027B01017B00 - 027D01017D00027F000180000280000182000282000184000284000186000282 - 00027F020B6B00006A060C4A0000500A0B3700004007063700004202023F0000 - 52060A42000051070B3C00004404093E00004701024100005007093E00004D09 - 0A3C00004705063F00004301023B00004A08093C00004D090A3C00004B050641 - 00004301023B00004A0A0A3A00004F09094500005E0606620001720104790102 - 8000028200018400008200008001007B01017803046400006306074500004D0C - 0B3500004508064400005501036401037302067D020481000382000182000082 - 0000800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018200018000017F00017D01017B01017D01017F0001820001850000870002 - 8700027F00007901017304026B02005A00004D02044201034000013D00003C00 - 00450707370000480C0C350000460A0A3300003C03023800004307073500004A - 0C0C3700004A0A0A3900004501024500005206074500005B0B0C4A0000610909 - 5400006300026B02056F02047201047702037A02037C01038102047F02047B01 - 017901017901017B01017B01017D01017F00017F000180000182000184000186 - 000186000186000187000186000283000580080D5D0000620C0C400000470C0A - 3300003C03023E00004C060743000056090D4200004D080B3700004001034300 - 00500507400000510B0C3C00004B090A3A00004202023F00004806073A00004F - 0B0C3C00004F090A4000004701023E00004808083900004E0C0D3E0000540809 - 4F00006502047002047901027F00028200018400008200008001007D01017600 - 007306085300005B0B0A3A0000480D0B3800004502015300026100027001057A - 02037F0002820001820000830101800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018200018000017F00017D01017B01017D0101 - 7F00018200018500008700028700027F00007901017304026B02005A00004600 - 003E00004000014302043C0302330000460A0A3500004A0C0C3700004706083E - 00004201033900004A090B3700004A0B0D3500004307083A00004504063C0000 - 4F0A0D3E0000550A0C4500005501054E00005F01056302046801046C01036F02 - 047002047502057702037901017B02007B02007D02007D02007F01007F01007F - 01008001008200008200008400008400008400008600008400018A0508760000 - 770C0E4E0000520D0A3300004009043700004202013E000054070A450000550A - 0C3C00004307083C000047000342000051070B3E00004F0A0D3A00004706083C - 00004201033900004A0A0A3A00004F0B0C3C00004C06074300004301023B0000 - 4C0C0C3A00004F0C0B4300005B05055D00006F02047801027F00028200018200 - 008200008001007D01017B03046800006807094900004F0C0B3500004207053F - 00005000015E00016F00047A02037F0002810000820000830101800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001820001800001 - 7F00017D01017B01017D01017F00018200018500008700028700027F00007901 - 017304026B02005A00004C01034201034000013D00003500003F070633000046 - 0A0A3900004A08093D00004500034100004904073A00004A090B35000043090A - 3300003B020338000142050935000048090B3A00004B06094100004C00025300 - 035700035D00036100026401036602026A02036F01017901017F01007F01007F - 01007F01007F01007F01007F01007F0100800100800100800100800100800100 - 80010082000084000185080A640000630C0A3C0000400A032F00003A06003C00 - 004B050543000056070A4200004C08093600003E02034100004D03073E00004D - 080B3A000049080A3800003E02033A00004206073700004A0A0A3A00004C0809 - 3D00004501023E00004705063900004C0A0B3C00005107074C00006000016F02 - 047801027F00028200018200008001008001007D01017900007704075700005A - 08073C00004409073500004100004F00005D00016E00047801027F0002810000 - 8200008301018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018200018000017F00017D01017B01017D01017F00018200018500 - 008700028700027F00007901017304026B02005A00004500003E000040000143 - 02043603013300003F07063500004707073D0000490205460000480002410000 - 49030939000043060A3300003B04073400023500043200003C04093200004306 - 0A3900004603064500004900004C00005100005500005A00005D000160000168 - 00017B01018400008400008200008200008001008001007F01007F01007D0200 - 7D02007D02007B02007B02007B02007D02008301027A00007009065000004708 - 003000003608003405003D03003F00005004054300004E05073B00003E050439 - 00004200024100004B03093C000047050A3800004004053900003B0102360000 - 4206063500004507073A00004503044000004100003D00004808083C00004A07 - 064200005401005900006D02047601027D00028000018200008001008001007F - 00018003057100006904064B00004D07073700004005033D00004C00005C0000 - 6D00037801027F00027F00008200008301018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018200018000017F00017D01017B01 - 017D01017F00018200018500008700028700027F00007901017304026B02005A - 00004E03054302044100023D00003701003802013800004002023F0000450102 - 4400004700014700014600024100014300053C00013C01053800023700033900 - 043B01063700023D02063800013E01053C00004100014300004700004B000051 - 00005600005B00005F00006800007D0101860000860001840000820001820000 - 8000018001007F00017D02007D01017B02007901017803007901017802017600 - 007103035F02005206003D00003703003102003606003A020041020041000047 - 01013F00003E02023600003901004000014600044100014300053F0001420005 - 3D00003C00013C00013D01023A00004002023E00004202024000004100003F00 - 004202023E00004205033D00004600004C00005700006903047201047B00027F - 00018200018200008000017F0001800305780306630000560302450000420503 - 3A01003E01004A00005800026900037601047D00028100008400018501018200 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018200 - 018000017F00017D01017B01017D01017F00018200018500008700028700027F - 00007901017304026B02005A00004600003E00004000014302043C00013B0000 - 4001033E00004201033F00004200024100014100014000004300033E00004201 - 033C00003F00023E00014100034200024300053E00014000053C00003F000240 - 00014501024900025000015400005A00006200016800047302067F0002840001 - 8400028400018200028200018000028000017F00027D01017D00027B01017B00 - 027901017B00027202025D01005202014C02004502003F02003A020039020036 - 01003B04013B04013A03003A03003803003303003203003502003F0000420000 - 4200004200004200004200004200004000004300034100014401044200004601 - 044100004400024200004000003B00003C03013600003C03013C00004601004F - 00006205046D02047601047D00028000028200018200028000017C0001720000 - 6804025400004A03003B00003B02003C01004400005300026502047302057D00 - 028500008A000089000184000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018200018000017F00017D01017B01017D01017F000182 - 00018500008700028700027F00007901017304026B02005A00004C0103420103 - 4000013D00003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004200024400024B01073F00004A - 05083900004405073A00004101014501024C02025300025A0002600001680002 - 6E00057800058000048400028400028200028200028200028000028000027F00 - 027F00027D00027D00027B00027B00027B00027002045700004C00014B000049 - 00004800004500004300004000004302014202013F02003D02003B02003A0100 - 3A01003C01004101014200014200024200014400024400014400024400014500 - 034A06074000004C08093E00004A060740000043010240000043060437000042 - 09073400004508044200005000006205046D02047601047D0004800002820002 - 8400028000027B00007706046200006009054100004306023600003C03014200 - 005101026302047103057D00048500018C00008D000184000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018200018000017F00017D - 01017B01017D01017F00018200018500008700028700027F0000790101730402 - 6B02005A00004400003D00003F00004302044201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073F - 00004700033F00004C070A3A00004A0A0A390000460606410000480000500203 - 5B02056201036900036F00027700047B00058000048200028200028200028200 - 028000028000028000027F00027F00027D00027D00027B00027B00027B000276 - 01046600006000006000005D00005C00005A0000580000560000580000560000 - 5300005200005200004F00004F00004B00004200003F00003F00003F00003F00 - 003F00003F00003F00004204043A0000480A0A370000490B0B3700004406063F - 00004701014100004C09083A00004B0B073E00005005035100006604046F0204 - 7801027F0002820002840002820002800002800102720000740A09510000540A - 083900004007053B00004200005101026103047103057D00048500018C00008B - 0001840001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018200018000017F00017D01017B01017D01017F0001820001850000870002 - 8700027F00007901017304026B02005A00004D02044201034000013D00003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004300034100004A06073A00004D0B0C3900004A0A09 - 3A00004701014B00005502016104056A03067302067700037E00048000048200 - 028200018200028200018200028000018000028000018000027F00017F00027D - 01017D00027B01017D00027901027500037300037300047200026F00026F0001 - 6D00026B00006B00036901026600026501016400016400006400015E00015100 - 004B00004B00004A00004B00004A00004A00004A00004600004F080540000053 - 0C09400000510A074000004B01014D000056030545000055090A430000550806 - 4A00005B00006B03047401047B00028000028200028400028200028200027D00 - 008208086400006B0E0B4500004B0B0736000040050342000051010261030470 - 03057B00048300018A00008B0001840001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018200018000017F00017D01017B01017D0101 - 7F00018200018500008700028700027F00007901017304026B02005A00004600 - 003E00004000014302044201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E00004301023A0000 - 4A0A093900004C0C0B3A00004A07044700005100005C02016905057305077B02 - 0680010386000486000284000184000084000182000082000182000082000180 - 01008000017F01007F00017F01007F00017D02007F00017F0001810204810003 - 8000058001038000057D00027B00047901027A01057902037800047601027500 - 037301017300037100036D020469030469020568040469020568040468030566 - 0404630204590000680A0B530000690B0C5300006305065A0000610002570000 - 6508094E0000630B0B5000006306056100007002047800047F00028200028400 - 028400028200018200018601037900007C0C0C5500005C0C0B3E00004609073E - 01004400005101026103047003057B0004830001880000890001840001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001820001800001 - 7F00017D01017B01017D01017F00018200018500008700028700027F00007901 - 017304026B02005A00004C01034201034000013D00003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004202023C00004407053700004A0B073900004A0A063F00004E01005500 - 005F02016C04057604048102048400028B00028C000287000084000086000084 - 0000840000840000840000820000820000820000800100800100800100800100 - 8001008001008400018400028200028200028200028200028000027F00028102 - 047F02047F02047E01037C01037B00027B00027B00027E01037E01037E00057C - 01037C01057C01037C01057A02037700037D08096E00007F0D0D6A00007C0A0A - 6C00007302056D000274060A620000710C0E5B0000700B0D6400007103057800 - 047D00028200028600028400028400028000018200018400008707086B000070 - 0C0A4A00005009063B0000440403440000510102610304700305790004810001 - 8600008700018200018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018200018000017F00017D01017B01017D01017F00018200018500 - 008700028700027F00007901017304026B02005A00004500003E000040000143 - 02044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053D00003D02003800004208033700004708 - 043D00004B04004D00005801006302006F03027903028200018700018F000190 - 0002890000860000870000860000860000860000860000840000840000840000 - 8400008400008400008400008400008200008100007F00007F00007F00007E00 - 007E00007E00007C00007E02027C02027C02027B01017B01017B01017A00007F - 00008800008C00008C00018A00008A00018800008800018600008A0206820000 - 8C070A7F00008A070A7D00008603067F00017D02067500027A060B6C00007609 - 0B6A00007605087700037D000282000286000287000186000184000180000182 - 00018901038100007E07086000005C0606440000460504410100440000510102 - 6103046E03057800047F00018500008600018200018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018200018000017F00017D01017B01 - 017D01017F00018200018500008700028700027F00007901017304026B02005A - 00004E03054302044100023D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00003E00003C01 - 003B03003A00004003003E00004503004800004E00005A01006302006F020079 - 01018100008600008D00018E0002890000870000870000870000870000870000 - 8600008600008600008600008600008600008600008600008600008400008000 - 017F00017F00017F00017D01017D01017D01017E02027D01017D01017D01017C - 00007C00007B00007B00008000008C00029100029000029000028E00028E0002 - 8C00028C00028900018800028500008801038300008500028300008300018000 - 027F00057900017A00067200007601047600017C000182000286000289000189 - 00018700018400018000018200018900018902047700006B04025300004C0200 - 4100004303024400005101026103046E03057800047E00018300008600018200 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018200 - 018000017F00017D01017B01017D01017F00018200018500008700028700027F - 00007901017304026B02005A00004600003E00004000014302044000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100023E00003A01003901003E04003C00004204004100004A01004E - 00005A0300620100710603770100830405830000890001860000870000850000 - 8500008400008400008500008500008600008600008600008600008600008700 - 008700008700008400008000017D01017D01017D01017D01017D01017F00017F - 00017F00017F00017F00017F00017F00017F00017F0001800001860103870002 - 8400018300008100008100008100007F00008000017F00017F00017D01017D01 - 017B01017D01017F00028200028200028000027E00037A00037A00037D000280 - 00028600028900018B00018B00018700008400007F0100800100890001850000 - 7C04056700005802024700004100003E00004701014E00015C00006800017601 - 047F020483010284000182000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018200018000017F00017D01017B01017D01017F000182 - 00018500008700028700027F00007901017304026B02005A00004C0103420103 - 4000013D00003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00003F01013900003E060136000045 - 08043900004907024300004D00005400006205026400007A0B09730000840808 - 7F00008301028301028001008100008100008100008100008200018301018100 - 008100008100008100008300008300008300008100007E00007E00007E00007E - 00007D00007D00007E00007E00007F00007F0000810000810000810000810000 - 8300008100008101028001027F00017E00007B00007B00007C00007C00007C02 - 027C02027C02027A02027A02027A02027A02027E020284000486000482000480 - 00047D00047E01038001038300038700018B00018D00018B0001870000820000 - 7F01008001008600008B0406740000710A084F00004D06033C00004101004502 - 014E00015900006600017401047D020481010282000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018200018000017F00017D - 01017B01017D01017F00018200018500008700028700027F0000790101730402 - 6B02005A00004400003D00003F00004302044201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073C - 00003E0301340000450A083700004A0B073A00004B0603470000520100510000 - 6909095E00007A0E0D6A00007D08097600007801027802017800017800007800 - 017800007901027901017B00027B01017B00027B01017D00027D01017D00027D - 00027E00017F00017F00017F0001810001810001830001830001860002860002 - 8700028700028700028700028900028600028101027E02027D01017C00007C00 - 007C00007C00007C00007E02027E02027E02027C02027C02027C02027C020280 - 01028200048400048000027F00027D00027D00027F00028200018700018B0001 - 8D00008B00008600008200007F01007F0100890204800000800B0C5D00005F0C - 0B3E00004606053D00004502014B00005700006501017201047D020481010282 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018200018000017F00017D01017B01017D01017F0001820001850000870002 - 8700027F00007901017304026B02005A00004D02044201034000013D00003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004001033A00004308063500004A0D0B3700004A0B07 - 3C00004702004700005607044C0000670D0C5300006D0C095F00006A03016B00 - 026B01006A00016A00006C00016C00006D00026D010071030571030371030573 - 03037302057303037302057702037A01057C01037C01057E01037E0005810204 - 8201068201048200048200028400048400028600048600028600048400028001 - 037E02027D00027C00007C00017D01017D00027E02027E00017E00007E00017E - 00007E00017E00007E00017F00017F00017F00037C00017A0001790000790000 - 7D00008000008700018B00018B00008900008600008001007D02007F01008300 - 008808096B000071100D4900004E0B083700004106044201004B000057000064 - 00007201047A0203810102810000800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018200018000017F00017D01017B01017D0101 - 7F00018200018500008700028700027F00007901017304026B02005A00004600 - 003E00004000014302044201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000400103370000 - 480A0A3700004A0C0C3900004707063F0000480202410000550A084500005D0B - 0A4A00005A04045200005A00005A00005B00005B00005B00005B00005D00005D - 00006201036202026201036402026401036402026401036701026B00036D0002 - 6E00046F01037201057201047501067702057800057800047900057B00047D00 - 057D00047D00057D00047C01057B00027B00047A00017D00047D000280000580 - 01037F00037F00018100038100018300038300018300038100017F00027B0002 - 7901027801027700017800017C00007F00008600008900008B00008900008601 - 008002007D02007D02008503047700007A0C0C5300005A0D0B3A0000430A083B - 02004101004A00005400006200007100037A0203800001810000800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001820001800001 - 7F00017D01017B01017D01017F00018200018500008700028700027F00007901 - 017304026B02005A00004C01034201034000013D00003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E0000440507370000480A0A3700004709093800004202013F00 - 004706053C00004E09063E00004D06034200004800004B00004B00004C00004C - 00004C00004C00004F00004F0000510000510000520000520000520000520000 - 5400005600005800005A00005A00005B00005D00006000016000016200016601 - 036700036900036B00036D00036D00036E00036E00036E00036E00026E00026F - 00017000027300037300037601047901057A01057C01057C01057E00057E0005 - 7E00057E00057901027601027503037503037503037803047B03038102038400 - 008700008900008900008401008002007B03007B03007D000080060665000067 - 0C08430000490A063500003E07043F0200470000540000620000710003790102 - 7F00018100008000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018200018000017F00017D01017B01017D01017F00018200018500 - 008700028700027F00007901017304026B02005A00004500003E000040000143 - 02044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100043C00004604093700004506 - 083600004004053B00003E02023900004407053700004407053700004303023E - 00004101004101004000003F0000400000410000440001440100450000450000 - 4700004700004900004900004900004700004200004200004300004600004700 - 004A00004B00004E000151010253000254000256000258000258000258000258 - 00005700005700005700005900005900005C00005E0001610002640103660103 - 6700036900036B00036B00036B00036D00026E00006F00006D00006E00007003 - 017304027903027F03038400008700008900008700008401008002007B03007B - 03007D01017200006E07055200004F05033700003C07043904013E0100470000 - 5400006100006F01037901027F00018000008000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018200018000017F00017D01017B01 - 017D01017F00018200018500008700028700027F00007901017304026B02005A - 00004E03054302044100023D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 034100043F00014300033E00004201033D00003E00003C00003B02003800003B - 04013800003E05033B02003E05033E03013D02003B02003A01003A01003D0101 - 3D01014002024202024301024500034501024501024501024301024202023900 - 003800003A00003B00003E01003F020042020143020143000045000045000047 - 00004900004900004A00004900004800004800004700004700004900004A0000 - 4D00005000005200015300005500015700005700015900005900015B00005B00 - 005D00005C00005E00005F00006302006901026E020174020278010278010278 - 01027602017203016F04016F04016D00006C01035E00005401004300003E0100 - 3801003C05023E01004700005200006100007000007B01018300008400008200 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018200 - 018000017F00017D01017B01017D01017F00018200018500008700028700027F - 00007901017304026B02005A00004600003E00004000014302044000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000013E00013F000043000343000049000345000046000143 - 00004000003B00003B04013501003B04003700003B03003C02004004003E0200 - 3F05003800003B03023600003A00013A00004100014200004700054300004701 - 023F00004101003E01003D01013C00003F03033B00004204043D000041030341 - 0101410101400000430102410000460203410000470102430000460203440100 - 4703044200004602034200004701024500004700004600004B00024700004B00 - 024800004B00014A00004900004600004900024500004B00024700004B00014C - 00004E00004F00005200014E00005200014C00004F0000500000510000500000 - 5200024800004900033F00003F00023E00004301024600005300005D00007302 - 007D00008C00018C000084000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018200018000017F00017D01017B01017D01017F000182 - 00018500008700028700027F00007901017304026B02005A00004C0103420103 - 4000013D00003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00003F00023D00004203053D00004E - 04084300005003064500004600013F00004005033300003E0A043000003F0803 - 3800003F0300410100450700370000420A053300003F07063600003E02033F00 - 024701073F00004C05083C00004705063A00003F02003E00004305053A000046 - 08083900004507073C00004103033D00004303033900004606063A0000460405 - 3C00004000003F00004204043800004507073700004305053B00004101013F00 - 004404043B00004806073A00004705063D00004101013D000040040536000043 - 07083500004206073A00003F00023D0000420305380000450608370000440507 - 3C00004200024400004B01054100004C05083C00004704093C00003F00024000 - 004903034A00006405026800008506058900008E000086000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018200018000017F00017D - 01017B01017D01017F00018200018500008700028700027F0000790101730402 - 6B02005A00004400003D00003F00004302044201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073C - 00004001033800004A070A3E000053080A4300004F0406430000420201360000 - 420B06300000430C073300004407033F00004404003C0000480C06350000450E - 0B3200004108093A00014000053A00004A070A3A00004A0A0A3700004207053A - 00004303033C00004A0A0A3900004B0B0B3900004707073F00004101013A0000 - 4808083900004A0A0A3900004505053D00003E0202360000440808350000460A - 0A3500004206063A00003E0202360000450909350000460A0A3500004206063A - 00003C020334000043090A330000440A0B3300004206073A00003E0203360000 - 45090A350000460A0B3500004206073C00004202023B00004A070A3A00004A09 - 0B3700004206073800004004043C0000530806500000740B087000008C070485 - 0000840001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018200018000017F00017D01017B01017D01017F0001820001850000870002 - 8700027F00007901017304026B02005A00004D02044201034000013D00003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004001033C00004506083A0000510A0D42000053080A - 4000004501023E0000430806320000450E09330000480B073A00004503004300 - 004C08013A00004D0F09350000460D0B3500003E04053A000145050A3700004A - 0B0D370000460A0A3500004003013F00004C06073E0000510B0C3E00004D090A - 3C00004301024000004907083A00004E0C0D3A00004C0A0B3B00004404043C00 - 00440808350000490D0D350000460D0C3500003F060538000041080733000045 - 0D0C320000430B0A3200003B0302380000430708350000480C0D350000440A0B - 3300003C0203380000410708330000460C0D330000430A0B3300003C03023A00 - 004507073700004A0B0D370000460A0B3200003B02033800004508063E00005F - 0D085700007C0E0A780000840300820001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018200018000017F00017D01017B01017D0101 - 7F00018200018500008700028700027F00007901017304026B02005A00004600 - 003E00004000014302044201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083C0000400103370000 - 4B080B3E0000530A0C4200004E0507410000420201350000440C073300004A0D - 093A00004C07044700004D0300440000520B073E00004E0D0C3700004607093A - 00003E0203350000460A0B350000480C0C3500004308063E00004A0202440000 - 54080943000055090A4200004E04044300004A0202410000500A0A3E0000500D - 0C3C00004B08073F0000430302370000490C0A3700004B0E0C3500004409073A - 00003C0301330000430C09320000450E0B3000003E09063700003E0202370000 - 480A0A3700004A0C0C3500004307073A00003C0302330000430B0A320000450D - 0C3000004008073700003C0302330000460A0A330000460C0D3200003E080835 - 00003B05043400004B0B074500006A0F0A6200007F0A057A0000800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001820001800001 - 7F00017D01017B01017D01017F00018200018500008700028700027F00007901 - 017304026B02005A00004C01034201034000013D00003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004001033C00004405073A00004F080B4000005007093F00004301023C00 - 00420705350000480B073A00004E09064400005001005200005907024A000058 - 0B084200004E08083E00004201033C0000420607350000460A0A370000470A08 - 3A00004701015100005B04074C00005F080B4A00005A06084A00004F00004B00 - 005103044500005408094300005107074300004A00004500004B05053E00004E - 08083E00004A07063A00004100003E0000460605370000460B09350000450A08 - 3600004003013F00004905063E00004D090A3C00004A08093B00004202023C00 - 00440606350000440B0A330000430A093400003C030138000040070535000046 - 0A0A35000043090A3300003903023702004008033A0000560C06520000710D08 - 6E00007D05007F00018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018200018000017F00017D01017B01017D01017F00018200018500 - 008700028700027F00007901017304026B02005A00004500003E000040000143 - 02044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053D00003F00023A00004704073E00004E05 - 074100004703044000003F02003800004208033900004C070444000054020154 - 00006205025F01006508055500005D07074D00004F02054500004200023A0000 - 4406063700004707073D00004B03034D00006204056300006A07095C00006706 - 085900006002035A00005C00005500005D05054E00005C06064D000057040352 - 00005603025100005906054B00005705044800004E01004900004B0000460000 - 4F05034000004E07043F00004904014600004B00004800005404054500005105 - 064300004D03034600004600004100004906053A00004807063A00004404033F - 00004101003C00004707033A00004807063A00004204043B00003F04023B0000 - 4B0603470000650A066300007608047701007F00018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018200018000017F00017D01017B01 - 017D01017F00018200018500008700028700027F00007901017304026B02005A - 00004E03054302044100023D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000013E00 - 013F00023F00004500034300004701024000004000003E01003D02003C000043 - 03004700005000005400005C00006D06047007046C02016A05036100005F0203 - 5200014F00034500014200023E00004301024300004C00014F00005700006E03 - 067504086F00047203076C00026F010569000168000267000368030564000167 - 04066000016403055F01026302046904066A0507660103670406600000610002 - 5B00005B00005900005800005300005500005100005300005000005100005500 - 005800005500005900015300005500015000005100005000004F00004A00004C - 00014800004B01014800004700004700004801004700004B01004700004B0101 - 4600004500004401004702004800005503005E00006E05027302007902007F00 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018200 - 018000017F00017D01017B01017D01017F00018200018500008700028700027F - 00007901017304026B02005A00004600003E00004000014302044000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000013E00013D00004300034100004501024100004200013E - 00003D02003B0000420300430000510402560000630506690304730200790302 - 7902037500017201056C03066200065400014B00014400004501024500005103 - 045600006205066902057800047D00047B00047B000479000479000478000476 - 01047401047201047201047002046F02046F02046D0204700204760104780004 - 7800047601047601047401047201047002046F02046D02046D02046B03046903 - 046903046903046903046C05086D04076902056700036400015F00005C00005B - 00005C00005B0000590000570000570000550000550000530000550200550200 - 5601005500005600005300005000004F00004F00005100005400005B00006500 - 007001007902007E03017F000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018200018000017F00017D01017B01017D01017F000182 - 00018500008700028700027F00007901017304026B02005A00004C0103420103 - 4000013D00003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023D00004203053B000048 - 05083C00004705063C00003F01013B00004005033A00004E07044B0000610707 - 6300007204067800008002018101027E00017B00047501066900055A00014D00 - 004D02044100005006064C00006406076400007603067F000484000284000482 - 00028200048000028000047F00027D00047B0002790004790102780004780102 - 7601047901028000048400028200048200028000048000027F00047D00027B00 - 0479010279000478010276010476010276010476010475020575020574000571 - 00037000036D00016C00026900006B0003690102670003670102660103660202 - 6401036202026104016003006203006301016400006300006100025E00015D00 - 025D00005F00006400006D00007600007F010080010080000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018200018000017F00017D - 01017B01017D01017F00018200018500008700028700027F0000790101730402 - 6B02005A00004400003D00003F00004302044201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004001033800004A070A3A00004B090A3A00004406063A00003C0301360000 - 4A0A064200005F090958000072070A7500037E00008501018700028300018200 - 047C00066E00055D00005300024400005008084300006109095C00007706097A - 0003840002870001870002870001870002860001860002840001820002800001 - 8000027F00017F00027F00017D00028000018700028B00018900028900018900 - 028700018700028600018400028200018200028000018000028000017F00027F - 00027D00027B00027C01057C01037C01057B03047B02067A0304770205750303 - 7502057303037302057303037103057004036F06036F06037005027002027201 - 047100036E00036D00036B00036900036A00016D00007600007C000084000086 - 0000820001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018200018000017F00017D01017B01017D01017F0001820001850000870002 - 8700027F00007901017304026B02005A00004D02044201034000013D00003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033C00004706083900004D0A0D3A00004A0A0A - 3700003E02023800004508063C0000570C0A5000006F0A0C6800007C03077F00 - 008701018800028600008600047E00057000055F00004E000050050740000057 - 0B0C50000070090C6E0000830205860001890001870001870001870001870001 - 8700018600018400018400018200018200018200018200018000018400018900 - 018D00018B00018B00018B00018B000189000189000187000186000186000186 - 0001860001860001840001840001820002800002810003800103820104810204 - 8203058003057C00017A00017A00017800017A00017800017800017701007706 - 037706037A04037B03037C01037C01057B000578000577010674000574010477 - 00037A00017F0000870001870000820001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018200018000017F00017D01017B01017D0101 - 7F00018200018500008700028700027F00007901017304026B02005A00004600 - 003E00004000014302044201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0C0C3700004307073800003D04023700004D0A07450000670A - 0B5E00007A060B7900027F00008501018700028500008400047E00056E00055B - 00004F01023E00004D0A09420000630B0B5E00007E060A7E0000840001860000 - 8600008600008600008600008600008400008400008400008400008400008200 - 0082000082000084000086000087000087000087000087000087000086000086 - 0000860000840000840000840000840000840000840000840001830003830003 - 8300038100038300038000028000028000027F00017F00017F00017E00017F00 - 017E00017E00017C00007B04027B05007E03018101028300038300058200057F - 00057D01077B01077A01057B00047F0002840001870001880002820001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001820001800001 - 7F00017D01017B01017D01017F00018200018500008700028700027F00007901 - 017304026B02005A00004C01034201034000013D00003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B3900004709093600003C03023800 - 004407053C000059090853000072070A7100008002077E000081030085000283 - 00008200047C01056D00035A0000470000460605390000520B084C00006E0809 - 7200008302058200018200008200008200008200008200008200008200008200 - 0082000082000082000082000080010082000082000082000082000082000082 - 0000820000820000800100800100800100800100820000820000820000820000 - 8200008200008402038300038300038200028100018100018000008000008300 - 038300038300038300038300038300038300038101027D02007D020082000084 - 00008700028700028600048200058200077E00067E00057D0004800002840002 - 8A00028800028200018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018200018000017F00017D01017B01017D01017F00018200018500 - 008700028700027F00007901017304026B02005A00004500003E000040000143 - 02044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004507 - 073600003E05043800003B04013800004B06034800006504066600007C02087E - 00037C01007E03008101027F00007F0004790105690003560000470101380000 - 4208033B00005A07055F00007B04057E00017F00017D02007D02007D02007D02 - 007D02007F01007F01007F01007F01008001008001008001007F01008001007F - 01007B02007902007902007902007B02007B02007B02007B02007B02007B0200 - 7D02007D02007D02007D02007D02007F01008001028101028101028000018000 - 0180000181000081000083010283010285000285000285000285000285000283 - 01027E00007E01008300008600008900028900028700048400048300067F0005 - 7D00047E00038000028400028800028901038200018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018200018000017F00017D01017B01 - 017D01017F00018200018500008700028700027F00007901017304026B02005A - 00004E03054302044100023D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004002023900003A01003A01003F020043000053 - 01005C00006E00047700037E01037A01007C03018001027F00007F0004790105 - 6700035400004300003B02003800004404005000006703037600028001037D01 - 017D02007D02007D02007D02007D02007D02007D02007F01007F01007F01007F - 01007F01007F01007F01007D0200790200780300790200790200790200790200 - 7902007902007B02007B02007B02007B02007D02007D02007D02007D02007F00 - 017F000181010281010281010281010283010284020382000182000182000182 - 00018400018200018400018200017F00007F0000840000860001870001870002 - 8600028400048200047F00037E00037E00017F00018200028700028801038200 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018200 - 018000017F00017D01017B01017D01017F00018200018500008700028700027F - 00007901017304026B02005A00004600003E00004000014302044000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000014000003F00004301023F00004300033E00003F00023C - 00013B00003E00004802024B00005D00006900007A02067A00017A01007E0301 - 8101028100008000047A01056900035600004400003C01003F04024000005600 - 006700007D02068100018000017F00017F00017F00017F00017F00017F00017F - 00018000018000018000018000018000018000018000017F00017F00017D0101 - 7F00017F00017F00017F00017F00017F00017F00017F00017F00017F00017F00 - 017F00017F00017F000180000180000180000180000180000180000180000180 - 0001800001800001800001800001820001800001820001800001800001800001 - 8200018200018200018200018200018200028000028000028000028000018000 - 0180000182000182000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018200018000017F00017D01017B01017D01017F000182 - 00018500008700028700027F00007901017304026B02005A00004C0103420103 - 4000013D00003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004101013F00004404033B000048 - 06073A00004605073C00003F00043A0000460606410000540403540000710608 - 7300007C02027A00007E03018301028100008200047A01056B00055600004500 - 004407053800004906054F00006F06097A000183000382000280000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018200018000017F00017D - 01017B01017D01017F00018200018500008700028700027F0000790101730402 - 6B02005A00004400003D00003F00004302044201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004202023A00004A08093A00004B080B3900004604093C00013D01023C0000 - 4F090A4700006507086300007C07087800007A00007E03018301028100008200 - 047A01056B00055600004800003A0000460B093C000060080861000083050A7F - 0000820002800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018200018000017F00017D01017B01017D01017F0001820001850000870002 - 8700027F00007901017304026B02005A00004D02044201034000013D00003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004202023E00004707063A00004D0B0C3A00004A090B - 3900004000053900004808083E0000590908530000750A0C7000007D03037A00 - 007E03018301028100008200047A01056B00055600004400004609073500004E - 0B0A4E0000730A0D770000840104820002800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018200018000017F00017D01017B01017D0101 - 7F00018200018500008700028700027F00007901017304026B02005A00004600 - 003E00004000014302044201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420202390000 - 4B090A3A00004D0A0D39000047050A3C00013D01023B0000510B0C4700006709 - 0A6100007E090A7800007A00007E03018301028100008200047A01056B000556 - 0000480000390000480D0B3C0000620A0A5F000085070C7F0000820002800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001820001800001 - 7F00017D01017B01017D01017F00018200018500008700028700027F00007901 - 017304026B02005A00004C01034201034000013D00003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004202023E00004606053A00004B090A3A000049080A3A00004000053900 - 004707073E000057070653000074090B7100007C02027A00007E030183010281 - 00008200047A01056B00055600004400004508063500004C09084E000072090C - 7800008300038200028000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018200018000017F00017D01017B01017D01017F00018200018500 - 008700028700027F00007901017304026B02005A00004500003E000040000143 - 02044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004101013C00004705063A00004805 - 083A00004402073D00023C00013E00004C06074700006103046500007B060779 - 00007A00007E03018301028100008200047A01056B00055600004700003C0000 - 4308063C00005C04046300008204098000008200028000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018200018000017F00017D01017B01 - 017D01017F00018200018500008700028700027F00007901017304026B02005A - 00004E03054302044100023D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000004000 - 004101003F00004301023F00004201033F00023E00033A00004303034400004F - 00005800006D02047500017B01017A00007E03018301028100008200047A0105 - 6B00055600004500004104023B00004401005300006B02057C00038200028200 - 0280000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018200 - 018000017F00017D01017B01017D01017F00018200018500008700028700027F - 00007901017304026B02005A00004600003E00004000014302044000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000004000003F00004301023F00004300033E00004100043E - 00033B00004000004802034B00005D00006900007803047A00007A00007E0301 - 8301028100008200047A01056B00055600004600003E01003F04024000005800 - 006700017F010681000182000280000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018200018000017F00017D01017B01017D01017F000182 - 00018500008700028700027F00007901017304026B02005A00004C0103420103 - 4000013D00003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004101013F00004404033B000048 - 06073A00004605073C00003F00043A0000460606410000540403540000710608 - 7300007C02027A00007E03018301028100008200047A01056B00055600004500 - 004407053800004906054F00006F06097A000183000382000280000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018200018000017F00017D - 01017B01017D01017F00018200018500008700028700027F0000790101730402 - 6B02005A00004400003D00003F00004302044201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004202023A00004A08093A00004B080B3900004604093C00013D01023C0000 - 4F090A4700006507086300007C07087800007A00007E03018301028100008200 - 047A01056B00055600004800003A0000460B093C000060080861000083050A7F - 0000820002800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018200018000017F00017D01017B01017D01017F0001820001850000870002 - 8700027F00007901017304026B02005A00004D02044201034000013D00003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004202023E00004707063A00004D0B0C3A00004A090B - 3900004000053900004808083E0000590908530000750A0C7000007D03037A00 - 007E03018301028100008200047A01056B00055600004400004609073500004E - 0B0A4E0000730A0D770000840104820002800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018200018000017F00017D01017B01017D0101 - 7F00018200018500008700028700027F00007901017304026B02005A00004600 - 003E00004000014302044201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420202390000 - 4B090A3A00004D0A0D39000047050A3C00013D01023B0000510B0C4700006709 - 0A6100007E090A7800007A00007E03018301028100008200047A01056B000556 - 0000480000390000480D0B3C0000620A0A5F000085070C7F0000820002800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001820001800001 - 7F00017D01017B01017D01017F00018200018500008700028700027F00007901 - 017304026B02005A00004C01034201034000013D00003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004202023E00004606053A00004B090A3A000049080A3A00004000053900 - 004707073E000057070653000074090B7100007C02027A00007E030183010281 - 00008200047A01056B00055600004400004508063500004C09084E000072090C - 7800008300038200028000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018200018000017F00017D01017B01017D01017F00018200018500 - 008700028700027F00007901017304026B02005A00004500003E000040000143 - 02044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004101013C00004705063A00004805 - 083A00004402073D00023C00013E00004C06074700006103046500007B060779 - 00007A00007E03018301028100008200047A01056B00055600004700003C0000 - 4308063C00005C04046300008204098000008200028000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018200018000017F00017D01017B01 - 017D01017F00018200018500008700028700027F00007901017304026B02005A - 00004E03054302044100023D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000004000 - 004101003F00004301023F00004201033F00023E00033A00004303034400004F - 00005800006D02047500017B01017A00007E03018301028100008200047A0105 - 6B00055800004500004104023B00004401005100006B02057A00038200028000 - 0280000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018200 - 018000017F00017D01017D01017D01017F00018000018300008500028301027E - 00007B01017703026E01005D00004700003E00004000014302044000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000004000003F00004301023F00004300033E00004100043E - 00033B00004000004802034B00005D00006900007803047A00007800007C0100 - 8100008200018300057800036800025700004600003E01003F04024000005600 - 006700017D020681000180000280000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000017F00017F00017D01017F00017F - 00017F00017F00017F00017D01017D01017B01017901016D03024F0003420103 - 4000013D00003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004101013F00004404033B000048 - 06073A00004605073C00003F00043A0000460606410000540403540000710608 - 7300007C02027800007A01008100008400018300057A00036B00035A00004700 - 004606053A00004906054D00006D060976000183000380000280000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00017F00017F00017D01017D01017D01017D01017D01017D01017D01017F0001 - 7F00017002024900003D00003F00004302044201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004202023A00004A08093A00004B080B3900004604093C00013D01023C0000 - 4F090A4700006507086300007C07087800007901017A01008100008400018300 - 057A00036B00035B00014A00003C0000480B093C00005C09085F00007F060A7D - 0000800002800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000017F00017F00017F00017F00017F00017F0001 - 7F00017F00017F00018000018000017202025201044201034000013D00003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004202023E00004707063A00004D0B0C3A00004A090B - 3900004000053900004808083E0000590908530000750A0C7000007D03037901 - 017A01008100008300008200047B00046C00045C00024600004808073700004E - 0B0A4A0000700B0D720000820104800002800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018000018000018000018000017F00017F0001 - 7F00017F00018000017F00018000018000018000018000018000017202024B00 - 003E00004000014302044201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420202390000 - 4B090A3A00004D0A0D39000047050A3C00013D01023B0000510B0C4700006709 - 0A6100007E090A7800007A02027A01008000008300008400047D00046F00065E - 00044A00003B00004A0D0B3C00005D0B0A5C00007E090C7C0000800002800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018000018000018000018000017F00017F0001 - 8000018000018000018000018000018000018200018000018200018200018200 - 018200018200017402025100034201034000013D00003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004202023E00004606053A00004B090A3A000049080A3A00004000053900 - 004707073E000057070653000074090B7100007C02027A02027D020080000083 - 00008400047E00057000076001054700004707063700004C09084900006D0A0C - 6F00007E01037F00028000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000017F00017F00018000018000018000018000018200018200018200 - 018200018200018200018200018200018200017402024A00003E000040000143 - 02044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004101013C00004705063A00004805 - 083A00004402073D00023C00013E00004C06074700006103046500007B060779 - 00007A02027D02008000008500008600048000057301086102064A00003F0000 - 4508063C00005705045C00007706097900007F00028000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000017F00017F00018000018000018200 - 0182000184000184000184000184000184000184000182000182000182000174 - 02025302054302044100023D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000004000 - 004101003F00004301023F00004201033F00023E00033A00004303034400004F - 00005800006D02047500017B01017B03037D0200800000840000860004810005 - 7301086403074A00004403023D00004201004C00006403057100037B00027F00 - 0280000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000017F00 - 017F000180000180000182000182000184000184000186000186000184000182 - 00018200018000018000017202024B00003E00004000014302044000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000004000003F00004301023F00004300033E00004100043E - 00033B00004000004802034B00005D00006900007803047A00007901017D0200 - 8200018600018700048000047400076602074D00004200004104023E00005000 - 005900006F01037901027F000280000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000017F00017F000180000182000184000184000186000186 - 00018500008600018500028402038202038102037E0202700403510003420103 - 4000013D00003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004101013F00004404033B000048 - 06073A00004605073C00003F00043A0000460606410000540403540000710608 - 7300007C02027901017D02008200018600018700048200047600076602074D00 - 004704033900004807064500006003046900007A03047D000280000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000017F000180000182000182 - 00018400018400018600018600018700028500028200018000017D01017C0202 - 7A02026C05034700003D00003F00004302044201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004202023A00004A08093A00004B080B3900004604093C00013D01023C0000 - 4F090A4700006507086300007C07087800007901017D02008200018600018700 - 048200047600076802075200013E0000470A083A000056090750000070050775 - 00017D0002800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001820001840001860001860001870001860001880103830102 - 8000017C00007800007602017203016905034E01044201034000013D00003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004202023E00004707063A00004D0B0C3A00004A090B - 3900004000053900004808083E0000590908530000750A0C7000007D03037901 - 017D02008200018700018900048400047800076802074E00004C06063900004D - 0C0B4300006109096200007904057D0002800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001820001840001840001860001860001 - 8700018600018400018000017E02027A02027403016F02006B02005F02004600 - 003E00004000014302044201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420202390000 - 4B090A3A00004D0A0D39000047050A3C00013D01023B0000510B0C4700006709 - 0A6100007E090A7800007901017D020084000187000189000484000478000769 - 02075400023F00004B0B0A3A0000550A084E00006F07087200007D0002800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001820001820001 - 8400018600018700018700018600018600017F00007E00007B03037905047205 - 036A03006300005700004A01034201034000013D00003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004202023E00004606053A00004B090A3A000049080A3A00004000053900 - 004707073E000057070653000074090B7100007C02027901017D020084000187 - 00018900048400047900076902074F00004B05053900004A0A094300005F0707 - 6100007705057D00028000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018200018400018600018600018700018700018600018400017E00 - 007C00007A04037506046E05026502005D00005100004300003E000040000143 - 02044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004101013C00004705063A00004805 - 083A00004402073D00023C00013E00004C06074700006103046500007B060779 - 00007901017D02008400018700018900048400047900076B0107530001420000 - 4606053900005005035100006A04057301017D00028000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018200018400018600018600018700 - 018700018600018400018101027C02027403016E03006602005F010058000050 - 00004A04054302044100023D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000004000 - 004101003F00004301023F00004201033F00023E00033A00004303034600004F - 00005800006D02047700017B00027B01017F0001840001860001860002820004 - 7D00056F01075100004701023F00004202014400005401006700007702037D01 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001820001820001820001820001800001800001 - 7F00017F00017F00017F00017F00017F00017F00017F00017F00018000018200 - 018200018400018400018600018600018400018000018006067803046D010063 - 00005A00005200004E02004C03004000003F00004100014401044000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000003E00003F00004301023F00004300033E00004100043E - 00033D00004000004A01034D00005F00006900007A03047C00017F0002800002 - 8400018200007B02007B01018200027800055400014200004301063B00004202 - 014D00006E03007D02007F000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001820001860002870002 - 8600018400018200017F00017D01017B01017B02007902007902007B02007B02 - 007D02007D02007F01007D00007F00008200008301018301028101028001037B - 00027604046B00026303035200004B01003F00003E04003D0200440203450102 - 4300004000003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004101013D00004205033B000048 - 06073A00004605073C00003F00043C0000470506430000560403560000730608 - 7500007E01037F00048000028400017F01007604007803008400017B00045200 - 004502073B000045050A3500005107036C000082040080000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018200018600028600028400018200018000017F00017D01017B01017B02 - 007B02007B02007B02007D02007F01007F020080020082000082000081020180 - 01027E02027802017301016D01006602026307064D00005107053A0000420705 - 3600003C05023B00003E00004000004402034201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004002023800004A08093A00004B080B3900004604093C00013F00023D0000 - 51080A4900006706086500007E07087A00007F00048000028400017F01007604 - 007803008400017B00045500033C000049060D370000460B094300007507037F - 0100800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000017F00017F00017F00 - 017F00017F00017F00017F000180000180010082000082000084000084000086 - 00008B00038901038402037E01037402026902005F0201570200520503440000 - 4F09093C00004A09083A00004806074100004204043E02023C00003900003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004202023C00004508063A00004D0B0C3A00004A090B - 3700004000053B00004808084000005B0908550000750A0C7000007F02047F00 - 048000028400017F01007604007803008400017B000451000048050A3900004A - 0A0F350000560C08690000830501800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000017F00017B01 - 017B01017B01017D01017F000180000182000184000184000186000186000086 - 00008600008600008600008700018C01048901058102047702036A02035D0100 - 5001004601003F0000430904350000490C0A3A00004D0A094100004703043900 - 003500003701003A04034201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000400202370000 - 4B090A3A00004D0A0D39000045050A3A00013D01023B0000530A0C4700006709 - 0A6100007E090A7800007F00048000028400017F01007604007803008400017B - 00045600043B00004B080F370000470C0A4300007608047E0000800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000017D01017802017602017802017B01017F000182000186000187 - 00018900018B00018B00018900018900018700018700018600018400067E0005 - 7702056C01035F01025301004601003D00003B0401300000420A09330000490B - 0B3A00004C05084200003C04033704013502003200003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004202023C00004606053A00004B090A3A000049080A3800003E01053900 - 004507073E0000570706520000720A0B6F00007C01037F00048000028400017F - 01007604007803008400017B000451000047040939000048080D350000540A06 - 6A00008305018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000017D01017802017602017802017B - 01018000018400018700018B00018D00018D00018B0001890001870001860001 - 8400027D00027200036B00036500045E01025400024C00014300003D00003700 - 003E0704320000440B0A3500004709093B00004002023600003500003702003A - 05024100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004101013C00004705063A00004805 - 083A00004202073B00023A00013C00004C06074500005E040461000079070777 - 00007F00048000028400017F01007604007803008400017B00045500033E0000 - 46030A3700004207054600007305017F01008000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018000018000018000017F - 00017901017802017B01017F00018400018700018B00018D00018D00028B0002 - 8900028600028000027D00027B00047002045800004F00005000024E00014E00 - 024B00014900004600004701023E00004706083600004208093400003B050537 - 00004106044304004102003D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000004000 - 004101003F00004301023F00004201033D00023C00033800003F03034200004D - 00005500006804047101017901027F00048000028400017F0100760400780300 - 8400017B00045300014300053F00034000053900004D03006E00008103008000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000017F00017D01017D0101800001840001870001890001 - 8B00018B00018900028600028200027D00027800047201046F02046204054700 - 003E00004000004300004800014A00014A00004A00004A00014A010343000144 - 03053B00003C03043300003901004200004800004C00004F02004000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000004000003F00004301023F00004300033E00003F00043C - 00033C02033C00004503044800005800006000007002027902037D0004800002 - 8400017F01007604007803008400017B00045400024000024300073B00003E03 - 0149000071030080020080000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001820001840000860000 - 8700018900018800008800008700008400008200047C00037B03076F01036B04 - 075E00005800004B00004000003900003E02033C000043000343000048000149 - 00004900024700004701024000004202023B00003C00004000005000005B0000 - 6101016303033F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004101013F00004404033B000048 - 06073A00004605073A00003B00043900013F06053C00005107054D0000660404 - 6A00007904057D00048000028400017F01007604007803008400017B00045200 - 004502073B000045050A3500005107036C000082040080000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018200018900008A00008900008900008700008600008400028100037900 - 047605086600006706085100005705044700004901013F000040040538000045 - 06083700004406063C00004101014200014804053E00004B03034200004F0505 - 4800005602046200006A00006E00027002024201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004301023B00004C08093C00004B080B3900004205093800013C0304360000 - 4A0A0A4000005C09085600007107067601027D00048000028400017F01007604 - 007803008400017B00045500033C000049060D370000460B094300007507037F - 0100800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018400018B00008C00008B00008700008400 - 008000017D02047904057306086000006508094A00005206073E000048070642 - 00014900034100004E0809390000440B0A3000003B08063101003A0704350000 - 4A07064300005B04075300006C060B6E00047500007900007D00027E02023E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004202023F00004807063C00004F0B0C3A00004A090B - 3500003C0105380000420908390000540D0A4A0000670A096300007806067D00 - 048000028400017F01007604007803008400017B000451000048050A3900004A - 0A0F350000560C08690000830501800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018400018B00 - 008D00008900008400007F00017802016F01016803015F02015F090947000051 - 09093C00004608083600004505054800005504074200004D0B0C3300003D0D09 - 2900003205013101004109043E00005D0A0857000077090B7300008404098000 - 018301028402038402034201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E00004301023A0000 - 4D090A3C00004D0A0D39000043060A3800013D04053400004A0C0C3E00005C0A - 095300007009077301017D00048000028400017F01007604007803008400017B - 00045600043B00004B080F370000470C0A4300007608047E0000800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018200018600008702008402027E05037504026B02005E000055 - 0000530302440000500A0A3A0000490B0B3500004206073F00004E0002490000 - 53080A3C0000480D0B3000003A0A063101003A0300390000580B085200007A0D - 0F6F00008A070A8500008601038602028602028602023E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004202023F00004706053C00004D090A3A000049080A3600003B02053800 - 00400807370000500B084900006408076400007606067D00048000028400017F - 01007604007803008400017B000451000047040939000048080D350000540A06 - 6A00008305018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018001008200008003007B040274 - 06026A03005D0100500000460000430000460703370000480C0C35000047080A - 3800004200024700005003064000004D0A09390000450B063600004004004300 - 00540802520000720E0C6B0000870B0B80000088000286020283010183010183 - 01014100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004200013D00004905063C00004805 - 083A00004003073800023C03043700004507073F00005705045600006D060472 - 02027D00048000028400017F01007604007803008400017B00045500033E0000 - 46030A3700004207054600007305017F01008000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018000018000018000017F - 01007C03017803006E02006602005C01005101004700004000003D0300360000 - 4007053400004607093B00004603084000004200013D00004706053C00004C07 - 044300005003014F00005E04035F00007009076A0000800A097800008305047E - 00007F01007F01007F01007F01004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000004000 - 004101004100004501023F00004001033B00023C00033D01023F03033C000044 - 04004800005902006A00007A03047D00048000028400017F0100760400780300 - 8400017B00045300014300053F00034000053900004D03006E00008103008000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000017F00017F00017F00017F00017F00017F00017F00017F00018000018200 - 018200018200018000018000017F00017F00017F00017F00017F000180000180 - 00018200018200018400017F00017405036A03006100005700004E0000480000 - 4303003F05003A03003904013700003C03023C00004302044200044702054100 - 004202004300004B01004E00005700005900006000006F05047505057400007A - 02027700007E03017B00007E03017D02007C01007E00007C01004000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100023E00003C00003D00004501024100004001033A00003F000441 - 00034800024400003D04033600004003004D0000710101800002800004800002 - 8400017F01007604007803008400017B00045400024000024300073B00003E03 - 0149000071030080020080000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001820001820001 - 8200018200018000018000017F00017D01017D01017D01017D01017D01017D01 - 017D01017D01017F00018602028701018400008100007E00007C01007A000079 - 01017C02027B00008001037C00008500038500008C0105810106600000520000 - 5200004A00004902004100003F02003C01003B03023901003C02033700003E02 - 033B00004100044200004700004E00005300005900006302006A030171030378 - 04037901017D01017F00017F00017F00017F00017F00017F00017F00017F0001 - 8000017F00013F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00003F01013900004005033D00004A - 06073700004206073A00004400044B00004D02043500003C0A04300000510703 - 7000008800048200048000028400017F01007604007803008400017B00045200 - 004502073B000045050A3500005107036C000082040080000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018200018400018200018200018000018000017F00017D01017D01 - 017D01017D01017D01017D01017D01017D01017F000183010185010184000082 - 00008001008001007F00017D01017B000081050578000085080A770000840507 - 7A00007100045400004D03034100004C06063A00004606053A00003D01013800 - 003D03043700004607093800004605073B00004700005000005700005E000064 - 01006B02007203017A02027F0303800001820001820001820001800001800001 - 7F00017F00018000018000018000018000014201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073C - 00003C03023600004C08093C000048090B3500004404094100014E0003440000 - 430A092E0000410D074300007904058500018200048000028400017F01007604 - 007803008400017B00045500033C000049060D370000460B094300007507037F - 0100800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018200018200018200018200018000 - 018000018000017F00017F00017F00017F00017F00017F00017F00017F00017F - 00017E03018002018102018501018700028800028A00028B00038700037A0000 - 850A0C6B0000770C0E5D00006404045100004C00013F00004C08093A00004A0A - 0A3700004406063C00003C00003700004909093A00004F0B0C3E00004C030548 - 00005801006002006502006902006F02007602017C0202800102800001820001 - 8200018200018000018000017F00017F00018000018000018000018000013E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004002023800004308063C00004F0B0C370000460A0B - 3700004500054A0000500507330000410F09300000560C086D00008901058200 - 048000028400017F01007604007803008400017B000451000048050A3900004A - 0A0F350000560C08690000830501800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018200 - 0182000182000182000180000180000180000182000182000182000182000182 - 00018200018200018200018000017D02007D02008102018802028B00038D0003 - 8F00038D000385000187080A6A0000740F0D5000005A0B084000004202003F00 - 004707073900004C0C0C370000480A0A3700004202023D00004706053E000055 - 0B0B430000570A084900005702006104016804006C0300700301740301790101 - 7E02028101028200018200018200018200018000017F00017D01017D01018000 - 018000018000018000014201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083C00003C0302350000 - 4D090A3C00004A0B0D35000045050A4100014F0004430000450C0B2E0000420E - 084300007A05068400008200048000028400017F01007604007803008400017B - 00045600043B00004B080F370000470C0A4300007608047E0000800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000182000182000182000184 - 0001840001840001860001860001860001860001860001840001820001800001 - 8500028801038B00048B00048800038400028204096E0000700A0B4E0000550B - 093700003E0A043300003B0203350000460A0B350000480C0C3700004707063F - 00004903034300005508064900005E08084E00006309085F02006A0602700502 - 7304027703027A02027E02028000018200018200018400018200018200018000 - 017F00017D01017D01018000018000018000018000013E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004002023800004207053C00004D090A37000045090A3800004500054A00 - 004F04063300003F0D07300000540A066E00008901058200048000028400017F - 01007604007803008400017B000451000047040939000048080D350000540A06 - 6A00008305018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001820001840001840001860001860001870001870001870001870001870001 - 8700018700018500008600018700028601038300038000027900007300006E01 - 036A08084C00005107053900003E0A042D00003708043300003F060932000044 - 0A0B3500004909093B00004701014B00005506034C00006108045300006B0A07 - 6200006F08057104027504027903027A02027E02028101028200018400018400 - 018400018200018000018000017F00017D01017D01017F000180000180000180 - 00014100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053D00003B02013800004905063C00004506 - 083600004202074200024E00034600004007062E00003D090346000077020385 - 00018200048000028400017F01007604007803008400017B00045500033E0000 - 46030A3700004207054600007305017F01008000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00017F00017F0001800001800001820001840001860001870001870001890001 - 8900018900018700018700018700018900018A00018B00028700038001037800 - 046E00026300005900005503024700004906033900004005033300003E07043A - 02013802023300003F06093300004507073B00004B0303490000520000520000 - 6205025E00007009066900007709057403007802017B01017D01017F00018000 - 018200018500028700028600018400018200018000018000017F00017D01017D - 01017F00018000018000018000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00003E00003A01 - 003D02004100004501023C00003E02033D00024300034C00014B000239000037 - 05003400004D03007200008700038200048000028400017F0100760400780300 - 8400017B00045300014300053F00034000053900004D03006E00008103008000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000017F00017F0001800001800001840001840001 - 8600018700018700018700018700018700018600018600018600018600018600 - 018600028001037702056A02035F02015100004800004000003C02003700003C - 03013900004003014000004002023A00013A01043800014001033F0000490101 - 4B00005100005400005E00006600007207037504017B09037903007B03007E00 - 007F00007F000082000184000186000187000287000286000184000182000180 - 00018000017F00017D01017D01017F00018000018000018000014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100023E00003A01003B00004501024100004001033A00003F000443 - 00034D00024800003D0403320000390500490000750001860002820004800002 - 8400017F01007604007803008400017B00045400024000024300073B00003E03 - 0149000071030080020080000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018000018000018000018000017F00017F0001 - 8000018000018400018400018600018600018801038700028600018300008100 - 007F00007F00007F00017E03057601047204066300005C02024D00004801003E - 00003C01003700003D04033B00004404044300004802034600014102043E0203 - 4100024300004600004A00004E00005600006604046B04027203017603007902 - 007D02007F020080020082000084000184000186000186000186000186000186 - 00018400018400018200018000018000017F00017D01017D01017F0001800001 - 8000018000013F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00003F01013900004005033D00004A - 06073700004206073A00004400044B00004D02043500003C0A04300000510703 - 7000008800048200048000028400017F01007604007803008400017B00045200 - 004502073B000045050A3500005107036C000082040080000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000017F00017F00018000018200018400018400018600018600018400 - 018400018200017F00017D01017A02027903027303036400006205045500005C - 06064900004F05034100004201003C00004205033900004808083B00004C0607 - 4400004900024300004300004700004B00004F00005500005C00006200006D03 - 027203017803007B02007F020080020082020084010086000086000186000186 - 00018700018600018600018400018400018200018200018000017F00017F0001 - 7D01017F00018000018000018000018000014201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073C - 00003C03023600004C08093C000048090B3500004404094100014E0003440000 - 430A092E0000410D074300007904058500018200048000028400017F01007604 - 007803008400017B00045500033C000049060D370000460B094300007507037F - 0100800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018200018200018400 - 018400018400018400018000007D00007D01017A020275040272050370050265 - 06034B01003C00004B08073E00005109094200005003064900004C0002450000 - 52060A4000004F080B3C00004603064000004800004C00005000005500005D00 - 016402026903047004037402027802017D02007F010082010084010084010086 - 0100860000870001870001870001860001860001860001840001840001820001 - 8200018000017F00017F00017F00017F00018000018000018000018000013E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004002023800004308063C00004F0B0C370000460A0B - 3700004500054A0000500507330000410F09300000560C086D00008901058200 - 048000028400017F01007604007803008400017B000451000048050A3900004A - 0A0F350000560C08690000830501800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018200018200018200018400018400018200018000017E000078000076020171 - 04026E05026805016305005605003A00003A0802320000490C0A3C0000510909 - 4600005300034F000057030747000055080C4000004C070A3900004700035000 - 005700005C00006000006802037004037505057A06057901017D010180010082 - 0000840100840100860100860000870001870001870001860001860001840001 - 8400018200018200018200018000018000017F00017F00017F00017F00018000 - 018000018000018000014201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083C00003C0302350000 - 4D090A3C00004A0B0D35000045050A4100014F0004430000450C0B2E0000420E - 084300007A05068400008200048000028400017F01007604007803008400017B - 00045600043B00004B080F370000470C0A4300007608047E0000800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018200018400018400018400018400018200018000017F - 00017B03037605037005026905016004005C04005403004903003C05002C0000 - 400D0B3300004C0C0C3E00005104084A000052000548000056060D4300005208 - 0E3E000048050A4800005C00006500006A00006D01007202027903027D030380 - 0404800001820000840000840000860000860000860000860000860001860001 - 8600018400018400018400018400018200018200018000018000018000018000 - 018000018000018000018000018000018000018000013E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004002023800004207053C00004D090A37000045090A3800004500054A00 - 004F04063300003F0D07300000540A066E00008901058200048000028400017F - 01007604007803008400017B000451000047040939000048080D350000540A06 - 6A00008305018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000182000184000184000184000184 - 00018400018200018000017B01017A06057205036905015F03005602004F0100 - 4901004302003B03003F0A07330000460D0C3700004909093B00004400024500 - 014E040842000052050C42000053060D46000057020668030171030075010078 - 03007B0101800102810102850002860000860000860000860000860000860000 - 8600008600008600018400018400018400018400018200018200018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00014100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053D00003B02013800004905063C00004506 - 083600004202074200024E00034600004007062E00003D090346000077020385 - 00018200048000028400017F01007604007803008400017B00045500033E0000 - 46030A3700004207054600007305017F01008000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000182 - 00018400018600018600018600018400018200017F00017901017706046D0401 - 6002005600004D00004601004103004203004802024300004A06073A00004307 - 073400003905053400003A03063700004604093E000052030C4D00015D040E62 - 00067202027903007D02007F0200800100840000860000870000890000890000 - 8900018700018600018600018400018400018400018400018400018200018200 - 018000018000017F00017F00017F00017F00017F000180000180000180000180 - 00018000018000018000018000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00003E00003A01 - 003D02004100004501023C00003E02033D00024300034C00014B000239000037 - 05003400004D03007200008700038200048000028400017F0100760400780300 - 8400017B00045300014300053F00034000053900004D03006E00008103008000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018001 - 0080010080010080010082000182000182000182000182000182000182000180 - 00018000018000018000018000018400018400018200018000017D0101790101 - 7403016F03026905035F04005501004C00004600004100004103004305004400 - 004800014100004202023800003B03023600003802013B010242010345000050 - 00025600006300086700077202097800007E0100800100820100840000860000 - 8701018800018700008700008700018600018600018400018200018200018200 - 018200018200018200018000018000017F00017F00017F00017F00017F00017F - 00018000018000018000018000018000018000018000018000014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100023E00003A01003B00004501024100004001033A00003F000443 - 00034D00024800003D0403320000390500490000750001860002820004800002 - 8400017F01007604007803008400017B00045400024000024300073B00003E03 - 0149000071030080020080000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018001007F020080020080020082010084000084000086000086 - 00008701018701018500028200018000017F00007E00017E0001830102810102 - 8205077702037307066400005A01004F00004A00004600004702004100004302 - 013F00004201004000003C02033900013C03043900003F03033F00004701014A - 00004F00005800006301016C01037503037902037D00027E00007F0001800100 - 8000018001008200018200018200018200018200018200018200018200018200 - 0182000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000013F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00003F01013900004005033D00004A - 06073700004206073A00004400044B00004D02043500003C0A04300000510703 - 7000008800048200048000028400017F01007604007803008400017B00045200 - 004502073B000045050A3500005107036C000082040080000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018001007F02007F030080020082 - 0100840100860100860000870000880001870101850002840001820001800001 - 7F00027F00027E0000800606720000770B0A5C00005D09044A00004602003F00 - 004006013600004308063700004606063D00004100023701013B060933000042 - 08093A00004D05054A00005600005E0000660000700000790101800201830101 - 8601008500008200018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000014201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073C - 00003C03023600004C08093C000048090B3500004404094100014E0003440000 - 430A092E0000410D074300007904058500018200048000028400017F01007604 - 007803008400017B00045500033C000049060D370000460B094300007507037F - 0100800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018000018000018000017F - 01007D02007B03007D02007F0200800100820000840000860000860001860001 - 8400018500028300038100038100037E01037B03046E000076090B5B0000670B - 0A4A00005006043F0000400301340000430A0935000048090B3900004704073F - 00003F030437000048090B3A000052090B4500005805045900006501016B0100 - 7402027A02028103028301018401008300008200018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000013E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004002023800004308063C00004F0B0C370000460A0B - 3700004500054A0000500507330000410F09300000560C086D00008901058200 - 048000028400017F01007604007803008400017B000451000048050A3900004A - 0A0F350000560C08690000830501800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000017F00017B02007903007B03007D02007F0100800100 - 8200008200008400018400018200018200018100038001038001037A02036E00 - 006F0708590000670B0A4A0000550A083F00004404033A000041080633000048 - 0C0C3700004A090B3C00004500033F00004B0407420000570A0D470000610A0D - 5700006604046B03047103037804037B03038103028102018401008400008200 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000014201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083C00003C0302350000 - 4D090A3C00004A0B0D35000045050A4100014F0004430000450C0B2E0000420E - 084300007A05068400008200048000028400017F01007604007803008400017B - 00045600043B00004B080F370000470C0A4300007608047E0000800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018000018000018000017F00017B0200790200 - 7B02007D02007D02007F01007F00018000017F00017F00017F00027F00027D00 - 047B00047B000474010468020356000060080849000055090A3E00004808073B - 00003C0302320000440A0B3500004A0B0D3900004A05084500004D00004A0000 - 5D060A4E00006A0C10590000700B0D6B03047204067604047A04037D03037F04 - 0281020182000082000080000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000013E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004002023800004207053C00004D090A37000045090A3800004500054A00 - 004F04063300003F0D07300000540A066E00008901058200048000028400017F - 01007604007803008400017B000451000047040939000048080D350000540A06 - 6A00008305018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000017F00017D02007D02007D02007D02007D02007D01017D01017D01017A00 - 017A00017800017700017200027000026F000168000258000056060745000050 - 08083C00004808073700003E050438000040070635000048090B3900004C070A - 3F00004E00035400006400055800006F090E5E0000750C0F6D000278070A7604 - 047902037A02027C02027E030180020181020181020180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00014100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053D00003B02013800004905063C00004506 - 083600004202074200024E00034600004007062E00003D090346000077020385 - 00018200048000028400017F01007604007803008400017B00045500033E0000 - 46030A3700004207054600007305017F01008000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018200018200018200018000017F00 - 017D00027B00027901027601047100036E00026A000165000163000060000059 - 00004C00014200004905063900004507073700003F06053A01003B0102380000 - 4405073A00004A05084100004D01055000006701066A00007405096B00007908 - 0C7000007C070A7901057901027901027B01017D01017F00017F000180020181 - 0201800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00003E00003A01 - 003D02004100004501023C00003E02033D00024300034C00014B000239000037 - 05003400004D03007200008700038200048000028400017F0100760400780300 - 8400017B00045300014300053F00034000053900004D03006E00008103008000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018200018600 - 018700018600018400018000027D00027901027402026F02046802036402025F - 01025800005400005100004A00004100004002023B00003F03033B00003E0504 - 3A01003E02023E00014100024100004700034700004C00024B00005700007203 - 077D03097900057D04087800037D02067A00037B00027D00027C00017C00007C - 00007E00007F0001800201810302800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018000018000018000018000014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100023E00003A01003B00004501024100004001033A00003F000443 - 00034D00024800003D0403320000390500490000750001860002820004800002 - 8400017F01007604007803008400017B00045400024000024300073B00003E03 - 0149000071030080020080000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018400018B00028C00018A00018500018200047C010575020571 - 04066500025B00005802024D00004C02024200004300003D00003B0201380000 - 3D04033900004004043B00004103034101014703044701024800004A00004E00 - 0052000058010563020678000580000480000480000480000480000280000280 - 00027F00027F00017F00017F00017F00017F00017F00017F0001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000013F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00003F01013900004005033D00004A - 06073700004206073A00004400044B00004D02043500003C0A04300000510703 - 7000008800048200048000028400017F01007604007803008400017B00045200 - 004502073B000045050A3500005107036C000082040080000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018400018900008C00018A000386 - 00068000057800046E00026500025900005704034600004D07073A0000420705 - 3500003904013600003D05043400004108073800004707074000004901014900 - 004E00005200005500015A00025E01026001056A01047D000484000284000484 - 00028400028200028200028200028200018000018000017F00017F00017F0001 - 7F00017F00018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000014201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073C - 00003C03023600004C08093C000048090B3500004404094100014E0003440000 - 430A092E0000410D074300007904058500018200048000028400017F01007604 - 007803008400017B00045500033C000049060D370000460B094300007507037F - 0100800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000182 - 00018500008700048600068100077A00066E00036300005A0000530001440000 - 4C0809370000440C0B2E00003B0A083302003A0403340000450A083700004B0A - 094000005004054E00004F00005600005D00006502046A03066C04056B020571 - 0003800002860001860002860001860001840001840001820001820001800001 - 8000018000018000018000017F00017F00018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000013E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004002023800004308063C00004F0B0C370000460A0B - 3700004500054A0000500507330000410F09300000560C086D00008901058200 - 048000028400017F01007604007803008400017B000451000048050A3900004A - 0A0F350000560C08690000830501800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000028000047E00057900057400056C0002630000 - 5A00005100004A00004C0606390000470E0D300000410E0C2E00003906043700 - 004308063900004F0C0B4200005909084D00005C00005C00006300006B000270 - 0403740404740404740202780001820001860001860001840001860001840001 - 8400018400018200018200018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000014201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083C00003C0302350000 - 4D090A3C00004A0B0D35000045050A4100014F0004430000450C0B2E0000420E - 084300007A05068400008200048000028400017F01007604007803008400017B - 00045600043B00004B080F370000470C0A4300007608047E0000800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018000018000018000017D00027603066F0105 - 6800026300005A00005500004F00004A00004B02043C00004C0B0D350000470D - 0E3300004007083800004104023B0000500B084200005C0C0B4E000063060560 - 00006E01037101017601027802017901017B01017D01017F0001820000840000 - 8400008200008400008200008200018200018200018200018200018200018200 - 0182000182000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000013E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004002023800004207053C00004D090A37000045090A3800004500054A00 - 004F04063300003F0D07300000540A066E00008901058200048000028400017F - 01007604007803008400017B000451000047040939000048080D350000540A06 - 6A00008305018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000017901026903045F02035700005000004E00004800004900004701014100 - 004808083900004B0A0C39000049080A3A00004301024100004B06034200005A - 0B084E0000670A096100006F03027904057B03037D01017E00007E0000810000 - 8200008301018200008001008001008001008200008200008200018200018200 - 0182000182000182000182000182000182000182000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00014100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053D00003B02013800004905063C00004506 - 083600004202074200024E00034600004007062E00003D090346000077020385 - 00018200048000028400017F01007604007803008400017B00045500033E0000 - 46030A3700004207054600007305017F01008000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000017601025A00004C00014900004600004300 - 004200004200014202024201033C00004704073D00004D050B4300004F020949 - 00014700004500005506034F00006609086100007408077602017C02027F0100 - 8100008500008500008701008801008603008002007F02007F01007F01008001 - 0080010080010080010080000180000182000182000182000182000182000282 - 0002800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00003E00003A01 - 003D02004100004501023C00003E02033D00024300034C00014B000239000037 - 05003400004D0300720000870003840004820002840001800100760300780300 - 8600027B00045300004300033F00024001033900004D03006E00008102018000 - 0180010080000182000182000182000182000182000182000182000182000182 - 0001820001820001800001800001820001820000820000820000820000820001 - 8000018000017F00017D01017B01017901017802017602017601026B03044F00 - 004600004200004100004101013D01013D01013A01003900003C00013D000046 - 01044600004F0206500003550105510000580000590000640300670000730505 - 7703027F05057C00008000008300008601008801008902008902008603008002 - 007F01007F01007F01007F01007F010080010080010080000180000182000182 - 0001820001820001820002820002800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018000018000018000018000014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100023E00003A01003B00004501024100004001033A00003F000443 - 00034D00024800003D0403320000390500490000750001870002860002860002 - 8700028200017802017901028600027D00045400004000004303023B00003E04 - 0049000071000480000282000182010082000084000086000086000087000087 - 0000870001870001860001860001840002840002820002820001880202890200 - 8902008801008601008300008000007C00007F05057703027305056700006403 - 005900005800005100005000004800004A000442000042030539000138040434 - 02023302003603013B02014101014500004900004D00005500006D0204760201 - 7601027802017901017B01017D01017F00018000018000018200018200008200 - 0082000082000082000080010080000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000013F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00003F01013900004005033D00004A - 06073700004206073A00004400044B00004D02043500003C0A04300000510703 - 7000008900048700028700028700028400027901027901028700047D00045200 - 004505003B00004508043700005306046C000182010680000180020082010084 - 0100860000860000870000870000870001870001870001860001860002840002 - 8200028200018803008802008700008500008500008100007F01007C02027602 - 017408076100006609064F00005506034500004900004800004D000740000049 - 060B3600003E08083200003504023704023802013B0000410000480000500000 - 5500016300007801028000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000014201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073C - 00003C03023600004C08093C000048090B3500004404094100014E0003440000 - 430A092E0000410D074300007904058600018600028600028700028200027901 - 027901028700047D00045700003E00004A0A06370000480B0745000075030A7F - 00037F00017F0200800200800200820000840000860000860000860001860001 - 8600028400028200028000028000028000018301018201008100007E00007E00 - 007D01017B03037904056F0302610000670A094E00005A0A094200004B060341 - 00004301023B000047080A350000440A0B3200003E0605370000400202410000 - 4500004C00005400005C00006401036F02047B00028000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000013E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004002023800004308063C00004F0B0C370000460A0B - 3700004500054A0000500507330000410F09300000560C086D00008901058400 - 028400028600028200027801027901028600047D00045300004A08033A00004C - 0D093900005A0A096B00008301087D01017D02007D02007F0200800100820000 - 8200008400008400018400018400028200028000027F00027F00027D00027D01 - 017B01017B01017901017802017601027101016E01036000006306054E00005C - 0C0B420000500B083B0000410402390000400708320000440B0C330000450909 - 3900004501024900004D00005300005A00006300006A00027001057803067D00 - 0280000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000014201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083C00003C0302350000 - 4D090A3C00004A0B0D35000045050A4100014F0004430000450C0B2E0000420E - 084300007A05068400008200028000028400028000027801027901028600047D - 00045801003D00004C0C083900004B0C0847000078040B7E00037D01017B0200 - 7B02007D02007F01008001008200018200018200018200018200028000028000 - 027F00027F00047B00047700017402027604047404047004036B00026300005C - 00005C00004D00005909084200004F0C0B3900004308063700003906042D0000 - 3F0C0A320000490B0B3A00005005074D00005300005C00006400006C00027400 - 057900057C01057D000480000280000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000013E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004002023800004207053C00004D090A37000045090A3800004500054A00 - 004F04063300003F0D07300000540A066E00008901058000027F00028200027F - 00027601027901028600047D00045300004B07023C00004B0B07390000580807 - 6C00008301087D01017B02007B02007D02007F01008001008200018200018200 - 018200018200028000027F00027F00027D00047900046F01036B03046C030669 - 04066502045D00005600004F00004E00005004054000004B0A09370000450A08 - 3400003A04033302003A09073000004509093C00005408094E00005F01056100 - 006A00007400037A00067F010782010682000480000080000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00014100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053D00003B02013800004905063C00004506 - 083600004202074200024E00034600004007062E00003D090346000077020383 - 00017F00027D00028000027D00027601027801028700047F0004590000420000 - 4906033A00004607034A00007501087F00047D01017D02007F01008001008000 - 018200018200018400018400028200028200048000047F00047F00047D000476 - 01046801046002035E00045A00025700015200004E0000490000490002400000 - 4707073800004108073400003D05043600003A05023600004407053C00005406 - 075200006605096B00037100027700027F000481000584000685000383000180 - 0000800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00003E00003A01 - 003D02004100004501023C00003E02033D00024300034C00014B000239000037 - 05003400004D03007200008500037F00027D00027F00027D0002740202780102 - 8700047F00045700004703004200004203003B00004F02006E00038100067F00 - 017F010080010082000082000184000184000184000184000284000282000480 - 00047F00047D00047D00047400056302065801045200014C00004A0000480000 - 4701024703044101014103033B00003E05043900003D04033800003B02013F02 - 004302014500005000015600006702046D00037803067F010681000583000584 - 0002830001830001810001800002800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018000018000018000018000014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100023E00003A01003B00004501024100004001033A00003F000443 - 00034D00024800003D04033200003905004900007500018400027D00027B0002 - 7F00027D00027601027901028700047F00045A00004501004404003F00004006 - 014C01006E00067E00047F000181000083000083000083000085000085000185 - 00018400048300038400067F00038103097B00057D03097203075700004B0000 - 4C00034700004900034100004100023E00013E02023A01003E05043900003F03 - 033B00004002024100004A00005000005600005D00006800027000027800037F - 00048200048400028400028200028200027F00017D01017D01017F0001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000013F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00003F01013900004005033D00004A - 06073700004206073A00004400044B00004D02043500003C0A04300000510703 - 7000008601047D00027B00027F00027D00027601027901028700047F00045700 - 004A06013C0000450804350000510A076700017E000683000385000285000285 - 000285000285000285000383000383000586050A79000082070B7100007A0409 - 6E00006A00065000004D01054100004A05083A00004405073800003B01023A01 - 003F06053700004507073A00004905064200004C00015A00006100006500016C - 00017200027900047F00048300038400028400028400028200017F00017B0101 - 7901017901017F00018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000014201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073C - 00003C03023600004C08093C000048090B3500004404094100014E0003440000 - 430A092E0000410D074300007904058300017F00027D00028000027F00027801 - 027B00028900048000045A0000400000490A06350000450E094000006C060B77 - 000381000383010283000383000383000381000381000580000581060A770002 - 800A0F67000076080C5F00006900035900005000023F00004C070A3900004809 - 0B3500004007063800003E05043700004808073C000052080845000056060758 - 00006A01047100037300037800047B0004800103830003850003840002840001 - 8200018001007D02007902007803007803007D01018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000013E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004002023800004308063C00004F0B0C370000460A0B - 3700004500054A0000500507330000410F09300000560C086D00008702057F00 - 027D00028200027F00027901027B00028900048000045500004A080337000046 - 0E092E00004F0F0B5B00007701067B00027F00017F00027F00027D00027B0002 - 790004780004740104780A0C620000710C0E5500006406075200005000004700 - 004A05083A00004A0B0D350000440B0A3200003C03023B00004808073E000055 - 0A084900006008085600006703037502057C01057C01057E0103800103800002 - 8200028200018200018200018001007F01007D02007902007803007902007F00 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000014201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083C00003C0302350000 - 4D090A3C00004A0B0D35000045050A4100014F0004430000450C0B2E0000420E - 084300007A05068400008000027F00028400028000027B00027D00028B000480 - 00045B01003D0000480B0732000040100A37000064060A6B0000760104790102 - 7901027801027601027402027002046D02046902055C0000670A0B4C00005D0A - 0C4500005004054300004701023A00004A090B370000480C0C3300004108073A - 00004404033F0000550A084A0000670A0B5900006F07086E00007B00027F0002 - 7F00027F00027F00017F00007F00007F00008000018001007F01007F01007F02 - 007D02007D02007D02007F000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000013E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004002023800004207053C00004D090A37000045090A3800004500054A00 - 004F04063300003F0D07300000540A066E000089010582000280000284000282 - 00027B00027F00028D00048200045A00004B0904350000410D072B0000450B06 - 5300006A00027103057303037303037303037103036E04036A04056505055900 - 005A0404470000540A083C00004A0A093900004104023F000047040739000048 - 0A0A350000430A083400004003003F00005007034A0000670B0A5B0000760A09 - 6E00007B03047E00017F00017F00017E00017E00007E00007D00007D00007F01 - 007F01007F01007F010080020080020082010082010080010080000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00014100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053D00003B02013800004905063C00004506 - 083600004202074200024E00034600004007062E00003D090346000077020385 - 00018200028200028600028400027D00027F00028D00048200045F0302430100 - 4309042E0000340A033300005700036000006B00026B01006B01006902006701 - 026402025F03025B0402510000460000490603380000410A0731000039090535 - 02004101013D00004606063700004307073600004005033F00004601004A0000 - 5D08065C0000770B0A7200008005077E00007E00017E00017E00007C00007A00 - 007A00007B02007B02007B02007D02007F020080020084010086010087010086 - 0100820000800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00003E00003A01 - 003D02004100004501023C00003E02033D00024300034C00014B000239000037 - 05003400004D03007200008700038200028200018400028400027F0002800002 - 8900047F00046003024D06024001003B04002E00003902004900005900005A00 - 005A00005A00005900005500005100004E00004A00004700004502013D00003D - 04023601003805023303003704013E01004101003E00004202013F0000450200 - 4400004A00004E00005801006001007107067503037E06078001028101027F00 - 007E00007C01007F01008600018301027A02027703027901017B010180000182 - 0000860001870000870000860000820001800001820001820001820001820001 - 8400018400018400018400018200018200018200018200018000018000018200 - 0182000182000182000182000182000182000182000182000182000182000182 - 0001820001820001820001820001820001800001820001800001820001800001 - 8200018000018200018000018200018000018200018000018200017F00027901 - 027900048000048400028600028600028200018000017F00017F00017F000180 - 00018000018000017F00017F00018000018000018000018000014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100023E00003A01003B00004501024100004001033A00003F000443 - 00034D00024800003D04033200003905004900007500018400028000017F0100 - 8200018200018200018000028000047800046603055100004800003E00004005 - 033900004100004700004A00014900004B00034500004700034100004100023E - 00013F01013B00003E02023A00004002023C00003F01013D00004006003E0500 - 3F01004000004700005100005A03006405026904026F04017203017602017901 - 017B01017D01017F0100810300780000860A047C00009F00049E040970000071 - 060878050874000085030A8100018500068B050B7F0001820004820002820002 - 8400028600028600028700028900028900028900028900028700028600028600 - 0284000282000282000284000284000284000284000286000286000287000287 - 0002870002870002860002860002840002840002840002840002840002820002 - 8400028200028400028200028400028200028904077700008F0A0D7B00008300 - 017E00008400027A000374080E62000074000090030E8D000296020A84000088 - 070A7901017901017D01018000018200018000017D00027B00027F0001800001 - 8000018000013F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00003F01013900004005033D00004A - 06073700004206073A00004400044B00004D02043500003C0A04300000510703 - 7000008601037F00017D02008001008200008400018000017D00047401046601 - 035B03034500004C06063A00004305053700004001034200024701083B000047 - 040B3700004205093600003A01043900003E0405360000450707390000460405 - 3E00004300004204004104004502004900005201005E02006804007104027602 - 017901017D01017D01017F00017F00017F00017F01007F03008007007B060080 - 0000A00105830000720E0E4D0000530000640307690308740D12620001620003 - 66050966070B6103046104036303036503036703036802036A02036A02036C01 - 036A020368020367030365030363030361040361040363030365030365030365 - 0303670303670303670303670303680203670303670303650303650303650303 - 6503036503036703036703036703036703036703036703036703036703036400 - 006300006D09095D00006A06066000006B07077113145300045F020B921C2777 - 00008A00019000048400017900007802017802017D0101800001840001820001 - 7D00027B00027F00018000018000018000014201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073C - 00003C03023600004C08093C000048090B3500004404094100014E0003440000 - 430A092E0000410D074300007904058300007F00017D02008001008200008400 - 018000017D00047401046904065100005305063E00004B0B0B3700004004043F - 00004700054100004E060C3C00004B080D3900004206073800003F0304370000 - 4509093700004909093A00004504033F00004802004B02005101005802006103 - 006804007104027905047B01017F00018000018200018200018200018000017F - 01007C04008211076300006600008A04048C1615FFEDE7FFFDF5FFFCF7FFFBF8 - FFEBE8FFFBF8FFF4F0FFFDF8FFFDF8FFFDF7FFFFF8FFFFF8FFFFF8FFFEF8FFFE - F8FFFEF8FFFDF8FFFDF8FFFDF8FFFDF8FFFEF8FFFEF8FFFEF8FFFFF8FFFFF8FF - FFF8FFFEF8FFFEF8FFFEF8FFFEF8FFFEF8FFFEF8FFFEF8FFFEF8FFFEF8FFFEF8 - FFFEF8FFFEF8FFFEF8FFFEF8FFFEF8FFFEF8FFFDF8FFFCF8FFFCF8FFFCF8FFFC - F8FFFCF8FFFCF8FFFCF8FFFCF8FFFCF8FFF8F4FFF8F4FFFCF8FFFCF8FFF6F2FF - E8E5FFF9F9FFECF2FFDDE5850E178B040E8600038504097D0204760201780201 - 7F00018400018700018400017F00027D00027F00018000018000018000013E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004002023800004308063C00004F0B0C370000460A0B - 3700004500054A0000500507330000410F09300000560C086D00008702047F00 - 017D02008001008200008400018000017D00047401046500025D050545000052 - 0C0C3900004709093500004303034300014E040A40000051090F3C00004B080B - 3900004001033C00004507073700004C0C0C3A00004A09083C00004A00005301 - 005A02005F03006603006D04017504027A02027F030380000184000184000186 - 00018600018400018400018001007100007D0902740D04740A037F0303610000 - FFF5EEFFFFF7FFFFF6FFFDF6FBF5EEFFFFF9FFFFF9FBFFF8F8FFF9E7F5EAF3FF - FAF2FFFAF3FFFBF5FFFAF7FFFBF7FFFAF9FFFBFAFFFAFAFFFBF9FFFAF7FFFBF7 - FFFAF5FFFBF3FFFAF3FFFBF3FFFAF5FFFBF5FFFAF5FFFBF5FFFAF7FFFBF7FFFA - F7FFFBF7FFFAF7FFFBF7FFFAF7FFFBF7FFFAF5FFFBF5FFFAF5FFFBF7FFFAFCFF - FBFEFFFAFEFFFBFEFFFAFEFFFBFEFFFAFEFFFBFEFFFAFCFDF9FFFFFBFFFFFCFF - FFFBF8F9F5F7F9F3FFFFFCFFFFFBFFFDFBFFF9FBFFF5F9600000770005810106 - 7F01067E06077602017901018200018700018900018700018000027F00028000 - 018000018000018000014201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083C00003C0302350000 - 4D090A3C00004A0B0D35000045050A4100014F0004430000450C0B2E0000420E - 084300007A05068200007F00017D02008001008200008400018000017D000474 - 01046A05075000005507083E00004D0D0D3700004105053E0000470005400000 - 51070B3E00004F0A0D3C00004805083F00004402033A00004D090A3C0000510B - 0B3E00004E06064E00006203006C03007003017504027A02027E020282000183 - 000087000187000187000187000187000186000186000186000097100E7E0000 - 7502006B00007D00006D0909FFFDF7FFFFF8FCFFF8FBFFFBFAFFFBF1FCF4F0FF - F7E5F9EDEDFFF9F1FFFBF3FFFEF7FFFEF9FEFFF9FFFEFAFEFFFAFFFEFCFEFFFC - FEFEFCFEFFFCFEFEFAFEFFFAFFFEF9FEFFF7FFFEF7FFFFF7FFFEF9FEFFFAFFFE - FAFEFFFAFFFEF9FEFFF9FFFEF9FEFFF9FFFEF9FEFFF9FFFEF9FEFFF9FFFEFAFE - FFFAFFFEFAFEFFF9FFFEF3FFFFF2FFFEF2FFFFF2FFFEF2FFFFF2FFFEF2FFFFF2 - FFFEF3FFFFEBF9F7EFFDFCF3FFFFECFAF9F3FFFFF3FFFFDFE7E6F5F4F0FFFCFA - FFF8F95500046F01077F070B6A00006F00007802017D01018600018900018B00 - 018900018200027F00028000018000018000018000013E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004002023800004207053C00004D090A37000045090A3800004500054A00 - 004F04063300003F0D07300000540A066E00008702047F00017D020080010082 - 00008400018000017D00047401046500025C0404450000500A0A390000460808 - 3500004103033F00004904073E00004D080B3C00004C08093F00004701024500 - 004D050542000055090A4500005A0A094E00005F03026F03027903027A02027E - 02028101028400018600008800008B00018B0001890001870001870001860001 - 8600018700019102047C00008408087A0203850107730E10FFF6F2F8F9F0F6FA - F4FBFFFCF0F6F1F1F7F2FBFFFCFBFFFBF3FAF5F9FEFCFFFEFFFFFDFFFFFDFFFF - FDFFFFFDFFFFFCFFFFFCFFFFFCFFFFFCFFFFFCFFFFFCFFFFFDFFFFFDFFFFFDFF - FFFDFFFFFDFFFFFDFFFFFCFFFFFCFFFFFDFFFFFDFFFFFDFFFFFDFFFFFDFFFFFD - FFFFFDFFFFFDFFFFFDFFFFFDFFFFFCFFFFFCFFFFFDFFFDFEFFFAFFFFFBFEFFFA - FFFFFBFEFFFAFFFFFBFEFFFAFFFFFBFEFFEEF3F6F4F7FBFAFFFFFBFEFFFAFFFF - F8FBFFFAFFFFF8FFFCFFFFFBFFF7F54B00026300027D080B740000850D0E7B01 - 017F00018700018D00018D00018900018000027F000280000180000180000180 - 00014100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053D00003B02013800004905063C00004506 - 083600004202074200024E00034600004007062E00003D090346000077020383 - 00007F00017D02008001008200008400018000017D0004740104690406530000 - 5002033F00004808083700003F03033C00003F01013A00004606063900004806 - 073D00004B02044800004C00004C00005804065100006407085A000067060869 - 01027901028000018200018400018600018700018A00028C00028B00018B0001 - 8900018700018400018200018200018600018B00008B00008405067F04067B00 - 00690005FFFAF8FFFFFBFFFFFCFCF0F03020211400011C04061B00001E000221 - 02051B01071901091B00091B00091B00091D00091D00091D00091D00091D0009 - 1D00091B00091B00091B00091B00091B00091D00091D00091D00091B00091B00 - 091901091901091901091901091901091901091B00091B00091D00091D00091D - 00091D00091B00091D00091B00091D00091B00091D00091B00091B0007220710 - 2A0D161B00091700031500033C1F28F8E9EDF4FBF6FDFDF7FFF9F74F090A6D07 - 0C7200007600017700007F00018200018900018D00018D00018700017F00027D - 00027F00018000018000018000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00003E00003A01 - 003D02004100004501023C00003E02033D00024300034C00014B000239000037 - 05003400004D03007200008500027F00017D0200800100820000840001800001 - 7D00047401046702045800004900004802023F00003F01013900003B02013901 - 003A02013800004002023E00004502014800004E00005100005800005B000066 - 01036800007003057002047A03047E00008200008400008500008700018A0002 - 8B00038C01048900018700018600018400018000017F00017F00018200018A00 - 009106097000007E060A7F00066A030AFFFBFBFFFDFAFFF7F7FFFDFE13000020 - 01042400012700003000042900002200011E00011E00011E00011E00011E0001 - 1E00011E00011E00011E00011E00011E00011E00011E00011E00011E00012000 - 012000012000011E00011C00011C00011B00011B00011B00011B00011C00011C - 00011E0001200001200001220001230001230001250001230001250001230001 - 250001230001250001270005250001230001390C15230001250001FFFBFFFAFE - F9FEFEF8FFFBF94C030570060C6B0000890B107E00008000018600018B00018F - 00018D00018600017D00027901027F00018000018000018000014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100023E00003A01003B00004501024100004001033A00003F000443 - 00034D00024800003D04033200003905004900007500018400017F00017D0200 - 8001008200008400018000017D00047401046803055500004D00004300004404 - 043B00003C00003A01003704013303003904013700004202014200004C000052 - 00006103046703036E01037401047900047E0103800103830003840001860001 - 8600018600018600018700018700018600018600018400018000017F00017D01 - 017B01017B01017D01018100007D01016F03026A02037501085D0308FFFDFBFB - FFFCFFFFFEFFFEFF1E0B0E1C01052F060D2900023D09102E00022E050A1E0000 - 39161A2200032A070B1F00002D0A0E2200033C191D1E00002D0A0E2704082C09 - 0D1E000027040823000231090E2A0207310C101E00002D0C101E00013112151B - 00002B0C0F1B00002B0A0E1F00022F0C102400032D050A25000132060C250000 - 43151B25000035070D2500003F111725000032040A2C000634060C2700013608 - 0E27000135070DFFFBFCFFFEFBFFFFFBFFFAF957060971000680000483000385 - 00038400018700018D00018D00018B00018400017801027601027D0101800001 - 8000018000013F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00003F01013900004005033D00004A - 06073700004206073A00004400044B00004D02043500003C0A04300000510703 - 7000008601037F00017D02008001008200008400018000017D00047401046601 - 035B03034500004C06063A00004305053700003C030236030038080432000040 - 05033C00005005034F00005E02016802036F01037700037D0002820002870003 - 8A00038A00038600018600018600018400018400018400018400018400018200 - 018000017D01017B01017901017802017802017901017F00007B01016D030268 - 0203710108590408FFFEFBF8FFFCF6FBF9FCFAFA100305130000200004230000 - 2F01072700002300002501012000001F00002604042200002402021E00001E00 - 002A08083715151E00001E00002301012000002200002300002300002200002F - 0B0B1E00001C00001B00002C0E0D1C00002608071C00001E0000200000220000 - 2300002B0304280001230000230000391112240000320A0B2300002300002400 - 00230000270000230000290102230000270000FFF8F7FFFEFAFFFEFBFFF8F95E - 04097700068400048600038800038600018700018B00018D0001890001820001 - 7601027402027D01018000018000018000014201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073C - 00003C03023600004C08093C000048090B3500004404094100014E0003440000 - 430A092E0000410D074300007904058300007F00017D02008001008200008400 - 018000017D00047401046904065100005305063E00004B0B0B37000040040439 - 00003E07043400004508043A00005107054900006509086703036F0103770001 - 7D00028400028700028B00019000028E00028700018400018400018200018200 - 018200018000018000017F00017D01017B01017901017901017802017802017B - 01018500008400017402026F01037900085D0308FFFDFBFAFFFCFAFFFEFDFFFE - 140E0F110305210B0D1B00012E0D112100002B070729060334110E200000300F - 0C2403001D00002809063314112203002706031E000045221F20000039131122 - 00003A13112400003812102805022E0D0A1C0000270A061900002005011B0000 - 341512270603401D1A22000038110F220000300F0C1B00002E110D1B00002A0D - 091C000030130F1B0000270A06230602290C081D00002B0E0A1D0000290C08FF - FDF9FFFDFAFFFCFBFFF7F96303097A0006870004860003880003860001860001 - 8900018B00018700018000017601027402027D01018000018000018000013E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004002023800004308063C00004F0B0C370000460A0B - 3700004500054A0000500507330000410F09300000560C086D00008702047F00 - 017D02008001008200008400018000017D00047401046500025D050545000052 - 0C0C3900004709093500004104023E00004A0704400000580B084A0000680C0B - 6200007408077601027D00028200028600018900018D00018F00018D00018600 - 018400018200018200018000018000017F00017F00017D01017D01017B01017B - 01017901017901017802017F00018A00008B00007B0101770001800006660207 - FFFCF9FFFFFBFAFBF7FCFAF90C04040C00001601031500001F04071900001B00 - 002A0D081B00001900001E05011A02001500001500001500009A847E8A716DD9 - C1BBD9BEBAFFFDF8FFFDF91C00001E00002D0D081C0000190000170000150000 - 1D09049E8C85FFFEF998857E1903001700001B000032140F2B0A071E00002003 - 001900002106021E04001C01001900001E03002B110B1A00001900001D020019 - 00001F04001900001D0200FFFAF5FFFDFAFFFCFBFFF6F9650309780006860004 - 8500038500038200018400018700018900018700018000017801027601027D01 - 018000018000018000014201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083C00003C0302350000 - 4D090A3C00004A0B0D35000045050A4100014F0004430000450C0B2E0000420E - 084300007A05068200007F00017D02008001008200008400018000017D000474 - 01046A05075000005507083E00004D0D0D3700004105053F00004D00004C0000 - 610A08520000710F0F610000780A0A7500017B00028000018200018400018700 - 018700008900008700008400018200018200018200018000018000017F00017F - 00017F00017F00017D01017D01017D01017D01017D0101840001910000920000 - 8400017F00018800066F0107FFFAF9FFFFFBFFFFFCFFFEFC1F0D0C180302250B - 0B1B00002D0E0F1C00002613100E00000C0000110700180F0B090100A39D98CE - C8C1FFFFFBFFFBF4FFFFFBCBC3BCB8ADA9FFFFF9BFB0AD1F0F09271411120000 - 251613100400180D099A948DFFFDF8F3F1E9FFFEF9FFFFF9FFFAF58B837C1F13 - 0F0E00001502001E0803280C0B1B00002D0F0E1B0000381A191B00002A0C0B1B - 0000260807230602290B0A1D00002B0D0C1D0000290B0AFFFDFBFFFDFAFFFCFB - FFF7F96204097500067F00047E00038001037D01017F00018600018700018700 - 018200017901027801027F00018000018000018000013E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004002023800004207053C00004D090A37000045090A3800004500054A00 - 004F04063300003F0D07300000540A066E00008702047F00017D020080010082 - 00008400018000017D00047401046500025C0404450000500A0A390000460808 - 350000480202550000690304600000790C0E690000800B0C7300007E01038001 - 0281010282000182000182000082000081000081000082000182000182000182 - 00018200018000018000017F0001800001800001800001800001800001800001 - 8000018600008E00008D00007F01007C00008700056F0105FFFBF8FFFFF9FFF9 - F6FFF7F61803021700001E00001C00002604051B00001200000F0200160A0809 - 0000918A87FAF5F2FFFFFCAFACA87A7773787571787370FFFFFCD9D0CD8B7F7D - 1306040E00001000001001001B0E0C090000D6CFCCBAB7B3878682848581F7F8 - F40C0B0784817DC4BDBAFFFFFCC1B4B2A492911300001A00001C00001E00001E - 00001C00001C00002000012303041D00001C00002000011C00002202031C0000 - 200001FFF7F7FFFDFAFFFDFBFFF8F95C05096E00067900047700037902037802 - 017B01018200018700018700018600017D00027B00027F000180000180000180 - 00014100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053D00003B02013800004905063C00004506 - 083600004202074200024E00034600004007062E00003D090346000077020383 - 00007F00017D02008001008200008400018000017D0004740104690406530000 - 5002033F00004808083700003F03034900006801047100007D06077300008508 - 0A7A00008404057E00008301028101028002017D02007D02007A01007801007A - 0100800001840001840001820001820001820001820001800001820001820001 - 8200018200018400018400018600018400008100007B03006F04006E03007C01 - 05660305FFFCF8FFFFF9FFFFFBFFFEFB240D0B1E02012A0B0A220000340E0E21 - 0000290C0F291216715C5FFFFCFFFFF7FAFFFDFF8C7F81180B0D180B0D241719 - 1507091302051C090C1200001600031B02062E1317170000967D81FFFBFE8F7E - 81140709090000867E7FFFFEFF090000180B0D120104180306957E82FFF9FDFF - F4F991717629090E1B00001B000046262B1B000023030823030826060B230308 - 29090E1D00022B0B101D000229090EFFFCFEFFFEFBFFFEFBFFF9F95506096701 - 067201047100037303037203017602018000018600018900018700018200027F - 00028000018000018000018000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00003E00003A01 - 003D02003F00004501023C00004001033D00004100014700014701023900003B - 04013900004F02006C00007E01037F00017F01008001008200008000017F0001 - 7901027201046802035D00005000005101004B00004B00004700005600007403 - 068203057D00008100037C00008300038000008301028301028101028002017D - 02007B0200780100770200780100800001820001840001820001820001820001 - 8200018200018200018200018200018400018400018400018600018200007C01 - 007404006B05006C03007A0105640305FFFDF8FFFFF9FFFBF6FFFAF61A03011B - 00002400012000002804041C0000190002FFEDF19D868A917A7EFFF6F9190407 - 120000120000190407120000160003170004150000150000250A0E1700009C80 - 86FFEEF4D6BCC2998287847075FFF1F59E8F93897B7DFFFCFF1406080E000012 - 000020090D1500001A00039C7E83DFBFC4FFF7FCE3C2C99A7C8119000125070C - 1900011900001B00031900001F00051B00002100071B0000210006FFF7FBFFFE - FBFFFEFBFFF9F95506096801067201047100037103037003017403017F000186 - 00018900018900018400018000017F00017F00017F00017F00014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100023E00003C00003B00004202013F00004302013E00004101013E - 00004002023F02004106043D00004802024E00006302046F01037D0002820001 - 8200017F00017D01017901017403017002026B01006500006100006300006A03 - 016D06046F03026E00007B000280000180000180000180000180000180000180 - 00018000018000018000017F00017F00017F00017D01017F0001800001800001 - 8200018000018000018000018000018000018000018000018000018200018200 - 018200018200018000017C0100790200760201770001850006690207FFFCF9FD - FFFBFEFFFAFFFFFC260E0E1C00002E060B300B0D1C0000170201FFFBFC938384 - 180607D6C4C598838513000021090B1F04072B101317000024090C22070A2409 - 0C150000331B1D887274FFF2F59C8B8E958487C0AFB2FFFCFF7D6F712413168D - 7D7EFFFCFF857576322021100000210F101402031F0B0A19040323080B1B0001 - 927479FFFAFDFFFBFF8D727523080C190001290E1217000034161B1B00002C0C - 111C00003E1A20FFF2F5FFFEFBFFFEFBFFF8F95C05096F000679000477000377 - 02037203017403007D02008200008700008700008600008000017A0000790101 - 7901017A02023F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00003F01013B000040050338000047 - 07063C00004706053C00003D02003A0100400705390000490807430000580507 - 5600006A03067D00028400018200017F00017B01017602017203017003016E01 - 006B00006B00006F00007802017B03037D01017C000080000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000017F00017E00007B02007B00027E - 00038800066B0108FFFCF9FAFFFBF3F9F4FFFFFC1500001E0000340C111E0000 - 170000D7C5C49285830B00009A8B89FFFCFB1300001F07071900001900001F00 - 011900001A00001700002A10109D8585FFF2F1D1BFBE180B0D73686AFFF7F992 - 87890B0000887B7DFFFDFEFFFDFEFFF1F2FFFDFEF1E2E09182800C00000D0000 - 271B171000001800022005081500001D0507957D7FA48E90FFFCFEC5AFB1907A - 7C2810121700001900001F00032605091F0000FFFAFDFFFEFBFFFEFBFFF7FB5E - 04097300067F00047C00037A02027403017603007D0200820100870000870000 - 8400008001007B00007A00007D01017E02024201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073C - 00003E0202360000470A083900004D0A093A00004606053A00003D0402360000 - 470C0A3A0000540A0A49000060070A6600027D00028600018400017F00017B01 - 017802017403017203017102006F00006F00007300007A02027E04047E02027D - 0000800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018000018000018000017F - 00017E00007B02007B00027E00038800066B0108FFFCF9FAFFFBFBFFFCFFFEFA - 1C0406300D112800052300043A2020FFEEED0F00001D0E0CC2B3B19D8B8A220D - 0C1500002A1010200606280C0C2004042206062B1111C2AAAAFFFBFA9B86850E - 0000877F80C3BEBF251F20827C7DD5CDCEFFFEFFFFF7F7FBF1F1FFFEFEFFFEFE - FFFEFCFFF6F4FFFEFCBFB3B1877C780C00001702041B05071500011200001B06 - 081200002D181A988385CCB7B9FFFCFED0B5B81C00023011141C0000351216FF - F5F8FFFEFBFFFEFBFFF8FB5E04097500068000047E00037E0202780201790200 - 7F01008400008700018700018400018200018800048900048800038700023E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004002023A00004308063700004C0C0B3C00004B0A09 - 3900003E03013800004209073500004E0D0C4200005C090B5300006A03067F00 - 028600018400018000017D010179010176020174030174030172010073000077 - 01007C0202800404800102800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000017F00017E00007B02007B00027E00038800066B0108 - FFFCF9FAFFFBF9FFFAF7F4F01C04062000012200002200038A70709B87861A08 - 07190706FFF5F4998584150000190101210707170000190000170000907676FF - F2F2A89392120000200C0B0C00000500000202027D7B7BF6F4F4FDF8F9F2EDEE - FFFFFEFFFFFEFFFCFBF2EDECFFF9F6FFFBF8FFFFFCFFF9F6FFFFFBFFFFFB9484 - 851000002210110E000019090A1404050E00000F0000160405150002D0B8BAD5 - BABD1B00001C00001C0000FFFCFEFFFEFBFFFEFBFFF9F95E0409750006840004 - 8300038100037D01017D02008001008400008700018600018000018000018A01 - 058D00048C00038B00024201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083C00003E0202350000 - 480B093900004F0C0B3A00004707063A00003D0402340000470C0A3A0000550B - 0B49000060070A6500017F00028600018400018200017F00017B010179010178 - 02017802017802017800007B01017E0202810203810102800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018000018000018000017F00017E00007B0200 - 7B00027E00038800066B0108FFFCF9FAFFFBF9FFFAFFFFFC20080A1E0000370F - 14240105FEE4E49D8988180403120000FFFDFC8A7272371F1F170000290F0F17 - 00002E1414D8BEBEFFFCFC8B76751803021200001F0D0C1C100E9A9898EFF1F1 - FDFFFFFDFFFFFFFFFFFFFFFFEFEDECFDFBFAFFFCFB888483DCD7D4FFFFFCFFFC - F9FFFFFCFFFFFBFDF4F0F9EDEDFFFEFEB9ADAD867C7C180E0E1107071C10100C - 0000100001100000978183C7AFB133161927080B27060AFFFCFEFFFFFBFFFFFB - FFF9F95C05097700068700048600038700038000018000018400018600018600 - 028200027B00027B00028200028500018600028700033E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004002023A00004207053700004A0A093C00004A09083A00003E03013800 - 004007053500004B0A094200005906085300006902057F000286000186000182 - 00017F00017D01017B01017901017901017901017B01017D01017F0001800001 - 8200018200018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000017F00017E00007B02007B00027E00038800066B0108FFFCF9FAFFFBF6FC - F7FFFFFB1500001E00002A02071E0000FFFCFC897574200B0A1C0404D7BFBF99 - 7F7F170000240A0A170000967C7CFFFCFC856D6D130000210D0C170302100000 - 948583BCB0AEF7F5F5FBFFFFFBFFFFFBFFFFF7F9F9F1F3F39C9D9B7F7D7CFFFF - FE110D0C040100050000CCC5C2FFFFFCFFF8F4FFFFFBFFFEFEFFF7F7FFFFFEFF - FFFEF5F0EF7F77779189890900001D0F100E0000120000FFFCFE170000190000 - 240508F7E2E1FEFFFBFFFFFBFFF9F95C05097800068900048A00038A00038400 - 018200018400018400018200027F00027601027402027A02067A020378000375 - 00004100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053D00003D01013800004407053900004A07 - 063B00004404033B00003B02003600004207053A00004F05054A00005C030666 - 00027F00028600018600018200018000017F00017D01017B01017A00007D0101 - 7D01017F00017F00008100008300008400018200018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000017F00017E00007B02007B00027E00038800 - 066B0108FFFCF9FAFFFBFBFFFCFFFFFC1F07092C090D220000280509FFF1F190 - 7B7A240C0C170000907676FFFCFC2F1515170000FFF6F6DFC7C7200808130000 - 220D0C120000210D0C9C8A89FFFEFCFFF6F4FEFCFCFDFFFFFDFFFFFBFDFDC5C7 - C70000000D0E0C807E7DFAF6F5070201140D0A1B120F160A08998C8AFFF3F0FF - FCF8FEF6F6FFFFFEFBF7F6FFFBFAFFFFFEFFFEFDFFFEFDFFFEFE7C70701D0F10 - 8A7879FFFCFE1700001F02053A1B1EFFFDFCFCFFFBFFFFFBFFFAF95C05097800 - 068900048C00038C00038400028200028200028200027F00047900047002046B - 03046C07096806066300025F00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00003E00003C00 - 003D02003C00004202014100004302013F00003C01003900003C03013A000043 - 02014600005200015700016700037D0002860001840001820001800001800001 - 7F00017D01017D00007E00007F00018000018000008200008400008300008200 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000017F00017E00 - 007B02007B00027E00038800066B0108FFFCF9FAFFFBF0F6F1FFFFFC1500001E - 00002700041E00009A8080D0BBBA170000220606200404FFEDEDA187871E0404 - 977F7F1300001300001C0807120000968281FFFDFC837170796A68FFFEFCFFFE - FFF8F8F8FEFEFE8A8A8A0000008E8E8E020000040000FFFFFE0D03030C00000C - 00001200001200009D8684FFFEFBFFFAFAFFFFFEFEFCFBFCFAF9FFFFFEFFFFFE - F3EEEDFFFEFEFFFEFEFEF0F1FFFDFED0BABC1800021900001B0000FFFCFBFAFF - FBFFFFFBFFFAF95A05097800068900058A00038A00038400028000028000027D - 00027900047201046902056204055805045404035202015101004000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100023E00003C00003B00004003013E00004502013F00004101003C - 01003B02003700003D02004000004C02024D00005800026801047B0002840001 - 8400018200018000018000018000017F00018000018000018000018200018200 - 0184000186000184000182000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000017F00017E00007B02007B00027E00038800066B0108FFFCF9FA - FFFBF9FFFAFFFFFC250D0F1E0000340C111E00002D1313FFFDFC2105051B0000 - 270B0B1F0303FFF6F69B8181240C0C130000230E0D120000FFF1F0FFF9F8A795 - 94100000251312FFF7F5FFFEFF8D8788040000140F10B6B1B2FFFEFF807B7A07 - 0000FFFCFC0F0102210F0E1300002F15151900002F100FFFFDFB918787777574 - C5C3C2FCFAF9FFFFFEFFFFFEFFFEFDFFFEFEFFFEFEFFF3F4FFFDFE8973753119 - 1B19000026070AFFFCFBFAFFFCFFFFFBFFFAF95A050977000686000487000286 - 00048001037C01038005097901057605096700015D00024F00004C0202450201 - 4300004000003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00003F01013B000040050338000047 - 07063C00004706053C00003D02003A01003D0402350000490807430000540103 - 5300006A03067901028200018200018200018000018000018000018000018000 - 0180000182000182000184000184000186000184000182000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000017F00017E00007B02007B00027E - 00038800066B0108FFFCF9FAFFFBFBFFFCFDFAF61800021E00002E060B1E0000 - 1B0101907B7AE2C6C61C0000190000170000907676FFFCFC846F6E220E0D1200 - 009A86859E8C8B100000100000120000170302998A880B00000700008D8586FF - FEFFFFFEFFFFFAFB948C8C0B0101FFFDFE1000001803021700002E0E0F200000 - 240000997B7ABEB2B21915140400000E0A097F7B7AF0ECEBFFFFFEFEF6F6FFF5 - F5A89A9B816F701701031700001900002C0D10FFF9F8FBFFFBFFFFF9FFFBF859 - 060875000684000583000381000577000179070770000078090D630000660509 - 5100004B00003E00003D00003F00004303024201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073C - 00003E0202360000470A083900004D0A093A00004606053A00003D0402330000 - 4409073A0000540A0A4900005C03066500027801028000018000018000018000 - 0180000180000180000182000182000182000182000184000184000184000184 - 0001820001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018000018000018000017F - 00017E00007B02007B00027E00038800066B0108FFFCF9FAFFFBFBFFFCFEFBF7 - 1800022100022800052502061B01011E0908D2B8B8DBBFBF270B0B170000331B - 1B897473FFFDFCD2BEBD210D0C1000001804038F7B7AFFFCFB8D7877200B0A12 - 00009B8E90CCC4C5FFFAFBFFFEFFF3EBECFFFAFB9187870B0000FFFDFE120000 - 1901011B00002D080A2800022800002C0808FFFDFE847C7C1914130500001813 - 12CDC5C5FFFEFE8B81811608090E000029141617010323080B1B0001250609FF - FDFCFDFFFBFFFFF9FFFBF85906087200078000067D00047A0206710406630000 - 70090C5B000068090D4F00005304074500004B02044701024500004200003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004002023A00004308063700004C0C0B3C00004B0A09 - 3900003E03013800003F06043500004E0D0C4200005906085000006A05077601 - 027F00017F00017F00017F000180000180000180000182000182000182000182 - 0001840001840001840001820001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000017F00017E00007B02007B00027E00038800066B0108 - FFFCF9FAFFFBFAFFFBFFFFFC1E0608250206230000230004280E0E1300001900 - 00DAC0C0FFFAFA937B7B1300002E1A19120000907C7BFFFDFCCEBCBBD5C1C0FF - FDFC927D7CFFF8F8230B0B8F7A79F3E6E8FFFEFFFFFEFFFBF5F6FFFEFFFFFEFF - 756D6D160C0CFFFCFD1604051F07071E000027020428000037080A2200009781 - 83C4B8B8140808090000110707FFFCFC7F73730C00001F0F101000001B050715 - 00001C00021B00001C0000FFFAF9FEFFFAFFFFF9FFFAF85707086F01077A0006 - 760104710406620000650908500000630A0D4C000057080B3F00004502054400 - 004700004700004A01034201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083C00003E0202350000 - 480B093900004F0C0B3A00004707063A00003D0402330000450A083A0000560C - 0C4900005D04076500027601027D01017D01017D01017D01017F000180000180 - 0001800001800001820001820001820001820001820001820001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018000018000018000017F00017E00007B0200 - 7B00027E00038800066B0108FFFCF9FAFFFBF0F6F1FFFFFC1A02041F00002200 - 001E0000260C0C1500001F07071B0101917979FFFDFCDEC9C88B777628141312 - 00001C0A098B79788B7776170201281010FFEDED2C1010917C7BFFFDFFFFFEFF - FFFEFFFFFEFFFAF8F8F2F0F07D79780B0605FDF3F31B0B0C1A05041900002702 - 04230000330708260000190103FFFDFE1000000E0000958586FFFDFE16060718 - 08091B090A1200001901031700002D0E112D0C102C0B0FFFFCFCFFFFFAFFFFF9 - FFF9F75406076A00067400056C01036705055A04044B000057090A4500005508 - 0B3E000046060B3D00004801044B00034900014600003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004002023A00004207053700004A0A093C00004A09083A00003E03013900 - 003E05033500004C0B0A4200005704065100006904067402027B01017B01017B - 01017D01017D01017F0001800001800001800001820001820001820001820001 - 8200018200018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000017F00017E00007B02007B00027E00038800066B0108FFFCF9FAFFFBF5FB - F6FFFFFC1600001E00002A02071E00001C02021601001500001B030313000012 - 0000988483D2C0BFFFEEEDD1BFBE1000001200002C1716150000170000FFFCFC - 1E0000897171FFFEFFF8F8F8FFFFFFFDFFFFF3F5F5FDFFFF979896020000FFFA - F9160A0A1200001700002A0A0B2200002700002600001A00008F797B97818312 - 00008F7A7C8671732D181A1200001601031F090B250A0D1900001B00001C0000 - 200001FFFCFCFFFFFAFFFFF9FFF9F75305066500046D00036400005B04024B00 - 004D08053C00004C08093C00004807093400003D04073D000043000045000148 - 01044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053D00003D01013800004407053900004A07 - 063B00004404033B00003C03013500004106043B00005006064900005B020564 - 01037202027901017901017B01017D01017D01017F00017F0001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000017F00017E00007B02007B00027E00038800 - 066B0108FFFCF9FAFFFBFBFFFCFFFFFC1B03052603072800052100021D030312 - 000025100F130000341F1E150100100000DCCDCBFFFEFCD7C8C6877574A69291 - 130000150000391D1DFFFBFC240405A89090FFFEFFFAFFFEF6FBFAFAFFFFFAFF - FFECF4F36C7370050A08FFFFFE0700001306041702012509091F000026000022 - 00002D0E111B0003FFFCFE150000DAC2C48973751600022C1618130000190103 - 1800002104072F101328070B260307FFFAFAFFFEFAFFFFF9FFF8F65204056100 - 026600005B00005301004502003B00004407053700004506083500003A040935 - 00033F05063F03043D01023900004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00003E00013C00 - 003D02003C00004202013F00004302013F00003E01003C00003C01003B000045 - 04034500004D00005000006104056F02047602017801027901017B01017D0101 - 7D01017F00018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000017E00 - 007D02007B00027E00038800066B0108FFFDF9FAFFFBFBFFFCF5F2EE21090B2A - 070B220000210000230909130000170000260C0C1500001702011D0908837170 - FFFEFCFFF1EFFFFEFCFFEEEDFFFDFCFFFDFCFFF0F3FFFCFC230407846E70FAF6 - F5FAFFFFFAFFFFF2FAF9F7FFFEF8FFFF818885000100FFFFFE070000190C0A1A - 06051700001C00002904062000001B0000170000D2BABCA08A8CC8B2B4250F11 - 1300001500001700011F04071900001C00001E00011C00001C0000FFFCFCFFFE - FAFFFFF9FFF8F74604055300015900015000004B00004101003E04003B00003F - 03033B00003E03073700033702053600003800003A00013D03044000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000013E00013D00004201033E00004201033E000041000240 - 00003E00013D00004201033E0000430003410000460002500000670003700000 - 7300037601027A02037C01037E01038001038000018000018000018000018001 - 008001007F01007F010080000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000017F00008001007D00027F00038A00066B0108FFFDF9FA - FFFBFBFFFCFFFFFC230B0D23000430070C2400012C0D0E1C00002E0F0E1E0000 - 200001270B0B2208081300001F0D0E1202031D0D0E1303041303041F0D0E1B06 - 091300003922267D6D6EFFFFFEFBFFFEF8FDFBF9FEFCFBFFFEF9FCFA7A7B790B - 0706FFFEFE11050519090A18020426090C2000032C070B240203270B0B150000 - 857170FFFDFCFFFEFC0E00002C1A1913000022080822030429090A2000002B0B - 0C1D0000270B0BFFFDFCFFFDFBFFFEFCFFFBFC2F00023C000143000049010144 - 00004300003F00004003013C00004002023A00003D01023C0001410204400103 - 3E00013B00003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004A00015F00006B00006E00027401047801027901027D00027E00018000 - 018200018200018200018001008001008001007F010080000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018100008001007F00027F - 00038A00066B0108FFFDF9F8FFFBF6FCF7FEFBF71A02041E0000290003230000 - 2304051B00002000002F09092803051C00001E0202947F7E7967680F0102897B - 7C867A7A86787A8E8082938285857477867376978A8CFFFDFCF9FEFCF3F8F6F4 - F9F7FDFFFEFFFFFE888483050000FFF9F90C00001100001300001C00021C0000 - 2000011C0000190000200B0A210F0EFBECEAC7BAB81205030E00001804031A00 - 001C00002200011E00002202031900001B0101FFF9F8FFFBFBFFFEFEFFF4F42D - 0B0B2B00004108073D00004401004200004505013A0000450806370000440606 - 3C00004100023B00003D00003F00004302044201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605074500005700006300006800016F01037401 - 047800037B00007C000082000284000284000184000182000080010080010080 - 0100800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018100008001007F00027F00038A00066B0108FFFDF9F8FFFBFBFFFCFFFFFC - 240C0E23000433070D2500012D0E0F1E00002500002B03042000001C00001C02 - 02DFCAC99A88890E0001FFFEFEFFFEFEFFFDFFFFFBFDFFFDFFFFFDFFFFF9FCFF - F4F6FFFDFCFDFFFEFDFFFEFDFFFEF4F5F3F5F6F48682810E0606FFFEFE120405 - 1D080A1B0305270A0D2000032A070B230206280C0C190101120000E3D4D2C3B6 - B41508061C0D0B1804032509092404052C0A0B2000002C0C0D1D0000250B0BFF - FDFCFFFEFEFFFAFAFFFCFC1E00003A090B3300004707074100004502003B0000 - 490908370000480A0A3700004605073E00004403054201034000013D00003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004701025000 - 005A00006200006A02037002047700037B00007D000084000286000286000186 - 0001840000820000800100800100800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018100008001007F00027F00038A00066B0108 - FFFDF9F8FFFBF6FCF7FEFBF71A02041E00002900032300002304051B0000350F - 0F230000200000270708170000D9C5C48676770B0000FFFAFAFFFEFEFFFEFFFA - F2F3FFF7F9FFFDFFFFFDFFFFFEFFFFFFFEF7FAF8FFFFFEFFFFFEFFFFFEFFFFFE - 85807F070000FFF9F90C00001300001500001C00021B00001E00011C00001900 - 001F0707120000948583FFF8F60C00001000001300001A00001C000024000120 - 00002402031B00001B0101FFF9F8FFFAFAFFFEFEFFF0F03210102B0000460D0C - 3A00004502014100004808043900004A0D0B370000480A0A3900004201033D00 - 003E00004000014302044201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706084100004A00005100005901016302046D02047401047C000381 - 0003860002870002870001870001860001840001820001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001810000800100 - 7F00027F00038A00066B0108FFFDF9F8FFFBFBFFFCFFFFFC240C0E2300043307 - 0D2500012D0E0F1E00002B0505230000351012220203170000D8C4C38F7F8009 - 0000FDF5F5FFFFFEFFFEFFFFFDFEFFFEFFFFFAFBFEF6F7FFFDFEFFFFFEFEFFFD - FCFAF9F8F6F5FBF9F8FFFFFE928D8C110909FFFEFE1404051D080A1B03052409 - 0C1F000328070B2302062B0F0F1600001E0A09897A78FFFCFA0D00002D1B1A13 - 00002408082404052E090B2200002E0C0D1D0000250B0BFFFDFCFFFEFEFFF9F9 - FFFCFC1E00003C0B0D3300004808084100004502003A00004A0A093700004A0C - 0C3700004706083E00004302044201034000013D00003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004301024300004A00005101005C - 02026602027002047B0004820004860002890002890002870001860001840001 - 8200018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018100008001007F00027F00038A00066B0108FFFDF9F8FFFBF6FC - F7FDFAF61A02041E00002800022300002304051B00002D0707230000330E101D - 00001C0202D6C2C1928485070000FFFFFEFFFFFEFEFCFCFFFFFFFFFFFFFFFFFF - FDF8F9FFFDFEFFFBFAFFFFFEFFFFFEFFFEFDFFFFFEFEF9F87D7575090000FFF9 - F90E00001300001300001A00021900001E00011C00001900001B030312000027 - 1514FFFDFB0E00001000001601001C00001E00002400012000002402031B0000 - 1B0101FFF8F7FFFBFBFFFEFEFFF1F1310F0F2B0000440B0A3B00004502014100 - 00470703390000480B093700004709093A00004201033C00003E000040000143 - 02044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053F - 00003E01004001004801005100005D00006A0002780004800005860004870002 - 8900028700028600018400018200018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018100008001007F00027F00038A00 - 066B0108FFFDF9F8FFFBFBFFFCFFFFFC240C0E23000433070D2500012D0E0F1E - 0000300A0A230000220000220304220808CAB8B7877B7B070201FFFFFEFFFFFE - F8F8F8F5F5F5FFFFFFFFFFFFFFFFFFFFFFFFFFFDFCFFFEFDFFFDFCFFFFFEFFFF - FEBAB5B4312929090000FFFEFE1204051B090A19030524090C1D000327080B22 - 0306290D0D170000230E0D100000FFFEFC0E0000231110170201260708260405 - 2E090B2200002E0C0D1E0000270B0BFFFDFCFFFEFEFFFCFCFFFCFC2000003706 - 083600004505054200004401003D00004606053700004507073800004403053F - 00004504064302044100023D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00003E00003902003901003F0000480000550000630000 - 7100037C01058000048600048600028600028400028200018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018100 - 008001007F00027F00038A00066B0108FFFDF9F8FFFBF6FCF7FEFBF71A02041E - 00002900032300002304051B00002200002901022400011E0000150000D0BEBD - 8D8181050000F6F4F3FFFFFEFDFFFFFCFEFEFBFDFDFBFDFDF9FBFBFCFCFCFFFF - FEFFFFFEFFFFFEFAF5F48C87860803020700008A8282FFFAFA0C000010000112 - 00001901031700001C00021900001900001C0202190403100000FFFCFA1F100E - 1200001500001D00001E00002600012200002601031C00001E0202FFF9F8FFFC - FCFFFEFEFFF8F82907072E00003E05043F00004300004300004202003E000040 - 03013C00004002023F00004000013D00003E00004000014302044000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000014000013F00004201033E00004201033E000041000240 - 00014000013F00004201033E00004201033E00004100023C0000390401370200 - 3F04024300005301005900006600006D00007D02067F00048100037F00007D00 - 007D00007E00017F000280000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018100008001007F00027F00038A00066B0108FFFDF9F8 - FFFBFBFFFCFFFFFC230B0D23000432060C2500012C0D0E1E00002C0808240000 - 2E0C0D1D0000230B0BD5C3C28E82820B0605FFFFFEFFFFFEFDFFFFFBFFFFFBFF - FFF9FEFDFDFFFFFEFEFEFFFFFEFFFEFECDC5C50700001D1817080302C1BCBBFF - FEFEFFF9F9897D7D1F11121505061F0A0C1300002D1517160000270B0B250B0B - 261110867473FFFEFC0E00002E1A191500002607082503042F080A2400002F0A - 0C1E0000270B0BFFFDFCFFFDFDFFFEFEFFFCFC2402023201033A010042020242 - 00004300004000004202013C00004002023C0000410002400001430204420103 - 4000013D00003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00003D01023701003A07043500004807064300005903035900006600007201 - 047700037A00037B00027C00017C00017D00027D00027F000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 018000018000018000018000018000018000018000018100008001007F00027F - 00038A00066B0108FFFDF9F8FFFBF6FCF7FEFBF71A02041E0000290003230000 - 2304051B0000230000220000240203190000180302C9BAB8857979050000FEFC - FBF4F5F3FDFFFFE5EAE9FBFFFFFDFFFFFCFEFEFAF8F8FDF8F7847C7C0700000D - 0807898483FCF7F6FFFEFDFFFFFEFFFCFCFFFEFEFFFBFB7B6D6E908081B09E9F - 8570728F797B8E7474947A7A968180FFFAF99B89881000001200001500001D00 - 002000002600012200002601031C00001D0101FFF9F8FFFBFBFFFEFEFFF4F42D - 0B0B2B00004108073D00004401004200004505013A0000450806370000440606 - 3C00004100023B00003D00003F00004302044201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073C00003D0504330000430A083900005109 - 094500005A04045A00006500026A00026E00027401047800047A01057A02037B - 00027F0001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018100008001007F00027F00038A00066B0108FFFDF9F8FFFBFBFFFCFFFFFC - 240C0E23000433070D2500012D0E0F1E00002D09092300002C0C0D1C0000220D - 0CD3C4C28F83830B0605FFFFFEF3F4F2FAFCFCFDFFFFFBFDFDFFFFFFFFFFFF81 - 7F7F211C1B150D0D8F8A89FFFDFCFAF5F4FFFFFEFFFFFEFFFCFBFDF9F8FFFFFE - FFF9F9FFFBFBFFFEFEEDDFE0FFFDFEFFFCFEFFFCFCFFFCFCFFF2F2A28E8D200E - 0D1000003D292815000028080928030530090B240000300B0D200000290A0BFF - FDFCFFFEFEFFFAFAFFFCFC1E00003A090B3300004707074100004502003B0000 - 490908370000480A0A3700004605073E00004403054201034000013D00003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004001033900 - 004209083500004A0D0B3A0000520A0A4500005402015700005D00006602026D - 02047103057502057902037901027F0001800001800001800001800001800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 00018000018000018000018000018100008001007F00027F00038A00066B0108 - FFFDF9F8FFFBF6FCF7FEFBF71A02041E00002900032300002304051900002100 - 00200000220203190000180302C9BAB8857979050000EBE9E8FFFFFEFBFBFBFE - FEFEFFFFFFBEBCBC04000004000005000075706FFFFFFEFAF6F5FFFDFCFDFBFA - FFFFFEFFFDFCFFFFFEFDF9F8FFFFFEFFFEFDFAF0F0FFFBFBFFFEFEFFF3F4FFF9 - F98C70702109091200001000001000001500002107071D000020000027000123 - 00002801031E00001F0001FFF9F8FFF9FAFFFEFEFFF0F03210102B0000460D0C - 3A00004502014100004808043900004A0D0B370000480A0A3900004201033D00 - 003E00004000014302044201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E0000420404390000490B0B3700004A0D0B39000049080744 - 00004A00005100005B01016201036B03047002047401047801027D0101800001 - 8000018000018000018000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001810000800100 - 7F00027F00038A00066B0108FFFDF9F8FFFBFBFFFCFFFFFC240C0E2300043307 - 0D2500012D0E0F1C00002B09092100002C0C0D1B0000210C0BD3C4C28F83830D - 0505FFFFFEFFFFFEECEAEAFFFFFF817C7D0500001C1415847C7DFFFFFEFCF7F6 - F8F3F2FFFFFEFFFFFEF7F8F6FFFFFEF6F7F5EDEEECF8F9F7F7F5F4FFFFFEFFFC - FBFFFFFEF4ECECDACCCD170000240808260E0E1200002E1C1B1000001D080717 - 000027070828030531090B250000320B0D200000290A0BFFFDFCFFFDFEFFF9F9 - FFFCFC1E00003C0B0D3300004808084100004502003A00004A0A093700004A0C - 0C3700004706083E00004302044201034000013D00003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A000042010341000048060739000048 - 0A0A350000430A08360000400503400000470000500000590101630101690102 - 6E00027500017D00028000018000018000018000018000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018100008001007F00027F00038A00066B0108FFFDF9F8FFFBF6FC - F7FDFAF61A02041E00002800022300002304051900002100001E000022020317 - 0000160201C9BAB8857979070000FDF8F7F8F4F39C97980500000B0506857D7E - D2C7C9FFFDFFE4DFDEFFFFFEFFFEFDF7F5F4FFFFFEFCFFFDF6F9F7FDFFFEFDFF - FEF8FBF9FDFFFEFFFFFEF9F7F6FFFFFE807C7B0C00001E06062307071500001D - 08071200001501001A05041700001F00002200002700012300002801031E0000 - 1F0001FFF7F7FFFAFBFFFEFEFFF1F1310F0F2B0000440B0A3B00004502014100 - 00470703390000480B093700004709093A00004201033C00003E000040000143 - 02044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A000044030540 - 00004802034200004705063700004108073200003A07043702003A0200400100 - 4900005100005B00006400006B00007300007D00028000018000018000018000 - 0180000180000180000180000180000180000180000180000180000180000180 - 0001800001800001800001800001800001800001800001800001800001800001 - 8000018000018000018000018000018000018100008001007F00027F00038A00 - 066B0108FFFDF9F8FFFBFBFFFCFFFFFC240C0E23000433070D2500012D0E0F1C - 0000290A091F00002B0C0D190000200C0BD3C4C28F83830D0505C9C4C38E8988 - 0E08090E0607CDC2C4FFFDFFFFFDFFFFF4F6FFFFFEFEFAF9FFFFFEF7F5F4FFFF - FEEDF0EEFDFFFEFBFFFEE8EDEBF9FEFCFAFFFDF6F9F7898A8802000017151409 - 00001D05051900002F151519040324100F1200002914131700002907082A0305 - 31090B250000320B0D2200002A0A0BFFFCFCFFFDFEFFFCFCFFFCFC2000003706 - 083600004505054200004401003D00004606053700004507073800004403053F - 00004504064302044100023D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004100014600014802034000004103033800003C0403 - 3701003904013A03003E01004200004900005000005800005F00006500007202 - 027601027601027601027801027801027901027901027B00027B00027D00027D - 00027F00027F00027F00027F00027F00017F00017F00017F00017F00017F0001 - 7F00017F00017F00017F00017F00017F00017F00017F00017F00018000018100 - 008000017D00027C0003830008660208FFFCFBFDFFFBF8FCF7FFFAF71C010420 - 00002600032000002304051B00002300002000002503041900001A0202CCBAB9 - 8678790900000904030702017F797AFFFBFCFFFDFFFCF1F3FFF7F9FFFEFEFFFF - FEF3F4F2FFFFFEFFFFFEFDFFFEFDFFFEF4F7F5FFFFFEFFFFFEFFFFFEC4C2C104 - 00000904030700000900001002031800001C00001800001500001300001F0A09 - 1500001F03031E00002000002600012200002601031E0000210102FFF8F8FFFB - FCFFFEFEFFF8F82907072E00003E05043F00004300004300004202003E000040 - 03013C00004002023F00004000013D00003E00004000014302044000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000014000013F00004201033E00004201033E000041000240 - 00014000013F00004201033E00004201033E0000410002400001410001400000 - 4201033E00004001033C00003D01023C00003E00003F00004301024100004701 - 024500004A00014E00005500005A00005E02015C00006505056602026B05066E - 03057305077302057A05087700037D04087A00037F01067D00047C00017A0000 - 7D00027900007E01037900007D00027B00007C00017A00007D00027900007E01 - 037900007D00027D00007E00007D00017A020771000474010B580008FFFBFBFF - FFFCFFFFFEFFFEFE290A0B27000229090A1D00002C0E0D2100003A0D10290000 - 2D04092B060A331619C2ACAED8C8C9090000837E7DBFBBBAFBF7F6FFFFFEFFFF - FEFFFDFCFFFCFCFFFBFAF5FAF8F8FFFCFAFFFCF6FCF7FDFFFCF3F4F0FFFFFCFE - F9F6FFFDFA8A7E7C2A1B191000001F0A091C04042309091A0000270809210203 - 2509091C0000270B0B1E020224080820010226070823030429090A1E00002B0B - 0C1E0000290A0BFFFCFCFFFCFDFFFEFEFFFCFC2402023201033A010042020242 - 00004300004000004202013C00004002023C0000410002400001430204420103 - 4000013D00003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004100023F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004200014400004C010046000055 - 05044C00005B05055700005F01026500026D040768000076070B6D00007C060B - 7500027A02077700037A05067100007D08097000007C07087300007803047500 - 017A05067100007D08097000007C07087300007B02067B00018002086E000372 - 080F6300035A0A11FFF6F8FFFEFCFCFAF9FFF9F92101022200001F0100170000 - 2306022000002500002800002500021C0000170000E7D2D4C4B8B8837E7DFFFF - FEFFFFFEF9FCFAF5F8F6F9FAF8FFFFFEFFFFFEFFFFFEFAFFFCF4FEF8F6FDF8FB - FFFCF2F6F1FFFFFCFFF8F59185831809071000001300001700002405061C0000 - 2100001C00001E00001B00001E00001B00002001021B00001C00001B00001C00 - 001B00001F00011B00002102031B00001F0001FFF8F8FFFAFBFFFEFEFFF4F42D - 0B0B2B00004108073D00004401004200004505013A0000450806370000440606 - 3C00004100023B00003D00003F00004302044201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073E00004201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073F - 00004300003E00004C07044000005308064700005604035100005A0000560000 - 6906085A000070090C61000072070A6B00036E0305660000750A0C620000760B - 0D6400007207096A00016E0305660000750A0C620000760B0D6400007207096D - 00017500026E000075090F5900006D0A12460000FFFBFCFFFFFCFFFFFEFFFEFE - 2B0B0C270002290B0A1900002E0F0C21000024040528090C2005081400011709 - 0A817979FFFFFEF5FAF8F1FAF7F4FFFCF6FFFEF6FFFEF8FFFEEFF8F5F5FCF9FA - FFFEF0F6F1F4FAF5FDFFFCFDFEFAFFFFFCC0BBB88A817E0D0000100000120000 - 2810101C02022001021D00002F0D0E22020328080922030428090A1E00002A0B - 0C200102270809210203270809230405290A0B1D00002B0C0D1D0000290A0BFF - FCFCFFFDFEFFFAFAFFFCFC1E00003A090B3300004707074100004502003B0000 - 490908370000480A0A3700004605073E00004403054201034000013D00003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004201033E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004202023E00004809053900004E0E0A3C0000520B08 - 4200004F02004B00005704034C0000620A0A50000066090A5700006002035A00 - 00630605530000680B0A5300006609085500005F02015A000063060553000068 - 0B0A5300006609085500006300026400006D020555000064080D5000004F090F - FFF0F1FFFFFCF8FBF9FFFAF92101022200001F01001700002405021C00001F03 - 031500001200000E0000201616040000F3F6F4F9FFFDF6FFFEF0FEFAEEF9F6F3 - FEFBF6FFFEF8FFFEF6FDFAF2F7F5FFFFFCF0EFEBFFFEFAFFFFFC7B7471170E0B - 0E01001000001F0B0A1601001E04041900001B00001C00002301021E00001E00 - 001B00001E00001B00002001021B00001C00001B00001C00001B00001F00011B - 00002102031B00001F0001FFF8F8FFF9FAFFFEFEFFF0F03210102B0000460D0C - 3A00004502014100004808043900004A0D0B370000480A0A3900004201033D00 - 003E00004000014302044201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E00004201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083C00003F0604350000 - 460D0B3500004B0E0C390000490807410000470101400000530909430000580A - 0B4700005505064B000050000147000057070847000059090A4700005404054B - 000050000147000057070847000059090A4700005404054E00005B0000530000 - 5C080A4700005C080D370000FFFCFCFEFDF9FBFFFEFFFFFE2B0B0C270002290B - 0A1900002E0F0C1F00002E14141701031A05070E00002418180F0A09939190FD - FFFEF7FCFAFAFFFEFBFFFEF8FDFBFBFEFCFDFFFEFFFFFEFFFFFEFFFFFCFFFFFC - BFB3B11205031407050E0000210F0E1300001B03031700002105051E00002606 - 071F00002C0A0B22000128080923030429090A1F00002B0B0C21010227070822 - 02032707082404052A0A0B1E00002C0C0D1E00002A0A0BFFFCFCFFFDFEFFF9F9 - FFFCFC1E00003C0B0D3300004808084100004502003A00004A0A093700004A0C - 0C3700004706083E00004302044201034000013D00003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004201033E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004002023700003D0805320000430C093200004209073600004003013D00 - 004606053A00004D0A093C00004B08073E00004600004300004B05053E00004F - 09093E00004E08083F00004701014300004B05053E00004F09093E00004E0808 - 3F00004B01014E00005705044200004F090A420000440B0EFFF5F4FDFFFCF5FC - F9FDF9F82001022200001E00001700002405021C00001B00001900002E131619 - 03051402030E00000B00000900008C8484B4ACACD2CACACCC4C4C0B6B6C4B8B8 - CBBDBECCBEBFCABBB982706F1A08071200001200001C07061C0404170000280E - 0E1900001B00001B00001E00001C00002100001E00001E00001C00001F00001C - 00002101021C00001D00001C00001D00001C00002000011C00002202031C0000 - 200001FFF7F7FFFAFBFFFEFEFFF1F1310F0F2B0000440B0A3B00004502014100 - 00470703390000480B093700004709093A00004201033C00003E000040000143 - 02044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053F - 00004100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053D00003A02013200003C07043000003E09 - 063300003D06033900003B02003800004207053700004508063900004306043E - 01004202023D00004706083A00004807093B00004504063F00004201033D0000 - 4706083A00004807093B00004504064000004800004400004707063700004906 - 09300000FFFEFCFBFFFCF8FFFEFFFFFE2A0B0C270002290B0A1900002D100C21 - 00003D161823000030080D2400031C00001B000045282B170000260B0E22070A - 1C01041B00012506092D0E1129080C1B0000250B0B230B0B220A0A1C02023F25 - 251700001900002408082307071B00002102032505063313142606072707081C - 000028080923030429090A1F00002B0B0C210102270708220203270708240405 - 2A0A0B1E00002C0C0D1E00002A0A0BFFFCFCFFFDFEFFFCFCFFFCFC2000003706 - 083600004505054200004401003D00004606053700004507073800004403053F - 00004504064302044100023D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00003E00013A01 - 003B04013801003C05023801003D06033A03003C05023800003A01003700003D - 04023900003F06043C03013E05043B00003D01023A00003E02033900003E0203 - 3B00003C00013B00003D01023A00003E02033900003E02033B00003E00003F00 - 00410200360000390100390000330406FFF9F7FAFFFCF3FCF9FEFAF920010222 - 00001D01001700002306021E00002500002F0107270000280002260002220000 - 2100002000002200012000002200002200002300002500002500002500011C00 - 001900001B00001900001B00001B00003213141B00002001021B00002303041C - 00001C00001C00002404051E00001F00001C00001F00001C00002101021C0000 - 1E00001C00001E00001C00002000011C00002202031C0000210102FFF8F8FFFB - FCFFFEFEFFF8F82907072E00003E05043F00004300004300004202003E000040 - 03013C00004002023F00004000013D00003E00004000014302044000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000014000013F00004201033E00004201033E000041000240 - 00014000013F00004201033E00004201033E00004100024000014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100023E00013E00003B00003E02023A00003E02023A00003D01013A - 01003C00003B00003E02023A00003C03023800003B02013A01003C00013D0002 - 4000053C00014000053C00013F00043E00033E00033D00024000053C00014000 - 053C00013F00043C00013F040232000045120F2E000043090A290000FFFEFCF5 - FBF6F4FBF8FFFFFE1F00012B0406311514150000280D0922030230080A2A0004 - 31050B250000330A0F2600032D050A2500022F070C2700042F060B2500003509 - 0F2B000332040A2800022B090A2001022808091B00002C0C0D2000012707081F - 000028090A2001022708091B00002B0C0D1F00012607081E000028090A200102 - 2708091B00002B0C0D1F00012607081E0000240506270809290A0B1B00001C00 - 002A0B0C1B0000FFFCFCFFFDFEFFFDFDFFF8F82100004211133600004A0A0A3C - 00004300004000004202013C00004002023C0000410002400001430204420103 - 4000013D00003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004100023F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004404043A000047 - 07073900004406063A00003F01013D0000420404380000430707350000420606 - 3800003D01013D00004202073A000045050A3900004404093C00003F00043F00 - 024202073A000045050A3900004404093C00003F00023900003F0B052B00003C - 0B09330000491A1CFFF0EEFDFFFCFAFFFEFCF7F6200001220000230A08130000 - 1C03001900002000011E00002100021E00002401051E00001E00011C00002200 - 031E00002300022000002601052200002400012200002200011C00001F00001C - 00002202031B00001E00001B00001F00011B00001E0000190000210203190000 - 1D00001900001F00011900001E00001900002102031900001D00001900001B00 - 001900002506072509092B0C0D1900001B0000FFF4F4FFFDFEFFFEFEFFE9E930 - 0E0E2B0000370000390000520F0E4200004505013A0000450806370000440606 - 3C00004100023B00003D00003F00004302044201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073E00004201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004301023B00004A08093A00004B090A3A00004705063E00004202023A0000 - 490909370000480A0A3700004406063E00004201033A00004A070A3900004B08 - 0B3900004704073E00004300033A00004A070A3900004B080B3900004704073C - 00003400003300004919152E00004E12132F0000FFEFEEFFFFFCFBFFFEEDE5E5 - 4222232200001C030112000028140F230E0C1B07061601031B06081400011D08 - 0A1601031A05071500021B06081601031C06081500011E080A1901031D05071A - 00022405061F00012405061D00002607081D01012304051C00002206061D0101 - 2206061900002408081B01012105051A00002206061B01012206061900002408 - 081B01012105051A00002C10101700001900001700001F0303190000472B2BFF - F5F4FFFBFBFFF8F8FFFCFC1E00004211133300004707073C00004502003B0000 - 490908370000480A0A3700004605073E00004403054201034000013D00003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004201033E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033F00004A06073C00004F0B0C3C00004D090A - 3A00004301023F00004806073900004C0C0C3900004A0A0A3900004202023F00 - 004805083A00004D0A0D3A00004B080B3A00004300033F00004805083A00004D - 0A0D3A00004B080B3A00004202023D02003D06013906033200003F0000370205 - FFFDFCFFFFFCFAFBF9FFFEFEFFE9EAFFF6F8FFFDFBFFFCF9FFFCF7FFEFECFFFE - FCFFFEFEFFFEFEFFFEFEFFFEFEFFFEFEFFFDFEFFFEFEFFFDFEFFFDFEFFFDFEFF - FDFEFFFDFEFFFDFEFFFDFEFFFDFEFFFCFCFFFCFCFFFCFCFFFCFCFFFCFCFFFCFC - FFFCFCFFFCFCFFFCFCFFFCFCFFFCFCFFFCFCFFFCFCFFFCFCFFFCFCFFFCFCFFFC - FCFFFCFCFFFCFCFFFCFCFFFCFCFFFCFCFFFCFCFFFCFCFFF7F7FFFCFCFFFCFCFF - FCFCFFFCFCFFEDEDF7DFDFFFFDFCFFFEFEFFFEFEFFF5F52000002B00004A1110 - 3F00004704034100004808043900004A0D0B370000480A0A3900004201033D00 - 003E00004000014302044201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E00004201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E00004300033A0000 - 4B080B3A00004D0A0D3A00004805083F00004300033A00004B080B3A00004D0A - 0D3A00004805083F00004301023A00004B090A3A00004D0B0C3A00004806073F - 00004301023A00004B090A3A00004D0B0C3A00004806073E0000430302350000 - 3B0401370000510C0F320000FFFCFCEDE6E3FDFBFAFFFEFEFFFAFCFFF9FBFFFD - FBFFF8F5FFFFF9FFFEFBFFF9F7FFFAFAFFF9F9FFFBFBFFF8F8FFFBFBFFF9F9FF - FBFBFFF9F9FFFAFAFFF9F9FFFBFBFFF8F8FFFBFBFFF9F9FFFAFBFFF8F7FFF8F8 - FFF7F7FFF9F9FFF6F6FFF9F9FFF7F7FFF9F9FFF7F7FFF8F8FFF7F7FFFAF9FFF6 - F6FFFAF9FFF7F7FFFAF9FFF8F7FFF9F8FFF8F7FFFAF9FFF7F6FFFAF9FFF8F7FF - FAF9FFF6F5FFFDFCFFFAF9FFF1F0FFFDFCFFFDFCFFFDFCFFF9F8FFFEFEFFFBFB - FFFCFC2B09093F0E103500003C00004906054502003A00004A0A093700004A0C - 0C3700004706083E00004302044201034000013D00003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004201033E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3B00004201033F00 - 004605073A00004B080B3A00004A070A3B00004300033F00004705063A00004B - 090A3A00004A08093B00004301023F00004705063A00004B090A3A00004A0809 - 3B00004302013B00004203003A00004F1111410000420509FFFBFCFFFFFCFFFC - FBFFF9FAFFFAFCFFF8FAFFFBF9FFFBF8FFFBF5FFFEFAFFFEFCFFFDFEFFFDFEFF - FDFEFFFCFDFFFDFEFFFDFEFFFDFEFFFDFEFFFDFEFFFDFEFFFDFEFFFCFDFFFDFE - FFFDFEFFFDFEFFFDFCFFFDFCFFFDFCFFFDFCFFFCFBFFFDFCFFFDFCFFFDFCFFFD - FCFFFDFCFFFDFCFFFDFCFFFCFBFFFDFCFFFDFCFFFDFCFFFDFCFFFDFCFFFDFCFF - FDFCFFFCFBFFFDFCFFFDFCFFFDFCFFFAF9FFFDFCFFFBFAFFFDFCFFFBFAFFFDFC - FFFCFBFFF7F5F9EFEFFFFEFEFFFBFB2A08083100023500004808084401004100 - 00470703390000480B093700004709093A00004201033C00003E000040000143 - 02044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053F - 00004100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00003F00023A00004405073700004506 - 083800004403053D00004100023A00004605073900004706083A00004403053F - 00004101013C00004606053900004707063A00004404033F00004101003C0000 - 4606053900004707063A00004404034000004D0A073F00005212113A00005407 - 0B400003FFE2E3FFFEFCFFFEFEFFFDFEFFFAFCFFFAFCFFFDFBFFFFFBFFF7F1FF - F9F6FFF5F4FFFBFDFFF4F7FFFBFEFFF1F4FFFBFEFFF5F8FFFBFEFFF3F6FFFAFD - FFF4F7FFFBFEFFF2F4FFFCFEFFF6F8FFFCFEFFF5F4FFFCFBFFF6F5FFFDFCFFF3 - F2FFFDFCFFF7F6FFFDFCFFF5F4FFFCFBFFF6F5FFFDFCFFF3F2FFFDFCFFF7F6FF - FDFCFFF5F4FFFDFBFFF6F5FFFEFCFFF3F2FFFEFCFFF7F6FFFEFCFFFDFCFFFEFC - FFF9F8FFFEFCFFF5F4FFFEFCFFF8F7FFFEFCFFFEFEFFFEFEFFFCFC1E00004918 - 1A3300005313133C00004401003D00004606053700004507073800004403053F - 00004504064302044100023D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000013E00 - 013D01023C00004001033C00004001033D00003E00013E00013F00023C000040 - 01033E00004201033F00004000014000004101003E00004202013E0000420201 - 3F00004000004000004101003E00004202013E00004202013F00004100003C00 - 004A07063A00004C0809480000470409300607290D0D1300002408082A000031 - 02041D00002108061C03002C100F2300002D0608270001330B0D2300002F0709 - 2A000232070A2600002E0608270001330B0D2200002C07092700022B090A1E00 - 002408071D0101290D0C190000250908200102280A091E00002608071F00012B - 0D0C1B0000270908210102280A091C00002408071D0101290D0C190000250908 - 1E0202260A091D01012105041900002A0E0D1900002D11101900002208081500 - 002B11111E00002500003703034D1112390000500F0E4300004201003E000040 - 02023C00004002023F00004000013D00003E00004000014302044000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000014000013F00004201033E00004201033E000041000240 - 00014000013F00004201033E00004201033E00004100024000014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000014000013D00004201033E00004201033E000041000240 - 00014000013F00004201033E00004201033E00004100024000014000013F0000 - 4201033E00004201033E00004100024000004000013F00004201033E00004201 - 033E00004100024000004100004000004202023F00004500033E00003A010235 - 00033301033400023C0105380000390303330000360202350101370003380002 - 3B02053700013B02053700013A01043900033900033800023B02053700013B02 - 053500013A010437000335000334000037020533000037020533000036010435 - 0101350003340000370205330000370205330000380104350101350003340000 - 3702053300003702053300003601043501013500033400003702053300003702 - 053300003601043500033301033400023902053700003E02033C000041000240 - 00004100003F00004202023E00004201033E0000410002400001430204420103 - 4000013D00003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004100023F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004100023F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004100023F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004100023F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004100023B00003D00003F00004302044201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073E00004201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073E00004201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073E00004201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073E00004201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073E00004403054201034000013D00003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004201033E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004201033E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004201033E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004201033E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004201033D00 - 003E00004000014302044201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E00004201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E00004201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E00004201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E00004201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E00004302044201034000013D00003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004201033E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004201033E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004201033E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004201033E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004201033C00003E000040000143 - 02044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053F - 00004100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053F - 00004100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053F - 00004100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053F - 00004100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053F - 00004504064302044100023D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004000013D00003E00004000014302044000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000014000013F00004201033E00004201033E000041000240 - 00014000013F00004201033E00004201033E00004100024000014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000014000013F00004201033E00004201033E000041000240 - 00014000013F00004201033E00004201033E00004100024000014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000014000013F00004201033E00004201033E000041000240 - 00014000013F00004201033E00004201033E00004100024000014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000014000013F00004201033E00004201033E000041000240 - 00014000013F00004201033E00004201033E00004100024000014000013F0000 - 4201033E00004201033E00004100024000014000013F00004201033E00004201 - 033E00004100024000014000013F00004201033E00004201033E000041000240 - 00014000013F00004201033E00004201033E0000410002400001430204420103 - 4000013D00003F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004100023F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004100023F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004100023F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004100023F00004403053A00004706083900004605073C00004100023F00 - 004403053A00004706083900004605073C00004100023F00004403053A000047 - 06083900004605073C00004100023F00004403053A0000470608390000460507 - 3C00004100023B00003D00003F00004302044201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073E00004201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073E00004201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073E00004201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073E00004201033A000049080A3900004A09 - 0B3900004605073E00004201033A000049080A3900004A090B3900004605073E - 00004201033A000049080A3900004A090B3900004605073E00004201033A0000 - 49080A3900004A090B3900004605073E00004403054201034000013D00003E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004201033E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004201033E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004201033E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004201033E00 - 004706083900004C0B0D3900004A090B3900004201033E00004706083900004C - 0B0D3900004A090B3900004201033E00004706083900004C0B0D3900004A090B - 3900004201033E00004706083900004C0B0D3900004A090B3900004201033D00 - 003E00004000014302044201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E00004201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E00004201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E00004201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E00004201033900004A090B3900004C0B0D3900004706083E - 00004201033900004A090B3900004C0B0D3900004706083E0000420103390000 - 4A090B3900004C0B0D3900004706083E00004201033900004A090B3900004C0B - 0D3900004706083E00004302044201034000013D00003E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004201033E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004201033E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004201033E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004201033E00004605073900004A - 090B39000049080A3A00004201033E00004605073900004A090B39000049080A - 3A00004201033E00004605073900004A090B39000049080A3A00004201033E00 - 004605073900004A090B39000049080A3A00004201033C00003E000040000143 - 02044100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053F - 00004100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053F - 00004100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053F - 00004100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053F - 00004100023C00004605073900004706083A00004403053F00004100023C0000 - 4605073900004706083A00004403053F00004100023C00004605073900004706 - 083A00004403053F00004100023C00004605073900004706083A00004403053F - 00004504064302044100023D00004000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004000014000014100023E00004201033E0000420103 - 3F00004000014000014100023E00004201033E00004201033F00004000014000 - 014100023E00004201033E00004201033F00004000014000014100023E000042 - 01033E00004201033F00004000013D00003E0000400001430204} - end - object lblWelcome: TLabel - Left = 172 - Top = 10 - Width = 318 - Height = 50 - Caption = 'Welcome to the Metamod:Source (version) Setup Wizard' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -21 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - WordWrap = True - end - object lblInfo1: TLabel - Left = 172 - Top = 82 - Width = 331 - Height = 26 - Caption = - 'This wizard will guide you through the installation of Metamod:S' + - 'ource (version).' - WordWrap = True - end - object lblInfo2: TLabel - Left = 172 - Top = 120 - Width = 335 - Height = 39 - Caption = - 'It is recommended that you close all other applications before s' + - 'tarting a setup for e.g. Half-Life 2 or other games. Otherwise y' + - 'ou should restart your system after this installation.' - WordWrap = True - end - object lblInfo3: TLabel - Left = 172 - Top = 176 - Width = 108 - Height = 13 - Caption = 'Click Next to continue.' - end - end - object jspLicense: TJvStandardPage - Left = 0 - Top = 0 - Width = 527 - Height = 314 - object pnlLicense: TPanel - Left = 0 - Top = 0 - Width = 527 - Height = 49 - Align = alTop - BevelOuter = bvNone - Color = clWhite - TabOrder = 0 - object imgIcon1: TImage - Left = 486 - Top = 8 - Width = 32 - Height = 32 - Picture.Data = { - 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000002000 - 0000200806000000737A7AF40000000467414D410000AFC837058AE900000019 - 74455874536F6674776172650041646F626520496D616765526561647971C965 - 3C000008ED4944415478DAD556096C54D7153D7FE6CFFC59BC321EE3F1162F60 - 833DB6C10B019C60410007D43649518480B64924BAD0D00401A58AD456EA42A4 - 268A4848216D43054A55910588484A020D2EE09D181BDB78C106DB638FEDB1F1 - 18DBE3F12C7FFED2FBBFC1402090B46AAB3EE96966DEBCE5DC7BCF3DF732AB57 - 3F8EFFE6D06AB5686C6C80CBE5527F33FF8F00CC34B9AF7340969529836120B1 - 2C3BDED07001C3C3C35F19004B7339CDB5744911DD9328430E67C02817D264EE - 7B58926408A20893914320C08B3A1DDBD9D3D3BDB7B3B3E3FDAF02600341DF29 - 8872BE286BC1EA39707AFA6419D5A2202F83E74380C883D5021A0D73D7E346A3 - 1E3F78E69B489D930247B71307DEF9580182CB97DBB7381C3D7FF832007134F7 - 0BA2F494ACE1101F6B4656BC0F732CE3B09A791875324472ABC7CF6060C288F6 - E128740C6AE1F54E41AF9566BC120886B0A2380BDF5B5F8ADFED3B8A977EB20E - 474FD4E2A393B5049819AFACACB0DF0B400645EC3819362F26D68255760F8A13 - 5D88B725C2146B87C69C044617465B44C8C1318426AEC0E36A419B730A7FBFFA - 102E748A80E023B269542F994D9C1227F294803FEEDE80831F36A0ACBC590D49 - 7D7DDDFA2F02502C3FC70B4CC6FC0C2B36E5B6213BD10073E626B0519960345A - C892A0D00A924C618086EE26DF0B531086CEC1DD7E0CA77A5270AC2E0281A949 - C54A8ABF043E24E1575B164267B6E2B7FBCB2189210A234B002E6CBE1D8086E6 - DFC8F235F6F9B3F1C385E7911C1B0EA3FD456828759A1D22AE793420C354F215 - A6F230734A9C152611109D19D24407BC4D7B503698834395B3C0FB271122BC1B - 4B6D5856908C1D7B9BE0A330190D3A088218AAAAAA58C19496AE515D45F35951 - 940FC6C55BB1BDA41369BA361873B781E1ACD02288CFDA67C1311E01032B4224 - 721526B8919B14002FDE229E863523D47F0ABEDE933836B00A7F39A34141860E - AF6F5F884FEAFCE8EC19414B970703435E0C0D0D5636355D5CCBE4E717107B35 - E6A8A8E866B0E6B4CDAB24AC8CFA94DC351BBAF4F58A79D03012DA5D61180B18 - 31EC35C0E531C0C28DE3E9FC6BE40D8AF50C021DE4C93EF08E0F302E5AF04A4D - 31A6A6043C5A10A7440D1CC7A2B27114DDCE71345EACFBB1DBED7E8BD1EBF588 - 8B8B5B3F37D3FE6E669A053B1757221A2E30FA30B0B615605813794702AB91C1 - E944B40E46E2484B32B990C7A6050EA4C70AAA17981B00C4894E88A3F5F4A084 - F29102BC713A1641BF173733D4C8E9303939DE535B5B53425E77AACB0B16E4BF - 1F13F7D0D31B96C978D2F6992A9732B15C634E80262243BD4C3141A79531E4D1 - 615F7506A67816453627BEF3F02802218DCA03884188D79B2841FCAAFC8DF251 - 78B972097A9C93D0B1D308585687E6E6C657FBFB9DBB542122361A962C296E8B - B6C6A5EE5CD98B1C632318AD7EDAADF4B0C6685179408B30E9451CA88C468533 - 0D0612244E1EC32F4ABB1161A444080520FB06200B816952D2F11089C581D665 - 38D940DE632525D42442018F42BE502854AF02309BCDC9458B96B627265A4D2F - 9534205ED74BABBADB845C525D6B301AD03164C42F4FCE87DE14AD7A64CA17C2 - F78B9AF18D6C377D0F4E8BBEE2094C678A4CE9F651DF221CAC88849EE1A1D3E9 - 70F5EA950F3A3A2E6FA42D82BA2F2C2C2CBBA070496366BA95DDB5B41A167644 - B5F6F6A1643C47ECFFD9311BCE0F6722D512443817428B2B02B931DD78EDDB0E - 08127B8B8CEA1905630865AE3CEC3F1307AD1C5016C4EAEAAA755EAFF7F8CC3E - 05402101C8488FB901C07D1700935E467927879F7F9A05D61085AD4BDB616405 - BC7ACE0E569AC09E275A30CF16425060EE02F00F572EF69DB141AF1194D43B7F - F162C36AFAC733B38F42904221684D4A8CA110D4C3A673DE118269F64AD8FA5E - 323A3D69C8B47AF1C6130D18F3EBF1E2F185182652AEB7B7E285E56E7883B780 - DF0CC1C7BD853848BC51F4A3AEEEFC0B947A6FDEE15D62BC69C9D2475A2DD6B8 - 949D8F75C16E6EA130EA67DC19669070B4DE88D7CA73603499F0D3925694660C - 931831D85D361FA7AFC623DE3088031B3A10499D829F57C8379D968A0CFFB9B5 - 18279BF4084E5DEFABA9A95652CF716778D5345C782CC696FAD4A64702F856FC - 594AC3E9782AB2EB0BCAF8D1BBE918E293B138D98DDF3CDEA23EAE5854E9B010 - 885C88C4FC67165CC2D098041BF173D3121EFEA084EB41135EAE5A8ADE411E1D - 979BF7F4F5F56DFF62E55301D86CF1DFCDCEC97F675E6A38763C5C812876420D - 8362FD818A701C6AB0233A9CC5AF57372327DE4379AF55C185A8F0ED3A9107E7 - 7818BC93E3F0F21C526679F1F6C6AB30698328776560EFD964F0BE715F7575E5 - 63C160B0F69E00480BA2480B9A4C1131C99B974F6265ECE7249B7A38DC1A3C7F - 641E021A1B9ECCEEC3B647AFC02F686F1E839974E17063320E5D9843592223DA - 2460EE2C379E2BEC22D594F14A55212E39240C3ABB4EB4B5B5AEA323C17B0250 - 466242E2D6ACECBC3767CF8EC08E920E6484F7E3D250241A5C5698382D4A5287 - 610DE311923433C754659C34128054E42578A8405D872D22A0880D8E74CCC3E1 - 9A704A046FB0A6A66A9DCFE73B817B8C1900D4C57054984E455BE24BEC734CD8 - B2A81D49E113D4824D133240960B92A270CCF42995E6D37D2129377542B21A92 - 50C087B37D09F853790C756A3CDADA2EBDD5D7D7BB8D4EF0F705A00C83C19051 - 54B4E834678C4A9A9F66C2B3454ECC891CA5326B80ACD1DDD87E03C08DEF37B1 - 2875C017E471BA2B0E876B23C0533BD6EFEC296B6D6D798EFE75E24BC65D2D2D - E9C262F2C47B9C3132D932CB88B5797E14278F20C6A474315AA57ADC925BF28D - D221F979115D6E033EA19EA1B6430B860468A0BFF72C3DFE3CA55D1BEE33EED9 - 53731C97939565FFBD35366E9944D9906065919714C2DCD800628907D4D0A81D - AF27C0A07F5C8F9601035AFBB5540F04305250E8EABAF2576ABD77D35557F080 - 71BFA63ED266B36D494949DB6C0E8B4C97C972C5039C9E514BAB4C0002216ACB - 69529347BF7969D47DEDF3EEEEAEB73D1ECF87747EEC418F3F08C04D72A6582C - 96353131D695111111597ABDC14A65D500E55951F005027ED7D8D858D3C8C8B5 - B2C9C9C9725AEF03EEA84BFF1E80DB23433396A47B360130290BA2284E499244 - E51354C1E0FB1A77FD4B00FE23E37F0EE09F19A8E321D9E34DB9000000004945 - 4E44AE426082} - Stretch = True - Transparent = True - end - object lblTitle1: TLabel - Left = 12 - Top = 8 - Width = 116 - Height = 14 - Caption = 'License Agreement' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - end - object lblSubTitle1: TLabel - Left = 22 - Top = 28 - Width = 408 - Height = 13 - Caption = - 'Please review the following license terms before installing Meta' + - 'mod:Source (version).' - end - object bvlSpacer1: TBevel - Left = 0 - Top = 46 - Width = 527 - Height = 3 - Align = alBottom - Shape = bsBottomLine - end - end - object freLicense: TmxFlatRichEdit - Left = 10 - Top = 62 - Width = 507 - Height = 207 - Lines.Strings = ( - 'The zlib/libpng License' - '' - 'Copyright (c) 2006, AlliedModders' - '' - - 'This software is provided '#39'as-is'#39', without any express or implie' + - 'd warranty. In no event will the ' - - 'authors be held liable for any damages arising from the use of t' + - 'his software.' - '' - - 'Permission is granted to anyone to use this software for any pur' + - 'pose, including commercial ' - - 'applications, and to alter it and redistribute it freely, subjec' + - 't to the following restrictions:' - '' - - ' 1. The origin of this software must not be misrepresented; y' + - 'ou must not claim that you wrote the ' - - 'original software. If you use this software in a product, an ack' + - 'nowledgment in the product ' - 'documentation would be appreciated but is not required.' - '' - - ' 2. Altered source versions must be plainly marked as such, a' + - 'nd must not be misrepresented as ' - 'being the original software.' - '' - - ' 3. This notice may not be removed or altered from any source' + - ' distribution.' - '') - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 1 - Activate = True - BorderColor = clBtnShadow - Flat = True - ShowBorder = True - Version = '1.26' - end - object frbAgree: TFlatRadioButton - Left = 10 - Top = 274 - Width = 231 - Height = 17 - Caption = 'I accept the terms in the License Agreement' - TabOrder = 2 - OnClick = CheckNext - end - object ftbDontAgree: TFlatRadioButton - Left = 10 - Top = 290 - Width = 265 - Height = 17 - Caption = 'I do not accept the terms in the License Agreement' - Checked = True - TabOrder = 3 - TabStop = True - OnClick = CheckNext - end - end - object jspInstallMethod: TJvStandardPage - Left = 0 - Top = 0 - Width = 527 - Height = 314 - object lblInstallMethod: TLabel - Left = 124 - Top = 124 - Width = 144 - Height = 13 - Caption = 'Please select a install method:' - end - object pnlHeader2: TPanel - Left = 0 - Top = 0 - Width = 527 - Height = 49 - Align = alTop - BevelOuter = bvNone - Color = clWhite - TabOrder = 0 - object imgIcon2: TImage - Left = 486 - Top = 8 - Width = 32 - Height = 32 - AutoSize = True - Picture.Data = { - 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000002000 - 0000200806000000737A7AF40000000467414D410000AFC837058AE900000019 - 74455874536F6674776172650041646F626520496D616765526561647971C965 - 3C000008ED4944415478DAD556096C54D7153D7FE6CFFC59BC321EE3F1162F60 - 833DB6C10B019C60410007D43649518480B64924BAD0D00401A58AD456EA42A4 - 268A4848216D43054A55910588484A020D2EE09D181BDB78C106DB638FEDB1F1 - 18DBE3F12C7FFED2FBBFC1402090B46AAB3EE96966DEBCE5DC7BCF3DF732AB57 - 3F8EFFE6D06AB5686C6C80CBE5527F33FF8F00CC34B9AF7340969529836120B1 - 2C3BDED07001C3C3C35F19004B7339CDB5744911DD9328430E67C02817D264EE - 7B58926408A20893914320C08B3A1DDBD9D3D3BDB7B3B3E3FDAF02600341DF29 - 8872BE286BC1EA39707AFA6419D5A2202F83E74380C883D5021A0D73D7E346A3 - 1E3F78E69B489D930247B71307DEF9580182CB97DBB7381C3D7FF832007134F7 - 0BA2F494ACE1101F6B4656BC0F732CE3B09A791875324472ABC7CF6060C288F6 - E128740C6AE1F54E41AF9566BC120886B0A2380BDF5B5F8ADFED3B8A977EB20E - 474FD4E2A393B5049819AFACACB0DF0B400645EC3819362F26D68255760F8A13 - 5D88B725C2146B87C69C044617465B44C8C1318426AEC0E36A419B730A7FBFFA - 102E748A80E023B269542F994D9C1227F294803FEEDE80831F36A0ACBC590D49 - 7D7DDDFA2F02502C3FC70B4CC6FC0C2B36E5B6213BD10073E626B0519960345A - C892A0D00A924C618086EE26DF0B531086CEC1DD7E0CA77A5270AC2E0281A949 - C54A8ABF043E24E1575B164267B6E2B7FBCB2189210A234B002E6CBE1D8086E6 - DFC8F235F6F9B3F1C385E7911C1B0EA3FD456828759A1D22AE793420C354F215 - A6F230734A9C152611109D19D24407BC4D7B503698834395B3C0FB271122BC1B - 4B6D5856908C1D7B9BE0A330190D3A088218AAAAAA58C19496AE515D45F35951 - 940FC6C55BB1BDA41369BA361873B781E1ACD02288CFDA67C1311E01032B4224 - 721526B8919B14002FDE229E863523D47F0ABEDE933836B00A7F39A34141860E - AF6F5F884FEAFCE8EC19414B970703435E0C0D0D5636355D5CCBE4E717107B35 - E6A8A8E866B0E6B4CDAB24AC8CFA94DC351BBAF4F58A79D03012DA5D61180B18 - 31EC35C0E531C0C28DE3E9FC6BE40D8AF50C021DE4C93EF08E0F302E5AF04A4D - 31A6A6043C5A10A7440D1CC7A2B27114DDCE71345EACFBB1DBED7E8BD1EBF588 - 8B8B5B3F37D3FE6E669A053B1757221A2E30FA30B0B615605813794702AB91C1 - E944B40E46E2484B32B990C7A6050EA4C70AAA17981B00C4894E88A3F5F4A084 - F29102BC713A1641BF173733D4C8E9303939DE535B5B53425E77AACB0B16E4BF - 1F13F7D0D31B96C978D2F6992A9732B15C634E80262243BD4C3141A79531E4D1 - 615F7506A67816453627BEF3F02802218DCA03884188D79B2841FCAAFC8DF251 - 78B972097A9C93D0B1D308585687E6E6C657FBFB9DBB542122361A962C296E8B - B6C6A5EE5CD98B1C632318AD7EDAADF4B0C6685179408B30E9451CA88C468533 - 0D0612244E1EC32F4ABB1161A444080520FB06200B816952D2F11089C581D665 - 38D940DE632525D42442018F42BE502854AF02309BCDC9458B96B627265A4D2F - 9534205ED74BABBADB845C525D6B301AD03164C42F4FCE87DE14AD7A64CA17C2 - F78B9AF18D6C377D0F4E8BBEE2094C678A4CE9F651DF221CAC88849EE1A1D3E9 - 70F5EA950F3A3A2E6FA42D82BA2F2C2C2CBBA070496366BA95DDB5B41A167644 - B5F6F6A1643C47ECFFD9311BCE0F6722D512443817428B2B02B931DD78EDDB0E - 08127B8B8CEA1905630865AE3CEC3F1307AD1C5016C4EAEAAA755EAFF7F8CC3E - 05402101C8488FB901C07D1700935E467927879F7F9A05D61085AD4BDB616405 - BC7ACE0E569AC09E275A30CF16425060EE02F00F572EF69DB141AF1194D43B7F - F162C36AFAC733B38F42904221684D4A8CA110D4C3A673DE118269F64AD8FA5E - 323A3D69C8B47AF1C6130D18F3EBF1E2F185182652AEB7B7E285E56E7883B780 - DF0CC1C7BD853848BC51F4A3AEEEFC0B947A6FDEE15D62BC69C9D2475A2DD6B8 - 949D8F75C16E6EA130EA67DC19669070B4DE88D7CA73603499F0D3925694660C - 931831D85D361FA7AFC623DE3088031B3A10499D829F57C8379D968A0CFFB9B5 - 18279BF4084E5DEFABA9A95652CF716778D5345C782CC696FAD4A64702F856FC - 594AC3E9782AB2EB0BCAF8D1BBE918E293B138D98DDF3CDEA23EAE5854E9B010 - 885C88C4FC67165CC2D098041BF173D3121EFEA084EB41135EAE5A8ADE411E1D - 979BF7F4F5F56DFF62E55301D86CF1DFCDCEC97F675E6A38763C5C812876420D - 8362FD818A701C6AB0233A9CC5AF57372327DE4379AF55C185A8F0ED3A9107E7 - 7818BC93E3F0F21C526679F1F6C6AB30698328776560EFD964F0BE715F7575E5 - 63C160B0F69E00480BA2480B9A4C1131C99B974F6265ECE7249B7A38DC1A3C7F - 641E021A1B9ECCEEC3B647AFC02F686F1E839974E17063320E5D9843592223DA - 2460EE2C379E2BEC22D594F14A55212E39240C3ABB4EB4B5B5AEA323C17B0250 - 466242E2D6ACECBC3767CF8EC08E920E6484F7E3D250241A5C5698382D4A5287 - 610DE311923433C754659C34128054E42578A8405D872D22A0880D8E74CCC3E1 - 9A704A046FB0A6A66A9DCFE73B817B8C1900D4C57054984E455BE24BEC734CD8 - B2A81D49E113D4824D133240960B92A270CCF42995E6D37D2129377542B21A92 - 50C087B37D09F853790C756A3CDADA2EBDD5D7D7BB8D4EF0F705A00C83C19051 - 54B4E834678C4A9A9F66C2B3454ECC891CA5326B80ACD1DDD87E03C08DEF37B1 - 2875C017E471BA2B0E876B23C0533BD6EFEC296B6D6D798EFE75E24BC65D2D2D - E9C262F2C47B9C3132D932CB88B5797E14278F20C6A474315AA57ADC925BF28D - D221F979115D6E033EA19EA1B6430B860468A0BFF72C3DFE3CA55D1BEE33EED9 - 53731C97939565FFBD35366E9944D9906065919714C2DCD800628907D4D0A81D - AF27C0A07F5C8F9601035AFBB5540F04305250E8EABAF2576ABD77D35557F080 - 71BFA63ED266B36D494949DB6C0E8B4C97C972C5039C9E514BAB4C0002216ACB - 69529347BF7969D47DEDF3EEEEAEB73D1ECF87747EEC418F3F08C04D72A6582C - 96353131D695111111597ABDC14A65D500E55951F005027ED7D8D858D3C8C8B5 - B2C9C9C9725AEF03EEA84BFF1E80DB23433396A47B360130290BA2284E499244 - E51354C1E0FB1A77FD4B00FE23E37F0EE09F19A8E321D9E34DB9000000004945 - 4E44AE426082} - Transparent = True - end - object lblTitle2: TLabel - Left = 12 - Top = 8 - Width = 137 - Height = 14 - Caption = 'Choose install method' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - end - object lblSubTitle2: TLabel - Left = 22 - Top = 28 - Width = 263 - Height = 13 - Caption = 'Choose a install method for installing Metamod:Source.' - end - object bvlSpacer2: TBevel - Left = 0 - Top = 46 - Width = 527 - Height = 3 - Align = alBottom - Shape = bsBottomLine - end - end - object pnlInstallMethod: TPanel - Left = 122 - Top = 142 - Width = 267 - Height = 97 - BevelOuter = bvLowered - TabOrder = 1 - object frbDedicatedServer: TFlatRadioButton - Left = 4 - Top = 4 - Width = 135 - Height = 17 - Caption = 'Steam Dedicated Server' - Checked = True - TabOrder = 0 - TabStop = True - end - object frbListenServer: TFlatRadioButton - Left = 4 - Top = 22 - Width = 115 - Height = 17 - Caption = 'Steam Listen Server' - TabOrder = 1 - end - object frbSelectMod: TFlatRadioButton - Left = 4 - Top = 58 - Width = 117 - Height = 17 - Caption = 'Select mod directory' - TabOrder = 3 - end - object frbFTP: TFlatRadioButton - Left = 4 - Top = 76 - Width = 35 - Height = 17 - Caption = 'FTP' - TabOrder = 4 - end - object frbStandaloneServer: TFlatRadioButton - Left = 4 - Top = 40 - Width = 107 - Height = 17 - Caption = 'Standalone Server' - TabOrder = 2 - end - end - end - object jspSelectMod: TJvStandardPage - Left = 0 - Top = 0 - Width = 527 - Height = 314 - object lblInfo: TLabel - Left = 138 - Top = 114 - Width = 255 - Height = 26 - Caption = - 'The following mods were detected. Please select the mod you want' + - ' to install Metamod:Source to:' - WordWrap = True - end - object shpMods: TShape - Left = 136 - Top = 142 - Width = 255 - Height = 104 - Pen.Color = clBtnShadow - end - object pnlSelectMod: TPanel - Left = 0 - Top = 0 - Width = 527 - Height = 49 - Align = alTop - BevelOuter = bvNone - Color = clWhite - TabOrder = 0 - object imgIcon5: TImage - Left = 486 - Top = 8 - Width = 32 - Height = 32 - AutoSize = True - Picture.Data = { - 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000002000 - 0000200806000000737A7AF40000000467414D410000AFC837058AE900000019 - 74455874536F6674776172650041646F626520496D616765526561647971C965 - 3C000008ED4944415478DAD556096C54D7153D7FE6CFFC59BC321EE3F1162F60 - 833DB6C10B019C60410007D43649518480B64924BAD0D00401A58AD456EA42A4 - 268A4848216D43054A55910588484A020D2EE09D181BDB78C106DB638FEDB1F1 - 18DBE3F12C7FFED2FBBFC1402090B46AAB3EE96966DEBCE5DC7BCF3DF732AB57 - 3F8EFFE6D06AB5686C6C80CBE5527F33FF8F00CC34B9AF7340969529836120B1 - 2C3BDED07001C3C3C35F19004B7339CDB5744911DD9328430E67C02817D264EE - 7B58926408A20893914320C08B3A1DDBD9D3D3BDB7B3B3E3FDAF02600341DF29 - 8872BE286BC1EA39707AFA6419D5A2202F83E74380C883D5021A0D73D7E346A3 - 1E3F78E69B489D930247B71307DEF9580182CB97DBB7381C3D7FF832007134F7 - 0BA2F494ACE1101F6B4656BC0F732CE3B09A791875324472ABC7CF6060C288F6 - E128740C6AE1F54E41AF9566BC120886B0A2380BDF5B5F8ADFED3B8A977EB20E - 474FD4E2A393B5049819AFACACB0DF0B400645EC3819362F26D68255760F8A13 - 5D88B725C2146B87C69C044617465B44C8C1318426AEC0E36A419B730A7FBFFA - 102E748A80E023B269542F994D9C1227F294803FEEDE80831F36A0ACBC590D49 - 7D7DDDFA2F02502C3FC70B4CC6FC0C2B36E5B6213BD10073E626B0519960345A - C892A0D00A924C618086EE26DF0B531086CEC1DD7E0CA77A5270AC2E0281A949 - C54A8ABF043E24E1575B164267B6E2B7FBCB2189210A234B002E6CBE1D8086E6 - DFC8F235F6F9B3F1C385E7911C1B0EA3FD456828759A1D22AE793420C354F215 - A6F230734A9C152611109D19D24407BC4D7B503698834395B3C0FB271122BC1B - 4B6D5856908C1D7B9BE0A330190D3A088218AAAAAA58C19496AE515D45F35951 - 940FC6C55BB1BDA41369BA361873B781E1ACD02288CFDA67C1311E01032B4224 - 721526B8919B14002FDE229E863523D47F0ABEDE933836B00A7F39A34141860E - AF6F5F884FEAFCE8EC19414B970703435E0C0D0D5636355D5CCBE4E717107B35 - E6A8A8E866B0E6B4CDAB24AC8CFA94DC351BBAF4F58A79D03012DA5D61180B18 - 31EC35C0E531C0C28DE3E9FC6BE40D8AF50C021DE4C93EF08E0F302E5AF04A4D - 31A6A6043C5A10A7440D1CC7A2B27114DDCE71345EACFBB1DBED7E8BD1EBF588 - 8B8B5B3F37D3FE6E669A053B1757221A2E30FA30B0B615605813794702AB91C1 - E944B40E46E2484B32B990C7A6050EA4C70AAA17981B00C4894E88A3F5F4A084 - F29102BC713A1641BF173733D4C8E9303939DE535B5B53425E77AACB0B16E4BF - 1F13F7D0D31B96C978D2F6992A9732B15C634E80262243BD4C3141A79531E4D1 - 615F7506A67816453627BEF3F02802218DCA03884188D79B2841FCAAFC8DF251 - 78B972097A9C93D0B1D308585687E6E6C657FBFB9DBB542122361A962C296E8B - B6C6A5EE5CD98B1C632318AD7EDAADF4B0C6685179408B30E9451CA88C468533 - 0D0612244E1EC32F4ABB1161A444080520FB06200B816952D2F11089C581D665 - 38D940DE632525D42442018F42BE502854AF02309BCDC9458B96B627265A4D2F - 9534205ED74BABBADB845C525D6B301AD03164C42F4FCE87DE14AD7A64CA17C2 - F78B9AF18D6C377D0F4E8BBEE2094C678A4CE9F651DF221CAC88849EE1A1D3E9 - 70F5EA950F3A3A2E6FA42D82BA2F2C2C2CBBA070496366BA95DDB5B41A167644 - B5F6F6A1643C47ECFFD9311BCE0F6722D512443817428B2B02B931DD78EDDB0E - 08127B8B8CEA1905630865AE3CEC3F1307AD1C5016C4EAEAAA755EAFF7F8CC3E - 05402101C8488FB901C07D1700935E467927879F7F9A05D61085AD4BDB616405 - BC7ACE0E569AC09E275A30CF16425060EE02F00F572EF69DB141AF1194D43B7F - F162C36AFAC733B38F42904221684D4A8CA110D4C3A673DE118269F64AD8FA5E - 323A3D69C8B47AF1C6130D18F3EBF1E2F185182652AEB7B7E285E56E7883B780 - DF0CC1C7BD853848BC51F4A3AEEEFC0B947A6FDEE15D62BC69C9D2475A2DD6B8 - 949D8F75C16E6EA130EA67DC19669070B4DE88D7CA73603499F0D3925694660C - 931831D85D361FA7AFC623DE3088031B3A10499D829F57C8379D968A0CFFB9B5 - 18279BF4084E5DEFABA9A95652CF716778D5345C782CC696FAD4A64702F856FC - 594AC3E9782AB2EB0BCAF8D1BBE918E293B138D98DDF3CDEA23EAE5854E9B010 - 885C88C4FC67165CC2D098041BF173D3121EFEA084EB41135EAE5A8ADE411E1D - 979BF7F4F5F56DFF62E55301D86CF1DFCDCEC97F675E6A38763C5C812876420D - 8362FD818A701C6AB0233A9CC5AF57372327DE4379AF55C185A8F0ED3A9107E7 - 7818BC93E3F0F21C526679F1F6C6AB30698328776560EFD964F0BE715F7575E5 - 63C160B0F69E00480BA2480B9A4C1131C99B974F6265ECE7249B7A38DC1A3C7F - 641E021A1B9ECCEEC3B647AFC02F686F1E839974E17063320E5D9843592223DA - 2460EE2C379E2BEC22D594F14A55212E39240C3ABB4EB4B5B5AEA323C17B0250 - 466242E2D6ACECBC3767CF8EC08E920E6484F7E3D250241A5C5698382D4A5287 - 610DE311923433C754659C34128054E42578A8405D872D22A0880D8E74CCC3E1 - 9A704A046FB0A6A66A9DCFE73B817B8C1900D4C57054984E455BE24BEC734CD8 - B2A81D49E113D4824D133240960B92A270CCF42995E6D37D2129377542B21A92 - 50C087B37D09F853790C756A3CDADA2EBDD5D7D7BB8D4EF0F705A00C83C19051 - 54B4E834678C4A9A9F66C2B3454ECC891CA5326B80ACD1DDD87E03C08DEF37B1 - 2875C017E471BA2B0E876B23C0533BD6EFEC296B6D6D798EFE75E24BC65D2D2D - E9C262F2C47B9C3132D932CB88B5797E14278F20C6A474315AA57ADC925BF28D - D221F979115D6E033EA19EA1B6430B860468A0BFF72C3DFE3CA55D1BEE33EED9 - 53731C97939565FFBD35366E9944D9906065919714C2DCD800628907D4D0A81D - AF27C0A07F5C8F9601035AFBB5540F04305250E8EABAF2576ABD77D35557F080 - 71BFA63ED266B36D494949DB6C0E8B4C97C972C5039C9E514BAB4C0002216ACB - 69529347BF7969D47DEDF3EEEEAEB73D1ECF87747EEC418F3F08C04D72A6582C - 96353131D695111111597ABDC14A65D500E55951F005027ED7D8D858D3C8C8B5 - B2C9C9C9725AEF03EEA84BFF1E80DB23433396A47B360130290BA2284E499244 - E51354C1E0FB1A77FD4B00FE23E37F0EE09F19A8E321D9E34DB9000000004945 - 4E44AE426082} - Stretch = True - Transparent = True - end - object lblSelectMod: TLabel - Left = 12 - Top = 8 - Width = 68 - Height = 14 - Caption = 'Select Mod' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - end - object lblSelectModInfo: TLabel - Left = 22 - Top = 28 - Width = 332 - Height = 13 - Caption = - 'Please select the mod Metamod:Source (version) shall be installe' + - 'd to.' - end - object bvlSelectMod: TBevel - Left = 0 - Top = 46 - Width = 527 - Height = 3 - Align = alBottom - Shape = bsBottomLine - end - end - object trvMods: TTreeView - Left = 137 - Top = 143 - Width = 253 - Height = 102 - BorderStyle = bsNone - Indent = 19 - MultiSelectStyle = [] - ReadOnly = True - RightClickSelect = True - RowSelect = True - TabOrder = 1 - OnClick = trvModsClick - end - end - object jspFTP: TJvStandardPage - Left = 0 - Top = 0 - Width = 527 - Height = 314 - object lblStep1: TLabel - Left = 44 - Top = 56 - Width = 100 - Height = 13 - Caption = '1. Set your FTP data' - end - object lblStep2: TLabel - Left = 44 - Top = 146 - Width = 244 - Height = 13 - Caption = '2. Connect to server and select the mod directory:' - end - object lblStep4: TLabel - Left = 44 - Top = 296 - Width = 64 - Height = 13 - Caption = '4. Click Next.' - end - object lblStep3: TLabel - Left = 44 - Top = 252 - Width = 223 - Height = 13 - Caption = '3. Select the operating system of your server:' - end - object pnlHeader3: TPanel - Left = 0 - Top = 0 - Width = 527 - Height = 49 - Align = alTop - BevelOuter = bvNone - Color = clWhite - TabOrder = 0 - object imgIcon3: TImage - Left = 486 - Top = 8 - Width = 32 - Height = 32 - AutoSize = True - Picture.Data = { - 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000002000 - 0000200806000000737A7AF40000000467414D410000AFC837058AE900000019 - 74455874536F6674776172650041646F626520496D616765526561647971C965 - 3C000008ED4944415478DAD556096C54D7153D7FE6CFFC59BC321EE3F1162F60 - 833DB6C10B019C60410007D43649518480B64924BAD0D00401A58AD456EA42A4 - 268A4848216D43054A55910588484A020D2EE09D181BDB78C106DB638FEDB1F1 - 18DBE3F12C7FFED2FBBFC1402090B46AAB3EE96966DEBCE5DC7BCF3DF732AB57 - 3F8EFFE6D06AB5686C6C80CBE5527F33FF8F00CC34B9AF7340969529836120B1 - 2C3BDED07001C3C3C35F19004B7339CDB5744911DD9328430E67C02817D264EE - 7B58926408A20893914320C08B3A1DDBD9D3D3BDB7B3B3E3FDAF02600341DF29 - 8872BE286BC1EA39707AFA6419D5A2202F83E74380C883D5021A0D73D7E346A3 - 1E3F78E69B489D930247B71307DEF9580182CB97DBB7381C3D7FF832007134F7 - 0BA2F494ACE1101F6B4656BC0F732CE3B09A791875324472ABC7CF6060C288F6 - E128740C6AE1F54E41AF9566BC120886B0A2380BDF5B5F8ADFED3B8A977EB20E - 474FD4E2A393B5049819AFACACB0DF0B400645EC3819362F26D68255760F8A13 - 5D88B725C2146B87C69C044617465B44C8C1318426AEC0E36A419B730A7FBFFA - 102E748A80E023B269542F994D9C1227F294803FEEDE80831F36A0ACBC590D49 - 7D7DDDFA2F02502C3FC70B4CC6FC0C2B36E5B6213BD10073E626B0519960345A - C892A0D00A924C618086EE26DF0B531086CEC1DD7E0CA77A5270AC2E0281A949 - C54A8ABF043E24E1575B164267B6E2B7FBCB2189210A234B002E6CBE1D8086E6 - DFC8F235F6F9B3F1C385E7911C1B0EA3FD456828759A1D22AE793420C354F215 - A6F230734A9C152611109D19D24407BC4D7B503698834395B3C0FB271122BC1B - 4B6D5856908C1D7B9BE0A330190D3A088218AAAAAA58C19496AE515D45F35951 - 940FC6C55BB1BDA41369BA361873B781E1ACD02288CFDA67C1311E01032B4224 - 721526B8919B14002FDE229E863523D47F0ABEDE933836B00A7F39A34141860E - AF6F5F884FEAFCE8EC19414B970703435E0C0D0D5636355D5CCBE4E717107B35 - E6A8A8E866B0E6B4CDAB24AC8CFA94DC351BBAF4F58A79D03012DA5D61180B18 - 31EC35C0E531C0C28DE3E9FC6BE40D8AF50C021DE4C93EF08E0F302E5AF04A4D - 31A6A6043C5A10A7440D1CC7A2B27114DDCE71345EACFBB1DBED7E8BD1EBF588 - 8B8B5B3F37D3FE6E669A053B1757221A2E30FA30B0B615605813794702AB91C1 - E944B40E46E2484B32B990C7A6050EA4C70AAA17981B00C4894E88A3F5F4A084 - F29102BC713A1641BF173733D4C8E9303939DE535B5B53425E77AACB0B16E4BF - 1F13F7D0D31B96C978D2F6992A9732B15C634E80262243BD4C3141A79531E4D1 - 615F7506A67816453627BEF3F02802218DCA03884188D79B2841FCAAFC8DF251 - 78B972097A9C93D0B1D308585687E6E6C657FBFB9DBB542122361A962C296E8B - B6C6A5EE5CD98B1C632318AD7EDAADF4B0C6685179408B30E9451CA88C468533 - 0D0612244E1EC32F4ABB1161A444080520FB06200B816952D2F11089C581D665 - 38D940DE632525D42442018F42BE502854AF02309BCDC9458B96B627265A4D2F - 9534205ED74BABBADB845C525D6B301AD03164C42F4FCE87DE14AD7A64CA17C2 - F78B9AF18D6C377D0F4E8BBEE2094C678A4CE9F651DF221CAC88849EE1A1D3E9 - 70F5EA950F3A3A2E6FA42D82BA2F2C2C2CBBA070496366BA95DDB5B41A167644 - B5F6F6A1643C47ECFFD9311BCE0F6722D512443817428B2B02B931DD78EDDB0E - 08127B8B8CEA1905630865AE3CEC3F1307AD1C5016C4EAEAAA755EAFF7F8CC3E - 05402101C8488FB901C07D1700935E467927879F7F9A05D61085AD4BDB616405 - BC7ACE0E569AC09E275A30CF16425060EE02F00F572EF69DB141AF1194D43B7F - F162C36AFAC733B38F42904221684D4A8CA110D4C3A673DE118269F64AD8FA5E - 323A3D69C8B47AF1C6130D18F3EBF1E2F185182652AEB7B7E285E56E7883B780 - DF0CC1C7BD853848BC51F4A3AEEEFC0B947A6FDEE15D62BC69C9D2475A2DD6B8 - 949D8F75C16E6EA130EA67DC19669070B4DE88D7CA73603499F0D3925694660C - 931831D85D361FA7AFC623DE3088031B3A10499D829F57C8379D968A0CFFB9B5 - 18279BF4084E5DEFABA9A95652CF716778D5345C782CC696FAD4A64702F856FC - 594AC3E9782AB2EB0BCAF8D1BBE918E293B138D98DDF3CDEA23EAE5854E9B010 - 885C88C4FC67165CC2D098041BF173D3121EFEA084EB41135EAE5A8ADE411E1D - 979BF7F4F5F56DFF62E55301D86CF1DFCDCEC97F675E6A38763C5C812876420D - 8362FD818A701C6AB0233A9CC5AF57372327DE4379AF55C185A8F0ED3A9107E7 - 7818BC93E3F0F21C526679F1F6C6AB30698328776560EFD964F0BE715F7575E5 - 63C160B0F69E00480BA2480B9A4C1131C99B974F6265ECE7249B7A38DC1A3C7F - 641E021A1B9ECCEEC3B647AFC02F686F1E839974E17063320E5D9843592223DA - 2460EE2C379E2BEC22D594F14A55212E39240C3ABB4EB4B5B5AEA323C17B0250 - 466242E2D6ACECBC3767CF8EC08E920E6484F7E3D250241A5C5698382D4A5287 - 610DE311923433C754659C34128054E42578A8405D872D22A0880D8E74CCC3E1 - 9A704A046FB0A6A66A9DCFE73B817B8C1900D4C57054984E455BE24BEC734CD8 - B2A81D49E113D4824D133240960B92A270CCF42995E6D37D2129377542B21A92 - 50C087B37D09F853790C756A3CDADA2EBDD5D7D7BB8D4EF0F705A00C83C19051 - 54B4E834678C4A9A9F66C2B3454ECC891CA5326B80ACD1DDD87E03C08DEF37B1 - 2875C017E471BA2B0E876B23C0533BD6EFEC296B6D6D798EFE75E24BC65D2D2D - E9C262F2C47B9C3132D932CB88B5797E14278F20C6A474315AA57ADC925BF28D - D221F979115D6E033EA19EA1B6430B860468A0BFF72C3DFE3CA55D1BEE33EED9 - 53731C97939565FFBD35366E9944D9906065919714C2DCD800628907D4D0A81D - AF27C0A07F5C8F9601035AFBB5540F04305250E8EABAF2576ABD77D35557F080 - 71BFA63ED266B36D494949DB6C0E8B4C97C972C5039C9E514BAB4C0002216ACB - 69529347BF7969D47DEDF3EEEEAEB73D1ECF87747EEC418F3F08C04D72A6582C - 96353131D695111111597ABDC14A65D500E55951F005027ED7D8D858D3C8C8B5 - B2C9C9C9725AEF03EEA84BFF1E80DB23433396A47B360130290BA2284E499244 - E51354C1E0FB1A77FD4B00FE23E37F0EE09F19A8E321D9E34DB9000000004945 - 4E44AE426082} - Transparent = True - end - object lblTitle3: TLabel - Left = 12 - Top = 8 - Width = 269 - Height = 14 - Caption = 'Installing Metamod:Source (version) via FTP' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - end - object lblSubTitle3: TLabel - Left = 22 - Top = 28 - Width = 189 - Height = 13 - Caption = 'Do the following steps and press Next. ' - end - object bvlSpacer3: TBevel - Left = 0 - Top = 46 - Width = 527 - Height = 3 - Align = alBottom - Shape = bsBottomLine - end - end - object pnlFTPData: TPanel - Left = 44 - Top = 72 - Width = 441 - Height = 64 - BevelOuter = bvLowered - TabOrder = 1 - object lblHost: TLabel - Left = 4 - Top = 4 - Width = 26 - Height = 13 - Caption = 'Host:' - end - object lblUserName: TLabel - Left = 180 - Top = 6 - Width = 52 - Height = 13 - Caption = 'Username:' - end - object lblPassword: TLabel - Left = 308 - Top = 4 - Width = 50 - Height = 13 - Caption = 'Password:' - end - object lblPort: TLabel - Left = 132 - Top = 4 - Width = 24 - Height = 13 - Caption = 'Port:' - end - object txtHost: TFlatEdit - Left = 4 - Top = 20 - Width = 121 - Height = 19 - ColorFlat = clBtnFace - ParentColor = True - TabOrder = 0 - end - object txtUserName: TFlatEdit - Left = 180 - Top = 20 - Width = 121 - Height = 19 - ColorFlat = clBtnFace - ParentColor = True - TabOrder = 2 - end - object txtPassword: TFlatEdit - Left = 308 - Top = 20 - Width = 127 - Height = 19 - ColorFlat = clBtnFace - ParentColor = True - PasswordChar = '*' - TabOrder = 3 - end - object txtPort: TFlatEdit - Left = 132 - Top = 20 - Width = 43 - Height = 19 - ColorFlat = clBtnFace - ParentColor = True - MaxLength = 5 - TabOrder = 1 - Text = '21' - OnChange = txtPortChange - end - object chkPassive: TFlatCheckBox - Left = 4 - Top = 44 - Width = 139 - Height = 16 - Caption = 'Use PASV (Passive) Mode' - Checked = True - TabOrder = 4 - TabStop = True - end - object cmdProxySettings: TFlatButton - Left = 350 - Top = 42 - Width = 83 - Height = 18 - ColorFocused = 16245198 - ColorDown = 16245198 - ColorHighLight = 8623776 - ColorShadow = 8623776 - Caption = 'Proxy-Settings' - TabOrder = 5 - OnClick = cmdProxySettingsClick - end - end - object cmdConnect: TFlatButton - Left = 416 - Top = 161 - Width = 71 - Height = 20 - ColorFocused = 16245198 - ColorDown = 16245198 - ColorBorder = clBtnShadow - ColorHighLight = clBtnShadow - ColorShadow = clBtnShadow - Caption = 'Connect' - TabOrder = 3 - OnClick = cmdConnectClick - end - object pnlDirectory: TPanel - Left = 44 - Top = 162 - Width = 367 - Height = 83 - BevelOuter = bvLowered - TabOrder = 2 - object trvDirectories: TTreeView - Left = 1 - Top = 1 - Width = 365 - Height = 81 - Align = alClient - BorderStyle = bsNone - Images = ilImages - Indent = 19 - TabOrder = 0 - OnChange = trvDirectoriesChange - OnCollapsing = trvDirectoriesCollapsing - OnExpanding = trvDirectoriesExpanding - OnExpanded = trvDirectoriesExpanded - OnMouseDown = trvDirectoriesMouseDown - end - end - object pnlOS: TPanel - Left = 44 - Top = 268 - Width = 441 - Height = 21 - BevelOuter = bvLowered - TabOrder = 4 - object optWindows: TFlatRadioButton - Left = 1 - Top = 3 - Width = 62 - Height = 14 - Caption = 'Windows' - Checked = True - TabOrder = 0 - TabStop = True - end - object optLinux: TFlatRadioButton - Left = 173 - Top = 3 - Width = 82 - Height = 14 - Caption = 'Linux (32-bit)' - TabOrder = 1 - end - object FlatRadioButton1: TFlatRadioButton - Left = 353 - Top = 3 - Width = 82 - Height = 14 - Caption = 'Linux (64-bit)' - Enabled = False - TabOrder = 2 - end - end - end - object jspInstallProgress: TJvStandardPage - Left = 0 - Top = 0 - Width = 527 - Height = 314 - Caption = 'jspInstallProgress' - object ggeAll: TFlatGauge - Left = 8 - Top = 84 - Width = 509 - Height = 24 - AdvColorBorder = 0 - Color = clBtnFace - ColorBorder = 8623776 - MaxValue = 8 - Progress = 0 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -9 - Font.Name = 'Tahoma' - Font.Style = [] - ParentColor = False - ParentFont = False - end - object lblProgress: TLabel - Left = 8 - Top = 66 - Width = 46 - Height = 13 - Caption = 'Progress:' - end - object ggeItem: TFlatGauge - Left = 8 - Top = 112 - Width = 509 - Height = 24 - AdvColorBorder = 0 - Color = clBtnFace - ColorBorder = 8623776 - Progress = 0 - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -9 - Font.Name = 'Tahoma' - Font.Style = [] - ParentColor = False - ParentFont = False - end - object lblDetails: TLabel - Left = 10 - Top = 152 - Width = 36 - Height = 13 - Caption = 'Details:' - end - object bvlSpace2: TBevel - Left = 4 - Top = 142 - Width = 519 - Height = 3 - Shape = bsTopLine - end - object pnlHeader5: TPanel - Left = 0 - Top = 0 - Width = 527 - Height = 49 - Align = alTop - BevelOuter = bvNone - Color = clWhite - TabOrder = 0 - object imgIcon4: TImage - Left = 486 - Top = 8 - Width = 32 - Height = 32 - AutoSize = True - Picture.Data = { - 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000002000 - 0000200806000000737A7AF40000000467414D410000AFC837058AE900000019 - 74455874536F6674776172650041646F626520496D616765526561647971C965 - 3C000008ED4944415478DAD556096C54D7153D7FE6CFFC59BC321EE3F1162F60 - 833DB6C10B019C60410007D43649518480B64924BAD0D00401A58AD456EA42A4 - 268A4848216D43054A55910588484A020D2EE09D181BDB78C106DB638FEDB1F1 - 18DBE3F12C7FFED2FBBFC1402090B46AAB3EE96966DEBCE5DC7BCF3DF732AB57 - 3F8EFFE6D06AB5686C6C80CBE5527F33FF8F00CC34B9AF7340969529836120B1 - 2C3BDED07001C3C3C35F19004B7339CDB5744911DD9328430E67C02817D264EE - 7B58926408A20893914320C08B3A1DDBD9D3D3BDB7B3B3E3FDAF02600341DF29 - 8872BE286BC1EA39707AFA6419D5A2202F83E74380C883D5021A0D73D7E346A3 - 1E3F78E69B489D930247B71307DEF9580182CB97DBB7381C3D7FF832007134F7 - 0BA2F494ACE1101F6B4656BC0F732CE3B09A791875324472ABC7CF6060C288F6 - E128740C6AE1F54E41AF9566BC120886B0A2380BDF5B5F8ADFED3B8A977EB20E - 474FD4E2A393B5049819AFACACB0DF0B400645EC3819362F26D68255760F8A13 - 5D88B725C2146B87C69C044617465B44C8C1318426AEC0E36A419B730A7FBFFA - 102E748A80E023B269542F994D9C1227F294803FEEDE80831F36A0ACBC590D49 - 7D7DDDFA2F02502C3FC70B4CC6FC0C2B36E5B6213BD10073E626B0519960345A - C892A0D00A924C618086EE26DF0B531086CEC1DD7E0CA77A5270AC2E0281A949 - C54A8ABF043E24E1575B164267B6E2B7FBCB2189210A234B002E6CBE1D8086E6 - DFC8F235F6F9B3F1C385E7911C1B0EA3FD456828759A1D22AE793420C354F215 - A6F230734A9C152611109D19D24407BC4D7B503698834395B3C0FB271122BC1B - 4B6D5856908C1D7B9BE0A330190D3A088218AAAAAA58C19496AE515D45F35951 - 940FC6C55BB1BDA41369BA361873B781E1ACD02288CFDA67C1311E01032B4224 - 721526B8919B14002FDE229E863523D47F0ABEDE933836B00A7F39A34141860E - AF6F5F884FEAFCE8EC19414B970703435E0C0D0D5636355D5CCBE4E717107B35 - E6A8A8E866B0E6B4CDAB24AC8CFA94DC351BBAF4F58A79D03012DA5D61180B18 - 31EC35C0E531C0C28DE3E9FC6BE40D8AF50C021DE4C93EF08E0F302E5AF04A4D - 31A6A6043C5A10A7440D1CC7A2B27114DDCE71345EACFBB1DBED7E8BD1EBF588 - 8B8B5B3F37D3FE6E669A053B1757221A2E30FA30B0B615605813794702AB91C1 - E944B40E46E2484B32B990C7A6050EA4C70AAA17981B00C4894E88A3F5F4A084 - F29102BC713A1641BF173733D4C8E9303939DE535B5B53425E77AACB0B16E4BF - 1F13F7D0D31B96C978D2F6992A9732B15C634E80262243BD4C3141A79531E4D1 - 615F7506A67816453627BEF3F02802218DCA03884188D79B2841FCAAFC8DF251 - 78B972097A9C93D0B1D308585687E6E6C657FBFB9DBB542122361A962C296E8B - B6C6A5EE5CD98B1C632318AD7EDAADF4B0C6685179408B30E9451CA88C468533 - 0D0612244E1EC32F4ABB1161A444080520FB06200B816952D2F11089C581D665 - 38D940DE632525D42442018F42BE502854AF02309BCDC9458B96B627265A4D2F - 9534205ED74BABBADB845C525D6B301AD03164C42F4FCE87DE14AD7A64CA17C2 - F78B9AF18D6C377D0F4E8BBEE2094C678A4CE9F651DF221CAC88849EE1A1D3E9 - 70F5EA950F3A3A2E6FA42D82BA2F2C2C2CBBA070496366BA95DDB5B41A167644 - B5F6F6A1643C47ECFFD9311BCE0F6722D512443817428B2B02B931DD78EDDB0E - 08127B8B8CEA1905630865AE3CEC3F1307AD1C5016C4EAEAAA755EAFF7F8CC3E - 05402101C8488FB901C07D1700935E467927879F7F9A05D61085AD4BDB616405 - BC7ACE0E569AC09E275A30CF16425060EE02F00F572EF69DB141AF1194D43B7F - F162C36AFAC733B38F42904221684D4A8CA110D4C3A673DE118269F64AD8FA5E - 323A3D69C8B47AF1C6130D18F3EBF1E2F185182652AEB7B7E285E56E7883B780 - DF0CC1C7BD853848BC51F4A3AEEEFC0B947A6FDEE15D62BC69C9D2475A2DD6B8 - 949D8F75C16E6EA130EA67DC19669070B4DE88D7CA73603499F0D3925694660C - 931831D85D361FA7AFC623DE3088031B3A10499D829F57C8379D968A0CFFB9B5 - 18279BF4084E5DEFABA9A95652CF716778D5345C782CC696FAD4A64702F856FC - 594AC3E9782AB2EB0BCAF8D1BBE918E293B138D98DDF3CDEA23EAE5854E9B010 - 885C88C4FC67165CC2D098041BF173D3121EFEA084EB41135EAE5A8ADE411E1D - 979BF7F4F5F56DFF62E55301D86CF1DFCDCEC97F675E6A38763C5C812876420D - 8362FD818A701C6AB0233A9CC5AF57372327DE4379AF55C185A8F0ED3A9107E7 - 7818BC93E3F0F21C526679F1F6C6AB30698328776560EFD964F0BE715F7575E5 - 63C160B0F69E00480BA2480B9A4C1131C99B974F6265ECE7249B7A38DC1A3C7F - 641E021A1B9ECCEEC3B647AFC02F686F1E839974E17063320E5D9843592223DA - 2460EE2C379E2BEC22D594F14A55212E39240C3ABB4EB4B5B5AEA323C17B0250 - 466242E2D6ACECBC3767CF8EC08E920E6484F7E3D250241A5C5698382D4A5287 - 610DE311923433C754659C34128054E42578A8405D872D22A0880D8E74CCC3E1 - 9A704A046FB0A6A66A9DCFE73B817B8C1900D4C57054984E455BE24BEC734CD8 - B2A81D49E113D4824D133240960B92A270CCF42995E6D37D2129377542B21A92 - 50C087B37D09F853790C756A3CDADA2EBDD5D7D7BB8D4EF0F705A00C83C19051 - 54B4E834678C4A9A9F66C2B3454ECC891CA5326B80ACD1DDD87E03C08DEF37B1 - 2875C017E471BA2B0E876B23C0533BD6EFEC296B6D6D798EFE75E24BC65D2D2D - E9C262F2C47B9C3132D932CB88B5797E14278F20C6A474315AA57ADC925BF28D - D221F979115D6E033EA19EA1B6430B860468A0BFF72C3DFE3CA55D1BEE33EED9 - 53731C97939565FFBD35366E9944D9906065919714C2DCD800628907D4D0A81D - AF27C0A07F5C8F9601035AFBB5540F04305250E8EABAF2576ABD77D35557F080 - 71BFA63ED266B36D494949DB6C0E8B4C97C972C5039C9E514BAB4C0002216ACB - 69529347BF7969D47DEDF3EEEEAEB73D1ECF87747EEC418F3F08C04D72A6582C - 96353131D695111111597ABDC14A65D500E55951F005027ED7D8D858D3C8C8B5 - B2C9C9C9725AEF03EEA84BFF1E80DB23433396A47B360130290BA2284E499244 - E51354C1E0FB1A77FD4B00FE23E37F0EE09F19A8E321D9E34DB9000000004945 - 4E44AE426082} - Transparent = True - end - object lblTitle5: TLabel - Left = 12 - Top = 8 - Width = 223 - Height = 14 - Caption = 'Installing Metamod:Source (version)' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Tahoma' - Font.Style = [fsBold] - ParentFont = False - end - object lblSubTitle5: TLabel - Left = 22 - Top = 28 - Width = 296 - Height = 13 - Caption = 'Please wait while Metamod:Source (version) is being installed.' - end - object bvlSpacer5: TBevel - Left = 0 - Top = 46 - Width = 527 - Height = 3 - Align = alBottom - Shape = bsBottomLine - end - end - object rtfDetails: TmxFlatRichEdit - Left = 8 - Top = 166 - Width = 509 - Height = 139 - ReadOnly = True - ScrollBars = ssVertical - TabOrder = 1 - Activate = True - BorderColor = clBtnShadow - Flat = True - ShowBorder = True - Version = '1.26' - end - end - end - object pnlButtons: TPanel - Left = 0 - Top = 317 - Width = 527 - Height = 38 - Align = alBottom - BevelOuter = bvNone - TabOrder = 1 - object cmdNext: TFlatButton - Left = 438 - Top = 7 - Width = 85 - Height = 25 - ColorFocused = 16245198 - ColorDown = 16245198 - ColorBorder = clBtnShadow - ColorHighLight = clBtnShadow - ColorShadow = clBtnShadow - Caption = '&Next >' - TabOrder = 0 - OnClick = cmdNextClick - end - object cmdCancel: TFlatButton - Left = 4 - Top = 7 - Width = 85 - Height = 25 - Color = clBtnFace - ColorFocused = 16245198 - ColorDown = 16245198 - ColorBorder = clBtnShadow - ColorHighLight = clBtnShadow - ColorShadow = clBtnShadow - Caption = '&Cancel' - ParentColor = False - TabOrder = 1 - OnClick = cmdCancelClick - end - object cmdBack: TFlatButton - Left = 348 - Top = 7 - Width = 85 - Height = 25 - ColorFocused = 16245198 - ColorDown = 16245198 - ColorBorder = clBtnShadow - ColorHighLight = clBtnShadow - ColorShadow = clBtnShadow - Caption = '< &Back' - TabOrder = 2 - Visible = False - OnClick = cmdBackClick - end - end - object ilImages: TImageList - Left = 154 - Top = 324 - Bitmap = { - 494C010102000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000001000000001002000000000000010 - 00000000000000000000000000000000000000000000008CBD00008CBD00008C - BD00008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008C - BD00008CBD00008CBD00000000000000000000000000008CBD00008CBD00008C - BD00008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008C - BD00008CBD000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000008CBD0063CEF700008CBD00A5F7 - FF0063CEF70063CEF70063CEF70063CEF70063CEF70063CEF70063CEF70063CE - F70039ADDE00ADF7FF00008CBD0000000000008CBD0021A5CE005ACEEF0084E7 - FF0063CEF70063CEF70063CEF70063CEF70063CEF70063CEF70063CEF70063CE - F70039ADDE001094C60000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000008CBD006BD6F700008CBD00ADF7 - FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6 - FF0039ADDE00BDEFF700008CBD0000000000008CBD004ABDE70031ADD60094EF - FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6FF006BD6 - FF0039B5DE00CEF7FF00008CBD00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000008CBD0073D6FF00008CBD00ADF7 - FF007BDEFF007BDEFF007BDEFF007BDEFF007BDEFF007BDEFF007BDEFF007BDE - FF0042B5DE00BDEFF700008CBD0000000000008CBD0073D6FF00008CBD00ADFF - FF007BDEFF007BDEFF007BDEFF007BDEFF007BDEFF007BDEFF007BDEFF007BDE - FF0042B5DE00CEF7FF00008CBD00000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000008CBD007BDEFF00008CBD00B5F7 - FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7 - FF0042B5DE00C6F7F700008CBD0000000000008CBD007BDEFF001094C60094EF - FF0094EFFF0084E7FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7FF0084E7 - FF004ABDE700CEF7FF001094C600000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000008CBD0084E7FF00008CBD00BDF7 - FF008CEFFF008CEFFF008CEFFF008CEFFF008CEFFF008CEFFF008CEFFF008CEF - FF004ABDE700BDF7FF00008CBD0000000000008CBD0084E7FF0042B5DE005AC6 - EF00ADFFFF008CEFFF008CEFFF008CEFFF008CEFFF008CEFFF008CEFFF008CEF - FF004ABDE700CEF7FF00CEF7FF00008CBD000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000008CBD008CEFFF00008CBD00D6F7 - FF00CEF7FF00CEF7FF00CEF7FF00CEF7FF00CEF7FF00CEF7FF00CEF7FF00CEF7 - FF00BDDEDE00D6F7FF00008CBD0000000000008CBD008CE7FF007BDEFF0021A5 - CE00E7FFFF00CEF7FF00CEF7FF00CEF7FF00CEF7FF00CEF7FF00CEF7FF00CEF7 - FF0094EFFF00E7FFFF00CEF7FF00008CBD000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000008CBD0094F7FF00008CBD00008C - BD00008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008C - BD00008CBD00008CBD00008CBD0000000000008CBD0094F7FF0094F7FF001094 - C600008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008CBD00008C - BD00008CBD00008CBD00008CBD00008CBD000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000008CBD009CF7FF009CF7FF009CF7 - FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7 - FF00008CBD00000000000000000000000000008CBD009CF7FF009CF7FF009CF7 - FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7FF009CF7 - FF00088CBD000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000008CBD00D6F7FF00A5F7FF00A5F7 - FF00A5F7FF00A5F7FF00A5F7FF00A5F7FF00A5F7FF00A5F7FF00A5F7FF00A5F7 - FF00008CBD00000000000000000000000000008CBD00E7FFFF00A5FFFF00A5FF - FF00A5FFFF00A5FFFF00A5FFFF00A5FFFF00A5FFFF00A5FFFF00A5FFFF00A5FF - FF00088CBD000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000008CBD00D6F7FF00A5F7 - FF00A5F7FF00A5F7FF00008CBD00008CBD00008CBD00008CBD00008CBD00008C - BD000000000000000000000000000000000000000000008CBD00E7FFFF00A5FF - FF00A5FFFF00A5FFFF00008CBD00008CBD00008CBD00008CBD00008CBD00008C - BD00000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008CBD00008C - BD00008CBD00008CBD0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000008CBD00008C - BD00008CBD00008CBD0000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000424D3E000000000000003E000000 - 2800000040000000100000000100010000000000800000000000000000000000 - 000000000000000000000000FFFFFF0080038007000000000001000300000000 - 0001000100000000000100010000000000010001000000000001000000000000 - 0001000000000000000100000000000000070007000000000007000700000000 - 800F800F00000000C3FFC3FF00000000FFFFFFFF00000000FFFFFFFF00000000 - FFFFFFFF00000000FFFFFFFF0000000000000000000000000000000000000000 - 000000000000} - end - object IdFTP: TIdFTP - Intercept = IdLogFile - MaxLineAction = maException - ReadTimeout = 0 - RecvBufferSize = 1024 - SendBufferSize = 1024 - OnWork = IdFTPWork - ProxySettings.ProxyType = fpcmNone - ProxySettings.Port = 0 - Left = 274 - Top = 324 - end - object IdAntiFreeze: TIdAntiFreeze - IdleTimeOut = 150 - Left = 244 - Top = 324 - end - object tmrSpeed: TTimer - Enabled = False - OnTimer = tmrSpeedTimer - Left = 214 - Top = 324 - end - object IdLogFile: TIdLogFile - LogTime = False - Left = 184 - Top = 324 - end -end diff --git a/metamod-source/cruft/installer/UnitfrmMain.pas b/metamod-source/cruft/installer/UnitfrmMain.pas deleted file mode 100644 index e335bc5a..00000000 --- a/metamod-source/cruft/installer/UnitfrmMain.pas +++ /dev/null @@ -1,804 +0,0 @@ -unit UnitfrmMain; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, TFlatRadioButtonUnit, StdCtrls, ComCtrls, mxFlatControls, JvPageList, - ExtCtrls, JvExControls, JvComponent, TFlatButtonUnit, jpeg, TFlatEditUnit, - TFlatGaugeUnit, ImgList, FileCtrl, Registry, CheckLst, TFlatComboBoxUnit, - TFlatCheckBoxUnit, IdBaseComponent, IdComponent, IdTCPConnection, - IdTCPClient, IdFTP, IdException, IdAntiFreezeBase, IdAntiFreeze, - IdIntercept, IdLogBase, IdLogFile, pngimage; - -type - TfrmMain = class(TForm) - jplWizard: TJvPageList; - jspWelcome: TJvStandardPage; - pnlButtons: TPanel; - bvlSpace: TBevel; - cmdNext: TFlatButton; - cmdCancel: TFlatButton; - imgInstall: TImage; - lblWelcome: TLabel; - lblInfo1: TLabel; - lblInfo2: TLabel; - lblInfo3: TLabel; - jspLicense: TJvStandardPage; - pnlLicense: TPanel; - imgIcon1: TImage; - lblTitle1: TLabel; - lblSubTitle1: TLabel; - freLicense: TmxFlatRichEdit; - frbAgree: TFlatRadioButton; - ftbDontAgree: TFlatRadioButton; - jspInstallMethod: TJvStandardPage; - pnlHeader2: TPanel; - imgIcon2: TImage; - lblTitle2: TLabel; - lblSubTitle2: TLabel; - lblInstallMethod: TLabel; - pnlInstallMethod: TPanel; - frbDedicatedServer: TFlatRadioButton; - frbListenServer: TFlatRadioButton; - frbSelectMod: TFlatRadioButton; - frbFTP: TFlatRadioButton; - cmdBack: TFlatButton; - jspFTP: TJvStandardPage; - pnlHeader3: TPanel; - imgIcon3: TImage; - lblTitle3: TLabel; - lblSubTitle3: TLabel; - lblStep1: TLabel; - pnlFTPData: TPanel; - lblHost: TLabel; - txtHost: TFlatEdit; - lblUserName: TLabel; - txtUserName: TFlatEdit; - txtPassword: TFlatEdit; - lblPassword: TLabel; - txtPort: TFlatEdit; - lblPort: TLabel; - lblStep2: TLabel; - cmdConnect: TFlatButton; - pnlDirectory: TPanel; - trvDirectories: TTreeView; - lblStep4: TLabel; - jspInstallProgress: TJvStandardPage; - pnlHeader5: TPanel; - imgIcon4: TImage; - lblTitle5: TLabel; - lblSubTitle5: TLabel; - ggeAll: TFlatGauge; - lblProgress: TLabel; - ggeItem: TFlatGauge; - rtfDetails: TmxFlatRichEdit; - lblDetails: TLabel; - bvlSpace2: TBevel; - ilImages: TImageList; - bvlSpacer1: TBevel; - bvlSpacer2: TBevel; - bvlSpacer3: TBevel; - bvlSpacer5: TBevel; - jspSelectMod: TJvStandardPage; - pnlSelectMod: TPanel; - imgIcon5: TImage; - lblSelectMod: TLabel; - lblSelectModInfo: TLabel; - bvlSelectMod: TBevel; - lblInfo: TLabel; - chkPassive: TFlatCheckBox; - lblStep3: TLabel; - pnlOS: TPanel; - optWindows: TFlatRadioButton; - optLinux: TFlatRadioButton; - IdFTP: TIdFTP; - cmdProxySettings: TFlatButton; - IdAntiFreeze: TIdAntiFreeze; - frbStandaloneServer: TFlatRadioButton; - tmrSpeed: TTimer; - IdLogFile: TIdLogFile; - shpMods: TShape; - trvMods: TTreeView; - FlatRadioButton1: TFlatRadioButton; - procedure jvwStepsCancelButtonClick(Sender: TObject); - procedure cmdCancelClick(Sender: TObject); - procedure cmdNextClick(Sender: TObject); - procedure CheckNext(Sender: TObject); - procedure cmdBackClick(Sender: TObject); - procedure cmdConnectClick(Sender: TObject); - procedure jplWizardChange(Sender: TObject); - procedure FormCreate(Sender: TObject); - procedure cmdProxySettingsClick(Sender: TObject); - procedure txtPortChange(Sender: TObject); - procedure trvDirectoriesExpanded(Sender: TObject; Node: TTreeNode); - procedure trvDirectoriesChange(Sender: TObject; Node: TTreeNode); - procedure IdFTPWork(Sender: TObject; AWorkMode: TWorkMode; - const AWorkCount: Integer); - procedure FormClose(Sender: TObject; var Action: TCloseAction); - procedure tmrSpeedTimer(Sender: TObject); - procedure trvDirectoriesExpanding(Sender: TObject; Node: TTreeNode; - var AllowExpansion: Boolean); - procedure trvDirectoriesCollapsing(Sender: TObject; Node: TTreeNode; - var AllowCollapse: Boolean); - procedure trvModsClick(Sender: TObject); - procedure trvDirectoriesMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); - private - OldProgress: Integer; - CurrProgress: Integer; - public - procedure ExceptionHandler(Sender: TObject; E: Exception); - end; - -var - frmMain: TfrmMain; - -var VERSION: String = ''; - -implementation - -uses UnitFunctions, UnitfrmProxy, UnitInstall, UnitSelectModPath; - -{$R *.dfm} - -procedure TfrmMain.jvwStepsCancelButtonClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmMain.cmdCancelClick(Sender: TObject); -begin - Close; -end; - -procedure TfrmMain.cmdNextClick(Sender: TObject); -var ePath: String; - eRegistry: TRegistry; - eStr: TStringList; - CurNode: TTreeNode; - eOS: TOS; - i: integer; - Source: Boolean; -begin - { FTP } - if jplWizard.ActivePage = jspFTP then begin - if not IdFTP.Connected then - IdFTP.Connect; - eStr := TStringList.Create; - ePath := '/'; - CurNode := trvDirectories.Selected; - if (Assigned(CurNode)) then begin - repeat - ePath := '/' + CurNode.Text + ePath; - CurNode := CurNode.Parent; - until (not Assigned(CurNode)); - end; - IdFTP.ChangeDir(ePath); - IdFTP.List(eStr, '', False); - eStr.CaseSensitive := False; - // check if gameinfo.txt is in the directory -> valid installation - if (eStr.IndexOf('gameinfo.txt') = -1) then begin - MessageBox(Handle, 'Invalid directory. Please select your mod directory and try again.', PChar(Application.Title), MB_ICONWARNING); - eStr.Free; - exit; - end - else - eStr.Free; - // check for orangebox directory - Source := True; - if (AnsiSameText(ExtractFileName(trvDirectories.Selected.Text), 'tf')) then begin - case MessageBox(Handle, 'It looks like your server is using the OrangeBox engine. Would you like to install the appropriate binaries for it?', PChar(Application.Title), MB_ICONQUESTION + MB_YESNOCANCEL) of - mrYes: Source := False; - mrNo: Source := True; - mrCancel: begin - eStr.Free; - exit; - end; - end; - end; - // design stuff - trvDirectories.Enabled := False; - cmdConnect.Enabled := False; - optWindows.Enabled := False; - optLinux.Enabled := False; - Screen.Cursor := crHourGlass; - - if optWindows.Checked then - eOS := osWindows - else - eOS := osLinux; - - jspInstallProgress.Show; - // installation - Screen.Cursor := crAppStart; - InstallFTP(eOS, Source); - end - else if jplWizard.ActivePage = jspInstallProgress then - Close - else if jplWizard.ActivePage = jspSelectMod then begin - { Dedicated Server } - if frbDedicatedServer.Checked then begin - Source := True; - ePath := trvMods.Selected.Text; - if ePath = 'Counter-Strike:Source' then - ePath := trvMods.Selected.Parent.Text + '\source dedicated server\cstrike' - else if ePath = 'Day of Defeat:Source' then - ePath := trvMods.Selected.Parent.Text + '\source dedicated server\dod' - else if ePath = 'Half-Life 2 Deathmatch' then - ePath := trvMods.Selected.Parent.Text + '\source dedicated server\hl2mp' - else begin - { get games } - if ePath = 'Team Fortress 2' then - ePath := trvMods.Selected.Parent.Text + '\source 2007 dedicated server\tf'; - { ask user, just in case } - case MessageBox(Handle, 'It looks like your server is using the OrangeBox engine. Would you like to install the appropriate binaries for it?', PChar(Application.Title), MB_ICONQUESTION + MB_YESNOCANCEL) of - mrYes: Source := False; - mrNo: Source := True; - mrCancel: exit; - end; - end; - SteamPath := IncludeTrailingPathDelimiter(SteamPath) + 'steamapps\'; - // install it - if DirectoryExists(SteamPath + ePath) then begin - jspInstallProgress.Show; - InstallDedicated(IncludeTrailingPathDelimiter(SteamPath + ePath), True, Source); - end - else begin - MessageBox(Handle, 'Error: The directory of the mod you selected doesn''t exist any more. Run Dedicated Server with the chosen mod and try again.', PChar(Application.Title), MB_ICONERROR); - jspSelectMod.Show; - exit; - end; - end; - { Standalone Server } - if frbStandaloneServer.Checked then begin - Source := True; - ePath := trvMods.Selected.Text; - if ePath = 'Counter-Strike:Source' then - ePath := 'cstrike' - else if ePath = 'Day of Defeat:Source' then - ePath := 'dod' - else if ePath = 'Half-Life 2 Deathmatch' then - ePath := 'hl2mp' - else begin - { get games } - if ePath = 'Team Fortress 2' then - ePath := 'orangebox\tf'; - { ask user, just in case } - case MessageBox(Handle, 'It looks like your server is using the OrangeBox engine. Would you like to install the appropriate binaries for it?', PChar(Application.Title), MB_ICONQUESTION + MB_YESNOCANCEL) of - mrYes: Source := False; - mrNo: Source := True; - mrCancel: exit; - end; - end; - // install it - if DirectoryExists(StandaloneServer + ePath) then begin - jspInstallProgress.Show; - InstallDedicated(IncludeTrailingPathDelimiter(StandaloneServer + ePath), False, Source) - end - else begin - MessageBox(Handle, 'Error: The directory of the mod you selected doesn''t exist (any more). Run Half-Life Dedicated Server with the chosen mod again and restart.', PChar(Application.Title), MB_ICONERROR); - jspSelectMod.Show; - exit; - end; - end; - { Listen Server } - if frbListenServer.Checked then begin - Source := True; - ePath := trvMods.Selected.Text; - if ePath = 'Counter-Strike:Source' then - ePath := SteamPath + 'SteamApps\' + trvMods.Selected.Parent.Text + '\counter-strike source\cstrike' - else if ePath = 'Half-Life 2 Deathmatch' then - ePath := SteamPath + 'SteamApps\' + trvMods.Selected.Parent.Text + '\half-life 2 deathmatch\hl2mp' - else if ePath = 'Day of Defeat:Source' then - ePath := SteamPath + 'SteamApps\' + trvMods.Selected.Parent.Text + '\day of defeat source\dod' - else begin - { get games } - if ePath = 'Team Fortress 2' then - ePath := SteamPath + 'SteamApps\' + trvMods.Selected.Parent.Text + '\team fortress 2\tf'; - { ask user, just in case } - case MessageBox(Handle, 'It looks like your server is using the OrangeBox engine. Would you like to install the appropriate binaries for it?', PChar(Application.Title), MB_ICONQUESTION + MB_YESNOCANCEL) of - mrYes: Source := False; - mrNo: Source := True; - mrCancel: exit; - end; - end; - - if Pos(SteamPath, ePath) = 0 then - MessageBox(Handle, 'An error occured. Please report this bug to the Metamod:Source team and post a new thread on the forums of www.amxmodx.org.', PChar(Application.Title), MB_ICONSTOP) - else begin - if not FileExists(ePath + '\gameinfo.txt') then begin - MessageBox(Handle, 'You have to play this game once before installing Metamod:Source. Do that and try again.', PChar(Application.Title), MB_ICONWARNING); - exit; - end; - - jspInstallProgress.Show; - InstallListen(IncludeTrailingPathDelimiter(ePath), Source); - end; - end; - { Custom mod below } - end - else if jplWizard.ActivePage <> jspInstallMethod then - jplWizard.NextPage - else begin - if frbDedicatedServer.Checked then begin // Dedicated Server - eRegistry := TRegistry.Create(KEY_READ); - try - eRegistry.RootKey := HKEY_CURRENT_USER; - if eRegistry.OpenKey('Software\Valve\Steam', False) then begin - ePath := eRegistry.ReadString('SteamPath'); - ePath := IncludeTrailingPathDelimiter(StringReplace(ePath, '/', '\', [rfReplaceAll])); - SteamPath := ePath; - - ePath := ePath + 'SteamApps\'; - if DirectoryExists(ePath) then begin - trvMods.Items.Clear; - // Check Mods - eStr := GetAllFiles(ePath + '*.*', faDirectory, False, True, False); - for i := 0 to eStr.Count -1 do begin - CurNode := trvMods.Items.Add(nil, eStr[i]); - - if DirectoryExists(ePath + eStr[i] + '\source dedicated server\cstrike') then - trvMods.Items.AddChild(CurNode, 'Counter-Strike:Source'); - if DirectoryExists(ePath + eStr[i] + '\source dedicated server\dod') then - trvMods.Items.AddChild(CurNode, 'Day of Defeat:Source'); - if DirectoryExists(ePath + eStr[i] + '\source dedicated server\hl2mp') then - trvMods.Items.AddChild(CurNode, 'Half-Life 2 Deatmatch'); - if DirectoryExists(ePath + eStr[i] + '\source 2007 dedicated server\tf') then - trvMods.Items.AddChild(CurNode, 'Team Fortress 2'); - - if CurNode.Count = 0 then - CurNode.Free - else - CurNode.Expand(False); - end; - // Misc - jspSelectMod.Show; - trvMods.Selected := nil; - cmdNext.Enabled := False; - end - else - MessageBox(Handle, 'You have to run Dedicated Server once before installing Metamod:Source!', 'Error', MB_ICONWARNING); - end - else - MessageBox(Handle, 'You haven''t installed Steam yet! Download it at www.steampowered.com, install Dedicated Server and try again.', 'Error', MB_ICONWARNING); - finally - eRegistry.Free; - end; - end - else if frbListenServer.Checked then begin // Listen Server - eRegistry := TRegistry.Create(KEY_READ); - try - eRegistry.RootKey := HKEY_CURRENT_USER; - if eRegistry.OpenKey('Software\Valve\Steam', False) then begin - ePath := eRegistry.ReadString('SteamPath'); - ePath := IncludeTrailingPathDelimiter(StringReplace(ePath, '/', '\', [rfReplaceAll])); - SteamPath := ePath; - - ePath := ePath + 'SteamApps\'; - if DirectoryExists(ePath) then begin - trvMods.Items.Clear; - // Check Mods - eStr := GetAllFiles(ePath + '*.*', faDirectory, False, True, False); - for i := 0 to eStr.Count -1 do begin - CurNode := trvMods.Items.Add(nil, eStr[i]); - - if DirectoryExists(ePath + eStr[i] + '\counter-strike source') then - trvMods.Items.AddChild(CurNode, 'Counter-Strike:Source'); - if DirectoryExists(ePath + eStr[i] + '\day of defeat source') then - trvMods.Items.AddChild(CurNode, 'Day of Defeat:Source'); - if DirectoryExists(ePath + eStr[i] + '\half-life 2 deathmatch') then - trvMods.Items.AddChild(CurNode, 'Half-Life 2 Deatmatch'); - if DirectoryExists(ePath + eStr[i] + '\team fortress 2') then - trvMods.Items.AddChild(CurNode, 'Team Fortress 2'); - - if CurNode.Count = 0 then - CurNode.Free - else - CurNode.Expand(False); - end; - // Misc - jspSelectMod.Show; - trvMods.Selected := nil; - cmdNext.Enabled := False; - end - else - MessageBox(Handle, 'You haven''t installed Steam yet! Download it at www.steampowered.com, install Dedicated Server and try again.', 'Error', MB_ICONWARNING); - end - else - MessageBox(Handle, 'You haven''t installed Steam yet! Download it at www.steampowered.com, install Dedicated Server and try again.', 'Error', MB_ICONWARNING); - finally - eRegistry.Free; - end; - end - else if frbStandaloneServer.Checked then begin // Standalone Server - eRegistry := TRegistry.Create; - try - eRegistry.RootKey := HKEY_CURRENT_USER; - if eRegistry.OpenKey('Software\Valve\HLServer', False) then begin - StandaloneServer := IncludeTrailingPathDelimiter(eRegistry.ReadString('InstallPath')); - if DirectoryExists(StandaloneServer + 'cstrike') then - trvMods.Items.Add(nil, 'Counter-Strike:Source'); - if DirectoryExists(StandaloneServer + 'dod') then - trvMods.Items.Add(nil, 'Day of Defeat:Source'); - if DirectoryExists(StandaloneServer + 'hl2mp') then - trvMods.Items.Add(nil, 'Half-Life 2 Deatmatch'); - if DirectoryExists(StandaloneServer + 'orangebox\tf') then - trvMods.Items.Add(nil, 'Team Fortress 2'); - jspSelectMod.Show; - cmdNext.Enabled := False; - end - else - MessageBox(Handle, 'You haven''t installed Half-Life Dedicated Server yet!', 'Error', MB_ICONWARNING); - finally - eRegistry.Free; - end; - end - else if frbSelectMod.Checked then begin - { Custom mod } - if frmSelectModPath.ShowModal = mrOk then begin - ePath := frmSelectModPath.trvDirectory.SelectedFolder.PathName; - { check if this is an orangebox game } - Source := True; - if (AnsiSameText(ExtractFileName(ePath), 'tf')) then begin - case MessageBox(Handle, 'It looks like your server is using the OrangeBox engine. Would you like to install the appropriate binaries for it?', PChar(Application.Title), MB_ICONQUESTION + MB_YESNOCANCEL) of - mrYes: Source := False; - mrNo: Source := True; - mrCancel: exit; - end; - end; - { install now } - jspInstallProgress.Show; - InstallCustom(IncludeTrailingPathDelimiter(ePath), osWindows, Source); - end; - end - else if frbFTP.Checked then // FTP - jspFTP.Show; - end; -end; - -procedure TfrmMain.CheckNext(Sender: TObject); -begin - cmdNext.Enabled := frbAgree.Checked; -end; - -procedure TfrmMain.cmdBackClick(Sender: TObject); -begin - if jplWizard.ActivePage = jspFTP then - jspInstallMethod.Show - else begin - jplWizard.PrevPage; - cmdBack.Visible := jplWizard.ActivePageIndex <> 0; - end; -end; - -procedure TfrmMain.cmdConnectClick(Sender: TObject); -var i: integer; - eStr: TStringList; - CurNode: TTreeNode; - Path: String; -begin - if (Trim(txtHost.Text) = '') or (Trim(txtUsername.Text) = '') then - MessageBox(Handle, 'Please fill in each field!', PChar(Application.Title), MB_ICONWARNING) - else if cmdConnect.Caption = 'Connect' then begin - // ... design stuff ... - Screen.Cursor := crHourGlass; - cmdConnect.Enabled := False; - cmdProxySettings.Enabled := False; - txtHost.Enabled := False; - txtPort.Enabled := False; - txtUsername.Enabled := False; - txtPassword.Enabled := False; - chkPassive.Enabled := False; - cmdConnect.Caption := 'Connecting...'; - // ... set values ... - IdFTP.Host := txtHost.Text; - IdFTP.Port := StrToInt(txtPort.Text); - IdFTP.Username := txtUsername.Text; - IdFTP.Passive := chkPassive.Checked; - IdFTP.Password := txtPassword.Text; - // ... connect and check values etc ... - try - IdFTP.Connect(True, 15000); - // ... get initial directory ... - Path := IdFTP.RetrieveCurrentDir; - // ... "fix" path ... - eStr := TStringList.Create; - eStr.Text := StringReplace(Path, '/', #13, [rfReplaceAll]); - for i := eStr.Count -1 downto 0 do begin - if eStr[i] = '' then - eStr.Delete(i); - end; - if (Copy(Path, Length(Path) -1, 1) <> '/') then - Path := Path + '/'; - // ... connect successful, change captions ... - trvDirectories.Enabled := True; - cmdConnect.Enabled := True; - cmdConnect.Caption := 'Disconnect'; - // ... change to / and create all the directories ... - CurNode := nil; - if (Path <> '/') then begin - try - IdFTP.ChangeDir('/'); - with GetAllDirs do begin - for i := 0 to Count -1 do begin - if (Assigned(CurNode)) then - trvDirectories.Items.AddChild(trvDirectories.Items.Add(nil, Strings[i]), 'Scanning...') - else begin - CurNode := trvDirectories.Items.Add(nil, Strings[i]); - trvDirectories.Items.AddChild(CurNode, 'Scanning...'); - if (Pos('/' + CurNode.Text + '/', Path) = 0) then - CurNode := nil; - end - end; - Free; - end; - IdFTP.ChangeDir(Path); - except - if (IdFTP.Connected) then - IdFTP.ChangeDir(Path) - else - IdFTP.Connect; - end; - end; - // ... find directories in start path ... - if eStr.Count <> 0 then begin - for i := 0 to eStr.Count -1 do begin - if (not ((i = 0) and (Assigned(CurNode)))) then - CurNode := trvDirectories.Items.AddChild(CurNode, eStr[i]); - end; - end; - trvDirectories.Selected := CurNode; - eStr.Free; - // ... scan for directories ... - with GetAllDirs do begin - for i := 0 to Count -1 do - trvDirectories.Items.AddChild(trvDirectories.Items.AddChild(CurNode, Strings[i]), 'Scanning...'); - Free; - end; - - if Assigned(CurNode) then - CurNode.Expand(False); - except - on E: Exception do begin - // reset button properties - cmdConnect.Enabled := True; - txtHost.Enabled := True; - txtPort.Enabled := True; - txtUsername.Enabled := True; - txtPassword.Enabled := True; - chkPassive.Enabled := True; - cmdProxySettings.Enabled := True; - cmdNext.Enabled := False; - cmdConnect.Caption := 'Connect'; - // analyze messages - if Pos('Login incorrect.', E.Message) <> 0 then begin // login failed - MessageBox(Handle, 'Login incorrect. Check your FTP settings and try again.', PChar(Application.Title), MB_ICONWARNING); - txtUsername.SetFocus; - txtUsername.SelectAll; - end - else if Pos('Host not found.', E.Message) <> 0 then begin // host not found - MessageBox(Handle, 'The entered host couldn''t be found. Check your settings and try again.', PChar(Application.Title), MB_ICONWARNING); - txtHost.SetFocus; - txtHost.SelectAll; - end - else if Pos('Connection refused.', E.Message) <> 0 then begin // wrong port (?) - MessageBox(Handle, 'The host refused the connection. Check your port and try again.', PChar(Application.Title), MB_ICONWARNING); - txtPort.SetFocus; - txtPort.SelectAll; - end - else if E is EIdProtocolReplyError then begin // wrong port - MessageBox(Handle, 'The port you entered is definitely wrong. Check it and try again.', PChar(Application.Title), MB_ICONWARNING); - txtPort.SetFocus; - txtPort.SelectAll; - end - else - MessageBox(Handle, PChar(E.Message), PChar(Application.Title), MB_ICONWARNING); // unknown error - // ... connect failed, leave procedure ... - Screen.Cursor := crDefault; - exit; - end; - end; - - Screen.Cursor := crDefault; - end - else begin - Screen.Cursor := crHourGlass; - IdFTP.Quit; - trvDirectories.Items.Clear; - trvDirectories.Enabled := False; - cmdConnect.Enabled := True; - cmdProxySettings.Enabled := True; - txtHost.Enabled := True; - txtPort.Enabled := True; - txtUsername.Enabled := True; - txtPassword.Enabled := True; - chkPassive.Enabled := True; - cmdConnect.Caption := 'Connect'; - cmdNext.Enabled := False; - Screen.Cursor := crDefault; - end; -end; - -procedure TfrmMain.jplWizardChange(Sender: TObject); -begin - if (jplWizard.ActivePage = jspInstallProgress) then begin - cmdNext.Caption := '&Finish'; - cmdNext.Enabled := False; - cmdBack.Visible := False; - end - else begin - cmdNext.Caption := '&Next >'; - cmdNext.Enabled := True; - cmdBack.Visible := jplWizard.ActivePageIndex <> 0; - end; - - if (jplWizard.ActivePage = jspLicense) then - cmdNext.Enabled := frbAgree.Checked; - - if (jplWizard.ActivePage = jspFTP) then - cmdNext.Enabled := False; -end; - -procedure TfrmMain.FormCreate(Sender: TObject); -begin - if LowerCase(ParamStr(1)) = '-logftp' then begin - MessageBox(Handle, 'FTP installation will be logged to FTP.log!', PChar(Application.Title), MB_ICONINFORMATION); - IdLogFile.Filename := ExtractFilePath(ParamStr(0)) + 'FTP.log'; - IdLogFile.Active := True; - end; - - rtfDetails.Clear; -end; - -procedure TfrmMain.cmdProxySettingsClick(Sender: TObject); -begin - frmProxy.ShowModal; - // Apply Proxy Settings - case frmProxy.cboProxy.ItemIndex of - 0: IdFTP.ProxySettings.ProxyType := fpcmNone; // none - 1: IdFTP.ProxySettings.ProxyType := fpcmHttpProxyWithFtp; // HTTP Proxy with FTP - 2: IdFTP.ProxySettings.ProxyType := fpcmOpen; // Open - 3: IdFTP.ProxySettings.ProxyType := fpcmSite; // Site - 4: IdFTP.ProxySettings.ProxyType := fpcmTransparent; // Transparent - 5: IdFTP.ProxySettings.ProxyType := fpcmUserPass; // User (Password) - 6: IdFTP.ProxySettings.ProxyType := fpcmUserSite; // User (Site) - end; - - IdFTP.ProxySettings.Host := frmProxy.txtHost.Text; - IdFTP.ProxySettings.UserName := frmProxy.txtPort.Text; - IdFTP.ProxySettings.Password := frmProxy.txtPassword.Text; - IdFTP.ProxySettings.Port := StrToInt(frmProxy.txtPort.Text); -end; - -procedure TfrmMain.txtPortChange(Sender: TObject); -var i: integer; -begin - if txtPort.Text = '' then - txtPort.Text := '21' - else begin - // check if value is numeric... - for i := Length(txtPort.Text) downto 1 do begin - if Pos(txtPort.Text[i], '0123456789') = 0 then begin - txtPort.Text := '21'; - txtPort.SelStart := 4; - exit; - end; - end; - end; -end; - -procedure TfrmMain.trvDirectoriesExpanded(Sender: TObject; - Node: TTreeNode); -var ePath: String; - CurNode: TTreeNode; - i: integer; -begin - if Node.Item[0].Text = 'Scanning...' then begin // no directories added yet - Screen.Cursor := crHourGlass; - // get complete path - ePath := '/'; - CurNode := Node; - repeat - ePath := '/' + CurNode.Text + ePath; - CurNode := CurNode.Parent; - until (not Assigned(CurNode)); - // change dir and add directories in it - try - Repaint; - IdFTP.ChangeDir(ePath); - with GetAllDirs do begin - Node.Item[0].Free; - for i := 0 to Count -1 do begin - trvDirectories.Items.AddChild(trvDirectories.Items.AddChild(Node, Strings[i]), 'Scanning...'); - end; - Free; - end; - finally - Application.ProcessMessages; - end; - Screen.Cursor := crDefault; - end; -end; - -procedure TfrmMain.trvDirectoriesChange(Sender: TObject; Node: TTreeNode); -begin - cmdNext.Enabled := Assigned(trvDirectories.Selected); -end; - -procedure TfrmMain.IdFTPWork(Sender: TObject; AWorkMode: TWorkMode; - const AWorkCount: Integer); -begin - if AWorkCount > 15 then begin - ggeItem.Progress := AWorkCount; - CurrProgress := AWorkCount; - end; - - if Cancel then - IdFTP.Abort; - - Application.ProcessMessages; -end; - -procedure TfrmMain.FormClose(Sender: TObject; var Action: TCloseAction); -begin - if (jplWizard.ActivePage = jspFTP) and (IdFTP.Connected) then - IdFTP.Quit; - if (jplWizard.ActivePage = jspInstallProgress) and (ggeAll.Progress <> ggeAll.MaxValue) and (not Cancel) then begin - if MessageBox(Handle, 'Do you really want to cancel the installation?', PChar(Application.Title), MB_ICONQUESTION + MB_YESNO) = mrYes then begin - Screen.Cursor := crDefault; - Application.OnException := ExceptionHandler; - Cancel := True; - if IdFTP.Connected then - IdFTP.Quit; - end - else - Action := caNone; - end; -end; - -procedure TfrmMain.ExceptionHandler(Sender: TObject; E: Exception); -begin - // IF any exceptions were raised after close, nobody would want them so leave this empty -end; - -procedure TfrmMain.tmrSpeedTimer(Sender: TObject); -begin - Caption := CalcSpeed(OldProgress, CurrProgress); - OldProgress := CurrProgress; -end; - -procedure TfrmMain.trvDirectoriesExpanding(Sender: TObject; - Node: TTreeNode; var AllowExpansion: Boolean); -begin - Node.ImageIndex := 1; - Node.SelectedIndex := 1; -end; - -procedure TfrmMain.trvDirectoriesCollapsing(Sender: TObject; - Node: TTreeNode; var AllowCollapse: Boolean); -begin - Node.ImageIndex := 0; - Node.SelectedIndex := 0; -end; - -procedure TfrmMain.trvModsClick(Sender: TObject); -begin - if Assigned(trvMods.Selected) then - cmdNext.Enabled := Assigned(trvMods.Selected.Parent) - else - cmdNext.Enabled := False; -end; - -procedure TfrmMain.trvDirectoriesMouseDown(Sender: TObject; - Button: TMouseButton; Shift: TShiftState; X, Y: Integer); -var Node: TTreeNode; -begin - Node := trvDirectories.GetNodeAt(X, Y); - if (Assigned(Node)) then begin - if (Node.DisplayRect(True).Right < X) then - trvDirectories.Selected := nil; - end; -end; - -end. diff --git a/metamod-source/cruft/installer/UnitfrmProxy.dfm b/metamod-source/cruft/installer/UnitfrmProxy.dfm deleted file mode 100644 index 7ba9c06c5cae79c3827a3d1d98e81d212d147e8a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1584 zcmb7EO>fgc5Z&00KjI`*DjSGp8wQ9=#K`$X!!aK*xPz!0uToNo)ez2 zS-|M>!Y+RpeRRh4&lNqSbN#F4wkeAd8}kc{EPIl5Qi$o)^5C4Ol$cG~{B(>sPsuc^ zdpJde_fR@bxc&vWDn3nPp6EY7)uWg)%ZYHC6CXyX?o+~dy#%rhaqCW}>mQ!8@$ zSt`g|TXQ;qDe)!JzfDT73QEtfLpf#rKi~qGWs6)k3T`f$m2l5)fGg`a;oQ*2khjk{ zr^JqCv4?3^@Ovqx`5qJmPfEo5btx~OM&}udjc-4H14sVTp$j5ISB6T_mMc{_PGByo zrcCs5)%JyQFXdE|s=Jg}y>L~Ma|bkrc!aWZ%(aRg!im(IRt3P3%XH(ETRa!kmB)Xf z7STU|a+7VvTU@}ha^WW_M=J%akt+Z+B(g_m6WXRrJDSi9X=?KFcMJIMEBJd=W#?v; zbr_wC^Yqh<7w)u6r`3))nw4^Hh#=b?b0&OVF^ywNkh$Fp!=NQcwiYQ*T7DRq#&C{^ zX^eByrW-OyvN>eAzf4!?ruA4n_f8pzsvWT22^hk23f>Vjk4TJ`8nA~X|4fi6vYO?R zD!zK%wI@C*PZa0X4sUf`X8@OdM5a8^s%utS!D@eRe{apCkw2ywcb$lvXG)W7n(D03 lY;-Fw>-qZTmIA!Ai~=X}q5luOUP6ekuUUDr9%cXl{sJ)8?-l?6 diff --git a/metamod-source/cruft/installer/UnitfrmProxy.pas b/metamod-source/cruft/installer/UnitfrmProxy.pas deleted file mode 100644 index 1556226d..00000000 --- a/metamod-source/cruft/installer/UnitfrmProxy.pas +++ /dev/null @@ -1,72 +0,0 @@ -unit UnitfrmProxy; - -interface - -uses - SysUtils, Windows, Messages, Classes, Graphics, Controls, - StdCtrls, ExtCtrls, Forms, TFlatButtonUnit, TFlatComboBoxUnit, - TFlatEditUnit; - -type - TfrmProxy = class(TForm) - cmdClose: TFlatButton; - lblProxy: TLabel; - txtHost: TFlatEdit; - cboProxy: TFlatComboBox; - lblHost: TLabel; - txtPort: TFlatEdit; - lblPort: TLabel; - lblUsername: TLabel; - txtUsername: TFlatEdit; - txtPassword: TFlatEdit; - lblPassword: TLabel; - procedure cboProxyChange(Sender: TObject); - procedure txtPortChange(Sender: TObject); - public - procedure EnableControls(Enable: Boolean); - end; - -var - frmProxy: TfrmProxy; - -implementation - -{$R *.DFM} - -{ TfrmProxy } - -procedure TfrmProxy.EnableControls(Enable: Boolean); -begin - lblHost.Enabled := Enable; - lblPassword.Enabled := Enable; - lblPort.Enabled := Enable; - lblUsername.Enabled := Enable; - txtHost.Enabled := Enable; - txtPassword.Enabled := Enable; - txtPort.Enabled := Enable; - txtUsername.Enabled := Enable; -end; - -procedure TfrmProxy.cboProxyChange(Sender: TObject); -begin - EnableControls(cboProxy.ItemIndex <> 0); // 0 = None -end; - -procedure TfrmProxy.txtPortChange(Sender: TObject); -var i: integer; -begin - if txtPort.Text = '' then - txtPort.Text := '8080' - else begin - // check if value is numeric... - for i := Length(txtPort.Text) downto 1 do begin - if Pos(txtPort.Text[i], '0123456789') = 0 then begin - txtPort.Text := '8080'; - txtPort.SelStart := 4; - exit; - end; - end; - end; -end; - -end. diff --git a/metamod-source/cruft/installer/del.bat b/metamod-source/cruft/installer/del.bat deleted file mode 100644 index 74a143bd..00000000 --- a/metamod-source/cruft/installer/del.bat +++ /dev/null @@ -1,15 +0,0 @@ -del .\*.~pas -del .\*.dcu -del .\*.~ddp -del .\*.ddp -del .\*.~dpr -del .\*.~dfm -del .\*.~dpr -del .\*.map -del .\*.drc -del .\*.~xfm -del .\*.log -del .\*.dof -upx MMS_Installer.exe -upx Attach.exe -upx hl2launch.exe \ No newline at end of file diff --git a/metamod-source/cruft/installer/files/Readme.txt b/metamod-source/cruft/installer/files/Readme.txt deleted file mode 100644 index 80742214..00000000 --- a/metamod-source/cruft/installer/files/Readme.txt +++ /dev/null @@ -1,8 +0,0 @@ -This folder will be used by the attach binary. Make sure you have both the Source and OrangeBox binary in it. -Here are some instructions on how to prepare an upcoming release: - -1) Copy the latest MM:S dlls (Source+OrangeBox) and "hl2launch.exe" into this directory -2) Attach .source and .orangebox to the particular binaries. -3) Run Attach.exe -4) Test MMS_Installer.exe once (should work but nobody wants a buggy installer) -5) If everything worked fine, release it, otherwise pm me (Basic-Master) \ No newline at end of file diff --git a/metamod-source/cruft/installer/install.bmp b/metamod-source/cruft/installer/install.bmp deleted file mode 100644 index 39b905be4507286639395912964881258552398f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 154542 zcmd4a=aw8tk}r4 z=Y5KOu>F~NRWhk&$lk#;d4h2gQJE3$_BUdf z=2QLe|J_zf{J-_zSEc!)wD(K@QR%L=(=+32f7}1Ql;8F3KljbAOWD!22TM6$%Dbi9 z>&M%rxm(J^Qa+2LxnG*w@!S5D(p;L(eDh$_?kHtvY4-NRQ+{5$CrXJAZU1B`8%?*f zi|ao8L$2>?+NVp|UdryST`y%<+wAH)S9Y{b9nbc@{gVNA&HB(iR?6dD``c1{c)D*N z&#xWqnggYr>e?fvyw$eXyZ%$8Xa@xOGAM~YX!7;pisN1>E`Czlx0~jbVK_A%pY0mY zUGK`%ZH(t&TV5>XbSYO#xjsyN^HyoysvdE}rZ^rpLHRF|{%(7tY2Io2%YFY+X^z<`a|svNWHS7GCd{{z^AJHO`*t0_)#)%^$}8SEW2NotWAy zP5V|U_lL=MvA$9I51RgBDX*@qK2ypIlZht+8dXifbij&w&;R0|oS$9$MFqN^|EsUJ zF(mk!{!737h4TyB)+*33&bEmW{?jl1SjvH4tobX%q5MSGAc*UK_N#3xd!0);)3wJF z>rcLk^}{W!Z&=KMGuosG}*O)!63d;rtYNe^puezlYvl^7Z7hR1gdfTBd*gkWh3DRI$6#!gjivFBc#M!+1Ypg>GSrcJe7wJ zez*q@V2@IcVeGy~ z;fbL<(H5Ko;^SR&uJ5k&!`od4zE49BbPw{LmhYi^F?$6fouIKGDK za!3bCgYvW}{@GCmSnjUlZSKp)oK${seq+BoM?a~?Q@wRpI=Vmhm z+&`N;gBz>hwD>%o1A5f+9oz?>7zS%U!IiJON#`GWBrd~%bvoOK~eZSkt zY423ptn;b1Tn#-QUtEUqAjnt%`07Zq3zH0!0c6x0A%Rh^U@xrB zLHxqlhr;Q5)F!Gp^YAb=>{HX#bM5$MX+CBYO8op%X~I*2Udge_O8Ty*V9cR%Yc4<9&~tdIz=>OA&Do_Wg^S3wdKvOeXsBNV^sH+ zNe!SE2c<{Ne$Y18x^l5?xp0TO_E6Wl)scP#&B^%;G{?5BIv*XIH~Z##8z|rEy1Q-1 zMAFz5Xv|5X z&Hd19&KMmUM!N1oTdp)Tc6qZ6QT?cGK5eRs3)Q`VI6w3u<9&C1Xd!s14=ema8`>2y z50=LH^e}bLt83eiQ>|;Oue9Y85O=NPe%n55+XrDESj{vMsv*)!>abgMH#%I+M-?hL!w=mo5lIoYpr z{SUa_wgKy80QByanbGc=Pydi|4PtVQ2}v}dk7oSHDP>0AOF8|x33ExgEm`NPw*zq( zxwuU2^{#n$;JKBPU3so8ZUqzq$iN+GM{4}d=^7wzt^VR&R2>Eo!}qhLqblv2;o23} z8IRE?m%HG)(`|!QULL0Id0-mma_=;vp8Z`%($5V2DX#MBHlW;F0W`r3E~+k;GhdW* zvN4VTdTKiToq_diN<$BvDebi~e%uV=g}do>!y4!$nwl~xn(B4FN;-S{n}Uq%li^p+ z(+L9Z9LJ4Tj1%Oou##xQeMsN6Yr%bR7~pbvoM3g~ z=h?O+Q=hbD3+2$RpG8KZ`Ac}+;d?XF6>D)Th55F)DL^SNHDzy8)|-O7?)*YOeYrGO zy7?89oUGk0Psk(uCX{B+l$>dxNX_;_I@t1LTvqKp4o*PklQlTENw zy+2pb_yu~7jr8{G_4OtIeWEmf5=eH1TtD6i=pty>*_z#E(Zoa!Wmt5s>n}Fl8^eg; z*Q?n|)%tm9B}~35U1HroEIo+DG6K(!${_YUhwOO=4ouanh)IE;9A=k?*&Ai}q?_I< z-IvYq7jR@&1jI{+FsEg^IevV2PA^%0sVzhag&jutY-xdepy`bHVAq987XyytJL4d} z<3isK7Q%;xx?poZZ6aK9#>R-V-nRJUi7r)K6Pll05GIHkm<(8BHmWAILHHyejpM7O zIn#FO?W1bI7Yv-)Fn0qk=$%~$?gD66K=0yz%5^})jt;3K-_cMbP{a9rm1buUhYsN2Po?#Bse3ZH8|5 zHgO@{{rxiB?dKmi*PsXgdvYnyy53J*8~N9M1O9} zk-NQ>d*NR>{IgzkMvy&S59nQ!3Hv1gK`scM71}dB6>D?c1e(v#+#M#@N_l-gH>2l< zh)8gVS<%;zuU0{uR)gQZEhTHx8 zT4~-HS5G2)H${yDrK4DO7Vgt2;j->~dA@;dKTv4w7 zbe7{nkY{G$mkL0T>);q_A<{Tq6M3Q31K6*^eYY`^^6|>raZjAD(g|!atMODbAbX9Y z`Sb3BZK`So{UeI6-M{9mcg(}l+BeU*zMp`5R|%!PZ;~UKuK@b#F_`&JU5j)(=2P=M zIG=6Mw|&PB3LCjV;@sfBCDKYay4mZ(ka6`8pojUMw8&Hn z!?CxK?Ho>*;g!vE4R;L@3`*vlZOf%}*tl(6CJ~w6g0c#7mF4fndIy4x=_hBPB)wqz`23%HF1lHDAjTbU`vfhiV8-oF{0Ls9S-RJeLp|l@e9L;2S*7j+DxEbi> zbF0ay&)v7O2G-s42(O+>KU}d9seFB9 z`l`&;(0$aC*6vP*x)B7W83o6KK)gY*a8%TQ+Wu2f1ZlcbI_v(}0^%aISLwNaJY!0N=oK!A((b%)>5I?1=yL zBrLM)Mj{&ZO$7oz*r`5(mn*B2lL)vrziLL)5zt6?JF|i{;7w;KM4KkRW9~Ic*py36 z!#8G0pX$ay7l}2!E*wNs(UoFw*{!Av}{l@Uu-JZssm6!}@Q`A}{eo-=W^=4(ZDKGM`<@ z2v+$_F|iG~Ms{LOeCoklQ}@4&_d>WZA>XOt&HhQ~Dp}DYT{$rihE&gbUx3z*y!5z9 zD(4EK+orh*@1nBPzk{_Kf*XIthrmo`etJNmK0y#8s4F{?DktB zxu7QUV`kbTJ4e)676s7we7!uv_*xLXgFZ>P*>0+vL<3r)0L329ppOBCi%B_-aWgm} zL-$@&J{da*-soF_Cvgr7mHb@K{weKW<6Oarod0Dpa(Xh9KZRzFPiCC1x{b|v0wLov z#$EZSFQ4}1P8Z7m^J)mV$|Y8z*F%OeCZ2*1G zpNTx!!n+3amg|Lp_!;!RKq@IoTp^vJgdw%^a&illsaaEd0y~9Q(3raip~KD+1)w)O zNw#vkYKFvG)J)SNrjC?1C(}z^_sTdulPbcfq(qR*Z)qMAaets^)~>%eM4>YV9O`9L zMI;=XC3Nh-KWOaY?&+kaOX!9UnBm`CcJ&m^%M@6 z&(CxnvJ(w-GgK0ExinZbT+N|JH*;}-xE_^0HzW-dmHP0hWTND>vB!~M{%$8XEM3iK zW>FrJMc2efq66r8Ft)&xRKD0pg*s}KUBj8b*Yy;ybOal%eng^A@)lNBh^;D>@4wJb zd^QDR_D_D}key1<5jN#25$-cycYpbTeF`ZSpHgN%$`_%XvDG=n5 z#@C*;y%{l;_}%A2^JoB&a3Ic?o9^|dlY&Nb*$;7O&ON|gK9H39B6_kYZ?-+&IGK>~ zM)s!lR0lM#J(*X0W+mD%B$K(FY;??b9-8EZmFVZ;?fVJqMjK!=R{qs)a6s^EJ05L% zzR=;7HH_gLaQ9&vsC~}Qxzg$?G!-F-~_;8uK% z0jgX-y7)SMZ_T|C*FQg7B{gTJt3>iOL93iqt4K$XH`7Y&rsMm8PCBDDpm8$DOb{sR z8BOd;AAqJpD}6iW$eRjZC6mD5j_cXfgfVuCixHt|UufFHrPbJ@l*u#$`ni4#4KNS6 zJ~9olI$l}@rfcj=*=%a6jS%-D8y^OA0p$X_dS!90(^>rW-~aGr6Q1Or$;9Aa8lq9{ zN;ke6#=0leDtCWLxn5v>u5YmJb7N%NcF&?tEzc~GBEELznLb(vYka*igd6in<7@Ku zrxFbkdTBU0`sK*f>w}U+r^1L`t8bZt@O8YL1c?xXM6-#?ksQ%i(<3@WR1;`-)?mpt zrI`qa)0KnizUrUH3A;1C05>+H!O$UGwWj=0dwJK=mK&wno4qJpAjiH4Qp$lY(j%G; zxD%?J7c#_7g;Ui|RlhN|dKiCBq2m5E`mkO`xvJ~M`G*jvd=#1iy}OO_*|E~SQbdBI z)d4BgkrrmxHnHv+?H14W5gP31is=h&9&a1Dl=ZS%FRnbl6kk)b5x=`q&z=<`!!7*2 z>%u5hT6~}6dP?MAgSNq7i0=-9J4Ey4_$HN-5d<-Ltsm9gwKv}kDs4u%UqtNFe9^R@ zY3q`U2&LVFSX(rQ@MiF?bMf-xK$?;rRKE1Kb$Qyo{=v z!r!;$S8Aqh^V?|EZp?9K)S4}((7qd0?C|F|&3gNamg8|MQS%_Y#I(ybV#*#TeCUAq z0&8m4u|OHt71IU8ix2hscmHa@D6h4E42rLf!!aIU&l8q18lNEl4$Y$yidmCO^gKd$Ne)xU(a|M&E-a(PG^9ZU&UgF&4k7Sr6n2utUbNkPhTg?!{kK% z90YE~O%kb@(Rvr-7cla-&0vtVX+gt3Hmw^kAC^#tS+W-)Vl|4Zmu-KlHs{ ziE+%OCT7{?QyCG^*bV~6jpKJL1_ zLCi=p!8qG!rrOts9p96_%9Ex4W9c5xS~-{1b#XT?0`%zsy713McDLK;`p|lWCl})R z9|HIHeSvbw*e%X944zc~MN;)#1AD)p-U*@peyj;TAQt`A3;4Jtu8Tksr#9k(54p(r z4}ITneIEgRKm7UpK8eOWTp;&Rr7|k@BM?)nuI!&gTOGSh5><^!iWu;!0-uh8zPZ&$ zAKhmu$lMH~{Y4X9lSD3kG3Tryt7ph!y!WVK~CG_BG)U&D=3TV@>aj3da zh0hrQ>vi8;{=VxNj7t;W%*Nf?)k%5A_p_cZ42-{KoKATfn|5~^{^V>$K=j(mDoIf{ zl)H#R!_dlXQ_-pwq!`@XjHoWP-EFIr`oWTlYZ3W2m$<%@0NN@=F4K!+0JnRHK6c{? zpx2^rTvM?zQ|ajQ>=3=0&#eS~YMO`_;jcR;)1cexn)A+Vhp67g{(gcXkIdKD^mFsI zBP6QBlM`T#_-s_`q;vGaf2ii4Sl)W7b2Wk*NRVjyFu9g!+!E+KMHNm zrp46nA*wn(nFCrMICJn!uKQRXPaVH`<#R(EUY^7^!EJ2fYZ^e2U+q*m2DNau=Y>beV;u zig5zk$RD4MfZmbIA6$2b{iQX|i_vUW-ke!^QQlwug~ZfHlR2RIjTAVa;ihtD7Rn+1 zBT@VNzLq+CvuHxy8J;P#iN8s(Ozm1XYH!mgDdytvOV=#RH8;b=xg5YHaiJ6X&KAexn!>IY&fW!a98DD<8EFqN2t19+@biK@wgZ#NSdw=<;ewlx#@V?vh*N+ zZ#v;R-keT8WN5~L8Vq$^&*_7Oq%_Ku(IzC{D6Tov;1C^jt=?Ul!343l@rMlNGQAyR z4_4#Bgv;YMFHaXM2}Lc1i&0G?pTJdfRv*Wr#&5ppV2)akXpC2z@rrQ{v#Z>&>FQh9 za-!EX^4ku+H+t6KsKWjCf%xNpwMeA1!c>_yByxmT0VmrdzSj5ny;yT^NEUJ-n$^BQ zXVHRH@~CiAhS;E5Y83FD-8jLAwB7#dDGGwZna7j7RmSV};F*X?*=3<<=RwvP9cH6t zNXE%~<0ufgIdnHf3RxZgqAg!E5mGrGY&KM=MRp%_2V z5>UruoZI^r%Gk`1d;sWT{03w2dje~}E!7zld;z-F$9*5ephJ!`L%*7G>}DU!!lO#&@-O~VTlT$Nb3UPfK+oHw!j zLay&?;b@{KoJM6mA-Eu#DWeP!5em7g>m{(NSd$Jc;XBoK*WxciktUlJ_|>Kc=matf zkybHuMkS}pEiSb>+w@sycHvlwxbKQWa2GYB z+ut~XhK|gQe4{F{Dcz44YraABV`SByg0cq!UfrIS^yP7KLA|w|$eVG(jS#-L;zk=3 z_F0zRqBcNlKteaR7%51!Ggd(g-Yl}P-2tLbIp68R{i|L&CFwgA=&HKy8lXu8EiE$rJb`vLsymKcDG#V33a{mjU_cgzk!Tn#$GGiAn8aAQT{=FY>_}oyOyhw&(V5#j`c4je^wutv0al z##a9Ya_yn_(z-p!Ol%B0IdD+a z2N~dyg^T45i}=(Ps(T00eRI9D?;tFQNwl*kVjHW!QBOkqIDfkoklD54{eGgs$@N|R22Hu0+D5MzrQ>xXYsL$0f?1|!E%&eAy%@*SXeNFoqPmDG- zQVqDk?VIauY>e~gX#g#b2DJ1DiqSc!bSd&+ZFJ>z!?%`BSCki6L)_rM3-_ZI>ZDi% zQ&yDRi-dfX5+qVg2Tb6TC4Nf|{F_*F#nBnoiVMuBlneJv*&SFmoj@q$LeeTJo8(IG z6x{wQ<$_SIBQKJ=vNLxkd3hcyCeExxqx<=OdfL;oC0_fD6jStO$S7_}hXFX)>*`w? z5?3wy!MZ^w06wW96)Z51e3vIK_l-+(27K8HSRtJp8X|r%HMl_)L0vs_NR}-EhI8SctM#rlNJEh z^V8`u>6EN#@+dfv$OJ<+dNN@rnaD&exBUK)&!z>+QuQ$+VIw9AhMT9!f9g6Yy z-^H3PeLcHAWRi)G1mjL*WUn(|VFxSRHNLh5jXQJC=ndaNUe^I#y>6oC;N~&VmnJJ` z=tJuoG#GRm-8Yw!q7~8jJnI*VlHisnF$U~ssqEWrd9@Rfi3>z$;Vc=vXT=iTHY%-) z@z5l|TFwI)k1LD_15~eXq`l$ zwJw$BoqqbRP;?NJ2I&y$PWs!QCD0+)*?G%$Gtj!isCvz}C;Q$Q+z?X%T70AyUzcN3 zzfU${KFBNvpkaKC)K|7#T<1~yZDl-c=?hgC)uOF`qK}{;$7wBI_kI_PaPM@p>MP!g zNICF@GVQmCbqcsC)MFFzAHW*)KLmI6Qoixmt$Tihk@60{>;Mp(lG->dpwc{1A_cl8 zB*W#+%v7{!`cyH3yxf#Cv5n8bx2!G))}^4tXrEf=YrgHkLuMS^1h{`1yWi@H&wgnM z2ZUA6b+$C%i4su^`BIJq`rfwn6B_%Fa=_5mw%D-Cv0fEx#i1s3H&;~ED#pXjBuR6x zn}@N6xZX;s z)z*>CY&Kg^`NwrF<*{zME}gEquOw!g=^*doKyT91s3 zC!?pmRXC_C7Vjq3A1f#I-KT=tasG<(K`%jJyNu3?=HCsm@tuSW=+$$v%~m~EAlOfQZ75o#O|LH1aQObgwVV3B)?p4;vNwrRc^)W{&~ ziP`uYOD%F;vwAML4^CoP?(Pogu>c<&&t`yjd^+)~*QSF-;<28TbxSw9&R6ON){zy- z$8mV{=ddHUno;xZJ7sc?HkgKk#7%Pl^&$IL(|xLOaV@a2xnQM=%~4!$Mzu^+ukUGM z`Z~!mwx~f!_0%LP&g)%dgmAuy05_gBPOG6UKi~4PE3Dsp{w{(){z^r88S8KScFE}D z|GRQW?bo@5+JK>wqNHM{i`PU4lR2GvZj3&JBb`3gY@KSl^<1@Q;#Pc^tT@zJS(8dX zW`EQsqMq1cAlGrjn)fT)27nlm=eKodgM;(f$#efSqS1{KWPd(; zw$E)_W1!zyon02cPZWK^%$b*Ig4h9Tpd+RSMY1k=l~@UF1UTm?rF4*vuWU2s{qt3F zEp-_>BsG#i2?JEPt6#miZX}|B7-1V5Pra1&W$YJM=2LMuU&UHEI-dh}q-IE}$I|xS zpnPgZe9F3h`XQJ;4i-6sm9`K*+O|mrTHtl9$fYV$G$Yq zP@W*uT8{N%6QrKaLW(^r(OF@?FXXZ%9Z;ZoEs~`KxvgU$ZnxV;>oU2%zPgI}&uojn z= zQYeamk|bA4dp>Q7@R@PZY6}s|4UE~+en7L)3y7EF;u=RU>f^>Hg<`bNHsQ{_Jk6a6 zGY__FT9+KgIFB1@?%d0NxR;H)TQm=zbRfm@c^RGm|F|zd>;BhSg&_86n5dAZL93si__RCT3OJ2YM*&sf4y%K$p=-8Op*+zAo$CF;xOD=oxR5v zXIF+i=fmXHIycwIqZW=>Xw!9m$nJO$rDSgwU>&R*U```nXCe$x4U}rS#-bZm zc(Znvy=psCQP=u71~9wlhY5nnBskY)O}5cE!~;pa%_-G}dM7$*%^EjuqPz^m^5+HI ze;?M%zpA(WUX&B-Sejv3?q`v~mLBQev$sQOE|vz1V$^5*kmB0UvuhUZTY4R#;3BNi zs`f|e@%AU6BcN6v0G(hQORPBKp%HDvsAG80am6iYom}#T>`yz;GLB*Fz+KmI+q}Xf zcC`_M8^(E+zDevZa%&b6eXlpvtUGT4O-+ToFwKmkRui)9(U|R6co#7XzE-urT&ZxV za$hf7?oj3%>5VVqVt-Y_AoY*8;cq`Z9jNH_S?=DJ*K1`>dS}D^$5^O%Ww6I`_cq3k z0rd7Zxzn0*$6L4&d9bgsUPi&^#h(m5$G@rD>py?w8P=Q@XWy?ktWROl7Du&ld{=HN zCcNGZ>MVNT#i}QCz(50eUBQXZt#Z@!5_XTB>kwQMoL^^T@Y;a>CN;S@*H=;e@w4219c!gP^{3(Y3 z+A_w3n+`X@m~V-A&=f4pp+$+aDPTF~H9}*{_S@K^3W)1{YLd3EK=T>I#iYC1XcBG8 z(d(<#q^s?|oBNo#9)-&`(xiT6ZM(roA+mJ0nu)zEJ}ZL*VT}jSBIp`eRn!(hq=;>D z{sM8|@v911{r-u)`!V!efL*tLvAA|Mrqv*f!e=6RLGnZ*E3CHdV#2&uXgGcx zY0KiyrH=J|CHw8kDq$2-weDv%pP2*9W71FihVX zrWgza_8Bk>RdV-~s|oCKA2SUVInD_8HgY8e)JQ0&E3UMmvT(&_Vn=84&`F*M%7PiP zQ5i$}3I6mHeTMJER;w1&^k0_Yt2k)La1@R6Q*H_7?EBbJDxH=JgfBQCUO}lm@ONW< z(}ObZs93X-{DeHD=2*-j=u^fIH9T}vKm$d3gfMcz#1!TweMAI8VB1#tl{SMWxAXB5 zq5+GAy%zsI*@xikiu8rr|4jFy2FcQ6FGHpJkHcZjyjHBM`xmb>NNq2YVo&AJaFNzK zkKh;}zCiwbWL&*dpw(%>yXN4L>v}w}dyI)preXaja~kPVKTV*cBgL+{?w}6-2OQf) zLdND8$`CfdG#&SU5?hwcdSzmS*KPcZ`Zy7;%|%Kx2qO2+5MUmg&qx-XXc{$cs@vvc zvca~Gt9>{!v7x&%y035xGi#IBR(SaJo)yaijw}`KA0y7o-}x@qHcfIMxYe4W38!nc z;`?K4Zh4^{L(yd)e%+7m=`m{S1i{>&?BnzHN$xAVwNE=l5DEo=PS{!MUDF7-suyjm z9MS}CyMi2Pi%phPomf)b4(mIqhw(YMV^g4zj?e(lcOiq~TtKKUfm`wfWDJTgFu_cJ zE}4uUhSnN}_W(VgUy!$%uO4ACdV6B)A&lIbrL}<8pleim;he?qfZoVH_Im$1P7-Z8 z>frIj+#tHvqh$i!!B#({-Y&{Wbi5mnDPFWu3lPLv+$SNH#qog!BtES3o!q1X))?Di zvZ^rF-Pg2Fg_{+ta{XPbmqGlIpJDA-&ZCB_(AcSFpbT%$e{q?)T>YmL+@AW@hOP?_ zWIl7Q)L_);I%rm!(`?*Vb62X~RhnIvCWSo>Km3pM%!i;96&(lo(eSB(mrOMQrq&4(;OFZwC_~7DRU6p zKiNHNKl$a!3XNgc#}Av4O4MZK(DG-=5A)&deGLwJJ1D>9ocQo2M$HYSBl(kgv&CNp zJ{4|f`n-y^zy7piDO=))GN@#g({88#7Yv3 z(cE34^z(f7yINQcJH=vix6Baej`g(HPn0P9?VCm>O5Ey)5QcIhu3ZB7#CO8o3KGuqHEu{aRM5w3yAAB^`PJG4w-wmb%3Y8K3&6a@AWHh zhan!StD{P#4W6-9;f*41=DML78oRzz1Gu*AmTG8X4N=`B&|kp;){621?uzx_19xOC zHsv~i&a^gaQ`(oX*?b$n<@hX?@mebi9hrO*EpLF~Us?%REmPuLWfx^RKU+o5Q@IY^ zJ`d<`N#;VX|6JOQT#+QP3F2ob5x1_Z|8lD33|pP0;h{-hF(M*6Ks#u;hjD~-^W0t^ zVw=b3$4JZ6^o4pcAn;W+{n}HHwynOz^WH>Y0|C&pK100Y>BuA+9(Iqbrts(7Bv#-M zhF})@Vb9in@G zH8r$l#aeX2|2`W;fc{@cdj8i@_Bj9yUDx!1}=^*5Rs= z2zigAO+>-Aj-h5{sQf%$+vKy0crs#~C~p}U5p$d<9d10-hYr~_tgyv@==8jekJ$|v zvt=uw%$TW##fh7=q}8$o(*lpit#0m#=1Zb2(7VhK&wj~|ebBDn zh;`Z2wb(hZ{<1XxQkws(w2ptvT?I^sJM^jzz->R+Sp^U`q5RLPmG@Dvv26|y6QKXO zSVO#G{b`iKJCV!f(jMVy)Et7fpRDaT{X^SQfT*hOk9zh~!p7E|iY7klXZFNSL?}SH#@Fjn@bcMp#jiNK8~Ou_Xp2zn*(E(5-gu*fjO9%ZLbYtizmPD`0!nBqSa8^ zPq8wwZLir0F_@(AB6PFYJJ)f7UdW6kM9rX&iq#fhoeKlqd^pav#oilM@ai2KLWbTB zvnW$xvBSTV?q5si>@&wKfNsjk#>=NXC=Og|sF;%)XR>3X*L2ij{jGzTyHYbkY_1~; zH(TZ#7u91^@TqQp+S2cYW5C~A(y$MAuNPZHpJG0fs9@CZFHM_O;5KIC5sVub!ww zsXkg34&r_lu1?!Ol%vR<$`J5oy8X^F3`WIEyu#CN;}tNti?C3tB25QQ_D|zM78BH- zff+=*)M+qM6N`o%EQ`Crf*%rhYk0*G(a3Tv>~#=!D?SBHwFR3%=juiEU*8e!in!0( zEV1h_Br1XX;U>{I=Z&;Ewp0f^Wlzp54nCc$)WP@Ekgt|VZ(m&-C_s15x-XfuC!jaR zSmyI&lMY^{Vsyco1D2R=WRH+P@{% zq*Ap`JBs_GNd{uLODHFtByKT=+MuV~%NNWEsk9%n{rOZ_&_}7q; z$mmZh9_gxgt<3;Nsk*o7=Gp!S?wFV4k8kEe^|~EyP0Qd<M{r`=f@#caqHlY}x-;$J{a+@;(ikpPT~hmuq7<2966JMbhewHe598?xWZFmgI#PgLl{8d2{+Uk=x zuUf6+?d(V!$HVl6GvR4BVpR)!rK}M-Su1oDtQYgT6>9d|Si7fVJ?%C5HMJ_yi}zK5 zMiIeeYXg9F*1m81XarGb#8=dHY#P>djFE{X)5cs}6mHu^^D0t8mwLpr_iXgV*c2*8Noq#dx-NQN5}eA=^eFg_Z;Ehb)a~o!X?g zqeNA@3Nc^H(&HKs!KE5jD%TdH-03Tc^68XlUJxrOeHuXLmR6M^)!#8Z*O$e_v}}`L zgigae_ef~AE-zzEhj{c~a_6W#hwoR7I4ZGmf>Rby5;6*TSxPvD@?KezDG}$IH()f$ zGJTE%`3b&h-!nQBpO7Y$_ZjzQxEE&hTUdibvWUHYsdO7C$y_!atZ8x(u+ij*L?d#2 zUlpJ|S|H=P^axU0zUrG2p`QKdU&{5% z@;qUev*YW@NvvP4b#vDdmI5cglA<8Ct{F2(14dk#*Cj=b;pJS0aB{i|==13XWf?9| zHU_k1iv?3lKt~du3<6r<{Myi*?;>hGOpr4)Lscmw3|ZetS>tzV+;|x4$H+py;na?E zn2HF~!=a7SD|1f=9Zs&p0SmXS`Pb6?Eq3NHh7bfm!|3CDFDeauA**;ta{$r{Xscjh zzPo0T9>Hv6Ttsus?2^t=jA(l<93H!=9Ftq~`D}t;q`&lOQ$ETG`YU_-EvzfVRj#>V z$XnA9;$lG9r^`e6f#iDUED9NvydhbsQ61eADHIZ?%K9?N#5q{H;b->uvL0mOXhKgi z?iX@WJRfk^m%eQu`#)NI-8H`kdanDX%-z4f^iw40xzZ_Bq5-|0MNC4+I#aWtu^0g< z#LkQzN4F|2e4f(>bi7u{KM@2jF__#*70_4vMm$Ac2r@dGj$=1Ew^9wc>?k95Mh8vA z_0Gx)Na1S|2$?I6dr}mR3OBK$QS)M84ds9RdQYCP9UNvcsU=I?s#94krXDE@N5)g} zULi>mVr7{jmOIpRW=CmXOBaYH0W=4`8V>&?U+l?k~HM;qg5#N8p$II{xn=cpv~JEtF` zvr2a&a7Odb^7uR&vBXpHsuTgvCd$lBn=dG|SAXAJ9HUfPA;x<2cGJojN$FqWiftf`QWhfm!ka0z>jwZ07rvw%4tmANr$R>>}m4 z8#yCN3>#x?FOv$^%GWb-KhWyDjBYoE+6=!aB3zg{+%vDp0)+w*`e6X#yug|?syqgEwQmZLL)An~vFW0TFYWiWK@f;`A8RQ13WU8NyM*Q7L zDCD986=KvP#Wf-tqU4F5bwA|`hhGPD+f@JX+H7(PZ_HyE(a|Al;tu22x`4sV%hS!* z9Pu`?lQN9WMMMpoZ5qSQfLl?fMKt~J=djRp@~H_nVJk&ml!@a(GB&4$#`f16lkqJX zt(Ey%PoKuh3--btc1w)7=WG&&Dc?n6%6Jb=4i)O%`yebh9popkx8v7oH+gbL28`@Q z#hUg=mmo;JjCHlwpOk?(h_CmE-IASxfulb>BxrekG$P=0${Z0E`+Z>pE*zdD3kJ+5 zH+Y*Qlb5$=bM}bOAPS?(D#{PDZxGhiU};p~&Mn|J!MXsy_N8yd-4+9S2WV7hUL5D> z!0QgOj{}DE6VgF@GaOuQPT*(hiE(`~Gn7AxOmY#ActiBn$%M{40-%+60rBCLS=?<5 zX*GU8E6o6UdH*!V!hDSftJmjB<9M!=Ec$rECPdzvuUx@b)2VqO@)uj1BEtGk=+Z`2 zRMGa5iu}rqAb3AD)>RVnTv`zg>kDdYc)M%p-Cug-eCeQkwG3~UQSSt6E1=*7<*~VG zq<6Pj=0<+Mg*9qp0O5du9q6z|5VbsS{5etVZ2XP>aD)XM5CvAan%8ZzY_!jn^J_ht zmmb&CKX=_ZO%Pw!b|@(u_M=70!Llz}aZze9K_MRg0)_A>EWYL-1TmP_0wf zFh@J$9wBp=jjy%OJiA8uPKYL8_f|mxosMG8KoxGH!5yG6i8Uh_``qdr^L)H* z4j*WBb2I>^89!f|Mt$n^TC8LBTJwUy!p&El7Z~%hf$DHdZ`#v0H9y?d!2&XwT>{@zl2 z4J?6-0mzI6*>l~rzD=KNAXX*1)`c+uTl44ayQTq5=je1og3gOaL|DmS9vxwb^lTRg zN5w(CLx*&SGB2?&`f+LeZlqwPB@tE<6{**|$&TW^brJGV?7wwoJ`cLtB+IZfc8y+9+q3| z6OQ4?}uu~IilP%cH}NqlVo?set`ZmS|umeIbJNI zJ)p2FDA!B);rJiHZFB?fy3CEM21ND+!A%qY*LBM3!X_?O`sWg_IYXj@(}1yxo&-8%2g|Y9u%l+*~!DId}Rn{%?cLWXKUjiR8~kJJBx&uOyO1jQxud`vbU-61Vu5TY+|n7ZjuJYQw`kmTToKuX~+o8z+FvV2yZ2)W#M#0{Tc(#KA)GKNsm% zpZ&x^p)F%AC%?d2E9}EEVf0@qlS54QQhbfz4pY#7vKLo(p)ENuh9?gU?u{CTG%Zlf z!W3#;{A9|$#+A?v{IsFDB=?x_dGu(nmj(B2a@~6|XkdM3EAEyp6o_4obU}ndN^hR4 zRYtX1OiiwNzbIUls;$>8474w|>fU39R&6gUa0EJv5(77UPb&6A(da$Y=P77Mw4XVPCA+RG`MCTmDWYmoeK zA+~+R!HsAkeP!IawWRt_ZKO|YS9x?Jq%lPm?~_&oEUNQWV2ltz512$ z7;|oe(9E>RIm0s``*{heR)g z8rI)B>RKFlX&Xi=H z;o+9=`gu5zEv{y*$flPspKW4bo{rgcsezSi1SZjLfR+BUcW?PzTOZkC5TyKu>|hBE zNMZ4FkJGxP|9ZYmYWE~E?KNIj7qiO1@FeQh;}FE~2$X?+6+#g_`H{sSZRa(n8ge`$ zfbJq#v-LFGtts;vDX^3E=ANjO9v^B|hXkSHI= zgUsg1z$oyk(@};Lg0ayp?!&zSxAGz~?wwAF>UyRV#l`f=W_w{S-se8~PL0!R0n~V0 z!5$#4p%ZW4J!@TzO_x&=n#B&!Hq=V2jSA2Zhc!a+=g$rOOI`a+ELDqqLS4u0EnOhC zb}aNpt~Xbj;Xv})H}Ql73m^ezaI0q?5Pg z`d*p|aI2`2`crMBEDROg91?^Tn2_uJvu!cWX2OrHJK@)QG%wd**>uo|)18m3#`@or zvk9&a^VG+CUF~>-s#JP%U;yo?)`w_=Tgax0q+sglNBgNe*nis?EHCw3ZG@Q9d&DqU zEr5D`5(r$Uf@)_=T|ZufCJca+=@}3oTZue?m!P?`O_OZDBQa&eQb5z&n2?pZpScl; zSD{cT*71HMH&JvS8p9lGdAAmS85CD)zq;kj@z-4BTlZb0okE=B-I^UQR4}L$EY)>? zw|wKE+45-qLvdbw;it;=?$pxj>4&E}4d0LS$wgcSwKMrC{p$U~Szj4vTu4GpXvuW$nH zbD6oSFHcnF!{;?V1$RtvIwNuNOJtC8!{HTrvotX&tNBq_t@g;h@W#0{GrA#WD3{8y24GF z!-CekCFAkCYvyL0B=#aCTi}D4U$Ll0CF8b5oA=G~d*3Wid_lN(l?2QzFBlsPDn#8gk)G#@h>WDJ8WW#(dnZY6KAWr7x zn*Mqg9IHh86S#L~9ejJPl74*b9`jzOzD0b}Aj%Z`z3^Id8Y)tMY8EO#Y^$Zf!!0CmY=bS-Xm`w|BM{OenP2Z=7dng?Myy zPpls=cf2Pey)W-E`Kt7GC%|Ta=FQ$zHRxL?GuFkv$3;szcE6`b^shv>){Q_m??58^6e+Smf_WG}pRg0#b2T695 zg@QFEoC;feX-Yrdwq%NUVqgkQ{P+iNVH+cj57ws=;*jfv8}zPV0~SpnhB0<$E4Z#R zY;(FB6{;*14+p7kRnhkP05v(}))3*Je_jY(C_QcrH`QRQVxtw+ju{utz1#_6&cx90 zMs+aMwR9GzPCG|$1^UIN(*|tmgnaBrg3at5ebB}Nf7AS18NVvy!(_8hVzN>Bz2T)H znTSJ7T3u^BZhXBo7~WIJFD8$9<(9cv8UvUPokP{r0B9u{&bQYtNLVVG&X8Rk--4Ln z`=%oq18@A;z>23bjW|cdB%?n-o|0W(Ar=hnt-nP=DSkOI2P9d(Bu&o+x%} z>bPEk_T|KyH^ti0Di;z{VT(CdZ{K_gHBy`opv!xajpx>eZ^`_nP=Af}0(2kJUW6c5 zl;hEs!ZnW^Ym_(m&_!);$~Eg=2ZpvdO(`~%dA^FB7k#-c=k$fPjrC1Ca@jlAi+9Qm zBi&pwcAP}JCsz&sS1)~0?kC*`$LKIWoNv#u4w?nOV9R2zpyf!BBoAFmpzbx%k*mQ* z4nOm~;0_L?U5!)JW=Pa>fZj!aBizr2^z}N!wZ3SICeE?u0{u(#Y5Xd3kFb7N_Z#<= zSe`kOTw9LEZc8mLiu}p#HheQu!=~GlByxJXJ%g88*p_f%OMwr1Vn1*@e87Pi54(z( zWSL&=+jFCuW7KN^DzE~gAnS2J_Z`j=e7RBsvFfGQ08Jslb?>po687ENl~xtpr!qXb zA_mX5H^vgkt}_?-)`OVW50Ws;b3`Iv7PHF^32g{6d0(I`V6Ukg6ifIv8+h)f@Ct%# ze9C8#z;UR}*{_&fbH(rDicI)$o|RPWqay3VD0_La@z(+?xXpr=qn8kk_4!M@->TE8 z;#pD8U4m&D;tKRK+!gdkjrFpfp1VdX=-@ZC%8Po|ZWD%peQ zSLY^PQz+6Y!TB}LU5VA)QZCzz^-z)IJdmlF+Qu)%;kO(%CJ*A2;l;YZxsS}AO#Y_n zOpy$!%;Vl>pHGOYFR;RVDmj4^%uRi0{FDO`qaW}_1={!PPyC9;w%@qaG_ArGUyQwR zqLG-rR-k#9&KvF$4%G6QwfToiyJ0T*2EZNL@-1eQo?Kf$E9t8AFs&0WE`F0RTj2sONj&MKnR}02)H^NJb&+F%G zqnzr%x0f34o@;K6J*?B3t01r%_T3$=6}nQQSIv9$%*g)g{|EOh`%HAm;2EsN;#k$| z@S>S}S+ZY-8+_jq+vLC?spEbgLEfKo)bG13lz$A?v?wLKUZQ^eathb^Y&M8~k0t_b z<}!O-&nE- z=)IG$dP*3+zaiC}RaAE%CPy00dvciNN*{~dEp;bu5a%Sbq={qIv72HJ?#00zlYJJM zV1BkZ66-P_O^r zEvZ`>!M!m=u}pc6f%E0RW;eL!-sz%-3+p3_L>+T*ef^qWhqR*SXA9Zo= zQ)=RESGC-uWdpxW1eonsY-@3fIp4R@X4fR0^-m##4ICbj4RON4HA41-M98 zsppCTlX3h>^!OXmif_Y~Ce}5ZugK9u1qBK{XRYQ?=*JkHxDVU`2X{+BR$r6$T`XZ< z(y+fDn*V7(>LH+)If1oK!Ux%2=vN*J>pT6|ST9&{@!?xo=QzU~e57){dr7Xf1aPYq z<7iZS9h@&(iDKWF8)<+Rd>HzTMT@FXjBOD+h)sk}(hle2=dp-h^FMP!7I{zkPk!#X3e_JPnzp}b~1Uh>lNl> zl#iBOPEowxx*l6tOSbFkiERPY5Z`L27fWk}BWAYAk~s$2yu{wO&UjMOlntu?VRoY9s``Lwr+wx%oE)X+uVghuoW_p{;0|tG>9lEu7t-63N z6>%>5X!bzZhA9t;&i6;F3W1wV_bdwE_4T@3H@i1?4N)i*kCPfJFZ@uoi}Pm3GhC$e zB+@UF*_(Xb>Ffiv9mYGUZ!0$eq15KFZ8j`>W);%8-1i$ zt?%{}0igTqy37TjuoeuV+9=Bg8&T{S^bvA)~2KZMbL z*7cu?HI@z=l<~EV>_EVhk}vTuvLNpznPkpMv^et28{_l{v~?f?)~)=B4f4?uohe(8 z4oke{Nlq718E-pf*T^`TRgz$%wGn!XJx?|~da3TLKxqthH&l8CN$Y#AkLTNF&$c5c z%G-s2^6tv&MVYRZZ9u;{S{xDHI8dsiQWF%Cel)hdVvh4DCQ;BlG|l%7<(@F>O=SGk zyNyJ_!hByFr@E=JE57B_F~Q4NpK7E3L}y+6D)R~a6FS^`GdXW}%cQoc|7@{dj;~qO z-D6Z>pUsVxj!xzj6xpOd892#F_6`jZ6X=U*sG<++gc~zEVjZ9C7P<*bwFI0E84p!_ zx{rS8v-utz@a+m)8F_NOCFG?p)Kvxk0}jjviP{NMx0gRM#x`_J10V9t5Sv}Uv9<=p z_t&;viS8Gvdkc9Y9(=oxcv&@#PPQ?o=aN}49hwKwik?`Ax4=czA8x+#03`IxbmbHl z>Zd=1^@$LHK0?d2Xp>OI#=5fZy7$=#o!ASkNx{!huF=`_*V7N*(L}|nhC;fjNu1gi zXwVZ82$7|=@>Jm?<$Jmb5yVrpc}IbDJurU1RZxlemM;@6e{%iGELGr1)Hz${?0wH?TqTHm+Lg%1~3wgLU}Y_2g(ef+`@ zRr0f4tQ3&kJK+VdP3*k`O8Ug?v|Ievd?(RO3hppiD-rtDZKGbD%oI`$`@3>2N9WFD z|D{G` z#_v0toP&jC(I&J$kJa2*Lkrw}zEB5LTCOX?3)o&Ilb$C&yS-{c;;G zPTf~RVPd}=Nl4=MVYCaDR6sD{5U+T%tj}jF8g@G4hoyrCaDaxUHKXmhjNNNbf9;<` zEYlP2xvn%rt~CmJt~YB-q~pnNVNHEW%3T>0R_rHMo1JpswxKu9)1{G~)hH+#PP8l5 z)ZHT$YB&F>a=jd1BiGK-t~=)*Ch;yFs{rcCYcz@G_K+GY&GG*^=2F<(b6mf%9jlqv znuW4OO~QPcp%9V36FQAcFU>yrq;xmB8JFh$e#-ZIv!Af+_Io*-ak~2-i;#^+7a;0S z2Feo+r)aD7H`#J$6U?APMwi0Qw!^o;m4(~GiE0H?u_u57GYH{HF>onuEyT{TSvnct z>Uj4Q)p>ms;%Ih9*d?)G%=gm;tvOYNfU{k+C|hAfK(_bcYNE+;PF)zR;qK2H>t%br zs|bV%f}}_EMv|k)?C_b5uOv(S8&hk-W<~U=rQhNBQ>4X!d?}n8yW9B$d=%W z@>jXF)Mr7oC__60H4ZKiZApk6$jfziFz)pbr(2n#@tcwaB3ZT*kqF&LB;UZ7JDUmR ztQhrAphs8-GBIx`?JS{gG$GXZ!S}%$;5IQk!G8RzY5d6|K7ZBq&GOng(|%}%fgu?n ze7lVG>zT1FKJ%&(s|bVGzZeT%coown^kq-ka(kiOt>-iiR;|azT?<>88mkM&(fu`$EF~@13#1 zwPIP;)Pr8^M(UbRj{P3bf@$q`JFxZsFJlIu@vEByPNNhc>if9C;fgL(-%)*YW~AJ0 zBQ=9qJ`C140lJ<#D%uNSVQrj7yNtDbn&6IOkI%Im1(l{TDu&}2jbw+|W|U!*OQc%w zW;FV9)8PccfKh|sEXTPPsQxD54)S*KI$(~C&-$^Ek!ysX2?EdO^ccxQ+nk=v_1EHA zsV$|GtTct0X2Jv`&LEBwWUkmnOtG6Q8M6m(kRw#0Ig?33tZua{G{%*2)l+*c_0;qk`T&dTM-#0g}XGgbwZ_;Wm=SxGe z7$mH7Jk(KPe5KCRxG$z(;hW+GF#@;|P-ag9jPj^z*8=PK)z8ciUyiSlVtGCCV!v+I zO>)E3YTtF;R!&2LDSKtA^NE#!AGR#ZrMsyUC?J&W1lqX6t-AAuA&WVCVLrcqy0eiJx*VW`9{OPc4d^& zha)%06&F{UZ2c9WrAdEoSnpo)!;uj&>xzjAt1aUYK~pg+SyK?p>y&r(>A~iPa?%t) zKh#7#ex?~N=vm5_vj83GNP09vfOsoRtFieaA%i%M`&-Au_|SYg#ETC;T#bFRUt9~I z*JqKO`}cDaA-U3a+@sQN{XB&gEx_^|HM-_-doU9pKh} z?-DDRG!Y>kxP50wzV9g)>ops>;j^{`f8C$&casOx+GqKEHhr~}n*dE0gkC#XS8%_3 zM$B&=34QZmIuEtE8VY%R-u*NGc?_q>{sy3t$OW!-7JLZ_RpUI^#l8?E-FU>~~s2J4S8UOzd)@y=JeTThJ|9!eW<;N^rX zhx}}@CK`yd&WUY%3v9^_xJ^O(9D>;Ali=?yZNS}a#<{-pc)S9}rh+}2{zM<|o3O4K z(d?k*hS(m__*92Bb8Za+zFI8v84mJ*R#tyx&H9xhOxb^3Aky6%kaOveD_k6rn-jqk?t=Qaw9 zkP=t{UDOOp<ks}VdlLkmL40G>?kM5}V59%%XKQ2Cq zs$bM@a25^L-i2P!$BTn`={5wmcfeqa=YvAcrb0w8PXxM$FR(ta9vpos&`J$fU=8IFyy z?c6%=DxFSsKddV#>t~Kx+{z}Icq11gsY+u2_F@U^KC#B4ur@Heqx9$5^qEYZ--bTH zBz`65#vRp4A#b1-@KrP;{p_%&r71divDai7SX>&w)zyx5zwYn7?kD_S=L3^mah&d) z+%h7-<@vU=@925$`rcSk+7Ba37FaJ(_5tD?94GWY!}iDFPz9 z-MXx^)0{(fe;CWM2uKB*=0UnRr+(W!GddyKnO%v{J2bhCk~+->_WOD#3rTO5C^1}> zrqiw6XwHw<09`B&_11`bK;Y312DF}iaO}nm(_vj^Y<1@R!aQVLvR5w13sa~I1x*^` z&~)_W6Yk$dww8LqipE*7_TdJnYpRi{T-_FL5W^nintQgu+5#V0K?S}qqb=%Zhc!BY zay|WUur4IJ!u_rI+FzHiQ-i<-aa_;s@Agf4UKyI(cftbCcZZ2mrn06LI!c82{C@f^ zcf(T!cbxfVKo4(x>&#C}=o=XrX(;6qcc?{^NTGAi?E~Lhe8i+CKX5;Cofjj^t&-5T z`mCN6Q!e*C?Rt!zoyQV;`8{X#ELuVWgqf(@&0Sbop}jAR!#SS6m@D%3n?NVlVH_V? z3M2`b_^*Xdl0t zhhns83{uFGTZZYqy6{4)zih7Tj%>-pt%OP99>G^V0`zYl$s0lN#X--L0kh->Z1z7X>>oQ=i_1*1zE52udH1R&p-CK zpjbRK`Li19z}kR6n@q1_hShi<*7LKG0=L1)&Lym+@$Y2klGI;t@}oTJ{eQe4P8TiY zT4gYN(S(~s1DdM_zVE%x%5#kbXdBb$3fq$}I^W+%l3daAf|t{Iscwg2k?_o&v~^|% z(4Xbmhk8`Rzk9|2cc8O%+$^OYpZbuU!k&p}ytx#1x%j=;aR}GfwsKfvy$gof)rD6kpLx7u zoxw8Vpf;z}rVX$L^zyMl{JS5ZkHS@%SJn+{-ZX%&ADrRt;2t|}2g>mpwSUdS}fpL}krD&>qKLPBJ)0fD4aCD%A_j&_}U?z#KFS6+MV&|`bW0YBh}GfSWe%1k&79BF#p3gu)aa04@(z^WGs^ldM= z8F`8W0ciL})|fVEnLp|M`Vi6mBt5bq8bF+_$87GVLDBpd*3ApIgkt4YQ74cu4D!wd zZ6Aeqx$Ye6d1D?>N7(_fSo}q@Ul`$n$B)-g9?Q4)P}AotA+-D``BGl8U0=$(wyz2F zBcrE=w%l|qF3P!)I}_(2_K29M?kZ9jGO5kL8pljHKcB{oB`9#gixDFz9swq84DKsx zFkYID@HAShPsxAf`H-r^ZA$D)_;7n|vJH_PBNZv4xKV*@UML%9*v^J3{&*_&2ymB(I)rMpjZ!nZpWQe+r0k6JDAf}D z!cEcALs>$7V&Fh-=Xf{@4-LjkgYIa$bhT&G86(WFa`*zomcw(+ptb~bE?5R<%57&tT}qLeW+5fHm=3m@_!Z#KwC<0)hk!0BntwX z)Tx~;Jj*&jQ?UkURVLv@Vg@3Qkoa-x3Fx{khb!-{j4X1>$Rs8_z|D_Ue-!a<*f>c_(-?8x>9{7+vXy2@M$D5%zK@Sl#{UO%yf*C7BuwHelN3ZtVz?@3elCJdjZ4o~fww+GOFik1gUVwrJhD~!X|p+{|@ z1G^Yl58hMf8f$}WZD)gVtauhVg1v}t;?Do+Mh*u0^P>OHJC0Myipt1tPmQr z3iIK=&<;xlEeHdLzzPMZIs1uVVoQ^7q&Czf+G6s@jI*4hWXP8&S{|&B7LH-oiySey zS=jR{l^i_T@S9+LxE0ojV{VRQd(r$rcp9aFs3eT*jMoF}<+jeDVl9%r$24$#a(8+7 zySA^(#TN5`dm8+|CEPj1t{fHsoDCW$@<`7aK>U{;U9LDXHHDp+WbL{xL1f&mM573h zY2&{PA{6*ItWwsGBVkRL20<>+PnL%+43+^GSobuhoyLC|#3;b?$sQuOE*rt@N)Uya z;vjX6l;~lPgDt!xnk0npN_AF_Vx+Muo^-rNfYp%|$Sd7Md@YbNdVC`b z0IWA)0@(q;Jjf4f~7|AmsiH~uxzMX&eMohv5=@3OyH8n zSFj%73>229=Tm%^Yq$jU#(5go@=Tim2@w2Dc8PL9&w7|A+k|C3FixnQH*fi?WWVDM zLb$L(xS(f*|FUKfG*2VIg zm+yM~nxDz!bIL9KUB1Y#yKMpzaPyq@04kPg3?!aTRbgnH^dX=JZoZKOenzx%+H7CaBtV}huq5~{&4$$) z<17sMU3Q;!AwQgrLb9A3dV~(|Kx!hAmz*^D-j?4b&k04-MknFgNjX5}(G-fEo9J~!|!HdV5v{<*--^5Z#r z#LR44-iKwto6NBLzY6bZH}*2l43yilxA(=87q=x7ZxG+RU(@^O`n}lK{Cqv?^d4K^ z8@O5F2wb7ZI0VXy5?emqx>+jh=^=N-0@IzPcG_(@Xg1ygcSRr&laNfWFqPYCpL(J_ z`QAKJ)A(VSLPwE=X2|QNCkqrN59RVc3iRBZ9Kgge%JiIQ032H1yCRq6t@PAgHaIY@ z6n$G(?pL^Vx7YMYcD~Hc$_Czf-0(rhKB{dl5Tkf{!h;jTn zZ^ALn!kX+JG%6nOWcEkPJJ`L_qzMURS;=>;D9ONWrlv@V6h1(o_y@S3Ef2hp=E>`l zV0mzVxh<8S0NZq{P1JTt>3I$_O+Gr!q(UdC(~;wTFwvOK8Z&0<&>$kD4LPM~b_U)UEGF$?l8Tpx%4d*~A5+;hJ#@4z8+ zEErDV;Z7PWgsp$P73Y!3yV=5<=$0(YIg!AsnT3-MZbvOAl-Gi=F!5^tCjJZ>DaQgND*T(rtKkNV*<`$RL_* z?v@elNk6hZ1ys`=4}(YhPnX`>CA}sP&$Jhje|ARjeQLj zppwzg5To0s@^WpJv3q>HTaw>JCYa0s$ttc?^Txl;uJ#pj_8+;3r1;7cguXnV`&V$k zJ?{p$HvVl%Gi%wbjn9*~A--`MiD4vs(#SO9nm^$ur*V_X@|wsxVpw8uH_$^Be&zung_(GdR1{o)6cWuU$6D72OF*tz3vkT{D2_jsJN6Pu^X0(g{cRl6Sz zFY5}|UG6)}JhQ@+BG|kkKML0Ih;fz}cL{8YH@6#(WYUm=00EmZnnh$xTt31mJ!687P8h&+Y+{Jtkz20JDU1o7cEI7KaQQ zdm*dsVTvpffFrzUBh=C#vXN_?Q5H(aLJ92vC{ZoIm3xRg6U!!ngkC?(r|bea_bKkQ zpOWY&ajql_k!_e-OPo-eL_=DltHfA|w^HqYeJE{1AceKzDy$Grot!QL`6Z!0av8%n_ig7a{q=@7CrWW8vqli zS;)@y7CXrS<3}ZpDP@G4HJJp&wOP>Rvv!@F>$$mQ%@AnzsvM87xWvc3pvnt0qP@#F zL^-wR0$qzEacNrbOH)&BjY#|lc(L8mh%G0 z)8_ttVS1nSJK0qsG?Fw(rnv35c_Z{nN{4MYGU+?|lzjpb3duO40XMys5pD~+5E?<& zXwL=I${Ccq1F4RP7_uJ>_RFF3!Coigs4v2%2n#p{s|c)F(uzgTk#={nE|%9!cw0Lf zK)X0j{2JDc!vVMnWkU5Fav0aX> z_g;iGx-O;)cM{+hZs3dM%h8kD(6y*`NRnYo{!j5m0(bERHvqBL)>F8Xz9Yn0OEiUB zdjN&lEk7wJ16HgT)C0RjRamJ009~t@0P9Bcq{#!}5>P$4=)Dc=*+p~>cGFsbQ}}?A z!H&lb_u~|m-li)M;Jejs;${Jmb%w!(nvE4ht#yuYs%^_H`jHER0vX}Y`Mfu2<92W#Xt zSU+K;ayxPa`3_yi?F*`zkB=I zRvIBm7?{|9O|Qlpi3fmAA^~h%_3*7}IhU66wmQO^^~UDbPhe#C4 zE)sQzGtgbEi{UUer=^|LX$jg zVH9FtZ%JjauRD>~&^3NG=$djC(DkNNmW6RqUcc{HqZa{6`Ma~PZJsCP;DDR(2mLHJ znqpOPo=N%;bj?oH)!55nw6kNn<~AsrTon4nltDmJ`>Cpn^13~9qj&*ym#*J~ea#Ay z)KIi{HMAu&!}bXT!v`p5y2mQv7j?5@ zWZPbM7wckq4Rr&YTGm~#uLbJ_Xtl4|8UWUy#-DC;y~Ms|`wT#Lgtfdwi+#=7coehR z5&QZg)@|`E9_cRD#qt{9F51_{liAC!yNmTj`?{9{+R5v67we1mbtjYA%m36}tc&IK zMfW-Edg+t)UJEfocA{Q4r+PFI$6N3nZd0KiSLDNd4Q+XX5aC~IW1N9}8{CS3un zN%jD1h?i{JMJ@SelWqK(T=8`w1+pZ5ZF2y+^kcg+As_F161WxL;$Htmo-^B>KCt*T ztE(;658Dz4c*1Y9@$1E@cq!Rvp;QgMh;`T3rvln;uMgpzg?l*}p@ptt=H18-?|%F` z!5V==UJ4nuPa1!*apB>d5l@;i@oRQbZOG)vBPC(`BG&H?Yd!_&tv(CZxU3U--Q)H( zX-MRJO1u&_PW>?sLk}M@KKSB7ryw5GO+B>567SCLxk%S-@M;C0QgN$6{;N70eQ~4U z&pk!*y2tHniVC{tu(ta?qGe8ien@@`bWQvknX)dOT@T!jM_zr~A98UdnSr)g7lYgC z8mytIgs!`tAKu;gbqm%tc8^b$2{t?Na#v1XAna1u78JnMWj`13?u%F_u(o?qjI|<* z(%Y&fh=cWgZlJpW(9p`y&-aF<0|A2_j7#9MTk-4N9tYeDT_3bqS6i%Cc@bE1N;NMq z!;zAPtK`TtsrG*n>vkbd20Ox9H?IM@0ltyQc9Xf6`0nNlTZMcJ}V zc5B*w4X#Jk&3&%RKGR}(4RAebU$?>Hb`NL3etwz3y&r4Y4O<3er)j% zzW}ennqRHNTZ}ckP5_#5{)(Y3nSQSOWFY0fKS=w!n64G;$J~fY8c?*B#CaeU$+p}e zB5g@`RbPN0cIziAQ7c8WKa>kO>cVbP!PB=9P}vU2i)~1lHt^ zauPjs%>m*w?RNVWRP*-P4R?`;{~os1ihC>8&^W6Fz708Vp_r;mh=J-fQu8O#!+YAk zRvylq6l49k8&NSB@iEUHAWqeBpkE)wxKl1--8q3L+}r9uGOJ46l~}Cg?t0$Nz~2;j zYbp9+3%}g%ob!hRdXMIZx5av=p)^fIx+!(ZplgnGgRYlG(Q?eL;38djiKr9qoe(uZ z!@a5hur>54%Cy>*AQu5d<~E`0p0=;s#rg>+x=(6eNx3=T))Ot)`k3Aq<@LM7n*GJ- zV{q@MJhKMw?MUV}TF~vB7;bmjzwh=n(jmzY=Y$10oxuiJ;o){EO2Hz|ZdmU`EIDeU z!NzB}Qv8bQ+>b)nuI#_=oQZwR{;E7#d;Mu@Rkho5L&C#brc^91`Cu55q|HGpux`SL zRQbEhHFtOg8+p2s66WNb6q3D5} z22RncfD&iW^-L$kD-PUziUo-lr#6ND>W_U7aC$fqgkYyg%x6|Rv&39!-2g2bz|6?x zaN>-(7V%eb9+utdjP7kuoaAUrj?r1^Ni9dp?tu|!s7-O%l_S;o;pFNV>6U#Brkw2# zK&|#)-wK`Dl8+DgQX*q>7;i23xAC6{*1YF7Uuqz5O|*+ws&FHoL$zUcb=?zrPx2Fd zJZu*bT`ShMP=gRGzr7giq%?%0T#5V9R&D|4YM1k8U9|2Uu7lu%oY%PS%1BCg-eXI1 zQycb^?4k-}XN{HD0y=uQBn))z{A>A?EpOF!|MfH@4$phyG=Ypq!+147NAWIMgzaO! zz)1P5xuGp6oe}kHYvi#WE-0*%AKMYfrX~!?((o|T4#`PF9#vT=`azrsclYCBSUC$_ zb8lcbSfyk?`|T;&X9qD(hcJDgiewC;7Xe?l;@5nNfCZ0A_FogLVxOi^dK|+j9!|vz z0M72emXmEez#4gdTVM}ZPnSa14`gHfW(R@`h^Uo{gs7N2xHs_#;X2%zDp)SuDfMlL)WeLU*E(-95J0JfyH8A|249BQ#wODnnHgaVJ&*NF9)XI7E68p z`_tjt3y-c_Va+;+oWYa=j1*(kdW>4d(JF5)j;2jEVQ;nZA93UaE2<(xCSVQ8aB3KU zQvaO!r0yJ~guq2=3thWra^Svq`+A0`SQJr_^LN;PU17{4zK>&MXB2JkR9>?%W_yK` zK4zoN1){%QP;?C;<9|qq`h1|}uy`t}p}C>lf-(v%^^>uhv1;!&E@zhAWk@k{P>`5C z3|Qt9aSXUK;?xaLdJwPxI1X|q#~Hh_9?IWy{CbLPwD+KH4qAd~pb9SFq+s9QC~2$2 zDBIV~@TJT&9IEbVO$LsNc*<5dywI?Qv}p-NL&YssRRv}2Q&6U^GG%WmqfH@wL?oD^ z7eUUqNs6W%L}i+E#(S)$?KIoL&tglq(@aV7@C@V~ZiRd4l%cjbBfbllVN2 zM-jEnlgj+8y=BC$TqzsgQo^yd%?1A{H`sk*c1`tUac=a)rnsQ6wrZGYU+`^EewuSy zZEaOlZk$dOAK2|hg!P~Bqetwlk|+qu2tH0rVYb=-u81>xbL~lFP&YSFtBP6W2Ci|P zJxplHaWK6Bx?A?O-0z=fU!w-xV$k;-PS4@_*mscj8sA6$+PIZ}(Z23z0fY4sV~)0* z<9XOxRg}A=E-sbNw*~PUYrvx0aJ&T+J=fNkEBB=?T;UwCP>PUnpw$eHGw|iy6OPh= zmgffnME3x!fCDw8jHJ}W?yh}}$BZ>|M=W-n);F6GaD1u*(?C*CVw$x?zV`#rX%teS zy(7B5XkRPeent-Llk<528ggckqqLzBoKefD6c?x9&-aF+^pey8pq%}OF?ClgYAtFQ zy7w({cr7MXBnB5p+d%0Yjzd|JC&LVtLbn#qeHO<~evsD7gy9w|2@u2g(4wC>v1(6yNA zDQcQwuuFZjnPD2bp5h1Sew>KS*DX$`SXUcTk&Rom&%-a;*Ps9o7h&z1gB;Etcw2p! z1cOKPs1eVdg|tnJV+4B{g5roP2o2pE>C6#$%s} zrE3rhj(5m)wE<1H>}$SG&$$L}d5t*Ddb`CHy4J(X?#@WQ_o_Hrg?pq^y1r;%s|&P> zgSLHlOX!kdAbv1wL&1t?M{)$S9#l6chM-WYT_~M1Oc9iL#sIe>Bj=Nr`=XZLAG_k& zD9Jv-`pIOfMAH+LZIlG+mIBeN5QQ6N4t%I;0NT+wA_Gf}+`hI2w}}TmvlsG3@TfOGt;=HwYpOW^#(jA{B?`X7g}!f zg-FC=>SlU!g!E*1vhP4XoVmcPl5a4>_;Xx2v3G{8(@x-$`w`6#Sqpc4;BO6rEzG&= zZYS{M5lobx7@3soH`14P$G(OV`CjN+Pv!z>_yG3xbi;7~B44KXa@uUUCmt1iDWFV3 zc)M7CRP1ZTr4@YY0BPHU9Xyk>Y!2G926TpZp$Xe0UM9cF@%G53c&`Tan-GQ*F0*+B z@Lm+!xi0Kf4u-y!GsHa?PY7NM;KrJUuF1nkC4+|pG3pQyuY{mHXQSus@JX!~pG>Qz zmHby%9kkhX`MLD;_W=OIB{QTuPT=U)?#-XQYA$0yJ(*8IAU zMEn|*A;7L?tv14<2;nm7&J9SkDYz((WW&%AkJMv+y^OlquQ ziaj7>iWQ46a3nQC7Pv)NTUveujmVKq(M_HMAy;}HXeP^2xrYL+*V=c>zJ{n_DNwH3 z*SDoaKb++gKEpRF@l%c*y^0l>i;yE2i8b;9?PL8>v9FT}mgv>t%Pd1o@uHk>gxCF7X4aMU|I zagRLcaKNZp?HVH2BnA^BBh8Gw1>P-rRejI4So4ss+t=kbQ9%pF@&eE`hZ@sYm;e^U zd0SX~(@Rqr0>q=&VKzEJM_7MU?CWF#i?J>qEWT!vk&iU6e%d8?;XP-(7i`b6KOCpg zVYZa!pv^^@xZFx!fTlh(-0}{40G1xsjFS`2i2?>X3o?>Fzc4M<4LJ#%1NfM4p7hKH z&mof#){T>d#KKmu0njR9lJ&_&x9n@BYiPM}pm0XQk;Jc|>-k1>!isDLx}H%Yr|Inq zLd(k9r|XZReVxoFTwR+@C(xt<=^5l6W|i$WY{YoR__U|(VS-dqehNJ~ok7|z$fO{U zsc8vMaBMnrn4AO7I9ruj0CPR@buWlRAbup4{P~qspFlu|E{6ba_Fbyqz`X&QuhSRP zZ`T)S7i(5d*X?ViYjT+Y9k_*}Q)2fiUC;MJUVd6Gg06{2^V2$~>yMm$%`_H6Ou(XT zL+Ju^xHnD=E&sBUa4jBb$6FiANo2$epkjc&5-uGJ+|xoikbRat_8q1za@pZ*S+gMY zxPN)<-$$LObhLu)5^=E6cX7FJ9IXPa6s>QStTfP1u;zmQYU{|3Zg(8Ua*HeHYN>sV z`yJU${2Ch{c|9AoEefwf8&AnKNivcEtGRuNa}2&l*`9Na-iX-+bz=??zb3ebjxo>3SzR{< z2J@eI^d|A=Q?jgm9{y3WuZyuxh`JRyGtcKY7obTKA|DL5wrD2ci@N1X_6Uc}3f!K< z2z-(pkI4>)**WEQ=R1)sD4LI;pM&xmIl&O$sk1xf?Zmz2iKSd=ThYSn2G&Riq&7He z4@I*8Xl=(8Yt~*X`x>n8G%mjg`xQJu8)d+-7eN3i#S$lI$%v{ zoqulL=LH%Kr=tg-Yj2q8)~i3hR|H{Jh8c;7fCNc#YHqf zV1vR>_%0^ZHct}8C2hDRXE<4M#S2UaRakdK*8qCazGiYdY6;e@gmp5v+yF;KdLlzP zNqLnpUVi~VhoV-^55#t+b_6_-ym}~_Y+K+aSql@D1Op(Z!QLTfT%Gbko`8qh6QFUQ zk|kb1nGlJiX{7}=0(()olb2Df^_>$wpZv6o_H{B9om?=73D!EXRkEejD9R{HY>h-c zULAV4E`fDkED>kIkuz+l0?_X;ZiPgm)8$|qOZBJOHiQ8)L;=GJ1LY;gSw+gX=Ti@X z+;2p)kTWUbj-V_+TdWfalF)U#SSPDA`CYuyMf*CLjdm{-=mcvnxNTp{mUa|l_C-Dx zI4cA50Df##n%G5~uf{zh)a}Pe;d_lu3JP;@?0e%9#@Px1QNyuU+cY8e=@1q~5O9E9mGAQ{ z`)#HQK8i!U7Z$(y&m;7c#s*KMaoM_K{R#Ojoiw-4#Tw*h*oM_Lz0x04J; zG>VvonU)s+;q09F71dszB@EoT%a`Q*dxI?fePIrIU+9LUppaC#)sdZUJQi;!CNpN# z`S=#YU9j=Hg|hyfcI{{swsyxaH2YeyE*6W7z#Cz(+e3ey?<{jgXGYm(^Tl+}%<$x- zU?`Ws5X^jL6k&ee97qg$vL}W6IC~W0y4TCzX`Cf~$qEx%T5eIZ5z3Z?54U6+s_|Z| zfGNbf>U80OV=>d_x}&9AexcddHuj_uDCVkdYc){``7n+q2Fg;6#B(V-v(z^WY;iUy z6lEK%X9k4)u%^iX!Nug_bRsl~yXhv^xy5l2m#Al?@v}Tun)p!@ZE_{4fV0#^E+;@c zBoE`Ok!-_aO}nF4Z3T4aShuyKSpc-Q zHD2Zdvac=Hm3GsCV13StA=F;L zTG=DBN|gW_a8!jMKEUm^K<<*1RL!03lA&SBLkF5A>L<)O3=wb$z8f9qmQXg(vC#%L zerF&NKnVE}>jc|i^A@UH$^OECs*y1FdquG83joH#D|K=IHAcioI)06;xc^$|nw9(!jb9hAhP17RS>aY?hTb;e z+vL8oDU!Cu@$qlKftSUSDzG4xhBPQ~kH!Lj!(pO<$lL9?;kO4dRE$mz(_RwF0q$$F zWh@fP;6LGshn$io)TF|EuJi?K78tGT9QeK8$;)3j_BCjN?|IFp}rgn{D+gQ5xS5}#US0zS1qRf3G(nk`+& zM$0G-(CA|@a8ibnJS7l+?+AAN3GLd^ymq_e9|QZkSgjT44f~p1_6`%AqNp|D=C#II zZJd?RvW+_vtDS*96G%Bt;>)mWwkV1*;)qE#D-b&xipI#g(+O~RKI%x(fGt6ayt18f z7G-Qtl-}v!^OSGFTcRNez8Vef1ID`iLb9&`8U;*^R-`k*R&e!>$QEP?!R$ zgggl%!;Jy4+-`BjfP!^H(Ev@gnW=W(_$xkbC&{IPwdZ!7D&PB^U=0-`wPEJkL(vSjJI*~HY5N*{Ng8?9W{=c} zCg$&Pf~_uzJ>hEOqG>;9BhGiYF0?$8aC1u@4smDby4;r_1^D&2|GHo zV8yXyc+Rrfu(zb+>nSPYdjMULjv1eqP671YegMk&!O+i_U^u(}S}%Ok4>%?gi4O@| z_qFzgIE5++t-w;mTMhQ;e__iPj(u&}DLdK%^vYd!NhCAn*$;*#uD z&~+#q67h_|z~^T(F!qO1F;>-L+xYAgXzb(__`Wo<3#^5ngeufI12dtu3wMtq+xFqm zH9zD6v9D2(wt3-tC%~9elowbEMdr?Psrn)n-eBExawRxP%A**jJ>8c&5^OXE=*3yd z?p_%N%WMuX8`dZsLG}m%kwn4X-x74z3wlMl-M%dxJvstiUpV$PDmNKEOI;6z8T$y} zP_B@?geTCb$pmBB&r4_N5o(Aw3JWkkFO&)-?9||X>P0NacJ^F$Fv$@`Y`d^}b+vVj z;Q0hxd~w<=(4Aq;0_ah2TRps8JNn~lUqgm)Y)oeGMGc#Y4kpbZ{s@1AuJLK3d*2zz zwwn2FYOZmxrz-H6g_164=;GW^J-Nw1e_iteHg=;?PIqYg-0YJ#S4>}mq ze4Xp-I%y@BJ6LI!dw;N;S>L29eUIAL9NYuS+CWGBgqS>Fjq{-*uxSsm=(_iXoSzHI zp}eyu64?CMLxuE=0@f{X7h&z0r(IbO%1dFY&=fvr0D{@Va@V9nXc;D~2m=8@v+{2Qw9|CzHYHJm9Edj8tn+R z@b`ftlb0I}6eR~k>O&Lnlj>a@UZo90gzP`1{Spdjjym7A&~3Ew8`!w*oO02);a zg=$e+^0ZO0;M=HM07|JD^lhS406jI7x}D{&%U^j7vbEtki{S>2hvO9Y=DVKT-u6Kz zyhrV8bsyQyJ}xu@X&Vh)t2ptZ@X;7)k(*(IhnM%Z@XQDIlI@>w{IKY&9WA3Q57Vc`KAR z$ayV>vlHy_sL%HC!Mf+|Yk>yD>5H+ZJ^&i;9a(GUWMkCb9e!pX!2$@gCB6(dws03K zX7ZdCtR=)u2ofg-5ktHgxHWKYfD}|o13O$F0F4_2h&5RV_sEsRsh$dW2*YhIT={YYWRRtc5qbFPF z`uAepLexG*JEb(M=RfI%j}yOeeVmrKE)mdBG|tR&v6sc|iIWpoCk{_>d!}TEI26sd z-yaK;U+M%fe2GO$rHioAiO?K~j8uuT{V@TWAJU`t^#Sqo3#SEf@mb+za**9}FvLUF z@L@kPY@DKPc&@fOG2_a^m7;k)Yf_!#-gf@w<8mj}S;-r5{AI59i17(PEHuu&7G)SR z+v3U*Pmu&H2wMO&Aq{J;tdUr=x6x24iUsL&YV$!8QmTlT|CnK2 z-jnt$gSfK(9)-YSb zhz~kw^$t1}3kDUMP$L0HOecbmJei0ye1o7Qpkq=^qd1r=R@L3cfdf41`s<8`T&{G8 zh6D!$XmSf3TD4%!D*gD-HCXqYea*Z<&Zx4AweoPKYgC{Lha^42x08H(hXdA}WC4y$ zviK;p)rc`ga0iiRk{>E*tR&k zRF3xZ5c+JHVY%uSSFN{3${%n;(Wqpk0+h; zXi*Q){4x3{Wq>=E25En6=(%(rK+*|chATz%jc-%HPc|m1O(vPG}jv zXmt8P{tM}W3+cN%(%BWbQnMv|c9m7DAZm;?rDzg&SvHhU$Cx6a7fB7!{5mqaQPoKL z73u7GWE^2k(a7@$Xe6>_+65&LpwSi*tU>%^M%Sn=Jr}=bGC>Wh;R4`b>6H9}t{=Ac zH6AmdDKC@qS*yY{?i5sOb)~`tkngB-9A1M{`f)c{EPk*II@pqQ7CObGnrSsLSTyf1 zRGgLa>1f@IkggBC12h7fPr(65>3@ndJ?;DGS^~#PN%NB?#G3>xit>s-PFVM}eGS!s zvXz4c!Tp>OMF<`~&z=)ULCZ<7@l1%%3UAd$FQDp(Ha1E;<$Ii!ygCQ~Ymx6m#rLNr zPn%P-S)%yC0F*!^*Hrw2u4h_1x|~hWECy@Jv0np@u`Mm7U}LV-ZGoj z!@eil<1V?@t|ak#?!&%Ih-xHxQdQD)eUu@#&GZ13k&Ql{0BBWBnGyDyBiWC842fVNajXa+ryy%1U((D;jdzo_9;uw+Q zZw5;lHqHppmxrj_T#Hr@hv%7#JhLirANSq$z9aR)iu1vUh@oABX4;3Y|AXZdlK z?}hP>Al`y4@1=2})R^#@Aj4cCYm_e~6H9!Sv+$C}e|5sSA-Pi*cJW6vs#|<>a*uwn zZGXgMh)=eLzcDHOTk*o~08g${cSi6Nq z2oSKlp34uXCMPq7T8r8Pz2E`k8^zz{_-h>RVNU?ny4f@Bfq>->nO*K2M`BWQd{MVJ z5DKvb3UT5O(M2v2nKYru z><&@J%zt!nlyN{tiN-!wdC}uuyd~Fng>hCG58vsUD6`!2m-`+EnXUFb)OhxWP>qnr zmU(*q%OHQ^25w94WJK@huiErZy;=X-_MYTsE>_ua+qzV032ICjEZYx7NK@{M)*-~3YgQ^)dW>ufud&({@Nb6s9r z;ZOF4WU%dR$)7sE;Au@Ax4Kh#n%;2wME;k*$k*5B-#(H5e}7R^GUyq<!Y$!Q=$&ibI!7TX*f_^|GlCrFP~b(J_wAWAo}pL`W#y2+S|^|1OSAbBazTT= zY((o$xm$AnmbAxh%ZIn{VVc?xE+JJGIyQ+xE#lJgq6;*qm=@ZqqlNJr}?3 zoURx9K6K4-V^A*V%0bserhs*>FaEAOZ6QZC-3ViMT<)ay$PAW8D$O-{EC7u;CaKy* z#k4IUQ~ZQe3kyG45m&6ae#sTB>|h*IGoi+bHkXv;PoJo(KX$s|RAavB*y-cP&z#@_ z+)p;t);BlhoAddzMGZP@)r$YB*Lp+S@#2w|d(O)Gu~glr|Lw`sr_Qka3V&rSat*s@ zAb+Nos?ICn(s4#q%3O)cEPkLKoDJ4(>AFYlYv`*Zx<+2(Jh|Hya7n_4u8BrL#c0>i zFZMDE;I>e*wb_w@x{kYy_MnyWtD<-j-mox!+$KM$P*!%$k3A|oG4alw!e(fy4x+z*EtbBS?ByTLFg8semenL-<3QmtC@ zC%s7is{iG)ty-(wxSx@>{V)@aiOMd|4dkzbj5ok|w~m}p_p5hKHJ&~TBdR|$Kb2k= zW$_zqlllNM&-_LpR;-zaw(`2XC+%xuRUKhX;Fw4R$}`2^fLl)pBEHN)MN&Z>8Ewz{ z#HI#lNEk(q`yWQ9a=gbVOyLFiPC5SzhHN!_n~-mT=9G8gSF{d1a_phD+o%gD z^XrNmB+PGAlyNes`N>5kUUA2vIyVp8=)@2CF|&sdJl$B|)X-4o1wz`!A8X9jP6Tyx zaj63t8c-hZ`(un5=epoXyByIoV1QnawfFE>?x%5abtc1~h8qLKSCr(q7#~OU4DvL+ zbCTyz5Q>(M+}x+{I3P}E^uJtlp)WAearHW1hxUi+hm}zOh@aYSLQ*&|yEs0EwGGyw z4BS>RlYK5kj*7AFRrWP9no}^y4I_a8sm(DcF!|M~7>c$)3tz&0gae8n^`dc~m+Jz= zfU8ZHvG5a1%j!^4tU;3yX?C1vMi?_86<*)J<~K7J6V;F=ixxy}4f>5S-kv4=~--w`@Y-UX@D& z?q%t42>1qYa&yCgzI>#71YE-0)Tfl5XEJ_OAHLCCo=b86HT{GG@Tsw(J24ycb(2cc z^jzmL#1J=Vj%VsudMVN%?OyT%*1!$Q%nWnFB(%kPDq3zRiMwn^rPtsl3!vR`WGIrf z>*sTIu7|g^uc!N@4{>0(UygLnNI3GbY-WXSmy=`Dg`)Krv3e811Ua`tS%Frp!8d`M zapX1X8G|GnSDA2)8|9nCl5J=_)6`I(_5G|d108fBGt!U1$U+d)bA3tR40R2E()PuJ z`;Km0_mAKG=0Cpns&%~7E7@L|i@D(bLH5oODgUd_)?j;mzGmMLPX>9~b^S{xrK3w& z1D@PDI&?4b&2Yzli)SYF$qcnm7~#suNMCxc#c)@wPuH*ZsAU?GY!3scF$2s4D666Z z)@^xsud=TZC`fPw^zyWv_si>l@<$^}Q={Pc4ygOkU9 z1=ixFX{deXz@Cx)N_pl0*IW{N6SDTZN=x|0n}!adzub<%@P)23LeZ0QS)uDpS{x}Y zbiKk)ZI$dhv{SFjk-U0-k#cenXEspGfSW;`7JBHY_t@9yMrQ&Z1*mo~ZQBbHqoj-FLprJd+ zO;Gj&W**>5T{AEpr%>RJ9&V_`?a}ndfA|Nxwr}3Cb>oiB8~E=({`4o$RPOB;`XE?F zbIh=kEcgH2|M}xr|NKu6AKHJgrut0Xsca@XSiSenZ@wT)n0r<9d2+jfDn5ysmz6Ktw)7O+|;HavDMkX2nzhG!4*UgElea9M-+c zzD7Ee?=5c3FalzZ8Qld9`oTWgCLmZ>*&{Ge>~~RI-H{$Bq1IyR=JzsKya4nDe*Qtb zJg7&y-ZxKqL^cD$ZQ^YPYv{DOaa=BQiR)aRNh3*bC@Dc+Pt2B1>^pGd;-#XhpJAT! z&sJ6s&g5w01`QbyrTV$S@Kly1G0=F!-0-S?gIFz}-CKg)J}z3?;p_UG%*=1YMV5D&hs>)#}8K-XGy!Y->m#y+1D^zJ)f)G@uo=Fkv-`S-mRO-;q)DP^1Yw5 z^eDX4W_Lh|yb1q>xA2Cj!AnrHQNSEY`lZdWsk~dfaKFdq8pzh$BjG%+$^u=CHF*U9 zz1{W-Yb&hV0?iFf0`EZNdW&zK2*k6x%L!J2HPHvKZakfDI6c%84QiZmMxlWDKGZbC zxcPUEf9258mv-&TpROO`N5D$c3-BFed==l9rb|Hi%Td5ZBES3IY4B_+HQK=js8EU*Q?>q4G*Wb*aY5JEpe)z>b)k83%qbxnrd6@C& zM;hTRqfKP{Fn`7Z-GcRFEm)JlqsMD18%Jc*_{loq0)cH{4RETAX%D3{*zWjLYX#rJ z{WdXxqvWaTn1*-=a0TqTs=rnKDdM~ZRh2Cyb$kVpZ#8FA{zt!{R<;D&4(Us3|T zSB05tGGZkSa&ccYed@r$!C~}wZ@%^U12u5n(Wwk-+oZC7AUiIV9TTPL!S4EDBc9&0 zC4Zv!%g;RjnS+PF^T%HY-@WTMj_Wt@xxM?iuGzZnx>2KH@}o=3`n%r9OnQj#jg67l z&dXbN<{Nm6{BxVOj*SKGi6wn`{tW|%f$|mEKD^A-p`&Kni3KM=x*890FC8~HqH^Bw~7ugXKPMjla#~$M>#2SZXC@-iw+|4 zHYo-L)=G3>gg{}Ec`Fv-QzRNm#!cR(D#7FbcJH0WkeI5B!S zA&-;wC|XTGb_p|_?L*I0|NUEUzFc!4W6T$yIfA7F&?6&J&Mn0W^&xG!?eem+uhi7! zPaOZhUVjZPz4@`V*hDWMKEel|hN5wK(~h5@KmO1E^QHY&XnHxUs$qk`eXwyy1u@?{ zB8Wb-xAH$f|00a~tv~+Si@WwrC=RpszYCDjVLASwhcPZoeA0HFpKsv30K?l`cL8A8IqoV1u}cc!Hrdf|9( zQiB-JN=cdf(`h8{vM9aAhET1b6uJg$R0!S*xHocqvjrNt%&YG6eO?CE{k~w@(L*}H zT3lz%4S2$@$@Q6Fg0aS*JZe<_x9^mKLP_?GKmFQQo;f-uC-e)lqrz}PHaiN}N*GS+ z)8~!<@?S98zI3Pt7Jay~>U*!fe(A_j`}geq+n@Zkgig+!X*_;B-;AiGHRVsAqJRBQ zzjk=f4nQB|`on@~fN|jM!@`*U%E3cnAV2=|zX0@~{pL)COAOtz z@jAg8JsiIoiSd9_ z*$mhP#<(on-MdepI(4?L{=_>3#KD_5Xyb`@-WF|N)cz*9fMw?!KYg$U>K;?phjlU} zmG18cT(H0f`oRF>{`8es|Mt~y!^XjyR;-&T*1Gix-G;e^s3By?S@m$8w4+WyGUu~~ z1Db`d6N*-M3eYQEw;cyu=o&z8%Lv5mYX*9lIXx+V_`8&@Ii6eTdbNn@0@fsO9EJ=piaF@Lt{=%!6K zjvNWT6H80!uj=3bA6|Qn;Mg(eq5uMdHe5o@4S7M$YfLF z(+3ay_rL!e0b0B_5}G`F>X^jIo16dQkN)V;o;`z0O8P|6@Uk-2Oqp?51D~rt@clpj z+Vum6Toz|83)6zNT_Nb<*j)HX)o+H!Smy^?hO%tJp%`2=yiYZDgnNLsTlO`uQmgYu z7=BvzFOwg_h|)Fknq>f`L)Q<5F?3A=zhZ55;DUOlaI3<=b)sUa67{}d+R;Ng!TK~g zNcl!67pw_h(1YWVty@NA(!+iK?_YoY3zd~XJT9H4|LmSU{IzD?x_&5Hx$Gd%1(#3P z9Qf9s{MR$JwKg~*kesQnKYsG$m%s9*%DsCa?LN7z?+D@l_^metYm$q&3&u`}&C-7D zvENm0-~Q5(BUoo6O2vmG%dDxHZydr`2l1JI{{P5ekxyBy@teV)H7=kWo8DfCwWU7N zT@*UT`ZnHHF_$DKQ{jf90S;9Sg{|FjbnGdPuxs`&3)M#GAYxW+n?yOEU>W&cX`gkW;+fY~2$S6h73LZWoNac?o ze{uJ&aoH?WExfv^>FNOkxXzzG{qygCe^eX;G!h&*fcwiwkEkqeZfa7ZZajPTt?z%| zpoW!XtM=_}I9(gLPXAnbSl?1SGhcZ2X#OM_CUwoHVdl+^XW;E*A|TMwzG%&RHf#Xy zqdRsg)+60u@~}%_FXSu<)(t|}iZ%S1rkSWvF%4%LJ{DrWQiUK&Jr;&!H7rG`?xuas z!a(b$$LyMp?6$_&t&RbDPId-pMrKPC(qZTOqsWmW9TQAz{U+b z*FGk2HQ2Q74s1eC^v12i5CnCc2Y;AENmeeYh5 z;l@yUSN3(eCpI;S1i}G08J3iOdyqHFpd5#`t-}4FadCnnGFlkRIg=T<6?b}N-Q1%p z+=qoVx*1qsnkxlmwYjeB*AEa!2jb1RERz}Oc~JD1s;i-NfF4_t1F!t?WBK~J|NS$c zhKFC;uP>=V!1dhWrvbNrY1yBB?d$xvYWJ>4U}`FL+|i{ad=~xyc2}2`;_ZCt@Zs%S zx4iYeHxjIst_ALsr@;Ei=B?Kb8OHtNBjmLR{se2}HL(wycJAX6--9PPNO1_S(0R(Sn`ty|8;1t1##2ZrChlweq za!~YrepCV6uAE=M#SDx4`(j4L8^Xg_ip}s)zBe8_Trx1O#5Gd>zjZ3-S2SmGHP~R z-Pla#gZ>&4b}>jq}CunkOR+-`7;%Use?%#E=`Sg@+zeC3t?vBc3Z zxM1~_n>QoVN0yecmaLlv%i3jyz+O(U1McDJ)H6GG@Lzo96Uxfa z+^#4qdr8)SYFN@Y)YY9hc5Ls?9hopVd-CM4Om=ACvv|Oo<#c@%j~7b!l)Xd6pMmqA zZ5|j#gX7e&lyC|D3O~8Bqz|cUS7b_A2}lJSfjvVJCrXG&#e2tlGzi$R498w*6RH=) zl0QE?%)q^Ga~SvL8c~>KFpwQm>LAs+*(`u|$II>3xpwVqo-j4=pzAv_Y1qX=o7_uc zFxfs>SlSfvVz_$`*0sdB@=XJa?CasKJJ697lwqC+MKklCKX~A0-+3L!DSmH=j*%+{ z4de#k00oxEk&PRH7(E;(3Yed)t)>6m=RfOOk{p;8__+DI-RXP%V7YPEFwb_Q zQw7JYqc2%ES4AirD<=DFoARawAzR_5*l=@s_v~wjHIvxaED5!**#ynFSY9k4Uv^)T zN`&lKP7PSyRwhaNLfr}6ogmVqf7*u+r&XNmti-v%y7t6xiC2;s3win`O3fc@5kt8z`}EJOnq+I&8p}qBKQ<+a@y*qmitJ^9B0*{@+R)>BHebowTDG z(`>;S9zHgcLo2%`%8oP66*(KrE-isMk79Q~CNswR%0}i&`nukTTuDFAr}5ump{$CV z$Bf^*?kO-u1+P2X$o?QMNJQSXduN8|Npo|bARxLi*!9P!vZIW5MU)xmdOQ|nYgj_8 zndT;>_7y{i@HD<_jOR~GrCAS?GLmn`opx#QRGeo`R}146!}!@mx9-2)I7@AinlrGZkdfVz!#wY^fF{D4=!~`x0PAXtHJ;mI ztl39_KOCD2-3(+W8gDFgZS&2T>Z?1|d=~MM*@O1(`A&&rgU0;uO-A5g6#^q_OA9}xG{%nhJ6)AgZcZs=nCda9-9uHO$cUuZK=9y1O(Dgw9hc9RGszEH{Z zZn3EgSPSAkOxGP@t@3(YwgkGqUiM!&tiQ98hxB$4h1}}&jh{0OvT5hl>v;W@sHJ{?+UB90fAfF#+-9wH; z`Wa=)AZ>DHh^-T2#gVHS6d!;mJXu239q{mu=z3B>j*9t2Szj0_SpUPD-+Q653cttM z+FF4UJjpMjZ)j{jExZ31B;^R_cHQaPMp$mX`Q_)H?ZYnb=4SE`l&;B78)-aLYv_7X zX{i``>C};3JJ@|fZqk**hO#8a#W8e!RZ0}at6I@Dr4=k)-c|d5r@zk=Iv75!ct3khLp3{O{iQ?#l;jgibBl62a7j1Tm=Vpl-s;sNt5P zVdMZ@U$=MbR@Me|jUWa@+E5#}O6VH<9lE}3Kz~9Z+yh->*CR465uf?_bj^M)mDk6Q zUt3xVT~ntKiL7)zClWFwjRd%y8u8746+Tu1H*^xeM#Ojbe$26Q2k(tg z_Yycc9&+PXnLq_^bcz8`n;pC|Fy0jW=wF7eLn|j7O@;7%!Zd%fT*)ngOxu;bZ%hVc(6% zt5!tU;9k(fVH+&4rlwJNS;H8Us=}5aKs|$9lluqI6dREo1Dl6X;fIhmsPR{*n+u>< znxzL&2H%%)9!udewp8;>woxyzdKw3el7vrE9B@P3G#h9CAb^HlbVAqd>fxZwHc9A< z*~U2f>1*G9uDUuf=JY9QS_tVrym5Ge@s1~C?z*Cfi-|41xrtG96*L=2 zL7|zp&2TLVx0qduBM^fEXo5IBg9*@#13iQ9%QzfEc2c`$nlH?pIyMj40z~V?p&@&b z5ZskkRog463xr7AsvhR#9bv6>t@gFu6D{^N_!5d5*CH{AZv5@{-gtihe*D{tDOlUo zfqZ@QSzx7Q)r@sEk-n}FH^c@g{BhwNAzjDAJBsJ8Ef<3-Z z*&!lm*1jgZ0@l#=rJjFvoaWoFPG@+$1A86+P`f?Fj3R z^zgBkfujjSgG8Ty`06V)J9k3YcuFv-!1ouw{uOX5ffMXFTX%*SB|zum=*YnXO(Yjt z!Cj!o#>U<2o_evW`cJ<4A8Iyi!V~`dmMx#&wd=FhRm8BqbmVEMJE3d1bTM6z=-u`; ztBX@M&=n~OdovnZDpi3A=1bvOLSV@5f{%p=tP|i>BZ=k1!nz}QePt>I+*r79QL@Ya z?>FCg;lKf<>yxKWG}!Di7`O`T>dMN|!-oyX_JQEO^s)*P7Zaea`n#7 z|EDN&9ysbX}$OE#LQYG~#dV$>F@5o=TA7sfm^bLf!nHT1-P5fHXJ)vP^ZZDdz-i*=NjM8;3D9G!#fBkEKuHLg3h==zd zaB$CFkcDs8on-5-Q1qEPNfSMNruLoRzFk*;=8RH0p7MP2skh($ryu_WB^*uU*XvN6AyuHgo~(!NIJn~tOo&#Ui^nZS-P6p1-D7A9^M$Dw)^ z{G2`Yi0lNHp19};>vrvHrE6$P9Vr7{N98r*7`a?`>g1O{_jypx1YynIeLwsD4-wn{ z`t$!GC^w%~SP6rjwvKT$s=7vY;mQK2M~LT}tM=?hGruGZ$42b&5r{=nJBEA)upVjk zgw}LTCb?ucu{*5S+1CJio9m$^&Iv;38b|$gcyS{i&3rN$r;gOT!tQ?99(ebJgu`&3 zemGcnMAsA35^J86m7D=~@g#Kp!#BV8{E??i$O;RipS64UpQT4SyONE7q@ahiF~mluQ(Tar3^TEB;(#*tHUAy$xR}-Qb$mNC5OM>u*6zr^wY}pbr9+ww^lqiIJ?}4arnFmcQYLX;f!+4v~ zbuW_&22!PjLRF*TLbu)8tqC{3&gRYahM>! zM>#I`HI+1Y6Hq38O)q-5P&CV@H`>?TwZ~@|3A=MH+iXA&{5xRpL9h^#cU)|=b$&#} z!fjCoSInL;v(=FN5Q&i-8TP5SEwZ>_8e4TMvAy09Cs`Md>45$0DsDvxF&@~h!bWOzrwBph%a1d;o zKpII9Q>S!LDqT%NX}%faJPJ)D?#PMj>gkI!P4*LnJj-&N~cGNK+D{Twm@H?YvgsWj9;tk zwd?V2+t8l_8l|=CMqg zeoZP~03UFjcE{Pm#$s6KN_osxagOKAPnG7`HpM17DF=QYU5^WdmJyu@P+%egHEQ5M zq%GBd31|WFvF3)~)}KDvOa`iygFk(?;e?3hrenYRjm-*c+P!7tpps09O-iI<2GJ|F zgRzQ~Y{xpX$3!Vw`!3OSZ?>JbR`d92n^5*&_4vQz^ddt~f>zurS&kpXZ4Bw=nS0 z|EbALKPyv0%>-C392mbAl!d%zV!=h}8X6RS-ftkWNDA73UB;@=&mKJZjX(UupZ(}Z zKYsJg@BG=HA;kac+pqojwby_2&A-^cVLjCtUgk7pu*c$gDn@1o&Hs-ufZmi}+|e4rd^=iuy+_2o}}cFvYi^n4w3( zgdt2MW+JbzEE9P>W#Hhkc% zvtT)BU5{wd!y!8Ka4k4YvdVZPRL=rHKZpI=UeXv?4BTd0 zAvF|Ofta3lUBCYHDvM#);HwQ5&GSdv|7x#v%^){u4=r=8bj@FTxqS_+Om718R7>fK zb=z^U=7w7YGKEk2DV!8w_ZlSQl%5893d`GZ*t=V9*xtgrl75=;r%G)Q=(_c|{MC2i z8x?&^uYxnA(%8<>H5+_RNy(aK?3zh_cFbUevq!18uhYrt+ z8&hgZ6SDvsq0_X~#~5xa05bw2qwT(I3g&RFd14ew;(DxcM~Po6;8WzT&_nM)qjU;A z0uZ;+tEJ2}^bRMdA7QT<=eq4UA7T8`Fv88E9$LZrlgGuBFJ z$qbo+4>Lb}DnN8I{~S-+Ev(g8Qsd^Oq*@xjba{@YbWY~t*J=JU%OH9F?U4XIFP1nO zN2xN--V;9CYMf=jjy8dK$N=d2uD<=QW&(dlSt{A1@y;)PF=NbF@EYz(rqG1`rDIF7 z!=jLFbW|S0z9tKlYjkp|Q8B{x@Q^Ze&Lwf0v?7Ypku(TB0v|n4Lb)UuU?zk9m@wp; z9t08JB=)0|54Gc5w;gBK=O7C=J$4_TnlotfHB8ZYB~E&zpb(X#+#+@5HEXFA87z%BP1(F)p*b3dEW zri9MTp$8}D9(Fw0;Br#~_O;Nf5RbUFWA=}{q5`1E|P4#%xx zrX1kTj3mahB>4F(4}sn;m1JD#-IGEesDJQ>d$Oe<&Xm6MZ~r1m1xzDnqhV@G(Pq3N zpigxv%$$ZoK8b`Lq~27aZ##}bL|QMmffTn<3WHv+>2(}uEaUWy&~rZ-2=p>y$MxE# zI>;a;S%6p@ck+_FLsJuh^=Tz#{1zx;ZWw&%`Qb{}UC$?P_kLJ9K)cTtJ6sCNLFWbY&cr`3Ng8>G{-|+WOzIMO5JCw2^C#tt%MEBn)GZcX z*YnTOsQ_YDz?M?OK4KIwQXf&kcn;(3JjZe5`QiWH-nsN73Gg45B+$ROp@XvN%YMoe0B)%eIQ9e zq3?{rA^(l3@qrkBDCJR#j!Jf?peaTxbON8pQJzjkc_`(jgJG^QGO{is{|jZjL)C^G ze|@*Pg};8RR*}HJ?+;gOg__iuD@D{3_`oh*^z4}hP$-HvSPU>F-3HERJwNwf3*V&S zLZ^ICw{pJubbe|e1s{qg{{ZtUxB1{`)n`LKfj1#j!*Pytl9Rv289L8tmgF#3Yqh}s zkhUDxbq@WY;p9&Iu+C)KkWV<*^aCbg09?CLk53qOuuf`dXD^Ti%Kb2a&$SMOZCvQE z&GKbX058Me87t4SW<3n3p=J_pG>WoKqE#+IIg9`pB-<^uf%VQkuV1dv$?rFcV6JQP zzCCkcG*snmq$dKO_5N_xDGycStQ6Hx=F_~X%E#3&Zx_o)-E;#D>TU#vGev_X^xCd> zN?&qUuq0j2W4v_8yz1iC*SRT3b31>n*b1?z(Nl_`EFa4- zA2~$*HDc$XYLt|s8r6m6FMu4P{u+f^{7d&?7GDFG(%kp0PAwBSnph~d rol$?y>tq5a+IId8*GK&|{lVg89lr}H2aB(lXFkE=>*c}wQGfjjH_4@e diff --git a/metamod-source/hl2sdk-manifests/README.md b/metamod-source/hl2sdk-manifests/README.md deleted file mode 100644 index 257e8190..00000000 --- a/metamod-source/hl2sdk-manifests/README.md +++ /dev/null @@ -1,5 +0,0 @@ -hl2sdk-manifests ----------------- - -This repository contains SDK information and scripts that are shared between SourceMod and -Metamod:Source. diff --git a/metamod-source/hl2sdk-manifests/SdkHelpers.ambuild b/metamod-source/hl2sdk-manifests/SdkHelpers.ambuild deleted file mode 100644 index 092e950d..00000000 --- a/metamod-source/hl2sdk-manifests/SdkHelpers.ambuild +++ /dev/null @@ -1,212 +0,0 @@ -# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: -import json -import os - -class SdkTarget(object): - def __init__(self, sdk, cxx, protoc): - self.sdk = sdk - self.cxx = cxx - self.protoc = protoc - -class SdkHelpers(object): - def __init__(self): - self.sdks = {} - self.sdk_manifests = [] - self.sdk_filter = None - self.find_sdk_path = None - self.sdk_targets = [] - - # find_sdk_path must be set to use. - def findSdks(self, builder, cxx_list, sdk_list): - not_found = [] - sdk_remaining = set(sdk_list) - for sdk_name, sdk in SdkHelpers.getSdks(builder): - self.sdk_manifests.append(sdk) - # Skip SDKs that weren't specified or are not supported. - if not self.shouldFindSdk(sdk, sdk_list): - continue - # Skip SDKs that won't build on any targets. - if not SdkHelpers.sdkHasBuildTargets(sdk, cxx_list): - continue - - sdk_path = self.find_sdk_path(sdk_name) - if sdk_path is None: - if SdkHelpers.shouldRequireSdk(sdk_name, sdk_list): - raise Exception('Could not find a valid path for {0}'.format(sdk_name)) - not_found.append(sdk_name) - continue - - sdk_remaining.discard(sdk_name) - - sdk['path'] = sdk_path - self.sdks[sdk_name] = sdk - - for cxx in cxx_list: - if SdkHelpers.shouldBuildSdk(sdk, cxx): - protoc = None - rel_protoc_path = sdk[cxx.target.platform].get('protoc_path', None) - if rel_protoc_path: - protoc_path = os.path.join(sdk['path'], rel_protoc_path) - protoc = builder.DetectProtoc(path = protoc_path) - for path in sdk['include_paths']: - protoc.includes += [os.path.join(sdk['path'], path)] - self.sdk_targets += [SdkTarget(sdk, cxx, protoc)] - - if 'present' in sdk_list: - for sdk in not_found: - print('Warning: hl2sdk-{} was not found, and will not be included in build.'.format(sdk)) - elif len(sdk_remaining) and 'all' not in sdk_list: - for sdk in sdk_remaining: - print('Error: hl2sdk-{} was not found.'.format(sdk)) - raise Exception('Missing hl2sdks: {}'.format(','.join(sdk_remaining))) - - if not len(self.sdk_targets) and len(sdk_list): - raise Exception('No buildable SDKs were found, nothing to build.') - - @staticmethod - def shouldRequireSdk(sdk_name, sdk_list): - if 'all' in sdk_list: - return sdk_name != 'mock' - if sdk_name in sdk_list: - return True - return 'present' in sdk_list - - def shouldFindSdk(self, sdk, sdk_list): - # Remove SDKs that the project doesn't support. - if self.sdk_filter and not self.sdk_filter(sdk): - return False - if 'all' in sdk_list or 'present' in sdk_list: - return True - return sdk['name'] in sdk_list - - @staticmethod - def sdkHasBuildTargets(sdk, cxx_list): - for cxx in cxx_list: - if SdkHelpers.shouldBuildSdk(sdk, cxx): - return True - return False - - @staticmethod - def shouldBuildSdk(sdk, cxx): - if cxx.target.platform in sdk['platforms']: - if cxx.target.arch in sdk['platforms'][cxx.target.platform]: - return True - return False - - @staticmethod - def addLists(sdk, list_name, cxx): - result = SdkHelpers.getLists(sdk, list_name, cxx) - cxx_list = getattr(cxx, list_name) - cxx_list.extend(result) - - @staticmethod - def getLists(sdk, list_name, cxx): - result = SdkHelpers.getListsImpl(sdk, list_name, cxx) - if Project in sdk: - result += SdkHelpers.getListsImpl(sdk[Project], list_name, cxx) - return result - - @staticmethod - def getListsImpl(info, list_name, cxx): - result = [] - if cxx.target.platform in info: - platform_info = info[cxx.target.platform] - result += platform_info.get(list_name, []) - if cxx.target.arch in platform_info: - arch_info = platform_info[cxx.target.arch] - result += arch_info.get(list_name, []) - return result - - @staticmethod - def getSdks(builder): - sdk_manifest_dir = os.path.join(builder.sourcePath, 'hl2sdk-manifests', - 'manifests') - - out = [] - for sdk_manifest in os.listdir(sdk_manifest_dir): - sdk_name, _ = os.path.splitext(sdk_manifest) - sdk_manifest_path = os.path.join(sdk_manifest_dir, sdk_manifest) - with open(sdk_manifest_path, 'rt') as fp: - sdk = json.load(fp) - builder.AddConfigureFile(sdk_manifest_path) - out.append((sdk_name, sdk)) - return out - - @staticmethod - def configureCxx(context, binary, sdk): - cxx = binary.compiler - - # Includes/defines. - cxx.defines += ['SOURCE_ENGINE={}'.format(sdk['code'])] - - if sdk['name'] in ['sdk2013', 'bms', 'pvkii'] and cxx.like('gcc'): - # The 2013 SDK already has these in public/tier0/basetypes.h - rm_defines = [ - 'stricmp=strcasecmp', '_stricmp=strcasecmp', - '_snprintf=snprintf', '_vsnprintf=vsnprintf,' - ] - for rm_define in rm_defines: - if rm_define in cxx.defines: - cxx.defines.remove(rm_define) - - if cxx.family == 'msvc': - cxx.defines += ['COMPILER_MSVC'] - if cxx.target.arch == 'x86': - cxx.defines += ['COMPILER_MSVC32'] - elif cxx.target.arch == 'x86_64': - cxx.defines += ['COMPILER_MSVC64'] - - if cxx.version >= 1900: - cxx.linkflags += ['legacy_stdio_definitions.lib'] - else: - cxx.defines += ['COMPILER_GCC'] - - if cxx.target.arch == 'x86_64': - cxx.defines += ['X64BITS', 'PLATFORM_64BITS'] - - SdkHelpers.addLists(sdk, 'defines', cxx) - SdkHelpers.addLists(sdk, 'linkflags', cxx) - - for path in sdk['include_paths']: - cxx.cxxincludes += [os.path.join(sdk['path'], path)] - - # Link steps. - for lib in SdkHelpers.getLists(sdk, 'libs', cxx): - cxx.linkflags += [os.path.join(sdk['path'], lib)] - for lib in SdkHelpers.getLists(sdk, 'postlink_libs', cxx): - cxx.postlink += [os.path.join(sdk['path'], lib)] - - if cxx.target.platform == 'linux': - cxx.linkflags[0:0] = ['-lm'] - elif cxx.target.platform == 'mac': - cxx.linkflags.append('-liconv') - - dynamic_libs = SdkHelpers.getLists(sdk, 'dynamic_libs', cxx) - for library in dynamic_libs: - file_name = os.path.split(library)[1] - source_path = os.path.join(sdk['path'], library) - output_path = os.path.join(binary.localFolder, file_name) - - context.AddFolder(binary.localFolder) - output = context.AddSymlink(source_path, output_path) - - cxx.weaklinkdeps += [output] - cxx.linkflags[0:0] = [file_name] - - if cxx.target.platform == 'linux': - if sdk[cxx.target.platform]['uses_system_cxxlib']: - cxx.linkflags.remove('-static-libstdc++') - cxx.linkflags += ['-lstdc++'] - elif cxx.target.platform == 'mac': - if sdk[cxx.target.platform]['cxxlib'] == 'stdc++': - # Switch libc++ to libstdc++ for protobuf linkage. - cxx.cxxflags.remove('-stdlib=libc++') - cxx.linkflags.remove('-stdlib=libc++') - cxx.linkflags.remove('-lc++') - - cxx.cxxflags += ['-stdlib=libstdc++'] - cxx.linkflags += ['-stdlib=libstdc++'] - cxx.linkflags += ['-lstdc++'] - - -rvalue = SdkHelpers() diff --git a/metamod-source/hl2sdk-manifests/manifests/bgt.json b/metamod-source/hl2sdk-manifests/manifests/bgt.json deleted file mode 100644 index b599bd6d..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/bgt.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "bgt", - "env_var": "HL2SDK-BGT", - "extension": "2.bgt", - "code": 4, - "define": "BLOODYGOODTIME", - "platforms": { - "windows": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/blade.json b/metamod-source/hl2sdk-manifests/manifests/blade.json deleted file mode 100644 index ce33d849..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/blade.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "blade", - "env_var": "HL2SDKBLADE", - "extension": "2.blade", - "code": 19, - "define": "BLADE", - "steam": { - "app_id": 228780 - }, - "platforms": { - "windows": [ - "x86", - "x86_64" - ], - "linux": [ - "x86_64" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "metamod": { - "linux": { - "linkflags": [ - "-lstdc++" - ] - } - }, - "linux": { - "x86_64": { - "postlink_libs": [ - "lib/linux64/mathlib.a", - "lib/linux64/tier1.a", - "lib/linux64/interfaces.a" - ], - "dynamic_libs": [ - "lib/linux64/libtier0.so", - "lib/linux64/libvstdlib.so" - ] - }, - "defines": [ - "_GLIBCXX_USE_CXX11_ABI=0" - ], - "uses_system_cxxlib": true - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib", - "lib/public/interfaces.lib" - ] - }, - "x86_64": { - "libs": [ - "lib/public/win64/mathlib.lib", - "lib/public/win64/tier0.lib", - "lib/public/win64/tier1.lib", - "lib/public/win64/vstdlib.lib", - "lib/public/win64/interfaces.lib" - ] - }, - "defines": [ - "_GLIBCXX_USE_CXX11_ABI=0" - ] - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/bms.json b/metamod-source/hl2sdk-manifests/manifests/bms.json deleted file mode 100644 index d34111a9..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/bms.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "bms", - "env_var": "HL2SDKBMS", - "extension": "2.bms", - "code": 11, - "define": "BMS", - "platforms": { - "windows": [ - "x86" - ], - "linux": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/public/linux32/tier1.a", - "lib/public/linux32/mathlib.a" - ], - "dynamic_libs": [ - "lib/public/linux32/libtier0_srv.so", - "lib/public/linux32/libvstdlib_srv.so" - ] - }, - "uses_system_cxxlib": false - }, - "windows": { - "x86": { - "libs": [ - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib", - "lib/public/mathlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/contagion.json b/metamod-source/hl2sdk-manifests/manifests/contagion.json deleted file mode 100644 index f23b925f..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/contagion.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "contagion", - "env_var": "HL2SDKCONTAGION", - "extension": "2.contagion", - "code": 15, - "define": "CONTAGION", - "steam": { - "app_id": 238430, - "login_required": true - }, - "platforms": { - "windows": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/cs2.json b/metamod-source/hl2sdk-manifests/manifests/cs2.json deleted file mode 100644 index e839e6af..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/cs2.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "cs2", - "env_var": "HL2SDKCS2", - "extension": "2.cs2", - "code": 25, - "define": "CS2", - "platforms": { - "windows": [ - "x86_64" - ], - "linux": [ - "x86_64" - ] - }, - "source2": true, - "include_paths": [ - "thirdparty/protobuf-3.21.8/src", - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/entity2", - "public/game/server", - "game/shared", - "game/server", - "common" - ], - "linux": { - "x86_64": { - "postlink_libs": [ - "lib/linux64/mathlib.a", - "lib/linux64/tier1.a", - "lib/linux64/interfaces.a", - "lib/linux64/release/libprotobuf.a" - ], - "dynamic_libs": [ - "lib/linux64/libtier0.so" - ] - }, - "defines": [ - "_GLIBCXX_USE_CXX11_ABI=0" - ], - "uses_system_cxxlib": false, - "protoc_path": "devtools/bin/linux/protoc" - }, - "windows": { - "x86_64": { - "libs": [ - "lib/public/win64/2015/libprotobuf.lib", - "lib/public/win64/mathlib.lib", - "lib/public/win64/tier0.lib", - "lib/public/win64/tier1.lib", - "lib/public/win64/interfaces.lib" - ] - }, - "protoc_path": "devtools/bin/protoc.exe" - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/csgo.json b/metamod-source/hl2sdk-manifests/manifests/csgo.json deleted file mode 100644 index 47e85df4..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/csgo.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "name": "csgo", - "env_var": "HL2SDKCSGO", - "extension": "2.csgo", - "code": 23, - "define": "CSGO", - "steam": { - "app_id": 740, - "login_required": true - }, - "platforms": { - "windows": [ - "x86" - ], - "linux": [ - "x86", - "x86_64" - ], - "mac": [ - "x86_64" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "metamod": { - "linux": { - "linkflags": [ - "-lstdc++" - ] - } - }, - "linux": { - "x86": { - "postlink_libs": [ - "lib/linux/mathlib_i486.a", - "lib/linux/tier1_i486.a", - "lib/linux/interfaces_i486.a" - ], - "dynamic_libs": [ - "lib/linux/libtier0.so", - "lib/linux/libvstdlib.so" - ] - }, - "x86_64": { - "postlink_libs": [ - "lib/linux64/mathlib.a", - "lib/linux64/tier1.a", - "lib/linux64/interfaces.a" - ], - "dynamic_libs": [ - "lib/linux64/libtier0_client.so", - "lib/linux64/libvstdlib_client.so" - ] - }, - "defines": [ - "_GLIBCXX_USE_CXX11_ABI=0" - ], - "uses_system_cxxlib": true - }, - "mac": { - "x86_64": { - "postlink_libs": [ - "lib/osx64/mathlib.a", - "lib/osx64/tier1.a", - "lib/osx64/interfaces.a" - ], - "dynamic_libs": [ - "lib/osx64/libtier0.dylib", - "lib/osx64/libvstdlib.dylib" - ] - }, - "defines": [ - "_GLIBCXX_USE_CXX11_ABI=0" - ], - "cxxlib": "stdc++" - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib", - "lib/public/interfaces.lib" - ] - }, - "defines": [ - "_GLIBCXX_USE_CXX11_ABI=0" - ] - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/css.json b/metamod-source/hl2sdk-manifests/manifests/css.json deleted file mode 100644 index 975b77dc..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/css.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "css", - "env_var": "HL2SDKCSS", - "extension": "2.css", - "code": 6, - "define": "CSS", - "steam": { - "app_id": 232330 - }, - "platforms": { - "windows": [ - "x86" - ], - "linux": [ - "x86" - ], - "mac": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/linux/mathlib_i486.a", - "lib/linux/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/linux/libtier0_srv.so", - "lib/linux/libvstdlib_srv.so" - ] - }, - "uses_system_cxxlib": false - }, - "mac": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/mac/mathlib_i486.a", - "lib/mac/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/mac/libtier0.dylib", - "lib/mac/libvstdlib.dylib" - ] - }, - "cxxlib": "c++" - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/darkm.json b/metamod-source/hl2sdk-manifests/manifests/darkm.json deleted file mode 100644 index 4034157b..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/darkm.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "darkm", - "env_var": "HL2SDK-DARKM", - "extension": "2.darkm", - "code": 2, - "define": "DARKMESSIAH", - "steam": { - "app_id": 2145 - }, - "platforms": { - "windows": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/dlls", - "game_shared" - ], - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/dods.json b/metamod-source/hl2sdk-manifests/manifests/dods.json deleted file mode 100644 index 28c23957..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/dods.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "dods", - "env_var": "HL2SDKDODS", - "extension": "2.dods", - "code": 8, - "define": "DODS", - "steam": { - "app_id": 232290 - }, - "platforms": { - "windows": [ - "x86" - ], - "linux": [ - "x86" - ], - "mac": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/linux/mathlib_i486.a", - "lib/linux/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/linux/libtier0_srv.so", - "lib/linux/libvstdlib_srv.so" - ] - }, - "uses_system_cxxlib": false - }, - "mac": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/mac/mathlib_i486.a", - "lib/mac/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/mac/libtier0.dylib", - "lib/mac/libvstdlib.dylib" - ] - }, - "cxxlib": "c++" - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/doi.json b/metamod-source/hl2sdk-manifests/manifests/doi.json deleted file mode 100644 index d79b4f34..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/doi.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "doi", - "env_var": "HL2SDKDOI", - "extension": "2.doi", - "code": 21, - "define": "DOI", - "steam": { - "app_id": 462310 - }, - "platforms": { - "windows": [ - "x86" - ], - "linux": [ - "x86" - ], - "mac": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "x86": { - "postlink_libs": [ - "lib/linux/mathlib_i486.a", - "lib/linux/tier1_i486.a", - "lib/linux/interfaces_i486.a" - ], - "dynamic_libs": [ - "lib/linux/libtier0_srv.so", - "lib/linux/libvstdlib_srv.so" - ] - }, - "uses_system_cxxlib": false - }, - "mac": { - "x86": { - "postlink_libs": [ - "lib/mac/mathlib_i486.a", - "lib/mac/tier1_i486.a", - "lib/mac/interfaces_i486.a" - ], - "dynamic_libs": [ - "lib/mac/libtier0.dylib", - "lib/mac/libvstdlib.dylib" - ] - }, - "cxxlib": "c++" - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib", - "lib/public/interfaces.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/dota.json b/metamod-source/hl2sdk-manifests/manifests/dota.json deleted file mode 100644 index 624bc3bc..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/dota.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "dota", - "env_var": "HL2SDKDOTA", - "extension": "2.dota", - "code": 24, - "define": "DOTA", - "platforms": { - "windows": [ - "x86_64" - ], - "linux": [ - "x86_64" - ] - }, - "source2": true, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "x86_64": { - "postlink_libs": [ - "lib/linux64/mathlib.a", - "lib/linux64/tier1.a", - "lib/linux64/interfaces.a" - ], - "dynamic_libs": [ - "lib/linux64/libtier0.so" - ] - }, - "uses_system_cxxlib": false - }, - "windows": { - "x86_64": { - "libs": [ - "lib/public/win64/mathlib.lib", - "lib/public/win64/tier0.lib", - "lib/public/win64/tier1.lib", - "lib/public/win64/interfaces.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/episode1.json b/metamod-source/hl2sdk-manifests/manifests/episode1.json deleted file mode 100644 index 5cf99a71..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/episode1.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "episode1", - "env_var": "HL2SDK", - "extension": "2.ep1", - "code": 1, - "define": "EPISODEONE", - "steam": { - "app_id": 232250 - }, - "platforms": { - "windows": [ - "x86" - ], - "linux": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/dlls", - "game_shared" - ], - "linux": { - "x86": { - "postlink_libs": [ - "linux_sdk/mathlib_i486.a", - "linux_sdk/tier1_i486.a" - ], - "dynamic_libs": [ - "linux_sdk/tier0_i486.so", - "linux_sdk/vstdlib_i486.so" - ] - }, - "uses_system_cxxlib": false - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/eye.json b/metamod-source/hl2sdk-manifests/manifests/eye.json deleted file mode 100644 index c284a048..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/eye.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "eye", - "env_var": "HL2SDK-EYE", - "extension": "2.eye", - "code": 5, - "define": "EYE", - "steam": { - "app_id": 91720 - }, - "platforms": { - "windows": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/hl2dm.json b/metamod-source/hl2sdk-manifests/manifests/hl2dm.json deleted file mode 100644 index 8928fd96..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/hl2dm.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "hl2dm", - "env_var": "HL2SDKHL2DM", - "extension": "2.hl2dm", - "code": 7, - "define": "HL2DM", - "steam": { - "app_id": 232370 - }, - "platforms": { - "windows": [ - "x86" - ], - "linux": [ - "x86" - ], - "mac": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/linux/mathlib_i486.a", - "lib/linux/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/linux/libtier0_srv.so", - "lib/linux/libvstdlib_srv.so" - ] - }, - "uses_system_cxxlib": false - }, - "mac": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/mac/mathlib_i486.a", - "lib/mac/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/mac/libtier0.dylib", - "lib/mac/libvstdlib.dylib" - ] - }, - "cxxlib": "c++" - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/insurgency.json b/metamod-source/hl2sdk-manifests/manifests/insurgency.json deleted file mode 100644 index 41417e7c..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/insurgency.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "name": "insurgency", - "env_var": "HL2SDKINSURGENCY", - "extension": "2.insurgency", - "code": 20, - "define": "INSURGENCY", - "steam": { - "app_id": 17705 - }, - "platforms": { - "windows": [ - "x86", - "x86_64" - ], - "linux": [ - "x86" - ], - "mac": [ - "x86", - "x86_64" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "x86": { - "postlink_libs": [ - "lib/linux/mathlib_i486.a", - "lib/linux/tier1_i486.a", - "lib/linux/interfaces_i486.a" - ], - "dynamic_libs": [ - "lib/linux/libtier0_srv.so", - "lib/linux/libvstdlib_srv.so" - ] - }, - "uses_system_cxxlib": false - }, - "mac": { - "x86": { - "postlink_libs": [ - "lib/mac/mathlib_i486.a", - "lib/mac/tier1_i486.a", - "lib/mac/interfaces_i486.a" - ], - "dynamic_libs": [ - "lib/mac/libtier0.dylib", - "lib/mac/libvstdlib.dylib" - ] - }, - "x86_64": { - "postlink_libs": [ - "lib/osx64/mathlib.a", - "lib/osx64/tier1.a", - "lib/osx64/interfaces.a" - ], - "dynamic_libs": [ - "lib/osx64/libtier0.dylib", - "lib/osx64/libvstdlib.dylib" - ] - }, - "cxxlib": "c++" - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib", - "lib/public/interfaces.lib" - ] - }, - "x86_64": { - "libs": [ - "lib/public/win64/mathlib.lib", - "lib/public/win64/tier0.lib", - "lib/public/win64/tier1.lib", - "lib/public/win64/vstdlib.lib", - "lib/public/win64/interfaces.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/l4d.json b/metamod-source/hl2sdk-manifests/manifests/l4d.json deleted file mode 100644 index 4565b317..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/l4d.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "l4d", - "env_var": "HL2SDKL4D", - "extension": "2.l4d", - "code": 13, - "define": "LEFT4DEAD", - "steam": { - "app_id": 510 - }, - "platforms": { - "windows": [ - "x86" - ], - "linux": [ - "x86" - ], - "mac": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/linux/mathlib_i486.a", - "lib/linux/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/linux/libtier0.so", - "lib/linux/libvstdlib.so" - ] - }, - "uses_system_cxxlib": false - }, - "mac": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/mac/mathlib_i486.a", - "lib/mac/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/mac/libtier0.dylib", - "lib/mac/libvstdlib.dylib" - ] - }, - "cxxlib": "c++" - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/l4d2.json b/metamod-source/hl2sdk-manifests/manifests/l4d2.json deleted file mode 100644 index ea83a32c..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/l4d2.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "l4d2", - "env_var": "HL2SDKL4D2", - "extension": "2.l4d2", - "code": 16, - "define": "LEFT4DEAD2", - "steam": { - "app_id": 222860 - }, - "platforms": { - "windows": [ - "x86" - ], - "linux": [ - "x86" - ], - "mac": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/linux/mathlib_i486.a", - "lib/linux/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/linux/libtier0_srv.so", - "lib/linux/libvstdlib_srv.so" - ] - }, - "uses_system_cxxlib": false - }, - "mac": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/mac/mathlib_i486.a", - "lib/mac/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/mac/libtier0.dylib", - "lib/mac/libvstdlib.dylib" - ] - }, - "cxxlib": "c++" - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/mcv.json b/metamod-source/hl2sdk-manifests/manifests/mcv.json deleted file mode 100644 index 9d07ca5d..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/mcv.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "mcv", - "env_var": "HL2SDKMCV", - "extension": "2.mcv", - "code": 22, - "define": "MCV", - "steam": { - "app_id": 1136190 - }, - "platforms": { - "windows": [ - "x86_64" - ], - "linux": [ - "x86_64" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "x86_64": { - "postlink_libs": [ - "lib/linux64/mathlib.a", - "lib/linux64/interfaces.a", - "lib/linux64/tier1.a" - ], - "dynamic_libs": [ - "lib/linux64/libtier0.so", - "lib/linux64/libvstdlib.so" - ] - }, - "uses_system_cxxlib": false - }, - "windows": { - "x86_64": { - "libs": [ - "lib/public/win64/mathlib.lib", - "lib/public/win64/tier0.lib", - "lib/public/win64/tier1.lib", - "lib/public/win64/vstdlib.lib", - "lib/public/win64/interfaces.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/mock.json b/metamod-source/hl2sdk-manifests/manifests/mock.json deleted file mode 100644 index 98f34166..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/mock.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "name": "mock", - "env_var": "HL2SDK-MOCK", - "extension": "2.mock", - "code": 26, - "define": "MOCK", - "platforms": { - "windows": [ - "x86", - "x86_64" - ], - "linux": [ - "x86", - "x86_64" - ], - "mac": [ - "x86_64" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "linkflags": [ - "-Wl,-z,origin" - ], - "x86": { - "postlink_libs": [ - "lib/linux/mathlib_i486.a", - "lib/linux/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/linux/tier0_i486.so", - "lib/linux/vstdlib_i486.so" - ] - }, - "x86_64": { - "postlink_libs": [ - "lib/linux64/mathlib.a", - "lib/linux64/tier1.a" - ], - "dynamic_libs": [ - "lib/linux64/libtier0_client.so", - "lib/linux64/libvstdlib_client.so" - ] - }, - "uses_system_cxxlib": false - }, - "mac": { - "x86_64": { - "postlink_libs": [ - "lib/osx64/mathlib.a", - "lib/osx64/tier1.a" - ], - "dynamic_libs": [ - "lib/osx64/libtier0.dylib", - "lib/osx64/libvstdlib.dylib" - ] - }, - "cxxlib": "c++" - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - }, - "x86_64": { - "libs": [ - "lib/public/win64/mathlib.lib", - "lib/public/win64/tier0.lib", - "lib/public/win64/tier1.lib", - "lib/public/win64/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/nucleardawn.json b/metamod-source/hl2sdk-manifests/manifests/nucleardawn.json deleted file mode 100644 index 990d4b9c..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/nucleardawn.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "nucleardawn", - "env_var": "HL2SDKND", - "extension": "2.nd", - "code": 14, - "define": "NUCLEARDAWN", - "steam": { - "app_id": 111710 - }, - "platforms": { - "windows": [ - "x86" - ], - "linux": [ - "x86" - ], - "mac": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/linux/mathlib_i486.a", - "lib/linux/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/linux/libtier0_srv.so", - "lib/linux/libvstdlib_srv.so" - ] - }, - "uses_system_cxxlib": false - }, - "mac": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/mac/mathlib_i486.a", - "lib/mac/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/mac/libtier0.dylib", - "lib/mac/libvstdlib.dylib" - ] - }, - "cxxlib": "c++" - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/orangebox.json b/metamod-source/hl2sdk-manifests/manifests/orangebox.json deleted file mode 100644 index 33079634..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/orangebox.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "orangebox", - "env_var": "HL2SDKOB", - "extension": "2.ep2", - "code": 3, - "define": "ORANGEBOX", - "platforms": { - "windows": [ - "x86" - ], - "linux": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "x86": { - "postlink_libs": [ - "lib/linux/mathlib_i486.a", - "lib/linux/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/linux/tier0_i486.so", - "lib/linux/vstdlib_i486.so" - ] - }, - "uses_system_cxxlib": false - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/portal2.json b/metamod-source/hl2sdk-manifests/manifests/portal2.json deleted file mode 100644 index 9df9be25..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/portal2.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "portal2", - "env_var": "HL2SDKPORTAL2", - "extension": "2.portal2", - "code": 18, - "define": "PORTAL2", - "platforms": {}, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ] -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/pvkii.json b/metamod-source/hl2sdk-manifests/manifests/pvkii.json deleted file mode 100644 index 5aa74094..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/pvkii.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "pvkii", - "env_var": "HL2SDKPVKII", - "extension": "2.pvkii", - "code": 10, - "define": "PVKII", - "steam": { - "app_id": 17575 - }, - "platforms": { - "windows": [ - "x86" - ], - "linux": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/public/linux32/mathlib.a", - "lib/public/linux32/tier1.a" - ], - "dynamic_libs": [ - "lib/public/linux32/libtier0.so", - "lib/public/linux32/libvstdlib.so" - ] - }, - "uses_system_cxxlib": false - }, - "metamod": { - "linux": { - "linkflags": [ - "-lstdc++" - ] - } - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/sdk2013.json b/metamod-source/hl2sdk-manifests/manifests/sdk2013.json deleted file mode 100644 index b186a066..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/sdk2013.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "sdk2013", - "env_var": "HL2SDK2013", - "extension": "2.sdk2013", - "code": 9, - "define": "SDK2013", - "steam": { - "app_id": 317670 - }, - "platforms": { - "windows": [ - "x86" - ], - "linux": [ - "x86" - ], - "mac": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/public/linux32/mathlib.a", - "lib/public/linux32/tier1.a" - ], - "dynamic_libs": [ - "lib/public/linux32/libtier0_srv.so", - "lib/public/linux32/libvstdlib_srv.so" - ] - }, - "uses_system_cxxlib": false - }, - "mac": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/public/osx32/mathlib.a", - "lib/public/osx32/tier1.a" - ], - "dynamic_libs": [ - "lib/public/osx32/libtier0.dylib", - "lib/public/osx32/libvstdlib.dylib" - ] - }, - "cxxlib": "c++" - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/swarm.json b/metamod-source/hl2sdk-manifests/manifests/swarm.json deleted file mode 100644 index 7a3e2bc9..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/swarm.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "swarm", - "env_var": "HL2SDK-SWARM", - "extension": "2.swarm", - "code": 17, - "define": "ALIENSWARM", - "steam": { - "app_id": 582400 - }, - "platforms": { - "windows": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib", - "lib/public/interfaces.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/manifests/tf2.json b/metamod-source/hl2sdk-manifests/manifests/tf2.json deleted file mode 100644 index 97563ce3..00000000 --- a/metamod-source/hl2sdk-manifests/manifests/tf2.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "name": "tf2", - "env_var": "HL2SDKTF2", - "extension": "2.tf2", - "code": 12, - "define": "TF2", - "steam": { - "app_id": 232250 - }, - "platforms": { - "windows": [ - "x86", - "x86_64" - ], - "linux": [ - "x86", - "x86_64" - ], - "mac": [ - "x86" - ] - }, - "source2": false, - "include_paths": [ - "public", - "public/engine", - "public/mathlib", - "public/vstdlib", - "public/tier0", - "public/tier1", - "public/toolframework", - "public/game/server", - "game/shared", - "common" - ], - "linux": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/linux/mathlib_i486.a", - "lib/linux/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/linux/libtier0_srv.so", - "lib/linux/libvstdlib_srv.so" - ] - }, - "x86_64": { - "postlink_libs": [ - "lib/linux64/mathlib.a", - "lib/linux64/tier1.a" - ], - "dynamic_libs": [ - "lib/linux64/libtier0_srv.so", - "lib/linux64/libvstdlib_srv.so" - ] - }, - "uses_system_cxxlib": false - }, - "mac": { - "defines": [ - "NO_HOOK_MALLOC", - "NO_MALLOC_OVERRIDE" - ], - "x86": { - "postlink_libs": [ - "lib/mac/mathlib_i486.a", - "lib/mac/tier1_i486.a" - ], - "dynamic_libs": [ - "lib/mac/libtier0.dylib", - "lib/mac/libvstdlib.dylib" - ] - }, - "cxxlib": "c++" - }, - "windows": { - "x86": { - "libs": [ - "lib/public/mathlib.lib", - "lib/public/tier0.lib", - "lib/public/tier1.lib", - "lib/public/vstdlib.lib" - ] - }, - "x86_64": { - "libs": [ - "lib/public/win64/mathlib.lib", - "lib/public/win64/tier1.lib", - "lib/public/win64/tier0.lib", - "lib/public/win64/vstdlib.lib" - ] - } - } -} \ No newline at end of file diff --git a/metamod-source/hl2sdk-manifests/next-sdk-code.py b/metamod-source/hl2sdk-manifests/next-sdk-code.py deleted file mode 100644 index b58c16f9..00000000 --- a/metamod-source/hl2sdk-manifests/next-sdk-code.py +++ /dev/null @@ -1,17 +0,0 @@ -#! vim: set ts=4 sw=4 tw=99 et: -import os -import json - - -def main(): - top_code = 0 - for name in os.listdir('manifests'): - file = os.path.join('manifests', name) - with open(file, 'rt') as fp: - obj = json.load(fp) - top_code = max(top_code, obj['code']) - print(top_code + 1) - - -if __name__ == '__main__': - main() diff --git a/metamod-source/loader/AMBuilder b/metamod-source/loader/AMBuilder deleted file mode 100644 index 22dcafd7..00000000 --- a/metamod-source/loader/AMBuilder +++ /dev/null @@ -1,29 +0,0 @@ -# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python: -import os.path - -def configure_library(cxx, name, linux_defines): - libname = name - binary = MMS.Library(cxx, libname) - binary.compiler.cxxincludes += [os.path.join(builder.sourcePath, 'core', 'sourcehook')] - binary.sources += [ - 'loader.cpp', - 'gamedll.cpp', - 'serverplugin.cpp', - 'utility.cpp', - ] - - if binary.compiler.target.platform == 'linux': - binary.compiler.defines += linux_defines - - nodes = builder.Add(binary) - MMS.binaries += [nodes] - -for cxx in MMS.all_targets: - if cxx.target.platform == 'linux': - if cxx.target.arch == 'x86_64': - configure_library(cxx, 'libserver', ['LIB_PREFIX="lib"', 'LIB_SUFFIX=".so"']) - elif cxx.target.arch == 'x86': - configure_library(cxx, 'server_i486', ['LIB_PREFIX=""', 'LIB_SUFFIX="_i486.so"']) - configure_library(cxx, 'server', ['LIB_PREFIX=""', 'LIB_SUFFIX=".so"']) - else: - configure_library(cxx, 'server', []) diff --git a/metamod-source/loader/gamedll.cpp b/metamod-source/loader/gamedll.cpp deleted file mode 100644 index f2928775..00000000 --- a/metamod-source/loader/gamedll.cpp +++ /dev/null @@ -1,895 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2015 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#include -#include -#include -#include -#include -#include -#include "loader.h" -#include -#include -#include "utility.h" -#include "gamedll.h" - -class IServerGameDLL; -class ISource2ServerConfig; - -#define MAX_GAMEDLL_PATHS 10 - -IGameDllBridge* gamedll_bridge = NULL; -static int game_info_detected = 0; -static char game_name[128]; -static char gamedll_paths[MAX_GAMEDLL_PATHS][PLATFORM_MAX_PATH]; -static void *gamedll_libs[MAX_GAMEDLL_PATHS]; -static unsigned int gamedll_path_count = 0; -static void *gamedll_lib = NULL; -static IServerGameDLL *gamedll_iface = NULL; -static ISource2ServerConfig *config_iface = NULL; -static QueryValveInterface gamedll_qvi = NULL; -static char gamedll_iface_name[128] = { 0 }; -static int gamedll_version = 0; -static int isgd_shutdown_index = -1; -#if defined _WIN32 -static int is2sc_allowdedi_index = 21; -#endif -static char mm_path[PLATFORM_MAX_PATH]; -static bool g_is_source2 = false; - -#if defined _WIN32 -#define SERVER_NAME "server.dll" -#if defined _WIN64 -#define PLATFORM_NAME "win64" -#else -#define PLATFORM_NAME "win32" -#endif -#elif defined __APPLE__ -#define SERVER_NAME "server.dylib" -#if defined __amd64__ -#define PLATFORM_NAME "osx64" -#else -#define PLATFORM_NAME "osx32" -#endif -#elif defined __linux__ -#if defined __amd64__ -// hackhack - source2 uses libserver as name on POSIX, but source1 x64 does not -// (but source1 x64 is also client-only right now so what-ev) -#define SERVER_NAME "libserver" LIB_SUFFIX -#define PLATFORM_NAME "linuxsteamrt64" -#else -#define SERVER_NAME "server" LIB_SUFFIX -#define PLATFORM_NAME "linuxsteamrt32" -#endif -#endif - -static bool -mm_DetectGameInformation() -{ - char game_path[PLATFORM_MAX_PATH]; - - if (game_info_detected) - return game_info_detected == 1 ? true : false; - - game_info_detected = -1; - - mm_GetGameName(game_name, sizeof(game_name)); - - if (!mm_GetFileOfAddress((void*)mm_DetectGameInformation, mm_path, sizeof(mm_path))) - { - mm_LogFatal("Could not locate Metamod loader library path"); - return false; - } - - if (!mm_ResolvePath(game_name, game_path, sizeof(game_path), g_is_source2)) - { - mm_LogFatal("Could not resolve path: %s", game_name); - return false; - } - - FILE *fp; - char gameinfo_path[PLATFORM_MAX_PATH]; - - bool is_source2 = false; - mm_PathFormat(gameinfo_path, sizeof(gameinfo_path), "%s/gameinfo.txt", game_path); - if ((fp = fopen(gameinfo_path, "rt")) == NULL) - { - // Try Source2 gameinfo - mm_PathFormat(gameinfo_path, sizeof(gameinfo_path), "%s/gameinfo.gi", game_path); - if ((fp = fopen(gameinfo_path, "rt")) == NULL) - { - mm_LogFatal("Could not read file: %s", gameinfo_path); - return false; - } - else - { - is_source2 = true; - } - } - - char temp_path[PLATFORM_MAX_PATH]; - char cur_path[PLATFORM_MAX_PATH]; - - char *ptr; - const char *lptr; - bool search = false; - char buffer[255], key[128], val[128]; - while (!feof(fp) && fgets(buffer, sizeof(buffer), fp) != NULL) - { - mm_TrimComments(buffer); - mm_TrimLeft(buffer); - mm_TrimRight(buffer); - - if (stricmp(buffer, "SearchPaths") == 0) - search = true; - - if (!search) - continue; - - mm_KeySplit(buffer, key, sizeof(key) - 1, val, sizeof(val) - 1); - if (stricmp(key, "Game") != 0 && stricmp(key, "GameBin") != 0) - continue; - - if (strncmp(val, "|gameinfo_path|", sizeof("|gameinfo_path|") - 1) == 0) - { - ptr = &val[sizeof("|gameinfo_path|") - 1]; - if (ptr[0] == '.') - ptr++; - lptr = game_path; - } - else - { - ptr = val; - if (getcwd(cur_path, sizeof(cur_path))) - lptr = cur_path; - else - lptr = ""; - } - - const char *pRelPath = is_source2 ? "../../" : ""; - const char *pOSDir = is_source2 ? PLATFORM_NAME "/" : ""; - if (stricmp(key, "GameBin") == 0) - mm_PathFormat(temp_path, sizeof(temp_path), "%s/%s%s/%s" SERVER_NAME, lptr, pRelPath, ptr, pOSDir); - else if (!ptr[0]) - mm_PathFormat(temp_path, sizeof(temp_path), "%s/%sbin/%s" SERVER_NAME, lptr, pRelPath, pOSDir); - else - mm_PathFormat(temp_path, sizeof(temp_path), "%s/%s%s/bin/%s" SERVER_NAME, lptr, pRelPath, ptr, pOSDir); - - if (mm_PathCmp(mm_path, temp_path)) - continue; - - FILE *exists = fopen(temp_path, "rb"); - if (!exists) - continue; - fclose(exists); - - /* exists is still non-NULL... use this as a flag */ - for (unsigned int i = 0; i < gamedll_path_count; i++) - { - if (mm_PathCmp(gamedll_paths[i], temp_path)) - { - exists = NULL; - break; - } - } - - if (!exists) - continue; - - mm_Format(gamedll_paths[gamedll_path_count], - PLATFORM_MAX_PATH, - "%s", - temp_path); - gamedll_path_count++; - - if (gamedll_path_count == MAX_GAMEDLL_PATHS) - break; - } - fclose(fp); - - game_info_detected = 1; - - if (gamedll_path_count == 0) - { - mm_LogFatal("Could not detect any valid game paths in gameinfo file"); - return false; - } - - return true; -} - -static void -mm_FreeCachedLibraries() -{ - for (unsigned int i = 0; i < gamedll_path_count; i++) - { - if (gamedll_libs[i] == NULL) - continue; - mm_UnloadLibrary(gamedll_libs[i]); - } -} - -static void -mm_PatchDllInit(bool patch); - -static void -mm_PatchDllShutdown(); - -#if defined _WIN32 -static void -mm_PatchAllowDedicated(bool patch); -#endif - -static void -mm_PatchConnect(bool patch); - -static void *isgd_orig_init = NULL; -static void *isgd_orig_shutdown = NULL; -#if defined _WIN32 -static void *is2sc_orig_allowdedi = NULL; -#endif -static void *is2sc_orig_connect = NULL; - -class VEmptyClass -{ -}; - -gamedll_bridge_info g_bridge_info; - -// Source2 - Rough start order -// CreateInterfaceFn (IS2SC) - hook Connect and AllowDedicatedServer -// IS2SC::Connect - save factory pointer. return orig. remove hook. -// IS2SC::AllowDedicatedServer - return true. remove hook. -// CreateInterfaceFn (IS2S) - hook Init and Shutdown -// IS2S::Init - do same as old ISGD::DLLInit, including core load. return orig. remove hook. -// IS2S::Shutdown - <-- this - -enum InitReturnVal_t -{ - INIT_FAILED = 0, - INIT_OK, - - INIT_LAST_VAL, -}; - -class ISource2ServerConfig -{ -public: - virtual bool Connect(QueryValveInterface factory) - { - g_bridge_info.engineFactory = factory; - g_bridge_info.fsFactory = factory; - g_bridge_info.physicsFactory = factory; - - - /* Call the original */ - bool result; - { - union - { - bool(VEmptyClass::*mfpnew)(QueryValveInterface factory); -#if defined _WIN32 - void *addr; - } u; - u.addr = is2sc_orig_connect; -#else - struct - { - void *addr; - intptr_t adjustor; - } s; - } u; - u.s.addr = is2sc_orig_connect; - u.s.adjustor = 0; -#endif - result = (((VEmptyClass *) config_iface)->*u.mfpnew)(factory); - } - - mm_PatchConnect(false); - - return result; - } -#if defined _WIN32 - virtual bool AllowDedicatedServers(int universe) const - { - mm_PatchAllowDedicated(false); - return true; - } -#endif -}; - -class ISource2Server -{ -public: - virtual bool Connect(QueryValveInterface factory) { return true; } - virtual void Disconnect() {} - virtual void *QueryInterface(const char *pInterfaceName) { return nullptr; } - - virtual InitReturnVal_t Init() - { - if (!stricmp("csgo", game_name)) - { - mm_backend = MMBackend_CS2; - } - else - { - mm_backend = MMBackend_DOTA; - } - - char error[255]; - if (!mm_LoadMetamodLibrary(mm_backend, error, sizeof(error))) - { - mm_LogFatal("Detected engine %d but could not load: %s", mm_backend, error); - } - else - { - typedef IGameDllBridge *(*GetGameDllBridge)(); - GetGameDllBridge get_bridge = (GetGameDllBridge)mm_GetProcAddress("GetGameDllBridge"); - if (get_bridge == NULL) - { - mm_UnloadMetamodLibrary(); - mm_LogFatal("Detected engine %d but could not find GetGameDllBridge callback", mm_backend); - } - else - { - gamedll_bridge = get_bridge(); - } - } - - if (gamedll_bridge) - { - g_bridge_info.pGlobals = nullptr;// pGlobals; - g_bridge_info.dllVersion = gamedll_version; - g_bridge_info.dllInterfaceName = gamedll_iface_name; - g_bridge_info.isgd = gamedll_iface; - g_bridge_info.gsFactory = gamedll_qvi; - g_bridge_info.vsp_listener_path = mm_path; - - strcpy(error, "Unknown error"); - if (!gamedll_bridge->DLLInit_Pre(&g_bridge_info, error, sizeof(error))) - { - gamedll_bridge = NULL; - mm_UnloadMetamodLibrary(); - mm_LogFatal("Unknown error loading Metamod for engine %d: %s", mm_backend, error); - } - } - - /* Call the original */ - InitReturnVal_t result; - { - union - { - InitReturnVal_t(VEmptyClass::*mfpnew)(); -#if defined _WIN32 - void *addr; - } u; - u.addr = isgd_orig_init; -#else - struct - { - void *addr; - intptr_t adjustor; - } s; - } u; - u.s.addr = isgd_orig_init; - u.s.adjustor = 0; -#endif - result = (((VEmptyClass *)gamedll_iface)->*u.mfpnew)(); - } - - /** - * :TODO: possible logic hole here, what happens if the gamedll REALLY returns false? - * I'm pretty sure we'll die horribly. - */ - - if (!result) - { - gamedll_bridge->Unload(); - mm_UnloadMetamodLibrary(); - gamedll_bridge = NULL; - } - else if (gamedll_bridge != NULL) - { - gamedll_bridge->DLLInit_Post(&isgd_shutdown_index); - assert(isgd_shutdown_index != -1); - mm_PatchDllShutdown(); - } - - mm_PatchDllInit(false); - - return result; - } - - virtual void Shutdown() - { - gamedll_bridge->Unload(); - gamedll_bridge = NULL; - mm_UnloadMetamodLibrary(); - - /* Call original function */ - { - union - { - void (VEmptyClass::*mfpnew)(); -#if defined _WIN32 - void *addr; - } u; - u.addr = isgd_orig_shutdown; -#else - struct - { - void *addr; - intptr_t adjustor; - } s; - } u; - u.s.addr = isgd_orig_shutdown; - u.s.adjustor = 0; -#endif - (((VEmptyClass *)gamedll_iface)->*u.mfpnew)(); - } - - mm_UnloadLibrary(gamedll_lib); - gamedll_lib = NULL; - } -}; - -class IServerGameDLL -{ -public: - virtual bool DLLInit(QueryValveInterface engineFactory, - QueryValveInterface physicsFactory, - QueryValveInterface fileSystemFactory, - void *pGlobals) - { - mm_backend = mm_DetermineBackendS1(engineFactory, gamedll_qvi, game_name); - - char error[255]; - if (mm_backend == MMBackend_UNKNOWN) - { - mm_LogFatal("Could not detect engine version"); - } - else - { - if (!mm_LoadMetamodLibrary(mm_backend, error, sizeof(error))) - { - mm_LogFatal("Detected engine %d but could not load: %s", mm_backend, error); - } - else - { - typedef IGameDllBridge *(*GetGameDllBridge)(); - GetGameDllBridge get_bridge = (GetGameDllBridge)mm_GetProcAddress("GetGameDllBridge"); - if (get_bridge == NULL) - { - mm_UnloadMetamodLibrary(); - mm_LogFatal("Detected engine %d but could not find GetGameDllBridge callback", mm_backend); - } - else - { - gamedll_bridge = get_bridge(); - } - } - } - - if (gamedll_bridge) - { - g_bridge_info.engineFactory = (QueryValveInterface)engineFactory; - g_bridge_info.physicsFactory = (QueryValveInterface)physicsFactory; - g_bridge_info.fsFactory = (QueryValveInterface)fileSystemFactory; - g_bridge_info.pGlobals = pGlobals; - g_bridge_info.dllVersion = gamedll_version; - g_bridge_info.dllInterfaceName = gamedll_iface_name; - g_bridge_info.isgd = gamedll_iface; - g_bridge_info.gsFactory = gamedll_qvi; - g_bridge_info.vsp_listener_path = mm_path; - - strcpy(error, "Unknown error"); - if (!gamedll_bridge->DLLInit_Pre(&g_bridge_info, error, sizeof(error))) - { - gamedll_bridge = NULL; - mm_UnloadMetamodLibrary(); - mm_LogFatal("Unknown error loading Metamod for engine %d: %s", mm_backend, error); - } - } - - /* Call the original */ - bool result; - { - union - { - bool (VEmptyClass::*mfpnew)(QueryValveInterface engineFactory, - QueryValveInterface physicsFactory, - QueryValveInterface fileSystemFactory, - void *pGlobals); -#if defined _WIN32 - void *addr; - } u; - u.addr = isgd_orig_init; -#else - struct - { - void *addr; - intptr_t adjustor; - } s; - } u; - u.s.addr = isgd_orig_init; - u.s.adjustor = 0; -#endif - result = (((VEmptyClass *)gamedll_iface)->*u.mfpnew)(engineFactory, - physicsFactory, - fileSystemFactory, - pGlobals); - } - - /** - * :TODO: possible logic hole here, what happens if the gamedll REALLY returns false? - * I'm pretty sure we'll die horribly. - */ - - if (!result) - { - gamedll_bridge->Unload(); - mm_UnloadMetamodLibrary(); - gamedll_bridge = NULL; - } - else if (gamedll_bridge != NULL) - { - gamedll_bridge->DLLInit_Post(&isgd_shutdown_index); - assert(isgd_shutdown_index != -1); - mm_PatchDllShutdown(); - } - - mm_PatchDllInit(false); - - return result; - } - - virtual void DLLShutdown() - { - gamedll_bridge->Unload(); - gamedll_bridge = NULL; - mm_UnloadMetamodLibrary(); - - /* Call original function */ - { - union - { - void (VEmptyClass::*mfpnew)(); -#if defined _WIN32 - void *addr; - } u; - u.addr = isgd_orig_shutdown; -#else - struct - { - void *addr; - intptr_t adjustor; - } s; - } u; - u.s.addr = isgd_orig_shutdown; - u.s.adjustor = 0; -#endif - (((VEmptyClass *)gamedll_iface)->*u.mfpnew)(); - } - - mm_UnloadLibrary(gamedll_lib); - gamedll_lib = NULL; - } -}; - -static IServerGameDLL isgd_thunk; -static ISource2Server is2s_thunk; -static ISource2ServerConfig is2sc_thunk; - -static void -mm_PatchDllInit(bool patch) -{ - void **vtable_src; - void **vtable_dest; - SourceHook::MemFuncInfo mfp; - - if (g_is_source2) - { - SourceHook::GetFuncInfo(&ISource2Server::Init, mfp); - } - else - { - SourceHook::GetFuncInfo(&IServerGameDLL::DLLInit, mfp); - } - - assert(mfp.isVirtual); - assert(mfp.thisptroffs == 0); - assert(mfp.vtbloffs == 0); - - if (g_is_source2) - { - vtable_src = (void **)*(void **)&is2s_thunk; - } - else - { - vtable_src = (void **)*(void **)&isgd_thunk; - } - vtable_dest = (void **)*(void **)gamedll_iface; - - SourceHook::SetMemAccess(&vtable_dest[mfp.vtblindex], - sizeof(void*), - SH_MEM_READ|SH_MEM_WRITE|SH_MEM_EXEC); - - if (patch) - { - assert(isgd_orig_init == NULL); - isgd_orig_init = vtable_dest[mfp.vtblindex]; - vtable_dest[mfp.vtblindex] = vtable_src[mfp.vtblindex]; - } - else - { - assert(isgd_orig_init != NULL); - vtable_dest[mfp.vtblindex] = isgd_orig_init; - isgd_orig_init = NULL; - } -} - -static void -mm_PatchDllShutdown() -{ - void **vtable_src; - void **vtable_dest; - SourceHook::MemFuncInfo mfp; - - mfp.isVirtual = false; - if (g_is_source2) - { - SourceHook::GetFuncInfo(&ISource2Server::Shutdown, mfp); - } - else - { - SourceHook::GetFuncInfo(&IServerGameDLL::DLLShutdown, mfp); - } - assert(mfp.isVirtual); - assert(mfp.thisptroffs == 0); - assert(mfp.vtbloffs == 0); - - if (g_is_source2) - { - vtable_src = (void **)*(void **)&is2s_thunk; - } - else - { - vtable_src = (void **)*(void **)&isgd_thunk; - } - vtable_dest = (void **)*(void **)gamedll_iface; - - isgd_orig_shutdown = vtable_dest[isgd_shutdown_index]; - vtable_dest[isgd_shutdown_index] = vtable_src[mfp.vtblindex]; -} - -#if defined _WIN32 -static void -mm_PatchAllowDedicated(bool patch) -{ - void **vtable_src; - void **vtable_dest; - SourceHook::MemFuncInfo mfp; - - SourceHook::GetFuncInfo(&ISource2ServerConfig::AllowDedicatedServers, mfp); - - assert(mfp.isVirtual); - assert(mfp.thisptroffs == 0); - assert(mfp.vtbloffs == 0); - - vtable_src = (void **) *(void **) &is2sc_thunk; - vtable_dest = (void **) *(void **) config_iface; - - SourceHook::SetMemAccess(&vtable_dest[is2sc_allowdedi_index], - sizeof(void*), - SH_MEM_READ | SH_MEM_WRITE | SH_MEM_EXEC); - - if (patch) - { - assert(is2sc_orig_allowdedi == NULL); - is2sc_orig_allowdedi = vtable_dest[is2sc_allowdedi_index]; - vtable_dest[is2sc_allowdedi_index] = vtable_src[mfp.vtblindex]; - } - else - { - assert(is2sc_orig_allowdedi != NULL); - vtable_dest[is2sc_allowdedi_index] = is2sc_orig_allowdedi; - is2sc_orig_allowdedi = NULL; - } -} -#endif - -static void -mm_PatchConnect(bool patch) -{ - void **vtable_src; - void **vtable_dest; - SourceHook::MemFuncInfo mfp; - - SourceHook::GetFuncInfo(&ISource2ServerConfig::Connect, mfp); - - assert(mfp.isVirtual); - assert(mfp.thisptroffs == 0); - assert(mfp.vtbloffs == 0); - - vtable_src = (void **) *(void **) &is2sc_thunk; - vtable_dest = (void **) *(void **) config_iface; - - SourceHook::SetMemAccess(&vtable_dest[mfp.vtblindex], - sizeof(void*), - SH_MEM_READ | SH_MEM_WRITE | SH_MEM_EXEC); - - if (patch) - { - assert(is2sc_orig_connect == NULL); - is2sc_orig_connect = vtable_dest[mfp.vtblindex]; - vtable_dest[mfp.vtblindex] = vtable_src[mfp.vtblindex]; - } - else - { - assert(is2sc_orig_connect != NULL); - vtable_dest[mfp.vtblindex] = is2sc_orig_connect; - is2sc_orig_connect = NULL; - } -} - - -void * -mm_GameDllRequest(const char *name, int *ret) -{ - if (strncmp(name, "Source2Server", 13) == 0 && !mm_GetCommandArgument("-dedicated") && !mm_GetCommandArgument("-insecure")) - { - mm_LogFatal("Metamod:Source requires -dedicated or -insecure on the command line to be able to load"); - if (ret != nullptr) - *ret = 1; // IFACE_FAILED - - return nullptr; - } - - if (strncmp(name, "Source2ServerConfig", 19) == 0) - { - g_is_source2 = true; - if (!mm_DetectGameInformation()) - { - if (ret != NULL) - *ret = 1; - return NULL; - } - - void *lib; - char error[255]; - void *ptr = NULL; - QueryValveInterface qvi; - for (unsigned int i = 0; i < gamedll_path_count; i++) - { - if (gamedll_libs[i] == NULL) - { - lib = mm_LoadLibrary(gamedll_paths[i], error, sizeof(error)); - if (lib == NULL) - continue; - gamedll_libs[i] = lib; - } - lib = gamedll_libs[i]; - qvi = (QueryValveInterface)mm_GetLibAddress(lib, "CreateInterface"); - if (qvi == NULL) - continue; - ptr = qvi(name, ret); - if (ptr != NULL) - { - gamedll_libs[i] = NULL; - break; - } - } - - if (ptr != NULL) - { - mm_FreeCachedLibraries(); - gamedll_lib = lib; - config_iface = (ISource2ServerConfig *) ptr; - gamedll_qvi = qvi; - - mm_PatchConnect(true); -#if defined _WIN32 - mm_PatchAllowDedicated(true); -#endif - - if (ret != NULL) - *ret = 0; - return ptr; - } - } - else if (strncmp(name, "Source2Server", 13) == 0 && atoi(&name[13]) != 0) - { - gamedll_iface = (IServerGameDLL *)gamedll_qvi(name, ret); - strncpy(gamedll_iface_name, name, sizeof(gamedll_iface_name)); - gamedll_version = atoi(&name[13]); - mm_PatchDllInit(true); - - if (ret != NULL) - *ret = 0; - return gamedll_iface; - } - else if (strncmp(name, "ServerGameDLL", 13) == 0) - { - if (!mm_DetectGameInformation()) - { - if (ret != NULL) - *ret = 1; - return NULL; - } - - void *lib; - char error[255]; - void *ptr = NULL; - QueryValveInterface qvi; - for (unsigned int i = 0; i < gamedll_path_count; i++) - { - if (gamedll_libs[i] == NULL) - { - lib = mm_LoadLibrary(gamedll_paths[i], error, sizeof(error)); - if (lib == NULL) - continue; - gamedll_libs[i] = lib; - } - lib = gamedll_libs[i]; - qvi = (QueryValveInterface)mm_GetLibAddress(lib, "CreateInterface"); - if (qvi == NULL) - continue; - ptr = qvi(name, ret); - if (ptr != NULL) - { - gamedll_libs[i] = NULL; - break; - } - } - - if (ptr != NULL) - { - mm_FreeCachedLibraries(); - gamedll_lib = lib; - gamedll_iface = (IServerGameDLL *)ptr; - strncpy(gamedll_iface_name, name, sizeof(gamedll_iface_name)); - gamedll_qvi = qvi; - gamedll_version = atoi(&name[13]); - mm_PatchDllInit(true); - - if (ret != NULL) - *ret = 0; - return ptr; - } - } - else if (gamedll_lib != NULL && gamedll_bridge == NULL) - { - return gamedll_qvi(name, ret); - } - else if (game_info_detected == 0) - { - mm_LogFatal("Received interface request too early: %s", name); - } - - if (ret != NULL) - *ret = 1; - return NULL; -} - diff --git a/metamod-source/loader/gamedll.h b/metamod-source/loader/gamedll.h deleted file mode 100644 index 06f1189a..00000000 --- a/metamod-source/loader/gamedll.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2008 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#ifndef _INCLUDE_METAMOD_SOURCE_GAMEDLLS_H_ -#define _INCLUDE_METAMOD_SOURCE_GAMEDLLS_H_ - -#include "loader_bridge.h" - -extern void * -mm_GameDllRequest(const char *name, int *ret); - -extern IGameDllBridge* gamedll_bridge; - -#endif /* _INCLUDE_METAMOD_SOURCE_GAMEDLLS_H_ */ - diff --git a/metamod-source/loader/loader.cpp b/metamod-source/loader/loader.cpp deleted file mode 100644 index c8a21336..00000000 --- a/metamod-source/loader/loader.cpp +++ /dev/null @@ -1,430 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2023 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#include -#include -#include -#include -#include -#include -#include -#include "loader.h" -#include "serverplugin.h" -#include "gamedll.h" -#include "utility.h" -#if defined __APPLE__ -#include -#endif - -static HMODULE mm_library = NULL; -static char mm_fatal_logfile[PLATFORM_MAX_PATH] = "metamod-fatal.log"; -MetamodBackend mm_backend = MMBackend_UNKNOWN; - -extern void -mm_LogFatal(const char *message, ...) -{ - FILE *fp; - time_t t; - va_list ap; - char header[256]; - - printf("MMS: Fatal error: "); - va_start(ap, message); - vprintf(message, ap); - va_end(ap); - printf("\n"); - - fp = fopen(mm_fatal_logfile, "at"); - if (!fp && (fp = fopen("metamod-fatal.log", "at")) == NULL) - return; - - t = time(NULL); - strftime(header, sizeof(header), "%m/%d/%Y - %H:%M:%S", localtime(&t)); - fprintf(fp, "L %s: ", header); - - va_start(ap, message); - vfprintf(fp, message, ap); - va_end(ap); - - fprintf(fp, "\n"); - - fclose(fp); -} - -static const char *backend_names[] = -{ - "2.ep1", - "2.darkm", - "2.ep2", - "2.bgt", - "2.eye", - "2.css", - "2.ep2v", - "2.l4d", - "2.l4d2", - "2.swarm", - "2.portal2", - "2.csgo", - "2.dota", - "2.hl2dm", - "2.dods", - "2.tf2", - "2.nd", - "2.sdk2013", - "2.blade", - "2.insurgency", - "2.contagion", - "2.bms", - "2.doi", - "2.mock", - "2.pvkii", - "2.mcv", - "2.cs2", -}; - -#if defined _WIN32 -#define LIBRARY_EXT ".dll" -#define LIBRARY_MINEXT ".dll" -#elif defined __APPLE__ -#define LIBRARY_EXT ".dylib" -#define LIBRARY_MINEXT ".dylib" -#elif defined __linux__ -#define LIBRARY_EXT LIB_SUFFIX -#define LIBRARY_MINEXT ".so" -#endif - -bool -mm_LoadMetamodLibrary(MetamodBackend backend, char *buffer, size_t maxlength) -{ - size_t len, temp_len; - char mm_path[PLATFORM_MAX_PATH * 2]; - - /* Get our path */ - if (!mm_GetFileOfAddress((void*)mm_GetFileOfAddress, mm_path, sizeof(mm_path))) - return false; - - len = strlen(mm_path); - - const char *pLastSlash = strrchr(mm_path, PATH_SEP_CHAR); - if (!pLastSlash) - return false; - - temp_len = strlen(&pLastSlash[1]); - if (len < temp_len) - return false; - - /* Build log file name */ - mm_path[len - temp_len] = '\0'; - mm_Format(mm_fatal_logfile, - sizeof(mm_fatal_logfile), - "%smetamod-fatal.log", - mm_path); - - /* Replace server.dll with the new binary we want */ - mm_Format(&mm_path[len - temp_len], - sizeof(mm_path) - (len - temp_len), - "metamod.%s" LIBRARY_MINEXT, - backend_names[backend]); - - mm_library = (HMODULE)mm_LoadLibrary(mm_path, buffer, maxlength); - - return (mm_library != NULL); -} - -void -mm_UnloadMetamodLibrary() -{ - mm_UnloadLibrary(mm_library); - mm_library = NULL; -} - -#if defined _WIN32 -#define EXPORT extern "C" __declspec(dllexport) -#elif defined __GNUC__ -#define EXPORT extern "C" __attribute__ ((visibility("default"))) -#endif - -EXPORT void * -CreateInterface(const char *name, int *ret) -{ - /* If we've got a VSP bridge, do nothing. */ - if (vsp_bridge != NULL) - { - if (ret != NULL) - *ret = 1; - return NULL; - } - - void *ptr; - if (strncmp(name, "ISERVERPLUGINCALLBACKS", 22) == 0) - { - /* Either load as VSP or start VSP listener */ - ptr = mm_GetVspCallbacks(atoi(&name[22])); - } - else if (gamedll_bridge == NULL) - { - /* Load as gamedll */ - ptr = mm_GameDllRequest(name, ret); - } - else - { - /* If we've got a gamedll bridge, forward the request. */ - return gamedll_bridge->QueryInterface(name, ret); - } - - if (ret != NULL) - *ret = (ptr != NULL) ? 0 : 1; - - return ptr; -} - -void * -mm_GetProcAddress(const char *name) -{ - return mm_GetLibAddress(mm_library, name); -} - -typedef const char *(*GetGameInfoStringFn)(const char *pszKeyName, const char *pszDefaultValue, char *pszOut, uint64_t cbOut); - -void -mm_GetGameName(char *buffer, size_t size) -{ - if (!mm_GetCommandArgument("-game", buffer, size)) - { - char tier0_path[PLATFORM_MAX_PATH]; -#ifdef _WIN32 - if (mm_ResolvePath("tier0.dll", tier0_path, sizeof(tier0_path), false)) -#elif defined __linux__ - if (mm_ResolvePath("libtier0.so", tier0_path, sizeof(tier0_path), false)) -#elif defined __APPLE__ - if (mm_ResolvePath("libtier0.dylib", tier0_path, sizeof(tier0_path), false)) -#else -#error unsupported platform -#endif - { - char err[1024]; - void* pTier0 = mm_LoadLibrary(tier0_path, err, sizeof(err)); - if (pTier0) - { -#ifdef _WIN32 - GetGameInfoStringFn func = (GetGameInfoStringFn)mm_GetLibAddress(pTier0, "?GetGameInfoString@@YAPEBDPEBD0PEAD_K@Z"); -#else - GetGameInfoStringFn func = (GetGameInfoStringFn)mm_GetLibAddress(pTier0, "_Z17GetGameInfoStringPKcS0_Pcm"); -#endif - if (func != nullptr) - { - static char szTmp[260]; - strncpy(buffer, func("FileSystem/SearchPaths/Mod", "", szTmp, sizeof(szTmp)), size); - } - else - { - mm_LogFatal("Failed to resolve GetGameInfoString in fallback gamedir lookup."); - } - - mm_UnloadLibrary(pTier0); - } - else - { - mm_LogFatal("Failed to load tier0 from \"%s\" in fallback gamedir lookup: %s", tier0_path, err); - } - } - else - { - mm_LogFatal("Failed to resolve tier0 path in fallback gamedir lookup."); - } - } - - if (buffer[0] == 0) - { - strncpy(buffer, ".", size); - } -} - -MetamodBackend -mm_DetermineBackendS1(QueryValveInterface engineFactory, QueryValveInterface serverFactory, const char *game_name) -{ - if (engineFactory("VEngineServer023", NULL) != NULL) - { - if (engineFactory("EngineTraceServer004", NULL) == NULL) - { - goto TF2branch; - } - - if (engineFactory("IEngineSoundServer004", NULL) != NULL) - { - void *lib = (void *)serverFactory; - void *addr; - if (strcmp(game_name, "doi") == 0 - || (addr = mm_FindPattern(lib, "doi_gamerules_data", sizeof("doi_gamerules_data") - 1))) - { - return MMBackend_DOI; - } - - return MMBackend_Insurgency; - } - - if (serverFactory("ServerGameDLL010", NULL) != NULL) - { - return MMBackend_BMS; - } - - if (mm_FindPattern((void *)engineFactory, " Blade Symphony ", sizeof(" Blade Symphony ") - 1)) - { - return MMBackend_Blade; - } - - if (mm_FindPattern((void *)engineFactory, "Military Conflict: Vietnam", sizeof("Military Conflict: Vietnam") - 1)) - { - return MMBackend_MCV; - } - - return MMBackend_CSGO; - } - else if (engineFactory("VEngineServer022", NULL) != NULL && - engineFactory("VEngineCvar007", NULL) != NULL) - { - if (engineFactory("EngineTraceServer004", NULL) != NULL) - { - if (engineFactory("XboxSystemInterface001", NULL) != NULL) - { - return MMBackend_AlienSwarm; - } - - void *lib = (void *)serverFactory; - void *addr; - if (strcmp(game_name, "portal2") == 0 - || (addr = mm_FindPattern(lib, "baseportalcombatweapon", sizeof("baseportalcombatweapon") - 1))) - { - return MMBackend_Portal2; - } - - return MMBackend_Blade; // Old Blade - } - else if (engineFactory("VPrecacheSystem001", NULL) != NULL) - { - if (serverFactory("ServerGameTags002", NULL) != NULL) - { - return MMBackend_NuclearDawn; - } - else - { - void *lib = (void *)serverFactory; - void *addr; - if (strcmp(game_name, "contagion") == 0 - || (addr = mm_FindPattern(lib, "Contagion_Chat_All", sizeof("Contagion_Chat_All") - 1))) - { - return MMBackend_Contagion; - } - else - { - return MMBackend_Left4Dead2; - } - } - } - - return MMBackend_Left4Dead; - } - else if (engineFactory("VEngineServer021", NULL) != NULL) - { - /* Check for OB */ - if (engineFactory("VEngineCvar004", NULL) != NULL) - { - if (engineFactory("VModelInfoServer002", NULL) != NULL) - { - /* BGT has same iface version numbers and libs as ep2 */ - void *lib = (void *)serverFactory; - void *addr; - if (strcmp(game_name, "pm") == 0 - || (addr = mm_FindPattern(lib, "DT_PMPlayerResource", sizeof("DT_PMPlayerResource") - 1))) - { - return MMBackend_BloodyGoodTime; - } - else - { - return MMBackend_Episode2; - } - } - else if (engineFactory("VModelInfoServer003", NULL) != NULL) - { - if (engineFactory("VFileSystem017", NULL) != NULL) - { - return MMBackend_EYE; - } - else - { - TF2branch: - void *lib = (void *)serverFactory; - void *addr; - if (strcmp(game_name, "cstrike") == 0 - || (addr = mm_FindPattern(lib, "DT_CSPlayerResource", sizeof("DT_CSPlayerResource") - 1))) - { - return MMBackend_CSS; - } - else if (strcmp(game_name, "tf") == 0 - || (addr = mm_FindPattern(lib, "DT_TFPlayerResource", sizeof("DT_TFPlayerResource") - 1))) - { - return MMBackend_TF2; - } - else if (strcmp(game_name, "dod") == 0 - || (addr = mm_FindPattern(lib, "DT_DODPlayerResource", sizeof("DT_DODPlayerResource") - 1))) - { - return MMBackend_DODS; - } - else if (strcmp(game_name, "hl2mp") == 0) - { - return MMBackend_HL2DM; - } - else if (strcmp(game_name, "pvkii") == 0) - { - return MMBackend_PVKII; - } - else if (strcmp(game_name, ".") == 0 && engineFactory("MOCK_ENGINE", NULL)) - { - return MMBackend_Mock; - } - else - { - return MMBackend_SDK2013; - } - } - } - } - /* Check for Episode One/Old Engine */ - else if (engineFactory("VModelInfoServer001", NULL) != NULL && - (engineFactory("VEngineCvar003", NULL) != NULL || - engineFactory("VEngineCvar002", NULL) != NULL)) - { - /* Check for Dark Messiah which has a weird directory structure */ - if (strcmp(game_name, ".") == 0) - { - return MMBackend_DarkMessiah; - } - return MMBackend_Episode1; - } - } - - return MMBackend_UNKNOWN; -} - diff --git a/metamod-source/loader/loader.h b/metamod-source/loader/loader.h deleted file mode 100644 index aac8ca35..00000000 --- a/metamod-source/loader/loader.h +++ /dev/null @@ -1,134 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2023 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#ifndef _INCLUDE_METAMOD_SOURCE_LOADER_H_ -#define _INCLUDE_METAMOD_SOURCE_LOADER_H_ - -// System -#define SH_SYS_WIN32 1 -#define SH_SYS_LINUX 2 -#define SH_SYS_APPLE 3 - -// Platform -#define SH_XP_POSIX 10 -#define SH_XP_WINAPI 20 - -// Compiler -#define SH_COMP_GCC 1 -#define SH_COMP_MSVC 2 - -#if defined WIN32 -#define SH_SYS SH_SYS_WIN32 -#define SH_XP SH_XP_WINAPI -#define SH_COMP SH_COMP_MSVC -#define WINDOWS_LEAN_AND_MEAN -#include -#include -#define PLATFORM_MAX_PATH MAX_PATH -#define PATH_SEP_STR "\\" -#define PATH_SEP_CHAR '\\' -#define ALT_SEP_CHAR '/' -#elif defined __linux__ || defined __APPLE__ -#if defined __linux__ -#define SH_SYS SH_SYS_LINUX -#elif defined __APPLE__ -#define SH_SYS SH_SYS_APPLE -#endif -#define SH_XP SH_XP_POSIX -#define SH_COMP SH_COMP_GCC -#include -#include -#include -#include -#if SH_SYS == SH_SYS_APPLE -#include -#endif -typedef void * HMODULE; -#define PLATFORM_MAX_PATH PATH_MAX -#define PATH_SEP_STR "/" -#define PATH_SEP_CHAR '/' -#define ALT_SEP_CHAR '\\' -#else -#error "OS detection failed" -#endif - -#include "loader_bridge.h" - -#define SH_PTRSIZE sizeof(void*) - -enum MetamodBackend -{ - MMBackend_Episode1 = 0, - MMBackend_DarkMessiah, - MMBackend_Episode2, - MMBackend_BloodyGoodTime, - MMBackend_EYE, - MMBackend_CSS, - MMBackend_Episode2Valve_OBSOLETE, - MMBackend_Left4Dead, - MMBackend_Left4Dead2, - MMBackend_AlienSwarm, - MMBackend_Portal2, - MMBackend_CSGO, - MMBackend_DOTA, - MMBackend_HL2DM, - MMBackend_DODS, - MMBackend_TF2, - MMBackend_NuclearDawn, - MMBackend_SDK2013, - MMBackend_Blade, - MMBackend_Insurgency, - MMBackend_Contagion, - MMBackend_BMS, - MMBackend_DOI, - MMBackend_Mock, - MMBackend_PVKII, - MMBackend_MCV, - MMBackend_CS2, - MMBackend_UNKNOWN -}; - -extern bool -mm_LoadMetamodLibrary(MetamodBackend backend, char *buffer, size_t maxlength); - -extern void * -mm_GetProcAddress(const char *name); - -extern void -mm_UnloadMetamodLibrary(); - -extern void -mm_LogFatal(const char *message, ...); - -extern void -mm_GetGameName(char *buffer, size_t size); - -extern MetamodBackend -mm_DetermineBackendS1(QueryValveInterface engineFactory, QueryValveInterface serverFactory, const char *game_name); - -extern MetamodBackend mm_backend; - -#endif /* _INCLUDE_METAMOD_SOURCE_LOADER_H_ */ - diff --git a/metamod-source/loader/loader_bridge.h b/metamod-source/loader/loader_bridge.h deleted file mode 100644 index 3fcd8df9..00000000 --- a/metamod-source/loader/loader_bridge.h +++ /dev/null @@ -1,71 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2009 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#ifndef _INCLUDE_METAMOD_SOURCE_LOADER_BRIDGE_H_ -#define _INCLUDE_METAMOD_SOURCE_LOADER_BRIDGE_H_ - -typedef void* (*QueryValveInterface)(const char *pName, int *pReturnCode); -class IServerPluginCallbacks; - -struct vsp_bridge_info -{ - QueryValveInterface engineFactory; - QueryValveInterface gsFactory; - IServerPluginCallbacks * vsp_callbacks; - unsigned int vsp_version; -}; - -class IVspBridge -{ -public: - virtual bool Load(const vsp_bridge_info *info, char *buffer, size_t maxlength) = 0; - virtual void Unload() = 0; - virtual const char *GetDescription() = 0; -}; - -struct gamedll_bridge_info -{ - QueryValveInterface engineFactory; - QueryValveInterface fsFactory; - QueryValveInterface physicsFactory; - QueryValveInterface gsFactory; - void * pGlobals; - unsigned int dllVersion; - const char * dllInterfaceName; - void * isgd; - const char * vsp_listener_path; -}; - -class IGameDllBridge -{ -public: - virtual bool DLLInit_Pre(const gamedll_bridge_info *info, char *buffer, size_t maxlength) = 0; - virtual void DLLInit_Post(int *isgdUnload) = 0; - virtual void *QueryInterface(const char *name, int *ret) = 0; - virtual void Unload() = 0; -}; - -#endif /* _INCLUDE_METAMOD_SOURCE_LOADER_BRIDGE_H_ */ - diff --git a/metamod-source/loader/serverplugin.cpp b/metamod-source/loader/serverplugin.cpp deleted file mode 100644 index c6bf4fd6..00000000 --- a/metamod-source/loader/serverplugin.cpp +++ /dev/null @@ -1,308 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2009 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#include -#include -#include -#include -#include "loader.h" -#include -#include -#include "serverplugin.h" -#include "gamedll.h" - -typedef enum -{ - PLUGIN_CONTINUE = 0, - PLUGIN_OVERRIDE, - PLUGIN_STOP, -} PLUGIN_RESULT; - -typedef enum -{ - eQueryCvarValueStatus_ValueIntact=0, - eQueryCvarValueStatus_CvarNotFound=1, - eQueryCvarValueStatus_NotACvar=2, - eQueryCvarValueStatus_CvarProtected=3 -} EQueryCvarValueStatus; - -typedef int QueryCvarCookie_t; -class CCommand; -class IServerPluginCallbacks; -struct edict_t; - -class IRandomThings -{ -public: - virtual PLUGIN_RESULT ClientCommand(edict_t *pEntity, const CCommand& args) - { - return PLUGIN_CONTINUE; - } -}; - -IVspBridge *vsp_bridge = NULL; - -/** - * The vtable must match the general layout for ISPC. We modify the vtable - * based on what we get back. - */ -class ServerPlugin -{ - char game_name[128]; - unsigned int vsp_version; - bool load_allowed; -public: - ServerPlugin() - { - load_allowed = false; - } - virtual bool Load(QueryValveInterface engineFactory, QueryValveInterface gsFactory) - { - if (!load_allowed) - return false; - - load_allowed = false; - - /* Backend should already filled in if loaded as gamedll */ - if (gamedll_bridge == NULL) - { - mm_GetGameName(game_name, sizeof(game_name)); - - mm_backend = mm_DetermineBackendS1(engineFactory, gsFactory, game_name); - if (mm_backend == MMBackend_Mock) - strcpy(game_name, "mock"); - } - - if (mm_backend == MMBackend_UNKNOWN) - { - mm_LogFatal("Could not detect engine version"); - return false; - } - - void **this_vtable; - this_vtable = (void **)*(void **)this; - - if (mm_backend != MMBackend_Episode1 - && mm_backend != MMBackend_DarkMessiah) - { - /* We need to insert the right type of call into this vtable */ - void **vtable_src; - IRandomThings sample; - SourceHook::MemFuncInfo mfp_dest, mfp_src; - - mfp_dest.isVirtual = false; - mfp_src.isVirtual = false; - - SourceHook::GetFuncInfo(&ServerPlugin::ClientCommand, mfp_dest); - SourceHook::GetFuncInfo(&IRandomThings::ClientCommand, mfp_src); - - assert(mfp_dest.isVirtual); - assert(mfp_dest.thisptroffs == 0); - assert(mfp_dest.vtbloffs == 0); - assert(mfp_src.isVirtual); - assert(mfp_src.thisptroffs == 0); - assert(mfp_src.vtbloffs == 0); - - vtable_src = (void **)*(void **)&sample; - SourceHook::SetMemAccess(&this_vtable[mfp_dest.vtblindex], - sizeof(void*), - SH_MEM_READ|SH_MEM_WRITE|SH_MEM_EXEC); - this_vtable[mfp_dest.vtblindex] = vtable_src[mfp_src.vtblindex]; - } - - /* AS inserted ClientFullyConnect into vtable, so move entries up on older engines */ - if (mm_backend != MMBackend_AlienSwarm - && mm_backend != MMBackend_Portal2 - && mm_backend != MMBackend_Blade - && mm_backend != MMBackend_Insurgency - && mm_backend != MMBackend_DOI - && mm_backend != MMBackend_CSGO - && mm_backend != MMBackend_MCV) - { - SourceHook::MemFuncInfo mfp_fconnect; - mfp_fconnect.isVirtual = false; - - SourceHook::GetFuncInfo(&ServerPlugin::ClientFullyConnect, mfp_fconnect); - - assert(mfp_fconnect.isVirtual); - assert(mfp_fconnect.thisptroffs == 0); - assert(mfp_fconnect.vtbloffs == 0); - - /* Shifting ClientDisconnect through OnQueryCvarValueFinished up into slot for - * ClientFullyConnect (8 entries) - */ - SourceHook::SetMemAccess(&this_vtable[mfp_fconnect.vtblindex], - sizeof(void *) * 8, - SH_MEM_READ|SH_MEM_WRITE|SH_MEM_EXEC); - memmove(&this_vtable[mfp_fconnect.vtblindex], - &this_vtable[mfp_fconnect.vtblindex + 1], - sizeof(void *) * 8); - } - - char error[255]; - if (gamedll_bridge == NULL) - { - if (!mm_LoadMetamodLibrary(mm_backend, error, sizeof(error))) - { - mm_LogFatal("Detected engine %d but could not load: %s", mm_backend, error); - return false; - } - } - - typedef IVspBridge *(*GetVspBridge)(); - GetVspBridge get_bridge = (GetVspBridge)mm_GetProcAddress("GetVspBridge"); - if (get_bridge == NULL) - { - if (gamedll_bridge == NULL) - { - mm_UnloadMetamodLibrary(); - } - mm_LogFatal("Detected engine %d but could not find GetVspBridge callback", mm_backend); - return false; - } - - vsp_bridge = get_bridge(); - - vsp_bridge_info info; - - info.engineFactory = engineFactory; - info.gsFactory = gsFactory; - info.vsp_callbacks = (IServerPluginCallbacks*)this; - info.vsp_version = vsp_version; - - strcpy(error, "Unknown error"); - if (!vsp_bridge->Load(&info, error, sizeof(error))) - { - vsp_bridge = NULL; - if (gamedll_bridge == NULL) - { - mm_UnloadMetamodLibrary(); - } - mm_LogFatal("Unknown error loading Metamod for engine %d: %s", mm_backend, error); - return false; - } - - return true; - } - virtual void Unload() - { - if (vsp_bridge == NULL) - return; - vsp_bridge->Unload(); - - if (gamedll_bridge == NULL) - { - mm_UnloadMetamodLibrary(); - } - } - virtual void Pause() - { - } - virtual void UnPause() - { - } - virtual const char *GetPluginDescription() - { - if (vsp_bridge == NULL) - return "Metamod:Source Loader Shim"; - return vsp_bridge->GetDescription(); - } - virtual void LevelInit(char const *pMapName) - { - } - virtual void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax) - { - } - virtual void GameFrame(bool simulating) - { - } - virtual void LevelShutdown() - { - } - virtual void ClientActive(edict_t *pEntity) - { - } - virtual void ClientFullyConnect(edict_t *pEntity) - { - } - virtual void ClientDisconnect(edict_t *pEntity) - { - } - virtual void ClientPutInServer(edict_t *pEntity, char const *playername) - { - } - virtual void SetCommandClient(int index) - { - } - virtual void ClientSettingsChanged(edict_t *pEdict) - { - } - virtual PLUGIN_RESULT ClientConnect(bool *bAllowConnect, - edict_t *pEntity, - const char *pszName, - const char *pszAddress, - char *reject, - int maxrejectlen) - { - return PLUGIN_CONTINUE; - } - virtual PLUGIN_RESULT ClientCommand(edict_t *pEntity) - { - return PLUGIN_CONTINUE; - } - virtual PLUGIN_RESULT NetworkIDValidated(const char *pszUserName, const char *pszNetworkID) - { - return PLUGIN_CONTINUE; - } - virtual void OnQueryCvarValueFinished(QueryCvarCookie_t iCookie, - edict_t *pPlayerEntity, - EQueryCvarValueStatus eStatus, - const char *pCvarName, - const char *pCvarValue) - { - } - void PrepForLoad(unsigned int version) - { - vsp_version = version; - load_allowed = true; - } -}; - -ServerPlugin mm_vsp_callbacks; - -void *mm_GetVspCallbacks(unsigned int version) -{ - if (vsp_bridge != NULL) - return NULL; - - /* Only support versions 1 or 2 right now */ - if (version > 2) - return NULL; - - mm_vsp_callbacks.PrepForLoad(version); - - return &mm_vsp_callbacks; -} - diff --git a/metamod-source/loader/serverplugin.h b/metamod-source/loader/serverplugin.h deleted file mode 100644 index 12a68d27..00000000 --- a/metamod-source/loader/serverplugin.h +++ /dev/null @@ -1,39 +0,0 @@ -/** - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2008 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#ifndef _INCLUDE_METAMOD_SOURCE_SERVERPLUGINS_H_ -#define _INCLUDE_METAMOD_SOURCE_SERVERPLUGINS_H_ - -#include "loader_bridge.h" - -extern void * -mm_GetVspCallbacks(unsigned int version); - -extern IVspBridge *vsp_bridge; - -#endif /* _INCLUDE_METAMOD_SOURCE_SERVERPLUGINS_H_ */ - diff --git a/metamod-source/loader/utility.cpp b/metamod-source/loader/utility.cpp deleted file mode 100644 index 053afaed..00000000 --- a/metamod-source/loader/utility.cpp +++ /dev/null @@ -1,726 +0,0 @@ -/** - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2015 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#include -#include -#include -#include -#include -#include -#include "loader.h" -#include "utility.h" - -#if defined __linux__ -#include - -#define PAGE_SIZE 4096 -#define PAGE_ALIGN_UP(x) ((x + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)) -#elif defined __APPLE__ -#include -#endif - -#if defined _WIN32 -static void -mm_GetPlatformError(char *buffer, size_t maxlength) -{ - DWORD dw = GetLastError(); - FormatMessageA( - FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - dw, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPSTR)buffer, - static_cast(maxlength), - NULL); -} -#endif - - -size_t -mm_FormatArgs(char *buffer, size_t maxlength, const char *fmt, va_list params) -{ - size_t len = vsnprintf(buffer, maxlength, fmt, params); - - if (len >= maxlength) - { - len = maxlength - 1; - buffer[len] = '\0'; - } - - return len; -} - -size_t -mm_Format(char *buffer, size_t maxlength, const char *fmt, ...) -{ - size_t len; - va_list ap; - - va_start(ap, fmt); - len = mm_FormatArgs(buffer, maxlength, fmt, ap); - va_end(ap); - - return len; -} - -size_t -mm_PathFormat(char *buffer, size_t maxlen, const char *fmt, ...) -{ - size_t len; - va_list ap; - - va_start(ap, fmt); - len = mm_FormatArgs(buffer, maxlen, fmt, ap); - va_end(ap); - - for (size_t i = 0; i < len; i++) - { - if (buffer[i] == ALT_SEP_CHAR) - buffer[i] = PATH_SEP_CHAR; - } - - return len; -} - -void -mm_TrimLeft(char *buffer) -{ - /* Let's think of this as our iterator */ - char *i = buffer; - - /* Make sure the buffer isn't null */ - if (i && *i) - { - /* Add up number of whitespace characters */ - while(isspace((unsigned char) *i)) - i++; - - /* If whitespace chars in buffer then adjust string so first non-whitespace char is at start of buffer */ - if (i != buffer) - memmove(buffer, i, (strlen(i) + 1) * sizeof(char)); - } -} - -void -mm_TrimRight(char *buffer) -{ - /* Make sure buffer isn't null */ - if (buffer) - { - size_t len = strlen(buffer); - - /* Loop through buffer backwards while replacing whitespace chars with null chars */ - for (size_t i = len - 1; i < len; i--) - { - if (isspace((unsigned char) buffer[i])) - buffer[i] = '\0'; - else - break; - } - } -} - -/* :TODO: this should skip string literals */ -void -mm_TrimComments(char *buffer) -{ - if (buffer) - { - int num_sc = 0; - size_t len = strlen(buffer); - for (size_t i = 0; i < len; i++) - { - if (buffer[i] == '/') - { - if (++num_sc >= 2) - { - buffer[i-1] = '\0'; - return; - } - } - else - { - num_sc = 0; - } - } - } -} - -void -mm_KeySplit(const char *str, char *buf1, size_t len1, char *buf2, size_t len2) -{ - size_t start; - size_t len = strlen(str); - - for (start = 0; start < len; start++) - { - if (!isspace(str[start])) - break; - } - - size_t end; - for (end = start; end < len; end++) - { - if (isspace(str[end])) - break; - } - - size_t i, c = 0; - for (i = start; i < end; i++, c++) - { - if (c >= len1) - break; - buf1[c] = str[i]; - } - buf1[c] = '\0'; - - for (start = end; start < len; start++) - { - if (!isspace(str[start])) - break; - } - - for (c = 0; start < len; start++, c++) - { - if (c >= len2) - break; - buf2[c] = str[start]; - } - buf2[c] = '\0'; -} - -bool -mm_PathCmp(const char *path1, const char *path2) -{ -#ifdef _WIN32 - char szFullPath1[PLATFORM_MAX_PATH]; - char szFullPath2[PLATFORM_MAX_PATH]; - if (GetFullPathName(path1, sizeof(szFullPath1), szFullPath1, nullptr) != 0) - { - path1 = szFullPath1; - } - if (GetFullPathName(path2, sizeof(szFullPath2), szFullPath2, nullptr) != 0) - { - path2 = szFullPath2; - } -#else - char szFullPath1[PATH_MAX + 1]; - char szFullPath2[PATH_MAX + 1]; - if (realpath(path1, szFullPath1)) - { - path1 = szFullPath1; - } - if (realpath(path2, szFullPath2)) - { - path2 = szFullPath2; - } -#endif - - size_t pos1 = 0, pos2 = 0; - - while (true) - { - if (path1[pos1] == '\0' || path2[pos2] == '\0') - return (path1[pos1] == path2[pos2]); - - if (path1[pos1] == PATH_SEP_CHAR) - { - if (path2[pos2] != PATH_SEP_CHAR) - return false; - - /* Look for extra path chars */ - while (path1[++pos1]) - { - if (path1[pos1] != PATH_SEP_CHAR) - break; - } - while (path2[++pos2]) - { - if (path2[pos2] != PATH_SEP_CHAR) - break; - } - continue; - } - - /* If we're at a different non-alphanumeric, the next character MUST match */ - if ((((unsigned)path1[pos1] & 0x80) && path1[pos1] != path2[pos2]) - || - (!isalpha(path1[pos1]) && (path1[pos1] != path2[pos2])) - ) - { - return false; - } - - #ifdef WIN32 - if (toupper(path1[pos1]) != toupper(path2[pos2])) - #else - if (path1[pos1] != path2[pos2]) - #endif - { - return false; - } - - pos1++; - pos2++; - } -} - -bool -mm_ResolvePath(const char *path, char *buffer, size_t maxlength, bool bSource2) -{ - char tmp[PLATFORM_MAX_PATH]; - if (bSource2) - { - mm_Format(tmp, sizeof(tmp), "../../%s", path); - path = tmp; - } -#if defined _WIN32 - return _fullpath(buffer, path, maxlength) != NULL; -#elif defined __linux__ || defined __APPLE__ - assert(maxlength >= PATH_MAX); - return realpath(path, buffer) != NULL; -#endif -} - -void * -mm_LoadLibrary(const char *path, char *buffer, size_t maxlength) -{ - void *lib; - -#if defined _WIN32 - lib = (void*)LoadLibrary(path); - - if (lib == NULL) - { - mm_GetPlatformError(buffer, maxlength); - return NULL; - } -#elif defined __linux__ || defined __APPLE__ - lib = dlopen(path, RTLD_NOW); - - if (lib == NULL) - { - mm_Format(buffer, maxlength, "%s", dlerror()); - return NULL; - } -#endif - - return lib; -} - -void * -mm_GetLibAddress(void *lib, const char *name) -{ -#if defined _WIN32 - return GetProcAddress((HMODULE)lib, name); -#elif defined __linux__ || defined __APPLE__ - return dlsym(lib, name); -#endif -} - -void -mm_UnloadLibrary(void *lib) -{ -#if defined _WIN32 - FreeLibrary((HMODULE)lib); -#elif defined __linux__ || defined __APPLE__ - dlclose(lib); -#endif -} - -bool -mm_GetFileOfAddress(void *pAddr, char *buffer, size_t maxlength) -{ -#if defined _WIN32 - MEMORY_BASIC_INFORMATION mem; - if (!VirtualQuery(pAddr, &mem, sizeof(mem))) - return false; - if (mem.AllocationBase == NULL) - return false; - HMODULE dll = (HMODULE)mem.AllocationBase; - GetModuleFileName(dll, (LPTSTR)buffer, static_cast(maxlength)); -#elif defined __linux__ || defined __APPLE__ - Dl_info info; - if (!dladdr(pAddr, &info)) - return false; - if (!info.dli_fbase || !info.dli_fname) - return false; - const char *dllpath = info.dli_fname; - snprintf(buffer, maxlength, "%s", dllpath); -#endif - return true; -} - -struct DynLibInfo -{ - void *baseAddress; - size_t memorySize; -}; - -static bool -mm_GetLibraryInfo(const void *libPtr, DynLibInfo &lib) -{ - uintptr_t baseAddr; - - if (libPtr == NULL) - { - return false; - } - -#ifdef _WIN32 - -#ifdef _M_X64 - const WORD PE_FILE_MACHINE = IMAGE_FILE_MACHINE_AMD64; - const WORD PE_NT_OPTIONAL_HDR_MAGIC = IMAGE_NT_OPTIONAL_HDR64_MAGIC; -#else - const WORD PE_FILE_MACHINE = IMAGE_FILE_MACHINE_I386; - const WORD PE_NT_OPTIONAL_HDR_MAGIC = IMAGE_NT_OPTIONAL_HDR32_MAGIC; -#endif - - MEMORY_BASIC_INFORMATION info; - IMAGE_DOS_HEADER *dos; - IMAGE_NT_HEADERS *pe; - IMAGE_FILE_HEADER *file; - IMAGE_OPTIONAL_HEADER *opt; - - if (!VirtualQuery(libPtr, &info, sizeof(MEMORY_BASIC_INFORMATION))) - { - return false; - } - - baseAddr = reinterpret_cast(info.AllocationBase); - - /* All this is for our insane sanity checks :o */ - dos = reinterpret_cast(baseAddr); - pe = reinterpret_cast(baseAddr + dos->e_lfanew); - file = &pe->FileHeader; - opt = &pe->OptionalHeader; - - /* Check PE magic and signature */ - if (dos->e_magic != IMAGE_DOS_SIGNATURE || pe->Signature != IMAGE_NT_SIGNATURE || opt->Magic != PE_NT_OPTIONAL_HDR_MAGIC) - { - return false; - } - - /* Check architecture */ - if (file->Machine != PE_FILE_MACHINE) - { - return false; - } - - /* For our purposes, this must be a dynamic library */ - if ((file->Characteristics & IMAGE_FILE_DLL) == 0) - { - return false; - } - - /* Finally, we can do this */ - lib.memorySize = opt->SizeOfImage; - -#elif defined __linux__ - -#ifdef __x86_64__ - typedef Elf64_Ehdr ElfHeader; - typedef Elf64_Phdr ElfPHeader; - const unsigned char ELF_CLASS = ELFCLASS64; - const uint16_t ELF_MACHINE = EM_X86_64; -#else - typedef Elf32_Ehdr ElfHeader; - typedef Elf32_Phdr ElfPHeader; - const unsigned char ELF_CLASS = ELFCLASS32; - const uint16_t ELF_MACHINE = EM_386; -#endif - - Dl_info info; - ElfHeader *file; - ElfPHeader *phdr; - uint16_t phdrCount; - - if (!dladdr(libPtr, &info)) - { - return false; - } - - if (!info.dli_fbase || !info.dli_fname) - { - return false; - } - - /* This is for our insane sanity checks :o */ - baseAddr = reinterpret_cast(info.dli_fbase); - file = reinterpret_cast(baseAddr); - - /* Check ELF magic */ - if (memcmp(ELFMAG, file->e_ident, SELFMAG) != 0) - { - return false; - } - - /* Check ELF version */ - if (file->e_ident[EI_VERSION] != EV_CURRENT) - { - return false; - } - - /* Check ELF architecture */ - if (file->e_ident[EI_CLASS] != ELF_CLASS || file->e_machine != ELF_MACHINE || file->e_ident[EI_DATA] != ELFDATA2LSB) - { - return false; - } - - /* For our purposes, this must be a dynamic library/shared object */ - if (file->e_type != ET_DYN) - { - return false; - } - - phdrCount = file->e_phnum; - phdr = reinterpret_cast(baseAddr + file->e_phoff); - - for (uint16_t i = 0; i < phdrCount; i++) - { - ElfPHeader &hdr = phdr[i]; - - /* We only really care about the segment with executable code */ - if (hdr.p_type == PT_LOAD && hdr.p_flags == (PF_X|PF_R)) - { - /* From glibc, elf/dl-load.c: - * c->mapend = ((ph->p_vaddr + ph->p_filesz + GLRO(dl_pagesize) - 1) - * & ~(GLRO(dl_pagesize) - 1)); - * - * In glibc, the segment file size is aligned up to the nearest page size and - * added to the virtual address of the segment. We just want the size here. - */ - lib.memorySize = PAGE_ALIGN_UP(hdr.p_filesz); - break; - } - } - -#elif defined __APPLE__ - -#ifdef __x86_64__ - typedef struct mach_header_64 MachHeader; - typedef struct segment_command_64 MachSegment; - const uint32_t MACH_MAGIC = MH_MAGIC_64; - const uint32_t MACH_LOADCMD_SEGMENT = LC_SEGMENT_64; - const cpu_type_t MACH_CPU_TYPE = CPU_TYPE_X86_64; - const cpu_subtype_t MACH_CPU_SUBTYPE = CPU_SUBTYPE_X86_64_ALL; -#else - typedef struct mach_header MachHeader; - typedef struct segment_command MachSegment; - const uint32_t MACH_MAGIC = MH_MAGIC; - const uint32_t MACH_LOADCMD_SEGMENT = LC_SEGMENT; - const cpu_type_t MACH_CPU_TYPE = CPU_TYPE_I386; - const cpu_subtype_t MACH_CPU_SUBTYPE = CPU_SUBTYPE_I386_ALL; -#endif - - Dl_info info; - MachHeader *file; - MachSegment *seg; - uint32_t cmd_count; - - if (!dladdr(libPtr, &info)) - { - return false; - } - - if (!info.dli_fbase || !info.dli_fname) - { - return false; - } - - /* This is for our insane sanity checks :o */ - baseAddr = (uintptr_t)info.dli_fbase; - file = (MachHeader *)baseAddr; - - /* Check Mach-O magic */ - if (file->magic != MACH_MAGIC) - { - return false; - } - - /* Check architecture */ - if (file->cputype != MACH_CPU_TYPE || file->cpusubtype != MACH_CPU_SUBTYPE) - { - return false; - } - - /* For our purposes, this must be a dynamic library */ - if (file->filetype != MH_DYLIB) - { - return false; - } - - cmd_count = file->ncmds; - seg = (MachSegment *)(baseAddr + sizeof(MachHeader)); - - /* Add up memory sizes of mapped segments */ - for (uint32_t i = 0; i < cmd_count; i++) - { - if (seg->cmd == MACH_LOADCMD_SEGMENT) - { - lib.memorySize += seg->vmsize; - } - - seg = (MachSegment *)((uintptr_t)seg + seg->cmdsize); - } - -#endif - - lib.baseAddress = reinterpret_cast(baseAddr); - - return true; -} - -void *mm_FindPattern(const void *libPtr, const char *pattern, size_t len) -{ - DynLibInfo lib; - bool found; - char *ptr, *end; - - memset(&lib, 0, sizeof(DynLibInfo)); - - if (!mm_GetLibraryInfo(libPtr, lib)) - { - return NULL; - } - - ptr = reinterpret_cast(lib.baseAddress); - end = ptr + lib.memorySize - len; - - while (ptr < end) - { - found = true; - for (register size_t i = 0; i < len; i++) - { - if (pattern[i] != '\x2A' && pattern[i] != ptr[i]) - { - found = false; - break; - } - } - - if (found) - return ptr; - - ptr++; - } - - return NULL; -} - -bool mm_GetCommandArgument(const char* argName, char* buffer, size_t maxlength) -{ - if (buffer) - buffer[0] = '\0'; - -#if defined _WIN32 - wchar_t wargName[256]; - mbstowcs(wargName, argName, sizeof(wargName) / sizeof(wchar_t)); - - LPWSTR pCmdLine = GetCommandLineW(); - int argc; - LPWSTR* wargv = CommandLineToArgvW(pCmdLine, &argc); - - bool found = false; - for (int i = 0; i < argc; ++i) - { - if (wcscmp(wargv[i], wargName) == 0) - { - found = true; - - if ((++i) < argc && buffer && wargv[i][0] != '-') - { - wcstombs(buffer, wargv[i], maxlength); - buffer[maxlength - 1] = '\0'; - } - - break; - } - } - - LocalFree(wargv); - - return found; - -#elif defined __APPLE__ - int argc = *_NSGetArgc(); - char** argv = *_NSGetArgv(); - for (int i = 0; i < argc; ++i) - { - if (strcmp(argv[i], argName) == 0) - { - if ((++i) < argc && buffer && argv[i][0] != '-') - { - strncpy(buffer, argv[i], maxlength); - buffer[maxlength - 1] = '\0'; - } - - return true; - } - } - -#elif defined __linux__ - FILE* pFile = fopen("/proc/self/cmdline", "rb"); - if (pFile) - { - char* arg = nullptr; - size_t argsize = 0; - bool nextIsValue = false; - bool found = false; - - while (getdelim(&arg, &argsize, 0, pFile) != -1) - { - if (nextIsValue) - { - if (buffer && arg[0] != '-') - { - strncpy(buffer, arg, maxlength); - buffer[maxlength - 1] = '\0'; - } - - found = true; - break; - } - - if (strcmp(arg, argName) == 0) - { - nextIsValue = true; - } - } - - free(arg); - fclose(pFile); - - return found || nextIsValue; - } -#else -#error -#endif - - return false; -} diff --git a/metamod-source/loader/utility.h b/metamod-source/loader/utility.h deleted file mode 100644 index 74090615..00000000 --- a/metamod-source/loader/utility.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * vim: set ts=4 : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2015 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id$ - */ - -#ifndef _INCLUDE_METAMOD_SOURCE_LOADER_UTILITY_H_ -#define _INCLUDE_METAMOD_SOURCE_LOADER_UTILITY_H_ - -#include - -extern size_t -mm_Format(char *buffer, size_t maxlength, const char *fmt, ...); - -extern void * -mm_LoadLibrary(const char *path, char *buffer, size_t maxlength); - -extern void * -mm_GetLibAddress(void *lib, const char *name); - -extern void -mm_UnloadLibrary(void *lib); - -extern bool -mm_ResolvePath(const char *path, char *buffer, size_t maxlength, bool bSource2); - -extern size_t -mm_PathFormat(char *buffer, size_t len, const char *fmt, ...); - -extern void -mm_TrimLeft(char *buffer); - -extern void -mm_TrimRight(char *buffer); - -extern void -mm_TrimComments(char *buffer); - -extern void -mm_KeySplit(const char *str, char *buf1, size_t len1, char *buf2, size_t len2); - -extern bool -mm_PathCmp(const char *path1, const char *path2); - -extern bool -mm_GetFileOfAddress(void *pAddr, char *buffer, size_t maxlength); - -extern void * -mm_FindPattern(const void *libPtr, const char *pattern, size_t len); - -// True if arg is present, false if not. If arg has no value, buffer will be set to an empty string. -extern bool -mm_GetCommandArgument(const char *argName, char *buffer = nullptr, size_t maxlength = 0); - -#endif /* _INCLUDE_METAMOD_SOURCE_LOADER_UTILITY_H_ */ - diff --git a/metamod-source/loader/version.rc b/metamod-source/loader/version.rc deleted file mode 100644 index 7de5c4d7..00000000 --- a/metamod-source/loader/version.rc +++ /dev/null @@ -1,101 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" -#include - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION MMS_VERSION_FILE - PRODUCTVERSION MMS_VERSION_FILE - FILEFLAGSMASK 0x17L -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "Comments", "Metamod: Source Loader" - VALUE "FileDescription", "Metamod: Source Loader" - VALUE "FileVersion", MMS_VERSION_STRING - VALUE "InternalName", "mmsource" - VALUE "LegalCopyright", "Copyright (c) 2004-2010, Metamod: Source Development Team" - VALUE "OriginalFilename", BINARY_NAME - VALUE "ProductName", "Metamod:Source Loader" - VALUE "ProductVersion", MMS_VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END - - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/metamod-source/product.version b/metamod-source/product.version deleted file mode 100644 index d72f2626..00000000 --- a/metamod-source/product.version +++ /dev/null @@ -1 +0,0 @@ -2.0.0-dev diff --git a/metamod-source/public/metamod_version.h b/metamod-source/public/metamod_version.h deleted file mode 100644 index 3e77b1ed..00000000 --- a/metamod-source/public/metamod_version.h +++ /dev/null @@ -1,66 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source - * Copyright (C) 2004-2024 AlliedModders LLC and authors. - * All rights reserved. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software in a - * product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#ifndef _INCLUDE_METAMOD_VERSION_INFORMATION_H_ -#define _INCLUDE_METAMOD_VERSION_INFORMATION_H_ - -/** - * @file Contains Metamod version information. - * @brief This file will redirect to an autogenerated version if being compiled via - * the build scripts. - */ - -#if defined MMS_GENERATED_BUILD -# if defined RC_COMPILE -# undef MMS_USE_VERSIONLIB -# endif -# if defined MMS_USE_VERSIONLIB -# include -# else -# include -# endif -#else -#define MMS_BUILD_TAG "manual" -#define MMS_BUILD_LOCAL_REV "0" -#define MMS_BUILD_CSET "0" -#define MMS_BUILD_MAJOR "2" -#define MMS_BUILD_MINOR "0" -#define MMS_BUILD_RELEASE "0" - -#define MMS_BUILD_UNIQUEID MMS_BUILD_LOCAL_REV ":" MMS_BUILD_CSET - -#define MMS_VERSION_STRING MMS_BUILD_MAJOR "." MMS_BUILD_MINOR "." MMS_BUILD_RELEASE "-" MMS_BUILD_TAG -#define MMS_VERSION_FILE 2,0,0,0 -#endif -#define MMS_BUILD_TIMESTAMP __DATE__ " " __TIME__ - -#if !defined(MMS_GENERATED_BUILD) || !defined(MMS_USE_VERSIONLIB) -# define METAMOD_VERSION MMS_VERSION_STRING -# define METAMOD_BUILD_ID MMS_BUILD_UNIQUEID -# define METAMOD_BUILD_TIME MMS_BUILD_TIMESTAMP -#endif - -#endif /* _INCLUDE_METAMOD_VERSION_INFORMATION_H_ */ - diff --git a/metamod-source/pushbuild.txt b/metamod-source/pushbuild.txt deleted file mode 100644 index 006737a5..00000000 --- a/metamod-source/pushbuild.txt +++ /dev/null @@ -1,42 +0,0 @@ -MM:S and SM load on Portal on Mac OS X. How cool is that?? -It would be cool if the OS X package uploaded though. -Burgledorfs and blaggermuffins are among the king's favourites. -Ten ticket takers tackled two terrible tyrants. -There once was a -Breaking builds, one push at a time. -Thanks for more IFileSystem breakage. -Bloody, missing sdk! -yur an ISource2Serverrr -hats -oh, i'll get it right this time -I'd be angry. -rum hom! -bees ðŸ bees bees? -oh, it's so cute. she calls it a mayonegg -Why is Windows so awful? -cleng cling clang clung clong -javaliabuf -🥚. -pulled pork, yeah... -king of the javalias -ducks versus geese, who will win? -more like g_pBa -I didn't have any dreams. -Eat your potato, Ricky! -Buildbot shall pay the iron price. -BMO Chop! If this was a real attack, you'd be dead. -Hey Morty! -jam clam! -her? -Confused clams claim clowns clobber clans containing cloaked clients. -Beads -We've have it all! -dvander is one million ladies tall today... -Your tier1 tower is under attack! -Christmas! -is Skinny Pete any relation to Sneaky Pete??? -where Travis? -msvc2015, take two -"something witty" - Fishy! -thisisawfuldotnetcom -iluvwomen99 diff --git a/metamod-source/samples/s1_sample_mm/AMBuildScript b/metamod-source/samples/s1_sample_mm/AMBuildScript deleted file mode 100644 index 0c3ac7d7..00000000 --- a/metamod-source/samples/s1_sample_mm/AMBuildScript +++ /dev/null @@ -1,444 +0,0 @@ -proj_name = 'sample_mm' -proj_srcs = [ - 'sample_mm.cpp', -] -proj_c_flags = [ - '-Wall', - '-Wno-non-virtual-dtor', - '-Wno-overloaded-virtual', - '-Werror', - '-Wno-unused', -] -proj_c_flags_opt = [ - '-O3', - '-funroll-loops', - '-pipe', -] -proj_c_flags_dbg = [ - '-g', - '-ggdb3', -] - -import os, sys - -class SDK(object): - def __init__(self, sdk, ext, aDef, name, platform, dir): - self.folder = 'hl2sdk-' + dir - self.envvar = sdk - self.ext = ext - self.code = aDef - self.define = name - self.name = dir - self.path = None # Actual path - self.platformSpec = platform - - # By default, nothing supports x64. - if type(platform) is list: - self.platformSpec = {p: ['x86'] for p in platform} - else: - self.platformSpec = platform - - def shouldBuild(self, target, archs): - if target.platform not in self.platformSpec: - return False - if not len([i for i in self.platformSpec[target.platform] if i in archs]): - return False - return True - -WinOnly = ['windows'] -WinLinux = ['windows', 'linux'] -WinLinuxMac = ['windows', 'linux', 'mac'] -CSGO = { - 'windows': ['x86'], - 'linux': ['x86', 'x64'], - 'mac': ['x64'] -} -Source2 = { - 'windows': ['x86', 'x64'], - 'linux': ['x64'], -} - -PossibleSDKs = { - 'episode1': SDK('HL2SDK', '2.ep1', '1', 'EPISODEONE', WinLinux, 'episode1'), - 'ep2': SDK('HL2SDKOB', '2.ep2', '3', 'ORANGEBOX', WinLinux, 'orangebox'), - 'css': SDK('HL2SDKCSS', '2.css', '6', 'CSS', WinLinuxMac, 'css'), - 'hl2dm': SDK('HL2SDKHL2DM', '2.hl2dm', '7', 'HL2DM', WinLinuxMac, 'hl2dm'), - 'dods': SDK('HL2SDKDODS', '2.dods', '8', 'DODS', WinLinuxMac, 'dods'), - 'sdk2013': SDK('HL2SDK2013', '2.sdk2013', '9', 'SDK2013', WinLinuxMac, 'sdk2013'), - 'tf2': SDK('HL2SDKTF2', '2.tf2', '11', 'TF2', WinLinuxMac, 'tf2'), - 'l4d': SDK('HL2SDKL4D', '2.l4d', '12', 'LEFT4DEAD', WinLinuxMac, 'l4d'), - 'nucleardawn': SDK('HL2SDKND', '2.nd', '13', 'NUCLEARDAWN', WinLinuxMac, 'nucleardawn'), - 'l4d2': SDK('HL2SDKL4D2', '2.l4d2', '15', 'LEFT4DEAD2', WinLinuxMac, 'l4d2'), - 'darkm': SDK('HL2SDK-DARKM', '2.darkm', '2', 'DARKMESSIAH', WinOnly, 'darkm'), - 'swarm': SDK('HL2SDK-SWARM', '2.swarm', '16', 'ALIENSWARM', WinOnly, 'swarm'), - 'bgt': SDK('HL2SDK-BGT', '2.bgt', '4', 'BLOODYGOODTIME', WinOnly, 'bgt'), - 'eye': SDK('HL2SDK-EYE', '2.eye', '5', 'EYE', WinOnly, 'eye'), - 'csgo': SDK('HL2SDKCSGO', '2.csgo', '21', 'CSGO', CSGO, 'csgo'), - 'dota': SDK('HL2SDKDOTA', '2.dota', '22', 'DOTA', Source2, 'dota'), - 'portal2': SDK('HL2SDKPORTAL2', '2.portal2', '17', 'PORTAL2', [], 'portal2'), - 'blade': SDK('HL2SDKBLADE', '2.blade', '18', 'BLADE', WinLinux, 'blade'), - 'insurgency': SDK('HL2SDKINSURGENCY', '2.insurgency', '19', 'INSURGENCY', WinLinuxMac, 'insurgency'), - 'doi': SDK('HL2SDKDOI', '2.doi', '20', 'DOI', WinLinuxMac, 'doi'), - 'contagion': SDK('HL2SDKCONTAGION', '2.contagion', '14', 'CONTAGION', WinOnly, 'contagion'), - 'bms': SDK('HL2SDKBMS', '2.bms', '10', 'BMS', WinLinux, 'bms'), -} - -def ResolveEnvPath(env, folder): - if env in os.environ: - path = os.environ[env] - if os.path.isdir(path): - return path - else: - head = os.getcwd() - oldhead = None - while head != None and head != oldhead: - path = os.path.join(head, folder) - if os.path.isdir(path): - return path - oldhead = head - head, tail = os.path.split(head) - return None - -def Normalize(path): - return os.path.abspath(os.path.normpath(path)) - -def SetArchFlags(compiler, arch, platform): - if compiler.behavior == 'gcc': - if arch == 'x86': - compiler.cflags += ['-m32'] - compiler.linkflags += ['-m32'] - if platform == 'mac': - compiler.linkflags += ['-arch', 'i386'] - elif arch == 'x64': - compiler.cflags += ['-m64', '-fPIC'] - compiler.linkflags += ['-m64'] - if platform == 'mac': - compiler.linkflags += ['-arch', 'x86_64'] - elif compiler.like('msvc'): - if arch == 'x86': - compiler.linkflags += ['/MACHINE:X86'] - elif arch == 'x64': - compiler.linkflags += ['/MACHINE:X64'] - -def AppendArchSuffix(binary, name, arch): - if arch == 'x64': - binary.localFolder = name + '.x64' - -class MMSConfig(object): - def __init__(self): - self.sdks = {} - self.binaries = [] - self.generated_headers = None - self.mms_root = None - self.archs = builder.target.arch.replace('x86_64', 'x64').split(',') - - def detectProductVersion(self): - builder.AddConfigureFile('product.version') - - # For OS X dylib versioning - import re - with open(os.path.join(builder.sourcePath, 'product.version'), 'r') as fp: - productContents = fp.read() - m = re.match('(\d+)\.(\d+)\.(\d+).*', productContents) - if m == None: - self.productVersion = '1.0.0' - else: - major, minor, release = m.groups() - self.productVersion = '{0}.{1}.{2}'.format(major, minor, release) - - def detectSDKs(self): - sdk_list = builder.options.sdks.split(',') - use_all = sdk_list[0] == 'all' - use_present = sdk_list[0] == 'present' - if sdk_list[0] == '': - sdk_list = [] - - for sdk_name in PossibleSDKs: - sdk = PossibleSDKs[sdk_name] - if sdk.shouldBuild(builder.target, self.archs): - if builder.options.hl2sdk_root: - sdk_path = os.path.join(builder.options.hl2sdk_root, sdk.folder) - else: - sdk_path = ResolveEnvPath(sdk.envvar, sdk.folder) - if sdk_path is None: - if use_all or sdk_name in sdk_list: - raise Exception('Could not find a valid path for {0}'.format(sdk.envvar)) - continue - if use_all or use_present or sdk_name in sdk_list: - sdk.path = sdk_path - self.sdks[sdk_name] = sdk - - if len(self.sdks) < 1 and len(sdk_list): - raise Exception('No SDKs were found that build on {0}-{1}, nothing to do.'.format( - builder.target.platform, builder.target.arch)) - - if builder.options.mms_path: - self.mms_root = builder.options.mms_path - else: - self.mms_root = ResolveEnvPath('MMSOURCE110', 'mmsource-1.10') - if not self.mms_root: - self.mms_root = ResolveEnvPath('MMSOURCE_DEV', 'metamod-source') - if not self.mms_root: - self.mms_root = ResolveEnvPath('MMSOURCE_DEV', 'mmsource-central') - - if not self.mms_root or not os.path.isdir(self.mms_root): - raise Exception('Could not find a source copy of Metamod:Source') - self.mms_root = Normalize(self.mms_root) - - def configure(self): - if not set(self.archs).issubset(['x86', 'x64']): - raise Exception('Unknown target architecture: {0}'.format(builder.target.arch)) - - cxx = builder.DetectCxx() - - if cxx.behavior == 'gcc': - cxx.defines += [ - 'stricmp=strcasecmp', - '_stricmp=strcasecmp', - '_snprintf=snprintf', - '_vsnprintf=vsnprintf', - '_alloca=alloca', - 'GNUC' - ] - cxx.cflags += proj_c_flags - cxx.cflags += [ # todo: what is the difference between cflags and cxxflags - '-fPIC', - '-fno-exceptions', - '-fno-rtti', - '-msse', - '-fno-strict-aliasing', - ] - - if (cxx.version >= 'gcc-4.0') or cxx.family == 'clang': - cxx.cflags += [ - '-fvisibility=hidden', - '-fvisibility-inlines-hidden', - '-std=c++11', - ] - # apple clang <-> llvm clang version correspondence is just a guess as there is no way to figure it out for real - if (cxx.version >= 'gcc-4.7' or cxx.version >= 'clang-3.0' or cxx.version >= 'apple-clang-5.1'): - cxx.cflags += [ - '-Wno-delete-non-virtual-dtor', - '-Wno-unused-private-field', - '-Wno-deprecated-register', - ] - if cxx.family == 'clang': - if cxx.version >= 'clang-3.9' or cxx.version >= 'apple-clang-10.0': - cxx.cxxflags += ['-Wno-expansion-to-defined'] - - # Optimization - if builder.options.opt == '1': - if cxx.behavior == 'gcc': - cxx.cflags += proj_c_flags_opt - # elif cxx.behavior == 'msvc': # todo: implement MSVC support - - # Debugging - if builder.options.debug == '1': - cxx.defines += ['_DEBUG'] - if cxx.behavior == 'gcc': - cxx.cflags += proj_c_flags_dbg - # elif cxx.behavior == 'msvc': # todo: implement MSVC support - - # This needs to be after our optimization flags which could otherwise disable it. - # if cxx.family == 'msvc': # todo: implement MSVC support - - # Platform-specifics - if builder.target.platform == 'linux': - cxx.defines += [ - 'POSIX', - 'LINUX', - '_LINUX', - ] - cxx.linkflags += ['-shared'] - if cxx.family == 'gcc': - cxx.linkflags += ['-static-libgcc'] - elif builder.target.platform == 'mac': - cxx.defines += [ - 'POSIX', - 'OSX', - '_OSX', - ] - cxx.cflags += ['-mmacosx-version-min=10.9'] - cxx.linkflags += [ - '-dynamiclib', - '-lc++', - '-mmacosx-version-min=10.9', - ] - # elif builder.target.platform == 'windows': # todo: implement MSVC support - - def HL2Compiler(self, context, sdk, arch): - compiler = context.cxx.clone() - - compiler.cxxincludes += [ - os.path.join(context.currentSourcePath), - os.path.join(self.mms_root, 'core'), - os.path.join(self.mms_root, 'core', 'sourcehook'), - ] - - defines = ['SE_' + PossibleSDKs[i].define + '=' + PossibleSDKs[i].code for i in PossibleSDKs] - compiler.defines += defines - paths = [ - ['public'], - ['public', 'engine'], - ['public', 'mathlib'], - ['public', 'vstdlib'], - ['public', 'tier0'], - ['public', 'tier1'], - ] - - if sdk.name == 'episode1' or sdk.name == 'darkm': - paths.append(['public', 'dlls']) - else: - paths.append(['public', 'game', 'server']) - - compiler.defines += ['SOURCE_ENGINE=' + sdk.code] - - if sdk.name in ['sdk2013', 'bms'] and compiler.like('gcc'): - # The 2013 SDK already has these in public/tier0/basetypes.h - compiler.defines.remove('stricmp=strcasecmp') - compiler.defines.remove('_stricmp=strcasecmp') - compiler.defines.remove('_snprintf=snprintf') - compiler.defines.remove('_vsnprintf=vsnprintf') - - if compiler.family == 'msvc': - # todo: verify this for MSVC support - compiler.defines += ['COMPILER_MSVC'] - if arch == 'x86': - compiler.defines += ['COMPILER_MSVC32'] - elif arch == 'x64': - compiler.defines += ['COMPILER_MSVC64'] - - if compiler.version >= 1900: - compiler.linkflags += ['legacy_stdio_definitions.lib'] - else: # todo: is it better to check compiler.behavior? - compiler.defines += ['COMPILER_GCC'] - - for path in paths: - compiler.cxxincludes += [os.path.join(sdk.path, *path)] - - return compiler - - def AddVersioning(self, binary, arch): - if builder.target.platform == 'mac' and binary.type == 'library': - binary.compiler.postlink += [ - '-compatibility_version', '1.0.0', - '-current_version', self.productVersion - ] - - return binary - - def LibraryBuilder(self, compiler, name, arch): - binary = compiler.Library(name) - AppendArchSuffix(binary, name, arch) - self.AddVersioning(binary, arch) - return binary - - def HL2Library(self, context, name, sdk, arch): - compiler = self.HL2Compiler(context, sdk, arch) - - SetArchFlags(compiler, arch, builder.target.platform) - - if builder.target.platform == 'linux': - if sdk.name == 'episode1': - lib_folder = os.path.join(sdk.path, 'linux_sdk') - elif sdk.name in ['sdk2013', 'bms']: - lib_folder = os.path.join(sdk.path, 'lib', 'public', 'linux32') - elif arch == 'x64': - lib_folder = os.path.join(sdk.path, 'lib', 'linux64') - else: - lib_folder = os.path.join(sdk.path, 'lib', 'linux') - elif builder.target.platform == 'mac': - if sdk.name in ['sdk2013', 'bms']: - lib_folder = os.path.join(sdk.path, 'lib', 'public', 'osx32') - elif arch == 'x64': - lib_folder = os.path.join(sdk.path, 'lib', 'osx64') - else: - lib_folder = os.path.join(sdk.path, 'lib', 'mac') - - if builder.target.platform in ['linux', 'mac']: - if sdk.name in ['sdk2013', 'bms'] or arch == 'x64': - compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'tier1.a'))] - else: - compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'tier1_i486.a'))] - - if sdk.name in ['blade', 'insurgency', 'doi', 'csgo', 'dota']: - if arch == 'x64': - compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'interfaces.a'))] - else: - compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'interfaces_i486.a'))] - - if sdk.name == 'bms': - compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'mathlib.a'))] - - binary = self.LibraryBuilder(compiler, name, arch) - - dynamic_libs = [] # todo: this whole section is slightly different, but I imagine it is "more correct" - if builder.target.platform == 'linux': - compiler.linkflags[0:0] = ['-lm', '-ldl'] # todo: do we need -ldl? - if sdk.name in ['css', 'hl2dm', 'dods', 'tf2', 'sdk2013', 'bms', 'nucleardawn', 'l4d2', 'insurgency', 'doi']: - dynamic_libs = ['libtier0_srv.so', 'libvstdlib_srv.so'] - elif arch == 'x64' and sdk.name == 'csgo': - dynamic_libs = ['libtier0_client.so', 'libvstdlib_client.so'] - elif sdk.name in ['l4d', 'blade', 'insurgency', 'doi', 'csgo', 'dota']: - dynamic_libs = ['libtier0.so', 'libvstdlib.so'] - else: - dynamic_libs = ['tier0_i486.so', 'vstdlib_i486.so'] - elif builder.target.platform == 'mac': - binary.compiler.linkflags.append('-liconv') - dynamic_libs = ['libtier0.dylib', 'libvstdlib.dylib'] - elif builder.target.platform == 'windows': - # todo: verify this for MSVC support - libs = ['tier0', 'tier1', 'vstdlib'] - if sdk.name in ['swarm', 'blade', 'insurgency', 'doi', 'csgo', 'dota']: - libs.append('interfaces') - if sdk.name == 'bms': - libs.append('mathlib') - for lib in libs: - if arch == 'x86': - lib_path = os.path.join(sdk.path, 'lib', 'public', lib) + '.lib' - elif arch == 'x64': - lib_path = os.path.join(sdk.path, 'lib', 'public', 'win64', lib) + '.lib' - binary.compiler.linkflags.append(binary.Dep(lib_path)) - - for library in dynamic_libs: - source_path = os.path.join(lib_folder, library) - output_path = os.path.join(binary.localFolder, library) - - def make_linker(source_path, output_path): - def link(context, binary): - cmd_node, (output,) = context.AddSymlink(source_path, output_path) - return output - return link - - linker = make_linker(source_path, output_path) - binary.compiler.linkflags[0:0] = [binary.Dep(library, linker)] - - return binary - -MMS = MMSConfig() -MMS.detectProductVersion() -MMS.detectSDKs() -MMS.configure() - -BuildScripts = [] # add sub-modules here -if getattr(builder.options, 'enable_tests', False): - BuildScripts += [] # add tests here - -import os - -for sdk_name in MMS.sdks: - for arch in MMS.archs: - sdk = MMS.sdks[sdk_name] - - if not arch in sdk.platformSpec[builder.target.platform]: - continue - - name = proj_name + sdk.ext - binary = MMS.HL2Library(builder, name, sdk, arch) - - binary.sources += proj_srcs - - nodes = builder.Add(binary) - MMS.binaries += [nodes] - -builder.Build(BuildScripts, { 'MMS': MMS }) diff --git a/metamod-source/samples/s1_sample_mm/README.md b/metamod-source/samples/s1_sample_mm/README.md deleted file mode 100644 index 66c15123..00000000 --- a/metamod-source/samples/s1_sample_mm/README.md +++ /dev/null @@ -1,27 +0,0 @@ -For more information on compiling and reading the plugin's source code, see: - - http://wiki.alliedmods.net/Category:Metamod:Source_Development - -Build instructions ------------------- - -Make sure ambuild2 is installed: https://github.com/alliedmodders/ambuild - -Configure the build (`--hl2sdk-root` specifies the path where the all SDKs have been installed by `support/checkout-deps.sh` and `--mms_path` is the path to Metamod: Source). - -If you only want to compile using a specific SDK you can hack around the requirement to build for all SDKs by modifying the calls to the SDK constructor in the assignment to `PossibleSDKs` in `AMBuildScript` and setting the `platforms` parameter to \[\] for all SDKs that you don't want to compile for. - -### Windows - -Use Command Prompt as Gitbash doesn't handle the path arguments correctly. - -``` -mkdir build -cd build -python ../configure.py --hl2sdk-root C:\Users\user\Documents\GitHub --mms_path C:\Users\user\Documents\GitHub\metamod-source -``` - -Build: -``` -ambuild -``` \ No newline at end of file diff --git a/metamod-source/samples/s1_sample_mm/configure.py b/metamod-source/samples/s1_sample_mm/configure.py deleted file mode 100644 index 50e87dfd..00000000 --- a/metamod-source/samples/s1_sample_mm/configure.py +++ /dev/null @@ -1,33 +0,0 @@ -import sys -try: - from ambuild2 import run, util -except: - try: - import ambuild - sys.stderr.write('It looks like you have AMBuild 1 installed, but this project uses AMBuild 2.\n') - sys.stderr.write('Upgrade to the latest version of AMBuild to continue.\n') - except: - sys.stderr.write('AMBuild must be installed to build this project.\n') - sys.stderr.write('http://www.alliedmods.net/ambuild\n') - sys.exit(1) - -def make_objdir_name(p): - return 'obj-' + util.Platform() + '-' + p.target_arch - -parser = run.BuildParser(sourcePath=sys.path[0], api='2.1') -parser.default_arch = 'x86' -parser.default_build_folder = make_objdir_name -parser.options.add_option('--hl2sdk-root', type=str, dest='hl2sdk_root', default=None, - help='Root search folder for HL2SDKs') -parser.options.add_option('--mms_path', type=str, dest='mms_path', default=None, - help='Metamod:Source source tree folder') -parser.options.add_option('--enable-debug', action='store_const', const='1', dest='debug', - help='Enable debugging symbols') -parser.options.add_option('--enable-optimize', action='store_const', const='1', dest='opt', - help='Enable optimization') -parser.options.add_option('-s', '--sdks', default='all', dest='sdks', - help='Build against specified SDKs; valid args are "all", "present", or ' - 'comma-delimited list of engine names (default: %default)') -parser.options.add_option('--enable-tests', default=False, dest='enable_tests', action='store_true', - help='Build tests.') -parser.Configure() diff --git a/metamod-source/samples/s1_sample_mm/engine_wrappers.h b/metamod-source/samples/s1_sample_mm/engine_wrappers.h deleted file mode 100644 index 800174cf..00000000 --- a/metamod-source/samples/s1_sample_mm/engine_wrappers.h +++ /dev/null @@ -1,94 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source Sample Plugin - * Written by AlliedModders LLC. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * This sample plugin is public domain. - */ - -#ifndef _INCLUDE_SOURCE_ENGINE_WRAPPERS_ -#define _INCLUDE_SOURCE_ENGINE_WRAPPERS_ - -#include - -extern IVEngineServer *engine; -extern CGlobalVars *gpGlobals; - -#define ENGINE_CALL(func) SH_CALL(engine, &IVEngineServer::func) - -/** - * Wrap some API calls for legacy MM:S. - */ -#if !defined METAMOD_PLAPI_VERSION -#define GetEngineFactory engineFactory -#define GetServerFactory serverFactory -#define MM_Format snprintf -#define GetCGlobals pGlobals -#else -#define MM_Format g_SMAPI->Format -#endif - -#if SOURCE_ENGINE <= SE_DARKMESSIAH -/** - * Wrap the CCommand class so our code looks the same on all engines. - */ -class CCommand -{ -public: - const char *ArgS() - { - return engine->Cmd_Args(); - } - int ArgC() - { - return engine->Cmd_Argc(); - } - - const char *Arg(int index) - { - return engine->Cmd_Argv(index); - } -}; - -#define CVAR_INTERFACE_VERSION VENGINE_CVAR_INTERFACE_VERSION -#endif - -/** - * Left 4 Dead engine removed these from IVEngineServer. - */ -#if SOURCE_ENGINE >= SE_LEFT4DEAD - -inline int IndexOfEdict(const edict_t *pEdict) -{ - return (int)(pEdict - gpGlobals->pEdicts); -} -inline edict_t *PEntityOfEntIndex(int iEntIndex) -{ - if (iEntIndex >= 0 && iEntIndex < gpGlobals->maxEntities) - { - return (edict_t *)(gpGlobals->pEdicts + iEntIndex); - } - return NULL; -} - -#else - -inline int IndexOfEdict(const edict_t *pEdict) -{ - return engine->IndexOfEdict(pEdict); -} -inline edict_t *PEntityOfEntIndex(int iEntIndex) -{ - return engine->PEntityOfEntIndex(iEntIndex); -} - -#endif - -#endif //_INCLUDE_SOURCE_ENGINE_WRAPPERS_ - diff --git a/metamod-source/samples/s1_sample_mm/msvc10/sample_mm.sln b/metamod-source/samples/s1_sample_mm/msvc10/sample_mm.sln deleted file mode 100644 index 14216110..00000000 --- a/metamod-source/samples/s1_sample_mm/msvc10/sample_mm.sln +++ /dev/null @@ -1,56 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample_mm", "sample_mm.vcxproj", "{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug - Alien Swarm|Win32 = Debug - Alien Swarm|Win32 - Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32 - Debug - Left 4 Dead 2|Win32 = Debug - Left 4 Dead 2|Win32 - Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32 - Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32 - Debug - Orange Box|Win32 = Debug - Orange Box|Win32 - Debug - Original|Win32 = Debug - Original|Win32 - Release - Alien Swarm|Win32 = Release - Alien Swarm|Win32 - Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32 - Release - Left 4 Dead 2|Win32 = Release - Left 4 Dead 2|Win32 - Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32 - Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32 - Release - Orange Box|Win32 = Release - Orange Box|Win32 - Release - Original|Win32 = Release - Original|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Alien Swarm|Win32.ActiveCfg = Debug - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Alien Swarm|Win32.Build.0 = Debug - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead 2|Win32.ActiveCfg = Debug - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead 2|Win32.Build.0 = Debug - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box Valve|Win32.ActiveCfg = Debug - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.ActiveCfg = Debug - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.Build.0 = Debug - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Alien Swarm|Win32.ActiveCfg = Release - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Alien Swarm|Win32.Build.0 = Release - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead 2|Win32.ActiveCfg = Release - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead 2|Win32.Build.0 = Release - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box Valve|Win32.ActiveCfg = Release - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box Valve|Win32.Build.0 = Release - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Original|Win32.ActiveCfg = Release - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Original|Win32.Build.0 = Release - Original|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/metamod-source/samples/s1_sample_mm/msvc10/sample_mm.vcxproj b/metamod-source/samples/s1_sample_mm/msvc10/sample_mm.vcxproj deleted file mode 100644 index 4734b202..00000000 --- a/metamod-source/samples/s1_sample_mm/msvc10/sample_mm.vcxproj +++ /dev/null @@ -1,1156 +0,0 @@ - - - - - Debug - Alien Swarm - Win32 - - - Debug - Bloody Good Time - Win32 - - - Debug - CS GO - Win32 - - - Debug - CSS - Win32 - - - Debug - Dark Messiah - Win32 - - - Debug - EYE - Win32 - - - Debug - Left 4 Dead 2 - Win32 - - - Debug - Left 4 Dead - Win32 - - - Debug - Orange Box Valve - Win32 - - - Debug - Orange Box - Win32 - - - Debug - Original - Win32 - - - Debug - Portal 2 - Win32 - - - Release - Alien Swarm - Win32 - - - Release - Bloody Good Time - Win32 - - - Release - CS GO - Win32 - - - Release - CSS - Win32 - - - Release - Dark Messiah - Win32 - - - Release - EYE - Win32 - - - Release - Left 4 Dead 2 - Win32 - - - Release - Left 4 Dead - Win32 - - - Release - Orange Box Valve - Win32 - - - Release - Orange Box - Win32 - - - Release - Original - Win32 - - - Release - Portal 2 - Win32 - - - - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9} - sample_mm - Win32Proj - - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - true - true - true - true - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - false - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - true - true - true - true - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - false - false - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core-legacy;$(MMSOURCE18)\core-legacy\sourcehook;$(HL2SDK)\public;$(HL2SDK)\public\dlls;$(HL2SDK)\public\engine;$(HL2SDK)\public\tier0;$(HL2SDK)\public\tier1;$(HL2SDK)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=1;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDK)\lib\public\tier0.lib;$(HL2SDK)\lib\public\tier1.lib;$(HL2SDK)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core-legacy;$(MMSOURCE18)\core-legacy\sourcehook;$(HL2SDK)\public;$(HL2SDK)\public\dlls;$(HL2SDK)\public\engine;$(HL2SDK)\public\tier0;$(HL2SDK)\public\tier1;$(HL2SDK)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=1;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDK)\lib\public\tier0.lib;$(HL2SDK)\lib\public\tier1.lib;$(HL2SDK)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-DARKM)\public;$(HL2SDK-DARKM)\public\engine;$(HL2SDK-DARKM)\public\dlls;$(HL2SDK-DARKM)\public\tier0;$(HL2SDK-DARKM)\public\tier1;$(HL2SDK-DARKM)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=2;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDK-DARKM)\lib\public\tier0.lib;$(HL2SDK-DARKM)\lib\public\tier1.lib;$(HL2SDK-DARKM)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-DARKM)\public;$(HL2SDK-DARKM)\public\engine;$(HL2SDK-DARKM)\public\dlls;$(HL2SDK-DARKM)\public\tier0;$(HL2SDK-DARKM)\public\tier1;$(HL2SDK-DARKM)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=2;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDK-DARKM)\lib\public\tier0.lib;$(HL2SDK-DARKM)\lib\public\tier1.lib;$(HL2SDK-DARKM)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKOB)\public;$(HL2SDKOB)\public\engine;$(HL2SDKOB)\public\game\server;$(HL2SDKOB)\public\tier0;$(HL2SDKOB)\public\tier1;$(HL2SDKOB)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=3;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDKOB)\lib\public\tier0.lib;$(HL2SDKOB)\lib\public\tier1.lib;$(HL2SDKOB)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKOB)\public;$(HL2SDKOB)\public\engine;$(HL2SDKOB)\public\game\server;$(HL2SDKOB)\public\tier0;$(HL2SDKOB)\public\tier1;$(HL2SDKOB)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=3;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDKOB)\lib\public\tier0.lib;$(HL2SDKOB)\lib\public\tier1.lib;$(HL2SDKOB)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKOBVALVE)\public;$(HL2SDKOBVALVE)\public\engine;$(HL2SDKOBVALVE)\public\game\server;$(HL2SDKOBVALVE)\public\tier0;$(HL2SDKOBVALVE)\public\tier1;$(HL2SDKOBVALVE)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=7;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDKOBVALVE)\lib\public\tier0.lib;$(HL2SDKOBVALVE)\lib\public\tier1.lib;$(HL2SDKOBVALVE)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;$(HL2SDKCSS)\public;$(HL2SDKCSS)\public\engine;$(HL2SDKCSS)\public\game\server;$(HL2SDKCSS)\public\tier0;$(HL2SDKCSS)\public\tier1;$(HL2SDKCSS)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=6;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDKCSS)\lib\public\tier0.lib;$(HL2SDKCSS)\lib\public\tier1.lib;$(HL2SDKCSS)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-EYE)\public;$(HL2SDK-EYE)\public\engine;$(HL2SDK-EYE)\public\game\server;$(HL2SDK-EYE)\public\tier0;$(HL2SDK-EYE)\public\tier1;$(HL2SDK-EYE)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=5;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDK-EYE)\lib\public\tier0.lib;$(HL2SDK-EYE)\lib\public\tier1.lib;$(HL2SDK-EYE)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-BGT)\public;$(HL2SDK-BGT)\public\engine;$(HL2SDK-BGT)\public\game\server;$(HL2SDK-BGT)\public\tier0;$(HL2SDK-BGT)\public\tier1;$(HL2SDK-BGT)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=4;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDK-BGT)\lib\public\tier0.lib;$(HL2SDK-BGT)\lib\public\tier1.lib;$(HL2SDK-BGT)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKOBVALVE)\public;$(HL2SDKOBVALVE)\public\engine;$(HL2SDKOBVALVE)\public\game\server;$(HL2SDKOBVALVE)\public\tier0;$(HL2SDKOBVALVE)\public\tier1;$(HL2SDKOBVALVE)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=7;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDKOBVALVE)\lib\public\tier0.lib;$(HL2SDKOBVALVE)\lib\public\tier1.lib;$(HL2SDKOBVALVE)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;$(HL2SDKCSS)\public;$(HL2SDKCSS)\public\engine;$(HL2SDKCSS)\public\game\server;$(HL2SDKCSS)\public\tier0;$(HL2SDKCSS)\public\tier1;$(HL2SDKCSS)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=6;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDKCSS)\lib\public\tier0.lib;$(HL2SDKCSS)\lib\public\tier1.lib;$(HL2SDKCSS)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-EYE)\public;$(HL2SDK-EYE)\public\engine;$(HL2SDK-EYE)\public\game\server;$(HL2SDK-EYE)\public\tier0;$(HL2SDK-EYE)\public\tier1;$(HL2SDK-EYE)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=5;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDK-EYE)\lib\public\tier0.lib;$(HL2SDK-EYE)\lib\public\tier1.lib;$(HL2SDK-EYE)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-BGT)\public;$(HL2SDK-BGT)\public\engine;$(HL2SDK-BGT)\public\game\server;$(HL2SDK-BGT)\public\tier0;$(HL2SDK-BGT)\public\tier1;$(HL2SDK-BGT)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=4;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDK-BGT)\lib\public\tier0.lib;$(HL2SDK-BGT)\lib\public\tier1.lib;$(HL2SDK-BGT)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKL4D)\public;$(HL2SDKL4D)\public\engine;$(HL2SDKL4D)\public\game\server;$(HL2SDKL4D)\public\tier0;$(HL2SDKL4D)\public\tier1;$(HL2SDKL4D)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=8;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDKL4D)\lib\public\tier0.lib;$(HL2SDKL4D)\lib\public\tier1.lib;$(HL2SDKL4D)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKL4D)\public;$(HL2SDKL4D)\public\engine;$(HL2SDKL4D)\public\game\server;$(HL2SDKL4D)\public\tier0;$(HL2SDKL4D)\public\tier1;$(HL2SDKL4D)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=8;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDKL4D)\lib\public\tier0.lib;$(HL2SDKL4D)\lib\public\tier1.lib;$(HL2SDKL4D)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKL4D2)\public;$(HL2SDKL4D2)\public\engine;$(HL2SDKL4D2)\public\game\server;$(HL2SDKL4D2)\public\tier0;$(HL2SDKL4D2)\public\tier1;$(HL2SDKL4D2)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=9;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDKL4D2)\lib\public\tier0.lib;$(HL2SDKL4D2)\lib\public\tier1.lib;$(HL2SDKL4D2)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-SWARM)\public;$(HL2SDK-SWARM)\public\engine;$(HL2SDK-SWARM)\public\game\server;$(HL2SDK-SWARM)\public\tier0;$(HL2SDK-SWARM)\public\tier1;$(HL2SDK-SWARM)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=10;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDK-SWARM)\lib\public\interfaces.lib;$(HL2SDK-SWARM)\lib\public\tier0.lib;$(HL2SDK-SWARM)\lib\public\tier1.lib;$(HL2SDK-SWARM)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;$(HL2SDKCSGO)\public;$(HL2SDKCSGO)\public\engine;$(HL2SDKCSGO)\public\game\server;$(HL2SDKCSGO)\public\tier0;$(HL2SDKCSGO)\public\tier1;$(HL2SDKCSGO)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=12;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDKCSGO)\lib\public\interfaces.lib;$(HL2SDKCSGO)\lib\public\tier0.lib;$(HL2SDKCSGO)\lib\public\tier1.lib;$(HL2SDKCSGO)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;$(HL2SDKPORTAL2)\public;$(HL2SDKPORTAL2)\public\engine;$(HL2SDKPORTAL2)\public\game\server;$(HL2SDKPORTAL2)\public\tier0;$(HL2SDKPORTAL2)\public\tier1;$(HL2SDKPORTAL2)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=11;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDKPORTAL2)\lib\public\interfaces.lib;$(HL2SDKPORTAL2)\lib\public\tier0.lib;$(HL2SDKPORTAL2)\lib\public\tier1.lib;$(HL2SDKPORTAL2)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKL4D2)\public;$(HL2SDKL4D2)\public\engine;$(HL2SDKL4D2)\public\game\server;$(HL2SDKL4D2)\public\tier0;$(HL2SDKL4D2)\public\tier1;$(HL2SDKL4D2)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;SOURCE_ENGINE=9;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDKL4D2)\lib\public\tier0.lib;$(HL2SDKL4D2)\lib\public\tier1.lib;$(HL2SDKL4D2)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-SWARM)\public;$(HL2SDK-SWARM)\public\engine;$(HL2SDK-SWARM)\public\game\server;$(HL2SDK-SWARM)\public\tier0;$(HL2SDK-SWARM)\public\tier1;$(HL2SDK-SWARM)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=10;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDK-SWARM)\lib\public\interfaces.lib;$(HL2SDK-SWARM)\lib\public\tier0.lib;$(HL2SDK-SWARM)\lib\public\tier1.lib;$(HL2SDK-SWARM)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;$(HL2SDKCSGO)\public;$(HL2SDKCSGO)\public\engine;$(HL2SDKCSGO)\public\game\server;$(HL2SDKCSGO)\public\tier0;$(HL2SDKCSGO)\public\tier1;$(HL2SDKCSGO)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=12;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDKCSGO)\lib\public\interfaces.lib;$(HL2SDKCSGO)\lib\public\tier0.lib;$(HL2SDKCSGO)\lib\public\tier1.lib;$(HL2SDKCSGO)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;$(HL2SDKPORTAL2)\public;$(HL2SDKPORTAL2)\public\engine;$(HL2SDKPORTAL2)\public\game\server;$(HL2SDKPORTAL2)\public\tier0;$(HL2SDKPORTAL2)\public\tier1;$(HL2SDKPORTAL2)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;SAMPLE_MM_EXPORTS;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=11;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDKPORTAL2)\lib\public\interfaces.lib;$(HL2SDKPORTAL2)\lib\public\tier0.lib;$(HL2SDKPORTAL2)\lib\public\tier1.lib;$(HL2SDKPORTAL2)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)sample_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/metamod-source/samples/s1_sample_mm/msvc10/sample_mm.vcxproj.filters b/metamod-source/samples/s1_sample_mm/msvc10/sample_mm.vcxproj.filters deleted file mode 100644 index 6680f772..00000000 --- a/metamod-source/samples/s1_sample_mm/msvc10/sample_mm.vcxproj.filters +++ /dev/null @@ -1,30 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/metamod-source/samples/s1_sample_mm/msvc8/sample_mm.sln b/metamod-source/samples/s1_sample_mm/msvc8/sample_mm.sln deleted file mode 100644 index c6da3ad4..00000000 --- a/metamod-source/samples/s1_sample_mm/msvc8/sample_mm.sln +++ /dev/null @@ -1,57 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample_mm", "sample_mm.vcproj", "{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug - Alien Swarm|Win32 = Debug - Alien Swarm|Win32 - Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32 - Debug - Left 4 Dead 2|Win32 = Debug - Left 4 Dead 2|Win32 - Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32 - Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32 - Debug - Orange Box|Win32 = Debug - Orange Box|Win32 - Debug - Original|Win32 = Debug - Original|Win32 - Release - Alien Swarm|Win32 = Release - Alien Swarm|Win32 - Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32 - Release - Left 4 Dead 2|Win32 = Release - Left 4 Dead 2|Win32 - Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32 - Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32 - Release - Orange Box|Win32 = Release - Orange Box|Win32 - Release - Original|Win32 = Release - Original|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Alien Swarm|Win32.ActiveCfg = Debug - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Alien Swarm|Win32.Build.0 = Debug - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead 2|Win32.ActiveCfg = Debug - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead 2|Win32.Build.0 = Debug - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box Valve|Win32.ActiveCfg = Debug - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.ActiveCfg = Debug - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.Build.0 = Debug - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Alien Swarm|Win32.ActiveCfg = Release - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Alien Swarm|Win32.Build.0 = Release - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead 2|Win32.ActiveCfg = Release - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead 2|Win32.Build.0 = Release - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box Valve|Win32.ActiveCfg = Release - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box Valve|Win32.Build.0 = Release - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Original|Win32.ActiveCfg = Release - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Original|Win32.Build.0 = Release - Original|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal - diff --git a/metamod-source/samples/s1_sample_mm/msvc8/sample_mm.vcproj b/metamod-source/samples/s1_sample_mm/msvc8/sample_mm.vcproj deleted file mode 100644 index 6115365e..00000000 --- a/metamod-source/samples/s1_sample_mm/msvc8/sample_mm.vcproj +++ /dev/null @@ -1,1175 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metamod-source/samples/s1_sample_mm/msvc9/sample_mm.sln b/metamod-source/samples/s1_sample_mm/msvc9/sample_mm.sln deleted file mode 100644 index b7c42522..00000000 --- a/metamod-source/samples/s1_sample_mm/msvc9/sample_mm.sln +++ /dev/null @@ -1,56 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample_mm", "sample_mm.vcproj", "{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug - Alien Swarm|Win32 = Debug - Alien Swarm|Win32 - Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32 - Debug - Left 4 Dead 2|Win32 = Debug - Left 4 Dead 2|Win32 - Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32 - Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32 - Debug - Orange Box|Win32 = Debug - Orange Box|Win32 - Debug - Original|Win32 = Debug - Original|Win32 - Release - Alien Swarm|Win32 = Release - Alien Swarm|Win32 - Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32 - Release - Left 4 Dead 2|Win32 = Release - Left 4 Dead 2|Win32 - Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32 - Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32 - Release - Orange Box|Win32 = Release - Orange Box|Win32 - Release - Original|Win32 = Release - Original|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Alien Swarm|Win32.ActiveCfg = Debug - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Alien Swarm|Win32.Build.0 = Debug - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead 2|Win32.ActiveCfg = Debug - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead 2|Win32.Build.0 = Debug - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box Valve|Win32.ActiveCfg = Debug - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.ActiveCfg = Debug - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.Build.0 = Debug - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Alien Swarm|Win32.ActiveCfg = Release - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Alien Swarm|Win32.Build.0 = Release - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead 2|Win32.ActiveCfg = Release - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead 2|Win32.Build.0 = Release - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box Valve|Win32.ActiveCfg = Release - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box Valve|Win32.Build.0 = Release - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Original|Win32.ActiveCfg = Release - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Original|Win32.Build.0 = Release - Original|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/metamod-source/samples/s1_sample_mm/msvc9/sample_mm.vcproj b/metamod-source/samples/s1_sample_mm/msvc9/sample_mm.vcproj deleted file mode 100644 index 06b7bc97..00000000 --- a/metamod-source/samples/s1_sample_mm/msvc9/sample_mm.vcproj +++ /dev/null @@ -1,1162 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metamod-source/samples/s1_sample_mm/product.version b/metamod-source/samples/s1_sample_mm/product.version deleted file mode 100644 index 6e8bf73a..00000000 --- a/metamod-source/samples/s1_sample_mm/product.version +++ /dev/null @@ -1 +0,0 @@ -0.1.0 diff --git a/metamod-source/samples/s1_sample_mm/sample_mm.cpp b/metamod-source/samples/s1_sample_mm/sample_mm.cpp deleted file mode 100644 index 01951aca..00000000 --- a/metamod-source/samples/s1_sample_mm/sample_mm.cpp +++ /dev/null @@ -1,357 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source Sample Plugin - * Written by AlliedModders LLC. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * This sample plugin is public domain. - */ - -#include -#include "sample_mm.h" - -SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, 0, bool, char const *, char const *, char const *, char const *, bool, bool); -SH_DECL_HOOK3_void(IServerGameDLL, ServerActivate, SH_NOATTRIB, 0, edict_t *, int, int); -SH_DECL_HOOK1_void(IServerGameDLL, GameFrame, SH_NOATTRIB, 0, bool); -SH_DECL_HOOK0_void(IServerGameDLL, LevelShutdown, SH_NOATTRIB, 0); -SH_DECL_HOOK2_void(IServerGameClients, ClientActive, SH_NOATTRIB, 0, edict_t *, bool); -SH_DECL_HOOK1_void(IServerGameClients, ClientDisconnect, SH_NOATTRIB, 0, edict_t *); -SH_DECL_HOOK2_void(IServerGameClients, ClientPutInServer, SH_NOATTRIB, 0, edict_t *, char const *); -SH_DECL_HOOK1_void(IServerGameClients, SetCommandClient, SH_NOATTRIB, 0, int); -SH_DECL_HOOK1_void(IServerGameClients, ClientSettingsChanged, SH_NOATTRIB, 0, edict_t *); -SH_DECL_HOOK5(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, edict_t *, const char*, const char *, char *, int); -SH_DECL_HOOK2(IGameEventManager2, FireEvent, SH_NOATTRIB, 0, bool, IGameEvent *, bool); - -#if SOURCE_ENGINE >= SE_ORANGEBOX -SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t *, const CCommand &); -#else -SH_DECL_HOOK1_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t *); -#endif - -SamplePlugin g_SamplePlugin; -IServerGameDLL *server = NULL; -IServerGameClients *gameclients = NULL; -IVEngineServer *engine = NULL; -IServerPluginHelpers *helpers = NULL; -IGameEventManager2 *gameevents = NULL; -IServerPluginCallbacks *vsp_callbacks = NULL; -IPlayerInfoManager *playerinfomanager = NULL; -ICvar *icvar = NULL; -CGlobalVars *gpGlobals = NULL; - -ConVar sample_cvar("sample_cvar", "42", 0); - -/** - * Something like this is needed to register cvars/CON_COMMANDs. - */ -class BaseAccessor : public IConCommandBaseAccessor -{ -public: - bool RegisterConCommandBase(ConCommandBase *pCommandBase) - { - /* Always call META_REGCVAR instead of going through the engine. */ - return META_REGCVAR(pCommandBase); - } -} s_BaseAccessor; - -PLUGIN_EXPOSE(SamplePlugin, g_SamplePlugin); -bool SamplePlugin::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late) -{ - PLUGIN_SAVEVARS(); - - GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER); - GET_V_IFACE_CURRENT(GetEngineFactory, gameevents, IGameEventManager2, INTERFACEVERSION_GAMEEVENTSMANAGER2); - GET_V_IFACE_CURRENT(GetEngineFactory, helpers, IServerPluginHelpers, INTERFACEVERSION_ISERVERPLUGINHELPERS); - GET_V_IFACE_CURRENT(GetEngineFactory, icvar, ICvar, CVAR_INTERFACE_VERSION); - GET_V_IFACE_ANY(GetServerFactory, server, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL); - GET_V_IFACE_ANY(GetServerFactory, gameclients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS); - GET_V_IFACE_ANY(GetServerFactory, playerinfomanager, IPlayerInfoManager, INTERFACEVERSION_PLAYERINFOMANAGER); - - gpGlobals = ismm->GetCGlobals(); - - META_LOG(g_PLAPI, "Starting plugin."); - - /* Load the VSP listener. This is usually needed for IServerPluginHelpers. */ - if ((vsp_callbacks = ismm->GetVSPInfo(NULL)) == NULL) - { - ismm->AddListener(this, this); - ismm->EnableVSPListener(); - } - - SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelInit, server, this, &SamplePlugin::Hook_LevelInit, true); - SH_ADD_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, server, this, &SamplePlugin::Hook_ServerActivate, true); - SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameFrame, server, this, &SamplePlugin::Hook_GameFrame, true); - SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, server, this, &SamplePlugin::Hook_LevelShutdown, false); - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientActive, gameclients, this, &SamplePlugin::Hook_ClientActive, true); - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, gameclients, this, &SamplePlugin::Hook_ClientDisconnect, true); - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, gameclients, this, &SamplePlugin::Hook_ClientPutInServer, true); - SH_ADD_HOOK_MEMFUNC(IServerGameClients, SetCommandClient, gameclients, this, &SamplePlugin::Hook_SetCommandClient, true); - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientSettingsChanged, gameclients, this, &SamplePlugin::Hook_ClientSettingsChanged, false); - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientConnect, gameclients, this, &SamplePlugin::Hook_ClientConnect, false); - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientCommand, gameclients, this, &SamplePlugin::Hook_ClientCommand, false); - - ENGINE_CALL(LogPrint)("All hooks started!\n"); - -#if SOURCE_ENGINE >= SE_ORANGEBOX - g_pCVar = icvar; - ConVar_Register(0, &s_BaseAccessor); -#else - ConCommandBaseMgr::OneTimeInit(&s_BaseAccessor); -#endif - - return true; -} - -bool SamplePlugin::Unload(char *error, size_t maxlen) -{ - SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelInit, server, this, &SamplePlugin::Hook_LevelInit, true); - SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, server, this, &SamplePlugin::Hook_ServerActivate, true); - SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameFrame, server, this, &SamplePlugin::Hook_GameFrame, true); - SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, server, this, &SamplePlugin::Hook_LevelShutdown, false); - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientActive, gameclients, this, &SamplePlugin::Hook_ClientActive, true); - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, gameclients, this, &SamplePlugin::Hook_ClientDisconnect, true); - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, gameclients, this, &SamplePlugin::Hook_ClientPutInServer, true); - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, SetCommandClient, gameclients, this, &SamplePlugin::Hook_SetCommandClient, true); - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientSettingsChanged, gameclients, this, &SamplePlugin::Hook_ClientSettingsChanged, false); - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientConnect, gameclients, this, &SamplePlugin::Hook_ClientConnect, false); - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientCommand, gameclients, this, &SamplePlugin::Hook_ClientCommand, false); - - return true; -} - -void SamplePlugin::OnVSPListening(IServerPluginCallbacks *iface) -{ - vsp_callbacks = iface; -} - -void SamplePlugin::Hook_ServerActivate(edict_t *pEdictList, int edictCount, int clientMax) -{ - META_LOG(g_PLAPI, "ServerActivate() called: edictCount = %d, clientMax = %d", edictCount, clientMax); -} - -void SamplePlugin::AllPluginsLoaded() -{ - /* This is where we'd do stuff that relies on the mod or other plugins - * being initialized (for example, cvars added and events registered). - */ -} - -void SamplePlugin::Hook_ClientActive(edict_t *pEntity, bool bLoadGame) -{ - META_LOG(g_PLAPI, "Hook_ClientActive(%d, %d)", IndexOfEdict(pEntity), bLoadGame); -} - -#if SOURCE_ENGINE >= SE_ORANGEBOX -void SamplePlugin::Hook_ClientCommand(edict_t *pEntity, const CCommand &args) -#else -void SamplePlugin::Hook_ClientCommand(edict_t *pEntity) -#endif -{ -#if SOURCE_ENGINE <= SE_DARKMESSIAH - CCommand args; -#endif - - if (!pEntity || pEntity->IsFree()) - { - return; - } - - const char *cmd = args.Arg(0); - if (strcmp(cmd, "menu") == 0) - { - KeyValues *kv = new KeyValues("menu"); - kv->SetString("title", "You've got options, hit ESC"); - kv->SetInt("level", 1); - kv->SetColor("color", Color(255, 0, 0, 255)); - kv->SetInt("time", 20); - kv->SetString("msg", "Pick an option\nOr don't."); - - for (int i = 1; i < 9; i++) - { - char num[10], msg[10], cmd[10]; - MM_Format( num, sizeof(num), "%i", i ); - MM_Format( msg, sizeof(msg), "Option %i", i ); - MM_Format( cmd, sizeof(cmd), "option %i", i ); - - KeyValues *item1 = kv->FindKey(num, true); - item1->SetString("msg", msg); - item1->SetString("command", cmd); - } - - helpers->CreateMessage(pEntity, DIALOG_MENU, kv, vsp_callbacks); - kv->deleteThis(); - RETURN_META(MRES_SUPERCEDE); - } - else if (strcmp(cmd, "rich") == 0) - { - KeyValues *kv = new KeyValues("menu"); - kv->SetString("title", "A rich message"); - kv->SetInt("level", 1); - kv->SetInt("time", 20); - kv->SetString("msg", "This is a long long long text string.\n\nIt also has line breaks."); - - helpers->CreateMessage(pEntity, DIALOG_TEXT, kv, vsp_callbacks); - kv->deleteThis(); - RETURN_META(MRES_SUPERCEDE); - } - else if (strcmp(cmd, "msg") == 0) - { - KeyValues *kv = new KeyValues("menu"); - kv->SetString("title", "Just a simple hello"); - kv->SetInt("level", 1); - kv->SetInt("time", 20); - - helpers->CreateMessage(pEntity, DIALOG_MSG, kv, vsp_callbacks); - kv->deleteThis(); - RETURN_META(MRES_SUPERCEDE); - } - else if (strcmp(cmd, "entry") == 0) - { - KeyValues *kv = new KeyValues("entry"); - kv->SetString("title", "Stuff"); - kv->SetString("msg", "Enter something"); - kv->SetString("command", "say"); // anything they enter into the dialog turns into a say command - kv->SetInt("level", 1); - kv->SetInt("time", 20); - - helpers->CreateMessage(pEntity, DIALOG_ENTRY, kv, vsp_callbacks); - kv->deleteThis(); - RETURN_META(MRES_SUPERCEDE); - } -} - -void SamplePlugin::Hook_ClientSettingsChanged(edict_t *pEdict) -{ - if (playerinfomanager) - { - IPlayerInfo *playerinfo = playerinfomanager->GetPlayerInfo(pEdict); - - const char *name = engine->GetClientConVarValue(IndexOfEdict(pEdict), "name"); - - if (playerinfo != NULL - && name != NULL - && strcmp(engine->GetPlayerNetworkIDString(pEdict), "BOT") != 0 - && playerinfo->GetName() != NULL - && strcmp(name, playerinfo->GetName()) == 0) - { - char msg[128]; - MM_Format(msg, sizeof(msg), "Your name changed to \"%s\" (from \"%s\")\n", name, playerinfo->GetName()); - engine->ClientPrintf(pEdict, msg); - } - } -} - -bool SamplePlugin::Hook_ClientConnect(edict_t *pEntity, - const char *pszName, - const char *pszAddress, - char *reject, - int maxrejectlen) -{ - META_LOG(g_PLAPI, "Hook_ClientConnect(%d, \"%s\", \"%s\")", IndexOfEdict(pEntity), pszName, pszAddress); - - return true; -} - -void SamplePlugin::Hook_ClientPutInServer(edict_t *pEntity, char const *playername) -{ - KeyValues *kv = new KeyValues( "msg" ); - kv->SetString( "title", "Hello" ); - kv->SetString( "msg", "Hello there" ); - kv->SetColor( "color", Color( 255, 0, 0, 255 )); - kv->SetInt( "level", 5); - kv->SetInt( "time", 10); - helpers->CreateMessage(pEntity, DIALOG_MSG, kv, vsp_callbacks); - kv->deleteThis(); -} - -void SamplePlugin::Hook_ClientDisconnect(edict_t *pEntity) -{ - META_LOG(g_PLAPI, "Hook_ClientDisconnect(%d)", IndexOfEdict(pEntity)); -} - -void SamplePlugin::Hook_GameFrame(bool simulating) -{ - /** - * simulating: - * *********** - * true | game is ticking - * false | game is not ticking - */ -} - -bool SamplePlugin::Hook_LevelInit(const char *pMapName, - char const *pMapEntities, - char const *pOldLevel, - char const *pLandmarkName, - bool loadGame, - bool background) -{ - META_LOG(g_PLAPI, "Hook_LevelInit(%s)", pMapName); - - return true; -} - -void SamplePlugin::Hook_LevelShutdown() -{ - META_LOG(g_PLAPI, "Hook_LevelShutdown()"); -} - -void SamplePlugin::Hook_SetCommandClient(int index) -{ - META_LOG(g_PLAPI, "Hook_SetCommandClient(%d)", index); -} - -bool SamplePlugin::Pause(char *error, size_t maxlen) -{ - return true; -} - -bool SamplePlugin::Unpause(char *error, size_t maxlen) -{ - return true; -} - -const char *SamplePlugin::GetLicense() -{ - return "Public Domain"; -} - -const char *SamplePlugin::GetVersion() -{ - return "1.0.0.0"; -} - -const char *SamplePlugin::GetDate() -{ - return __DATE__; -} - -const char *SamplePlugin::GetLogTag() -{ - return "SAMPLE"; -} - -const char *SamplePlugin::GetAuthor() -{ - return "AlliedModders LLC"; -} - -const char *SamplePlugin::GetDescription() -{ - return "Sample basic plugin"; -} - -const char *SamplePlugin::GetName() -{ - return "Sample Plugin"; -} - -const char *SamplePlugin::GetURL() -{ - return "http://www.sourcemm.net/"; -} diff --git a/metamod-source/samples/s1_sample_mm/sample_mm.h b/metamod-source/samples/s1_sample_mm/sample_mm.h deleted file mode 100644 index 7268506b..00000000 --- a/metamod-source/samples/s1_sample_mm/sample_mm.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source Sample Plugin - * Written by AlliedModders LLC. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * This sample plugin is public domain. - */ - -#ifndef _INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_ -#define _INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_ - -#include -#include -#include -#include -#include "engine_wrappers.h" - -#if defined WIN32 && !defined snprintf -#define snprintf _snprintf -#endif - -class SamplePlugin : public ISmmPlugin, public IMetamodListener -{ -public: - bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late); - bool Unload(char *error, size_t maxlen); - bool Pause(char *error, size_t maxlen); - bool Unpause(char *error, size_t maxlen); - void AllPluginsLoaded(); -public: //IMetamodListener stuff - void OnVSPListening(IServerPluginCallbacks *iface); -public: //hooks - void Hook_ServerActivate(edict_t *pEdictList, int edictCount, int clientMax); - bool Hook_LevelInit(const char *pMapName, - char const *pMapEntities, - char const *pOldLevel, - char const *pLandmarkName, - bool loadGame, - bool background); - void Hook_GameFrame(bool simulating); - void Hook_LevelShutdown(void); - void Hook_ClientActive(edict_t *pEntity, bool bLoadGame); - void Hook_ClientDisconnect(edict_t *pEntity); - void Hook_ClientPutInServer(edict_t *pEntity, char const *playername); - void Hook_SetCommandClient(int index); - void Hook_ClientSettingsChanged(edict_t *pEdict); - bool Hook_ClientConnect(edict_t *pEntity, - const char *pszName, - const char *pszAddress, - char *reject, - int maxrejectlen); -#if SOURCE_ENGINE >= SE_ORANGEBOX - void Hook_ClientCommand(edict_t *pEntity, const CCommand &args); -#else - void Hook_ClientCommand(edict_t *pEntity); -#endif -public: - const char *GetAuthor(); - const char *GetName(); - const char *GetDescription(); - const char *GetURL(); - const char *GetLicense(); - const char *GetVersion(); - const char *GetDate(); - const char *GetLogTag(); -}; - -extern SamplePlugin g_SamplePlugin; - -PLUGIN_GLOBALVARS(); - -#endif //_INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_ diff --git a/metamod-source/samples/s1_sample_mm/sample_mm.vdf b/metamod-source/samples/s1_sample_mm/sample_mm.vdf deleted file mode 100644 index 715ee306..00000000 --- a/metamod-source/samples/s1_sample_mm/sample_mm.vdf +++ /dev/null @@ -1,5 +0,0 @@ -"Metamod Plugin" -{ - "alias" "sample" - "file" "addons/sample_mm" -} diff --git a/metamod-source/samples/s1_stub_mm/Makefile b/metamod-source/samples/s1_stub_mm/Makefile deleted file mode 100644 index 6060a30e..00000000 --- a/metamod-source/samples/s1_stub_mm/Makefile +++ /dev/null @@ -1,229 +0,0 @@ -# (C)2004-2010 Metamod:Source Development Team -# Makefile written by David "BAILOPAN" Anderson - -########################################### -### EDIT THESE PATHS FOR YOUR OWN SETUP ### -########################################### - -HL2SDK_ORIG = ../../hl2sdk -HL2SDK_OB = ../../hl2sdk-ob -HL2SDK_CSS = ../../hl2sdk-css -HL2SDK_OB_VALVE = ../../hl2sdk-ob-valve -HL2SDK_L4D = ../../hl2sdk-l4d -HL2SDK_L4D2 = ../../hl2sdk-l4d2 -HL2SDK_CSGO = ../../hl2sdk-csgo -MMSOURCE19 = .. - -##################################### -### EDIT BELOW FOR OTHER PROJECTS ### -##################################### - -PROJECT = stub_mm -OBJECTS = stub_mm.cpp - -############################################## -### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ### -############################################## - -OPT_FLAGS = -O3 -funroll-loops -pipe -GCC4_FLAGS = -fvisibility=hidden -fvisibility-inlines-hidden -std=c++11 -DEBUG_FLAGS = -g -ggdb3 -D_DEBUG -CPP = gcc -CPP_OSX = clang - -########################## -### SDK CONFIGURATIONS ### -########################## - -override ENGSET = false - -# Check for valid list of engines -ifneq (,$(filter original orangebox orangeboxvalve css left4dead left4dead2 csgo,$(ENGINE))) - override ENGSET = true -endif - -ifeq "$(ENGINE)" "original" - HL2SDK = $(HL2SDK_ORIG) - CFLAGS += -DSOURCE_ENGINE=1 -endif -ifeq "$(ENGINE)" "orangebox" - HL2SDK = $(HL2SDK_OB) - CFLAGS += -DSOURCE_ENGINE=3 -endif -ifeq "$(ENGINE)" "css" - HL2SDK = $(HL2SDK_CSS) - CFLAGS += -DSOURCE_ENGINE=6 -endif -ifeq "$(ENGINE)" "orangeboxvalve" - HL2SDK = $(HL2SDK_OB_VALVE) - CFLAGS += -DSOURCE_ENGINE=7 -endif -ifeq "$(ENGINE)" "left4dead" - HL2SDK = $(HL2SDK_L4D) - CFLAGS += -DSOURCE_ENGINE=8 -endif -ifeq "$(ENGINE)" "left4dead2" - HL2SDK = $(HL2SDK_L4D2) - CFLAGS += -DSOURCE_ENGINE=9 -endif -ifeq "$(ENGINE)" "csgo" - HL2SDK = $(HL2SDK_CSGO) - CFLAGS += -DSOURCE_ENGINE=12 -endif - -HL2PUB = $(HL2SDK)/public - -ifeq "$(ENGINE)" "original" - INCLUDE += -I$(HL2SDK)/public/dlls - METAMOD = $(MMSOURCE19)/core-legacy -else - INCLUDE += -I$(HL2SDK)/public/game/server - METAMOD = $(MMSOURCE19)/core -endif - -OS := $(shell uname -s) - -ifeq "$(OS)" "Darwin" - LIB_EXT = dylib - ifeq "$(ENGINE)" "csgo" - HL2LIB = $(HL2SDK)/lib/osx64 - else - HL2LIB = $(HL2SDK)/lib/mac - endif -else - LIB_EXT = so - ifeq "$(ENGINE)" "original" - HL2LIB = $(HL2SDK)/linux_sdk - else - HL2LIB = $(HL2SDK)/lib/linux - endif -endif - -# if ENGINE is original or OB -ifneq (,$(filter original orangebox,$(ENGINE))) - LIB_SUFFIX = _i486.$(LIB_EXT) -else - LIB_PREFIX = lib - ifneq (,$(filter orangeboxvalve css left4dead2,$(ENGINE))) - ifneq "$(OS)" "Darwin" - LIB_SUFFIX = _srv.$(LIB_EXT) - else - LIB_SUFFIX = .$(LIB_EXT) - endif - else - LIB_SUFFIX = .$(LIB_EXT) - endif -endif - -ifeq "$(OS)" "Darwin" - ifeq "$(ENGINE)" "csgo" - STATIC_SUFFIX = - else - STATIC_SUFFIX = _i486 - endif -else - STATIC_SUFFIX = _i486 -endif - -CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_BLOODYGOODTIME=4 -DSE_EYE=5 \ - -DSE_CSS=6 -DSE_ORANGEBOXVALVE=7 -DSE_LEFT4DEAD=8 -DSE_LEFT4DEAD2=9 -DSE_ALIENSWARM=10 \ - -DSE_PORTAL2=11 -DSE_CSGO=12 - -LINK += $(HL2LIB)/tier1$(STATIC_SUFFIX).a $(LIB_PREFIX)vstdlib$(LIB_SUFFIX) $(LIB_PREFIX)tier0$(LIB_SUFFIX) - -ifeq "$(ENGINE)" "csgo" - LINK += $(HL2LIB)/interfaces$(STATIC_SUFFIX).a -endif - -INCLUDE += -I. -I.. -I$(HL2PUB) -I$(HL2PUB)/engine -I$(HL2PUB)/mathlib -I$(HL2PUB)/vstdlib \ - -I$(HL2PUB)/tier0 -I$(HL2PUB)/tier1 -I. -I$(METAMOD) -I$(METAMOD)/sourcehook - -################################################ -### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ### -################################################ - -BINARY = $(PROJECT).$(LIB_EXT) - -ifeq "$(DEBUG)" "true" - BIN_DIR = Debug.$(ENGINE) - CFLAGS += $(DEBUG_FLAGS) -else - BIN_DIR = Release.$(ENGINE) - CFLAGS += $(OPT_FLAGS) -endif - -ifeq "$(OS)" "Darwin" - CPP = $(CPP_OSX) - LIB_EXT = dylib - CFLAGS += -DOSX -D_OSX -mmacosx-version-min=10.9 - LINK += -dynamiclib -lc++ -mmacosx-version-min=10.9 - ifeq "$(ENGINE)" "csgo" - CFLAGS += -m64 -DX64BITS -DPLATFORM_64BITS - LINK += -m64 - else - CFLAGS += -m32 - LINK += -m32 - endif -else - LIB_EXT = so - CFLAGS += -D_LINUX -m32 - LINK += -shared -m32 -endif - -IS_CLANG := $(shell $(CPP) --version | head -1 | grep clang > /dev/null && echo "1" || echo "0") - -ifeq "$(IS_CLANG)" "1" - CPP_MAJOR := $(shell $(CPP) --version | grep clang | sed "s/.*version \([0-9]\)*\.[0-9]*.*/\1/") - CPP_MINOR := $(shell $(CPP) --version | grep clang | sed "s/.*version [0-9]*\.\([0-9]\)*.*/\1/") -else - CPP_MAJOR := $(shell $(CPP) -dumpversion >&1 | cut -b1) - CPP_MINOR := $(shell $(CPP) -dumpversion >&1 | cut -b3) -endif - -CFLAGS += -DPOSIX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp \ - -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca \ - -Dstrcmpi=strcasecmp -DCOMPILER_GCC -Wall -Wno-non-virtual-dtor -Wno-overloaded-virtual \ - -Werror -fPIC -fno-exceptions -fno-rtti -msse -fno-strict-aliasing - -# Clang || GCC >= 4 -ifeq "$(shell expr $(IS_CLANG) \| $(CPP_MAJOR) \>= 4)" "1" - CFLAGS += $(GCC4_FLAGS) -endif - -# Clang >= 3 || GCC >= 4.7 -ifeq "$(shell expr $(IS_CLANG) \& $(CPP_MAJOR) \>= 3 \| $(CPP_MAJOR) \>= 4 \& $(CPP_MINOR) \>= 7)" "1" - CFLAGS += -Wno-delete-non-virtual-dtor -Wno-unused-private-field -Wno-deprecated-register -endif - -# OS is Linux and not using clang -ifeq "$(shell expr $(OS) \= Linux \& $(IS_CLANG) \= 0)" "1" - LINK += -static-libgcc -endif - -OBJ_BIN := $(OBJECTS:%.cpp=$(BIN_DIR)/%.o) - -$(BIN_DIR)/%.o: %.cpp - $(CPP) $(INCLUDE) $(CFLAGS) -o $@ -c $< - -all: check - mkdir -p $(BIN_DIR) - ln -sf $(HL2LIB)/$(LIB_PREFIX)vstdlib$(LIB_SUFFIX) - ln -sf $(HL2LIB)/$(LIB_PREFIX)tier0$(LIB_SUFFIX) - $(MAKE) -f Makefile stub_mm - -check: - if [ "$(ENGSET)" = "false" ]; then \ - echo "You must supply one of the following values for ENGINE:"; \ - echo "csgo, left4dead2, left4dead, css, orangeboxvalve, orangebox, or original"; \ - exit 1; \ - fi - -stub_mm: check $(OBJ_BIN) - $(CPP) $(INCLUDE) $(OBJ_BIN) $(LINK) -ldl -lm -o $(BIN_DIR)/$(BINARY) - -default: all - -clean: check - rm -rf $(BIN_DIR)/*.o - rm -rf $(BIN_DIR)/$(BINARY) - diff --git a/metamod-source/samples/s1_stub_mm/README.md b/metamod-source/samples/s1_stub_mm/README.md deleted file mode 100644 index aa8cbc13..00000000 --- a/metamod-source/samples/s1_stub_mm/README.md +++ /dev/null @@ -1,4 +0,0 @@ -For more information on compiling and reading the plugin's source code, see: - - http://wiki.alliedmods.net/Category:Metamod:Source_Development - diff --git a/metamod-source/samples/s1_stub_mm/msvc10/stub_mm.sln b/metamod-source/samples/s1_stub_mm/msvc10/stub_mm.sln deleted file mode 100644 index 2bbacd7a..00000000 --- a/metamod-source/samples/s1_stub_mm/msvc10/stub_mm.sln +++ /dev/null @@ -1,56 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stub_mm", "stub_mm.vcxproj", "{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug - Alien Swarm|Win32 = Debug - Alien Swarm|Win32 - Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32 - Debug - Left 4 Dead 2|Win32 = Debug - Left 4 Dead 2|Win32 - Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32 - Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32 - Debug - Orange Box|Win32 = Debug - Orange Box|Win32 - Debug - Original|Win32 = Debug - Original|Win32 - Release - Alien Swarm|Win32 = Release - Alien Swarm|Win32 - Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32 - Release - Left 4 Dead 2|Win32 = Release - Left 4 Dead 2|Win32 - Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32 - Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32 - Release - Orange Box|Win32 = Release - Orange Box|Win32 - Release - Original|Win32 = Release - Original|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Alien Swarm|Win32.ActiveCfg = Debug - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Alien Swarm|Win32.Build.0 = Debug - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead 2|Win32.ActiveCfg = Debug - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead 2|Win32.Build.0 = Debug - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box Valve|Win32.ActiveCfg = Debug - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.ActiveCfg = Debug - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.Build.0 = Debug - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Alien Swarm|Win32.ActiveCfg = Release - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Alien Swarm|Win32.Build.0 = Release - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead 2|Win32.ActiveCfg = Release - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead 2|Win32.Build.0 = Release - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box Valve|Win32.ActiveCfg = Release - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box Valve|Win32.Build.0 = Release - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Original|Win32.ActiveCfg = Release - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Original|Win32.Build.0 = Release - Original|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/metamod-source/samples/s1_stub_mm/msvc10/stub_mm.vcxproj b/metamod-source/samples/s1_stub_mm/msvc10/stub_mm.vcxproj deleted file mode 100644 index 9ef0f93a..00000000 --- a/metamod-source/samples/s1_stub_mm/msvc10/stub_mm.vcxproj +++ /dev/null @@ -1,1155 +0,0 @@ - - - - - Debug - Alien Swarm - Win32 - - - Debug - Bloody Good Time - Win32 - - - Debug - CS GO - Win32 - - - Debug - CSS - Win32 - - - Debug - Dark Messiah - Win32 - - - Debug - EYE - Win32 - - - Debug - Left 4 Dead 2 - Win32 - - - Debug - Left 4 Dead - Win32 - - - Debug - Orange Box Valve - Win32 - - - Debug - Orange Box - Win32 - - - Debug - Original - Win32 - - - Debug - Portal 2 - Win32 - - - Release - Alien Swarm - Win32 - - - Release - Bloody Good Time - Win32 - - - Release - CS GO - Win32 - - - Release - CSS - Win32 - - - Release - Dark Messiah - Win32 - - - Release - EYE - Win32 - - - Release - Left 4 Dead 2 - Win32 - - - Release - Left 4 Dead - Win32 - - - Release - Orange Box Valve - Win32 - - - Release - Orange Box - Win32 - - - Release - Original - Win32 - - - Release - Portal 2 - Win32 - - - - {EA8E7106-8D09-46A1-881B-FFBC4B8532F2} - stub_mm - Win32Proj - - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - - - DynamicLibrary - MultiByte - true - - - DynamicLibrary - MultiByte - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - true - true - true - true - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - false - false - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - true - true - true - true - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - false - false - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - - - AllRules.ruleset - - - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - AllRules.ruleset - - - - - - - - - AllRules.ruleset - - - AllRules.ruleset - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core-legacy;$(MMSOURCE18)\core-legacy\sourcehook;$(HL2SDK)\public;$(HL2SDK)\public\dlls;$(HL2SDK)\public\engine;$(HL2SDK)\public\tier0;$(HL2SDK)\public\tier1;$(HL2SDK)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=1;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDK)\lib\public\tier0.lib;$(HL2SDK)\lib\public\tier1.lib;$(HL2SDK)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core-legacy;$(MMSOURCE18)\core-legacy\sourcehook;$(HL2SDK)\public;$(HL2SDK)\public\dlls;$(HL2SDK)\public\engine;$(HL2SDK)\public\tier0;$(HL2SDK)\public\tier1;$(HL2SDK)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=1;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDK)\lib\public\tier0.lib;$(HL2SDK)\lib\public\tier1.lib;$(HL2SDK)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-DARKM)\public;$(HL2SDK-DARKM)\public\engine;$(HL2SDK-DARKM)\public\dlls;$(HL2SDK-DARKM)\public\tier0;$(HL2SDK-DARKM)\public\tier1;$(HL2SDK-DARKM)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=2;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDK-DARKM)\lib\public\tier0.lib;$(HL2SDK-DARKM)\lib\public\tier1.lib;$(HL2SDK-DARKM)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-DARKM)\public;$(HL2SDK-DARKM)\public\engine;$(HL2SDK-DARKM)\public\dlls;$(HL2SDK-DARKM)\public\tier0;$(HL2SDK-DARKM)\public\tier1;$(HL2SDK-DARKM)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=2;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDK-DARKM)\lib\public\tier0.lib;$(HL2SDK-DARKM)\lib\public\tier1.lib;$(HL2SDK-DARKM)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKOB)\public;$(HL2SDKOB)\public\engine;$(HL2SDKOB)\public\game\server;$(HL2SDKOB)\public\tier0;$(HL2SDKOB)\public\tier1;$(HL2SDKOB)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=3;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDKOB)\lib\public\tier0.lib;$(HL2SDKOB)\lib\public\tier1.lib;$(HL2SDKOB)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKOB)\public;$(HL2SDKOB)\public\engine;$(HL2SDKOB)\public\game\server;$(HL2SDKOB)\public\tier0;$(HL2SDKOB)\public\tier1;$(HL2SDKOB)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=3;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDKOB)\lib\public\tier0.lib;$(HL2SDKOB)\lib\public\tier1.lib;$(HL2SDKOB)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKOBVALVE)\public;$(HL2SDKOBVALVE)\public\engine;$(HL2SDKOBVALVE)\public\game\server;$(HL2SDKOBVALVE)\public\tier0;$(HL2SDKOBVALVE)\public\tier1;$(HL2SDKOBVALVE)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=7;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDKOBVALVE)\lib\public\tier0.lib;$(HL2SDKOBVALVE)\lib\public\tier1.lib;$(HL2SDKOBVALVE)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;$(HL2SDKCSS)\public;$(HL2SDKCSS)\public\engine;$(HL2SDKCSS)\public\game\server;$(HL2SDKCSS)\public\tier0;$(HL2SDKCSS)\public\tier1;$(HL2SDKCSS)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=6;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDKCSS)\lib\public\tier0.lib;$(HL2SDKCSS)\lib\public\tier1.lib;$(HL2SDKCSS)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-EYE)\public;$(HL2SDK-EYE)\public\engine;$(HL2SDK-EYE)\public\game\server;$(HL2SDK-EYE)\public\tier0;$(HL2SDK-EYE)\public\tier1;$(HL2SDK-EYE)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=5;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDK-EYE)\lib\public\tier0.lib;$(HL2SDK-EYE)\lib\public\tier1.lib;$(HL2SDK-EYE)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-BGT)\public;$(HL2SDK-BGT)\public\engine;$(HL2SDK-BGT)\public\game\server;$(HL2SDK-BGT)\public\tier0;$(HL2SDK-BGT)\public\tier1;$(HL2SDK-BGT)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=4;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDK-BGT)\lib\public\tier0.lib;$(HL2SDK-BGT)\lib\public\tier1.lib;$(HL2SDK-BGT)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKOBVALVE)\public;$(HL2SDKOBVALVE)\public\engine;$(HL2SDKOBVALVE)\public\game\server;$(HL2SDKOBVALVE)\public\tier0;$(HL2SDKOBVALVE)\public\tier1;$(HL2SDKOBVALVE)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=7;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDKOBVALVE)\lib\public\tier0.lib;$(HL2SDKOBVALVE)\lib\public\tier1.lib;$(HL2SDKOBVALVE)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;$(HL2SDKCSS)\public;$(HL2SDKCSS)\public\engine;$(HL2SDKCSS)\public\game\server;$(HL2SDKCSS)\public\tier0;$(HL2SDKCSS)\public\tier1;$(HL2SDKCSS)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=6;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDKCSS)\lib\public\tier0.lib;$(HL2SDKCSS)\lib\public\tier1.lib;$(HL2SDKCSS)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-EYE)\public;$(HL2SDK-EYE)\public\engine;$(HL2SDK-EYE)\public\game\server;$(HL2SDK-EYE)\public\tier0;$(HL2SDK-EYE)\public\tier1;$(HL2SDK-EYE)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=5;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDK-EYE)\lib\public\tier0.lib;$(HL2SDK-EYE)\lib\public\tier1.lib;$(HL2SDK-EYE)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-BGT)\public;$(HL2SDK-BGT)\public\engine;$(HL2SDK-BGT)\public\game\server;$(HL2SDK-BGT)\public\tier0;$(HL2SDK-BGT)\public\tier1;$(HL2SDK-BGT)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=4;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDK-BGT)\lib\public\tier0.lib;$(HL2SDK-BGT)\lib\public\tier1.lib;$(HL2SDK-BGT)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKL4D)\public;$(HL2SDKL4D)\public\engine;$(HL2SDKL4D)\public\game\server;$(HL2SDKL4D)\public\tier0;$(HL2SDKL4D)\public\tier1;$(HL2SDKL4D)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=8;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDKL4D)\lib\public\tier0.lib;$(HL2SDKL4D)\lib\public\tier1.lib;$(HL2SDKL4D)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKL4D)\public;$(HL2SDKL4D)\public\engine;$(HL2SDKL4D)\public\game\server;$(HL2SDKL4D)\public\tier0;$(HL2SDKL4D)\public\tier1;$(HL2SDKL4D)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=8;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDKL4D)\lib\public\tier0.lib;$(HL2SDKL4D)\lib\public\tier1.lib;$(HL2SDKL4D)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKL4D2)\public;$(HL2SDKL4D2)\public\engine;$(HL2SDKL4D2)\public\game\server;$(HL2SDKL4D2)\public\tier0;$(HL2SDKL4D2)\public\tier1;$(HL2SDKL4D2)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=9;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDKL4D2)\lib\public\tier0.lib;$(HL2SDKL4D2)\lib\public\tier1.lib;$(HL2SDKL4D2)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-SWARM)\public;$(HL2SDK-SWARM)\public\engine;$(HL2SDK-SWARM)\public\game\server;$(HL2SDK-SWARM)\public\tier0;$(HL2SDK-SWARM)\public\tier1;$(HL2SDK-SWARM)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=10;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDK-SWARM)\lib\public\interfaces.lib;$(HL2SDK-SWARM)\lib\public\tier0.lib;$(HL2SDK-SWARM)\lib\public\tier1.lib;$(HL2SDK-SWARM)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;$(HL2SDKCSGO)\public;$(HL2SDKCSGO)\public\engine;$(HL2SDKCSGO)\public\game\server;$(HL2SDKCSGO)\public\tier0;$(HL2SDKCSGO)\public\tier1;$(HL2SDKCSGO)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=12;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDKCSGO)\lib\public\interfaces.lib;$(HL2SDKCSGO)\lib\public\tier0.lib;$(HL2SDKCSGO)\lib\public\tier1.lib;$(HL2SDKCSGO)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - Disabled - $(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;$(HL2SDKPORTAL2)\public;$(HL2SDKPORTAL2)\public\engine;$(HL2SDKPORTAL2)\public\game\server;$(HL2SDKPORTAL2)\public\tier0;$(HL2SDKPORTAL2)\public\tier1;$(HL2SDKPORTAL2)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=11;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - - - Level3 - EditAndContinue - - - $(HL2SDKPORTAL2)\lib\public\interfaces.lib;$(HL2SDKPORTAL2)\lib\public\tier0.lib;$(HL2SDKPORTAL2)\lib\public\tier1.lib;$(HL2SDKPORTAL2)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries) - true - Windows - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDKL4D2)\public;$(HL2SDKL4D2)\public\engine;$(HL2SDKL4D2)\public\game\server;$(HL2SDKL4D2)\public\tier0;$(HL2SDKL4D2)\public\tier1;$(HL2SDKL4D2)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;SOURCE_ENGINE=9;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDKL4D2)\lib\public\tier0.lib;$(HL2SDKL4D2)\lib\public\tier1.lib;$(HL2SDKL4D2)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE18)\core;$(MMSOURCE18)\core\sourcehook;$(HL2SDK-SWARM)\public;$(HL2SDK-SWARM)\public\engine;$(HL2SDK-SWARM)\public\game\server;$(HL2SDK-SWARM)\public\tier0;$(HL2SDK-SWARM)\public\tier1;$(HL2SDK-SWARM)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=10;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDK-SWARM)\lib\public\interfaces.lib;$(HL2SDK-SWARM)\lib\public\tier0.lib;$(HL2SDK-SWARM)\lib\public\tier1.lib;$(HL2SDK-SWARM)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;$(HL2SDKCSGO)\public;$(HL2SDKCSGO)\public\engine;$(HL2SDKCSGO)\public\game\server;$(HL2SDKCSGO)\public\tier0;$(HL2SDKCSGO)\public\tier1;$(HL2SDKCSGO)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=12;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDKCSGO)\lib\public\interfaces.lib;$(HL2SDKCSGO)\lib\public\tier0.lib;$(HL2SDKCSGO)\lib\public\tier1.lib;$(HL2SDKCSGO)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - /D SE_EPISODE1=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_CSS=6 /D SE_ORANGEBOXVALVE=7 /D SE_LEFT4DEAD=8 /D SE_LEFT4DEAD2=9 /D SE_ALIENSWARM=10 /D SE_PORTAL2=1 /D SE_CSGO=12 %(AdditionalOptions) - $(MMSOURCE19)\core;$(MMSOURCE19)\core\sourcehook;$(HL2SDKPORTAL2)\public;$(HL2SDKPORTAL2)\public\engine;$(HL2SDKPORTAL2)\public\game\server;$(HL2SDKPORTAL2)\public\tier0;$(HL2SDKPORTAL2)\public\tier1;$(HL2SDKPORTAL2)\public\vstdlib;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;STUB_MM_EXPORTS;COMPILER_MSVC;COMPILER_MSVC32;SOURCE_ENGINE=11;%(PreprocessorDefinitions) - MultiThreaded - - - Level3 - ProgramDatabase - - - $(HL2SDKPORTAL2)\lib\public\interfaces.lib;$(HL2SDKPORTAL2)\lib\public\tier0.lib;$(HL2SDKPORTAL2)\lib\public\tier1.lib;$(HL2SDKPORTAL2)\lib\public\vstdlib.lib;%(AdditionalDependencies) - $(OutDir)stub_mm.dll - LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - false - - - MachineX86 - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/metamod-source/samples/s1_stub_mm/msvc10/stub_mm.vcxproj.filters b/metamod-source/samples/s1_stub_mm/msvc10/stub_mm.vcxproj.filters deleted file mode 100644 index 5cce4617..00000000 --- a/metamod-source/samples/s1_stub_mm/msvc10/stub_mm.vcxproj.filters +++ /dev/null @@ -1,27 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/metamod-source/samples/s1_stub_mm/msvc8/stub_mm.sln b/metamod-source/samples/s1_stub_mm/msvc8/stub_mm.sln deleted file mode 100644 index 9c7c7a53..00000000 --- a/metamod-source/samples/s1_stub_mm/msvc8/stub_mm.sln +++ /dev/null @@ -1,57 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stub_mm", "stub_mm.vcproj", "{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug - Alien Swarm|Win32 = Debug - Alien Swarm|Win32 - Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32 - Debug - Left 4 Dead 2|Win32 = Debug - Left 4 Dead 2|Win32 - Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32 - Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32 - Debug - Orange Box|Win32 = Debug - Orange Box|Win32 - Debug - Original|Win32 = Debug - Original|Win32 - Release - Alien Swarm|Win32 = Release - Alien Swarm|Win32 - Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32 - Release - Left 4 Dead 2|Win32 = Release - Left 4 Dead 2|Win32 - Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32 - Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32 - Release - Orange Box|Win32 = Release - Orange Box|Win32 - Release - Original|Win32 = Release - Original|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Alien Swarm|Win32.ActiveCfg = Debug - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Alien Swarm|Win32.Build.0 = Debug - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead 2|Win32.ActiveCfg = Debug - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead 2|Win32.Build.0 = Debug - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box Valve|Win32.ActiveCfg = Debug - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.ActiveCfg = Debug - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.Build.0 = Debug - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Alien Swarm|Win32.ActiveCfg = Release - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Alien Swarm|Win32.Build.0 = Release - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead 2|Win32.ActiveCfg = Release - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead 2|Win32.Build.0 = Release - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box Valve|Win32.ActiveCfg = Release - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box Valve|Win32.Build.0 = Release - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Original|Win32.ActiveCfg = Release - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Original|Win32.Build.0 = Release - Original|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal - diff --git a/metamod-source/samples/s1_stub_mm/msvc8/stub_mm.vcproj b/metamod-source/samples/s1_stub_mm/msvc8/stub_mm.vcproj deleted file mode 100644 index 68e59507..00000000 --- a/metamod-source/samples/s1_stub_mm/msvc8/stub_mm.vcproj +++ /dev/null @@ -1,1171 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metamod-source/samples/s1_stub_mm/msvc9/stub_mm.sln b/metamod-source/samples/s1_stub_mm/msvc9/stub_mm.sln deleted file mode 100644 index 7d1fce6f..00000000 --- a/metamod-source/samples/s1_stub_mm/msvc9/stub_mm.sln +++ /dev/null @@ -1,56 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stub_mm", "stub_mm.vcproj", "{E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug - Alien Swarm|Win32 = Debug - Alien Swarm|Win32 - Debug - Dark Messiah|Win32 = Debug - Dark Messiah|Win32 - Debug - Left 4 Dead 2|Win32 = Debug - Left 4 Dead 2|Win32 - Debug - Left 4 Dead|Win32 = Debug - Left 4 Dead|Win32 - Debug - Orange Box Valve|Win32 = Debug - Orange Box Valve|Win32 - Debug - Orange Box|Win32 = Debug - Orange Box|Win32 - Debug - Original|Win32 = Debug - Original|Win32 - Release - Alien Swarm|Win32 = Release - Alien Swarm|Win32 - Release - Dark Messiah|Win32 = Release - Dark Messiah|Win32 - Release - Left 4 Dead 2|Win32 = Release - Left 4 Dead 2|Win32 - Release - Left 4 Dead|Win32 = Release - Left 4 Dead|Win32 - Release - Orange Box Valve|Win32 = Release - Orange Box Valve|Win32 - Release - Orange Box|Win32 = Release - Orange Box|Win32 - Release - Original|Win32 = Release - Original|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Alien Swarm|Win32.ActiveCfg = Debug - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Alien Swarm|Win32.Build.0 = Debug - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.ActiveCfg = Debug - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Dark Messiah|Win32.Build.0 = Debug - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead 2|Win32.ActiveCfg = Debug - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead 2|Win32.Build.0 = Debug - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.ActiveCfg = Debug - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Left 4 Dead|Win32.Build.0 = Debug - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box Valve|Win32.ActiveCfg = Debug - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box Valve|Win32.Build.0 = Debug - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.ActiveCfg = Debug - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Orange Box|Win32.Build.0 = Debug - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.ActiveCfg = Debug - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Debug - Original|Win32.Build.0 = Debug - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Alien Swarm|Win32.ActiveCfg = Release - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Alien Swarm|Win32.Build.0 = Release - Alien Swarm|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.ActiveCfg = Release - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Dark Messiah|Win32.Build.0 = Release - Dark Messiah|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead 2|Win32.ActiveCfg = Release - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead 2|Win32.Build.0 = Release - Left 4 Dead 2|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.ActiveCfg = Release - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Left 4 Dead|Win32.Build.0 = Release - Left 4 Dead|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box Valve|Win32.ActiveCfg = Release - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box Valve|Win32.Build.0 = Release - Orange Box Valve|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.ActiveCfg = Release - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Orange Box|Win32.Build.0 = Release - Orange Box|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Original|Win32.ActiveCfg = Release - Original|Win32 - {E62E5876-E1E2-41A0-85CA-1B41B9DA55F9}.Release - Original|Win32.Build.0 = Release - Original|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/metamod-source/samples/s1_stub_mm/msvc9/stub_mm.vcproj b/metamod-source/samples/s1_stub_mm/msvc9/stub_mm.vcproj deleted file mode 100644 index 9829fc2a..00000000 --- a/metamod-source/samples/s1_stub_mm/msvc9/stub_mm.vcproj +++ /dev/null @@ -1,1158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metamod-source/samples/s1_stub_mm/stub_mm.cpp b/metamod-source/samples/s1_stub_mm/stub_mm.cpp deleted file mode 100644 index 965c3841..00000000 --- a/metamod-source/samples/s1_stub_mm/stub_mm.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source Stub Plugin - * Written by AlliedModders LLC. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * This stub plugin is public domain. - */ - -#include -#include "stub_mm.h" - -SH_DECL_HOOK3_void(IServerGameDLL, ServerActivate, SH_NOATTRIB, 0, edict_t *, int, int); - -StubPlugin g_StubPlugin; -IServerGameDLL *server = NULL; - -PLUGIN_EXPOSE(StubPlugin, g_StubPlugin); -bool StubPlugin::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late) -{ - PLUGIN_SAVEVARS(); - - /* Make sure we build on MM:S 1.4 */ -#if defined METAMOD_PLAPI_VERSION - GET_V_IFACE_ANY(GetServerFactory, server, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL); -#else - GET_V_IFACE_ANY(serverFactory, server, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL); -#endif - - SH_ADD_HOOK_STATICFUNC(IServerGameDLL, ServerActivate, server, Hook_ServerActivate, true); - - return true; -} - -bool StubPlugin::Unload(char *error, size_t maxlen) -{ - SH_REMOVE_HOOK_STATICFUNC(IServerGameDLL, ServerActivate, server, Hook_ServerActivate, true); - - return true; -} - -void Hook_ServerActivate(edict_t *pEdictList, int edictCount, int clientMax) -{ - META_LOG(g_PLAPI, "ServerActivate() called: edictCount = %d, clientMax = %d", edictCount, clientMax); -} - -void StubPlugin::AllPluginsLoaded() -{ - /* This is where we'd do stuff that relies on the mod or other plugins - * being initialized (for example, cvars added and events registered). - */ -} - -bool StubPlugin::Pause(char *error, size_t maxlen) -{ - return true; -} - -bool StubPlugin::Unpause(char *error, size_t maxlen) -{ - return true; -} - -const char *StubPlugin::GetLicense() -{ - return "Public Domain"; -} - -const char *StubPlugin::GetVersion() -{ - return "1.0.0.0"; -} - -const char *StubPlugin::GetDate() -{ - return __DATE__; -} - -const char *StubPlugin::GetLogTag() -{ - return "STUB"; -} - -const char *StubPlugin::GetAuthor() -{ - return "AlliedModders LLC"; -} - -const char *StubPlugin::GetDescription() -{ - return "Sample empty plugin"; -} - -const char *StubPlugin::GetName() -{ - return "Stub Plugin"; -} - -const char *StubPlugin::GetURL() -{ - return "http://www.sourcemm.net/"; -} diff --git a/metamod-source/samples/s1_stub_mm/stub_mm.h b/metamod-source/samples/s1_stub_mm/stub_mm.h deleted file mode 100644 index d0c23810..00000000 --- a/metamod-source/samples/s1_stub_mm/stub_mm.h +++ /dev/null @@ -1,49 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source Stub Plugin - * Written by AlliedModders LLC. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * This stub plugin is public domain. - */ - -#ifndef _INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_ -#define _INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_ - -#include - -#if defined WIN32 && !defined snprintf -#define snprintf _snprintf -#endif - -class StubPlugin : public ISmmPlugin -{ -public: - bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late); - bool Unload(char *error, size_t maxlen); - bool Pause(char *error, size_t maxlen); - bool Unpause(char *error, size_t maxlen); - void AllPluginsLoaded(); -public: - const char *GetAuthor(); - const char *GetName(); - const char *GetDescription(); - const char *GetURL(); - const char *GetLicense(); - const char *GetVersion(); - const char *GetDate(); - const char *GetLogTag(); -}; - -void Hook_ServerActivate(edict_t *pEdictList, int edictCount, int clientMax); - -extern StubPlugin g_StubPlugin; - -PLUGIN_GLOBALVARS(); - -#endif //_INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_ diff --git a/metamod-source/samples/s1_stub_mm/stub_mm.vdf b/metamod-source/samples/s1_stub_mm/stub_mm.vdf deleted file mode 100644 index 0bbbf582..00000000 --- a/metamod-source/samples/s1_stub_mm/stub_mm.vdf +++ /dev/null @@ -1,5 +0,0 @@ -"Metamod Plugin" -{ - "alias" "stub" - "file" "addons/stub_mm" -} diff --git a/metamod-source/samples/s2_sample_mm/AMBuildScript b/metamod-source/samples/s2_sample_mm/AMBuildScript deleted file mode 100644 index 9258cca2..00000000 --- a/metamod-source/samples/s2_sample_mm/AMBuildScript +++ /dev/null @@ -1,311 +0,0 @@ -# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: -import os, sys - -# Edit the functions below for the extra functionality, the return should be -# a list of path's to wanted locations -def additional_libs(context, binary, sdk): - return [ - # Path should be relative either to hl2sdk folder or to build folder - # 'path/to/lib/example.lib', - ] - -def additional_defines(context, binary, sdk): - return [ - # 'EXAMPLE_DEFINE=2' - ] - -def additional_includes(context, binary, sdk): - return [ - # Path should be absolute only! - # os.path.join(sdk['path'], 'game', 'server'), - # os.path.join(sdk['path'], 'public', 'entity2'), - # 'D:/absolute/path/to/include/folder/' - ] - -def ResolveEnvPath(env, folder): - if env in os.environ: - path = os.environ[env] - if os.path.isdir(path): - return path - else: - head = os.getcwd() - oldhead = None - while head != None and head != oldhead: - path = os.path.join(head, folder) - if os.path.isdir(path): - return path - oldhead = head - head, tail = os.path.split(head) - return None - -def ResolveMMSRoot(): - prenormalized_path = None - if builder.options.mms_path: - prenormalized_path = builder.options.mms_path - else: - prenormalized_path = ResolveEnvPath('MMSOURCE112', 'mmsource-1.12') - if not prenormalized_path: - prenormalized_path = ResolveEnvPath('MMSOURCE111', 'mmsource-1.11') - if not prenormalized_path: - prenormalized_path = ResolveEnvPath('MMSOURCE110', 'mmsource-1.10') - if not prenormalized_path: - prenormalized_path = ResolveEnvPath('MMSOURCE_DEV', 'metamod-source') - if not prenormalized_path: - prenormalized_path = ResolveEnvPath('MMSOURCE_DEV', 'mmsource-central') - if not prenormalized_path or not os.path.isdir(prenormalized_path): - raise Exception('Could not find a source copy of Metamod:Source') - - return os.path.abspath(os.path.normpath(prenormalized_path)) - -mms_root = ResolveMMSRoot() - -if not builder.options.hl2sdk_manifests: - raise Exception('Could not find a source copy of HL2SDK manifests') -hl2sdk_manifests = builder.options.hl2sdk_manifests - -SdkHelpers = builder.Eval(os.path.join(hl2sdk_manifests, 'SdkHelpers.ambuild'), { - 'Project': 'metamod' -}) - -class MMSPluginConfig(object): - def __init__(self): - self.sdk_manifests = [] - self.sdks = {} - self.sdk_targets = [] - self.binaries = [] - self.mms_root = mms_root - self.all_targets = [] - self.target_archs = set() - - if builder.options.plugin_name is not None: - self.plugin_name = builder.options.plugin_name - else: - self.plugin_name = 'sample_mm' - - if builder.options.plugin_alias is not None: - self.plugin_alias = builder.options.plugin_alias - else: - self.plugin_alias = 'sample' - - if builder.options.targets: - target_archs = builder.options.targets.split(',') - else: - target_archs = ['x86', 'x86_64'] - - for arch in target_archs: - try: - cxx = builder.DetectCxx(target_arch = arch) - self.target_archs.add(cxx.target.arch) - except Exception as e: - # Error if archs were manually overridden. - if builder.options.targets: - raise - print('Skipping target {}: {}'.format(arch, e)) - continue - self.all_targets.append(cxx) - - if not self.all_targets: - raise Exception('No suitable C/C++ compiler was found.') - - def findSdkPath(self, sdk_name): - dir_name = 'hl2sdk-{}'.format(sdk_name) - if builder.options.hl2sdk_root: - sdk_path = os.path.join(builder.options.hl2sdk_root, dir_name) - if os.path.exists(sdk_path): - return sdk_path - return ResolveEnvPath('HL2SDK{}'.format(sdk_name.upper()), dir_name) - - def detectSDKs(self): - sdk_list = [s for s in builder.options.sdks.split(',') if s] - SdkHelpers.find_sdk_path = self.findSdkPath - SdkHelpers.findSdks(builder, self.all_targets, sdk_list) - - self.sdks = SdkHelpers.sdks - self.sdk_manifests = SdkHelpers.sdk_manifests - self.sdk_targets = SdkHelpers.sdk_targets - - if len(self.sdks) > 1: - raise Exception('Only one sdk at a time is supported, for multi-sdk approach use loader based solution.') - - def configure(self): - for cxx in self.all_targets: - if cxx.target.arch not in ['x86', 'x86_64']: - raise Exception('Unknown target architecture: {0}'.format(arch)) - - self.configure_cxx(cxx) - - def configure_cxx(self, cxx): - if cxx.behavior == 'gcc': - cxx.defines += [ - 'stricmp=strcasecmp', - '_stricmp=strcasecmp', - '_snprintf=snprintf', - '_vsnprintf=vsnprintf', - 'HAVE_STDINT_H', - 'GNUC', - ] - cxx.cflags += [ - '-pipe', - '-fno-strict-aliasing', - '-Wall', - '-Werror', - '-Wno-uninitialized', - '-Wno-unused', - '-Wno-switch', - '-msse', - '-fPIC', - ] - - cxx.cxxflags += ['-std=c++17'] - if (cxx.version >= 'gcc-4.0') or cxx.family == 'clang': - cxx.cflags += ['-fvisibility=hidden'] - cxx.cxxflags += ['-fvisibility-inlines-hidden'] - cxx.cxxflags += [ - '-fno-exceptions', - '-fno-rtti', - '-fno-threadsafe-statics', - '-Wno-non-virtual-dtor', - '-Wno-overloaded-virtual', - '-Wno-register', - ] - if (cxx.version >= 'gcc-4.7' or cxx.family == 'clang'): - cxx.cxxflags += ['-Wno-delete-non-virtual-dtor'] - if cxx.family == 'gcc': - cxx.cflags += ['-mfpmath=sse'] - if cxx.family == 'clang': - cxx.cxxflags += ['-Wno-implicit-exception-spec-mismatch'] - if cxx.version >= 'clang-3.9': - cxx.cxxflags += ['-Wno-expansion-to-defined'] - if cxx.version >= 'clang-3.6': - cxx.cxxflags += ['-Wno-inconsistent-missing-override'] - if cxx.version >= 'clang-3.4': - cxx.cxxflags += ['-Wno-deprecated-register'] - else: - cxx.cxxflags += ['-Wno-deprecated'] - - # Work around SDK warnings. - if cxx.version >= 'clang-10.0': - cxx.cflags += [ - '-Wno-implicit-int-float-conversion', - '-Wno-tautological-overlap-compare', - ] - - elif cxx.like('msvc'): - if builder.options.debug == '1': - cxx.cflags += ['/MTd'] - cxx.linkflags += ['/NODEFAULTLIB:libcmt'] - else: - cxx.cflags += ['/MT'] - cxx.defines += [ - '_CRT_SECURE_NO_DEPRECATE', - '_CRT_SECURE_NO_WARNINGS', - '_CRT_NONSTDC_NO_DEPRECATE', - ] - cxx.cflags += [ - '/W3', - '/Zi', - '/std:c++17', - ] - cxx.cxxflags += ['/TP'] - - cxx.linkflags += [ - '/SUBSYSTEM:WINDOWS', - 'kernel32.lib', - 'user32.lib', - 'gdi32.lib', - 'winspool.lib', - 'comdlg32.lib', - 'advapi32.lib', - 'shell32.lib', - 'ole32.lib', - 'oleaut32.lib', - 'uuid.lib', - 'odbc32.lib', - 'odbccp32.lib', - ] - - # Optimization - if builder.options.opt == '1': - cxx.defines += ['NDEBUG'] - if cxx.behavior == 'gcc': - cxx.cflags += ['-O3'] - elif cxx.behavior == 'msvc': - cxx.cflags += ['/Ox', '/Zo'] - cxx.linkflags += ['/OPT:ICF', '/OPT:REF'] - - # Debugging - if builder.options.debug == '1': - cxx.defines += ['DEBUG', '_DEBUG'] - if cxx.behavior == 'gcc': - cxx.cflags += ['-g3'] - elif cxx.behavior == 'msvc': - cxx.cflags += ['/Od', '/RTC1'] - - # Don't omit the frame pointer. - # This needs to be after our optimization flags which could otherwise disable it. - if cxx.behavior == 'gcc': - cxx.cflags += ['-fno-omit-frame-pointer'] - elif cxx.behavior == 'msvc': - cxx.cflags += ['/Oy-'] - - # Platform-specifics - if cxx.target.platform == 'linux': - cxx.defines += ['LINUX', '_LINUX', 'POSIX', '_FILE_OFFSET_BITS=64'] - if cxx.family == 'gcc': - cxx.linkflags += ['-static-libgcc'] - elif cxx.family == 'clang': - cxx.linkflags += ['-lgcc_eh'] - cxx.linkflags += ['-static-libstdc++'] - elif cxx.target.platform == 'windows': - cxx.defines += ['WIN32', '_WINDOWS'] - - # Finish up. - # Custom defines here - cxx.defines += [ ] - # Custom includes here - cxx.includes += [ ] - - def Library(self, cxx, name): - binary = cxx.Library(name) - return binary - - def HL2Library(self, context, compiler, name, sdk): - binary = self.Library(compiler, name) - mms_core_path = os.path.join(self.mms_root, 'core') - cxx = binary.compiler - - cxx.cxxincludes += [ - os.path.join(context.currentSourcePath), - os.path.join(mms_core_path), - os.path.join(mms_core_path, 'sourcehook'), - ] - - defines = [] - for other_sdk in self.sdk_manifests: - cxx.defines += ['SE_{}={}'.format(other_sdk['define'], other_sdk['code'])] - - if sdk['source2']: - cxx.defines += ['META_IS_SOURCE2'] - binary.sources += [ - os.path.join(sdk['path'], 'public', 'tier0', 'memoverride.cpp'), - os.path.join(sdk['path'], 'tier1', 'convar.cpp'), - ] - - SdkHelpers.configureCxx(context, binary, sdk) - - cxx.linkflags += additional_libs(context, binary, sdk) - cxx.defines += additional_defines(context, binary, sdk) - cxx.cxxincludes += additional_includes(context, binary, sdk) - - return binary - -MMSPlugin = MMSPluginConfig() -MMSPlugin.detectSDKs() -MMSPlugin.configure() - -BuildScripts = [ - 'AMBuilder', - 'PackageScript', -] - -builder.Build(BuildScripts, { 'MMSPlugin': MMSPlugin }) diff --git a/metamod-source/samples/s2_sample_mm/AMBuilder b/metamod-source/samples/s2_sample_mm/AMBuilder deleted file mode 100644 index 3b8f5357..00000000 --- a/metamod-source/samples/s2_sample_mm/AMBuilder +++ /dev/null @@ -1,24 +0,0 @@ -# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: -import os - -# Here only one sdk should be available to generate only one executable in the end, -# as multi-sdk loading isn't supported out of the box by metamod, and would require specifying the full path in the vdf -# which in the end would ruin the multi-platform (unix, win etc) loading by metamod as it won't be able to append platform specific extension -# so just fall back to the single binary. -# Multi-sdk solutions should be manually loaded with a custom plugin loader (examples being sourcemod, stripper:source) -for sdk_target in MMSPlugin.sdk_targets: - sdk = sdk_target.sdk - cxx = sdk_target.cxx - - binary = MMSPlugin.HL2Library(builder, cxx, MMSPlugin.plugin_name, sdk) - - binary.sources += [ - 'sample_mm.cpp', - ] - - binary.custom = [builder.tools.Protoc(protoc = sdk_target.protoc, sources = [ - os.path.join(sdk['path'], 'common', 'network_connection.proto'), - ])] - - nodes = builder.Add(binary) - MMSPlugin.binaries += [nodes] diff --git a/metamod-source/samples/s2_sample_mm/PackageScript b/metamod-source/samples/s2_sample_mm/PackageScript deleted file mode 100644 index 43f0e180..00000000 --- a/metamod-source/samples/s2_sample_mm/PackageScript +++ /dev/null @@ -1,49 +0,0 @@ -# vim: set ts=2 sw=2 tw=99 noet ft=python: -import os - -builder.SetBuildFolder('package') - -metamod_folder = builder.AddFolder(os.path.join('addons', 'metamod')) -bin_folder_path = os.path.join('addons', MMSPlugin.plugin_name, 'bin') -bin_folder = builder.AddFolder(bin_folder_path) - -for cxx in MMSPlugin.all_targets: - if cxx.target.arch == 'x86_64': - if cxx.target.platform == 'windows': - bin64_folder_path = os.path.join('addons', MMSPlugin.plugin_name, 'bin', 'win64') - bin64_folder = builder.AddFolder(bin64_folder_path) - elif cxx.target.platform == 'linux': - bin64_folder_path = os.path.join('addons', MMSPlugin.plugin_name, 'bin', 'linuxsteamrt64') - bin64_folder = builder.AddFolder(bin64_folder_path) - elif cxx.target.platform == 'mac': - bin64_folder_path = os.path.join('addons', MMSPlugin.plugin_name, 'bin', 'osx64') - bin64_folder = builder.AddFolder(bin64_folder_path) - -pdb_list = [] -for task in MMSPlugin.binaries: - # This hardly assumes there's only 1 targetted platform and would be overwritten - # with whatever comes last if multiple are used! - with open(os.path.join(builder.buildPath, MMSPlugin.plugin_name + '.vdf'), 'w') as fp: - fp.write('"Metamod Plugin"\n') - fp.write('{\n') - fp.write(f'\t"alias"\t"{MMSPlugin.plugin_alias}"\n') - if task.target.arch == 'x86_64': - fp.write(f'\t"file"\t"{os.path.join(bin64_folder_path, MMSPlugin.plugin_name)}"\n') - else: - fp.write(f'\t"file"\t"{os.path.join(bin_folder_path, MMSPlugin.plugin_name)}"\n') - fp.write('}\n') - - if task.target.arch == 'x86_64': - builder.AddCopy(task.binary, bin64_folder) - else: - builder.AddCopy(task.binary, bin_folder) - - if task.debug: - pdb_list.append(task.debug) - -builder.AddCopy(os.path.join(builder.buildPath, MMSPlugin.plugin_name + '.vdf'), metamod_folder) - -# Generate PDB info. -with open(os.path.join(builder.buildPath, 'pdblog.txt'), 'wt') as fp: - for line in pdb_list: - fp.write(line.path + '\n') \ No newline at end of file diff --git a/metamod-source/samples/s2_sample_mm/README.md b/metamod-source/samples/s2_sample_mm/README.md deleted file mode 100644 index 594be33c..00000000 --- a/metamod-source/samples/s2_sample_mm/README.md +++ /dev/null @@ -1,38 +0,0 @@ -## Manual building example - -### Prerequisites - * [hl2sdk](https://github.com/alliedmodders/hl2sdk) of the game you plan on writing plugin for (the current plugin build scripts allows only for 1 sdk and 1 platform at a time!); - * [metamod-source](https://github.com/alliedmodders/metamod-source); - * [python3](https://www.python.org/) - * [ambuild](https://github.com/alliedmodders/ambuild), make sure ``ambuild`` command is available via the ``PATH`` environment variable; - -### Setting up - * ``mkdir build`` & ``cd build`` in the root of the plugin folder. - * Open the [MSVC developer console](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line) with the correct platform (x86 or x86_64) that you plan on targetting. - * Run ``python3 ../configure.py --plugin-name={PLUGIN_NAME} --plugin-alias={PLUGIN_ALIAS} -s {SDKNAME} --targets={TARGET} --mms_path={MMS_PATH} --hl2sdk-root {HL2SDKROOT} --hl2sdk-manifests {HL2SDKMANIFESTS} `` where: - * ``{PLUGIN_NAME}`` should be the plugin name which is used for the resulting binary name and folder naming scheme (this doesn't affect the plugin name you'd see in the plugin list if you don't modify the base plugin functions); - * ``{PLUGIN_ALIAS}`` should be used to set the plugin alias that is used as a short hand version to load, unload, list info etc via the metamod-source menu (example being ``meta unload sample``, where ``sample`` is the alias); - * ``{SDKNAME}`` should be the hl2sdk game name that you are building for; - * ``{TARGET}`` should be the target platform you are targeting (``x86`` or ``x86_64``); - * ``{MMS_PATH}`` should point to the root of the metamod-source folder; - * ``{HL2SDKROOT}`` should point to the root of the hl2sdk's folders, note that it should **not** point to the actual ``hl2sdk-GAME`` folder but a root parent of it; - * ``{HL2SDKMANIFESTS}`` should point to the root of a clone of the https://github.com/alliedmodders/hl2sdk-manifests repository. It is suggested that you use a submodule for this, as this folder must live within your project for AMBuild to be able to consume the helper script within; - * Alternatively ``{MMS_PATH}`` & ``{HL2SDKROOT}`` could be put as a ``PATH`` environment variables, like ``MMSOURCE112=D:\mmsource-1.12`` & ``HL2SDKCS2=D:\hl2sdks\hl2sdk-cs2`` (note the metamod version and that here hl2sdk environment variable should point directly to the game's hl2sdk folder and not to the root of it!) - * Example: ``python3 ../configure.py --plugin-name=sample_mm --plugin-alias=sample -s cs2 --targets=x86_64 --mms_path=D:\mmsource-1.12 --hl2sdk-root=D:\hl2sdks`` - * If the process of configuring was successful, you should be able to run ``ambuild`` in the ``\build`` folder to compile the plugin. - * Once the plugin is compiled the files would be packaged and placed in ``\build\package`` folder. - * To run the plugin on the server, place the files preserving the layout provided in ``\package``. Be aware that plugins get loaded either by corresponding ``.vdf`` files (automatic step) in the metamod folder, or by listing them in ``addons/metamod/metaplugins.ini`` file (manual step). - - ## Points of interest - * To generate the VS solution of the plugin with the correct setup, use ``python3 ../configure {CONFIGURE_OPTIONS} --gen=vs``, where ``{CONFIGURE_OPTIONS}`` is your default configuring options that are used when building. As a result ``.vcxproj`` file would be created in the folder where the command was executed. - * To update which ``.cpp`` files gets compiled in or to add new ones, look at ``AMBuilder`` script which has the ``sample_mm.cpp`` being built initially, you can add or edit this however you want to, running ``ambuild`` after editing this script would automatically catch up the changes, no need for the reconfiguration. - * To change the name/version/author/etc that's displayed in the metamod-source menu, make sure to correctly overload and provide the wanted info to the metamod-source, like ``ISmmPlugin::GetAuthor``, ``ISmmPlugin::GetName`` and so on. - * There are also additional arguments for the configuration step that aren't covered here, you can see them by running ``python3 ../configure -h`` from within the ``\build`` folder. - * To add additional linking ``.libs``/defines/include directories, open ``AMBuildScript`` and at the top edit corresponding arrays. - * Sometimes there could be problems with ``ambuild`` not catching up the changes in ``.h`` files, thus producing incorrect (outdated) binaries or even doesn't compile with the new changes. As there's [no full rebuild option](https://github.com/alliedmodders/ambuild/issues/145) to combat this, go to the ``/build`` folder and locate the folder named after the plugin name you've used, deleting that folder and building after should provide the clean build of the project and the described issues should be eliminated. - - -## For more information on compiling and reading the plugin's source code, see: - - http://wiki.alliedmods.net/Category:Metamod:Source_Development - diff --git a/metamod-source/samples/s2_sample_mm/configure.py b/metamod-source/samples/s2_sample_mm/configure.py deleted file mode 100644 index 06052139..00000000 --- a/metamod-source/samples/s2_sample_mm/configure.py +++ /dev/null @@ -1,41 +0,0 @@ -# vim: set sts=2 ts=8 sw=2 tw=99 et: -import sys -try: - from ambuild2 import run, util -except: - try: - import ambuild - sys.stderr.write('It looks like you have AMBuild 1 installed, but this project uses AMBuild 2.\n') - sys.stderr.write('Upgrade to the latest version of AMBuild to continue.\n') - except: - sys.stderr.write('AMBuild must be installed to build this project.\n') - sys.stderr.write('http://www.alliedmods.net/ambuild\n') - sys.exit(1) - -# Hack to show a decent upgrade message, which wasn't done until 2.2. -ambuild_version = getattr(run, 'CURRENT_API', '2.1') -if ambuild_version.startswith('2.1'): - sys.stderr.write("AMBuild 2.2 or higher is required; please update\n") - sys.exit(1) - -parser = run.BuildParser(sourcePath=sys.path[0], api='2.2') -parser.options.add_argument('-n', '--plugin-name', type=str, dest='plugin_name', default=None, - help='Plugin name') -parser.options.add_argument('-a', '--plugin-alias', type=str, dest='plugin_alias', default=None, - help='Plugin alias') -parser.options.add_argument('--hl2sdk-root', type=str, dest='hl2sdk_root', default=None, - help='Root search folder for HL2SDKs') -parser.options.add_argument('--hl2sdk-manifests', type=str, dest='hl2sdk_manifests', default=None, - help='HL2SDK manifests source tree folder') -parser.options.add_argument('--mms_path', type=str, dest='mms_path', default=None, - help='Metamod:Source source tree folder') -parser.options.add_argument('--enable-debug', action='store_const', const='1', dest='debug', - help='Enable debugging symbols') -parser.options.add_argument('--enable-optimize', action='store_const', const='1', dest='opt', - help='Enable optimization') -parser.options.add_argument('-s', '--sdks', default='all', dest='sdks', - help='Build against specified SDKs; valid args are "all", "present", or ' - 'comma-delimited list of engine names (default: "all")') -parser.options.add_argument('--targets', type=str, dest='targets', default=None, - help="Override the target architecture (use commas to separate multiple targets).") -parser.Configure() diff --git a/metamod-source/samples/s2_sample_mm/sample_mm.cpp b/metamod-source/samples/s2_sample_mm/sample_mm.cpp deleted file mode 100644 index d842a34c..00000000 --- a/metamod-source/samples/s2_sample_mm/sample_mm.cpp +++ /dev/null @@ -1,226 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source Sample Plugin - * Written by AlliedModders LLC. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * This sample plugin is public domain. - */ - -#include -#include "sample_mm.h" -#include "iserver.h" - -SH_DECL_HOOK3_void(IServerGameDLL, GameFrame, SH_NOATTRIB, 0, bool, bool, bool); -SH_DECL_HOOK4_void(IServerGameClients, ClientActive, SH_NOATTRIB, 0, CPlayerSlot, bool, const char *, uint64); -SH_DECL_HOOK5_void(IServerGameClients, ClientDisconnect, SH_NOATTRIB, 0, CPlayerSlot, ENetworkDisconnectionReason, const char *, uint64, const char *); -SH_DECL_HOOK4_void(IServerGameClients, ClientPutInServer, SH_NOATTRIB, 0, CPlayerSlot, char const *, int, uint64); -SH_DECL_HOOK1_void(IServerGameClients, ClientSettingsChanged, SH_NOATTRIB, 0, CPlayerSlot ); -SH_DECL_HOOK6_void(IServerGameClients, OnClientConnected, SH_NOATTRIB, 0, CPlayerSlot, const char*, uint64, const char *, const char *, bool); -SH_DECL_HOOK6(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, CPlayerSlot, const char*, uint64, const char *, bool, CBufferString *); -SH_DECL_HOOK2(IGameEventManager2, FireEvent, SH_NOATTRIB, 0, bool, IGameEvent *, bool); - -SH_DECL_HOOK2_void( IServerGameClients, ClientCommand, SH_NOATTRIB, 0, CPlayerSlot, const CCommand & ); - -SamplePlugin g_SamplePlugin; -IServerGameDLL *server = NULL; -IServerGameClients *gameclients = NULL; -IVEngineServer *engine = NULL; -IGameEventManager2 *gameevents = NULL; -ICvar *icvar = NULL; - -// Should only be called within the active game loop (i e map should be loaded and active) -// otherwise that'll be nullptr! -CGlobalVars *GetGameGlobals() -{ - INetworkGameServer *server = g_pNetworkServerService->GetIGameServer(); - - if(!server) - return nullptr; - - return g_pNetworkServerService->GetIGameServer()->GetGlobals(); -} - -#if 0 -// Currently unavailable, requires hl2sdk work! -ConVar sample_cvar("sample_cvar", "42", 0); -#endif - -CON_COMMAND_F(sample_command, "Sample command", FCVAR_NONE) -{ - META_CONPRINTF( "Sample command called by %d. Command: %s\n", context.GetPlayerSlot(), args.GetCommandString() ); -} - -PLUGIN_EXPOSE(SamplePlugin, g_SamplePlugin); -bool SamplePlugin::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late) -{ - PLUGIN_SAVEVARS(); - - GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER); - GET_V_IFACE_CURRENT(GetEngineFactory, icvar, ICvar, CVAR_INTERFACE_VERSION); - GET_V_IFACE_ANY(GetServerFactory, server, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL); - GET_V_IFACE_ANY(GetServerFactory, gameclients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS); - GET_V_IFACE_ANY(GetEngineFactory, g_pNetworkServerService, INetworkServerService, NETWORKSERVERSERVICE_INTERFACE_VERSION); - - // Currently doesn't work from within mm side, use GetGameGlobals() in the mean time instead - // gpGlobals = ismm->GetCGlobals(); - - // Required to get the IMetamodListener events - g_SMAPI->AddListener( this, this ); - - META_CONPRINTF( "Starting plugin.\n" ); - - SH_ADD_HOOK(IServerGameDLL, GameFrame, server, SH_MEMBER(this, &SamplePlugin::Hook_GameFrame), true); - SH_ADD_HOOK(IServerGameClients, ClientActive, gameclients, SH_MEMBER(this, &SamplePlugin::Hook_ClientActive), true); - SH_ADD_HOOK(IServerGameClients, ClientDisconnect, gameclients, SH_MEMBER(this, &SamplePlugin::Hook_ClientDisconnect), true); - SH_ADD_HOOK(IServerGameClients, ClientPutInServer, gameclients, SH_MEMBER(this, &SamplePlugin::Hook_ClientPutInServer), true); - SH_ADD_HOOK(IServerGameClients, ClientSettingsChanged, gameclients, SH_MEMBER(this, &SamplePlugin::Hook_ClientSettingsChanged), false); - SH_ADD_HOOK(IServerGameClients, OnClientConnected, gameclients, SH_MEMBER(this, &SamplePlugin::Hook_OnClientConnected), false); - SH_ADD_HOOK(IServerGameClients, ClientConnect, gameclients, SH_MEMBER(this, &SamplePlugin::Hook_ClientConnect), false); - SH_ADD_HOOK(IServerGameClients, ClientCommand, gameclients, SH_MEMBER(this, &SamplePlugin::Hook_ClientCommand), false); - - META_CONPRINTF( "All hooks started!\n" ); - - g_pCVar = icvar; - ConVar_Register( FCVAR_RELEASE | FCVAR_CLIENT_CAN_EXECUTE | FCVAR_GAMEDLL ); - - return true; -} - -bool SamplePlugin::Unload(char *error, size_t maxlen) -{ - SH_REMOVE_HOOK(IServerGameDLL, GameFrame, server, SH_MEMBER(this, &SamplePlugin::Hook_GameFrame), true); - SH_REMOVE_HOOK(IServerGameClients, ClientActive, gameclients, SH_MEMBER(this, &SamplePlugin::Hook_ClientActive), true); - SH_REMOVE_HOOK(IServerGameClients, ClientDisconnect, gameclients, SH_MEMBER(this, &SamplePlugin::Hook_ClientDisconnect), true); - SH_REMOVE_HOOK(IServerGameClients, ClientPutInServer, gameclients, SH_MEMBER(this, &SamplePlugin::Hook_ClientPutInServer), true); - SH_REMOVE_HOOK(IServerGameClients, ClientSettingsChanged, gameclients, SH_MEMBER(this, &SamplePlugin::Hook_ClientSettingsChanged), false); - SH_REMOVE_HOOK(IServerGameClients, OnClientConnected, gameclients, SH_MEMBER(this, &SamplePlugin::Hook_OnClientConnected), false); - SH_REMOVE_HOOK(IServerGameClients, ClientConnect, gameclients, SH_MEMBER(this, &SamplePlugin::Hook_ClientConnect), false); - SH_REMOVE_HOOK(IServerGameClients, ClientCommand, gameclients, SH_MEMBER(this, &SamplePlugin::Hook_ClientCommand), false); - - return true; -} - -void SamplePlugin::AllPluginsLoaded() -{ - /* This is where we'd do stuff that relies on the mod or other plugins - * being initialized (for example, cvars added and events registered). - */ -} - -void SamplePlugin::Hook_ClientActive( CPlayerSlot slot, bool bLoadGame, const char *pszName, uint64 xuid ) -{ - META_CONPRINTF( "Hook_ClientActive(%d, %d, \"%s\", %d)\n", slot, bLoadGame, pszName, xuid ); -} - -void SamplePlugin::Hook_ClientCommand( CPlayerSlot slot, const CCommand &args ) -{ - META_CONPRINTF( "Hook_ClientCommand(%d, \"%s\")\n", slot, args.GetCommandString() ); -} - -void SamplePlugin::Hook_ClientSettingsChanged( CPlayerSlot slot ) -{ - META_CONPRINTF( "Hook_ClientSettingsChanged(%d)\n", slot ); -} - -void SamplePlugin::Hook_OnClientConnected( CPlayerSlot slot, const char *pszName, uint64 xuid, const char *pszNetworkID, const char *pszAddress, bool bFakePlayer ) -{ - META_CONPRINTF( "Hook_OnClientConnected(%d, \"%s\", %d, \"%s\", \"%s\", %d)\n", slot, pszName, xuid, pszNetworkID, pszAddress, bFakePlayer ); -} - -bool SamplePlugin::Hook_ClientConnect( CPlayerSlot slot, const char *pszName, uint64 xuid, const char *pszNetworkID, bool unk1, CBufferString *pRejectReason ) -{ - META_CONPRINTF( "Hook_ClientConnect(%d, \"%s\", %d, \"%s\", %d, \"%s\")\n", slot, pszName, xuid, pszNetworkID, unk1, pRejectReason->ToGrowable()->Get() ); - - RETURN_META_VALUE(MRES_IGNORED, true); -} - -void SamplePlugin::Hook_ClientPutInServer( CPlayerSlot slot, char const *pszName, int type, uint64 xuid ) -{ - META_CONPRINTF( "Hook_ClientPutInServer(%d, \"%s\", %d, %d)\n", slot, pszName, type, xuid ); -} - -void SamplePlugin::Hook_ClientDisconnect( CPlayerSlot slot, ENetworkDisconnectionReason reason, const char *pszName, uint64 xuid, const char *pszNetworkID ) -{ - META_CONPRINTF( "Hook_ClientDisconnect(%d, %d, \"%s\", %d, \"%s\")\n", slot, reason, pszName, xuid, pszNetworkID ); -} - -void SamplePlugin::Hook_GameFrame( bool simulating, bool bFirstTick, bool bLastTick ) -{ - /** - * simulating: - * *********** - * true | game is ticking - * false | game is not ticking - */ -} - -void SamplePlugin::OnLevelInit( char const *pMapName, - char const *pMapEntities, - char const *pOldLevel, - char const *pLandmarkName, - bool loadGame, - bool background ) -{ - META_CONPRINTF("OnLevelInit(%s)\n", pMapName); -} - -void SamplePlugin::OnLevelShutdown() -{ - META_CONPRINTF("OnLevelShutdown()\n"); -} - -bool SamplePlugin::Pause(char *error, size_t maxlen) -{ - return true; -} - -bool SamplePlugin::Unpause(char *error, size_t maxlen) -{ - return true; -} - -const char *SamplePlugin::GetLicense() -{ - return "Public Domain"; -} - -const char *SamplePlugin::GetVersion() -{ - return "1.0.0.0"; -} - -const char *SamplePlugin::GetDate() -{ - return __DATE__; -} - -const char *SamplePlugin::GetLogTag() -{ - return "SAMPLE"; -} - -const char *SamplePlugin::GetAuthor() -{ - return "AlliedModders LLC"; -} - -const char *SamplePlugin::GetDescription() -{ - return "Sample basic plugin"; -} - -const char *SamplePlugin::GetName() -{ - return "Sample Plugin"; -} - -const char *SamplePlugin::GetURL() -{ - return "http://www.sourcemm.net/"; -} diff --git a/metamod-source/samples/s2_sample_mm/sample_mm.h b/metamod-source/samples/s2_sample_mm/sample_mm.h deleted file mode 100644 index 138c1cda..00000000 --- a/metamod-source/samples/s2_sample_mm/sample_mm.h +++ /dev/null @@ -1,61 +0,0 @@ -/** - * vim: set ts=4 sw=4 tw=99 noet : - * ====================================================== - * Metamod:Source Sample Plugin - * Written by AlliedModders LLC. - * ====================================================== - * - * This software is provided 'as-is', without any express or implied warranty. - * In no event will the authors be held liable for any damages arising from - * the use of this software. - * - * This sample plugin is public domain. - */ - -#ifndef _INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_ -#define _INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_ - -#include -#include -#include - -class SamplePlugin : public ISmmPlugin, public IMetamodListener -{ -public: - bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late); - bool Unload(char *error, size_t maxlen); - bool Pause(char *error, size_t maxlen); - bool Unpause(char *error, size_t maxlen); - void AllPluginsLoaded(); -public: //hooks - void OnLevelInit( char const *pMapName, - char const *pMapEntities, - char const *pOldLevel, - char const *pLandmarkName, - bool loadGame, - bool background ); - void OnLevelShutdown(); - void Hook_GameFrame( bool simulating, bool bFirstTick, bool bLastTick ); - void Hook_ClientActive( CPlayerSlot slot, bool bLoadGame, const char *pszName, uint64 xuid ); - void Hook_ClientDisconnect( CPlayerSlot slot, ENetworkDisconnectionReason reason, const char *pszName, uint64 xuid, const char *pszNetworkID ); - void Hook_ClientPutInServer( CPlayerSlot slot, char const *pszName, int type, uint64 xuid ); - void Hook_ClientSettingsChanged( CPlayerSlot slot ); - void Hook_OnClientConnected( CPlayerSlot slot, const char *pszName, uint64 xuid, const char *pszNetworkID, const char *pszAddress, bool bFakePlayer ); - bool Hook_ClientConnect( CPlayerSlot slot, const char *pszName, uint64 xuid, const char *pszNetworkID, bool unk1, CBufferString *pRejectReason ); - void Hook_ClientCommand( CPlayerSlot nSlot, const CCommand &_cmd ); -public: - const char *GetAuthor(); - const char *GetName(); - const char *GetDescription(); - const char *GetURL(); - const char *GetLicense(); - const char *GetVersion(); - const char *GetDate(); - const char *GetLogTag(); -}; - -extern SamplePlugin g_SamplePlugin; - -PLUGIN_GLOBALVARS(); - -#endif //_INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_ diff --git a/metamod-source/support/README.txt b/metamod-source/support/README.txt deleted file mode 100644 index a54ccb55..00000000 --- a/metamod-source/support/README.txt +++ /dev/null @@ -1,7 +0,0 @@ -Visit: - - http://wiki.alliedmods.net/Category:Metamod:Source_Documentation - - for more information. - - diff --git a/metamod-source/support/SourceMM.Doxyfile b/metamod-source/support/SourceMM.Doxyfile deleted file mode 100644 index b7f2df79..00000000 --- a/metamod-source/support/SourceMM.Doxyfile +++ /dev/null @@ -1,257 +0,0 @@ -# Doxyfile 1.4.2 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = SourceMM -PROJECT_NUMBER = 1.00 -OUTPUT_DIRECTORY = c:\temp\smm-dox -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = YES -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = "C:/Documents and Settings/dvander.WHITENIGHT/Desktop/code/" -STRIP_FROM_INC_PATH = -SHORT_NAMES = YES -JAVADOC_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -DISTRIBUTE_GROUP_DOC = NO -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = NO -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 38 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = YES -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = "C:/Documents and Settings/dvander.WHITENIGHT/Desktop/code/sourcemm" -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = test \ - sample_mm -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = NO -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -VERBATIM_HEADERS = NO -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = NO -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = YES diff --git a/metamod-source/support/buildbot/BreakpadSymbols b/metamod-source/support/buildbot/BreakpadSymbols deleted file mode 100644 index 86e98e38..00000000 --- a/metamod-source/support/buildbot/BreakpadSymbols +++ /dev/null @@ -1,48 +0,0 @@ -# vim: set ts=2 sw=2 tw=99 noet ft=python: -import os, sys - -builder.SetBuildFolder('symbols') - -UPLOAD_SCRIPT = os.path.join(builder.sourcePath, 'support', 'buildbot', 'upload_symbols.py') - -cxx_tasks = MMS.binaries -for cxx_task in cxx_tasks: - if cxx_task.target.platform in ['windows']: - debug_entry = cxx_task.debug - else: - debug_entry = cxx_task.binary - - debug_file = os.path.join(builder.buildPath, debug_entry.path) - if cxx_task.target.platform == 'linux': - argv = ['dump_syms', debug_file, os.path.dirname(debug_file)] - elif cxx_task.target.platform == 'mac': - argv = ['dump_syms', debug_file + '.dSYM'] - elif cxx_task.target.platform == 'windows': - argv = ['dump_syms.exe', debug_file] - - plat_dir = os.path.dirname(debug_file) - bin_dir = os.path.split(plat_dir)[0] - - symbol_file = '{}-{}-{}.breakpad'.format( - os.path.split(bin_dir)[1], - cxx_task.target.platform, - cxx_task.target.arch) - - argv = [sys.executable, UPLOAD_SCRIPT, symbol_file] + argv - builder.AddCommand( - inputs = [UPLOAD_SCRIPT, debug_entry], - argv = argv, - outputs = [symbol_file] - ) - - def run(self, master, job): - ShellCommand.run(self, master, job) - if self.stdout != None and len(self.stdout) > 0: - request = urllib.Request(symbolServer, self.stdout.encode('utf-8')) - request.add_header("Content-Type", "text/plain") - self.serverResponse = urllib.urlopen(request).read().decode('utf-8') - def spew(self, runner): - if self.stderr != None and len(self.stderr) > 0: - runner.PrintOut(self.stderr) - if self.serverResponse != None and len(self.serverResponse) > 0: - runner.PrintOut(self.serverResponse) diff --git a/metamod-source/support/buildbot/PackageScript b/metamod-source/support/buildbot/PackageScript deleted file mode 100644 index 5170fa9b..00000000 --- a/metamod-source/support/buildbot/PackageScript +++ /dev/null @@ -1,60 +0,0 @@ -# vim: set ts=2 sw=2 tw=99 noet ft=python: -import os - -builder.SetBuildFolder('package') - -def deduce_target_sdk(path): - for sdk_name in MMS.sdks: - sdk = MMS.sdks[sdk_name] - if ('metamod.' + sdk['extension']) in path: - return sdk - return None - -addons_folder = builder.AddFolder('addons') -metamod_folder = builder.AddFolder(os.path.join('addons', 'metamod')) -bin_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin')) - -for cxx in MMS.all_targets: - if cxx.target.arch == 'x86_64': - if cxx.target.platform == 'windows': - bin64_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin', 'win64')) - bin64_s2_folder = bin64_folder - builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metamod_win64.vdf'), - os.path.join('addons', 'metamod_x64.vdf')) - elif cxx.target.platform == 'linux': - bin64_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin', 'linux64')) - bin64_s2_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin', 'linuxsteamrt64')) - builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metamod_linux64.vdf'), - os.path.join('addons', 'metamod_x64.vdf')) - elif cxx.target.platform == 'mac': - bin64_folder = builder.AddFolder(os.path.join('addons', 'metamod', 'bin', 'osx64')) - bin64_s2_folder = bin64_folder - builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metamod_osx64.vdf'), - os.path.join('addons', 'metamod_x64.vdf')) - -builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metamod.vdf'), addons_folder) -builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'metaplugins.ini'), metamod_folder) -builder.AddCopy(os.path.join(builder.sourcePath, 'support', 'README.txt'), metamod_folder) - -pdb_list = [] -for task in MMS.binaries: - sdk = deduce_target_sdk(task.binary.path) - - if task.target.arch == 'x86_64': - # libserver check is a hack to make sure that binary ends up in the correct folder - # as s2 folders differ to s1 layout - if 'libserver' in task.binary.path or (sdk is not None and sdk.get('source2', False)): - builder.AddCopy(task.binary, bin64_s2_folder) - else: - builder.AddCopy(task.binary, bin64_folder) - else: - builder.AddCopy(task.binary, bin_folder) - - if task.debug: - pdb_list.append(task.debug) - -# Generate PDB info. -with open(os.path.join(builder.buildPath, 'pdblog.txt'), 'wt') as fp: - for line in pdb_list: - fp.write(line.path + '\n') - diff --git a/metamod-source/support/buildbot/Versioning b/metamod-source/support/buildbot/Versioning deleted file mode 100644 index 6b768197..00000000 --- a/metamod-source/support/buildbot/Versioning +++ /dev/null @@ -1,44 +0,0 @@ -# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python: -import os, sys -import re - -builder.SetBuildFolder('/') - -includes = builder.AddFolder('includes') - -argv = [ - sys.executable, - os.path.join(builder.sourcePath, 'support', 'buildbot', 'generate_headers.py'), - os.path.join(builder.sourcePath), - os.path.join(builder.buildPath, 'includes') -] -outputs = [ - os.path.join(builder.buildFolder, 'includes', 'metamod_version_auto.h') -] - -with open(os.path.join(builder.sourcePath, '.git', 'HEAD'), encoding='utf-8') as fp: - head_contents = fp.read().strip() - if re.search('^[a-fA-F0-9]{40}$', head_contents): - git_head_path = os.path.join(builder.sourcePath, '.git', 'HEAD') - else: - git_state = head_contents.split(':')[1].strip() - git_head_path = os.path.join(builder.sourcePath, '.git', git_state) - if not os.path.exists(git_head_path): - git_head_path = os.path.join(builder.sourcePath, '.git', 'HEAD') - -sources = [ - os.path.join(builder.sourcePath, 'product.version'), - - # This is a hack, but we need some way to only run this script when Git changes. - git_head_path, - - # The script source is a dependency, of course... - argv[1] -] -output_nodes = builder.AddCommand( - inputs=sources, - argv=argv, - outputs=outputs -) - -rvalue = output_nodes diff --git a/metamod-source/support/buildbot/bootstrap.py b/metamod-source/support/buildbot/bootstrap.py deleted file mode 100644 index ed2396b3..00000000 --- a/metamod-source/support/buildbot/bootstrap.py +++ /dev/null @@ -1,105 +0,0 @@ -# vim: set sw=4 sts=4 ts=4 sw=99 et: -from contextlib import contextmanager -import argparse -import json -import os -import platform -import shutil -import subprocess - -@contextmanager -def Chdir(path): - old = os.getcwd() - os.chdir(path) - print('> cd {} # {}'.format(path, os.getcwd())) - try: - yield - finally: - os.chdir(old) - -def run_shell(argv, env = None): - if type(argv) is str: - print('> {}'.format(argv)) - shell = True - else: - print('> {}'.format(' '.join(argv))) - shell = False - try: - output = subprocess.check_output(argv, stderr = subprocess.STDOUT, env = env, shell = shell) - except subprocess.CalledProcessError as cpe: - if not shell: - print(cpe.output.decode('utf-8', 'ignore')) - raise - print(output.decode('utf-8', 'ignore')) - -def output_needs_cleaning(): - if not os.path.isdir('OUTPUT'): - return False - amb2_dir = os.path.join('OUTPUT', '.ambuild2') - if not os.path.exists(os.path.join(amb2_dir, 'graph')): - return True - if not os.path.exists(os.path.join(amb2_dir, 'vars')): - return True - return False - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument('--config', type = str, required = True, - help = 'Buildbot slave name') - parser.add_argument('--hl2sdk-root', type = str, required = True, - help = 'hl2sdk collection') - parser.add_argument('--python-cmd', type = str, required = True, - default = 'python3', - help = 'Python command') - args = parser.parse_args() - - run_shell("git submodule update --init --recursive") - - source = os.getcwd() - - with open(os.path.join('support', 'buildbot', 'buildconfig.json'), 'rt') as fp: - config_root = json.load(fp) - - config = config_root.get(args.config, {}) - - # Set build properties. - build_env = os.environ.copy() - for env_var in ['CC', 'CXX']: - if env_var not in config: - continue - build_env[env_var] = config[env_var] - - if platform.system() == 'Windows': - hl2sdk_root = '/Volumes/hgshare' - python_cmd = "C:\\Python38\\Python.exe" - elif platform.system() == 'Linux': - hl2sdk_root = '/hgshare' - python_cmd = "python3" - elif platform.system() == 'Windows': - hl2sdk_root = 'H:\\' - python_cmd = "python3" - - config_argv = [ - args.python_cmd, - os.path.join(source, 'configure.py'), - '--enable-optimize', - '--breakpad-dump', - '--no-color', - '--symbol-files', - '--targets=x86,x86_64', - '--sdks=all', - '--out=OUTPUT', - '--hl2sdk-root={}'.format(args.hl2sdk_root), - ] - - print("Attempting to reconfigure...") - - with Chdir('..'): - if output_needs_cleaning(): - shutil.rmtree('OUTPUT') - if not os.path.isdir('OUTPUT'): - os.makedirs('OUTPUT') - run_shell(config_argv, env = build_env) - -if __name__ == '__main__': - main() diff --git a/metamod-source/support/buildbot/build_type b/metamod-source/support/buildbot/build_type deleted file mode 100644 index 38f8e886..00000000 --- a/metamod-source/support/buildbot/build_type +++ /dev/null @@ -1 +0,0 @@ -dev diff --git a/metamod-source/support/buildbot/buildconfig.json b/metamod-source/support/buildbot/buildconfig.json deleted file mode 100644 index 60eb592c..00000000 --- a/metamod-source/support/buildbot/buildconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "debian8": { - "CC": "clang-3.8", - "CXX": "clang-3.8" - }, - "debian11": { - "CC": "clang-14", - "CXX": "clang++-14" - } -} diff --git a/metamod-source/support/buildbot/generate_headers.py b/metamod-source/support/buildbot/generate_headers.py deleted file mode 100644 index 578dcb7d..00000000 --- a/metamod-source/support/buildbot/generate_headers.py +++ /dev/null @@ -1,86 +0,0 @@ -# vim: set ts=8 sts=2 sw=2 tw=99 et: -import re -import os, sys -import subprocess - -argv = sys.argv[1:] -if len(argv) < 2: - sys.stderr.write('Usage: generate_headers.py \n') - sys.exit(1) - -SourceFolder = os.path.abspath(os.path.normpath(argv[0])) -OutputFolder = os.path.normpath(argv[1]) - -class FolderChanger: - def __init__(self, folder): - self.old = os.getcwd() - self.new = folder - - def __enter__(self): - if self.new: - os.chdir(self.new) - - def __exit__(self, type, value, traceback): - os.chdir(self.old) - -def run_and_return(argv): - # Python 2.6 doesn't have check_output. - if hasattr(subprocess, 'check_output'): - text = subprocess.check_output(argv) - if str != bytes: - text = str(text, 'utf-8') - else: - p = subprocess.Popen(argv, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - output, ignored = p.communicate() - rval = p.poll() - if rval: - raise subprocess.CalledProcessError(rval, argv) - text = output.decode('utf8') - return text.strip() - -def get_git_version(): - revision_count = run_and_return(['git', 'rev-list', '--count', 'HEAD']) - revision_hash = run_and_return(['git', 'log', '--pretty=format:%h:%H', '-n', '1']) - shorthash, longhash = revision_hash.split(':') - - return revision_count, shorthash, longhash - -def output_version_header(): - with FolderChanger(SourceFolder): - count, shorthash, longhash = get_git_version() - - with open(os.path.join(SourceFolder, 'product.version')) as fp: - contents = fp.read() - m = re.match(r'(\d+)\.(\d+)\.(\d+)-?(.*)', contents) - if m == None: - raise Exception('Could not detremine product version') - major, minor, release, tag = m.groups() - product = "{0}.{1}.{2}".format(major, minor, release) - fullstring = product - if tag != "": - fullstring += "-{0}".format(tag) - if tag == "dev": - fullstring += "+{0}".format(count) - - with open(os.path.join(OutputFolder, 'metamod_version_auto.h'), 'w') as fp: - fp.write(""" -#ifndef _METAMOD_AUTO_VERSION_INFORMATION_H_ -#define _METAMOD_AUTO_VERSION_INFORMATION_H_ - -#define MMS_BUILD_TAG \"{0}\" -#define MMS_BUILD_CSET \"{1}\" -#define MMS_BUILD_MAJOR \"{2}\" -#define MMS_BUILD_MINOR \"{3}\" -#define MMS_BUILD_RELEASE \"{4}\" -#define MMS_BUILD_LOCAL_REV \"{6}\" - -#define MMS_BUILD_UNIQUEID "{6}:" MMS_BUILD_CSET - -#define MMS_VERSION_STRING \"{5}\" -#define MMS_VERSION_FILE {2},{3},{4},0 - -#endif /* _METAMOD_AUTO_VERSION_INFORMATION_H_ */ - """.format(tag, shorthash, major, minor, release, fullstring, count)) - -output_version_header() - diff --git a/metamod-source/support/buildbot/helpers.pm b/metamod-source/support/buildbot/helpers.pm deleted file mode 100644 index 1e3e13ea..00000000 --- a/metamod-source/support/buildbot/helpers.pm +++ /dev/null @@ -1,174 +0,0 @@ -#!/usr/bin/perl - -use strict; -use Cwd; - -package Build; - -our $SVN = "/usr/bin/svn"; -our $SVN_USER = 'dvander'; -our $SVN_ARGS = ''; - -sub GitRevNum -{ - my ($path) = (@_); - my ($cd, $text, $rev); - - $cd = Cwd::cwd(); - chdir($path); - $text = `git rev-list --count HEAD`; - chdir($cd); - - chomp $text; - if ($text =~ /^(\d+)/) { - return $1; - } - - return 0; -} - -sub HgRevNum -{ - my ($path) = (@_); - my ($cd, $text, $rev); - - $cd = Cwd::cwd(); - chdir($path); - $text = `hg identify -n`; - chdir($cd); - - chomp $text; - if ($text =~ /^(\d+)/) - { - return $1; - } - - return 0; -} - -sub SvnRevNum -{ - my ($str)=(@_); - - my $data = Command('svnversion -c ' . $str); - if ($data =~ /(\d+):(\d+)/) - { - return $2; - } elsif ($data =~ /(\d+)/) { - return $1; - } else { - return 0; - } -} - -sub ProductVersion -{ - my ($file) = (@_); - my ($version); - open(FILE, $file) or die "Could not open $file: $!\n"; - $version = ; - close(FILE); - chomp $version; - return $version; -} - -sub Delete -{ - my ($str)=(@_); - if ($^O =~ /MSWin/) - { - Command("del /S /F /Q \"$str\""); - Command("rmdir /S /Q \"$str\""); - } else { - Command("rm -rf $str"); - } - return !(-e $str); -} - -sub Copy -{ - my ($src,$dest)=(@_); - if ($^O =~ /MSWin/) - { - Command("copy \"$src\" \"$dest\" /y"); - } else { - Command("cp \"$src\" \"$dest\""); - } - return (-e $dest); -} - -sub Move -{ - my ($src,$dest)=(@_); - if ($^O =~ /MSWin/) - { - Command("move \"$src\" \"$dest\""); - } else { - Command("mv \"$src\" \"$dest\""); - } - return (-e $dest); -} - -sub Command -{ - my($cmd)=(@_); - print "$cmd\n"; - return `$cmd`; -} - -sub PathFormat -{ - my ($str)=(@_); - if ($^O =~ /MSWin/) - { - $str =~ s#/#\\#g; - } else { - $str =~ s#\\#/#g; - } - return $str; -} - -sub SVN_Remove -{ - my ($file)=(@_); - my ($path, $name); - if ($^O =~ /MSWin/) - { - ($path, $name) = ($file =~ /(.+)\/([^\/]+)$/); - } else { - ($path, $name) = ($file =~ /(.+)\\([^\\]+)$/); - } - my $dir = Cwd::cwd(); - chdir($path); - Command($SVN . ' ' . $SVN_ARGS . ' delete ' . $name); - chdir($dir); -} - -sub SVN_Add -{ - my ($file)=(@_); - my ($path, $name); - if ($^O =~ /MSWin/) - { - ($path, $name) = ($file =~ /(.+)\/([^\/]+)$/); - } else { - ($path, $name) = ($file =~ /(.+)\\([^\\]+)$/); - } - my $dir = Cwd::cwd(); - chdir($path); - Command($SVN . ' ' . $SVN_ARGS . ' add ' . $name); - chdir($dir); -} - -sub GetBuildType -{ - my ($file)=(@_); - my ($type); - open(TYPE, $file) or die("Could not open file: $!\n"); - $type = ; - close(TYPE); - chomp $type; - return $type; -} - -return 1; diff --git a/metamod-source/support/buildbot/package.pl b/metamod-source/support/buildbot/package.pl deleted file mode 100644 index 462e7ec5..00000000 --- a/metamod-source/support/buildbot/package.pl +++ /dev/null @@ -1,118 +0,0 @@ -#!/usr/bin/perl - -use strict; -use Cwd; -use File::Basename; -use File::Temp qw/ tempfile :seekable/; -use Net::FTP; - -my ($ftp_file, $ftp_host, $ftp_user, $ftp_pass, $ftp_path, $tag); - -$ftp_file = shift; -$tag = shift; - -open(FTP, $ftp_file) or die "Unable to read FTP config file $ftp_file: $!\n"; -$ftp_host = ; -$ftp_user = ; -$ftp_pass = ; -$ftp_path = ; -close(FTP); - -chomp $ftp_host; -chomp $ftp_user; -chomp $ftp_pass; -chomp $ftp_path; - -my ($myself, $path) = fileparse($0); -chdir($path); - -use FindBin; -use lib $FindBin::Bin; -require 'helpers.pm'; - -#Switch to the output folder. -chdir(Build::PathFormat('../../../OUTPUT/package')); - -my ($version); - -$version = Build::ProductVersion(Build::PathFormat('../../build/product.version')); -$version =~ s/-dev//g; -$version .= '-git' . Build::GitRevNum('../../build'); - -# Append OS to package version -if ($^O eq "darwin") -{ - $version .= '-mac'; -} -elsif ($^O =~ /MSWin/) -{ - $version .= '-windows'; -} -else -{ - $version .= '-' . $^O; -} - -if (defined $tag) -{ - $version .= '-' . $tag; -} - -my ($filename); -$filename = 'mmsource-' . $version; -if ($^O eq "linux") -{ - $filename .= '.tar.gz'; - print "tar zcvf $filename addons\n"; - system("tar zcvf $filename addons"); -} -else -{ - $filename .= '.zip'; - print "zip -r $filename addons\n"; - system("zip -r $filename addons"); -} - -my ($tmpfh, $tmpfile) = tempfile(); -print $tmpfh $filename; -$tmpfh->seek( 0, SEEK_END ); -my $latest = "mmsource-latest-"; -if ($^O eq "darwin") { - $latest .= "mac"; -} -elsif ($^O =~ /MSWin/) { - $latest .= "windows"; -} -else { - $latest .= $^O; -} - -my ($major,$minor) = ($version =~ /^(\d+)\.(\d+)/); -$ftp_path .= "/$major.$minor"; - -my ($ftp); - -$ftp = Net::FTP->new($ftp_host, Debug => 0, Passive => 1) - or die "Cannot connect to host $ftp_host: $@"; - -$ftp->login($ftp_user, $ftp_pass) - or die "Cannot connect to host $ftp_host as $ftp_user: " . $ftp->message . "\n"; - -if ($ftp_path ne '') -{ - $ftp->cwd($ftp_path) - or die "Cannot change to folder $ftp_path: " . $ftp->message . "\n"; -} - -$ftp->binary(); -$ftp->put($filename) - or die "Cannot drop file $filename ($ftp_path): " . $ftp->message . "\n"; -$ftp->put($tmpfile, $latest) - or die "Cannot drop file $latest ($ftp_path): " . $ftp->message . "\n"; - -$ftp->close(); - -print "File sent to drop site as $filename -- build succeeded.\n"; - -exit(0); - diff --git a/metamod-source/support/buildbot/startbuild.pl b/metamod-source/support/buildbot/startbuild.pl deleted file mode 100644 index adaa20a2..00000000 --- a/metamod-source/support/buildbot/startbuild.pl +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/perl -# vim: set ts=2 sw=2 tw=99 noet: - -use File::Basename; - -my ($myself, $path) = fileparse($0); -chdir($path); - -use FindBin; -use lib $FindBin::Bin; -require 'helpers.pm'; - -chdir('../../../OUTPUT'); - -my $argn = $#ARGV + 1; -if ($argn > 0) { - $ENV{CC} = $ARGV[0]; - $ENV{CXX} = $ARGV[0]; -} - -if ($^O !~ /MSWin/) { - system("ambuild --no-color 2>&1"); -} else { - system("C:\\Python38\\scripts\\ambuild --no-color 2>&1"); -} - -if ($? != 0) -{ - die "Build failed: $!\n"; -} -else -{ - exit(0); -} - diff --git a/metamod-source/support/buildbot/symstore.pl b/metamod-source/support/buildbot/symstore.pl deleted file mode 100644 index 3b0cf156..00000000 --- a/metamod-source/support/buildbot/symstore.pl +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/perl - -use File::Basename; - -my ($myself, $path) = fileparse($0); -chdir($path); - -use FindBin; -use lib $FindBin::Bin; -require 'helpers.pm'; - -chdir('..'); -chdir('..'); - -open(PDBLOG, '../OUTPUT/pdblog.txt') or die "Could not open pdblog.txt: $!\n"; - -#Get version info -my ($version); -$version = Build::ProductVersion(Build::PathFormat('product.version')); -$version =~ s/-dev//g; -$version .= '-git' . Build::GitRevNum('.'); - -my ($build_type); -$build_type = Build::GetBuildType(Build::PathFormat('support/buildbot/build_type')); - -if ($build_type eq "dev") -{ - $build_type = "buildbot"; -} -elsif ($build_type eq "rel") -{ - $build_type = "release"; -} - -my ($line); -while () -{ - $line = $_; - $line =~ s/\.pdb/\*/; - chomp $line; - Build::Command("symstore add /r /f \"..\\OUTPUT\\$line\" /s \"S:\\mmsource\" /t \"Metamod:Source\" /v \"$version\" /c \"$build_type\""); -} - -close(PDBLOG); - -#Lowercase DLLs. Sigh. -my (@files); -opendir(DIR, "S:\\mmsource") or die "Could not open mmsource symbol folder: $!\n"; -@files = readdir(DIR); -closedir(DIR); - -my ($i, $j, $file, @subdirs); -for ($i = 0; $i <= $#files; $i++) -{ - $file = $files[$i]; - next unless ($file =~ /\.dll$/); - next unless (-d "S:\\mmsource\\$file"); - opendir(DIR, "S:\\mmsource\\$file") or die "Could not open S:\\mmsource\\$file: $!\n"; - @subdirs = readdir(DIR); - closedir(DIR); - for ($j = 0; $j <= $#subdirs; $j++) - { - next unless ($subdirs[$j] =~ /[A-Z]/); - Build::Command("rename S:\\mmsource\\$file\\" . $subdirs[$j] . " " . lc($subdirs[$j])); - } -} - diff --git a/metamod-source/support/buildbot/trigger_full_rebuild b/metamod-source/support/buildbot/trigger_full_rebuild deleted file mode 100644 index cf495b89..00000000 --- a/metamod-source/support/buildbot/trigger_full_rebuild +++ /dev/null @@ -1 +0,0 @@ -Aug 19, 2020 #2 diff --git a/metamod-source/support/buildbot/upload_symbols.py b/metamod-source/support/buildbot/upload_symbols.py deleted file mode 100644 index 9756fdb5..00000000 --- a/metamod-source/support/buildbot/upload_symbols.py +++ /dev/null @@ -1,114 +0,0 @@ -# vim: ts=8 sts=2 sw=2 tw=99 et ft=python: -import sys -import subprocess -import os -try: - import urllib.request as urllib -except ImportError: - import urllib2 as urllib - -if len(sys.argv) < 3: - sys.stderr.write('Usage: \n') - sys.exit(1) - -SYMBOL_SERVER = os.environ['BREAKPAD_SYMBOL_SERVER'] -symbol_file = sys.argv[1] -cmd_argv = sys.argv[2:] - -sys.stdout.write(' '.join(cmd_argv)) -sys.stdout.write('\n') - -p = subprocess.Popen( - args = cmd_argv, - stdout = subprocess.PIPE, - stderr = subprocess.PIPE, - shell = False -) -stdout, stderr = p.communicate() -out = stdout.decode('utf8') -err = stdout.decode('utf8') - -with open(symbol_file, 'w') as fp: - fp.write(out) - fp.write(err) - -lines = out.splitlines() - -paths = set() -roots = {} - -# Lets not even talk about this. -def fixWindowsPath(path): - import ctypes - GetShortPathName = ctypes.windll.kernel32.GetShortPathNameW - shortp = ctypes.create_unicode_buffer(260) - rv = GetShortPathName(path.capitalize(), shortp, 260) - if rv == 0 or rv > 260: - return path - GetLongPathName = ctypes.windll.kernel32.GetLongPathNameW - longp = ctypes.create_unicode_buffer(260) - rv = GetLongPathName(shortp, longp, 260) - if rv == 0 or rv > 260: - return path - return longp.value - -for i, line in enumerate(lines): - line = line.strip().split(None, 2) - - if line[0] != 'FILE': - continue - - path = line[2] - - if os.name == 'nt' and os.path.exists(path): - path = fixWindowsPath(path) - line = ' '.join(['FILE', line[1], path]) - lines[i] = line - - path = os.path.dirname(path) - if path in paths: - continue - - paths.add(path) - - root = None - url = None - rev = None - - with open(os.devnull, 'w') as devnull: - def runCommand(argv): - proc = subprocess.Popen(argv, stdout=subprocess.PIPE, stderr=devnull, cwd=path, universal_newlines=True) - procout, procerr = proc.communicate() - if proc.returncode: - raise RuntimeError('Failed to execute \'' + ' '.join(argv) + '\' = ' + str(proc.returncode)) - return procout.strip() - - try: - root = runCommand(['git', 'rev-parse', '--show-toplevel']) - root = os.path.normpath(root) - - if root in roots: - continue - - url = runCommand(['git', 'ls-remote', '--get-url', 'origin']) - rev = runCommand(['git', 'log', '--pretty=format:%H', '-n', '1']) - except (OSError, RuntimeError) as e: - #sys.stderr.write(str(e) + '\n') - continue - - roots[root] = (url, rev) - -index = 1 -while lines[index].split(None, 1)[0] == 'INFO': - index += 1; - -for root, info in roots.items(): - lines.insert(index, 'INFO REPO ' + ' '.join([info[1], info[0], root])) - index += 1; - -out = os.linesep.join(lines).encode('utf8') - -request = urllib.Request(SYMBOL_SERVER, out) -request.add_header('Content-Type', 'text/plain') -server_response = urllib.urlopen(request).read().decode('utf8').strip() -print(server_response) diff --git a/metamod-source/support/changelog.txt b/metamod-source/support/changelog.txt deleted file mode 100644 index f83610cf..00000000 --- a/metamod-source/support/changelog.txt +++ /dev/null @@ -1,230 +0,0 @@ -2009/12/19 1.8.0: - - Added support for the Source engine that runs Left 4 Dead 2 (bug 4078). - - Added VP hook support to legacy SourceHook (bug 4019). - - Backported GetSourceEngineBuild from the new API to the legacy API (bug - 4082). - - Backported GetVSPInfo from the new API to the legacy API (bug 4079). - - Backported OnUnlinkConCommandBase event from the new API to the legacy API - (bug 4018). - - Improved usermessage extraction code (bug 4117). - - Improved OS X support for SourceHook (bug 3514). - - Added separate build for the Orange Box engine (bug 4084). - - Added game path to ISmmPluginExt API. - -2009/02/25 1.7.1: - - Added support for the Source engine version that runs Dark Messiah. The - development of this feature would not be possible without the support of the - following people from the game's community: Dylan Riggs, Carl Pettengill, Ed - Moreland, and Christian. - - Fixed a bug where plugin aliases defined in VDF files were not working on the - Orange Box and Left 4 Dead engines. - - Fixed SourceHook passing invalid mprotect() values (bug 3642). - - Fixed "late" load parameter always being true in VSP mode (bug 3532). - - Added MSVC project templates for plugins, from Daedilus. - -2008/11/26 1.7.0: - - Metamod:Source now uses a unified package that will run on all supported - Source engines. This means you do not have to download a version based on - which Source engine or game you use. - - Added support for the Source engine version that runs Left 4 Dead. - - The 'meta refresh' command now handles plugins loaded from VDF files. - - Fixed amb1952: Crash when the first plugin listed in metaplugins.ini had an - alias and was not on the first line of the file. - -2008/07/26 1.6.2: - - Fixed a bug where VDF files were opened by MM:S even if the .vdf extension - was not at the very end of the filename. For example, "plugin.vdf.disabled" - would have been opened in previous versions. (amb1534) - - Removed FCVAR_REPLICATED from MM:S convars. The following message will no - longer appear in client consoles: ConVarRef metamod_version doesn't point to - an existing ConVar. (amb1480) - -2008/02/25 1.6.1: - - Fixed crash bug against mods compiled with GCC-4.2 -fvisibility=hidden - - API wrappers for GetUserMessageInfo() now have failsafe fallbacks - since the OrangeBox SDK fixed an older SDK's crash bug. - -2008/02/18 1.6.0: - - Added ability to load from a VDF file instead of gameinfo.txt. - - Added ability to load MM:S plugins from VDF files. - - Added new version of SourceHook with the following changes: - - Added API for hooking functions on a virtual table to all instances. - - SH_ADD_HOOK macros now return non-zero hook IDs. Additionally, - the old hook adding/removing syntax is deprecated (but still supported). - - Added SH_REMOVE_HOOK_ID to remove hooks by ID. - - CallClasses have been deprecated. The SH_CALL macro can now take a class - instance pointer rather than a callclass pointer. - - Can now generate dynamic, arbitrary hooks at runtime (see hookmangen). - - Metamod:Source has now received a large internal rewrite to improve coding - standards and to separate internal logic from engine specifics. - - Added mm_basedir cvar to specify Metamod's base folder. - - Added API for getting highest supported IServerPluginCallbacks interface - version. - - Added API for detecting the engine version. - - Added API for getting the VSP-simulation interface upon late loading. - - Added OnUnlinkConCommandBase to IMetamodListner to notify when Metamod:Source - is about to remove a concommand or convar. - - Added the ability for Metamod:Source to load as a VSP instead of through - gameinfo.txt. - - The output of the "meta list" command has been reformatted in order to allow - more space for plugins' name, version, and author fields. - - Sample/Stub plugins have improved building mechanism and code, and will - compile against both MM:S 1.6 for OrangeBox and MM:S 1.4 for Episode 1. - -2008/07/26 1.4.4: - - Fixed a bug where loading plugins built for MM:S 1.3 or older (API ver <= 9) - would cause a crash. - - Fixed a bug where loading plugins using VDF files caused Metamod:Source - to crash on The Ship. (bug 1523) - - Fixed a class of crashes caused by improper cvar removal handling. (bug 1416) - - Fixed a bug where VDF files were opened by MM:S even if the .vdf extension - was not at the very end of the filename. For example, "plugin.vdf.disabled" - would have been opened in previous versions. (bug 1534) - - Removed FCVAR_REPLICATED from MM:S convars. (bug 1479) - -2008/01/23 1.4.3: - - Metamod:Source can now be loaded via a .vdf instead of gameinfo.txt. - - Added new plugin loading mechanism via .vdf files in the metamod folder. - - Changed "meta list" output to look similar to Metamod:Source 1.6. - - Plugins which need a VSP pointer can now receive it on late load. - - Fixed a small memory leak when using recalls (RETURN_META_NEWPARAMS). - - Fixed a rare memory corruption bug in the CVector class. - -2007/06/26 1.4.2: - - Fixed a bug where unloading all plugins could crash if one plugin had child - plugins. - -2007/05/16 1.4.1: - - The client version of the "meta" command should now work with games using the - latest Source beta (srcds0407). - - Fixed amb233 (VSP listener didn't work with Steam dedicated version). - - Fixed amb277 (failed to get user message list in Kreedz Climbing). - -2007/04/05 1.4.0: - - Added API functions for retrieving User Message info without potentially - crashing. - - Added API functions for letting SourceMM plugins use Valve Server Plugin - callbacks. - - Added plugin status to client version of "meta list" command. Previously, it - did not differentiate between running and paused plugins. - - An experimental automatic gameinfo.txt fixer is now available. - - Changed version numbering to include the build number (SVN revision). - - Fixed amb93 (improved mod path detection). - - Fixed various rare string inconsistencies. - -2006/11/29 1.3d: - - Updated Metamod:Source to recognize the latest Source Engine version - (ServerGameDLL006) - -2006/09/06 1.3a: - - Fixed a building issue on Linux which caused unresolved symbol errors when - trying to load Metamod:Source on a game using an older set of engine - libraries. This fix should now allow Metamod:Source to run with The Ship on - Linux. - -2006/08/16 1.3: - - Added SourceHook support for functions that return references. - - Added some extra information to the "meta game" command: Description and - Interface. For example, CS:S would display "Counter-Strike: Source" and - "ServerGameDLL004." - - Added some extra functionality to ISmmPluginManager. - - Added compiling support for MSVC 8.0 (Visual Studio 2005) and GCC 4.x. - - Added another API helper function for formatting and searching for - interfaces. - - Updated project files and source tree to use the latest HL2SDK. - - Updated the sample plugins to be a bit cleaner and use newer API. - - Fixed bug where Metamod:Source could load the wrong GameDLL and/or load more - than one GameDLL. This issue occured in HL2 CTF, SourceForts, or any other - mod that relied on files from another mod directory. - - Fixed bug where ISmmAPI::MetaFactory() would return the wrong interface when - trying to retrieve ISmmPluginManager. - - Fixed bug where returning false in Load() after adding a Metamod event - listener or hooking a function could cause a crash instead of rejecting the - plugin. - - Fixed bug where trying to load Metamod:Source a second time as a SourceMM or - Valve server plugin could cause a crash. - - Fixed a bug in FormatIface() that caused InterfaceSearch() to infinite loop. - -2006/06/14 1.2.3: - - Added SourceHook API for manual recalls: RETURN_META_(VALUE_)MNEWPARAMS - - Added support for ServerGameDLL005 (latest HL2DM update) - -2006/05/25 1.2.2: - - Added the ability to "alias" plugin names in metaplugins.ini. - - Added "meta alias" command. - - Added SourceHook API for manual callclasses. - - Added support for the latest Source engine (ServerGameDLL005). - - Added API for printing text in a client's console with ClientConPrintf. This - does the same thing as IVEngineServer::ClientPrintf except that it allows - string formatting. - - Added client version of "meta" command in order to allow clients to view - version information and a list of loaded plugins. - - Fixed a bug causing old mods on newer engines to fail loading. - - Fixed issues with SourceHook's SH_CALL and reference parameters. - - Fixed a bug where the mm_pluginsfile cvar was being ignored. - - Fixed a memory leak when using ISmmAPI::InterfaceSearch. - -2006/02/15 1.2.1: - - Fixed bug where returning newparams in a post hook would cause infinite - recursion. - - Fixed bug where "meta load" could load the same plugin multiple times. - - Fixed bug where unloading a plugin could crash internal hook states. - - Fixed bug where unhooking a single hook would clear the hook chain. - -2006/01/07 1.2: - - Added SourceHook API for modifying parameters in the hook chain. - - Added SourceHook API for declaring and hooking manual vtable hooks. - - Added better API for querying an interface factory. - - Added API for formatting an OS-independent path. - - Added Listen Server Launcher to the graphical installer. - - Fixed bug where failed plugins could crash the plugin list. - - NOTE: SourceHook changes may require plugins to be recompiled against the new - API. - -2005/12/06 1.1.2: - - Added interface overriding/sharing examples to sample plugins. - - Added API to help guessing at Valve interface versions. - - Fixed various memory leaks. - - Fixed memory corruption bug on vector copying. - - Fixed other various template bugs. - -2005/10/21 1.1.1: - - Fixed a bug where AllPluginsLoaded() was not called after DLLInit(). - -2005/10/21 1.1: - - Rewrote GameDLL loading code to be API version generic. As such, SourceMM - will now easily support new API releases without an SDK release, such as the - case with Day of Defeat:Source. - - Added more flexibility to plugin control by supplying an event system. - - Removed dependency on libstdc++.so by supplying a small template library. - - SourceHook internal API is now interface-based, meaning that future updates - to the API will not break older plugins. This update, however, breaks older - plugins. - - SourceHook is now re-entrant. - - Added a basic automated installer (by Basic-Master). - - Fixed a bug where games with changing game names would not work. - - Fixed various bugs, including a cvarlist corruption bug on unloading plugins. - -2005/07/07 1.00-RC2: - - Added API for dealing with ConCommandBase registration (cvars/concmds). This - is to fix the fact that Valve API provides no way to unlist a cvar/cmd. - - Added two new commands - "meta cmds" and "meta cvars". - - Added API calls for correctly printing to the console such that rcon will - also receive messages that a plugin prints. This problem was mentioned on - hlcoders and Valve offered no reply. - - Added event hooking and cvar samples to sample_mm. - - Added new cvar, mm_pluginsfile, which defaults to - "addons/metamod/metaplugins.ini". - - Fixed a bug where multiple vtable patches on the same hook were not - re-patched when removed. This caused a crash when two hooks were declared on - one function, the first was removed, and the original function was then - called. - - Fixed "meta clear" not unloading all plugins. - - Fixed Metamod:Source loading plugins with a higher current API version. - - Fixed whitespace being parsed in metaplugins.ini. - - Fixed bug where SourceHook tried to patch already destroyed/unavailable - memory. - - Bumped Plugin API version to 6. - -2005/05/06 1.00-RC1: - - Initial release. diff --git a/metamod-source/support/checkout-deps.ps1 b/metamod-source/support/checkout-deps.ps1 deleted file mode 100644 index 62cc9507..00000000 --- a/metamod-source/support/checkout-deps.ps1 +++ /dev/null @@ -1,135 +0,0 @@ -<# -.SYNOPSIS - Downloads dependencies for compiling MetaMod:Source. -.PARAMETER SDKs - List of HL2SDK branch names to downloads. -#> - -[CmdletBinding()] -param( - [string[]]$SDKs = @( - 'csgo' - 'hl2dm' - 'nucleardawn' - 'l4d2' - 'dods' - 'l4d' - 'css' - 'tf2' - 'insurgency' - 'sdk2013' - 'dota' - 'orangebox' - 'blade' - 'episode1' - 'bms' - 'darkm' - 'swarm' - 'bgt' - 'eye' - 'contagion' - 'doi' - 'pvkii' - 'mcv' - ) -) - -Function Get-Repository -{ - param( - [Parameter(Mandatory=$true)][string]$Name, - [Parameter(Mandatory=$true)][string]$Branch, - [Parameter(Mandatory=$true)][string]$Repo, - [string]$Origin - ) - - If (-not (Test-Path $Name -PathType Container)) - { - & git clone $Repo -b $Branch $Name 2>&1 | Write-Host - If ($Origin) - { - Set-Location $Name - & git remote set-url origin $Origin 2>&1 | Write-Host - Set-Location .. - } - } - Else - { - Set-Location $Name - If ($Origin) - { - & git remote set-url origin ..\$Repo 2>&1 | Write-Host - } - & git checkout $Branch 2>&1 | Write-Host - & git pull origin $Branch 2>&1 | Write-Host - If ($Origin) - { - & git remote set-url origin $Origin 2>&1 | Write-Host - } - Set-Location .. - } -} - -if (-not (Test-Path "metamod-source" -PathType Container)) -{ - Write-Error "Could not find a MetaMod:Source repository; make sure you aren't running this script inside it." - Exit 1 -} - -if (-not (Test-Path "hl2sdk-proxy-repo" -PathType Container)) -{ - & git clone --mirror https://github.com/alliedmodders/hl2sdk hl2sdk-proxy-repo 2>&1 | Write-Host -} -else -{ - Set-Location hl2sdk-proxy-repo - & git fetch 2>&1 | Write-Host - Set-Location .. -} - -$SDKS | ForEach-Object { - Get-Repository -Name "hl2sdk-$_" -Branch $_ -Repo "hl2sdk-proxy-repo" "https://github.com/alliedmodders/hl2sdk.git" -} - -# Find a suitable installation of Python -$PYTHON_CMD = Get-Command 'python' -ErrorAction SilentlyContinue -if ($NULL -eq $PYTHON_CMD) -{ - $PYTHON_CMD = Get-Command 'python3' -ErrorAction SilentlyContinue - if ($NULL -eq $PYTHON_CMD) - { - $PYTHON_CMD = Get-Command 'py' -ErrorAction SilentlyContinue - if ($NULL -eq $PYTHON_CMD) - { - Write-Error 'No suitable installation of Python detected' - Exit 1 - } - } -} - -$PYTHON_CMD = $PYTHON_CMD.Source # Convert the result into a string path. - -& $PYTHON_CMD -c 'import ambuild2' 2>&1 1>$NULL -if ($LastExitCode -eq 1) -{ - Write-Host -ForegroundColor Red "AMBuild is required to build MetaMod:Source" - - # Ensure PIP is installed, otherwise, install it. - & $PYTHON_CMD -m pip --version 2>&1 1>$NULL # We use PIP's '--version' as it's the least verbose. - if ($LastExitCode -eq 1) { - Write-Host -ForegroundColor Red 'The detected Python installation does not have PIP' - Write-Host 'Installing the latest version of PIP available (VIA "get-pip.py")' - - $GET_PIP = Join-Path $(Resolve-Path './') 'get-pip.py' - Invoke-WebRequest -Uri "https://bootstrap.pypa.io/get-pip.py" -OutFile $GET_PIP - - & $PYTHON_CMD $GET_PIP - if ($LastExitCode -eq 1) { - Write-Error 'Installation of PIP has failed' - Exit 1 - } - } - - Get-Repository -Name "ambuild" -Branch "master" -Repo "https://github.com/alliedmodders/ambuild.git" - & $PYTHON_CMD -m pip install ./ambuild -} diff --git a/metamod-source/support/checkout-deps.sh b/metamod-source/support/checkout-deps.sh deleted file mode 100644 index abb767ff..00000000 --- a/metamod-source/support/checkout-deps.sh +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/env bash -# This should be run inside a folder that contains MM:S, otherwise, it will checkout things into "mms-dependencies". - -trap "exit" INT - -# List of HL2SDK branch names to download. -# ./checkout-deps.sh -s tf2,css -while getopts ":s:" opt; do - case $opt in - s) IFS=', ' read -r -a sdks <<< "$OPTARG" - ;; - \?) echo "Invalid option -$OPTARG" >&2 - ;; - esac -done - -ismac=0 -iswin=0 - -archive_ext=tar.gz -decomp="tar zxf" - -if [ `uname` = "Darwin" ]; then - ismac=1 -elif [ `uname` != "Linux" ] && [ -n "${COMSPEC:+1}" ]; then - iswin=1 - archive_ext=zip - decomp=unzip -fi - -if [ ! -d "metamod-source" ]; then - echo "Could not find a Metamod:Source repository; make sure you aren't running this script inside it." - exit 1 -fi - -checkout () -{ - if [ ! -d "$name" ]; then - git clone $repo -b $branch $name - if [ -n "$origin" ]; then - cd $name - git remote set-url origin $origin - cd .. - fi - else - cd $name - if [ -n "$origin" ]; then - git remote set-url origin ../$repo - fi - git checkout $branch - git pull origin $branch - if [ -n "$origin" ]; then - git remote set-url origin $origin - fi - cd .. - fi -} - -if [ -z ${sdks+x} ]; then - sdks=( csgo hl2dm nucleardawn l4d2 dods l4d css tf2 insurgency sdk2013 dota doi ) - - # Windows/Linux only. - sdks+=( orangebox blade episode1 bms pvkii mcv ) - - # Windows only. - sdks+=( darkm swarm bgt eye contagion ) -fi - -# Check out a local copy as a proxy. -if [ ! -d "hl2sdk-proxy-repo" ]; then - git clone --mirror https://github.com/alliedmodders/hl2sdk hl2sdk-proxy-repo -else - cd hl2sdk-proxy-repo - git fetch - cd .. -fi - -for sdk in "${sdks[@]}" -do - repo=hl2sdk-proxy-repo - origin="https://github.com/alliedmodders/hl2sdk" - name=hl2sdk-$sdk - branch=$sdk - checkout -done - -python_cmd=`command -v python` -if [ -z "$python_cmd" ]; then - python_cmd=`command -v python3` - - if [ -z "$python_cmd" ]; then - echo "No suitable installation of Python detected" - exit 1 - fi -fi - -$python_cmd -c "import ambuild2" 2>&1 1>/dev/null -if [ $? -eq 1 ]; then - echo "AMBuild is required to build Metamod:Source" - - $python_cmd -m pip --version 2>&1 1>/dev/null - if [ $? -eq 1 ]; then - echo "The detected Python installation does not have PIP" - echo "Installing the latest version of PIP available (VIA \"get-pip.py\")" - - get_pip="./get-pip.py" - get_pip_url="https://bootstrap.pypa.io/get-pip.py" - - if [ `command -v wget` ]; then - wget $get_pip_url -O $get_pip - elif [ `command -v curl` ]; then - curl -o $get_pip $get_pip_url - else - echo "Failed to locate wget or curl. Install one of these programs to download 'get-pip.py'." - exit 1 - fi - - $python_cmd $get_pip - if [ $? -eq 1 ]; then - echo "Installation of PIP has failed" - exit 1 - fi - fi - - repo="https://github.com/alliedmodders/ambuild" - origin= - branch=master - name=ambuild - checkout - - if [ $iswin -eq 1 ] || [ $ismac -eq 1 ]; then - $python_cmd -m pip install ./ambuild - else - echo "Installing AMBuild at the user level. Location can be: ~/.local/bin" - $python_cmd -m pip install --user ./ambuild - fi -fi diff --git a/metamod-source/support/dll2lib.ps1 b/metamod-source/support/dll2lib.ps1 deleted file mode 100644 index cd49a9e9..00000000 --- a/metamod-source/support/dll2lib.ps1 +++ /dev/null @@ -1,96 +0,0 @@ -<# -.SYNOPSIS - Generate a .lib file for linking to a dll. -.DESCRIPTION - This script generates a .lib from from a dynamic link library (dll) file. - - The .lib file can then be linked against to resolve symbols in the dll file. -.PARAMETER InputBinary - The path to the dll file. -.PARAMETER OutPath - The output folder in which to save the .lib file. Defaults to the directory of the dll file. - - The folder must already exist. -#> -[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')] -param( - [Parameter(Mandatory, ValueFromPipeline)] - [ValidateScript({($_ -match '\.dll$') -and (Test-Path -Path $_ -PathType Leaf)})] - [string]$InputBinary, - - [Parameter()] - [ValidateScript({Test-Path -Path $_ -PathType Container})] - [string]$OutPath, - - [Parameter()] - [switch]$Force -) - -try { - $dumpbinBin = (Get-Command -Name 'dumpbin.exe').Source -} catch { - throw 'Could not find dumpbin.exe in PATH. (Are you running from a Developer Command Prompt?)' -} - -Write-Verbose "Found dumpbin.exe at '$dumpbinBin'" - -try { - $libBin = (Get-Command -Name 'lib.exe').Source -} catch { - throw 'Could not find lib.exe in PATH. (Are you running from a Developer Command Prompt?)' -} - -Write-Verbose "Found lib.exe at '$libBin'" - -$inputBinInfo = Get-Item -Path $InputBinary - -$defTempPath = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath ('{0}.def' -f $inputBinInfo.BaseName) - -if (-not $OutPath) { - $OutPath = $inputBinInfo.DirectoryName -} - -Write-Verbose "Using output path '$OutPath'" - -$outLibFullName = Join-Path -Path $OutPath -ChildPath ('{0}.lib' -f $inputBinInfo.BaseName) -if ((-not (Test-Path -Path $outLibFullName)) -or $PSCmdlet.ShouldProcess($outLibFullName, 'overwrite')) -{ - $archCode = ((. $dumpbinBin /headers $inputBinInfo.FullName | Select-String -Context 1 -SimpleMatch -Pattern 'FILE HEADER VALUES' -CaseSensitive).Context.PostContext | Select-String -Pattern '^\s*([A-Z0-9]+) machine \(.*\)$' -CaseSensitive).Matches[0].Groups[1].Value - switch ($archCode) - { - '14C' { $arch = 'X86' } - '8664' { $arch = 'X64' } - 'AA64' { $arch = 'ARM64' } - default { - if ([Environment]::Is64BitOperatingSystem) { - $arch = 'X64' - } else { - $arch = 'X86' - } - # TODO: Add ARM64 detection fallback - - Write-Warning "Unable to determine arch of binary. Defaulting to $arch for lib." - } - } - - Write-Verbose "Using arch '$arch' for lib generation." - - $funcs = . $dumpbinBin /exports $inputBinInfo.FullName | - Select-String -Pattern '^\s+\d+\s+[A-Z0-9]+\s+[A-Z0-9]+\s+(.+)$' -CaseSensitive | - Select-Object -ExpandProperty 'Matches' | - ForEach-Object -Process { - $_.Groups[1].Value - } - - Write-Verbose "Found $($funcs.Count) functions in '$InputBinary'" - - Write-Verbose "Creating def file at '$defTempPath'" - 'EXPORTS' | Out-File $defTempPath -Force - $funcs | Out-File $defTempPath -Append - - Write-Verbose "Calling lib.exe to generate '$outLibFullName'" - . $libBin /def:$defTempPath /OUT:$outLibFullName /MACHINE:$arch - - Write-Verbose "Removing temp def file at '$defTempPath'" - Remove-Item -Path $defTempPath -Confirm:$false -} \ No newline at end of file diff --git a/metamod-source/support/metamod.vdf b/metamod-source/support/metamod.vdf deleted file mode 100644 index 5a8da1c3..00000000 --- a/metamod-source/support/metamod.vdf +++ /dev/null @@ -1,5 +0,0 @@ -"Plugin" -{ - "file" "addons/metamod/bin/server" -} - diff --git a/metamod-source/support/metamod_linux64.vdf b/metamod-source/support/metamod_linux64.vdf deleted file mode 100644 index c446fe05..00000000 --- a/metamod-source/support/metamod_linux64.vdf +++ /dev/null @@ -1,5 +0,0 @@ -"Plugin" -{ - "file" "addons/metamod/bin/linux64/server" -} - diff --git a/metamod-source/support/metamod_osx64.vdf b/metamod-source/support/metamod_osx64.vdf deleted file mode 100644 index 37a2d863..00000000 --- a/metamod-source/support/metamod_osx64.vdf +++ /dev/null @@ -1,5 +0,0 @@ -"Plugin" -{ - "file" "addons/metamod/bin/osx64/server" -} - diff --git a/metamod-source/support/metamod_win64.vdf b/metamod-source/support/metamod_win64.vdf deleted file mode 100644 index 52c20346..00000000 --- a/metamod-source/support/metamod_win64.vdf +++ /dev/null @@ -1,5 +0,0 @@ -"Plugin" -{ - "file" "addons/metamod/bin/win64/server" -} - diff --git a/metamod-source/support/metaplugins.ini b/metamod-source/support/metaplugins.ini deleted file mode 100644 index 22fc04da..00000000 --- a/metamod-source/support/metaplugins.ini +++ /dev/null @@ -1,14 +0,0 @@ -;If your plugin came with a .vdf file, you do not need to use this file. -; -;List one plugin per line. Each line should contain the path to the plugin's binary. -;Any line starting with a ';' character is a comment line, and is ignored. -; -;You do not need to include the _i486.so or .dll part of the file name. Example: -; addons/sourcemod/bin/sourcemod_mm -;You may also put an alias in front of the file, for example: -; sm addons/sourcemod/bin/sourcemod_mm -;Will allow you to use "meta load sm" from the console. -; -;********* LIST PLUGINS BELOW *********** - - diff --git a/metamod-source/support/msvc_project_templates/MMSProjectTemplate.2005.vcproj b/metamod-source/support/msvc_project_templates/MMSProjectTemplate.2005.vcproj deleted file mode 100644 index 97eb30ff..00000000 --- a/metamod-source/support/msvc_project_templates/MMSProjectTemplate.2005.vcproj +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metamod-source/support/msvc_project_templates/MMSProjectTemplate.2008.vcproj b/metamod-source/support/msvc_project_templates/MMSProjectTemplate.2008.vcproj deleted file mode 100644 index f0b7616a..00000000 --- a/metamod-source/support/msvc_project_templates/MMSProjectTemplate.2008.vcproj +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metamod-source/support/msvc_project_templates/VC/VCProjects/MMSProjectTemplate.ico b/metamod-source/support/msvc_project_templates/VC/VCProjects/MMSProjectTemplate.ico deleted file mode 100644 index 9458598ff23d25ab7bd2b206a605153052c6f290..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5430 zcmb_g3v5%@8NQCOlQ^-RhwZ%Mgv5^XFeFZ#2MLfD36GEvN_dV(APVny7_0;qNXsLo zK&epZlB%qfZljx88bSeeYZ;viXq1Yrtx!vw4KbCe-6|Dn?FRk!{TI9;78o|Y(yw!U ze9rmK`JdmpilR}1l#~>OZHn^q2t{!!iW0$AelHrLDDUyz#Xb&E$|=$>PY3%0d<>iy zLvc{@C?hE4l!`lTDcgLCz$Q?P6bqInS-#fFhoT~At@;d zAt52E$exG^o6V;FXXYNl!;Sw83p35|7vGUJywK@%LL?(214D-n#fT9jaQygjw6?aY z{fieb#*!sVU^E&*y{r1rXcSnj;S>uZBO_s=J`4uK*9L>tFC92tu6|IN)&8Pq`k4A(Sy>t4qgse4IFv(Pu& zpbt8L*jhJM@7#&1^{bKS%0{s6b^4)`I-nh*qMr5#-&0Vuv#6*@#SlN6FkymfWAUl! z)2Czq{{6W9e+J`m9W=^egl0uzWA6d9Kh=TY=wu8D`Zdq*fW;btD2ru*KlsIEqpLlh ze9WFb8<#F!!pxa7Z`+Z+E-@#5A^0UFUh1fr_WlSO%@SDC5|L3^&AqjRonG|0Fit?qTqHGckO4 zCT&s2wvKkopyV-L^68&x4Zbz~Y3Xwz#Q50j^{R0o=bburs_KuD`?Ojuh71|P^9C`_ zBbX~PxSyfKcR_sD>n)V_6XuFAe{k;}OZ+K<>l4X?lG8#%Lsd+x)vEdfbDWwJQc_aX zTq(K{oyq*W*9+vGIbcRbMfFRpJ>MoLC)1|!stC5^7SV;+LvoVD2lsd*E6e?i$Lnnj z1aGi8b#<)6)(Et(si{fJoPSR0PeVh4 ziY>WM@TAto#>T4oNpwRDpX?13@1A)&+VG&{KJkI2OP8v?=(Dq&n|`X+!-Rwc)h}cZ z;*<1~+I!aW`zQ6gx4gU@BI&Gu^;4!`!^Vv&reOQ(v&3N>^OB;`_|7l3_&e>C?lwRAXRWGdtftaGxP;Vw@kQZb z0X_742hVpihwIK9H4=X$?ibsi#MK|I$B`#Gv3}ELtXjPq)#L)(elQDv+PxcJ@7Rv3 zTen~m$16cviIbB7fpbz-Rh7G(=PP9{>D%}?uDtdtuAMrCzdXAS1CMV&6FGsCbzmI% z$l0g5FmUn&t{y##zwO?I_c`7c6T_OI=?fH}c|LtiZSAdwni~9S?;iZ_$Ps*Y{yaW? z^G#gYwF_&fJO&qa(>iS$j(2zCLjN)R`NHqH&)4wblTW}y-bn0U28us=^yqNbzw4t$ zjl#j+UR*qT7N-s$##@J8#5>f%Opr9!?xPh6`uT;Efkvz}cU@j6T}O#=Jo6 zu0Zi+-kLRQPEMXY8IRHLUp#aO2g!fC$@%8j*Q+rhKA1xrtZi$rVC~wq%Y^&1 z(asAOE>!V_2g)957$1T!HCO5a^YO=w`=sv++qcg0<;$m1u1O6L+Y1*FE+%&o@eSb| zysx}Ye828GzV#oboiSsEW$xU$>v;ClJo`1?OTMI!T&C_{X1*N%Fl*d91|1sQRFoh4 zE^9JmY4+ipCB88&4^PQrc z-!T5q!_d~tdDl?3QFc?FCMWD54{G7Nn{wYLAt7m(@P~Tl5#h;lhZg>%(<$nG#b5{< zV4r=k1)R=ouiQ(WPKTNogqt%)VKfCZ-^C%q#CxhGoOg6%?_l%E)mntFiSNi=UhWg6 zr5>0~V-b_N39)JIh%}dwU+OOoHlO>QEV)MJ%eM&nB>k@thOl;2w9LY&rbWE=i z@AZx-ASeBYd>;`WD7;v>Fzwdu8*{&woG~*mKmU3;b7vXzx1HQk_?4ENg>&Tl$^*Zd zB&VcouOuJsp5KgDwroMutXY^wKj>+0#x!pMf%9Xfv{v56z=tiR1{LzEvv+k`}$?>nS9v|4W2{rVGMO^O$YyX~gZ7_#~oOsau z&d$yx){$@LFIa#ntf7spv8BwRWvu5so5aEc&o67UCM@PUst+`>E|M>)+&Dfl@u4{f zbNSTf=H_=9hks=bz0CZ*nM(%^w)X+Eq6`Ep%G>vd^vQo;F diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/DottedHori.gif b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/DottedHori.gif deleted file mode 100644 index 67072b86b911943e4664cf91103194114267f0ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43 scmZ?wbhEHbWMW`sX!y@?;J^U}1_s5SEQ~;kK?g*DWEhy3T(}sl0n=;;MgRZ+ diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/DottedVert.gif b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/DottedVert.gif deleted file mode 100644 index 72e0c7dcdf20d55e14f8ebacac19be1e09f09c1f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43 scmZ?wbhEHbWMp7sX!y@?;J^U}1_s5SEQ~;kK?g*DWEhy3T(}sl0n=y)MgRZ+ diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/spacer.gif b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/Images/spacer.gif deleted file mode 100644 index 13acffe535d0accaae36bbbfce41477361081654..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43 scmZ?wbhEHbWMp7uXkcJCaNqy~1B2pE7Dgb&paUX6G7L;iE{qJ;0JA{`JOBUy diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/NewStyles.css b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/NewStyles.css deleted file mode 100644 index 08c726ad..00000000 --- a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/1033/NewStyles.css +++ /dev/null @@ -1,782 +0,0 @@ -/******************************************************************************/ -/*DEFAULT STYLES FOR ALL SECTIONS**********************************************/ -/******************************************************************************/ -body { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; - font-weight: normal; - font-size: 8pt; - color: buttontext; - background-color: buttonface; - margin-top: 0px; - margin-left: 0px; - margin-right: 0px; - margin-bottom: 0px; - overflow: auto; } - -a:link { color: captiontext; - text-decoration: none; } - -a:visited { color: captiontext; - text-decoration: none; } - -a:active { color: captiontext; - text-decoration: none; } - -a:hover { color: captiontext; - text-decoration: underline; } - -table { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; - font-weight: normal; - font-size: 8pt; - color: buttontext; - width: 100%; } - -table.one { table-layout: fixed; - height: 100%; - width: 100%; } - - -/*DEFAULT STYLES FOR THE 'INTRODUCTION' TABLE**********************************/ -/******************************************************************************/ -table.two { table-layout: fixed; - height: 79px; - width: 100%; - background-color: window; } - -td.image { text-align: right; } - - -/*DEFAULT STYLES FOR THE 'NAVIGATION' TABLE************************************/ -/******************************************************************************/ -table.linkText { line-height: 95%; - width: 1.7in; - height: 2.6em; - position: relative; - left: 0.1in; - z-index: 2; } - -span { position: relative; - z-index: 3; } - -span.horiLine1 { height: 30px; - width: 166px; - position: absolute; - top: -1px; - left: -1px; - bottom: -1px; - z-index: 2; } - - -/*DEFAULT STYLES FOR THE ALL BUTTONS AND THE 'BUTTONS' TABLE*******************/ -/******************************************************************************/ -button { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; - font-weight: normal; - font-size: 8pt; - height: 23px; - cursor: hand; } - -.buttons { width: 100%; } - -/*DEFAULT STYLES FOR THE 'CONTENT' TABLE***************************************/ -/******************************************************************************/ -table.fixedSize { table-layout: fixed; } - -table.content { table-layout: fixed; - height: 100%; - width: 100%; } - -ol { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; - font-weight: normal; - font-size: 8pt; - color: buttontext; - margin-top: -1px; - margin-bottom: 16px; } - -ul { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; - font-weight: normal; - font-size: 8pt; - color: buttontext; - margin-top: 3px; - margin-bottom: 16px; } - -li { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; - font-weight: normal; - font-size: 8pt; - color: buttontext; - position: relative; - left: -15px; - margin-bottom: 1px; } - -span.itemTextTop { position: relative; } - -span.itemText { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; - font-weight: normal; - font-size: 8pt; - line-height: 9pt; - position: relative; - top: -3px; } - -span.itemTextIndent { position: relative; - left: 17px; - top: -3px; } - -span.sideBtnHidden { width: 100%; - margin-top: 3px; - margin-bottom: 0px; } - -div.itemTextRadioAa { position: relative; - top: -17px; - left: 17px; - margin-bottom: -25px; } - -div.itemTextRadioA { position: relative; - top: -19px; - left: 17px; - margin-bottom: -25px; } - -div.itemTextRadioB { position: relative; - top: -19px; - left: 25px; - margin-bottom: -25px; } - -div.itemTextRadioIndentA { position: relative; - top: -17px; - left: 30px; - margin-bottom: -25px; } - -div.itemTextRadioIndentB { position: relative; - top: -17px; - left: 42px; - margin-bottom: -25px; } - -div.itemTextCheckboxA { position: relative; - top: -17px; - left: 17px; - margin-bottom: -23px; } - -div.itemTextCheckboxB { position: relative; - top: -18px; - left: 25px; - padding-top: 1px; - margin-bottom: -25px; } - -div.itemTextCheckboxIndentB { position: relative; - top: -16px; - left: 42px; - margin-bottom: -25px; } - -input { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; - font-weight: normal; - font-size: 8pt; - color: buttontext; } - -select { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; - font-weight: normal; - font-size: 8pt; - color: buttontext; } - -.radio { position: relative; - top: -2px; - left: 4px; } - -.radioA { position: relative; - top: -1px; - margin-left: -4px; - z-index: 2; } - -.radioIndent { margin-top: -2px; - margin-left: 17px; } - -.radioIndentA { margin-top: -2px; - margin-left: 9px; } - -.checkbox { position: relative; - top: -1px; - margin-left: -4px; - z-index: 2; } - -.checkboxA { position: relative; - top: -2px; - left: 4px; } - -.checkboxIndent { position:relative; - margin-top: -1px; - margin-left: 21px; } - -.comment { width: 578px; - position: relative; - top: 5px; - bottom: 6px; } - -.commentA { width: 398px; - position: relative; - top: 5px; - bottom: 6px; } - -.commentB { width: 578px; - position: relative; - top: 3px; - bottom: -3px; } - -/****THIS IS THE STANDARD TABBED WIZARD, TWO COLUMN INPUT BOX******************/ -input.sideBtn { width: 193px; - position: relative; - top: 3px; } - -/****THIS IS THE STANDARD THREE COLUMN WIZARD INPUT BOX************************/ -input.sideBtnThreeColumn { width: 185px; - position: relative; - top: 3px; } - -/****THIS IS THE DEFAULT INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD***********/ -input.itemTextTwoColumnLong { width: 283px; - position: relative; - top: 3px; } - -/****THIS IS AN INPUT BOX INDENTED UNDER A CHECKBOX SECTION********************/ -input.sideBtnIndent { width: 175px; - position: relative; - top: 3px; - left: 18px; - bottom: 6px; } - -/****THIS INPUT BOX HAS IS INDENTED UNDER A HEADING AND RULE SECTION***********/ -input.sideBtnB { width: 185px; - position: relative; - top: 3px; - bottom: 6px; } - -input.sideBtnBA { width: 175px; - position: relative; - top: 3px; - bottom: 6px; } - -/****THIS INPUT BOX HAS A "..." BUTTON BESIDE IT AND IT'S A TABBED WIZARD******/ -input.sideBtn2 { width: 169px; - position: relative; - top: 3px; - bottom: 6px; } - -/****"..." BUTTON IN A NON-TABBED, 3 COLUMN WIZARD*****************************/ -input.sideBtn2ThreeColumn { width: 161px; - position: relative; - top: 3px; - bottom: 6px; } - -/****THIS IS AN INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON******/ -input.TwoColumnLongButton { width: 259px; - position: relative; - top: 3px; - bottom: 6px; } - -/****THIS INPUT BOX HAS A "..." BUTTON BESIDE IT AND IT'S UNDER A CHECKBOX*****/ -input.sidebtn2Indent { width: 151px; - position: relative; - top: 3px; - left: 18px; - bottom: 6px; } - -/****"..." BUTTON IS UNDER A SECTION IN A TWO COLUMN AND TABBED WIZARD*********/ -input.sidebtn21 { width: 161px; - position: relative; - top: 3px; - bottom: 6px; } - -/****"..." BUTTON IS UNDER A SECTION IN A THREE COLUMN AND TABBED WIZARD*********/ -input.sidebtn21A { width: 153px; - position: relative; - top: 3px; - bottom: 6px; } - -/****THIS IS THE STANDARD TABBED WIZARD, TWO COLUMN SELECTION BOX**************/ -select.sidebtn { width: 193px; - position: relative; - top: 4px; - bottom: -3px; } - -select.sidebtnNoWidth { position: relative; - top: 4px; - bottom: -3px; } - -/****THIS IS THE STANDARD TABBED WIZARD, ONE COLUMN SELECTION BOX**************/ -select.sideBtnOneCLong { width: 398px; - position: relative; - top: 3px; } - -/****THIS IS THE STANDARD THREE COLUMN WIZARD INPUT BOX************************/ -select.sideBtnThreeColumn { width: 185px; - position: relative; - top: 4px; - bottom: -3px; } - -/****THIS IS THE DEFAULT INPUT BOX IN NON-TABBED AND 2 COLUMN WIZARD***********/ -select.itemTextTwoColumnLong { width: 283px; - position: relative; - top: 4px; - bottom: -3px; } - -/****THIS SELECTION BOX IS INDENTED UNDER A HEADING AND RULE SECTION***********/ -select.sidebtnB { width: 164px; - position: relative; - top: 4px; - left: 8px; - bottom: -3px; } - -/****THIS SELECTION BOX IS BELOW AND ASSOCIATED WITH A CHECKBOX****************/ -select.sidebtn2 { width: 164px; - position: relative; - top: 11px; - left: 17px; - bottom: -3px; } - -select.sidebtnIndent { width: 175px; - position: relative; - top: 4px; - left: 18px; - bottom: -3px; } - -/****THIS SELECTION BOX IS BELOW AND ASSOCIATED WITH A CHECKBOX AND HEADING****/ -select.sidebtn2AShort { width: 168px; - position: relative; - top: 4px; - left: 25px; - bottom: -3px; } - -/****THIS SELECTION BOX IS IN A TABBED, TWO COLUM WIZARD AND FOR < << > >>*****/ -select.sidebtn3 { width: 177px; - position: relative; - top: 4px; - bottom: -3px; } - -/****THIS IS A SELECTION BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON***/ -select.TwoColumnLongButton { width: 259px; - position: relative; - top: 4px; - bottom: -3px; } - -/****THIS IS A SELECTION BOX IN NON-TABBED AND 2 COLUMN WIZARD WITH A BUTTON***/ -select.IndentListBoxWithButton { width: 283px; - position: relative; - top: 4px; - bottom: -3px; - left: 18px; } - -/****THIS IS THE DEFAULT OBJECT DROP DOWN IN 2 COLUMN AND TABBED WIZARD********/ -object.itemtext { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; - font-weight: normal; - font-size: 8pt; - color: buttontext; - width: 193px; - height: 2em; - position: relative; - top: 4px; - margin-bottom: 0px; } - -/****THIS IS THE DEFAULT OBJECT DROP DOWN IN 3 COLUMN AND NON-TABBED WIZARD****/ -object.itemtextThreeColumn { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; - font-weight: normal; - font-size: 8pt; - color: buttontext; - width: 185px; - height: 2em; - position: relative; - top: 4px; - margin-bottom: 0px; } - -/****THIS IS THE DEFAULT OBJECT DROP DOWN IN NON-TABBED AND 2 COLUMN WIZARD****/ -object.itemTextTwoColumnLong{ font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; - font-weight: normal; - font-size: 8pt; - color: buttontext; - width: 283px; - height: 2em; - position: relative; - top: 4px; - margin-bottom: 0px; } - -.dropdowncombo { font-family: Tahoma, MS Sans Serif, Arial, Sans Serif; - font-weight: normal; - font-size: 8pt; - color: buttontext; } - -/****MOVES RADIO TEXT UP A BIT WHEN INLINE*************************************/ -span.upABit { position: relative; - top: -2px; } - -/****THIS DEFINES A STANDARD BUTTON IN THE CONTENT SECTION*********************/ -.buttonClass { margin-top: 0px; - margin-bottom: -6px; } - -/****THIS DEFINES ADD/REMOVE BUTTONS IN THE CONTENT SECTION********************/ -.buttonClass2 { width: 75px; - padding-top: 1px; - margin-top: 7px; } - -/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION OUT OF THE SPAN TAG****/ -.buttonClass3 { height: 19px; - width: 20px; - position: relative; - left: 1px; - top: 0px; } - -/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION WITHIN THE SPAN TAG***/ -.buttonClass3Custom { height: 19px; - width: 20px; - position: relative; - left: 4px; - top: 3px; } - -/****THIS DEFINES A "..." BUTTON IN THE CONTENT SECTION AND UNDER A CHECKBOX***/ -.buttonClass3Indent { height: 19px; - width: 20px; - position: relative; - top: 0px; - left: 10px; } - -/****THIS DEFINES A ">>" BUTTON IN THE CONTENT SECTION************************/ -.buttonClass4 { margin-bottom: 4px; - width: 25px; } - -/****THIS DEFINES ADD/REMOVE BUTTONS HORIZONTALLY IN THE CONTENT SECTION******/ -.buttonClass5 { position: relative; - top: 4px; - width: 75px; } - -/****THIS SETS THE LEFT MARGIN FOR THE REMOVE BUTTON***************************/ -#removeBtn { margin-left: 4px; } - -/****THIS SETS THE LEFT MARGIN FOR INDENTED SECTION UNDER CHECKBOXES***********/ -label.indent { margin-left: 18px; } - -/****THIS SETS THE LEFT MARGIN FOR INDENTED SECTION UNDER CHECKBOXES***********/ -label.indent2 { margin-left: 25px; } - -/****THIS MOVES CHECK BOX AND RADIO TEXT UP A BIT******************************/ -label.upABit { position: relative; - top: -2px; } - -/****THIS BOLDS < << > >> BUTTONS**********************************************/ -b.bigFont { font-size: 135%; } - -/****THESE ARE CUSTOM VERTICAL SPACING ELEMENTS********************************/ -p.spacer { margin-bottom: -28px; } - -p.elementSpacer { margin-bottom: -12px; } - -p.elementSpacer2 { margin-bottom: -19px; } - -p.elementSpacer3 { margin-bottom: -3px; } - -p.elementSpacer4 { margin-bottom: 7px; } - -p.elementSpacer5 { margin-bottom: 5px; } - -p.elementSpacer6 { margin-bottom: -24px; } - -p.elementSpacer7 { margin-bottom: -11px; } - -p.elementSpacer8 { margin-bottom: -15px; } - -p.elementSpacer9 { margin-bottom: -7px; } - -p.elementSpacer10 { margin-bottom: 6px; } - -p.elementSpacer11 { margin-bottom: -1px; } - -p.elementSpacer12 { margin-bottom: -17px; } - -p.elementSpacer13 { margin-bottom: -23px; } - -p.elementSpacer14 { margin-bottom: -25px; } - -p.elementSpacer15 { margin-bottom: -13px; } - -p.elementSpacer16 { margin-bottom: -22px; } - -p.elementSpacer17 { margin-bottom: -32px; } - -p.elementSpacer18 { margin-bottom: -14px; } - -p.elementSpacer19 { margin-bottom: -10px; } - -p.elementSpacer21 { margin-bottom: -16px; } - -p.elementSpacer22 { margin-bottom: 3px; } - -/*CUSTOM STYLES FOR THE 'CONTENT' FRAME****************************************/ -/******************************************************************************/ - - /*CUSTOM SPACING FOR MFC UI PAGE - SET UP FOR LOC PURPOSES*******************/ - /**************************************************************************/ - p.elementSpacer20 { margin-bottom: -13px; } - - /*CUSTOM STYLE FOR MFC UI PAGE - SET UP FOR LOC PURPOSES*******************/ - /**************************************************************************/ - input.sideBtnLoc { width: 193px; - position: relative; - top: 3px; } - - /*PLACES SPACE BETWEEN ADD/REMOVE BUTTONS**********************************/ - /**************************************************************************/ - span.spacer8 { width: 1px; } - - /*SETS TEXT BOX TO APPROPRIATE WIDTH IN MFCAppWiz**************************/ - /**************************************************************************/ - #CLASS_NAMES { width: 399px; } - - /*MOVES SELECT BOX UP IN CSharpIndexerWiz, Interface, Method,**************/ - /*InterfaceMethod, AND MemFunctionWiz**************************************/ - #PARAMETER_LIST { margin-top: -1px; } - - /*MOVES SELECT BOX UP IN CSharpMethodWiz***********************************/ - /**************************************************************************/ - #PARAMETER_LIST1 { margin-top: -1px; } - - /*SETS SELECTION BOX WIDTH IN CSharpInterfaceMethod AND CSharpMethodWiz****/ - /**************************************************************************/ - #PARAMETER_MODIFIER { width: 58px; } - - /*SETS INDENT FOR ATLCustom AND MFCCustom Wizards**************************/ - /**************************************************************************/ - span.itemTextIndent1 { position: relative; - left: 8px; - top: -3px; } - - /*SETS INDENT ON OBJECT FOR CSharpMethodWiz********************************/ - /**************************************************************************/ - span.customObjectIndent { margin-left: 8px; } - - /*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/ - /**************************************************************************/ - span.sidebtn { position: relative; - top: 4px; - bottom: -3px; } - - /*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/ - /**************************************************************************/ - span.itemtextspecial { position: relative; - top: -20px; - left: 9px; - bottom: -3px; } - - /*SETS CUSTOM INDENT FOR SECTION IN CSHARPMETHODWIZ************************/ - /**************************************************************************/ - span.sidebtnspecial { position: relative; - top: -2px; - left: 53px; - bottom: -3px; } - - /**************************************************************************/ - - - - - /*MODIFIED POSITIONING*****************************************************/ - /**************************************************************************/ - /*Position and border change + link to the script file (absolutely needed)!!*/ - table.three { table-layout: fixed; - height: 100%; - position: absolute; - left: -1px; - border-right: solid 2px Window; } - - /*Color change*/ - span.activeLink { color: WindowText; - text-decoration: none; - word-wrap: break-word; - cursor: hand; - width: 100%; - padding-top: 1px; - padding-bottom: 1px; } - - /*Color change*/ - span.activeLink2 { color: WindowText; - text-decoration: underline; - word-wrap: break-word; - cursor: hand; - width: 100%; - padding-top: 1px; - padding-bottom: 1px; } - - /*Color change*/ - span.inactiveLink { color: GrayText; - text-decoration: none; - word-wrap: break-word; - cursor: default; - width: 100%; - padding-top: 1px; - padding-bottom: 1px; } - - /*Turned off dotted line*/ - span.vertLine1 { height: 100%; - width: 1px; - position: absolute; - top: 0px; - left: -1px; - bottom: 0px; - z-index: 2; } - - /*Style for width-control of the left-side links bar */ - .LinkPane { width: 1.9in; } - - /*Removed bolding of text*/ - table.linkTextSelected { line-height: 95%; - width: 1.7in; - height: 2.6em; - position: relative; - left: 0.1in; - z-index: 2; } - - /*Removed bolding of text and made width bigger*/ - table.linkTextSelectedIndent { line-height: 95%; - width: 1.7in; - height: 2.6em; - position: relative; - top: -2px; - left: 0.2in; - z-index: 2; } - - /*Changed left margin and position of top of element and made width bigger*/ - table.linkTextIndent { line-height: 95%; - width: 1.6in; - height: 2.6em; - position: relative; - top: -2px; - left: 0.2in; - z-index: 2; } - - /*Removed background color, changed top, and bottom margins*/ - div.linkSelected { height: 2.6em; - position: relative; - top: -6px; - left: 0px; - right: 0px; - z-index: 1; - margin-bottom: -.7em; } - - /*Changed top and bottom margins*/ - div.link { height: 2em; - position: relative; - top: -6px; - left: 0px; - right: 0px; - z-index: 1; - margin-bottom: -.7em; } - - /*Comment out - div.vertLine { background: url(Images/DottedVert.gif) repeat; - height: 125%; - width: 1px; - position: relative; - top: -12px; - left: -1px; }*/ - - /*Deleted dotted line*/ - span.vertLine1 { height: 100%; - width: 1px; - position: absolute; - top: 0px; - left: -1px; - bottom: 0px; - z-index: 2; } - - /*Changed background color and add alpha*/ - td.three { background-color: Window; - filter: Alpha(Opacity = 25); } - - /*Removed all background image modification elements and set image to 0 opacity*/ - td.threeCustom { filter: Alpha(Opacity = 0); } - - - /*Comment out - td.dottedline { background: url(Images/DottedHori.gif) repeat; }*/ - - /*Removed border color*/ - div.inlineA { position: relative; - top: 4px; - width: 100%; - height: 1px; } - - /*Changed border color*/ - div.inlineB { position: relative; - top: -9px; - margin-bottom: -20px; - width: 100%; - height: 1px; - border-top: solid ThreeDShadow 1px; } - - /*Changed position of element*/ - h4.head { font-weight: bold; - font-size: 10pt; - color: windowtext; - position: absolute; - top: 16px; - left: 120px; - height: 58px; } - - /*Hide element*/ - p.subhead { display: none; - color: windowtext; - position: relative; - top: -1.5em; - left: 1em; } - - /*Changed alignment to right*/ - td.image { text-align: left; } - - /*Added item to control positioning of element*/ - div.smallA { position: absolute; - top: 0px; - left: 12px; - height: 78px; - width: 110px; - vertical-align: bottom; } - - /*Added item to control positioning of element - 1 misspelling in html so dup of above*/ - div.smalA { position: absolute; - top: 0px; - left: 12px; - height: 78px; - width: 110px; - vertical-align: bottom; } - - /*Added item to control positioning of element*/ - div.small { position: absolute; - top: 0px; - left: 12px; - height: 78px; - width: 110px; - vertical-align: bottom; } - - /*Added all positioning informaiton*/ - img.smallest { background-color: activecaption; - position: relative; - bottom: 1px; } - - /*Added item to control positioning of element*/ - img.small { position: relative; - bottom: 1px; } - - /*Add height specification*/ - td.rule { background-color: window; - height: 1px; } - - /*Info for new button*/ - #PreviousBtn { position: relative; - right: -79px; } - /*Info for new button*/ - #NextBtn { position: relative; - right: -79px; } - - /*Reposition button*/ - #FinishBtn { position: relative; - right: -79px; } - - /*Reposition button*/ - #CancelBtn { position: relative; - right: -79px; } - - /*Hide button*/ - #HelpBtn { display: none; } - - - /**************************************************************************/ diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/HTML/1033/default.htm b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/HTML/1033/default.htm deleted file mode 100644 index a16da20d..00000000 --- a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/HTML/1033/default.htm +++ /dev/null @@ -1,571 +0,0 @@ - - - - 'MMSProjectTemplate' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    -   - -   - -   - -
    - -
    -
    -   -
    -   - - -

    -

    -
    -   -
    - - - - - -
    - -
    -
    -
    - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - -
    -   -
    -   - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Author:  This is the name of the author.
    -
    -
    - URL:  This is the URL to the author's web site
    -
    -
    - License:  This is the plugin's license.
    -
    -
    - Plugin Name:  This is the name of the plugin.
    -
    -
    - Plugin Description:  This is the plugin's description.
    -
    - Plugin DLL:  This is the name of the plugin's .dll file.
    -
    - Plugin Class:   This is the name of the plugin's class.
    -
    -
    - - - - - -
    - Function Hooks:  These functions will be auto generated. 
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - -
    - -
    -
    -
    -
    -
    -   -
    -   -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - -
    - -
    -
    -   -
    -   - -   - - - -   - - - -   - - - -   -
    -   -
    - -
    - -
    - - - - - - - - - - - - - diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/MMSProjectTemplate.gif b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/MMSProjectTemplate.gif deleted file mode 100644 index b0206c76b13b1a52c97ab2b03843c405a6187d6c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2115 zcmV-J2)y@4Nk%w1VJrYF0QUd@00030|NpiD0?z~mhXe(n1_#3u6Q>s#a~~p-k&~^g zvwM8qla%FCQ-P0<+(ScSqN3b7I!>~(%Cxk+hlh=Md44S|FP4^^BO@edXJ}VfSiZi$gogHq ziRyH9v}R|Pl9SAbh__KvY=eZSmzcH6%jAKAn6$Ob00{{P8ygZKAq*824Hgy;85txv zI3hAK5Ed37C@3s7H76}CBq=En5)v~vHw_LB4-gO)78WovG8ro-2O<#x3CBto|Y~yEG;c7M@L0MLO@MTOFTR~J3BgxiilKHQ$$2VdU|=Mr>2sR zUmhJ3b8%pciiUxJeJLm=g@b@IGBGtYGfPTIWn^P*Y-`!r*UQSuyt}$Kc74f6v7+5-a}0RgiS5poO+O$-Z(A0H_X4`C%GODrrsDk=m60~r()IWjU6 z5fMB&ITRBU7Zw&TEiE=QG$bP z{QCO(_4W1g^78KP?(FRB=;-L@=jY+!;osli+uPgO+1b_A)zZ?^(b3Vy#>Tx> zB_$;yA|fClARiwe9UUDU92^@P8yXrK85tQE7#I{36cQ2=4h{|t4Gjqi2?qxU1Ox;F z0|Nm80ssI1A^8LW00930EC2ui04xA3000R800RgdNU$I&RknJCa+6J(Fa@ki6`V-1 zVnI~4ggJXg?bEhy;Kp%_lggq=ldE(kOU8`jHEkfnokO9_)ybO#RqZ-PESa)q(WqhD z_AMN_bV;(k!g=#lu3>P9A^WKU8#iy@jH+X&Z(2#F7FQSp*6UX=VWO^q1ozFGH#X%^ z>`Pz@EJamteEni(?b@b-f ziVZesyqJLHk7~7azXoGW5WdxH7q!I z@kR`W4K&<<9|R6O;Eyn*T$g|wCcF^C1^GG9!V8^J0}iaXzzlZSG0Zg-xS-;S-e57t zFgn_mi#y(k(M1FeG>`xpZKMzlGhl@9Km#(U;|~D#1e2g?ek9?|H)6~&hahEC^G-eQ za1xFfT3i9Zp8&)&3w!|(vko_Gn4nEBpycz8I_Yr24mO1_L$q8ez2G9yKN`OMn zqwpk=L_JBk)6SpnJh5i6qgXNyC-AgW&luq1v(7yJT(Zlxnzn)q9O$_7PCW5oat{*u zU_wqm`^d9~F0-JbDJD&UJEk==JjwaM(qmDiN{OONA@Srn95K8DV&N$TcW>+)gm_rU5 z%+%6LI^^hzY9>Pbu*45O_&|;xF*QPB&;YV@odUv;z(}Yj_eh0*V-L03<$) z;|?FD8Ka3ez7%7QI@%=v6V5v5gyV@3LL6|200kg&$Rj!wv56mc5%LKq$Go!3I!WN; ztI6SrBSa&IFoJ~@RwV975A_6NR~(&?^Nn8OU;%(WorIE=5tJZ8Koe6);Y1dQEW!g4 zY1oB_8RNL#%{&~O(@h+*xY3RfkRZZH6mlrA1rr4n0K^gMv;tNr>|i_&3h`7WjxupH zV-FFL3~)UiTvV|{0R-%D#3t6^R0=aFFh@Dg;f*KQ!W-~F0XERk4t4~g00Mvl6{--0 zN61fq?f?W+NYM;;pyM3KO8_pcfscLc0}1WmL=YSy07C=<5(pST{)*rz4KhU#k4lFb z)Uk$8uz??5u!kA{j=_d^03Zf)k90iYI<**tI_P04b%X;Gm%7wGE`bj(jNuG$fCa4VVhUKO1Pz)n z!zM1F4-@W#AN}A*$C9v#JLq8##fU>JN@JH(tYQ|o$VCF|P>fJC0~*qphBTnjj8F_C t7zv2O3S_Y$3UXej6sAChDq8W1Sjb`)2$cmaT+s?upu!YUvPeJx06RP3S6u)A diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/MMSProjectTemplate_Background.gif b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Images/MMSProjectTemplate_Background.gif deleted file mode 100644 index 7615277ef0100ca715b82d80de876468bc3ebeb6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 811 zcmV+`1JwLSNk%w1VX*)~0f7Giz`(!&001HR1OWg5001li0002706_sj0{?`MsmtvT zqnxzbi?iOm`wxcVNS5Y_rs~SJ?hD8AOxN~}=lag~{tpZahs2`sh)gP%%%<}RjY_A~ zs`ZM^YPa03_X`e-$K-YS={|^`_I7nD%c!-#&xX9S( z_y`#(IZ0V*d5M{+xyjk-`3V{-I!an`U)E>J4;(@dyAW^yUW|_`wJW_ zJWO0{e2ko|yv*F}{0to}JxyJ0eT|*1z0KY2{S6*2K2Bb4evY25zRuq6{th26KTlsD z699m(pU=PV-w*Jgz<>k?8Z3zLpu&U<7dmXn;Gsl_6Dv}@XfY#3i2n;TdffOiB*>8> z|8*pZvSiAYDq8|P=`tqEnKEleq>0m}&YUY@^4tmZr_h0?9v0hO3JB^ zk2f_+pc+AH53CBfKJe;5D-W;-$W|SB73x-$XDz0+npN#swm#j)g$qIK4zoS)qV;<) z2w%Qk>E@NY*Kh*Dixr1OtYfg_28v<+7RUA{5+tv*yl)7alde6!lZpQ6Yc2 z{MxlAy+Laay=~L8?cKP0+ilD{xbNY#i5nM=oZxAO%LAuo{@nR$=+mXQW<3h_Y}uW( zcjwN@dwB4h#FrB;h>J18 zc!-QO(rAc{IpSD|jy>{7h>t-6If#%&5-Et0Ng^4Dl1(xRh?7x5`G=HMQt5}4Sz_6T zmR)kmhnHc3xrdl#lBtK8X`-2jnr*U)hnsQ2d54^J(rJgCdE!}zo_+F3ho6B0I)|Wz z5-NwGi6R<@qKz^Nhog}~`i7*HQtF1KnPS?8rk!%iMsdlFdYo~(l}c)=Je{g)tElz` p+^eq63ae$Z-b$-Wtm4XRt{3gil006VxWpcViC diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Scripts/1033/default.js b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Scripts/1033/default.js deleted file mode 100644 index 40953580..00000000 --- a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Scripts/1033/default.js +++ /dev/null @@ -1,554 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////// -// // -// // -// File: Default.js // -// // -// // -/////////////////////////////////////////////////////////////////////////////////////////// - - -/////////////////////////////////////////////////////////////////////////////////////////// -// Use wizard.ReportError to display a message box for debugging - -// wizard.ReportError("", true); - - -/////////////////////////////////////////////////////////////////////////////////////////// -// OnFinish - -function OnFinish(selProj, selObj) -{ - try - { - // Get the new project name and path - - var strProjectName = wizard.FindSymbol('PROJECT_NAME'); - var strProjectPath = wizard.FindSymbol('PROJECT_PATH'); - - var strProjectTemplateName = wizard.FindSymbol('PLUGIN_TEMPLATE_NAME'); // Defined in default.htm - - // Get the current date and add a symbol CURRENT_DATE - - var curr_time = new Date(); - - var month = curr_time.getMonth() + 1; - var day = curr_time.getDate(); - var year = curr_time.getFullYear(); - var today = year + '-' + month + '-' + day; - - wizard.AddSymbol('CURRENT_DATE', today); - - // Set the path to where the template is installed - - var strPluginPath = wizard.FindSymbol('PROJECT_TEMPLATE_PATH') + - "\\AppWiz\\Metamod\\" + - strProjectTemplateName + "\\"; - - wizard.AddSymbol('PLUGIN_INSTALL_PATH', strPluginPath); - wizard.AddSymbol('PLUGIN_SOURCE_FILES', "Plugin Source Files"); - wizard.AddSymbol('PLUGIN_HEADER_FILES', "Plugin Header Files"); - wizard.AddSymbol('PLUGIN_RESOURCE_FILES', "Resource Files"); - - // Create the custom project - - selProj = CreateCustomProject(strProjectName, strProjectPath); - - AddConfig(selProj, strProjectName); - AddFilters(selProj); - - // Create the custom .inf file - - var InfFile = CreateCustomInfFile(); - - AddFilesToCustomProj(selProj, strProjectName, strProjectPath, InfFile); - PchSettings(selProj); - - InfFile.Delete(); - - // Save the project - - selProj.Object.Save(); - } - - // Catch Exceptions - - catch(ex) - { - if(ex.description.length != 0) - { - SetErrorInfo(ex); - } - - return ex.number - } -} - -/////////////////////////////////////////////////////////////////////////////////////////// -// CreateCustomProject - -function CreateCustomProject(strProjectName, strProjectPath) -{ - try - { - // Create the project's solution - - var strInstallPath = wizard.FindSymbol('PLUGIN_INSTALL_PATH'); - var strProjTemplate = strInstallPath + '\\Templates\\1033\\plugin.vcproj'; - - if(wizard.FindSymbol("CLOSE_SOLUTION")) - { - var Solution = dte.Solution; - Solution.Close(); - - var strSolutionName = wizard.FindSymbol("VS_SOLUTION_NAME"); - - if(strSolutionName.length) - { - var strSolutionPath = strProjectPath.substr(0, strProjectPath.length - strProjectName.length); - - Solution.Create(strSolutionPath, strSolutionName); - } - } - - // Override the new solution with our custom plugin.vcproj file - - var oTarget = wizard.FindSymbol("TARGET"); - var strProjectNameWithExt = strProjectName + '.vcproj'; - - if(wizard.FindSymbol("WIZARD_TYPE") == vsWizardAddSubProject) - { - return oTarget.AddFromTemplate(strProjTemplate, strProjectNameWithExt).SubProject; - } - - return oTarget.AddFromTemplate(strProjTemplate, strProjectPath, strProjectNameWithExt); - } - - // Catch Exceptions - - catch(ex) - { - throw ex; - } -} - -/////////////////////////////////////////////////////////////////////////////////////////// -// CreateCustomInfFile - -function CreateCustomInfFile() -{ - try - { - var fso = new ActiveXObject('Scripting.FileSystemObject'); - var TemporaryFolder = 2; - - var tfolder = fso.GetSpecialFolder(TemporaryFolder); - var strTempFolder = tfolder.Drive + '\\' + tfolder.Name; - var strWizTempFile = strTempFolder + "\\" + fso.GetTempName(); - - var strTemplatePath = wizard.FindSymbol('TEMPLATES_PATH'); - var strInfFile = strTemplatePath + '\\Templates.inf'; - - wizard.RenderTemplate(strInfFile, strWizTempFile); - - return fso.GetFile(strWizTempFile); - } - - // Catch Exceptions - - catch(ex) - { - throw ex; - } -} - -/////////////////////////////////////////////////////////////////////////////////////////// -// DelFile - -function DelFile(fso, strWizTempFile) -{ - try - { - // Delete the file - - if(fso.FileExists(strWizTempFile)) - { - var tmpFile = fso.GetFile(strWizTempFile); - - tmpFile.Delete(); - } - } - - // Catch Exceptions - - catch(ex) - { - throw ex; - } -} - -/////////////////////////////////////////////////////////////////////////////////////////// -// AddFilters - -function AddFilters(proj) -{ - // Our plugin.vcproj has filters -} - -/////////////////////////////////////////////////////////////////////////////////////////// -// AddConfig - -function AddConfig(proj, strProjectName) -{ - try - { - // Get the plugin dll name - - var plugin_dll = wizard.FindSymbol('PLUGIN_DLL'); - - if(plugin_dll.indexOf(".dll") < 0) - { - plugin_dll = plugin_dll + ".dll"; - } - - var project_exports = strProjectName.toUpperCase() + "_EXPORTS"; - project_exports = project_exports.replace(/ /g, "_") + ";"; - - // Debug - Original -> Configuration Properties -> C/C++ -> Preprocessor - - var config = proj.Object.Configurations('Debug - Original'); - var CLTool = config.Tools('VCCLCompilerTool'); - var LinkTool = config.Tools('VCLinkerTool'); - - CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; - LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; - - // Release - Original -> Configuration Properties -> C/C++ -> Preprocessor - - config = proj.Object.Configurations('Release - Original'); - CLTool = config.Tools('VCCLCompilerTool'); - LinkTool = config.Tools('VCLinkerTool'); - - CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; - LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; - - - // Debug - Dark Messiah -> Configuration Properties -> C/C++ -> Preprocessor - - var config = proj.Object.Configurations('Debug - Dark Messiah'); - var CLTool = config.Tools('VCCLCompilerTool'); - var LinkTool = config.Tools('VCLinkerTool'); - - CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; - LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; - - // Release - Dark Messiah -> Configuration Properties -> C/C++ -> Preprocessor - - config = proj.Object.Configurations('Release - Dark Messiah'); - CLTool = config.Tools('VCCLCompilerTool'); - LinkTool = config.Tools('VCLinkerTool'); - - CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; - LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; - - - // Debug - Orange Box -> Configuration Properties -> C/C++ -> Preprocessor - - config = proj.Object.Configurations('Debug - Orange Box'); - CLTool = config.Tools('VCCLCompilerTool'); - LinkTool = config.Tools('VCLinkerTool'); - - CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; - LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; - - // Release - Orange Box -> Configuration Properties -> C/C++ -> Preprocessor - - config = proj.Object.Configurations('Release - Orange Box'); - CLTool = config.Tools('VCCLCompilerTool'); - LinkTool = config.Tools('VCLinkerTool'); - - CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; - LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; - - - // Debug - Orange Box Valve -> Configuration Properties -> C/C++ -> Preprocessor - - config = proj.Object.Configurations('Debug - Orange Box Valve'); - CLTool = config.Tools('VCCLCompilerTool'); - LinkTool = config.Tools('VCLinkerTool'); - - CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; - LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; - - // Release - Orange Box Valve -> Configuration Properties -> C/C++ -> Preprocessor - - config = proj.Object.Configurations('Release - Orange Box Valve'); - CLTool = config.Tools('VCCLCompilerTool'); - LinkTool = config.Tools('VCLinkerTool'); - - CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; - LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; - - - // Debug - Left 4 Dead -> Configuration Properties -> C/C++ -> Preprocessor - - config = proj.Object.Configurations('Debug - Left 4 Dead'); - CLTool = config.Tools('VCCLCompilerTool'); - LinkTool = config.Tools('VCLinkerTool'); - - CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; - LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; - - // Release - Left 4 Dead -> Configuration Properties -> C/C++ -> Preprocessor - - config = proj.Object.Configurations('Release - Left 4 Dead'); - CLTool = config.Tools('VCCLCompilerTool'); - LinkTool = config.Tools('VCLinkerTool'); - - CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; - LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; - - - // Debug - Left 4 Dead 2 -> Configuration Properties -> C/C++ -> Preprocessor - - config = proj.Object.Configurations('Debug - Left 4 Dead 2'); - CLTool = config.Tools('VCCLCompilerTool'); - LinkTool = config.Tools('VCLinkerTool'); - - CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; - LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; - - // Release - Left 4 Dead 2 -> Configuration Properties -> C/C++ -> Preprocessor - - config = proj.Object.Configurations('Release - Left 4 Dead 2'); - CLTool = config.Tools('VCCLCompilerTool'); - LinkTool = config.Tools('VCLinkerTool'); - - CLTool.PreprocessorDefinitions = project_exports + CLTool.PreprocessorDefinitions; - LinkTool.OutputFile = "$(ProjectDir)\\Bin\\$(ConfigurationName)\\" + plugin_dll; - } - - // Catch Exceptions - - catch(ex) - { - throw ex; - } -} - -/////////////////////////////////////////////////////////////////////////////////////////// -// PchSettings - -function PchSettings(proj) -{ - // TODO: specify pch settings -} - -/////////////////////////////////////////////////////////////////////////////////////////// -// GetTargetName - -function GetTargetName(strName) -{ - try - { - var strTarget = strName; - var strPluginName = wizard.FindSymbol('PLUGIN_NAME'); - var strPluginClass = wizard.FindSymbol('PLUGIN_CLASS'); - - // Target ReadMe File - - if(strName == "ReadMe.txt") - { - strTarget = "ReadMe.txt"; - } - - // Target StdMMS File - - else if(strName == "StdMMS.h") - { - strTarget = "StdMMS.h"; - } - - // Target plugin_mm File - - else if(strName == "plugin_mm.h") - { - strTarget = "Plugin\\" + strPluginClass + ".h"; - } - - // Target plugin_mm File - - else if(strName == "plugin_mm.cpp") - { - strTarget = "Plugin\\" + strPluginClass + ".cpp"; - } - - // Target plugin_hooks File - - else if(strName == "plugin_hooks.h") - { - strTarget = "Plugin\\" + strPluginClass + "Hooks.h"; - } - - // Target plugin_hooks File - - else if(strName == "plugin_hooks.cpp") - { - strTarget = "Plugin\\" + strPluginClass + "Hooks.cpp"; - } - - // Target plugin_engine File - - else if(strName == "plugin_engine.h") - { - strTarget = "Plugin\\" + strPluginClass + "Engine.h"; - } - - // Target plugin_mm File - - else if(strName == "plugin.vdf") - { - if(strPluginName.length) - { - strPluginName = strPluginName.replace(/ /g, ""); - - strTarget = "Bin\\" + strPluginName + ".vdf"; - } - } - - return strTarget; - } - - // Catch Exceptions - - catch(ex) - { - throw ex; - } -} - -/////////////////////////////////////////////////////////////////////////////////////////// -// AddFilesToCustomProj - -function AddFilesToCustomProj(proj, strProjectName, strProjectPath, InfFile) -{ - try - { - var vcProjectItems = proj.ProjectItems; - var vcProjectFilters = proj.Object.Filters; - - // Get references to the filters of the project - - var vcFilterSource = vcProjectFilters.Item(wizard.FindSymbol('PLUGIN_SOURCE_FILES')); - var vcFilterHeader = vcProjectFilters.Item(wizard.FindSymbol('PLUGIN_HEADER_FILES')); - var vcFilterRez = vcProjectFilters.Item(wizard.FindSymbol('PLUGIN_RESOURCE_FILES')); - - var strTemplatePath = wizard.FindSymbol('PLUGIN_INSTALL_PATH') + "Templates\\1033\\"; - var FileStream = InfFile.OpenAsTextStream(1, -2); - - // Process the template files - - while(!FileStream.AtEndOfStream) - { - var strLine = FileStream.ReadLine(); - - if(strLine == '') - { - continue; - } - - // Retrieve the file parameters - - var strName = strLine; - var strTargetFile = GetTargetName(strName); - var strTemplateFile = strTemplatePath + '\\' + strLine; - var strProjectFile = strProjectPath + '\\' + strTargetFile; - - // "true" will only copy the file from template_file - // to target_file without rendering / adding to the project - - var bCopyOnly = false; - var strExt = strName.substr(strName.lastIndexOf(".")); - - if(strExt == ".bmp" || - strExt == ".ico" || - strExt == ".gif" || - strExt == ".rtf" || - strExt == ".css") - { - bCopyOnly = true; - } - - wizard.RenderTemplate(strTemplateFile, strProjectFile, bCopyOnly); - - if(!KeepOutsideProject(strName)) - { - // Add source files to the 'Plugin Source Files' filter - - if(strExt == '.cpp' || - strExt == '.cxx' || - strExt == '.c') - { - vcFilterSource.AddFile(strTargetFile); - } - - // Add header files to the 'Plugin Header Files' filter - - else if(strExt == '.hpp' || - strExt == '.h') - { - vcFilterHeader.AddFile(strTargetFile); - } - - // Add resource files to the 'Resource Files' filter - - else if(strExt == '.rc2' || strExt == '.ico' || - strExt == '.gif' || strExt == '.bmp' || - strExt == '.vdf' || strExt == '.rc') - { - vcFilterRez.AddFile(strTargetFile); - } - - // Just add the rest to the project - - else - { - proj.Object.AddFile(strTargetFile); - } - } - } - - FileStream.Close(); - } - - // Catch Exceptions - - catch(ex) - { - throw ex; - } -} - -/////////////////////////////////////////////////////////////////////////////////////////// -// KeepOutsideProject - -function KeepOutsideProject(strName) -{ - try - { - var bAdd = false; - - if(strName == "ReadMe.txt") - { - bAdd = true; - } - - return bAdd; - } - - // Catch Exceptions - - catch(ex) - { - throw ex; - } -} diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/ReadMe.txt b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/ReadMe.txt deleted file mode 100644 index e81f92a9..00000000 --- a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/ReadMe.txt +++ /dev/null @@ -1,5 +0,0 @@ -======================================================================== - [!output PLUGIN_NAME] : Project Overview -======================================================================== - -MMS Plugin Project has created this [!output PLUGIN_NAME] project for you as a starting point. diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/StdMMS.h b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/StdMMS.h deleted file mode 100644 index 8b04c540..00000000 --- a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/StdMMS.h +++ /dev/null @@ -1,44 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// File: StdMMS.h -// Author: [!output PLUGIN_AUTHOR] -// Date: [!output CURRENT_DATE] -// -// License: [!output PLUGIN_LICENSE] -// -// This software is provided 'as-is', without any express or -// implied warranty. In no event will the authors be held liable -// for any damages arising from the use of this software. -// -// Based on code written by AlliedModders LLC. Sample Plugin -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _StdMMS_H -#define _StdMMS_H - -/////////////////////////////////////////////////////// -// Include Standard Headers - -#include - -/////////////////////////////////////////////////////// -// Include MetaMod Headers - -#include -#include -#include -#include - -/////////////////////////////////////////////////////// -// Include [!output PROJECT_NAME] Headers - -#include "Plugin/[!output PLUGIN_CLASS]Hooks.h" -#include "Plugin/[!output PLUGIN_CLASS].h" -#include "Plugin/[!output PLUGIN_CLASS]Engine.h" - -// TODO: Add your own headers here. - -// ex. #include "MyCode/MyInclude.h" - -#endif // _StdMMS_H diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/Templates.inf b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/Templates.inf deleted file mode 100644 index c1b859f9..00000000 --- a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/Templates.inf +++ /dev/null @@ -1,8 +0,0 @@ -StdMMS.h -plugin_mm.h -plugin_mm.cpp -plugin_hooks.h -plugin_hooks.cpp -plugin_engine.h -plugin.vdf -ReadMe.txt diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vcproj b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vcproj deleted file mode 100644 index 523460a6..00000000 --- a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vcproj +++ /dev/null @@ -1,386 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vdf b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vdf deleted file mode 100644 index 60a590ba..00000000 --- a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin.vdf +++ /dev/null @@ -1,5 +0,0 @@ -"Metamod Plugin" -{ - "alias" "[!output PLUGIN_NAME]" - "file" "addons/metamod/plugins/[!output PLUGIN_NAME]/bin/[!output PLUGIN_DLL]" -} diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_engine.h b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_engine.h deleted file mode 100644 index 5d1fc6b4..00000000 --- a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_engine.h +++ /dev/null @@ -1,127 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// File: [!output PLUGIN_CLASS]Engine.h -// Author: [!output PLUGIN_AUTHOR] -// Date: [!output CURRENT_DATE] -// -// License: [!output PLUGIN_LICENSE] -// -// This software is provided 'as-is', without any express or -// implied warranty. In no event will the authors be held liable -// for any damages arising from the use of this software. -// -// Based on code written by AlliedModders LLC. Sample Plugin -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _MMS_ENGINE_H -#define _MMS_ENGINE_H - -#include - -///////////////////////////////////////////////////////////////////////// -// Class [!output PLUGIN_CLASS] - -class [!output PLUGIN_CLASS]; - -///////////////////////////////////////////////////////////////////////// -// Episode One - -#if SOURCE_ENGINE == SE_EPISODEONE && defined METAMOD_PLAPI_VERSION - -#error "Metamod:Source 1.6 API is not supported on the old engine." - -#endif - -///////////////////////////////////////////////////////////////////////// -// Wrap some API calls for legacy MM:S. - -#if !defined METAMOD_PLAPI_VERSION - -#define GetEngineFactory engineFactory -#define GetServerFactory serverFactory - -#define MM_Format snprintf -#define GetCGlobals pGlobals - -#else - -#define MM_Format g_SMAPI->Format - -#endif - -///////////////////////////////////////////////////////////////////////// -// Wrap the CCommand class so our code looks the same for both engines. - -#if SOURCE_ENGINE <= SE_DARKMESSIAH - -class CCommand -{ - public: - - const char *ArgS() - { - return [!output PLUGIN_CLASS]::EngineServer->Cmd_Args(); - } - - int ArgC() - { - return [!output PLUGIN_CLASS]::EngineServer->Cmd_Argc(); - } - - const char *Arg(int index) - { - return [!output PLUGIN_CLASS]::EngineServer->Cmd_Argv(index); - } -}; - -#define CVAR_INTERFACE_VERSION VENGINE_CVAR_INTERFACE_VERSION - -#endif - -///////////////////////////////////////////////////////////////////////// -// Left 4 Dead engine removed these from IVEngineServer - -#if SOURCE_ENGINE >= SE_LEFT4DEAD - -inline int IndexOfEdict(const edict_t* edict) -{ - return (int)(edict - [!output PLUGIN_CLASS]::GlobalVars->baseEdict); -} - -inline edict_t* PEntityOfEntIndex(int entity_index) -{ - if (entity_index >= 0 && entity_index < [!output PLUGIN_CLASS]::GlobalVars->maxEntities) - { - return (edict_t *)([!output PLUGIN_CLASS]::GlobalVars->baseEdict + entity_index); - } - return NULL; -} - -#else - -inline int IndexOfEdict(const edict_t* edict) -{ - return [!output PLUGIN_CLASS]::EngineServer->IndexOfEdict(edict); -} - -inline edict_t* PEntityOfEntIndex(int entity_index) -{ - return [!output PLUGIN_CLASS]::EngineServer->PEntityOfEntIndex(entity_index); -} - -#endif - -///////////////////////////////////////////////////////////////////////// -// Define snprintf - -#if defined WIN32 && !defined snprintf -#define snprintf _snprintf -#endif - -///////////////////////////////////////////////////////////////////////// -// Define ENGINE_CALL - -#define ENGINE_CALL(func) SH_CALL([!output PLUGIN_CLASS]::EngineServer, &IVEngineServer::func) - -#endif // _MMS_ENGINE_H diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.cpp b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.cpp deleted file mode 100644 index f6a5a187..00000000 --- a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.cpp +++ /dev/null @@ -1,675 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// File: [!output PLUGIN_CLASS]Hooks.cpp -// Author: [!output PLUGIN_AUTHOR] -// Date: [!output CURRENT_DATE] -// -// License: [!output PLUGIN_LICENSE] -// -// This software is provided 'as-is', without any express or -// implied warranty. In no event will the authors be held liable -// for any damages arising from the use of this software. -// -// Based on code written by AlliedModders LLC. Sample Plugin -// -/////////////////////////////////////////////////////////////////////////////// - -#include "StdMMS.h" - -///////////////////////////////////////////////////////////////////////// -// Declare the Hooks - -[!if IServerGameDLL_ServerActivate] -SH_DECL_HOOK3_void(IServerGameDLL, ServerActivate, SH_NOATTRIB, 0, edict_t*, int, int); -[!endif] -[!if IServerGameDLL_GameInit] -SH_DECL_HOOK0(IServerGameDLL, GameInit, SH_NOATTRIB, 0, bool); -[!endif] -[!if IServerGameDLL_GameFrame] -SH_DECL_HOOK1_void(IServerGameDLL, GameFrame, SH_NOATTRIB, 0, bool); -[!endif] -[!if IServerGameDLL_GameShutdown] -SH_DECL_HOOK0_void(IServerGameDLL, GameShutdown, SH_NOATTRIB, 0); -[!endif] -[!if IServerGameDLL_LevelInit] -SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, 0, bool, char const*, char const*, char const*, char const*, bool, bool); -[!endif] -[!if IServerGameDLL_LevelShutdown] -SH_DECL_HOOK0_void(IServerGameDLL, LevelShutdown, SH_NOATTRIB, 0); -[!endif] -[!if IServerGameDLL_GetAllServerClasses] -SH_DECL_HOOK0(IServerGameDLL, GetAllServerClasses, SH_NOATTRIB, 0, ServerClass*); -[!endif] -[!if IServerGameDLL_GetTickInterval] -SH_DECL_HOOK0(IServerGameDLL, GetTickInterval, const, 0, float); -[!endif] -[!if IServerGameDLL_GetGameDescription] -SH_DECL_HOOK0(IServerGameDLL, GetGameDescription, SH_NOATTRIB, 0, const char*); -[!endif] - -[!if IServerGameClients_ClientActive] -SH_DECL_HOOK2_void(IServerGameClients, ClientActive, SH_NOATTRIB, 0, edict_t*, bool); -[!endif] -[!if IServerGameClients_ClientConnect] -SH_DECL_HOOK5(IServerGameClients, ClientConnect, SH_NOATTRIB, 0, bool, edict_t*, const char*, const char *, char *, int); -[!endif] -[!if IServerGameClients_ClientDisconnect] -SH_DECL_HOOK1_void(IServerGameClients, ClientDisconnect, SH_NOATTRIB, 0, edict_t*); -[!endif] -[!if IServerGameClients_ClientPutInServer] -SH_DECL_HOOK2_void(IServerGameClients, ClientPutInServer, SH_NOATTRIB, 0, edict_t*, char const *); -[!endif] -[!if IServerGameClients_ClientSettingsChanged] -SH_DECL_HOOK1_void(IServerGameClients, ClientSettingsChanged, SH_NOATTRIB, 0, edict_t*); -[!endif] -[!if IServerGameClients_ClientSetupVisibility] -SH_DECL_HOOK4_void(IServerGameClients, ClientSetupVisibility, SH_NOATTRIB, 0, edict_t*, edict_t*, unsigned char*, int); -[!endif] -[!if IServerGameClients_ClientEarPosition] -SH_DECL_HOOK2_void(IServerGameClients, ClientEarPosition, SH_NOATTRIB, 0, edict_t*, Vector*); -[!endif] -[!if IServerGameClients_PostClientMessagesSent] -SH_DECL_HOOK0_void(IServerGameClients, PostClientMessagesSent, SH_NOATTRIB, 0); -[!endif] -[!if IServerGameClients_ProcessUsercmds] -SH_DECL_HOOK7(IServerGameClients, ProcessUsercmds, SH_NOATTRIB, 0, float, edict_t*, bf_read*, int, int, int, bool, bool); -[!endif] -[!if IServerGameClients_GetPlayerLimits] -SH_DECL_HOOK3_void(IServerGameClients, GetPlayerLimits, const, 0, int&, int&, int&); -[!endif] -[!if IServerGameClients_GetPlayerState] -SH_DECL_HOOK1(IServerGameClients, GetPlayerState, SH_NOATTRIB, 0, CPlayerState*, edict_t*); -[!endif] -[!if IServerGameClients_GetReplayDelay] -SH_DECL_HOOK2(IServerGameClients, GetReplayDelay, SH_NOATTRIB, 0, int, edict_t*, int&); -[!endif] -[!if IServerGameClients_GetBugReportInfo] -SH_DECL_HOOK2_void(IServerGameClients, GetBugReportInfo, SH_NOATTRIB, 0, char*, int); -[!endif] -[!if IServerGameClients_SetCommandClient] -SH_DECL_HOOK1_void(IServerGameClients, SetCommandClient, SH_NOATTRIB, 0, int); -[!endif] -SH_DECL_HOOK2(IGameEventManager2, FireEvent, SH_NOATTRIB, 0, bool, IGameEvent*, bool); - -#if SOURCE_ENGINE >= SE_ORANGEBOX - -[!if IServerGameClients_NetworkIDValidated] -SH_DECL_HOOK2_void(IServerGameClients, NetworkIDValidated, SH_NOATTRIB, 0, const char *, const char *); -[!endif] -[!if IServerGameClients_ClientCommand] -SH_DECL_HOOK2_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t*, const CCommand&); -[!endif] - -#else - -[!if IServerGameClients_ClientCommand] -SH_DECL_HOOK1_void(IServerGameClients, ClientCommand, SH_NOATTRIB, 0, edict_t*); -[!endif] - -#endif - - -///////////////////////////////////////////////////////////////////////// -// AddHooks - -void [!output PLUGIN_CLASS]::AddHooks() -{ - // Add the ServerGameDLL hooks - -[!if IServerGameDLL_ServerActivate] - SH_ADD_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedServerActivate, true); -[!endif] -[!if IServerGameDLL_GameInit] - SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameInit, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameInit, true); -[!endif] -[!if IServerGameDLL_GameFrame] - SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameFrame, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameFrame, true); -[!endif] -[!if IServerGameDLL_GameShutdown] - SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameShutdown, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameShutdown, true); -[!endif] -[!if IServerGameDLL_LevelInit] - SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelInit, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedLevelInit, true); -[!endif] -[!if IServerGameDLL_LevelShutdown] - SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedLevelShutdown, true); -[!endif] -[!if IServerGameDLL_GetAllServerClasses] - SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GetAllServerClasses, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetAllServerClasses, true); -[!endif] -[!if IServerGameDLL_GetTickInterval] - SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GetTickInterval, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetTickInterval, true); -[!endif] -[!if IServerGameDLL_GetGameDescription] - SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GetGameDescription, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetGameDescription, true); -[!endif] - - // Add the ServerGameClients hooks - -[!if IServerGameClients_ClientActive] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientActive, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientActive, true); -[!endif] -[!if IServerGameClients_ClientConnect] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientConnect, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientConnect, true); -[!endif] -[!if IServerGameClients_ClientDisconnect] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientDisconnect, true); -[!endif] -[!if IServerGameClients_ClientCommand] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientCommand, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientCommand, true); -[!endif] -[!if IServerGameClients_ClientPutInServer] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientPutInServer, true); -[!endif] -[!if IServerGameClients_ClientSettingsChanged] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientSettingsChanged, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientSettingsChanged, true); -[!endif] -[!if IServerGameClients_ClientSetupVisibility] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientSetupVisibility, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientSetupVisibility, true); -[!endif] -[!if IServerGameClients_ClientEarPosition] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ClientEarPosition, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientEarPosition, true); -[!endif] -[!if IServerGameClients_PostClientMessagesSent] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, PostClientMessagesSent, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedPostClientMessagesSent, true); -[!endif] -[!if IServerGameClients_ProcessUsercmds] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, ProcessUsercmds, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedProcessUsercmds, false); -[!endif] -[!if IServerGameClients_GetPlayerLimits] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, GetPlayerLimits, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetPlayerLimits, true); -[!endif] -[!if IServerGameClients_GetPlayerState] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, GetPlayerState, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetPlayerState, true); -[!endif] -[!if IServerGameClients_GetReplayDelay] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, GetReplayDelay, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetReplayDelay, true); -[!endif] -[!if IServerGameClients_GetBugReportInfo] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, GetBugReportInfo, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetBugReportInfo, true); -[!endif] -[!if IServerGameClients_SetCommandClient] - SH_ADD_HOOK_MEMFUNC(IServerGameClients, SetCommandClient, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedSetCommandClient, true); -[!endif] - -[!if IServerGameClients_NetworkIDValidated] - #if SOURCE_ENGINE >= SE_ORANGEBOX - - SH_ADD_HOOK_MEMFUNC(IServerGameClients, NetworkIDValidated, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedNetworkIDValidated, true); - - #endif -[!endif] -} - -///////////////////////////////////////////////////////////////////////// -// RemoveHooks - -void [!output PLUGIN_CLASS]::RemoveHooks() -{ - // Remove the ServerGameDLL hooks - -[!if IServerGameDLL_ServerActivate] - SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedServerActivate, true); -[!endif] -[!if IServerGameDLL_GameInit] - SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameInit, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameInit, true); -[!endif] -[!if IServerGameDLL_GameFrame] - SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameFrame, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameFrame, true); -[!endif] -[!if IServerGameDLL_GameShutdown] - SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameShutdown, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGameShutdown, true); -[!endif] -[!if IServerGameDLL_LevelInit] - SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelInit, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedLevelInit, true); -[!endif] -[!if IServerGameDLL_LevelShutdown] - SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedLevelShutdown, true); -[!endif] -[!if IServerGameDLL_GetAllServerClasses] - SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GetAllServerClasses, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetAllServerClasses, true); -[!endif] -[!if IServerGameDLL_GetTickInterval] - SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GetTickInterval, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetTickInterval, true); -[!endif] -[!if IServerGameDLL_GetGameDescription] - SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GetGameDescription, [!output PLUGIN_CLASS]::GameServer, this, &[!output PLUGIN_CLASS]::HookedGetGameDescription, true); -[!endif] - - // Remove the ServerGameClients hooks - -[!if IServerGameClients_ClientActive] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientActive, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientActive, true); -[!endif] -[!if IServerGameClients_ClientConnect] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientConnect, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientConnect, true); -[!endif] -[!if IServerGameClients_ClientDisconnect] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientDisconnect, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientDisconnect, true); -[!endif] -[!if IServerGameClients_ClientCommand] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientCommand, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientCommand, true); -[!endif] -[!if IServerGameClients_ClientPutInServer] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientPutInServer, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientPutInServer, true); -[!endif] -[!if IServerGameClients_ClientSettingsChanged] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientSettingsChanged, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientSettingsChanged, true); -[!endif] -[!if IServerGameClients_ClientSetupVisibility] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientSetupVisibility, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientSetupVisibility, true); -[!endif] -[!if IServerGameClients_ClientEarPosition] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ClientEarPosition, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedClientEarPosition, true); -[!endif] -[!if IServerGameClients_PostClientMessagesSent] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, PostClientMessagesSent, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedPostClientMessagesSent, true); -[!endif] -[!if IServerGameClients_ProcessUsercmds] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, ProcessUsercmds, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedProcessUsercmds, true); -[!endif] -[!if IServerGameClients_GetPlayerLimits] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, GetPlayerLimits, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetPlayerLimits, true); -[!endif] -[!if IServerGameClients_GetPlayerState] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, GetPlayerState, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetPlayerState, true); -[!endif] -[!if IServerGameClients_GetReplayDelay] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, GetReplayDelay, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetReplayDelay, true); -[!endif] -[!if IServerGameClients_GetBugReportInfo] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, GetBugReportInfo, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedGetBugReportInfo, true); -[!endif] -[!if IServerGameClients_SetCommandClient] - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, SetCommandClient, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedSetCommandClient, true); -[!endif] - -[!if IServerGameClients_NetworkIDValidated] - #if SOURCE_ENGINE >= SE_ORANGEBOX - - SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, NetworkIDValidated, [!output PLUGIN_CLASS]::GameClients, this, &[!output PLUGIN_CLASS]::HookedNetworkIDValidated, true); - - #endif -[!endif] -} - - -[!if IServerGameDLL_ServerActivate] -///////////////////////////////////////////////////////////////////////// -// HookedServerActivate - -// The server is about to activate - -void [!output PLUGIN_CLASS]::HookedServerActivate(edict_t* edict_list, int edict_count, int client_max) -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameDLL_GameInit] -///////////////////////////////////////////////////////////////////////// -// HookedGameInit - -// This is called when a new game is started. (restart, map) - -bool [!output PLUGIN_CLASS]::HookedGameInit() -{ - // TODO: Implement Method - - RETURN_META_VALUE(MRES_IGNORED, true); -} - -[!endif] -[!if IServerGameDLL_GameFrame] -///////////////////////////////////////////////////////////////////////// -// HookedGameFrame - -// The server should run physics / think on all edicts - -void [!output PLUGIN_CLASS]::HookedGameFrame(bool simulating) -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameDLL_GameShutdown] -///////////////////////////////////////////////////////////////////////// -// HookedGameShutdown - -// This is called when a game ends (server disconnect, death, -// restart, load). NOT on level transitions within a game - -void [!output PLUGIN_CLASS]::HookedGameShutdown() -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameDLL_LevelInit] -///////////////////////////////////////////////////////////////////////// -// HookedLevelInit - -// Called any time a new level is started (after -// GameInit() also on level transitions within a game) - -bool [!output PLUGIN_CLASS]::HookedLevelInit(const char* map_name, char const* map_entities, char const* old_level, - char const* landmark_name, bool load_game, bool bkgnd) -{ - // TODO: Implement Method - - RETURN_META_VALUE(MRES_IGNORED, true); -} - -[!endif] -[!if IServerGameDLL_LevelShutdown] -///////////////////////////////////////////////////////////////////////// -// HookedLevelShutdown - -// Called when a level is shutdown (including changing levels) - -void [!output PLUGIN_CLASS]::HookedLevelShutdown() -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameDLL_GetAllServerClasses] -///////////////////////////////////////////////////////////////////////// -// HookedGetAllServerClasses - -// Gets the list of datatable classes to the engine. The engine -// matches class names from here with edict_t::classname to figure -// out how to encode a class's data for networking - -ServerClass* [!output PLUGIN_CLASS]::HookedGetAllServerClasses() -{ - // TODO: Implement Method - - RETURN_META_VALUE(MRES_IGNORED, NULL); -} - -[!endif] -[!if IServerGameDLL_GetTickInterval] -///////////////////////////////////////////////////////////////////////// -// HookedGetTickInterval - -// Get the simulation interval (must be compiled with identical values -// into both client and game .dll for MOD!!!). Right now this is only -// requested at server startup time so it can't be changed on the fly, etc. - -float [!output PLUGIN_CLASS]::HookedGetTickInterval() const -{ - // TODO: Implement Method - - RETURN_META_VALUE(MRES_IGNORED, 0.0f); -} - -[!endif] -[!if IServerGameDLL_GetGameDescription] -///////////////////////////////////////////////////////////////////////// -// HookedGetGameDescription - -// Returns string describing current .dll. -// e.g. TeamFortress 2, Half-Life 2 - -const char* [!output PLUGIN_CLASS]::HookedGetGameDescription() -{ - // TODO: Implement Method - - RETURN_META_VALUE(MRES_IGNORED, ""); -} - -[!endif] -[!if IServerGameClients_ClientActive] -///////////////////////////////////////////////////////////////////////// -// HookedClientActive - -// Client is going active. If load_game is true, don't -// spawn the player because its state is already setup. - -void [!output PLUGIN_CLASS]::HookedClientActive(edict_t* entity, bool load_game) -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameClients_ClientConnect] -///////////////////////////////////////////////////////////////////////// -// HookedClientConnect - -// Client is connecting to server (return false to reject the connection) -// You can specify a rejection message by writing it into reject - -bool [!output PLUGIN_CLASS]::HookedClientConnect(edict_t* entity, const char* name, const char* address, char* reject, int reject_len) -{ - // TODO: Implement Method - - RETURN_META_VALUE(MRES_IGNORED, true); -} - -[!endif] -[!if IServerGameClients_ClientDisconnect] -///////////////////////////////////////////////////////////////////////// -// HookedClientDisconnect - -// Client is disconnecting from server - -void [!output PLUGIN_CLASS]::HookedClientDisconnect(edict_t* entity) -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameClients_ClientCommand] -///////////////////////////////////////////////////////////////////////// -// HookedClientCommand - -// The client has typed a command at the console - -#if SOURCE_ENGINE >= SE_ORANGEBOX -void [!output PLUGIN_CLASS]::HookedClientCommand(edict_t* entity, const CCommand& args) -#else -void [!output PLUGIN_CLASS]::HookedClientCommand(edict_t* entity) -#endif -{ - // Verify the parameters - - #if SOURCE_ENGINE <= SE_DARKMESSIAH - CCommand args; - #endif - - if(!entity || entity->IsFree()) - { - RETURN_META(MRES_IGNORED); - } - - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameClients_ClientPutInServer] -///////////////////////////////////////////////////////////////////////// -// HookedClientPutInServer - -// Client is connected and should be put in the game - -void [!output PLUGIN_CLASS]::HookedClientPutInServer(edict_t* entity, char const* name) -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameClients_ClientSettingsChanged] -///////////////////////////////////////////////////////////////////////// -// HookedClientSettingsChanged - -// A player changed one / several replicated cvars (name etc...) - -void [!output PLUGIN_CLASS]::HookedClientSettingsChanged(edict_t* edict) -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameClients_ClientSetupVisibility] -///////////////////////////////////////////////////////////////////////// -// HookedClientSetupVisibility - -// Determine PVS origin and set PVS for the player / view entity - -void [!output PLUGIN_CLASS]::HookedClientSetupVisibility(edict_t* view_entity, edict_t* client, unsigned char *pvs, int pvs_size) -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameClients_ClientEarPosition] -///////////////////////////////////////////////////////////////////////// -// HookedClientEarPosition - -// Get the ear position for a specified client - -void [!output PLUGIN_CLASS]::HookedClientEarPosition(edict_t* entity, Vector* ear_origin) -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameClients_PostClientMessagesSent] -///////////////////////////////////////////////////////////////////////// -// HookedPostClientMessagesSent - -// Let the game .dll do stuff after messages have been sent -// to all of the clients once the server frame is complete - -void [!output PLUGIN_CLASS]::HookedPostClientMessagesSent() -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameClients_ProcessUsercmds] -///////////////////////////////////////////////////////////////////////// -// HookedProcessUsercmds - -// A block of CUserCmds has arrived from the user, decode -// them and buffer for execution during player simulation - -float [!output PLUGIN_CLASS]::HookedProcessUsercmds(edict_t* player, bf_read* buf, int num_cmds, int total_cmds, - int dropped_packets, bool ignore, bool paused) -{ - // TODO: Implement Method - - RETURN_META_VALUE(MRES_IGNORED, 0.0f); -} - -[!endif] -[!if IServerGameClients_NetworkIDValidated] -///////////////////////////////////////////////////////////////////////// -// HookedNetworkIDValidated - -// A user has had their network id setup and validated - -void [!output PLUGIN_CLASS]::HookedNetworkIDValidated(const char* user_name, const char* network_id) -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameClients_GetPlayerLimits] -///////////////////////////////////////////////////////////////////////// -// HookedGetPlayerLimits - -// Get server max players and lower bound for the same - -void [!output PLUGIN_CLASS]::HookedGetPlayerLimits(int& min_players, int& max_players, int& default_max) const -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameClients_GetPlayerState] -///////////////////////////////////////////////////////////////////////// -// HookedGetPlayerState - -// For players, looks up the CPlayerState structure corresponding to the player - -CPlayerState* [!output PLUGIN_CLASS]::HookedGetPlayerState(edict_t* player) -{ - // TODO: Implement Method - - RETURN_META_VALUE(MRES_IGNORED, NULL); -} - -[!endif] -[!if IServerGameClients_GetReplayDelay] -///////////////////////////////////////////////////////////////////////// -// HookedGetReplayDelay - -// Returns number of delay ticks if player is in Replay mode (0 = no delay) - -int [!output PLUGIN_CLASS]::HookedGetReplayDelay(edict_t* player, int& entity) -{ - // TODO: Implement Method - - RETURN_META_VALUE(MRES_IGNORED, 0); -} - -[!endif] -[!if IServerGameClients_GetBugReportInfo] -///////////////////////////////////////////////////////////////////////// -// HookedGetBugReportInfo - -// Anything this game .dll wants to add to the bug reporter text -//(e.g., the entity/model under the picker crosshair) can be added here - -void [!output PLUGIN_CLASS]::HookedGetBugReportInfo(char* buf, int size) -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] -[!if IServerGameClients_SetCommandClient] -///////////////////////////////////////////////////////////////////////// -// HookedSetCommandClient - -// Sets the client index for the client who typed the command into his / her console - -void [!output PLUGIN_CLASS]::HookedSetCommandClient(int index) -{ - // TODO: Implement Method - - RETURN_META(MRES_IGNORED); -} - -[!endif] diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.h b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.h deleted file mode 100644 index e9a9f1fd..00000000 --- a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_hooks.h +++ /dev/null @@ -1,278 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// File: [!output PLUGIN_CLASS]Hooks.h -// Author: [!output PLUGIN_AUTHOR] -// Date: [!output CURRENT_DATE] -// -// License: [!output PLUGIN_LICENSE] -// -// This software is provided 'as-is', without any express or -// implied warranty. In no event will the authors be held liable -// for any damages arising from the use of this software. -// -// Based on code written by AlliedModders LLC. Sample Plugin -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _PLUGIN_HOOKS_H -#define _PLUGIN_HOOKS_H - -[!if IServerGameDLL_ServerActivate] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_SERVER_ACTIVATE - -#define DECL_HOOK_SERVER_ACTIVATE \ - \ - void HookedServerActivate(edict_t* edict_list, \ - int edict_count, \ - int client_max) - -[!endif] -[!if IServerGameDLL_GameInit] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_GAME_INIT - -#define DECL_HOOK_GAME_INIT \ - \ - bool HookedGameInit() - -[!endif] -[!if IServerGameDLL_GameFrame] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_GAME_FRAME - -#define DECL_HOOK_GAME_FRAME \ - \ - void HookedGameFrame(bool simulating) - -[!endif] -[!if IServerGameDLL_GameShutdown] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_GAME_SHUTDOWN - -#define DECL_HOOK_GAME_SHUTDOWN \ - \ - void HookedGameShutdown() - -[!endif] -[!if IServerGameDLL_LevelInit] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_LEVEL_INIT - -#define DECL_HOOK_LEVEL_INIT \ - \ - bool HookedLevelInit(const char* map_name, \ - char const* map_entities, \ - char const* old_level, \ - char const* landmark_name, \ - bool load_game, bool bkgnd) - -[!endif] -[!if IServerGameDLL_LevelShutdown] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_LEVEL_SHUTDOWN - -#define DECL_HOOK_LEVEL_SHUTDOWN \ - \ - void HookedLevelShutdown(); - -[!endif] -[!if IServerGameDLL_GetAllServerClasses] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_GET_ALL_SERVER_CLASSES - -#define DECL_HOOK_GET_ALL_SERVER_CLASSES \ - \ - ServerClass* HookedGetAllServerClasses() - -[!endif] -[!if IServerGameDLL_GetTickInterval] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_GET_TICK_INTERVAL - -#define DECL_HOOK_GET_TICK_INTERVAL \ - \ - float HookedGetTickInterval() const - -[!endif] -[!if IServerGameDLL_GetGameDescription] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_GET_GAME_DESC - -#define DECL_HOOK_GET_GAME_DESC \ - \ - const char* HookedGetGameDescription() - -[!endif] -[!if IServerGameClients_ClientActive] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_CLIENT_ACTIVE - -#define DECL_HOOK_CLIENT_ACTIVE \ - \ - void HookedClientActive(edict_t* entity, \ - bool load_game) - -[!endif] -[!if IServerGameClients_ClientConnect] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_CLIENT_CONNECT - -#define DECL_HOOK_CLIENT_CONNECT \ - \ - bool HookedClientConnect(edict_t* entity, \ - const char* name, \ - const char* address, \ - char* reject, \ - int reject_len) - -[!endif] -[!if IServerGameClients_ClientDisconnect] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_CLIENT_DISCONNECT - -#define DECL_HOOK_CLIENT_DISCONNECT \ - \ - void HookedClientDisconnect(edict_t* entity) - -[!endif] -[!if IServerGameClients_ClientCommand] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_CLIENT_COMMAND - -#if SOURCE_ENGINE >= SE_ORANGEBOX -#define DECL_HOOK_CLIENT_COMMAND \ - \ - void HookedClientCommand(edict_t* entity, \ - const CCommand& args) -#else -#define DECL_HOOK_CLIENT_COMMAND \ - \ - void HookedClientCommand(edict_t* entity) -#endif - -[!endif] -[!if IServerGameClients_ClientPutInServer] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_CLIENT_PUT_IN_SERVER - -#define DECL_HOOK_CLIENT_PUT_IN_SERVER \ - \ - void HookedClientPutInServer(edict_t* entity, \ - char const* name) - -[!endif] -[!if IServerGameClients_ClientSettingsChanged] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_CLIENT_SETTINGS_CHANGED - -#define DECL_HOOK_CLIENT_SETTINGS_CHANGED \ - \ - void HookedClientSettingsChanged(edict_t* edict) - -[!endif] -[!if IServerGameClients_ClientSetupVisibility] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_CLIENT_SETUP_VISIBILITY - -#define DECL_HOOK_CLIENT_SETUP_VISIBILITY \ - \ - void HookedClientSetupVisibility(edict_t* view_entity, \ - edict_t* client, \ - unsigned char *pvs, \ - int pvs_size) - -[!endif] -[!if IServerGameClients_ClientEarPosition] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_CLIENT_EAR_POSITION - -#define DECL_HOOK_CLIENT_EAR_POSITION \ - \ - void HookedClientEarPosition(edict_t* entity, \ - Vector* ear_origin) - -[!endif] -[!if IServerGameClients_PostClientMessagesSent] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_POST_CLIENT_MESSAGES_SENT - -#define DECL_HOOK_POST_CLIENT_MESSAGES_SENT \ - \ - void HookedPostClientMessagesSent() - -[!endif] -[!if IServerGameClients_ProcessUsercmds] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_PROCESS_USER_CMDS - -#define DECL_HOOK_PROCESS_USER_CMDS \ - \ - float HookedProcessUsercmds(edict_t* player, \ - bf_read* buf, \ - int num_cmds, \ - int total_cmds, \ - int dropped_packets, \ - bool ignore, \ - bool paused) - -[!endif] -[!if IServerGameClients_NetworkIDValidated] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_NETWORK_ID_VALIDATED - -#define DECL_HOOK_NETWORK_ID_VALIDATED \ - \ - void HookedNetworkIDValidated(const char* user_name, \ - const char* network_id) - -[!endif] -[!if IServerGameClients_GetPlayerLimits] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_GET_PLAYER_LIMITS - -#define DECL_HOOK_GET_PLAYER_LIMITS \ - \ - void HookedGetPlayerLimits(int& min_players, \ - int& max_players, \ - int& default_max) const - -[!endif] -[!if IServerGameClients_GetPlayerState] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_GET_PLAYER_STATE - -#define DECL_HOOK_GET_PLAYER_STATE \ - \ - CPlayerState* HookedGetPlayerState(edict_t* player) - -[!endif] -[!if IServerGameClients_GetReplayDelay] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_GET_REPLAY_DELAY - -#define DECL_HOOK_GET_REPLAY_DELAY \ - \ - int HookedGetReplayDelay(edict_t* player, \ - int& entity) - -[!endif] -[!if IServerGameClients_GetBugReportInfo] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_GET_BUG_REPORT_INFO - -#define DECL_HOOK_GET_BUG_REPORT_INFO \ - \ - void HookedGetBugReportInfo(char* buf, int size) - -[!endif] -[!if IServerGameClients_SetCommandClient] -///////////////////////////////////////////////////////////////////////// -// Define DECL_HOOK_SET_COMMAND_CLIENT - -#define DECL_HOOK_SET_COMMAND_CLIENT \ - \ - void HookedSetCommandClient(int index) - -[!endif] -#endif // _PLUGIN_HOOKS_H diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.cpp b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.cpp deleted file mode 100644 index 5eeeed33..00000000 --- a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// File: [!output PLUGIN_CLASS].cpp -// Author: [!output PLUGIN_AUTHOR] -// Date: [!output CURRENT_DATE] -// -// License: [!output PLUGIN_LICENSE] -// -// This software is provided 'as-is', without any express or -// implied warranty. In no event will the authors be held liable -// for any damages arising from the use of this software. -// -// Based on code written by AlliedModders LLC. Sample Plugin -// -/////////////////////////////////////////////////////////////////////////////// - -#include "StdMMS.h" - -///////////////////////////////////////////////////////////////////////// -// Global Variables - -IServerGameDLL* [!output PLUGIN_CLASS]::GameServer(NULL); -IServerGameClients* [!output PLUGIN_CLASS]::GameClients(NULL); -IVEngineServer* [!output PLUGIN_CLASS]::EngineServer(NULL); -IServerPluginHelpers* [!output PLUGIN_CLASS]::PluginHelpers(NULL); -IGameEventManager2* [!output PLUGIN_CLASS]::GameEvents(NULL); -IServerPluginCallbacks* [!output PLUGIN_CLASS]::VspCallbacks(NULL); -IPlayerInfoManager* [!output PLUGIN_CLASS]::PlayerInfoManager(NULL); -ICvar* [!output PLUGIN_CLASS]::CVar(NULL); -CGlobalVars* [!output PLUGIN_CLASS]::GlobalVars(NULL); - - -///////////////////////////////////////////////////////////////////////// -// Class BaseAccessor - -// This is needed to register cvars / CON_COMMANDs - -class BaseAccessor : public IConCommandBaseAccessor -{ - public: - - bool RegisterConCommandBase(ConCommandBase *pCommandBase) - { - // Always call META_REGCVAR instead - // of going through the [!output PLUGIN_CLASS]::EngineServer - - return META_REGCVAR(pCommandBase); - } -} -s_BaseAccessor; - - -/////////////////////////////////////////////////////////////////////////////// -// Expose the Plugin - -[!output PLUGIN_CLASS] [!output PLUGIN_CLASS]::Global; - -PLUGIN_EXPOSE([!output PLUGIN_CLASS], [!output PLUGIN_CLASS]::Global); - - -///////////////////////////////////////////////////////////////////////// -// Load - -bool [!output PLUGIN_CLASS]::Load(PluginId id, ISmmAPI* ismm, char* error, size_t maxlen, bool late) -{ - PLUGIN_SAVEVARS(); - - // Get the current Enginefactory interfaces - - GET_V_IFACE_CURRENT(GetEngineFactory, [!output PLUGIN_CLASS]::EngineServer, IVEngineServer, INTERFACEVERSION_VENGINESERVER); - GET_V_IFACE_CURRENT(GetEngineFactory, [!output PLUGIN_CLASS]::GameEvents, IGameEventManager2, INTERFACEVERSION_GAMEEVENTSMANAGER2); - GET_V_IFACE_CURRENT(GetEngineFactory, [!output PLUGIN_CLASS]::PluginHelpers, IServerPluginHelpers, INTERFACEVERSION_ISERVERPLUGINHELPERS); - GET_V_IFACE_CURRENT(GetEngineFactory, [!output PLUGIN_CLASS]::CVar, ICvar, CVAR_INTERFACE_VERSION); - - // Get the current ServerFactory interfaces - - GET_V_IFACE_ANY(GetServerFactory, [!output PLUGIN_CLASS]::GameServer, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL); - GET_V_IFACE_ANY(GetServerFactory, [!output PLUGIN_CLASS]::GameClients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS); - GET_V_IFACE_ANY(GetServerFactory, [!output PLUGIN_CLASS]::PlayerInfoManager, IPlayerInfoManager, INTERFACEVERSION_PLAYERINFOMANAGER); - - // Get the current Globals interfaces - - [!output PLUGIN_CLASS]::GlobalVars = ismm->GetCGlobals(); - - // Load the VSP listener. This is usually needed for IServerPluginHelpers - - if (([!output PLUGIN_CLASS]::VspCallbacks = ismm->GetVSPInfo(NULL)) == NULL) - { - ismm->AddListener(this, this); - ismm->EnableVSPListener(); - } - - // Add the hooks - - AddHooks(); - - ENGINE_CALL(LogPrint)("All hooks started!\n"); - - // Register the base accessor - - #if SOURCE_ENGINE >= SE_ORANGEBOX - - g_pCVar = [!output PLUGIN_CLASS]::CVar; - ConVar_Register(0, &s_BaseAccessor); - - #else - - ConCommandBaseMgr::OneTimeInit(&s_BaseAccessor); - - #endif - - return true; -} - -///////////////////////////////////////////////////////////////////////// -// Unload - -bool [!output PLUGIN_CLASS]::Unload(char *error, size_t maxlen) -{ - // Remove the hooks - - RemoveHooks(); - - return true; -} - -///////////////////////////////////////////////////////////////////////// -// OnVSPListening - -void [!output PLUGIN_CLASS]::OnVSPListening(IServerPluginCallbacks* vsp_callbacks) -{ - [!output PLUGIN_CLASS]::VspCallbacks = vsp_callbacks; -} - -///////////////////////////////////////////////////////////////////////// -// GetVersion - -const char* [!output PLUGIN_CLASS]::GetVersion() -{ - return "1.0.0.0"; -} - -///////////////////////////////////////////////////////////////////////// -// GetDate - -const char* [!output PLUGIN_CLASS]::GetDate() -{ - return __DATE__; -} - -///////////////////////////////////////////////////////////////////////// -// GetLogTag - -const char* [!output PLUGIN_CLASS]::GetLogTag() -{ - return "[!output PLUGIN_NAME]Log"; -} - -///////////////////////////////////////////////////////////////////////// -// GetLicense - -const char* [!output PLUGIN_CLASS]::GetLicense() -{ - return "[!output PLUGIN_LICENSE]"; -} - -///////////////////////////////////////////////////////////////////////// -// GetAuthor - -const char* [!output PLUGIN_CLASS]::GetAuthor() -{ - return "[!output PLUGIN_AUTHOR]"; -} - -///////////////////////////////////////////////////////////////////////// -// GetDescription - -const char* [!output PLUGIN_CLASS]::GetDescription() -{ - return "[!output PLUGIN_DESC]"; -} - -///////////////////////////////////////////////////////////////////////// -// GetName - -const char* [!output PLUGIN_CLASS]::GetName() -{ - return "[!output PLUGIN_NAME]"; -} - -///////////////////////////////////////////////////////////////////////// -// GetURL - -const char* [!output PLUGIN_CLASS]::GetURL() -{ - return "[!output PLUGIN_URL]"; -} diff --git a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.h b/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.h deleted file mode 100644 index 2ca892e0..00000000 --- a/metamod-source/support/msvc_project_templates/VC/VCWizards/AppWiz/Metamod/MMSProjectTemplate/Templates/1033/plugin_mm.h +++ /dev/null @@ -1,164 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// File: [!output PLUGIN_CLASS].h -// Author: [!output PLUGIN_AUTHOR] -// Date: [!output CURRENT_DATE] -// -// License: [!output PLUGIN_LICENSE] -// -// This software is provided 'as-is', without any express or -// implied warranty. In no event will the authors be held liable -// for any damages arising from the use of this software. -// -// Based on code written by AlliedModders LLC. Sample Plugin -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _PLUGIN_H -#define _PLUGIN_H - -///////////////////////////////////////////////////////////////////////// - -class CCommand; - -///////////////////////////////////////////////////////////////////////// -// Class [!output PLUGIN_CLASS] - -class [!output PLUGIN_CLASS] : public ISmmPlugin, public IMetamodListener -{ - //////////////////////////////////////// - // Plugin Interface - - public: - - virtual bool Load(PluginId id, - ISmmAPI* ismm, - char* error, - size_t maxlen, - bool late); - - virtual bool Unload(char* error, size_t maxlen); - virtual void OnVSPListening(IServerPluginCallbacks* vsp_callbacks); - - //////////////////////////////////////// - // Plugin Info - - public: - - virtual const char* GetAuthor(); - virtual const char* GetName(); - virtual const char* GetDescription(); - virtual const char* GetURL(); - virtual const char* GetLicense(); - virtual const char* GetVersion(); - virtual const char* GetDate(); - virtual const char* GetLogTag(); - - //////////////////////////////////////// - // Plugin Globals - - public: - - static IServerGameDLL* GameServer; - static IServerGameClients* GameClients; - static IVEngineServer* EngineServer; - static IServerPluginHelpers* PluginHelpers; - static IGameEventManager2* GameEvents; - static IServerPluginCallbacks* VspCallbacks; - static IPlayerInfoManager* PlayerInfoManager; - static ICvar* CVar; - static CGlobalVars* GlobalVars; - - static [!output PLUGIN_CLASS] Global; - - //////////////////////////////////////// - // Hooks - - private: - - void AddHooks(); - void RemoveHooks(); - -[!if IServerGameDLL_ServerActivate] - DECL_HOOK_SERVER_ACTIVATE; -[!endif] -[!if IServerGameDLL_GameInit] - DECL_HOOK_GAME_INIT; -[!endif] -[!if IServerGameDLL_GameFrame] - DECL_HOOK_GAME_FRAME; -[!endif] -[!if IServerGameDLL_GameShutdown] - DECL_HOOK_GAME_SHUTDOWN; -[!endif] -[!if IServerGameDLL_LevelInit] - DECL_HOOK_LEVEL_INIT; -[!endif] -[!if IServerGameDLL_LevelShutdown] - DECL_HOOK_LEVEL_SHUTDOWN; -[!endif] -[!if IServerGameDLL_GetAllServerClasses] - DECL_HOOK_GET_ALL_SERVER_CLASSES; -[!endif] -[!if IServerGameDLL_GetTickInterval] - DECL_HOOK_GET_TICK_INTERVAL; -[!endif] -[!if IServerGameDLL_GetGameDescription] - DECL_HOOK_GET_GAME_DESC; -[!endif] -[!if IServerGameClients_ClientActive] - DECL_HOOK_CLIENT_ACTIVE; -[!endif] -[!if IServerGameClients_ClientConnect] - DECL_HOOK_CLIENT_CONNECT; -[!endif] -[!if IServerGameClients_ClientDisconnect] - DECL_HOOK_CLIENT_DISCONNECT; -[!endif] -[!if IServerGameClients_ClientCommand] - DECL_HOOK_CLIENT_COMMAND; -[!endif] -[!if IServerGameClients_ClientPutInServer] - DECL_HOOK_CLIENT_PUT_IN_SERVER; -[!endif] -[!if IServerGameClients_ClientSettingsChanged] - DECL_HOOK_CLIENT_SETTINGS_CHANGED; -[!endif] -[!if IServerGameClients_ClientSetupVisibility] - DECL_HOOK_CLIENT_SETUP_VISIBILITY; -[!endif] -[!if IServerGameClients_ClientEarPosition] - DECL_HOOK_CLIENT_EAR_POSITION; -[!endif] -[!if IServerGameClients_PostClientMessagesSent] - DECL_HOOK_POST_CLIENT_MESSAGES_SENT; -[!endif] -[!if IServerGameClients_ProcessUsercmds] - DECL_HOOK_PROCESS_USER_CMDS; -[!endif] -[!if IServerGameClients_NetworkIDValidated] - DECL_HOOK_NETWORK_ID_VALIDATED; -[!endif] -[!if IServerGameClients_GetPlayerLimits] - DECL_HOOK_GET_PLAYER_LIMITS; -[!endif] -[!if IServerGameClients_GetPlayerState] - DECL_HOOK_GET_PLAYER_STATE; -[!endif] -[!if IServerGameClients_GetReplayDelay] - DECL_HOOK_GET_REPLAY_DELAY; -[!endif] -[!if IServerGameClients_GetBugReportInfo] - DECL_HOOK_GET_BUG_REPORT_INFO; -[!endif] -[!if IServerGameClients_SetCommandClient] - DECL_HOOK_SET_COMMAND_CLIENT; -[!endif] -}; - -///////////////////////////////////////////////////////////////////////// -// Global Vars - -PLUGIN_GLOBALVARS(); - -#endif // _PLUGIN_H diff --git a/metamod-source/third_party/amtl/.appveyor/build.bat b/metamod-source/third_party/amtl/.appveyor/build.bat deleted file mode 100644 index 7cfdc970..00000000 --- a/metamod-source/third_party/amtl/.appveyor/build.bat +++ /dev/null @@ -1,7 +0,0 @@ -@echo on -call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 -mkdir opt32 && cd opt32 -python ..\configure.py --enable-optimize -ambuild -cd .. -opt32\dist\testrunner.exe diff --git a/metamod-source/third_party/amtl/.appveyor/setup_environment.bat b/metamod-source/third_party/amtl/.appveyor/setup_environment.bat deleted file mode 100644 index 3ad5e2c2..00000000 --- a/metamod-source/third_party/amtl/.appveyor/setup_environment.bat +++ /dev/null @@ -1,7 +0,0 @@ -@echo on -SET PYTHON=c:\python33 -SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH% -git submodule update --init -git clone https://github.com/alliedmodders/ambuild ambuild -pip install ./ambuild -chdir /D "%APPVEYOR_BUILD_FOLDER%" diff --git a/metamod-source/third_party/amtl/.clang-format b/metamod-source/third_party/amtl/.clang-format deleted file mode 100644 index 147c531c..00000000 --- a/metamod-source/third_party/amtl/.clang-format +++ /dev/null @@ -1,60 +0,0 @@ -BasedOnStyle: Google -Language: Cpp -AllowAllParametersOfDeclarationOnNextLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: None -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterReturnType: TopLevelDefinitions -AlwaysBreakBeforeMultilineStrings: true -AccessModifierOffset: -2 -BinPackArguments: true -BinPackParameters: true -BraceWrapping: - AfterClass: true - AfterControlStatement: false - AfterEnum: false - AfterFunction: false - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false - AfterExternBlock: false - BeforeCatch: false - BeforeElse: false - IndentBraces: false - SplitEmptyFunction: false - SplitEmptyRecord: true - SplitEmptyNamespace: true -BreakBeforeBraces: Custom -BreakBeforeInheritanceComma: false -BreakStringLiterals: true -ColumnLimit: 100 -BreakConstructorInitializers: BeforeComma -ConstructorInitializerAllOnOneLineOrOnePerLine: false -ConstructorInitializerIndentWidth: 1 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: true -IncludeBlocks: Preserve -IncludeCategories: - - Regex: '^' - Priority: 2 - - Regex: '^<.*\.h>' - Priority: 1 - - Regex: '^<.*' - Priority: 2 - - Regex: '.*' - Priority: 3 -IncludeIsMainRegex: '([-_](test|unittest))?$' -IndentCaseLabels: true -IndentPPDirectives: AfterHash -IndentWidth: 4 -MaxEmptyLinesToKeep: 1 -ReflowComments: false -SortIncludes: true -SortUsingDeclarations: true -SpacesBeforeTrailingComments: 1 -SpacesInContainerLiterals: false -Standard: Cpp11 -TabWidth: 8 -UseTab: Never diff --git a/metamod-source/third_party/amtl/.gitignore b/metamod-source/third_party/amtl/.gitignore deleted file mode 100644 index f12fb00f..00000000 --- a/metamod-source/third_party/amtl/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.gdb_history -obj-linux-x86_64 diff --git a/metamod-source/third_party/amtl/.gitmodules b/metamod-source/third_party/amtl/.gitmodules deleted file mode 100644 index 8d4f8c9f..00000000 --- a/metamod-source/third_party/amtl/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "third_party/googletest"] - path = third_party/googletest - url = https://github.com/google/googletest diff --git a/metamod-source/third_party/amtl/.travis.yml b/metamod-source/third_party/amtl/.travis.yml deleted file mode 100644 index 598d8d55..00000000 --- a/metamod-source/third_party/amtl/.travis.yml +++ /dev/null @@ -1,82 +0,0 @@ -git: - depth: 3 - -sudo: false -language: cpp - -matrix: - fast_finish: true - include: - - os: linux - dist: trusty - sudo: false - language: cpp - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: ['clang-3.8', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev:i386', 'g++-4.9-multilib'] - env: - - PATH="~/.local/bin:$PATH" - - MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8" - - - os: linux - dist: trusty - sudo: false - language: cpp - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: ['clang-3.4', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev:i386', 'g++-4.9-multilib'] - env: - - PATH="~/.local/bin:$PATH" - - MATRIX_EVAL="CC=clang && CXX=clang++" - - - os: osx - osx_image: xcode6.4 - sudo: true - language: cpp - env: - - PATH="~/Library/Python/2.7/bin:$PATH" - - MATRIX_EVAL="CC=clang && CXX=clang++" - - - os: linux - dist: bionic - sudo: false - language: cpp - addons: - apt: - packages: ['lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev:i386', 'g++-multilib', 'clang'] - env: - - PATH="~/.local/bin:$PATH" - - MATRIX_EVAL="CC=clang && CXX=clang++" - - - os: linux - dist: bionic - sudo: false - language: cpp - addons: - apt: - packages: ['lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev:i386', 'g++-multilib', 'g++'] - env: - - PATH="~/.local/bin:$PATH" - - MATRIX_EVAL="CC=gcc && CXX=g++" - -before_script: - - CHECKOUT_DIR=$PWD && cd .. && $CHECKOUT_DIR/checkout-deps.sh && cd $CHECKOUT_DIR -script: - - eval "${MATRIX_EVAL}" - - eval "${CC} --version" - - eval "${CXX} --version" - - - mkdir build-opt && cd build-opt - - python ../configure.py --enable-optimize - - ambuild - - ./dist/testrunner - - cd .. - - - mkdir build-debug && cd build-debug - - python ../configure.py --enable-debug - - ambuild - - ./dist/testrunner diff --git a/metamod-source/third_party/amtl/AMBuildScript b/metamod-source/third_party/amtl/AMBuildScript deleted file mode 100644 index f0e166d8..00000000 --- a/metamod-source/third_party/amtl/AMBuildScript +++ /dev/null @@ -1,160 +0,0 @@ -# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: -import os -import sys - -class KEConfig(object): - def __init__(self): - pass - - def configure(self): - cxx = builder.DetectCxx() - - builder.cxx = cxx - builder.dist_folder = builder.AddFolder('dist') - - if cxx.like('gcc'): - if cxx.target.platform != 'windows': - if cxx.version >= 'gcc-8.0' or cxx.version >= 'clang-5.0': - cxx.cxxflags += ['-std=c++17'] - else: - cxx.cxxflags += ['-std=c++14'] - - cxx.defines += [ - 'stricmp=strcasecmp', - '_stricmp=strcasecmp', - '_snprintf=snprintf', - '_vsnprintf=vsnprintf', - ] - cxx.linkflags += ['-lpthread'] - if cxx.target.platform != 'mac': - cxx.linkflags += ['-lrt'] - else: - cxx.cxxflags += [ - '-std=c++14', - '-fms-compatibility-version=19', - ] - - cxx.cflags += [ - '-pipe', - '-Wall', - '-Werror', - ] - - cxx.cflags += ['-fvisibility=hidden'] - cxx.cxxflags += ['-fvisibility-inlines-hidden'] - # -Wunused-function breaks test_flags.cpp - cxx.cxxflags += ['-Wno-unused-function'] - if cxx.like('clang'): - cxx.cxxflags += ['-Wno-implicit-exception-spec-mismatch'] - elif cxx.like('gcc'): - cxx.cxxflags += ['-Wformat-truncation=0'] - - cxx.cxxflags += [ - '-fno-exceptions', - '-fno-threadsafe-statics', - ] - - cxx.cflags += ['-mfpmath=sse'] - elif cxx.like('msvc'): - if builder.options.debug == '1': - cxx.cflags += ['/MTd'] - cxx.linkflags += ['/NODEFAULTLIB:libcmt'] - else: - cxx.cflags += ['/MT'] - cxx.defines += [ - '_CRT_SECURE_NO_DEPRECATE', - '_CRT_SECURE_NO_WARNINGS', - '_CRT_NONSTDC_NO_DEPRECATE', - '_ITERATOR_DEBUG_LEVEL=0', - ] - cxx.cflags += [ - '/W3', - ] - cxx.cxxflags += [ - '/EHsc', - '/GR-', - '/TP', - ] - cxx.linkflags += [ - '/MACHINE:X86', - 'kernel32.lib', - 'user32.lib', - 'gdi32.lib', - 'winspool.lib', - 'comdlg32.lib', - 'advapi32.lib', - 'shell32.lib', - 'ole32.lib', - 'oleaut32.lib', - 'uuid.lib', - 'odbc32.lib', - 'odbccp32.lib', - ] - - # Optimization - if builder.options.opt == '1': - cxx.defines += ['NDEBUG'] - if cxx.like('gcc'): - cxx.cflags += ['-O3'] - elif cxx.like('msvc'): - cxx.cflags += ['/Ox'] - cxx.linkflags += ['/OPT:ICF', '/OPT:REF'] - - # Debugging - if builder.options.debug == '1': - cxx.defines += ['DEBUG', '_DEBUG'] - if cxx.like('msvc'): - cxx.cflags += ['/Od', '/RTC1'] - if cxx.version >= 1600: - cxx.cflags += ['/d2Zi+'] - - # This needs to be after our optimization flags which could otherwise disable it. - if cxx.like('msvc'): - # Don't omit the frame pointer. - cxx.cflags += ['/Oy-'] - - # Platform-specifics - if cxx.target.platform == 'linux': - cxx.defines += ['_LINUX', 'POSIX'] - if cxx.like('gcc'): - cxx.linkflags += ['-static-libgcc'] - elif cxx.like('clang'): - cxx.linkflags += ['-lgcc_eh'] - elif cxx.target.platform == 'mac': - cxx.defines += ['OSX', '_OSX', 'POSIX'] - cxx.cflags += ['-mmacosx-version-min=10.7'] - cxx.linkflags += [ - '-mmacosx-version-min=10.7', - '-lstdc++', - '-stdlib=libc++', - ] - cxx.cxxflags += ['-stdlib=libc++'] - elif cxx.target.platform == 'windows': - cxx.defines += ['WIN32', '_WINDOWS'] - - def Program(self, context, name): - compiler = context.cxx.clone() - binary = compiler.Program(name) - return binary - - def StaticLibrary(self, context, name): - compiler = context.cxx.clone() - binary = compiler.StaticLibrary(name) - return binary - -KE = KEConfig() -KE.configure() - -KE.libamtl = builder.Build('amtl/AMBuilder', { - 'Configure': lambda builder, name: KE.StaticLibrary(builder, name), -}) -KE.libamtl = KE.libamtl.binary - -builder.Build( - [ - 'tests/AMBuild.tests', - ], - { - 'KE': KE, - } -) diff --git a/metamod-source/third_party/amtl/README.md b/metamod-source/third_party/amtl/README.md deleted file mode 100644 index 76f95715..00000000 --- a/metamod-source/third_party/amtl/README.md +++ /dev/null @@ -1,271 +0,0 @@ -The AlliedModders Template Library is a small set of C++ headers. It aims to be lightweight, -supporting a minimalistic set of abstractions and data structures useful for high-performance C++ -systems code. It is the spiritual successor to the SourceHook template library. - -AMBuild currently requires C++11 support. The minimum supported compiler versions are: - - Microsoft Visual Studio 2015 or higher. - - Clang 3.5 or higher. - - GNU GCC 4.9 or higher. - -To build tests, C++14 or higher is required (on macOS, the minimum version is OS X 10.9). - -Specifically, it requires `nullptr`, `>>` support in templates, r-value references v2.0, -(N2844), lambda support, and the override/delete keywords. The older, deprecated `C++98` -branch of AMTL does not require C++11. - -# Goals - -* Performance Over Generality. Rather than accomodate every use case, AMTL strives to make - performance explicit, and does not include features which are dangerous for performance, or - features that make malloc() failure detection more difficult. - - For example, while STL provides copy constructors for most containers, AMTL does not, as these - operations are unsafe for fallible malloc(), and can cause large unintentional performance hits. - - Another example is boost::shared\_ptr, which by default is atomic and threadsafe, and - preprocessor macros can be used to eliminate the thread safety option. AMTL opts to use distinct - types for threadsafe and non-threadsafe reference counting, as the cost of atomic refcounting - is higher. - -* Safety. Most code in AlliedModders does not take advantage of RAII, and does not account for - fallible malloc. While in general, infallible malloc is probably okay for game servers, the lack - of RAII leads to very complicated and bloated pointer management. A major goal of AMTL is to - introduce safer pointer management into its codebases, and to allow certain components to safely - handle malloc failures when desired. - -* No linkage. Everything is contained within headers so that tools don't need to link additional - C++ files. This could be a drawback, for example, it could increase build time or codesize - bloat. We may evaluate this decision in the future, but for now, it fits into our "lightweight" - theme of usability. - - (On some platforms, system libraries may be needed for certain headers.) - -* No RTTI or EH. There are a few reasons for this: - + Both features require linkage to libstdc++. On Linux, this can cause problems with binary - distribution. - - + When using 32-bit Visual C++, try blocks are not zero-cost, as they are implemented using SEH. - -* Room to grow. These templates are intended to be a baseline of features needed for various - AlliedModders projects. They can and will grow as new features are needed, hopefully keeping the - above principles in mind. - -# Overview - -All classes and functions reside in a "ke" namespace, and all macros are prefixed with "KE\_". - -### Platform Utilities (am-utilities.h) - -This provides some common helper functions pretty much lumped together: -* Detectors for add or multiply overflow, useful for computing allocation sizes. -* Fast Log2/Floor2 functions (also known as bitscan or count zeroes). -* Integer alignment (useful for allocators or code generators). - -### Reference Counting (am-refcounting.h) - -Two classes are available to help other classes implement reference counting. They are Refcounted -and RefcountedThreadsafe. Both must be inherited recursively, for example: - - class MyObject : public Refcounted - -The object is instantiated with a reference count of 0, meaning it is illegal to call Release() -without first calling AddRef. - -A few RAII objects are provided for automatically retaining and releasing references: - -* RefPtr. Adds one reference upon construction and releases one reference on destruction. -* AdoptRef(T). If an object is returned with an implicit AddRef, not using RefPtr, then - it is necessary to AdoptRef() when assigning into a RefPtr. - -RefcountedThreadsafe provides the same accessors as Refcounted. However, the reference counting is -performed using atomic operations, so that two threads racing do not accidentally result in a wrong -reference count (since a read + write is not normally atomic). This does not make the actual object -threadsafe, rather, it makes it safe for multiple threads to mutate the reference count. - -### Allocator Policies (am-allocator-policies.h) - -ke::HashTable and ke::Vector are both parameterized on an "AllocPolicy". It is accessed whenever a -malloc(), free(), size overflow, or out-of-memory operation occurs. The default functionality of -SystemAllocatorPolicy is to abort the process on any failure, which can be changed by implementing -a new policy. As HashTable and Vector inherit from the AllocPolicy, it is possible to use custom -allocators without accessing static variables. - -### STL Helpers - -These are in `am-vector.h`, `am-deque.h`, etc. They contain helpers for working with STL data -structures, for example, by providing alternatives to `pop_back()` that can return the popped -value. - -### HashTable (am-hashtable.h) - -ke::HashTable is an open-addressing, linear-probing hash table. It is a bit more powerful than a -generic key -> value map as it is templated on a "policy", rather than keys and values. A policy -specifies what entries in the table look like, and how they are searched. Policies must have three -members: - -* Payload - the type that will be stored for each entry in the hash table. -* static bool matches(const T &t, Payload &p); - Must return true if |t| is equal to the entry at |p|. -* static uin32\_t hash(const T &t); - Must compute a hash for |t|. - -The typename T in the policy applies for every key type that will be used in the hash table. For -example, a hash table might store string keys, but have faster lookup using std::string versus a -C-string, or even faster lookup for a string type that has its hash precomputed. - -All key types must effectively compute the same hash; i.e., it would not be legal for Payload to -match both |int| and |std::string| but compute different hashes. - -HashTable returns either a Result or Insert object when performing lookups, depending on the type -of lookup. A Result object is either found or not found. An Insert object, however, caches -information about where it found the object, so that it doesn't have to repeat the hashing and -lookup process for the subsequent add() call. Examples on how to use this are in am-hashmap.h, and -the exact rules on how Result and Insert objects can be used are in am-hashtable.h. - -HashTables can be iterated. If the table is mutated during iteration outside of the interface -provided by the iterator, then the iterator may become corrupted. This is acceptable as long as the -iterator is abandoned. However, the table must stay alive for as long as the iterator is active. - -### Functions and Lambdas (am-function.h) - -AMTL provides a replacement for `std::function`. `ke::Function` is roughly identical -to `std::function` in that it represents any callable object of a given signature. It can hold a -functor, C-style static function, a C++11-lambda, or any other callable object. - -Note that this makes `Function` polymorphic: its size and implementation are not known until it is -constructed or assigned. This means it must store a locally owned copy of the given callable value. -If copy constructed or copy assigned, `Function` will deep-copy the object into its local copy. If -move constructed or move assigned, `Function` will still allocate a local copy, but it will be -constructed using move semantics. GCC/Clang support moving a C++11 lambda (MSVC versions prior to -2015 will copy lambdas even if moved). - -Having `Function` allocate an object with `new` is obviously not desirable for most use cases. AMTL -tries to mitigate this in two ways. First, small callable objects (most lambdas and any C-style -static function pointer) will be stored in an inline buffer. This buffer is currently three -machine words (12 bytes on 32-bit systems and 24 bytes on 64-bit systems), and is specified in -`ke::impl::kMinLambdaInlineBufferSize`. Using callable objects within this size will guarantee -that `Function` does not use `new`. - -Note that like `std::function`, all captures must be copy-constructable. This means it cannot hold -functions which capture an `std::unique_ptr` or a `ke::Vector`, for example, even if it is to be -moved. You can work around this by using pointers (if the scope will allow it), or using -`std::shared_ptr`. - -### HashMap (am-hashmap.h) - -ke::HashMap is a key -> value map built upon HashTable. This saves you from having to implement all -of a Policy and provides some more generic accessors. However it is still necessary to implement a -hash and comparison function. - -### HashSet (am-hashset.h) - -ke::HashSet is a HashMap that only stores keys. Like HashMap, you must still implement a policy -with comparison and hash functions. - -### InlineList (am-inlinelist.h) - -InlineList is a doubly-linked list that does not use any calls to malloc(), with the caveat that -list members can be members in at most one inline list at a time. Objects must recursively inherit -from InlineListNode, which ensures that the object has prev/next pointers. Example: - - class MyObject : public InlineListNode - { }; - InlineList list; - -InlineList is ideal for situations where objects have already been allocated and will be a member -of at most one list at any time. If this is the case, the per-node malloc/free of std::list can be -completely avoided. - -An InlineList never claims ownership over its pointers. Its destructor is a no-op and it makes no -attempt to destroy members of its list (though in debug builds it will unlink members in its -destructor for assertion purposes). - -### LinkedList (am-linkedlist.h) - -LinkedList is a doubly-linked list that requires a malloc() for each entry. It is provided for -backward compatibility, and it should be avoided in general, except in situations where it is -absolutely necessary and allocation performance is not a factor. Otherwise, use InlineList or -Vector. - -### FixedArray (am-fixedarray.h) - -FixedArray<T, AP> is a stripped-down version of Vector that is constructed with a fixed -length. The length is passed via the constructor; a compile-time length variant is planned. - -### Flags (am-flags.h) - -`Flags` is a container class for a scoped enum type (that is, an enum declared as `enum class`). -It is meant to be used in addition to (or as a replacement of) `KE_DEFINE_ENUM_OPERATORS`. It is -designed for enums where each member is a bit or bitmask. Flags provides type-safe bitwise -operations, and most importantly, an implicit cast-to-bool operator which is not allowed for -normal C++ enumerations. - -### args::Parser (experimental/am-argparser.h) - -This is currently experimental. It is a command-line argv parser similar to Python's argparse -library. It is designed to handle a few basic cases and will be expanded as needed. Examples -of how to use it are in test-argparse.cpp. - -### Link Helpers - -- `compat/stdcxx.cpp` can be included on Linux builds to work around highly idiosyncratic libstdc++ - behavior when distributing libstdc++ based binaries. - -# Replacing SourceHook Includes - -AMTL is a spiritual successor to the SourceHook template library, used in many AlliedModders -projects. AMTL is intended to deprecate it. - -### CVector (sh\_vector.h) - -CVector can be replaced with ke::Vector. ke::Vector does not provide an iterator (yet). A few -method names have been changed, as CVector more closely models std::vector, however the classes are -pretty similar. Any missing methods could be added quite easily. - -### String (sh\_string.h) - -String can be replaced with std::string. - -### List (sh\_list.h) - -List can be replaced with ke::LinkedList. A few methods have changed, similar to Vector. For -example, push\_back() becomes append() and push\_front() becomes prepend(), and both return -boolean. - -Consider using ke::InlineList if your list contains already-allocated objects, and those objects -are members of at most one list. LinkedList is inefficient as it will call malloc() and free() for -each node. - -The implementation of SourceHook::List and ke::LinkedList are basically identical underneath the -hood, however, copy construction and assignment are disallowed in the AMTL variant. - -### THash (sh\_tinyhash.h) - -TinyHash can be replaced with ke::HashMap, with minor changes. Comparators must be implemented as -equality operators on the key type, and the hash function is specified as a template parameter. - -TinyHash is disadvantageous for a number of reasons. It uses separate chaining, and chains are -built on top of SourceHook::List, so it will use more memory on average. Inserts are also more -expensive as a call to malloc() is almost guaranteed. Retrieval is more expensive as well, since it -requires more indirection and has worse cache locality. It also has no ability to resize table -downward when its density is very low. - -### CStack (sh\_stack.h) - -SourceHook::CStack is a stable-pointer stack. That is, if an element has been pushed, the address -the element is stored at is guaranteed not to change unless the element is removed. This can be an -important requirement in cases that involve re-entrancy. If you are relying on this feature of -CStack, there is no replacement in AMTL. If your CStack entries are LIFO, and tied to local -variables, you might consider simply linking objects together using RAII and avoiding CStack -entirely (though CStack will have better cache performance if you need to walk the list of entries). - -If you don't need stable pointers, CStack can be replaced with ke::Vector. - -# Compile-Time Options - -- `KE_ALLOW_STD_CXX` - In some cases, STL is implemented using compiler intrinsics, and therefore - certain features are not possible to implement without using STL. An example of this would be - std::underlying\_type. AMTL will try to use an intrinsic if available, but if for some reason - it does not work, you can enable the STL version with this macro. - -# License - -All headers are licensed under a 3-clause BSD license. diff --git a/metamod-source/third_party/amtl/amtl/AMBuilder b/metamod-source/third_party/amtl/amtl/AMBuilder deleted file mode 100644 index a949adb6..00000000 --- a/metamod-source/third_party/amtl/amtl/AMBuilder +++ /dev/null @@ -1,32 +0,0 @@ -# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python: -# -# Copyright (C) 2004-2012 David Anderson -# -# This file is part of SourcePawn. -# -# SourcePawn is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# SourcePawn is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# SourcePawn. If not, see http://www.gnu.org/licenses/. -# -import os - -binary = Configure(builder, 'libamtl') - -amtl_path = os.path.join(builder.sourcePath, builder.sourceFolder, '..') - -binary.compiler.includes += [ - amtl_path, -] -binary.sources += [ - 'experimental/am-argparser.cpp', -] - -rvalue = builder.Add(binary) diff --git a/metamod-source/third_party/amtl/amtl/am-allocator-policies.h b/metamod-source/third_party/amtl/amtl/am-allocator-policies.h deleted file mode 100644 index e53a63e4..00000000 --- a/metamod-source/third_party/amtl/amtl/am-allocator-policies.h +++ /dev/null @@ -1,73 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_allocatorpolicies_h_ -#define _include_amtl_allocatorpolicies_h_ - -#include -#include - -namespace ke { - -// The default system allocator policy will crash on out-of-memory. -class SystemAllocatorPolicy -{ - public: - void reportOutOfMemory() { - fprintf(stderr, "OUT OF MEMORY\n"); - abort(); - } - void reportAllocationOverflow() { - fprintf(stderr, "OUT OF MEMORY\n"); - abort(); - } - - public: - void am_free(void* memory) { -#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) - free(memory); -#else - ::free(memory); -#endif - } - void* am_malloc(size_t bytes) { -#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) - void* ptr = malloc(bytes); -#else - void* ptr = ::malloc(bytes); -#endif - if (!ptr) - reportOutOfMemory(); - return ptr; - } -}; - -} // namespace ke - -#endif // _include_amtl_allocatorpolicies_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-arithmetic.h b/metamod-source/third_party/amtl/amtl/am-arithmetic.h deleted file mode 100644 index 45ced6eb..00000000 --- a/metamod-source/third_party/amtl/amtl/am-arithmetic.h +++ /dev/null @@ -1,67 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2014, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_bits_h_ -#define _include_amtl_bits_h_ - -#include - -namespace ke { - -static inline bool -TryUint64Multiply(uint64_t left, uint64_t right, uint64_t* out) -{ - uint64_t r = left * right; - if (r != 0 && ((r / left) != right)) - return false; - - *out = r; - return true; -} - -static inline bool -TryUint32Add(uint32_t left, uint32_t right, uint32_t* out) -{ - if (left + right < std::max(left, right)) - return false; - *out = left + right; - return true; -} - -static inline bool -TryUint64Add(uint64_t left, uint64_t right, uint64_t* out) -{ - if (left + right < std::max(left, right)) - return false; - *out = left + right; - return true; -} - -} // namespace ke - -#endif // _include_amtl_bits_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-assert.h b/metamod-source/third_party/amtl/amtl/am-assert.h deleted file mode 100644 index 4b5525d0..00000000 --- a/metamod-source/third_party/amtl/amtl/am-assert.h +++ /dev/null @@ -1,46 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2014, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_assert_h_ -#define _include_amtl_assert_h_ - -#include -#include - -#if !defined(NDEBUG) -# define KE_RELEASE_ASSERT assert -#else -# define KE_RELEASE_ASSERT(cond) \ - do { \ - if (!(cond)) \ - abort(); \ - } while (0) -#endif - -#endif // _include_amtl_assert_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-bits.h b/metamod-source/third_party/amtl/amtl/am-bits.h deleted file mode 100644 index 72fd00ed..00000000 --- a/metamod-source/third_party/amtl/amtl/am-bits.h +++ /dev/null @@ -1,257 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2014, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_am_bits_h_ -#define _include_amtl_am_bits_h_ - -#include -#include -#include -#if defined(_MSC_VER) -# include -#endif - -#include -#include - -#include -#include - -namespace ke { - -#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__) -static const size_t kMallocAlignment = __STDCPP_DEFAULT_NEW_ALIGNMENT__; -#elif defined(KE_CXX_MSVC) -static const size_t kMallocAlignment = 16; -#else -static const size_t kMallocAlignment = std::max(static_cast(alignof(std::max_align_t)), - static_cast(16)); -#endif - -static const size_t kKB = 1024; -static const size_t kMB = 1024 * kKB; -static const size_t kGB = 1024 * kMB; - -#if defined(_MSC_VER) -template -static uint32_t Log2(T value); - -template <> -inline uint32_t -Log2(uint32_t number) { - assert(number != 0); - - unsigned long rval; - _BitScanReverse(&rval, number); - return rval; -} - -template <> -inline uint32_t -Log2(uint64_t number) { - assert(number != 0); - - unsigned long rval; -# if defined(_M_X64) - _BitScanReverse64(&rval, number); -# else - if (number > uint32_t(0xFFFFFFFF)) { - _BitScanReverse(&rval, uint32_t(number >> 32)); - rval += 32; - } else { - _BitScanReverse(&rval, uint32_t(number)); - } -# endif - return rval; -} -#else -static inline size_t -Log2(size_t number) -{ - assert(number != 0); - -# ifdef __GNUC__ - return 31 - __builtin_clz(number); -# else - size_t bit; - asm("bsr %1, %0\n" : "=r"(bit) : "rm"(number)); - return bit; -# endif -} -#endif - -static inline uint32_t -FindLeftmostBit32(uint32_t number) -{ - assert(number != 0); - -#ifdef _MSC_VER - unsigned long rval; - _BitScanReverse(&rval, number); - return rval; -#elif __GNUC__ - return 31 - __builtin_clz(number); -#endif -} - -static inline uint32_t -FindLeftmostBit64(uint64_t number) -{ - assert(number != 0); - -#ifdef _MSC_VER -# if defined(_M_IX86) || defined(_M_ARM) - uint64_t temp = number >> 32; - if (temp) - return 32 + FindLeftmostBit32(static_cast(temp)); - return FindLeftmostBit32(static_cast(number & 0xffffffff)); -# elif defined(_M_X64) || defined(_M_ARM64) - unsigned long rval; - _BitScanReverse64(&rval, number); - return rval; -# endif // _M_arch -#elif __GNUC__ - return 63 - __builtin_clzl(number); -# endif -} - -static inline size_t -FindRightmostBit(size_t number) -{ - assert(number != 0); - -#ifdef _MSC_VER - unsigned long rval; -# if defined(_M_IX86) || defined(_M_ARM) - _BitScanForward(&rval, number); -# elif defined(_M_X64) || defined(_M_ARM64) - _BitScanForward64(&rval, number); -# endif - return rval; -#elif __GNUC__ -# ifdef __LP64__ - return __builtin_ctzl(number); -# else - return __builtin_ctz(number); -# endif -#endif -} - -static inline bool -IsPowerOfTwo(size_t value) -{ - if (value == 0) - return false; - return !(value & (value - 1)); -} - -static inline size_t -Align(size_t count, size_t alignment) -{ - assert(IsPowerOfTwo(alignment)); - return count + (alignment - (count % alignment)) % alignment; -} - -template -static inline bool -IsUintAddSafe(const T& a, const T& b) -{ - if (!a || !b) - return true; - size_t log2_a = Log2(a); - size_t log2_b = Log2(b); - return (log2_a < sizeof(T) * 8) && (log2_b < sizeof(T) * 8); -} - -static inline bool -IsUint32AddSafe(unsigned a, unsigned b) -{ - return IsUintAddSafe(a, b); -} - -static inline bool -IsUint64AddSafe(uint64_t a, uint64_t b) -{ - return IsUintAddSafe(a, b); -} - -static inline bool -IsUintPtrAddSafe(size_t a, size_t b) -{ - return IsUintAddSafe(a, b); -} - -template -static inline bool -IsUintMultiplySafe(const T& a, const T& b) -{ - if (a <= 1 || b <= 1) - return true; - - size_t log2_a = Log2(a); - size_t log2_b = Log2(b); - return log2_a + log2_b < sizeof(T) * 8; -} - -static inline bool -IsUint32MultiplySafe(unsigned a, unsigned b) -{ - return IsUintMultiplySafe(a, b); -} - -static inline bool -IsUint64MultiplySafe(uint64_t a, uint64_t b) -{ - return IsUintMultiplySafe(a, b); -} - -static inline bool -IsUintPtrMultiplySafe(size_t a, size_t b) -{ - return IsUintMultiplySafe(a, b); -} - -template -static inline bool -IsAligned(T addr, size_t alignment) -{ - assert(IsPowerOfTwo(alignment)); - return !(uintptr_t(addr) & (alignment - 1)); -} - -static inline void* -AlignedBase(void* addr, size_t alignment) -{ - assert(IsPowerOfTwo(alignment)); - return reinterpret_cast(uintptr_t(addr) & ~(alignment - 1)); -} - -} // namespace ke - -#endif // _include_amtl_am_bits_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-cxx.h b/metamod-source/third_party/amtl/amtl/am-cxx.h deleted file mode 100644 index 3240610c..00000000 --- a/metamod-source/third_party/amtl/amtl/am-cxx.h +++ /dev/null @@ -1,104 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2014, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_cxx_support_h_ -#define _include_amtl_cxx_support_h_ - -#if defined(__clang__) -# if !(defined(__clang_major__) && defined(__clang_minor__)) -# define KE_CLANG_MAJOR 1 -# define KE_CLANG_MINOR __GNUC_MINOR__ -# else -# if defined(__apple_build_version__) && clang_major__ > 3 -// 4.0 => 3.1, 4.1 => 3.2 -# if __clang_major__ == 4 -# define KE_CLANG_MAJOR 3 -# if __clang_minor__ == 0 -# define KE_CLANG_MINOR 1 -# else -# define KE_CLANG_MINOR 2 -# endif -// 5.0 => 3.3, 5.1 => 3.4 -# elif __clang_major__ == 5 -# define KE_CLANG_MAJOR 3 -# if __clang_minor__ == 0 -# define KE_CLANG_MINOR 3 -# else -# define KE_CLANG_MINOR 4 -# endif -# elif __clang_major__ == 6 -# define KE_CLANG_MAJOR 3 -# define KE_CLANG_MINOR 5 -# endif -# endif -# if !defined(KE_CLANG_MAJOR) -# define KE_CLANG_MAJOR __clang_major__ -# endif -# if !defined(KE_CLANG_MINOR) -# define KE_CLANG_MINOR __clang_minor__ -# endif -# endif - -// Done with horrible clang version detection. -# define KE_CLANG_AT_LEAST(x, y) \ - ((__clang_major__ > (x)) || (__clang_major__ == x && __clang_minor__ >= y)) - -# if !KE_CLANG_AT_LEAST(3, 4) -# error "AMTL requires clang 3.4 or higher" -# endif - -#elif defined(__GNUC__) -# define KE_GCC_AT_LEAST(x, y) ((__GNUC__ > (x)) || (__GNUC__ == x && __GNUC_MINOR__ >= y)) - -# if !KE_GCC_AT_LEAST(4, 9) -# error "AMTL requires GCC 4.9 or higher" -# endif - -#elif defined(_MSC_VER) -# if _MSC_VER < 1900 -# error "AMTL requires Microsoft Visual Studio 2015 or higher" -# endif -#else -# error "Unrecognized compiler." -#endif - -// Done with compiler feature detection. - -#if defined(_MSC_VER) -// This feature has been around for long enough that we shouldn't have to -// warn for it. -# pragma warning(disable : 4351) -#endif - -#if defined(_MSC_VER) -# define KE_LINKONCE(x) __declspec(selectany) x -#else -# define KE_LINKONCE(x) x __attribute__((weak)) -#endif - -#endif // _include_amtl_cxx_support_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-deque.h b/metamod-source/third_party/amtl/amtl/am-deque.h deleted file mode 100644 index 8954441f..00000000 --- a/metamod-source/third_party/amtl/amtl/am-deque.h +++ /dev/null @@ -1,49 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2014, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#pragma once - -#include - -namespace ke { - -template -static inline T PopBack(std::deque* deque) { - T t = std::move(deque->back()); - deque->pop_back(); - return t; -} - -template -static inline T PopFront(std::deque* deque) { - T t = std::move(deque->front()); - deque->pop_front(); - return t; -} - -} // namespace ke diff --git a/metamod-source/third_party/amtl/amtl/am-enum.h b/metamod-source/third_party/amtl/amtl/am-enum.h deleted file mode 100644 index 8c8aa3b1..00000000 --- a/metamod-source/third_party/amtl/amtl/am-enum.h +++ /dev/null @@ -1,92 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2014, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_enum_h_ -#define _include_amtl_enum_h_ - -#ifdef KE_ALLOW_STD_CXX -# include -#endif - -namespace ke { -template -struct enum_integral_type { -#ifdef KE_ALLOW_STD_CXX - using type = std::underlying_type::type; -#else - using type = __underlying_type(T); -#endif -}; -} // namespace ke - -#define KE_DEFINE_ENUM_OPERATORS(EnumName) \ - static inline EnumName operator|(const EnumName& left, const EnumName& right) { \ - typedef ke::enum_integral_type::type int_type; \ - return EnumName(int_type(left) | int_type(right)); \ - } \ - static inline EnumName operator&(const EnumName& left, const EnumName& right) { \ - typedef ke::enum_integral_type::type int_type; \ - return EnumName(int_type(left) & int_type(right)); \ - } \ - static inline EnumName operator^(const EnumName& left, const EnumName& right) { \ - typedef ke::enum_integral_type::type int_type; \ - return EnumName(int_type(left) ^ int_type(right)); \ - } \ - static inline EnumName operator~(const EnumName& flags) { \ - typedef ke::enum_integral_type::type int_type; \ - return EnumName(~int_type(flags)); \ - } \ - static inline EnumName& operator|=(EnumName& left, const EnumName& right) { \ - return left = left | right; \ - } \ - static inline EnumName& operator&=(EnumName& left, const EnumName& right) { \ - return left = left & right; \ - } \ - static inline EnumName& operator^=(EnumName& left, const EnumName& right) { \ - return left = left ^ right; \ - } \ - static inline bool operator!(const EnumName& obj) { \ - typedef ke::enum_integral_type::type int_type; \ - return int_type(obj) == 0; \ - } - -#define KE_DEFINE_ENUM_COMPARATORS(EnumName, Type) \ - static inline bool operator==(const EnumName& left, const Type& right) { \ - return Type(left) == right; \ - } \ - static inline bool operator==(const Type& left, const EnumName& right) { \ - return left == Type(right); \ - } \ - static inline bool operator!=(const EnumName& left, const Type& right) { \ - return Type(left) != right; \ - } \ - static inline bool operator!=(const Type& left, const EnumName& right) { \ - return left != Type(right); \ - } - -#endif // _include_amtl_enum_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-fixedarray.h b/metamod-source/third_party/amtl/amtl/am-fixedarray.h deleted file mode 100644 index 56bdc8a7..00000000 --- a/metamod-source/third_party/amtl/amtl/am-fixedarray.h +++ /dev/null @@ -1,166 +0,0 @@ -// vim: set sts=8 ts=4 sw=4 tw=99 et: -// -// Copyright (C) 2013-2014, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_fixedarray_h_ -#define _include_amtl_fixedarray_h_ - -#include - -#include - -#include - -namespace ke { - -template -class FixedArray : private AllocPolicy -{ - public: - FixedArray() : size_(0), data_(nullptr) - {} - FixedArray(size_t size, AllocPolicy = AllocPolicy()) { - if (!allocate(size)) - return; - for (size_t i = 0; i < size_; i++) - new (&data_[i]) T(); - } - FixedArray(const FixedArray& other) { - if (!allocate(other.size())) - return; - for (size_t i = 0; i < size_; i++) - new (&data_[i]) T(other[i]); - } - - FixedArray(FixedArray&& other) { - size_ = other.size_; - data_ = other.data_; - other.size_ = 0; - other.data_ = nullptr; - } - - template > - explicit FixedArray(const std::vector& other) { - if (!allocate(other.size())) - return; - - for (size_t i = 0; i < size_; i++) - new (&data_[i]) T(other[i]); - } - - template > - explicit FixedArray(std::vector&& other) { - if (!allocate(other.size())) - return; - - for (size_t i = 0; i < size_; i++) - new (&data_[i]) T(std::move(other[i])); - } - - ~FixedArray() { - destruct(); - deallocate(); - } - - // This call may be skipped if the allocator policy is infallible. - bool initialize() { - return size_ == 0 || !!data_; - } - - size_t size() const { - return size_; - } - T& operator [](size_t index) { - return at(index); - } - const T& operator [](size_t index) const { - return at(index); - } - T& at(size_t index) { - assert(index < size()); - return data_[index]; - } - const T& at(size_t index) const { - assert(index < size()); - return data_[index]; - } - T& back() { - assert(size() > 0); - return data_[size() - 1]; - } - const T& back() const { - assert(size() > 0); - return data_[size() - 1]; - } - T* begin() { return data_; } - T* end() { return data_ + size_; } - const T* begin() const { return data_; } - const T* end() const { return data_ + size_; } - bool empty() const { return size_ == 0; } - T* buffer() const { return data_; } - - FixedArray& operator =(const FixedArray& other) { - destruct(); - if (size_ != other.size()) { - deallocate(); - if (!allocate(other.size())) - return *this; - } - for (size_t i = 0; i < size_; i++) - new (&data_[i]) T(other[i]); - return *this; - } - FixedArray& operator =(FixedArray&& other) { - size_ = other.size_; - data_ = other.data_; - other.size_ = 0; - other.data_ = nullptr; - return *this; - } - - private: - bool allocate(size_t size) { - size_ = size; - data_ = (T*)this->am_malloc(sizeof(T) * size_); - return !!data_; - } - void destruct() { - for (size_t i = 0; i < size_; i++) - data_[i].~T(); - } - void deallocate() { - this->am_free(data_); - } - - private: - size_t size_; - T* data_; -}; - -} // namespace ke - -#endif // _include_amtl_fixedarray_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-flags.h b/metamod-source/third_party/amtl/amtl/am-flags.h deleted file mode 100644 index 554098d5..00000000 --- a/metamod-source/third_party/amtl/amtl/am-flags.h +++ /dev/null @@ -1,129 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2014, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_flags_h_ -#define _include_amtl_flags_h_ - -#include - -namespace ke { - -// This is a wrapper intended for use with typed/scoped enums in C++11. Since -// enum classes cannot be implicitly converted to bool, it makes patterns like -// |if (x & y)| possible without !!. -// -// Note that we explicitly don't expose an operator T here, since it creates -// ambiguous operator overloads if using KE_DEFINE_ENUM_OPERATORS. -template -class Flags -{ - public: - Flags() - : value_(static_cast(0)) - {} - - // Note: these are not explicit since we want operators below to support - // both Flags and the underlying T type. - Flags(const T& t) - : value_(t) - {} - Flags(const Flags& other) - : value_(other.value_) - {} - - using IntType = typename enum_integral_type::type; - - explicit operator bool() const { - return value_ != static_cast(0); - } - bool operator !() const { - return value_ == static_cast(0); - } - - IntType bits() const { - return static_cast(value_); - } - T get() const { - return value_; - } - - Flags operator +(const Flags& other) const { - return Flags(static_cast(bits() | other.bits())); - } - Flags operator -(const Flags& other) const { - return Flags(static_cast(bits() & (bits() ^ other.bits()))); - } - Flags operator |(const Flags& other) const { - return Flags(static_cast(bits() | other.bits())); - } - Flags operator &(const Flags& other) const { - return Flags(static_cast(bits() & other.bits())); - } - Flags operator ^(const Flags& other) const { - return Flags(static_cast(bits() ^ other.bits())); - } - bool operator ==(const Flags& other) const { - return value_ == other.value_; - } - bool operator !=(const Flags& other) const { - return value_ != other.value_; - } - - Flags& operator +=(const Flags& other) { - *this = *this + other; - return *this; - } - Flags& operator -=(const Flags& other) { - *this = *this - other; - return *this; - } - Flags& operator |=(const Flags& other) { - *this = *this | other; - return *this; - } - Flags& operator &=(const Flags& other) { - *this = *this & other; - return *this; - } - Flags& operator ^=(const Flags& other) { - *this = *this ^ other; - return *this; - } - - Flags& operator =(const Flags& other) { - value_ = other.value_; - return *this; - } - - private: - T value_; -}; - -} // namespace ke - -#endif // _include_amtl_flags_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-float.h b/metamod-source/third_party/amtl/amtl/am-float.h deleted file mode 100644 index 1adc865c..00000000 --- a/metamod-source/third_party/amtl/amtl/am-float.h +++ /dev/null @@ -1,139 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_float_h_ -#define _include_amtl_float_h_ - -#include - -#include -#include - -namespace ke { - -static const uint32_t kFloat32ExponentMask = 0x7F800000; -static const uint64_t kFloat64ExponentMask = 0x7FFF000000000000ULL; - -struct float32_bits { - static const uint32_t kExponentMask = kFloat32ExponentMask; - - typedef uint32_t Bits; - - union layout { - uint32_t bits; - float value; - }; - - static layout to_layout(float value) { - layout impl; - impl.value = value; - return impl; - } -}; - -struct float64_bits { - static const uint64_t kExponentMask = kFloat64ExponentMask; - - typedef uint64_t Bits; - - union layout { - uint64_t bits; - float value; - }; - - static layout to_layout(float value) { - layout impl; - impl.value = value; - return impl; - } -}; - -template -struct float_bits; -template <> -struct float_bits : public float32_bits {}; -template <> -struct float_bits : public float64_bits {}; - -template -static inline bool -IsNaN(T v) -{ -#ifdef _MSC_VER - return !!_isnan(v); -#else - return std::isnan(v); -#endif -} - -template -static inline bool -IsInfinite(T value) -{ - typedef float_bits Properties; - typedef typename Properties::Bits Bits; - Bits bits = Properties::to_layout(value).bits; - return (bits & Properties::kExponentMask) == Properties::kExponentMask; -}; - -// Performs the operation (x % y) where x and y are floating-point values. -// -// To compute a floating point modulus, this function returns "r", where r -// satisfies the following equation: -// -// x = (I * y) + r -// -// Where I is an integer <= x, and r is a value less than y. If no such -// integer I exists, the result is NaN. -// -// If x or y are NaN, the result is NaN. -// If x is +/-Infinity, the result is NaN. -// If y is 0, the result is NaN (as a divide by zero is implied). -// -// If y is Infinity, then r = x (and I = 0). -// If x is +/-0, then r = +/-0. -template -static inline T -FloatModulo(T left, T right) -{ -#if defined(KE_WINDOWS) - // Windows fmod() does not follow the contract above, in that: - // 42 % Infinity => NaN, instead of 42, and - // -0 % -N => 0, instead of -0. - if ((!IsInfinite(left) && IsInfinite(right)) || (left == 0 && !IsInfinite(right))) { - return left; - } -#endif - - return fmod(left, right); -} - -} // namespace ke - -#endif // _include_amtl_float_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-function.h b/metamod-source/third_party/amtl/amtl/am-function.h deleted file mode 100644 index 6b266778..00000000 --- a/metamod-source/third_party/amtl/amtl/am-function.h +++ /dev/null @@ -1,222 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2015, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above cloneright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above cloneright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_function_h_ -#define _include_amtl_function_h_ - -#include -#include - -#include -#include - -namespace ke { - -namespace impl { -template -class FunctionHolderBase -{ - public: - virtual ~FunctionHolderBase() {} - virtual ReturnType invoke(ArgTypes&&... argv) const = 0; - virtual FunctionHolderBase* clone(void* mem) const = 0; - virtual FunctionHolderBase* move(void* mem) = 0; -}; - -template -class FunctionHolder : public FunctionHolderBase -{ - typedef FunctionHolderBase BaseType; - - public: - FunctionHolder(const FunctionHolder& other) - : obj_(other.obj_) - {} - FunctionHolder(FunctionHolder&& other) - : obj_(std::move(other.obj_)) - {} - FunctionHolder(const T& obj) - : obj_(obj) - {} - FunctionHolder(T&& obj) - : obj_(std::move(obj)) - {} - - virtual ~FunctionHolder() {} - virtual ReturnType invoke(ArgTypes&&... argv) const override { - return obj_(std::forward(argv)...); - } - virtual BaseType* clone(void* mem) const override { - if (!mem) - return new FunctionHolder(*this); - new (mem) FunctionHolder(*this); - return (BaseType*)mem; - } - virtual BaseType* move(void* mem) override { - new (mem) FunctionHolder(std::move(*this)); - return (BaseType*)mem; - } - - private: - T obj_; -}; - -static const size_t kMinFunctionInlineBufferSize = sizeof(void*) * 3; -} // namespace impl - -template -class Function; - -template -class Function -{ - typedef impl::FunctionHolderBase HolderType; - - public: - Function() - : impl_(nullptr) - {} - Function(decltype(nullptr)) - : impl_(nullptr) - {} - Function(const Function& other) { - assign(other); - } - Function(Function&& other) { - move(std::forward(other)); - } - - template - Function(T&& obj) { - assign(std::forward(obj)); - } - - ~Function() { - destroy(); - } - - Function& operator =(decltype(nullptr)) { - destroy(); - impl_ = nullptr; - return *this; - } - Function& operator =(const Function& other) { - destroy(); - assign(other); - return *this; - } - Function& operator =(Function&& other) { - destroy(); - move(std::move(other)); - return *this; - } - - template - Function& operator =(T&& other) { - destroy(); - assign(other); - return *this; - } - - explicit operator bool() const { - return !!impl_; - } - - ReturnType operator ()(ArgTypes... argv) const { - assert(impl_); - return impl_->invoke(std::forward(argv)...); - } - - bool usingInlineStorage() const { - return (void*)impl_ == &buffer_; - } - - private: - void destroy() { - if (!impl_) - return; - - if (usingInlineStorage()) - impl_->~HolderType(); - else - delete impl_; - } - void zap() { - destroy(); - impl_ = nullptr; - } - - void* inline_buffer() { - return &buffer_; - } - - void assign(const Function& other) { - if (!other) - impl_ = nullptr; - else if (other.usingInlineStorage()) - impl_ = other.impl_->clone(inline_buffer()); - else - impl_ = other.impl_->clone(nullptr); - } - - void move(Function&& other) { - if (!other) { - impl_ = nullptr; - } else if (other.usingInlineStorage()) { - impl_ = other.impl_->move(inline_buffer()); - other.zap(); - } else { - impl_ = other.impl_; - other.impl_ = nullptr; - } - } - - template - void assign(T&& obj) { - typedef typename std::decay::type CallableType; - typedef impl::FunctionHolder ImplType; - - if (sizeof(ImplType) <= sizeof(buffer_)) { - impl_ = reinterpret_cast(inline_buffer()); - new (inline_buffer()) ImplType(std::forward(obj)); - } else { - impl_ = new ImplType(std::forward(obj)); - } - } - - private: - HolderType* impl_; - union { - double alignment_; - char alias_[impl::kMinFunctionInlineBufferSize]; - } buffer_; -}; - -} // namespace ke - -#endif // _include_amtl_function_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-hashmap.h b/metamod-source/third_party/amtl/amtl/am-hashmap.h deleted file mode 100644 index 2f705bb0..00000000 --- a/metamod-source/third_party/amtl/amtl/am-hashmap.h +++ /dev/null @@ -1,188 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_hashmap_h_ -#define _include_amtl_hashmap_h_ - -#include - -#include - -namespace ke { - -// Template parameters: -// -// K - Key type. -// V - Value type. -// HashPolicy - A struct with a hash and comparator function for each lookup type: -// static uint32_t hash(const Type& value); -// static bool matches(const Type& value, const K& key); -// -// All types that match a given key, must compute the same hash. -// -// Note that like HashTable, a HashMap is not usable until init() has been called. -template -class HashMap : private AllocPolicy -{ - private: - struct Entry { - K key; - V value; - - Entry() { - } - Entry(const Entry& other) - : key(other.key), - value(other.value) - {} - Entry(Entry&& other) - : key(std::move(other.key)), - value(std::move(other.value)) - {} - - template - Entry(UK&& aKey, UV&& aValue) - : key(std::forward(aKey)), - value(std::forward(aValue)) - {} - }; - - struct Policy { - typedef Entry Payload; - - template - static uint32_t hash(const Lookup& key) { - return HashPolicy::hash(key); - } - - template - static bool matches(const Lookup& key, const Payload& payload) { - return HashPolicy::matches(key, payload.key); - } - }; - - typedef HashTable Internal; - - public: - explicit HashMap(AllocPolicy ap = AllocPolicy()) - : table_(ap) - {} - - HashMap(HashMap&& other) - : table_(std::move(other.table_)) - {} - - // capacity must be a power of two. - bool init(size_t capacity = 16) { - return table_.init(capacity); - } - - typedef typename Internal::Result Result; - typedef typename Internal::Insert Insert; - typedef typename Internal::iterator iterator; - - template - Result find(const Lookup& key) const { - return table_.find(key); - } - - template - Insert findForAdd(const Lookup& key) { - return table_.findForAdd(key); - } - - template - void removeIfExists(const Lookup& key) { - return table_.removeIfExists(key); - } - - void remove(Result& r) { - table_.remove(r); - } - - // The map must not have been mutated in between findForAdd() and add(). - // The Insert object is still valid after add() returns, however. - template - bool add(Insert& i, UK&& key, UV&& value) { - Entry entry(std::forward(key), std::forward(value)); - return table_.add(i, std::move(entry)); - } - template - bool add(Insert& i, UK&& key) { - Entry entry(std::forward(key), V()); - return table_.add(i, std::move(entry)); - } - - // This can be used to avoid compiler constructed temporaries, since AMTL - // does not yet support move semantics. If you use this, the key and value - // must be set after. - bool add(Insert& i) { - return table_.add(i); - } - - iterator iter() { - return iterator(&table_); - } - - void clear() { - table_.clear(); - } - - size_t elements() const { - return table_.elements(); - } - - size_t estimateMemoryUse() const { - return table_.estimateMemoryUse(); - } - - AllocPolicy& allocPolicy() { - return *this; - } - const AllocPolicy& allocPolicy() const { - return *this; - } - - private: - Internal table_; -}; - -template -struct PointerPolicy { - static inline uint32_t hash(T* p) { - return HashPointer(p); - } - static inline bool matches(T* p1, T* p2) { - return p1 == p2; - } -}; - -} // namespace ke - -#endif // _include_amtl_hashmap_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-hashset.h b/metamod-source/third_party/amtl/amtl/am-hashset.h deleted file mode 100644 index cbc90fcf..00000000 --- a/metamod-source/third_party/amtl/amtl/am-hashset.h +++ /dev/null @@ -1,161 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_hashset_h_ -#define _include_amtl_hashset_h_ - -#include - -#include - -namespace ke { - -// Template parameters: -// -// K - Key type. -// HashPolicy - A struct with a hash and comparator function for each lookup type: -// static uint32_t hash(const Type& value); -// static bool matches(const Type& value, const K& key); -// -// Like HashMap and HashTable, init() must be called to construct the set. -template -class HashSet : private AllocPolicy -{ - struct Policy { - typedef K Payload; - - template - static uint32_t hash(const Lookup& key) { - return HashPolicy::hash(key); - } - - template - static bool matches(const Lookup& key, const Payload& payload) { - return HashPolicy::matches(key, payload); - } - }; - - typedef HashTable Internal; - - public: - explicit HashSet(AllocPolicy ap = AllocPolicy()) - : table_(ap) - {} - - HashSet(HashSet&& other) - : table_(std::move(other.table_)) - {} - - // capacity must be a power of two. - bool init(size_t capacity = 16) { - return table_.init(capacity); - } - - typedef typename Internal::Result Result; - typedef typename Internal::Insert Insert; - typedef typename Internal::iterator iterator; - - template - Result find(const Lookup& key) { - return table_.find(key); - } - - template - Insert findForAdd(const Lookup& key) { - return table_.findForAdd(key); - } - - template - void removeIfExists(const Lookup& key) { - return table_.removeIfExists(key); - } - - void remove(Result& r) { - table_.remove(r); - } - - // The map must not have been mutated in between findForAdd() and add(). - // The Insert object is still valid after add() returns, however. - template - bool add(Insert& i, UK&& key) { - return table_.add(i, std::forward(key)); - } - - // This can be used to avoid compiler constructed temporaries, since AMTL - // does not yet support move semantics. If you use this, the key and value - // must be set after. - bool add(Insert& i) { - return table_.add(i); - } - - iterator iter() { - return iterator(&table_); - } - void clear() { - table_.clear(); - } - - size_t elements() const { - return table_.elements(); - } - - size_t estimateMemoryUse() const { - return table_.estimateMemoryUse(); - } - - // Convenience wrapper for find().found(). - template - bool has(const Lookup& key) { - Result r = table_.find(key); - return r.found(); - } - - // Convenience wrapper for findForAdd() + add(), if the item is not already - // in the set. - template - void add(UK&& key) { - Insert p = table_.findForAdd(key); - if (!p.found()) - table_.add(p, std::forward(key)); - } - - AllocPolicy& allocPolicy() { - return *this; - } - const AllocPolicy& allocPolicy() const { - return *this; - } - - private: - Internal table_; -}; - -} // namespace ke - -#endif // _include_amtl_hashset_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-hashtable.h b/metamod-source/third_party/amtl/amtl/am-hashtable.h deleted file mode 100644 index 487f3918..00000000 --- a/metamod-source/third_party/amtl/amtl/am-hashtable.h +++ /dev/null @@ -1,653 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _INCLUDE_KEIMA_HASHTABLE_H_ -#define _INCLUDE_KEIMA_HASHTABLE_H_ - -#include -#include - -#include -#include - -#include "amtl/am-allocator-policies.h" -#include "amtl/am-bits.h" - -namespace ke { - -namespace detail { -template -class HashTableEntry -{ - uint32_t hash_; - T t_; - - public: - static const uint32_t kFreeHash = 0; - static const uint32_t kRemovedHash = 1; - - public: - void setHash(uint32_t hash) { - hash_ = hash; - } - void construct() { - new (&t_) T(); - } - template - void construct(U&& u) { - new (&t_) T(std::forward(u)); - } - uint32_t hash() const { - return hash_; - } - void setRemoved() { - destruct(); - hash_ = kRemovedHash; - } - void setFree() { - destruct(); - hash_ = kFreeHash; - } - void initialize() { - hash_ = kFreeHash; - } - void destruct() { - if (isLive()) - t_.~T(); - } - bool removed() const { - return hash_ == kRemovedHash; - } - bool isFree() const { - return hash_ == kFreeHash; - } - bool isLive() const { - return hash_ > kRemovedHash; - } - T& payload() { - assert(isLive()); - return t_; - } - const T& payload() const { - assert(isLive()); - return t_; - } - bool sameHash(uint32_t hash) const { - return hash_ == hash; - } - - private: - HashTableEntry(const HashTableEntry& other) = delete; - HashTableEntry& operator =(const HashTableEntry& other) = delete; -}; -} // namespace detail - -// The HashPolicy for the table must have the following members: -// -// Payload -// static uint32_t hash(const LookupType& key); -// static bool matches(const LookupType& key, const Payload& other); -// -// Payload must be a type, and LookupType is any type that lookups will be -// performed with (these functions can be overloaded). Example: -// -// struct Policy { -// typedef KeyValuePair Payload; -// static uint32 hash(const Key& key) { -// ... -// } -// static bool matches(const Key& key, const KeyValuePair& pair) { -// ... -// } -// }; -// -// Note that the table is not usable until init() has been called. -// -template -class HashTable : private AllocPolicy -{ - friend class iterator; - - typedef typename HashPolicy::Payload Payload; - typedef detail::HashTableEntry Entry; - - private: - static const uint32_t kMinCapacity = 16; - static const uint32_t kMaxCapacity = INT_MAX / sizeof(Entry); - - template - uint32_t computeHash(const Key& key) const { - // Multiply by golden ratio. - uint32_t hash = HashPolicy::hash(key) * 0x9E3779B9; - if (hash == Entry::kFreeHash || hash == Entry::kRemovedHash) - hash += 2; - return hash; - } - - Entry* createTable(uint32_t capacity) { - assert(capacity <= kMaxCapacity); - - Entry* table = (Entry*)this->am_malloc(capacity * sizeof(Entry)); - if (!table) - return nullptr; - - for (size_t i = 0; i < capacity; i++) - table[i].initialize(); - - return table; - } - - public: - class Result - { - friend class HashTable; - - Entry* entry_; - - Entry& entry() { - return *entry_; - } - - public: - Result(Entry* entry) - : entry_(entry) - {} - - Payload* operator ->() { - return &entry_->payload(); - } - Payload& operator *() { - return entry_->payload(); - } - - bool found() const { - return entry_->isLive(); - } - }; - - class Insert : public Result - { - uint32_t hash_; - - public: - Insert(Entry* entry, uint32_t hash) - : Result(entry), - hash_(hash) - {} - - uint32_t hash() const { - return hash_; - } - }; - - private: - class Probulator - { - uint32_t hash_; - uint32_t capacity_; - - public: - Probulator(uint32_t hash, uint32_t capacity) - : hash_(hash), - capacity_(capacity) - { - assert(IsPowerOfTwo(capacity_)); - } - - uint32_t entry() const { - return hash_ & (capacity_ - 1); - } - uint32_t next() { - hash_++; - return entry(); - } - }; - - bool underloaded() const { - // Check if the table is underloaded: < 25% entries used. - return (capacity_ > kMinCapacity) && (nelements_ + ndeleted_ < capacity_ / 4); - } - bool overloaded() const { - // Grow if the table is overloaded: > 75% entries used. - return (nelements_ + ndeleted_) > ((capacity_ / 2) + (capacity_ / 4)); - } - - bool shrink() { - if ((capacity_ >> 1) < minCapacity_) - return true; - return changeCapacity(capacity_ >> 1); - } - - bool grow() { - if (capacity_ >= kMaxCapacity) { - this->reportAllocationOverflow(); - return false; - } - return changeCapacity(capacity_ << 1); - } - - bool changeCapacity(uint32_t newCapacity) { - assert(newCapacity <= kMaxCapacity); - - Entry* newTable = createTable(newCapacity); - if (!newTable) - return false; - - Entry* oldTable = table_; - uint32_t oldCapacity = capacity_; - - table_ = newTable; - capacity_ = newCapacity; - ndeleted_ = 0; - - for (uint32_t i = 0; i < oldCapacity; i++) { - Entry& oldEntry = oldTable[i]; - if (oldEntry.isLive()) { - Insert p = insertUnique(oldEntry.hash()); - p.entry().setHash(p.hash()); - p.entry().construct(std::move(oldEntry.payload())); - } - oldEntry.destruct(); - } - this->am_free(oldTable); - - return true; - } - - // For use when the key is known to be unique. - Insert insertUnique(uint32_t hash) { - Probulator probulator(hash, capacity_); - - Entry* e = &table_[probulator.entry()]; - for (;;) { - if (e->isFree() || e->removed()) - break; - e = &table_[probulator.next()]; - } - - return Insert(e, hash); - } - - template - Result lookup(const Key& key) const { - uint32_t hash = computeHash(key); - Probulator probulator(hash, capacity_); - - Entry* e = &table_[probulator.entry()]; - for (;;) { - if (e->isFree()) - break; - if (e->isLive() && e->sameHash(hash) && HashPolicy::matches(key, e->payload())) { - return Result(e); - } - e = &table_[probulator.next()]; - } - - return Result(e); - } - - template - Insert lookupForAdd(const Key& key) { - uint32_t hash = computeHash(key); - Probulator probulator(hash, capacity_); - - Entry* e = &table_[probulator.entry()]; - Entry* firstRemoved = nullptr; - for (;;) { - if (e->isFree()) - break; - if (e->removed()) { - if (!firstRemoved) - firstRemoved = e; - } else if (e->sameHash(hash) && HashPolicy::matches(key, e->payload())) - break; - e = &table_[probulator.next()]; - } - - if (!e->isLive() && firstRemoved) - e = firstRemoved; - - return Insert(e, hash); - } - - bool internalAdd(Insert& i) { - assert(!i.found()); - - // If the entry is deleted, just re-use the slot. - if (i.entry().removed()) { - ndeleted_--; - } else { - // Otherwise, see if we're at max capacity. - if (nelements_ == kMaxCapacity) { - this->reportAllocationOverflow(); - return false; - } - - // Check if the table is over or underloaded. The table is always at - // least 25% free, so this check is enough to guarantee one free slot. - // (Without one free slot, insertion search could infinite loop.) - uint32_t oldCapacity = capacity_; - if (!checkDensity()) - return false; - - // If the table changed size, we need to find a new insertion point. - // Note that a removed entry is impossible: either we caught it above, - // or we just resized and no entries are removed. - if (capacity_ != oldCapacity) - i = insertUnique(i.hash()); - } - - nelements_++; - i.entry().setHash(i.hash()); - return true; - } - - void removeEntry(Entry& e) { - assert(e.isLive()); - e.setRemoved(); - ndeleted_++; - nelements_--; - } - - public: - explicit HashTable(AllocPolicy ap = AllocPolicy()) - : AllocPolicy(ap), - capacity_(0), - nelements_(0), - ndeleted_(0), - table_(nullptr), - minCapacity_(kMinCapacity) - {} - - HashTable(HashTable&& other) - : AllocPolicy(std::move(other)), - capacity_(other.capacity_), - nelements_(other.nelements_), - ndeleted_(other.ndeleted_), - table_(other.table_), - minCapacity_(other.minCapacity_) - { - other.capacity_ = 0; - other.nelements_ = 0; - other.ndeleted_ = 0; - other.table_ = nullptr; - other.minCapacity_ = kMinCapacity; - } - - ~HashTable() { - for (uint32_t i = 0; i < capacity_; i++) - table_[i].destruct(); - this->am_free(table_); - } - - bool init(size_t capacity = 0) { - if (capacity < kMinCapacity) { - capacity = kMinCapacity; - } else if (capacity > kMaxCapacity) { - this->reportAllocationOverflow(); - return false; - } - - minCapacity_ = uint32_t(capacity); - - assert(IsPowerOfTwo(capacity)); - capacity_ = uint32_t(capacity); - - table_ = createTable(capacity_); - if (!table_) - return false; - - return true; - } - - // The Result object must not be used past mutating table operations. - template - Result find(const Key& key) const { - return lookup(key); - } - - // The Insert object must not be used past mutating table operations. - template - Insert findForAdd(const Key& key) { - return lookupForAdd(key); - } - - template - void removeIfExists(const Key& key) { - Result r = find(key); - if (!r.found()) - return; - remove(r); - } - - void remove(Result& r) { - assert(r.found()); - removeEntry(r.entry()); - } - - // The table must not have been mutated in between findForAdd() and add(). - // The Insert object is still valid after add() returns, however. - template - bool add(Insert& i, U&& payload) { - if (!internalAdd(i)) - return false; - i.entry().construct(std::forward(payload)); - return true; - } - bool add(Insert& i) { - if (!internalAdd(i)) - return false; - i.entry().construct(); - return true; - } - - bool checkDensity() { - if (underloaded()) - return shrink(); - if (overloaded()) - return grow(); - return true; - } - - void clear() { - for (size_t i = 0; i < capacity_; i++) { - table_[i].setFree(); - } - ndeleted_ = 0; - nelements_ = 0; - } - - AllocPolicy& allocPolicy() { - return *this; - } - const AllocPolicy& allocPolicy() const { - return *this; - } - - size_t elements() const { - return nelements_; - } - - size_t estimateMemoryUse() const { - return sizeof(Entry) * capacity_; - } - - public: - // It is illegal to mutate a HashTable during iteration. - class iterator - { - public: - iterator(HashTable* table) - : table_(table), - i_(table->table_), - end_(table->table_ + table->capacity_) - { - while (i_ < end_ && !i_->isLive()) - i_++; - } - - bool empty() const { - return i_ == end_; - } - - void erase() { - assert(!empty()); - table_->removeEntry(*i_); - } - - Payload* operator ->() const { - return &i_->payload(); - } - Payload& operator *() const { - return i_->payload(); - } - - void next() { - do { - i_++; - } while (i_ < end_ && !i_->isLive()); - } - - private: - HashTable* table_; - Entry* i_; - Entry* end_; - }; - - private: - HashTable(const HashTable& other) = delete; - HashTable& operator =(const HashTable& other) = delete; - - private: - uint32_t capacity_; - uint32_t nelements_; - uint32_t ndeleted_; - Entry* table_; - uint32_t minCapacity_; -}; - -// Bob Jenkin's one-at-a-time hash function[1]. -// -// [1] http://burtleburtle.net/bob/hash/doobs.html -class CharacterStreamHasher -{ - uint32_t hash; - - public: - CharacterStreamHasher() - : hash(0) - {} - - void add(char c) { - hash += c; - hash += (hash << 10); - hash ^= (hash >> 6); - } - - void add(const char* s, size_t length) { - for (size_t i = 0; i < length; i++) - add(s[i]); - } - - uint32_t result() { - hash += (hash << 3); - hash ^= (hash >> 11); - hash += (hash << 15); - return hash; - } -}; - -static inline uint32_t -HashCharSequence(const char* s, size_t length) -{ - CharacterStreamHasher hasher; - hasher.add(s, length); - return hasher.result(); -} - -static inline uint32_t -FastHashCharSequence(const char* s, size_t length) -{ - uint32_t hash = 0; - for (size_t i = 0; i < length; i++) - hash = s[i] + (hash << 6) + (hash << 16) - hash; - return hash; -} - -// From http://burtleburtle.net/bob/hash/integer.html -static inline uint32_t -HashInt32(int32_t a) -{ - a = (a ^ 61) ^ (a >> 16); - a = a + (a << 3); - a = a ^ (a >> 4); - a = a * 0x27d4eb2d; - a = a ^ (a >> 15); - return a; -} - -// From http://www.cris.com/~Ttwang/tech/inthash.htm -static inline uint32_t -HashInt64(int64_t key) -{ - key = (~key) + (key << 18); // key = (key << 18) - key - 1; - key = key ^ (uint64_t(key) >> 31); - key = key * 21; // key = (key + (key << 2)) + (key << 4); - key = key ^ (uint64_t(key) >> 11); - key = key + (key << 6); - key = key ^ (uint64_t(key) >> 22); - return uint32_t(key); -} - -template -static inline uint32_t HashInteger(uintptr_t value); - -template <> -inline uint32_t -HashInteger<4>(uintptr_t value) -{ - return HashInt32(uint32_t(value)); -} - -template <> -inline uint32_t -HashInteger<8>(uintptr_t value) -{ - return HashInt64(value); -} - -static inline uint32_t -HashPointer(const void* ptr) -{ - return HashInteger(reinterpret_cast(ptr)); -} - -} // namespace ke - -#endif // _INCLUDE_KEIMA_HASHTABLE_H_ diff --git a/metamod-source/third_party/amtl/amtl/am-inlinelist.h b/metamod-source/third_party/amtl/amtl/am-inlinelist.h deleted file mode 100644 index 5226cd55..00000000 --- a/metamod-source/third_party/amtl/amtl/am-inlinelist.h +++ /dev/null @@ -1,239 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_inline_list_h_ -#define _include_amtl_inline_list_h_ - -#include -#include -#include - -namespace ke { - -template -class InlineList; - -// Objects can recursively inherit from InlineListNode in order to have -// membership in an InlineList. -template -class InlineListNode -{ - friend class InlineList; - - public: - InlineListNode() - : next_(nullptr), - prev_(nullptr) - {} - - InlineListNode(InlineListNode* next, InlineListNode* prev) - : next_(next), - prev_(prev) - {} - - bool isInList() const { - assert(!!next_ == !!prev_); - return !!next_; - } - - void removeFromParentList() { - prev_->next_ = next_; - next_->prev_ = prev_; - next_ = nullptr; - prev_ = nullptr; - } - - protected: - InlineListNode* next_; - InlineListNode* prev_; -}; - -// An InlineList is a linked list that threads link pointers through objects, -// rather than allocating node memory. A node can be in at most one list at -// any time. -// -// Since InlineLists are designed to be very cheap, there is no requirement -// that elements be removed from a list once the list is destructed. However, -// for as long as the list is alive, all of its contained nodes must also -// be alive. -template -class InlineList -{ - typedef InlineListNode Node; - - Node head_; - size_t length_; - - // Work around a clang bug where we can't initialize with &head_ in the ctor. - inline Node* head() { - return &head_; - } - - public: - InlineList() - : head_(head(), head()), - length_(0) - {} - - ~InlineList() { -#if !defined(NDEBUG) - // Remove all items to clear their next/prev fields. - while (begin() != end()) - remove(*begin()); -#endif - } - - public: - class iterator - { - friend class InlineList; - Node* iter_; - - public: - iterator(Node* iter) - : iter_(iter) - {} - - iterator& operator ++() { - iter_ = iter_->next_; - return *this; - } - iterator operator ++(int) { - iterator old(*this); - iter_ = iter_->next_; - return old; - } - T* operator *() { - return static_cast(iter_); - } - T* operator ->() { - return static_cast(iter_); - } - bool operator !=(const iterator& where) const { - return iter_ != where.iter_; - } - bool operator ==(const iterator& where) const { - return iter_ == where.iter_; - } - }; - - class reverse_iterator - { - friend class InlineList; - Node* iter_; - - public: - reverse_iterator(Node* iter) - : iter_(iter) - {} - - reverse_iterator& operator ++() { - iter_ = iter_->prev_; - return *this; - } - reverse_iterator operator ++(int) { - reverse_iterator old(*this); - iter_ = iter_->prev_; - return old; - } - T* operator *() { - return static_cast(iter_); - } - T* operator ->() { - return static_cast(iter_); - } - bool operator !=(const reverse_iterator& where) const { - return iter_ != where.iter_; - } - bool operator ==(const reverse_iterator& where) const { - return iter_ == where.iter_; - } - }; - - iterator begin() { - return iterator(head_.next_); - } - reverse_iterator rbegin() { - return reverse_iterator(head_.prev_); - } - - iterator end() { - return iterator(&head_); - } - reverse_iterator rend() { - return reverse_iterator(&head_); - } - - template - IteratorType erase(IteratorType& at) { - IteratorType next = at; - next++; - - remove(at.iter_); - - // Iterator is no longer valid. - at.iter_ = nullptr; - - return next; - } - - bool empty() const { - return head_.next_ == &head_; - } - - void remove(Node* t) { - t->prev_->next_ = t->next_; - t->next_->prev_ = t->prev_; - length_--; - -#if !defined(NDEBUG) - t->next_ = nullptr; - t->prev_ = nullptr; -#endif - } - - void append(Node* t) { - assert(!t->next_); - assert(!t->prev_); - - t->prev_ = head_.prev_; - t->next_ = &head_; - head_.prev_->next_ = t; - head_.prev_ = t; - length_++; - } - - size_t length() const { - return length_; - } -}; - -} // namespace ke - -#endif // _include_amtl_inline_list_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-linking.h b/metamod-source/third_party/amtl/amtl/am-linking.h deleted file mode 100644 index bfae0b5b..00000000 --- a/metamod-source/third_party/amtl/amtl/am-linking.h +++ /dev/null @@ -1,45 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2014, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_linking_h_ -#define _include_amtl_linking_h_ - -#include - -#if defined(_MSC_VER) -# define KE_DLL_IMPORT __declspec(dllimport) -# define KE_DLL_EXPORT __declspec(dllexport) -# define KE_DLL_PRIVATE -#else -# define KE_DLL_IMPORT -# define KE_DLL_EXPORT __attribute__((visibility("default"))) -# define KE_DLL_PRIVATE __attribute__((visibility("hidden"))) -#endif - -#endif // _include_amtl_linking_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-maybe.h b/metamod-source/third_party/amtl/amtl/am-maybe.h deleted file mode 100644 index 159b27d5..00000000 --- a/metamod-source/third_party/amtl/amtl/am-maybe.h +++ /dev/null @@ -1,151 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2014, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_maybe_h_ -#define _include_amtl_maybe_h_ - -#include - -#include -#include - -#include - -namespace ke { - -struct Nothing {}; - -template -class Maybe -{ - public: - Maybe() - : initialized_(false) - {} - Maybe(const Maybe& other) - : initialized_(false) - { - copyFrom(other); - } - Maybe(Maybe&& other) - : initialized_(false) - { - moveFrom(std::move(other)); - } - Maybe(Nothing) - : initialized_(false) - {} - - ~Maybe() { - if (isValid()) - t_.address()->~T(); - } - - template - void init(ArgTypes&&... argv) { - if (isValid()) - t_.address()->~T(); - - new (t_.address()) T(std::forward(argv)...); - initialized_ = true; - } - - bool isValid() const { - return initialized_; - } - - T& operator ->() { - assert(isValid()); - return t_.address(); - } - T& operator *() { - assert(isValid()); - return *t_.address(); - } - const T& operator ->() const { - assert(isValid()); - return t_.address(); - } - const T& operator *() const { - assert(isValid()); - return *t_.address(); - } - T& get() { - assert(isValid()); - return *t_.address(); - } - const T& get() const { - assert(isValid()); - return *t_.address(); - } - - explicit operator bool() const { - return isValid(); - } - - Maybe& operator =(const Maybe& other) { - initialized_ = false; - copyFrom(other); - return *this; - } - Maybe& operator =(Maybe&& other) { - initialized_ = false; - moveFrom(std::move(other)); - return *this; - } - - private: - void copyFrom(const Maybe& other) { - if (other.initialized_) { - init(*other.t_.address()); - } - } - void moveFrom(Maybe&& other) { - if (other.initialized_) { - init(std::move(*other.t_.address())); - other.initialized_ = false; - } - } - - private: - bool initialized_; - StorageBuffer t_; -}; - -template ::type>::type> -static inline Maybe -Some(T&& value) -{ - Maybe m; - m.init(std::forward(value)); - return m; -} - -} // namespace ke - -#endif // _include_amtl_maybe_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-mutex.h b/metamod-source/third_party/amtl/amtl/am-mutex.h deleted file mode 100644 index 38d59402..00000000 --- a/metamod-source/third_party/amtl/amtl/am-mutex.h +++ /dev/null @@ -1,65 +0,0 @@ -// vim: set sts=8 ts=4 sw=4 tw=99 et: -// -// Copyright (C) 2020 David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#pragma once - -#include - -#include -#include - -namespace ke { - -// Wrapper for that allows asserting who owns it. -class Mutex : public std::mutex -{ - public: -#ifdef NDEBUG - void AssertCurrentThreadOwns() {} -#else - void lock() { - std::mutex::lock(); - owner_ = std::this_thread::get_id(); - }; - - void unlock() { - owner_ = {}; - std::mutex::unlock(); - } - - void AssertCurrentThreadOwns() { - assert(owner_ == std::this_thread::get_id()); - } - - private: - std::thread::id owner_ = {}; -#endif -}; - -} // namespace ke diff --git a/metamod-source/third_party/amtl/amtl/am-platform.h b/metamod-source/third_party/amtl/amtl/am-platform.h deleted file mode 100644 index da476197..00000000 --- a/metamod-source/third_party/amtl/amtl/am-platform.h +++ /dev/null @@ -1,97 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_platform_h_ -#define _include_amtl_platform_h_ - -namespace ke { - -#if defined(__EMSCRIPTEN__) -# define KE_EMSCRIPTEN -# define KE_POSIX -#elif defined(__NetBSD__) -# define KE_NETBSD -# define KE_BSD -#elif defined(__FreeBSD__) -# define KE_FREEBSD -# define KE_BSD -#elif defined(__OpenBSD__) -# define KE_OPENBSD -# define KE_BSD -#elif defined(__APPLE__) -# define KE_MACOSX -# define KE_MACH -# define KE_BSD -#elif defined(__MACH__) -# define KE_MACH -# define KE_BSD -#elif defined(_WIN32) -# define KE_WINDOWS -#elif defined(__linux__) -# define KE_LINUX -# define KE_POSIX -#elif defined(__sun__) -# define KE_SOLARIS -# define KE_POSIX -#endif - -#if defined(KE_BSD) -# define KE_POSIX -#endif - -#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64__) || defined(__amd64) || \ - (defined(_MSC_VER) && defined(_M_X64)) -# define KE_ARCH_X64 -#elif defined(__i686) || defined(__i686__) || defined(__i386) || defined(__i386__) || \ - defined(i386) || (defined(_MSC_VER) && defined(_M_IX86)) -# define KE_ARCH_X86 -#elif defined(__aarch64__) || defined(_M_ARM64) -# define KE_ARCH_ARM64 -#elif defined(__arm__) || defined(_M_ARM) -# define KE_ARCH_ARM -#else -# define KE_ARCH_UNKNOWN -#endif - -// Create macros that exactly match the compiler - peeking past any tricks -// vendors play for interoperability. -#if defined(__clang__) -# define KE_CXX_CLANG -#elif defined(__GNUC__) -# define KE_CXX_GCC -#elif defined(_MSC_VER) -# define KE_CXX_MSVC -#endif - -#if defined(KE_CXX_CLANG) || defined(KE_CXX_GCC) -# define KE_CXX_LIKE_GCC -#endif - -} // namespace ke - -#endif // _include_amtl_platform_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-priority-queue.h b/metamod-source/third_party/amtl/amtl/am-priority-queue.h deleted file mode 100644 index b421713a..00000000 --- a/metamod-source/third_party/amtl/amtl/am-priority-queue.h +++ /dev/null @@ -1,168 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2016, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_am_priority_queue_h_ -#define _include_amtl_am_priority_queue_h_ - -#include - -#include -#include -#include -#include - -#include - -namespace ke { - -// Basic priority queue implemented using a binary heap on top of vector. The -// "IsHigherPriority" callable must take a left and right value of type T, and -// return whether the left value should be dequeued before the right. -// -// This allows move-and-pop which the STL container does not. -template > -class PriorityQueue final -{ - public: - explicit PriorityQueue(IsHigherPriority hp = IsHigherPriority()) - : is_higher_priority_(hp) - {} - - PriorityQueue(PriorityQueue&& other) - : impl_(std::move(other.impl_)), - is_higher_priority_(std::move(other.is_higher_priority_)) - {} - - template - void add(U&& item) { - impl_.push_back(std::forward(item)); - if (impl_.size() > 1) - propagateUp(impl_.size() - 1); - } - - template - void emplace(Args&&... args) { - impl_.emplace_back(std::forward(args)...); - if (impl_.size() > 1) - propagateUp(impl_.size() - 1); - } - - bool empty() const { - return impl_.empty(); - } - - const T& peek() const { - assert(!empty()); - return impl_[0]; - } - - T pop() { - assert(!empty()); - - T top = std::move(impl_[0]); - if (impl_.size() == 1) { - impl_.pop_back(); - } else { - impl_[0] = std::move(impl_.back()); - impl_.pop_back(); - propagateDown(0); - } - return top; - } - - private: - void propagateUp(size_t at) { - size_t cursor = at; - T key(std::move(impl_[cursor])); - while (cursor != 0) { - size_t parent = parentOf(cursor); - if (!is_higher_priority_(key, impl_[parent])) - break; - - impl_[cursor] = std::move(impl_[parent]); - cursor = parent; - } - - impl_[cursor] = std::move(key); - } - - void propagateDown(size_t at) { - size_t cursor = at; - while (hasLeftChild(cursor)) { - // Pick the child with the highest priority. - size_t bestChild = leftChildOf(cursor); - if (hasRightChild(cursor)) { - size_t rightIndex = rightChildOf(cursor); - if (is_higher_priority_(impl_[rightIndex], impl_[bestChild])) - bestChild = rightIndex; - } - - // If the highest priority child is not higher priority than the cursor, - // then we are finished. - if (!is_higher_priority_(impl_[bestChild], impl_[cursor])) - break; - - // Otherwise, swap and move on. - std::swap(impl_[bestChild], impl_[cursor]); - cursor = bestChild; - } - } - - static constexpr size_t parentOf(size_t at) { -#if __cplusplus >= 201402L - assert(at > 0); -#endif - return (at - 1) / 2; - } - static constexpr size_t leftChildOf(size_t at) { - return (at * 2) + 1; - } - static constexpr size_t rightChildOf(size_t at) { - return (at * 2) + 2; - } - - bool hasLeftChild(size_t at) const { - return leftChildOf(at) < impl_.size(); - } - bool hasRightChild(size_t at) const { - return rightChildOf(at) < impl_.size(); - } - - private: - PriorityQueue(const PriorityQueue& other) = delete; - void operator =(const PriorityQueue& other) = delete; - - private: - std::vector impl_; - IsHigherPriority is_higher_priority_; -}; - -} // namespace ke - -#endif // _include_amtl_am_priority_queue_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-raii.h b/metamod-source/third_party/amtl/amtl/am-raii.h deleted file mode 100644 index b942e50c..00000000 --- a/metamod-source/third_party/amtl/amtl/am-raii.h +++ /dev/null @@ -1,129 +0,0 @@ -// vim: set sts=4 ts=8 sw=4 tw=99 et: -// -// Copyright (C) 2013-2014, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_am_raii_h_ -#define _include_amtl_am_raii_h_ - -#include - -namespace ke { - -template -class SaveAndSet -{ - public: - SaveAndSet(T* location, const T& value) - : location_(location), - old_(*location) - { - *location_ = value; - } - ~SaveAndSet() { - *location_ = old_; - } - - private: - T* location_; - T old_; -}; - -template -class StackLinked -{ - public: - StackLinked(T** prevp) - : prevp_(prevp), - prev_(*prevp) - { - *prevp_ = static_cast(this); - } - virtual ~StackLinked() { - assert(*prevp_ == this); - *prevp_ = prev_; - } - - protected: - T** prevp_; - T* prev_; -}; - -template -class ScopeGuard -{ - public: - ScopeGuard(T&& callback) noexcept - : callback_(std::forward(callback)), - cancelled_(false) - {} - ScopeGuard(ScopeGuard&& other) noexcept - : callback_(std::move(other.callback_)), - cancelled_(other.cancelled_) - { - other.cancel(); - } - - ~ScopeGuard() { - if (!cancelled_) - callback_(); - } - - void cancel() { - cancelled_ = true; - } - - private: - ScopeGuard() = delete; - ScopeGuard(const ScopeGuard&) = delete; - - void operator=(const ScopeGuard&) = delete; - void operator=(ScopeGuard&&) = delete; - - private: - T callback_; - bool cancelled_; -}; - -template -ScopeGuard MakeScopeGuard(T&& callback) -{ - return ScopeGuard(std::forward(callback)); -} - -template -T -ReturnAndVoid(T& t) -{ - T saved = t; - t = T(); - return saved; -} - -} // namespace ke - -#endif // _include_amtl_am_raii_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-refcounting-threadsafe.h b/metamod-source/third_party/amtl/amtl/am-refcounting-threadsafe.h deleted file mode 100644 index adb2e5d3..00000000 --- a/metamod-source/third_party/amtl/amtl/am-refcounting-threadsafe.h +++ /dev/null @@ -1,206 +0,0 @@ -// vim: set sts=8 ts=4 sw=4 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_ts_refcounting_h_ -#define _include_amtl_ts_refcounting_h_ - -#include -#include - -#include -#include - -namespace ke { - -// See the comment above Refcounted for more information. This class is -// identical, except changing the reference count is guaranteed to be atomic -// with respect to other threads changing the reference count. -template -class RefcountedThreadsafe -{ - public: - RefcountedThreadsafe() - : refcount_(0) - {} - - void AddRef() { - refcount_ += 1; - } - bool Release() { - if (refcount_.fetch_sub(1) == 1) { - assert(refcount_.load() == 0); - delete static_cast(this); - return false; - } - return true; - } - - protected: - ~RefcountedThreadsafe() {} - - private: - std::atomic refcount_; -}; - -// Use this to forward to ke::Refcounted, when implementing IRefcounted. -#define KE_IMPL_REFCOUNTING_TS(classname) \ - void AddRef() { \ - ke::RefcountedThreadsafe::AddRef(); \ - } \ - void Release() { \ - ke::RefcountedThreadsafe::Release(); \ - } - -// Classes may be multiply-inherited may wish to derive from this Refcounted -// instead. -class VirtualRefcountedThreadsafe : public IRefcounted -{ - public: - VirtualRefcountedThreadsafe() - : refcount_(0) - { -#if !defined(NDEBUG) - destroying_ = false; -#endif - } - virtual ~VirtualRefcountedThreadsafe() {} - void AddRef() override { - assert(!destroying_); - refcount_ += 1; - } - void Release() override { - if (refcount_.fetch_sub(1) == 0) { - assert(refcount_.load() == 0); -#if !defined(NDEBUG) - destroying_ = true; -#endif - delete this; - } - } - - private: - std::atomic refcount_; -#if !defined(NDEBUG) - bool destroying_; -#endif -}; - -// This is a specialized version of Ref<> that is safe to read and write from -// multiple threads. It is not recommended for general use, since it imposes -// a CAS spin-lock on every read/write. -// -// Normally, assigning Ref<> to Ref<> has a race condition where in between -// the read and incref, another thread can assign, decref, and ultimately -// destroy the left-hand side. This prevents such a scenario by making reads -// atomic with respect to the incref operation. -// -// Pointers stored in an AtomicRef<> must be at least sizeof(void*) aligned. -template -class AtomicRef -{ - public: - AtomicRef() - : thing_(nullptr) - {} - AtomicRef(T* thing) - : thing_(thing) - { - assert(IsAligned(thing, sizeof(void*))); - if (thing) - thing->AddRef(); - } - ~AtomicRef() { - // Should not be locked. - assert(thing_ == untagged(thing_)); - if (thing_) - reinterpret_cast(thing_.load())->Release(); - } - - // Atomically retrieve and add a reference to the contained value. - AlreadyRefed get() { - T* value = lock(); - if (value) - value->AddRef(); - unlock(value); - return AdoptRef(value); - } - - // Atomically incref the new value and replace the old value. - void operator =(T* other) { - T* value = lock(); - if (other) - other->AddRef(); - unlock(other); - if (value) - value->Release(); - } - - private: - AtomicRef(const AtomicRef& other) = delete; - void operator =(const AtomicRef& other) = delete; - - private: - // We represent a locked state with a tag bit. - void* tagged(void* ptr) { - return reinterpret_cast(uintptr_t(ptr) | 1); - } - void* untagged(void* ptr) { - return reinterpret_cast(uintptr_t(ptr) & ~uintptr_t(1)); - } - - T* lock() { - // Spin until we can replace an untagged ptr with the tagged version. - // Note that we cannot use compare_and_swap_weak. If |thing_| becomes - // locked but spuriously fails (as can happen on ARM), we'll loop - // indefinitely waiting for it to become unlocked. So we must have a - // strong guarantee on failure. - void* oldval = untagged(thing_); - while (!thing_.compare_exchange_strong(oldval, tagged(oldval), std::memory_order_release, - std::memory_order_relaxed)) - { - std::this_thread::yield(); - oldval = untagged(thing_); - } - return reinterpret_cast(oldval); - } - void unlock(T* ptr) { - // Nothing should have mutated the value, and the new value should be - // untagged. - assert(thing_ == tagged(thing_)); - assert(ptr == untagged(ptr)); - thing_ = ptr; - } - - private: - std::atomic thing_; -}; - -} // namespace ke - -#endif // _include_amtl_ts_refcounting_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-refcounting.h b/metamod-source/third_party/amtl/amtl/am-refcounting.h deleted file mode 100644 index b44a3d28..00000000 --- a/metamod-source/third_party/amtl/amtl/am-refcounting.h +++ /dev/null @@ -1,323 +0,0 @@ -// vim: set sts=8 ts=4 sw=4 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_refcounting_h_ -#define _include_amtl_refcounting_h_ - -#include -#include -#include - -#include - -namespace ke { - -template -class RefPtr; - -// Objects in AMTL inheriting from Refcounted will have an initial refcount -// of 0. However, in some systems (such as COM), the initial refcount is 1, -// or functions may return raw pointers that have been AddRef'd. In these -// cases it would be a mistake to use RefPtr<> since the object leak an extra -// reference. -// -// This container holds a refcounted object without addrefing it. This is -// intended only for interacting with functions which return an object that -// has been manually AddRef'd. Note that this will perform a Release(), so -// so it is necessary to assign it to retain the object. -template -class AlreadyRefed -{ - public: - AlreadyRefed(decltype(nullptr)) - : thing_(nullptr) - {} - explicit AlreadyRefed(T* t) - : thing_(t) - {} - AlreadyRefed(const AlreadyRefed& other) - : thing_(other.thing_) - { - if (thing_) - thing_->AddRef(); - } - AlreadyRefed(AlreadyRefed&& other) - : thing_(other.thing_) - { - other.thing_ = nullptr; - } - ~AlreadyRefed() { - if (thing_) - thing_->Release(); - } - - bool operator !() const { - return !thing_; - } - T* operator ->() const { - return thing_; - } - bool operator ==(T* other) const { - return thing_ == other; - } - bool operator !=(T* other) const { - return thing_ != other; - } - - // Analagous to AutoPtr::take(). - T* take() const { - return ReturnAndVoid(thing_); - } - - private: - mutable T* thing_; -}; - -template -static inline AlreadyRefed -AdoptRef(T* t) -{ - return AlreadyRefed(t); -} - -// Classes which are refcounted should inherit from this. Note that reference -// counts start at 0 in AMTL, rather than 1. This avoids the complexity of -// having to adopt the initial ref upon allocation. However, this also means -// invoking Release() on a newly allocated object is illegal. Newborn objects -// must either be assigned to a RefPtr or must be deleted using |delete|. -template -class Refcounted -{ - public: - Refcounted() - : refcount_(0) - {} - - void AddRef() { - refcount_++; - } - void Release() { - assert(refcount_ > 0); - if (--refcount_ == 0) - delete static_cast(this); - } - - protected: - ~Refcounted() {} - - private: - uintptr_t refcount_; -}; - -// Use this to forward to ke::Refcounted, when implementing IRefcounted. -#define KE_IMPL_REFCOUNTING(classname) \ - void AddRef() { \ - ke::Refcounted::AddRef(); \ - } \ - void Release() { \ - ke::Refcounted::Release(); \ - } - -// This can be used for classes which will inherit from VirtualRefcounted. -class IRefcounted -{ - public: - virtual ~IRefcounted() {} - virtual void AddRef() = 0; - virtual void Release() = 0; -}; - -// Classes may be multiply-inherited may wish to derive from this Refcounted -// instead. -class VirtualRefcounted : public IRefcounted -{ - public: - VirtualRefcounted() - : refcount_(0) - { -#if !defined(NDEBUG) - destroying_ = false; -#endif - } - virtual ~VirtualRefcounted() {} - void AddRef() override { - assert(!destroying_); - refcount_++; - } - void Release() override { - assert(refcount_ > 0); - if (--refcount_ == 0) { -#if !defined(NDEBUG) - destroying_ = true; -#endif - delete this; - } - } - - private: - uintptr_t refcount_; -#if !defined(NDEBUG) - bool destroying_; -#endif -}; - -// Simple class for automatic refcounting. -template -class RefPtr -{ - public: - RefPtr(T* thing) - : thing_(thing) - { - AddRef(); - } - - RefPtr() - : thing_(nullptr) - {} - - RefPtr(const RefPtr& other) - : thing_(other.thing_) - { - AddRef(); - } - RefPtr(RefPtr&& other) - : thing_(other.thing_) - { - other.thing_ = nullptr; - } - template - RefPtr(const RefPtr& other) - : thing_(*other) - { - AddRef(); - } - template - RefPtr(RefPtr&& other) - : thing_(other.forget().take()) - {} - RefPtr(const AlreadyRefed& other) - : thing_(other.take()) - {} - template - RefPtr(const AlreadyRefed& other) - : thing_(other.take()) - {} - ~RefPtr() { - Release(); - } - - T* operator ->() const { - return operator*(); - } - T* operator *() const { - return thing_; - } - operator T*() { - return thing_; - } - operator T*() const { - return thing_; - } - bool operator !() const { - return !thing_; - } - operator T&() { - return *thing_; - } - explicit operator bool() const { - return !!thing_; - } - - AlreadyRefed take() { - return AlreadyRefed(ReturnAndVoid(thing_)); - } - AlreadyRefed forget() { - return AlreadyRefed(ReturnAndVoid(thing_)); - } - - template - RefPtr& operator =(S* thing) { - Release(); - thing_ = thing; - AddRef(); - return *this; - } - - template - RefPtr& operator =(const AlreadyRefed& other) { - Release(); - thing_ = other.take(); - return *this; - } - - RefPtr& operator =(const RefPtr& other) { - Release(); - thing_ = other.thing_; - AddRef(); - return *this; - } - - RefPtr& operator =(RefPtr&& other) { - Release(); - thing_ = other.thing_; - other.thing_ = nullptr; - return *this; - } - - T* get() const { - return thing_; - } - T** byref() { - return &thing_; - } - T* const* byref_const() const { - return &thing_; - } - void** address() { - return reinterpret_cast(&thing_); - } - - private: - void AddRef() { - if (thing_) - thing_->AddRef(); - } - void Release() { - if (thing_) - thing_->Release(); - } - - protected: - T* thing_; -}; - -} // namespace ke - -#endif // _include_amtl_refcounting_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-storagebuffer.h b/metamod-source/third_party/amtl/amtl/am-storagebuffer.h deleted file mode 100644 index f3289225..00000000 --- a/metamod-source/third_party/amtl/amtl/am-storagebuffer.h +++ /dev/null @@ -1,59 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2014, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_storagebuffer_h_ -#define _include_amtl_storagebuffer_h_ - -#include - -namespace ke { - -// StorageBuffer allows storage of objects where calling a destructor is -// undesirable or impossible (for example, members in unions). -template -class StorageBuffer -{ - public: - T* address() { - return reinterpret_cast(buffer_); - } - const T* address() const { - return reinterpret_cast(buffer_); - } - - private: - union { - char buffer_[sizeof(T)]; - uint64_t aligned_; - }; -}; - -} // namespace ke - -#endif // _include_amtl_storagebuffer_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-string.h b/metamod-source/third_party/amtl/amtl/am-string.h deleted file mode 100644 index e5b24641..00000000 --- a/metamod-source/third_party/amtl/amtl/am-string.h +++ /dev/null @@ -1,367 +0,0 @@ -// vim: set sts=8 ts=4 sw=4 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_string_h_ -#define _include_amtl_string_h_ - -#define __STDC_FORMAT_MACROS -#if !defined(KE_WINDOWS) -# include -#endif -#include -#include -#include -#include -#include -#include -#include -#if !defined(_MSC_VER) -# include -#endif - -#include -#include -#include - -#include -#include -#include -#include - -namespace ke { - -#if defined(__GNUC__) -# define KE_PRINTF_FUNCTION(string_index, first_to_check) \ - __attribute__((format(printf, string_index, first_to_check))) -#else -# define KE_PRINTF_FUNCTION(string_index, first_to_check) -#endif - -#if defined(_MSC_VER) -# define KE_VSNPRINTF _vsnprintf -#else -# define KE_VSNPRINTF vsnprintf -#endif - -// Forward declare these functions since GCC will complain otherwise. -static inline std::unique_ptr SprintfArgs(const char* fmt, va_list ap) KE_PRINTF_FUNCTION(1, 0); -static inline std::unique_ptr Sprintf(const char* fmt, ...) KE_PRINTF_FUNCTION(1, 2); -static inline size_t SafeVsprintf(char* buffer, size_t maxlength, const char* fmt, va_list ap) - KE_PRINTF_FUNCTION(3, 0); -static inline size_t SafeSprintf(char* buffer, size_t maxlength, const char* fmt, ...) - KE_PRINTF_FUNCTION(3, 4); -static inline std::string StringPrintf(const char* fmt, ...) KE_PRINTF_FUNCTION(1, 2); -static inline std::string StringPrintfVa(const char* fmt, va_list ap) KE_PRINTF_FUNCTION(1, 0); - -namespace detail { - -// Another forward declare thanks to GCC rules. -static inline std::unique_ptr SprintfArgsImpl(size_t* out_len, const char* fmt, va_list ap) - KE_PRINTF_FUNCTION(2, 0); - -static inline std::unique_ptr -SprintfArgsImpl(size_t* out_len, const char* fmt, va_list ap) -{ - va_list argv; - va_copy(argv, ap); - - *out_len = 0; - -#if defined(_MSC_VER) - int len = _vscprintf(fmt, ap); -#else - char tmp[2]; - // Note: GCC incorrectly errors on this code, so suppress the warning. - int len = vsnprintf(tmp, sizeof(tmp), fmt, ap); -#endif - - if (len < 0) { - va_end(argv); - return std::unique_ptr(); - } - - if (len == 0) { - auto buffer = std::make_unique(1); - buffer[0] = '\0'; - va_end(argv); - return buffer; - } - - auto buffer = std::make_unique(len + 1); - if (!buffer) { - va_end(argv); - return buffer; - } - - int new_len = KE_VSNPRINTF(buffer.get(), len + 1, fmt, argv); - if (new_len < 0) - return std::unique_ptr(); - assert(len == new_len); - - *out_len = new_len; - - va_end(argv); - return buffer; -} - -} // namespace detail - -static inline std::unique_ptr -SprintfArgs(const char* fmt, va_list ap) -{ - size_t len; - return detail::SprintfArgsImpl(&len, fmt, ap); -} - -static inline std::unique_ptr -Sprintf(const char* fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - std::unique_ptr result = SprintfArgs(fmt, ap); - va_end(ap); - return result; -} - -static inline size_t -SafeVsprintf(char* buffer, size_t maxlength, const char* fmt, va_list ap) -{ - if (!maxlength) - return 0; - - size_t len = KE_VSNPRINTF(buffer, maxlength, fmt, ap); - - if (len >= maxlength) { - buffer[maxlength - 1] = '\0'; - return maxlength - 1; - } - - return len; -} - -static inline size_t -SafeSprintf(char* buffer, size_t maxlength, const char* fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - size_t len = SafeVsprintf(buffer, maxlength, fmt, ap); - va_end(ap); - return len; -} - -static inline std::string -StringPrintfVa(const char* fmt, va_list ap) -{ - size_t len; - std::unique_ptr result = detail::SprintfArgsImpl(&len, fmt, ap); - if (!result) - return nullptr; - return std::string(result.get(), len); -} - -static inline std::string -StringPrintf(const char* fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - std::string result = StringPrintfVa(fmt, ap); - va_end(ap); - return result; -} - -static inline size_t -SafeStrcpy(char* dest, size_t maxlength, const char* src) -{ - if (!dest || !maxlength) - return 0; - - char* iter = dest; - size_t count = maxlength; - while (*src && --count) - *iter++ = *src++; - *iter = '\0'; - - return iter - dest; -} - -// Append |src| to |dest|, up to |maxlength-1| characters to ensure a null -// terminator. The new string size is returned. -static inline size_t -SafeStrcat(char* dest, size_t maxlength, const char* src) -{ - char* iter = dest; - while (*iter) - iter++; - - // Note: add 1 to ensure we always have room for the null terminator. - while (*src && (size_t(iter - dest) + 1 < maxlength)) - *iter++ = *src++; - *iter = '\0'; - return iter - dest; -} - -// Same as SafeStrcpy, but only copy up to n chars. -static inline size_t -SafeStrcpyN(char* dest, size_t maxlength, const char* src, size_t n) -{ - if (!dest || !maxlength || !n) - return 0; - - char* iter = dest; - size_t count = maxlength; - while (--count && n--) - *iter++ = *src++; - *iter = '\0'; - - return iter - dest; -} - -static inline int -StrCaseCmp(const char* a, const char* b) -{ -#if defined(_MSC_VER) - return _strcmpi(a, b); -#else - return strcasecmp(a, b); -#endif -} - -// Split a string into a vector of strings. The |split| argument must contain -// a non-empty string. The operation is defined such that: -// -// Join(Split(str, sep), sep) == str -// -static inline std::vector -Split(const char* str, const char* split) -{ - size_t split_len = strlen(split); - assert(split_len > 0); - - std::vector out; - - const char* cursor = str; - const char* match = nullptr; - while (*cursor) { - match = strstr(cursor, split); - if (!match) - break; - - out.emplace_back(cursor, match - cursor); - cursor = match + split_len; - } - - if (*cursor != '\0' || match) - out.emplace_back(cursor); - return out; -} - -static inline std::vector -Split(const std::string& str, const char* split) -{ - return ke::Split(str.c_str(), split); -} - -// Given a list of strings, return a string combining them all with |sep| -// appended in between. -// -// Unlike Split(), |sep| can be an empty string. -static inline std::string -Join(const std::vector& pieces, const char* sep) -{ - size_t sep_len = strlen(sep); - size_t buffer_len = 0; - - for (const std::string& piece : pieces) - buffer_len += piece.size(); - if (!pieces.empty()) - buffer_len += sep_len * (pieces.size() - 1); - - std::string buffer(buffer_len, '\0'); - - char* iter = &buffer[0]; -#if !defined(NDEBUG) - char* end = iter + buffer_len; -#endif - for (size_t i = 0; i < pieces.size(); i++) { - memcpy(iter, pieces[i].c_str(), pieces[i].size()); - iter += pieces[i].size(); - - if (i != pieces.size() - 1) { - memcpy(iter, sep, sep_len); - iter += sep_len; - } - } - assert(iter == end); - return buffer; -} - -static inline std::string Uppercase(const char* str) { - std::string result(str); - for (size_t i = 0; i < result.size(); i++) - result[i] = toupper(result[i]); - return result; -} - -static inline std::string Lowercase(const char* str) { - std::string result(str); - for (size_t i = 0; i < result.size(); i++) - result[i] = tolower(result[i]); - return result; -} - -static inline bool StartsWith(const std::string& first, const char* other) { - return strncmp(first.c_str(), other, strlen(other)) == 0; -} - -static inline bool StartsWith(const char* first, const char* other) { - return strncmp(first, other, strlen(other)) == 0; -} - -static inline bool EndsWith(const std::string& first, const std::string& second) { - return first.size() >= second.size() && - first.substr(first.size() - second.size(), second.size()) == second; -} - -#if defined(KE_WINDOWS) -# define KE_FMT_SIZET "Iu" -# define KE_FMT_I64 "I64d" -# define KE_FMT_U64 "I64u" -# define KE_FMT_X64 "I64x" -#elif defined(KE_POSIX) -# define KE_FMT_SIZET "zu" -# define KE_FMT_I64 PRId64 -# define KE_FMT_U64 PRIu64 -# define KE_FMT_X64 PRIx64 -#else -# error "Implement format specifier string" -#endif - -} // namespace ke - -#endif // _include_amtl_string_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-thread.h b/metamod-source/third_party/amtl/amtl/am-thread.h deleted file mode 100644 index 7f3f71dd..00000000 --- a/metamod-source/third_party/amtl/amtl/am-thread.h +++ /dev/null @@ -1,113 +0,0 @@ -// vim: set sts=8 ts=4 sw=4 tw=99 et: -// -// Copyright (C) 2020 David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#pragma once - -#include -#include -#include -#include - -#include - -#if defined(KE_POSIX) -# include -#elif defined(KE_WINDOWS) -# include -# include -# include - -# include -# include -# include -#endif - -namespace ke { - -namespace impl { - -#if defined(KE_WINDOWS) -static void SetThreadName(HANDLE thread, const char* name) { - auto module = LoadLibraryA("kernel32.dll"); - if (!module) - return; - - typedef HRESULT (WINAPI * SetThreadDescriptionFn)(HANDLE, PCWSTR); - auto fn = (SetThreadDescriptionFn)GetProcAddress(module, "SetThreadDescription"); - if (!fn) - return; - - std::wstring_convert> converter; - std::wstring utf16 = converter.from_bytes(name); - fn(thread, utf16.c_str()); - - FreeLibrary(module); -} -#endif - -} // namespace detail - -static inline void SetThreadName(const char* name) { -#if defined(KE_MACOSX) - pthread_setname_np(name); -#elif defined(KE_POSIX) - pthread_setname_np(pthread_self(), name); -#elif defined(KE_WINDOWS) - impl::SetThreadName(::GetCurrentThread(), name); -#else - (void)name; -#endif -} - -static inline void SetThreadName(std::thread* thread, const char* name) { -#if defined(KE_POSIX) && !defined(KE_MACOSX) - pthread_setname_np(thread->native_handle(), name); -#elif defined(KE_WINDOWS) - impl::SetThreadName(thread->native_handle(), name); -#else - (void)thread; - (void)name; -#endif -} - -// Helper to allocate named threads. We can't subclass std::thread for this -// because the order of construction would be wrong. -template -static inline std::unique_ptr NewThread(const char* name, Function&& f, Args&&... args) -{ - auto callback = std::bind(std::forward(f), std::forward(args)...); - auto fn = [](const std::string& name, decltype(callback)&& callback) -> void { - SetThreadName(name.c_str()); - callback(); - }; - return std::make_unique(std::move(fn), std::string(name), std::move(callback)); -} - -} // namespace ke - diff --git a/metamod-source/third_party/amtl/amtl/am-threadlocal.h b/metamod-source/third_party/amtl/amtl/am-threadlocal.h deleted file mode 100644 index 9634d554..00000000 --- a/metamod-source/third_party/amtl/amtl/am-threadlocal.h +++ /dev/null @@ -1,185 +0,0 @@ -// vim: set sts=2 ts=8 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_thread_local_h_ -#define _include_amtl_thread_local_h_ - -#include -#include -#include -#include -#include - -#ifdef _WIN32 -# include -#else -# include -#endif - -namespace ke { - -// Stores a per-thread value. In single-threaded mode (KE_SINGLE_THREADED), -// this is a no-op container wrapper. -// -// T must be castable to uintptr_t. -// -// When assigning to a ThreadLocal, the assigment will automatically attempt -// to allocate thread-local storage from the operating system. If it fails, it -// will abort the program. If this is undesirable, you may call allocate() -// up-front and handle the error case manually. -// -// The number of thread local slots available to processes is limited (on -// Linux, it is generally 1024). It is best to use ThreadLocal sparingly to -// play nicely with other libraries. -// -// ThreadLocal will free the underlying thread-local storage slot in its -// destructor, but it is not an AutoPtr. It does not delete pointers. Since -// one thread's value is only observable from that thread, make sure to free -// the contained resource (if necessary) before the thread exits. -template -class ThreadLocal -{ - public: - void operator =(const T& other) { - set(other); - } - - T operator *() const { - return get(); - } - T operator ->() const { - return get(); - } - bool operator !() const { - return !get(); - } - bool operator ==(const T& other) const { - return get() == other; - } - bool operator !=(const T& other) const { - return get() != other; - } - - private: - ThreadLocal(const ThreadLocal& other) = delete; - ThreadLocal& operator =(const ThreadLocal& other) = delete; - -#if !defined(KE_SINGLE_THREADED) - private: - volatile int allocated_; - - public: - ThreadLocal() { - allocated_ = 0; - } - - T get() const { - if (!allocated_) - return T(); - return internalGet(); - } - void set(const T& t) { - if (!allocated_ && !allocate()) { - fprintf(stderr, "could not allocate thread-local storage\n"); - abort(); - } - internalSet(t); - } - -# if defined(_MSC_VER) - ~ThreadLocal() { - if (allocated_) - TlsFree(key_); - } - - private: - T internalGet() const { - return (T)reinterpret_cast(TlsGetValue(key_)); - } - void internalSet(const T& t) { - TlsSetValue(key_, cast_to_pointer::cast(t)); - } - bool allocate() { - if (InterlockedCompareExchange((volatile LONG*)&allocated_, 1, 0) == 1) - return true; - key_ = TlsAlloc(); - return key_ != TLS_OUT_OF_INDEXES; - } - - DWORD key_; - -# else - public: - ~ThreadLocal() { - if (allocated_) - pthread_key_delete(key_); - } - - bool allocate() { - if (!__sync_bool_compare_and_swap(&allocated_, 0, 1)) - return true; - return pthread_key_create(&key_, nullptr) == 0; - } - - private: - T internalGet() const { - return (T) reinterpret_cast(pthread_getspecific(key_)); - } - void internalSet(const T& t) { - pthread_setspecific(key_, reinterpret_cast(t)); - } - - pthread_key_t key_; -# endif // !_MSC_VER - -#else // KE_SINGLE_THREADED - public: - ThreadLocal() { - t_ = T(); - } - - bool allocate() { - return true; - } - - T get() const { - return t_; - } - void set(const T& t) { - t_ = t; - } - - private: - T t_; -#endif -}; - -} // namespace ke - -#endif // _include_amtl_thread_local_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-time.h b/metamod-source/third_party/amtl/amtl/am-time.h deleted file mode 100644 index 35fd4964..00000000 --- a/metamod-source/third_party/amtl/amtl/am-time.h +++ /dev/null @@ -1,82 +0,0 @@ -// vim: set sts=4 ts=8 sw=4 tw=99 et: -// -// Copyright (C) 2020, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#pragma once - -// Support pre g++-4.8 is buggy. -#if __cplusplus >= 201703L - -#include -#include - -#include -#include -#include -#include - -namespace ke { - -static inline constexpr std::chrono::nanoseconds -TimespecToDuration(timespec ts) -{ - auto duration = std::chrono::seconds{ts.tv_sec} + std::chrono::nanoseconds{ts.tv_nsec}; - return std::chrono::duration_cast(duration); -} - -template -static inline constexpr std::chrono::time_point -TimespecToTimePoint(timespec ts) -{ - auto duration = TimespecToDuration(ts); - return typename Clock::time_point{std::chrono::duration_cast(duration)}; -} - -// Uses the C++11 put_time() formatting, not strftime. -// See: https://en.cppreference.com/w/cpp/io/manip/put_time -static inline std::string FormatTime(const struct tm& tm, const char* fmt) -{ - std::ostringstream ss; - ss << std::put_time(&tm, fmt); - return ss.str(); -} - -static inline std::string FormatTime(const struct tm& tm, const std::string& str) -{ - return FormatTime(tm, str.c_str()); -} - -template -static inline constexpr TimePointType EpochValueToTimePoint(T t) -{ - auto duration = typename TimePointType::duration{t}; - return TimePointType(duration); -} - -} // namespace ke - -#endif diff --git a/metamod-source/third_party/amtl/amtl/am-unused.h b/metamod-source/third_party/amtl/amtl/am-unused.h deleted file mode 100644 index 92ea9f75..00000000 --- a/metamod-source/third_party/amtl/amtl/am-unused.h +++ /dev/null @@ -1,48 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_unused_ -#define _include_amtl_unused_ - -namespace ke { - -class Unused -{ - public: - Unused() { - } - - template - void operator<<(const T&) { - } -}; - -} // namespace ke - -#endif // _include_amtl_unused_ diff --git a/metamod-source/third_party/amtl/amtl/am-utility.h b/metamod-source/third_party/amtl/amtl/am-utility.h deleted file mode 100644 index 49463dd9..00000000 --- a/metamod-source/third_party/amtl/amtl/am-utility.h +++ /dev/null @@ -1,83 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2014, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_utility_h_ -#define _include_amtl_utility_h_ - -#define __STDC_FORMAT_MACROS -#include -#include -#include -#include - -#include - -#if defined(_MSC_VER) -// Mac file format warning. -# pragma warning(disable : 4355) -#endif - -namespace ke { - -// Zero out a non-array pointer. -template -static inline void -MemsetZero(T* t) { - memset(t, 0, sizeof(*t)); -} - -#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0])) -#define IS_ALIGNED(addr, alignment) (!(uintptr_t(addr) & ((alignment)-1))) - -#if defined(__GNUC__) -# define KE_CRITICAL_LIKELY(x) __builtin_expect(!!(x), 1) -#else -# define KE_CRITICAL_LIKELY(x) x -#endif - -template -struct cast_to_pointer { - static void* cast(const T& t) { - return reinterpret_cast((uintptr_t)t); - } -}; - -template -struct cast_to_pointer { - static const void* cast(const T* ptr) { - return ptr; - } - static void* cast(T* ptr) { - return ptr; - } -}; - -} // namespace ke - -#endif // _include_amtl_utility_h_ diff --git a/metamod-source/third_party/amtl/amtl/am-vector.h b/metamod-source/third_party/amtl/amtl/am-vector.h deleted file mode 100644 index 3a82129a..00000000 --- a/metamod-source/third_party/amtl/amtl/am-vector.h +++ /dev/null @@ -1,76 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#pragma once - -#include - -#include - -namespace ke { - -template -static inline void MoveExtend(std::vector* dest, std::vector* src) { - if (dest->empty()) { - *dest = std::move(*src); - } else { - for (size_t i = 0; i < src->size(); i++) - dest->emplace_back(std::move(src->at(i))); - src->clear(); - } -} - -template -static inline T PopBack(std::vector* src) { - T t = std::move(src->back()); - src->pop_back(); - return t; -} - -template -static inline void RemoveAt(std::vector* vec, size_t at) { - vec->erase(vec->begin() + at); -} - -template -static inline void InsertAt(std::vector* vec, size_t at, const T& item) { - vec->insert(vec->begin() + at, item); -} - -template -static inline void InsertAt(std::vector* vec, size_t at, T&& item) { - vec->insert(vec->begin() + at, std::forward(item)); -} - -template -static inline void EmplaceAt(std::vector* vec, size_t at, Args&&... item) { - vec->emplace(vec->begin() + at, std::forward(item)...); -} - -} // namespace ke diff --git a/metamod-source/third_party/amtl/amtl/experimental/am-argparser.cpp b/metamod-source/third_party/amtl/amtl/experimental/am-argparser.cpp deleted file mode 100644 index ce274e50..00000000 --- a/metamod-source/third_party/amtl/amtl/experimental/am-argparser.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// vim: set sts=8 ts=4 sw=4 tw=99 et: -// -// Copyright (C) 2018, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include - -namespace ke { -namespace args { - -std::vector *Parser::sStaticOptions = nullptr; - -} // namespace args -} // namespace ke diff --git a/metamod-source/third_party/amtl/amtl/experimental/am-argparser.h b/metamod-source/third_party/amtl/amtl/experimental/am-argparser.h deleted file mode 100644 index 43a3e32a..00000000 --- a/metamod-source/third_party/amtl/amtl/experimental/am-argparser.h +++ /dev/null @@ -1,1047 +0,0 @@ -// vim: set sts=8 ts=4 sw=4 tw=99 et: -// -// Copyright (C) 2018, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_am_argparser_h_ -#define _include_amtl_am_argparser_h_ - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace ke { -namespace args { - -class IOption; -class StopOption; - -class Parser -{ - template - friend class Option; - - public: - inline Parser(); - explicit inline Parser(const char* help); - - inline void add(IOption* option); - inline bool parse(int argc, char** argv); - inline bool parse(const std::vector& args); - inline bool parse(const std::vector& args); - inline bool parsev(const char* arg1, ...); - - inline void usage(FILE* fp, int argc, char** argv); - inline void usage_line(char** argv, FILE* out); - - inline void add_usage_line(const char* option, const char* help); - - inline void reset(); - - // Enable the following patterns: - // -s:N - // -sN - // This is for compatibility with spcomp. It only works when the short - // form is one character. - void enable_inline_values() { - inline_values_ = true; - } - - // Allow /Option instead of -Option. - void allow_slashes() { - allow_slashes_ = true; - } - - // Collect values that are not options (i.e. do not start with a dash or - // slash), and are not positionals. - void collect_extra_args() { - collect_extra_args_ = true; - } - - // Recognize -- and place all additional arguments into passthrough_args(). - void allow_passthrough_args() { - allow_passthrough_args_ = true; - } - - const std::vector& extra_args() const { - return extra_args_; - } - std::vector& passthrough_args() { - return passthrough_args_; - } - - void set_usage_line(const char* usage) { - usage_line_ = usage; - } - - static void add_static_option(IOption* option) { - if (!sStaticOptions) - sStaticOptions = new std::vector(); - sStaticOptions->emplace_back(option); - } - - private: - inline bool parse_impl(const std::vector& args); - - inline IOption* find_short(const char* short_form, size_t len); - inline IOption* find_long(const char* long_form, size_t len); - inline IOption* find_inline_short(char c); - - inline bool unrecognized_option(const char* arg); - inline bool unrecognized_extra(); - inline bool option_needs_value(IOption* option); - inline bool option_invalid_value(IOption* option, const char* value); - inline bool missing_positional(IOption* option); - inline bool option_already_specified(IOption* option); - - static std::vector* sStaticOptions; - - private: - std::vector options_; - std::vector positionals_; - std::string help_; - std::string error_; - std::string usage_line_; - bool inline_values_ = false; - bool allow_slashes_ = false; - bool collect_extra_args_ = false; - bool allow_passthrough_args_ = false; - bool has_passthrough_args_ = false; - std::unique_ptr help_option_; - std::vector extra_args_; - std::vector passthrough_args_; - std::vector> extra_usage_; -}; - -class IOption -{ - friend class Parser; - - virtual bool mustOmitValue() const { - return false; - } - virtual bool canOmitValue() const { - return false; - } - virtual bool haltOnValue() const { - return false; - } - virtual bool canPrefixWithNo() const { - return false; - } - virtual bool consumeValue(const char* arg) = 0; - virtual void reset() {} - virtual bool willRepeat() const { - return false; - } - - public: - virtual ~IOption() { - } - - protected: - IOption(const char* short_form, const char* long_form, const char* name, const char* help) - : short_form_(short_form), - long_form_(long_form), - name_(name), - help_(help) - { - // Cannot have both short/longform and name. - assert(((short_form || long_form) && !name_) || (!short_form && !long_form && name_)); - - if (short_form_ && short_form_[0] == '-') - short_form_++; - if (long_form_ && long_form_[0] == '-' && long_form_[1] == '-') - long_form_ += 2; - - if (short_form_) - assert(short_form_[0] && short_form_[0] != '-'); - if (long_form_) - assert(long_form_[0] && long_form_[0] != '-'); - } - - const char* short_form() const { - return short_form_; - } - const char* long_form() const { - return long_form_; - } - const char* name() const { - return name_; - } - const char* help() const { - return help_; - } - - const char* pretty_name() const { - if (name_) - return name_; - if (long_form_) - return long_form_; - return short_form_; - } - - protected: - const char* short_form_; - const char* long_form_; - const char* name_; - const char* help_; -}; - -class UsageOnlyOption final : public IOption -{ - public: - UsageOnlyOption(const char* option, const char* help) - : IOption(nullptr, nullptr, option, help) - {} - - bool consumeValue(const char* arg) override { - return false; - } -}; - -template -struct ValuePolicy; - -template -class Option : public IOption -{ - typedef ValuePolicy T; - - public: - Option(Parser& parser, const char* short_form, const char* long_form, - const Maybe& default_value, const char* help) - : IOption(short_form, long_form, nullptr, help), - default_value_(default_value) - { - parser.add(this); - } - - Option(Parser& parser, const char* name, const char* help) - : IOption(nullptr, nullptr, name, help) - { - parser.add(this); - } - - Option(const char* short_form, const char* long_form, - const Maybe& default_value, const char* help) - : IOption(short_form, long_form, nullptr, help), - default_value_(default_value) - { - Parser::add_static_option(this); - } - - Option(const char* name, const char* help) - : IOption(nullptr, nullptr, name, help) - { - Parser::add_static_option(this); - } - - ~Option() - {} - - bool hasValue() const { - return value_.isValid() || default_value_.isValid(); - } - const ValueType& value() const { - return value_.isValid() ? value_.get() : default_value_.get(); - } - Maybe maybeValue() const { - if (value_.isValid()) - return value_; - return default_value_; - } - bool willRepeat() const override { - return !value_.isValid(); - } - - protected: - bool canOmitValue() const override { - return !name_ && T::canOmitValue(); - } - bool consumeValue(const char* arg) override { - ValueType value; - if (!T::consumeValue(arg, &value)) - return false; - value_ = Some(value); - return true; - } - void reset() override { - value_ = {}; - } - - private: - Maybe default_value_; - Maybe value_; -}; - -// This is an option that returns true if specified. If prefixed with "--no-", -// it returns false. -class EnableOption : public IOption -{ - public: - EnableOption(Parser& parser, const char* short_form, const char* long_form, bool default_value, - const char* help) - : IOption(short_form, long_form, nullptr, help), - default_value_(default_value) - { - parser.add(this); - } - - EnableOption(const char* short_form, const char* long_form, bool default_value, - const char* help) - : IOption(short_form, long_form, nullptr, help), - default_value_(default_value) - { - Parser::add_static_option(this); - } - - bool value() const { - return value_.isValid() ? value_.get() : default_value_; - } - bool consumeValue(const char* arg) override { - value_ = Some(strcmp(arg, "true") == 0); - return true; - } - void reset() override { - value_ = {}; - } - bool willRepeat() const override { - return !value_.isValid(); - } - - protected: - bool mustOmitValue() const override { - return true; - } - bool canPrefixWithNo() const override { - return true; - } - - private: - bool default_value_; - Maybe value_; -}; - -// This is an option that flips a boolean (the default value, if none is given -// in the constructor, will be false -> true). -class ToggleOption : public IOption -{ - friend class Parser; - - public: - ToggleOption(Parser& parser, const char* short_form, const char* long_form, - const Maybe& default_value, const char* help) - : IOption(short_form, long_form, nullptr, help) - { - if (default_value.isValid()) - default_value_ = default_value.get(); - parser.add(this); - } - - ToggleOption(const char* short_form, const char* long_form, - const Maybe& default_value, const char* help) - : IOption(short_form, long_form, nullptr, help) - { - if (default_value.isValid()) - default_value_ = default_value.get(); - Parser::add_static_option(this); - } - - bool value() const { - return value_.isValid() ? value_.get() : default_value_; - } - bool willRepeat() const override { - return !value_.isValid(); - } - - protected: - virtual bool canOmitValue() const override { - return true; - } - bool mustOmitValue() const override { - return true; - } - bool consumeValue(const char* arg) override { - if (arg) - return false; - value_ = Some(!default_value_); - return true; - } - void reset() override { - value_ = {}; - } - - private: - bool default_value_ = false; - Maybe value_; -}; - -// This is a ToggleOption that will stop argument processing and force -// parse_args to return true. It is the responsibility of the implementor -// to check all StopOptions before any other options, as a true return -// from parse_args() may have only filled one of them. -class StopOption : public ToggleOption -{ - public: - StopOption(Parser& parser, const char* short_form, const char* long_form, - const Maybe& default_value, const char* help) - : ToggleOption(parser, short_form, long_form, default_value, help) - {} - - StopOption(const char* short_form, const char* long_form, - const Maybe& default_value, const char* help) - : ToggleOption(short_form, long_form, default_value, help) - {} - - protected: - bool haltOnValue() const override { - return true; - } -}; - -// This is the base class for an option that can be repeated multiple times, -// or can have its value repeated multiple times. (The latter is not yet -// implemented). -template -class VectorOption : public IOption -{ - typedef ValuePolicy T; - - public: - VectorOption(Parser& parser, const char* short_form, const char* long_form, const char* help) - : IOption(short_form, long_form, nullptr, help) - { - parser.add(this); - } - - VectorOption(const char* short_form, const char* long_form, const char* help) - : IOption(short_form, long_form, nullptr, help) - { - Parser::add_static_option(this); - } - - std::vector& values() { - return values_; - } - const std::vector& values() const { - return values_; - } - - protected: - bool consumeValue(const char* arg) override { - ValueType value; - if (!T::consumeValue(arg, &value)) - return false; - values_.emplace_back(value); - return true; - } - void reset() override { - values_.clear(); - } - bool willRepeat() const override { - return true; - } - - protected: - std::vector values_; -}; - -// This is for an option can be repeated multiple times. -template -class RepeatOption : public VectorOption -{ - public: - RepeatOption(Parser& parser, const char* short_form, const char* long_form, const char* help) - : VectorOption(parser, short_form, long_form, help) - {} - - RepeatOption(const char* short_form, const char* long_form, const char* help) - : VectorOption(short_form, long_form, help) - {} -}; - -// Value policies should inherit from this. -struct BaseValuePolicy { - // Return true if an argument of this type can omit a value. - static constexpr bool canOmitValue() { - return false; - } -}; - -template <> -struct ValuePolicy { - static constexpr bool canOmitValue() { - return true; - } - - static bool consumeValue(const char* arg, bool* out) { - if (!arg) { - *out = true; - return true; - } - if (StrCaseCmp(arg, "true") == 0) { - *out = true; - return true; - } - if (StrCaseCmp(arg, "false") == 0) { - *out = false; - return true; - } - return false; - } -}; - -template <> -struct ValuePolicy : public BaseValuePolicy { - static bool consumeValue(const char* arg, std::string* out) { - if (strlen(arg) == 0) - return false; - *out = arg; - return true; - } -}; - -template <> -struct ValuePolicy : public BaseValuePolicy { - static bool consumeValue(const char* arg, int* out) { - char* endptr = nullptr; - *out = strtol(arg, &endptr, 10); - if (endptr == arg || *endptr != '\0') - return false; - return true; - } -}; - -typedef Option StringOption; -typedef Option IntOption; - -inline Parser::Parser() -{ - if (sStaticOptions) { - for (const auto& option : *sStaticOptions) - add(option); - } -} - -inline Parser::Parser(const char* help) -{ - if (help) - help_ = help; - - help_option_ = std::make_unique(*this, "h", "help", Some(false), "Display this help menu."); - - if (sStaticOptions) { - for (const auto& option : *sStaticOptions) - add(option); - } -} - -inline void -Parser::add(IOption* option) -{ - if (option->short_form() || option->long_form()) - options_.emplace_back(option); - else - positionals_.emplace_back(option); -} - -inline bool -Parser::parse(int argc, char** argv) -{ - std::vector args; - for (int i = 1; i < argc; i++) - args.emplace_back(argv[i]); - return parse_impl(args); -} - -inline bool -Parser::parse(const std::vector& args) -{ - return parse_impl(args); -} - -inline bool -Parser::parse(const std::vector& args) -{ - std::vector ptr_args; - for (size_t i = 0; i < args.size(); i++) - ptr_args.emplace_back(args[i].c_str()); - return parse_impl(ptr_args); -} - -inline bool -Parser::parsev(const char* arg1, ...) -{ - va_list ap; - va_start(ap, arg1); - - std::vector argv; - const char* arg = arg1; - while (arg) { - argv.emplace_back(arg); - arg = va_arg(ap, const char*); - } - - return parse_impl(argv); -} - -inline bool -Parser::parse_impl(const std::vector& args) -{ - size_t positional = 0; - bool halted_on_value = false; - - for (size_t i = 0; i < args.size(); i++) { - const char* arg = args[i]; - IOption* option = nullptr; - - if (allow_passthrough_args_ && !strcmp(arg, "--")) { - has_passthrough_args_ = true; - continue; - } - if (has_passthrough_args_) { - passthrough_args_.emplace_back(arg); - continue; - } - - const char* value_ptr = nullptr; - if (arg[0] == '-' || (allow_slashes_ && arg[0] == '/')) { - // Arguments can look like: - // -key - // -key val - // -key=val - // --key - // --key val - // --key=val - // Or with inline values enabled, - // -keyval - // -key:val - size_t len = strlen(arg); - const char* sep = strchr(arg, '='); - if (!sep && inline_values_) - sep = strchr(arg, ':'); - if (inline_values_ && sep && strlen(sep + 1) == 0) - sep = nullptr; // Don't allow -key= or -key: with no arg. - if (sep) - len = sep - arg; - - if (arg[0] == '-' && arg[1] == '-') { - option = find_long(&arg[2], len - 2); - } else { - option = find_short(&arg[1], len - 1); - if (!option && inline_values_) { - option = find_inline_short(arg[1]); - if (option && len > 2) - sep = arg + 1; - } - } - - if (!option && strncmp(arg, "--no-", 5) == 0) { - option = find_long(&arg[5], len - 5); - if (option->canPrefixWithNo()) - value_ptr = "false"; - else - option = nullptr; - } else if (option && option->canPrefixWithNo()) { - value_ptr = "true"; - } - - if (!option) - return unrecognized_option(arg); - if (!option->willRepeat()) - return option_already_specified(option); - - if (sep) { - if (option->mustOmitValue()) - return option_invalid_value(option, sep + 1); - value_ptr = sep + 1; - } - } else { - // Positional arguments have an implicit key - the next argument in - // position. - if (positional >= positionals_.size()) { - if (!collect_extra_args_) - return unrecognized_extra(); - - extra_args_.emplace_back(arg); - continue; - } - - option = positionals_[positional++]; - value_ptr = arg; - } - - bool took_next_arg = false; - if (!value_ptr) { - if (i == args.size() - 1) { - if (!option->canOmitValue()) - return option_needs_value(option); - } else if (!option->mustOmitValue()) { - value_ptr = args[++i]; - took_next_arg = true; - } - } - - if (!option->consumeValue(value_ptr)) { - if (!option->canOmitValue()) - return option_invalid_value(option, value_ptr); - if (took_next_arg) - i--; - } - - if (option->haltOnValue()) { - halted_on_value = true; - break; - } - } - - if (!halted_on_value && positional < positionals_.size()) - return missing_positional(positionals_[positional]); - - // Force the app to display a help message. - if (help_option_ && help_option_->value()) - return false; - - return true; -} - -inline IOption* -Parser::find_short(const char* short_form, size_t len) -{ - for (IOption* option : options_) { - if (!option->short_form()) - continue; - if (strlen(option->short_form()) == len && - strncmp(option->short_form(), short_form, len) == 0) { - return option; - } - } - return nullptr; -} - -inline IOption* -Parser::find_inline_short(char c) -{ - for (IOption* option : options_) { - if (!option->short_form()) - continue; - if (strlen(option->short_form()) == 1 && option->short_form()[0] == c) - return option; - } - return nullptr; -} - -inline IOption* -Parser::find_long(const char* long_form, size_t len) -{ - for (IOption* option : options_) { - if (!option->long_form()) - continue; - if (strlen(option->long_form()) == len && - strncmp(option->long_form(), long_form, len) == 0) { - return option; - } - } - return nullptr; -} - -inline bool -Parser::unrecognized_option(const char* arg) -{ - error_ = StringPrintf("Unrecognized option: %s", arg); - return false; -} - -inline bool -Parser::unrecognized_extra() -{ - error_ = "Unrecognized extra arguments at end of command."; - return false; -} - -inline bool -Parser::option_needs_value(IOption* option) -{ - error_ = StringPrintf("Option '%s' needs a value.", option->pretty_name()); - return false; -} - -inline bool -Parser::option_invalid_value(IOption* option, const char* value) -{ - error_ = StringPrintf("Argument '%s' did not recognize value: %s", option->pretty_name(), value); - return false; -} - -inline bool -Parser::missing_positional(IOption* option) -{ - error_ = StringPrintf("Missing value for '%s'.", option->pretty_name()); - return false; -} - -inline bool -Parser::option_already_specified(IOption* option) -{ - error_ = StringPrintf("Option '%s' was specified more than once.", option->pretty_name()); - return false; -} - -inline void -Parser::usage(FILE* fp, int argc, char** argv) -{ - bool display_full_help = false; - - if (error_.size()) { - // Scan to see if we got a help request. - for (int i = 1; i < argc; i++) { - if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0) { - display_full_help = true; - break; - } - } - - if (!help_option_ || !display_full_help) { - usage_line(argv, fp); - fprintf(fp, "error: %s\n", error_.c_str()); - return; - } - - // Otherwise, discard the error, and show the full help menu. - } - - if (!help_.empty()) { - fprintf(fp, "%s\n", help_.c_str()); - fprintf(fp, "\n"); - } - - usage_line(argv, fp); - - struct Entry { - explicit Entry(IOption* option) - : col_width(0), - option(option) - {} - Entry(Entry&& other) - : opt_lines(std::move(other.opt_lines)), - help_lines(std::move(other.help_lines)), - col_width(other.col_width), - option(other.option) - {} - Entry& operator =(Entry&& other) { - opt_lines = std::move(other.opt_lines); - help_lines = std::move(other.help_lines); - col_width = other.col_width; - option = other.option; - return *this; - } - std::vector opt_lines; - std::vector help_lines; - size_t col_width; - IOption* option; - }; - - static const size_t kIndent = 2; - std::unique_ptr indent = std::make_unique(kIndent + 1); - for (size_t i = 0; i < kIndent; i++) - indent[i] = ' '; - indent[kIndent] = '\0'; - - // Add positional arguments first. - std::vector entries; - for (IOption* option : positionals_) { - Entry entry(option); - - std::string name = StringPrintf("%s%s", indent.get(), option->name()); - entry.opt_lines.emplace_back(std::move(name)); - entries.emplace_back(std::move(entry)); - } - - static const size_t kMaxLineLength = 80; - static const size_t kMaxLeftColLength = 28; - static const size_t kMaxRightColLength = kMaxLineLength - kMaxLeftColLength; - - // Next add long and short form arguments. - for (IOption* option : options_) { - Entry entry(option); - - std::string value_suffix; - if (!option->mustOmitValue() && !option->canOmitValue()) { - const char* name = option->long_form() ? option->long_form() : option->short_form(); - std::string decorated = Uppercase(Join(Split(name, "-"), "_").c_str()); - value_suffix = StringPrintf("=%s", decorated.c_str()); - } - - if (option->short_form() && option->long_form()) { - std::string joined = StringPrintf("%s-%s, --%s%s ", indent.get(), option->short_form(), - option->long_form(), value_suffix.c_str()); - - // Try to fit both options in one cell. - if (joined.size() <= kMaxLeftColLength) { - entry.opt_lines.emplace_back(std::move(joined)); - entries.emplace_back(std::move(entry)); - continue; - } - } - - // We need to put each form on a separate line. - if (option->short_form()) { - std::string short_form = StringPrintf("%s-%s ", indent.get(), option->short_form()); - entry.opt_lines.emplace_back(std::move(short_form)); - } - if (option->long_form()) { - std::string long_form = StringPrintf("%s--%s%s ", indent.get(), option->long_form(), value_suffix.c_str()); - entry.opt_lines.emplace_back(std::move(long_form)); - } - entries.emplace_back(std::move(entry)); - } - - // Add extra usage lines. - for (const auto& option : extra_usage_) { - Entry entry(option.get()); - - std::string name = StringPrintf("%s%s", indent.get(), option->name()); - entry.opt_lines.emplace_back(std::move(name)); - entries.emplace_back(std::move(entry)); - } - - // If we don't have any arguments to display, stop here. - if (entries.empty()) - return; - - // Precompute some information about each option. - for (Entry& entry : entries) { - // Compute the maximum size of each left hand cell. - for (const std::string& line : entry.opt_lines) - entry.col_width = std::max(entry.col_width, line.size()); - - // Break help text into words, and fit some words on each line. Each line - // gets at least one word even if the word is too long. - std::vector words = Split(entry.option->help(), " "); - - std::vector line; - size_t line_size = 0; - for (std::string& word : words) { - if (line_size + word.size() + 1 >= kMaxRightColLength && !line.empty()) { - entry.help_lines.emplace_back(Join(line, " ")); - line.clear(); - line_size = 0; - } - line_size += word.size() + 1; - line.emplace_back(std::move(word)); - } - if (!line.empty()) - entry.help_lines.emplace_back(Join(line, " ")); - } - - // Finally, print detailed usage. When possible we put both the option and - // its help on one line, but if the left-hand cell is too big we use - // separate lines. - if (!positionals_.empty()) { - fprintf(fp, "\n"); - fprintf(fp, "positional arguments:\n"); - } - - char spaces[29]; - memset(spaces, ' ', sizeof(spaces) - 1); - spaces[sizeof(spaces) - 1] = '\0'; - - bool started_optional = false; - for (const Entry& entry : entries) { - if (!entry.option->name() && !started_optional) { - fprintf(fp, "\n"); - fprintf(fp, "optional arguments:\n"); - started_optional = true; - } - - size_t help_line_cursor = 0; - if (entry.col_width >= kMaxLeftColLength) { - for (const std::string& line : entry.opt_lines) - fprintf(fp, "%s\n", line.c_str()); - } else { - for (const std::string& line : entry.opt_lines) { - const char* right_col = (help_line_cursor < entry.help_lines.size()) - ? entry.help_lines[help_line_cursor++].c_str() - : ""; - fprintf(fp, "%-28s%s\n", line.c_str(), right_col); - } - } - - for (size_t i = help_line_cursor; i < entry.help_lines.size(); i++) - fprintf(fp, "%s%s\n", spaces, entry.help_lines[i].c_str()); - } -} - -void -Parser::usage_line(char** argv, FILE* out) -{ - std::vector words; - - words.emplace_back("Usage:"); - words.emplace_back(argv ? argv[0] : " "); - if (usage_line_.empty()) { - words.emplace_back("[-h]"); - for (IOption* option : positionals_) - words.emplace_back(option->name()); - } else { - words.emplace_back(usage_line_); - } - - std::string text = Join(words, " "); - fprintf(out, "%s\n", text.c_str()); -} - -void -Parser::add_usage_line(const char* option, const char* help) -{ - extra_usage_.emplace_back(std::make_unique(option, help)); -} - -inline void -Parser::reset() -{ - for (IOption* option : options_) - option->reset(); - for (IOption* option : positionals_) - option->reset(); - if (help_option_) - help_option_->reset(); -} - -} // namespace args -} // namespace ke - -#endif // _include_amtl_am_argparser_h_ diff --git a/metamod-source/third_party/amtl/amtl/os/am-fsutil-posix.h b/metamod-source/third_party/amtl/amtl/os/am-fsutil-posix.h deleted file mode 100644 index 42994157..00000000 --- a/metamod-source/third_party/amtl/amtl/os/am-fsutil-posix.h +++ /dev/null @@ -1,68 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2015, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_os_fsutil_posix_h_ -#define _include_amtl_os_fsutil_posix_h_ - -#include -#include - -namespace ke { -namespace file { - -static inline bool -PathExists(const char* path) { - struct stat s; - return (stat(path, &s) == 0); -} - -static inline bool -IsFile(const char* path) { - struct stat s; - if (stat(path, &s) != 0) - return false; - return S_ISREG(s.st_mode) ? true : false; -} - -static inline bool -IsDirectory(const char* path) { - struct stat s; - if (stat(path, &s) != 0) - return false; - return S_ISDIR(s.st_mode) ? true : false; -} - -static inline bool -CreateDirectory(const char* path, unsigned mode = 0755) { - return mkdir(path, mode) == 0; -} - -} // namespace file -} // namespace ke - -#endif // _include_amtl_os_fsutil_posix_h_ diff --git a/metamod-source/third_party/amtl/amtl/os/am-fsutil-windows.h b/metamod-source/third_party/amtl/amtl/os/am-fsutil-windows.h deleted file mode 100644 index 46fd75cd..00000000 --- a/metamod-source/third_party/amtl/amtl/os/am-fsutil-windows.h +++ /dev/null @@ -1,70 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2015, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_os_fsutil_windows_h_ -#define _include_amtl_os_fsutil_windows_h_ - -#define WIN32_LEAN_AND_MEAN -#include -#include - -namespace ke { -namespace file { - -static inline bool -PathExists(const char* path) { - return GetFileAttributesA(path) != INVALID_FILE_ATTRIBUTES; -} - -static inline bool -IsFile(const char* path) { - DWORD attr = GetFileAttributesA(path); - if (attr == INVALID_FILE_ATTRIBUTES) - return false; - if (attr & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_DEVICE)) - return false; - return true; -} - -static inline bool -IsDirectory(const char* path) { - DWORD attr = GetFileAttributesA(path); - if (attr == INVALID_FILE_ATTRIBUTES) - return false; - return (attr & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_DEVICE)) == FILE_ATTRIBUTE_DIRECTORY; -} - -static inline bool -CreateDirectory(const char* path, unsigned mode_IGNORED = 0) { - return mkdir(path) == 0; -} - -} // namespace file -} // namespace ke - -#endif // _include_amtl_os_fsutil_windows_h_ diff --git a/metamod-source/third_party/amtl/amtl/os/am-fsutil.h b/metamod-source/third_party/amtl/amtl/os/am-fsutil.h deleted file mode 100644 index e599a4ca..00000000 --- a/metamod-source/third_party/amtl/amtl/os/am-fsutil.h +++ /dev/null @@ -1,44 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2015, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_os_fsutil_h_ -#define _include_amtl_os_fsutil_h_ - -#include -#include -#if defined(KE_WINDOWS) -# include -#else -# include -#endif - -namespace ke { -namespace file {} // namespace file -} // namespace ke - -#endif // _include_amtl_os_fsutil_h_ diff --git a/metamod-source/third_party/amtl/amtl/os/am-path.h b/metamod-source/third_party/amtl/amtl/os/am-path.h deleted file mode 100644 index 0908455d..00000000 --- a/metamod-source/third_party/amtl/amtl/os/am-path.h +++ /dev/null @@ -1,67 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2015, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_os_path_h_ -#define _include_amtl_os_path_h_ - -#include -#include - -namespace ke { -namespace path { - -static inline size_t -FormatVa(char* dest, size_t maxlength, const char* fmt, va_list ap) { - size_t len = SafeVsprintf(dest, maxlength, fmt, ap); - - for (size_t i = 0; i < len; i++) { -#if defined(KE_WINDOWS) - if (dest[i] == '/') - dest[i] = '\\'; -#else - if (dest[i] == '\\') - dest[i] = '/'; -#endif - } - - return len; -} - -static inline size_t -Format(char* dest, size_t maxlength, const char* fmt, ...) { - va_list ap; - va_start(ap, fmt); - size_t len = FormatVa(dest, maxlength, fmt, ap); - va_end(ap); - return len; -} - -} // namespace path -} // namespace ke - -#endif // _include_amtl_os_path_h_ diff --git a/metamod-source/third_party/amtl/amtl/os/am-shared-library.h b/metamod-source/third_party/amtl/amtl/os/am-shared-library.h deleted file mode 100644 index 21227c99..00000000 --- a/metamod-source/third_party/amtl/amtl/os/am-shared-library.h +++ /dev/null @@ -1,121 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2015, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_os_sharedlib_h_ -#define _include_amtl_os_sharedlib_h_ - -#include -#include -#if defined(KE_WINDOWS) -# define WIN32_LEAN_AND_MEAN -# include -# include -#else -# include -# include -#endif - -namespace ke { - -class SharedLib : public Refcounted -{ -#if defined(KE_WINDOWS) - typedef HMODULE SysType; -#else - typedef void* SysType; -#endif - - public: - SharedLib() - : lib_(nullptr) { - } - explicit SharedLib(const SysType& lib) - : lib_(lib) { - } - explicit SharedLib(const char* path) { -#if defined(KE_WINDOWS) - lib_ = LoadLibraryA(path); -#else - lib_ = dlopen(path, RTLD_NOW); -#endif - } - ~SharedLib() { - if (lib_ == nullptr) - return; - -#if defined(KE_WINDOWS) - FreeLibrary(lib_); -#else - dlclose(lib_); -#endif - } - - explicit operator bool() const { - return !!lib_; - } - - static inline AlreadyRefed Open(const char* path, char* error = nullptr, - size_t maxlength = 0) { - RefPtr lib = new SharedLib(path); - if (!lib || !lib->valid()) { - if (!error || !maxlength) - return nullptr; -#if defined(KE_WINDOWS) - FormatSystemError(error, maxlength); -#else - SafeStrcpy(error, maxlength, dlerror()); -#endif - return nullptr; - } - return lib.forget(); - } - - void* lookup(const char* symbol) { -#if defined(KE_WINDOWS) - return reinterpret_cast(GetProcAddress(lib_, symbol)); -#else - return dlsym(lib_, symbol); -#endif - } - - template - T get(const char* symbol) { - return reinterpret_cast(lookup(symbol)); - } - - bool valid() const { - return !!lib_; - } - - private: - SysType lib_; -}; - -} // namespace ke - -#endif // _include_amtl_os_sharedlib_h_ diff --git a/metamod-source/third_party/amtl/amtl/os/am-system-errors.h b/metamod-source/third_party/amtl/amtl/os/am-system-errors.h deleted file mode 100644 index e466e828..00000000 --- a/metamod-source/third_party/amtl/amtl/os/am-system-errors.h +++ /dev/null @@ -1,71 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013-2015, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#ifndef _include_amtl_os_system_errors_h_ -#define _include_amtl_os_system_errors_h_ - -#if defined(KE_WINDOWS) -# define WIN32_LEAN_AND_MEAN -# include -#else -# include -#endif -#include -#include - -namespace ke { - -static inline void -FormatSystemErrorCode(int code, char* error, size_t maxlength) { -#if defined(KE_WINDOWS) - if (!FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, nullptr, code, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), error, maxlength, nullptr)) { - SafeSprintf(error, maxlength, "error code %08x", code); - return; - } -#elif defined(KE_LINUX) && defined(__GLIBC__) - const char* ptr = strerror_r(code, error, maxlength); - if (ptr != error) - ke::SafeSprintf(error, maxlength, "%s", ptr); -#else - strerror_r(code, error, maxlength); -#endif -} - -static inline void -FormatSystemError(char* error, size_t maxlength) { -#if defined(KE_WINDOWS) - FormatSystemErrorCode(GetLastError(), error, maxlength); -#else - FormatSystemErrorCode(errno, error, maxlength); -#endif -} - -} // namespace ke - -#endif // _include_amtl_os_system_errors_h_ diff --git a/metamod-source/third_party/amtl/appveyor.yml b/metamod-source/third_party/amtl/appveyor.yml deleted file mode 100644 index c9d431d6..00000000 --- a/metamod-source/third_party/amtl/appveyor.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 1.0.{build} -clone_folder: c:\projects\amtl -install: -- cmd: .appveyor\setup_environment.bat -build_script: -- cmd: .appveyor\build.bat diff --git a/metamod-source/third_party/amtl/checkout-deps.sh b/metamod-source/third_party/amtl/checkout-deps.sh deleted file mode 100644 index 5caaca68..00000000 --- a/metamod-source/third_party/amtl/checkout-deps.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env bash -# This should be run inside a folder that contains sourcemod, otherwise, it will checkout things into "sm-dependencies". - -trap "exit" INT - -ismac=0 -iswin=0 - -if [ `uname` = "Darwin" ]; then - ismac=1 -elif [ `uname` != "Linux" ] && [ -n "${COMSPEC:+1}" ]; then - iswin=1 -fi - -checkout () -{ - if [ ! -d "$name" ]; then - git clone $repo -b $branch $name - if [ -n "$origin" ]; then - cd $name - git remote rm origin - git remote add origin $origin - cd .. - fi - else - cd $name - git checkout $branch - git pull origin $branch - cd .. - fi -} - -python_cmd=`command -v python` -if [ -z "$python_cmd" ]; then - python_cmd=`command -v python3` - - if [ -z "$python_cmd" ]; then - echo "No suitable installation of Python detected" - exit 1 - fi -fi - -`$python_cmd -c "import ambuild2"` 2>&1 1>/dev/null -if [ $? -eq 1 ]; then - echo "AMBuild is required to build AMTL" - - `$python_cmd -m pip --version` 2>&1 1>/dev/null - if [ $? -eq 1 ]; then - echo "The detected Python installation does not have PIP" - echo "Installing the latest version of PIP available (VIA \"get-pip.py\")" - - get_pip="./get-pip.py" - get_pip_url="https://bootstrap.pypa.io/get-pip.py" - - if [ `command -v wget` ]; then - wget $get_pip_url -O $get_pip --no-check-certificate - elif [ `command -v curl` ]; then - curl -o $get_pip $get_pip_url --insecure - else - echo "Failed to locate wget or curl. Install one of these programs to download 'get-pip.py'." - exit 1 - fi - - $python_cmd $get_pip - if [ $? -eq 1 ]; then - echo "Installation of PIP has failed" - exit 1 - fi - fi - - repo="https://github.com/alliedmodders/ambuild" - origin= - branch=master - name=ambuild - checkout - - if [ $iswin -eq 1 ] || [ $ismac -eq 1 ]; then - $python_cmd -m pip install ./ambuild - else - echo "Installing AMBuild at the user level. Location can be: ~/.local/bin" - $python_cmd -m pip install --user ./ambuild - fi -fi diff --git a/metamod-source/third_party/amtl/compat/stdcxx.cpp b/metamod-source/third_party/amtl/compat/stdcxx.cpp deleted file mode 100644 index a9fbcfb9..00000000 --- a/metamod-source/third_party/amtl/compat/stdcxx.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2023, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include - -extern "C" { - double __attribute__((weak)) __pow_finite(double x, double y) { return pow(x, y); } - double __attribute__((weak)) __atan2_finite(double x, double y) { return atan2(x, y); } - double __attribute__((weak)) __log_finite(double x) { return log(x); } - double __attribute__((weak)) __acos_finite(double x) { return acos(x); } - double __attribute__((weak)) __asin_finite(double x) { return asin(x); } - - float __attribute__((weak)) __powf_finite(float x, float y) { return powf(x, y); } - float __attribute__((weak)) __atan2f_finite(float x, float y) { return atan2f(x, y); } - float __attribute__((weak)) __logf_finite(float x) { return logf(x); } - float __attribute__((weak)) __acosf_finite(float x) { return acosf(x); } - float __attribute__((weak)) __asinf_finite(float x) { return asinf(x); } -} diff --git a/metamod-source/third_party/amtl/configure.py b/metamod-source/third_party/amtl/configure.py deleted file mode 100644 index dd15b681..00000000 --- a/metamod-source/third_party/amtl/configure.py +++ /dev/null @@ -1,27 +0,0 @@ -# vim: set ts=2 sw=2 tw=99 noet: -import sys -try: - from ambuild2 import run -except: - try: - import ambuild - sys.stderr.write('It looks like you have AMBuild 1 installed, but this project uses AMBuild 2.\n') - sys.stderr.write('Upgrade to the latest version of AMBuild to continue.\n') - except: - sys.stderr.write('AMBuild must be installed to build this project.\n') - sys.stderr.write('http://www.alliedmods.net/ambuild\n') - sys.exit(1) - -# Hack to show a decent upgrade message, which wasn't done until 2.2. -ambuild_version = getattr(run, 'CURRENT_API', '2.1') -if ambuild_version.startswith('2.1'): - sys.stderr.write("AMBuild 2.2 or higher is required; please update\n") - sys.exit(1) - -parser = run.BuildParser(sourcePath=sys.path[0], api='2.2') -parser.options.add_argument('--enable-debug', action='store_const', const='1', dest='debug', - help='Enable debugging symbols') -parser.options.add_argument('--enable-optimize', action='store_const', const='1', dest='opt', - help='Enable optimization') -parser.options.add_argument('--std', type=str, default=None, help='Override C++ standard') -parser.Configure() diff --git a/metamod-source/third_party/amtl/tests/AMBuild.tests b/metamod-source/third_party/amtl/tests/AMBuild.tests deleted file mode 100644 index d0f41f9c..00000000 --- a/metamod-source/third_party/amtl/tests/AMBuild.tests +++ /dev/null @@ -1,66 +0,0 @@ -# vim: set ts=8 sts=2 sw=2 tw=99 et ft=python: -# -# Copyright (C) 2004-2012 David Anderson -# -# This file is part of SourcePawn. -# -# SourcePawn is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# -# SourcePawn is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with -# SourcePawn. If not, see http://www.gnu.org/licenses/. -# -import os - -binary = KE.StaticLibrary(builder, 'libgtest') -binary.compiler.includes += [ - os.path.join(builder.sourcePath, 'third_party', 'googletest', 'googletest', 'include'), - os.path.join(builder.sourcePath, 'third_party', 'googletest', 'googletest'), -] -binary.sources += [ - os.path.join('..', 'third_party', 'googletest', 'googletest', 'src', 'gtest-all.cc'), -] -libgtest = builder.Add(binary) - -binary = KE.Program(builder, 'testrunner') -compiler = binary.compiler -compiler.includes += [ - os.path.join(builder.sourcePath), - os.path.join(builder.sourcePath, 'third_party', 'googletest', 'googletest', 'include'), -] - -if compiler.like('msvc'): - compiler.linkflags.append('/SUBSYSTEM:CONSOLE') -if builder.cxx.target.platform == 'linux': - compiler.linkflags.append('-ldl') -compiler.linkflags.append(libgtest.binary) -compiler.linkflags.append(KE.libamtl) - -binary.sources += [ - 'main.cpp', - 'test-argparser.cpp', - 'test-bits.cpp', - 'test-callable.cpp', - 'test-deque.cpp', - 'test-flags.cpp', - 'test-hashmap.cpp', - 'test-inlinelist.cpp', - 'test-priority-queue.cpp', - 'test-refcounting.cpp', - 'test-raii.cpp', - 'test-string.cpp', - 'test-system.cpp', - 'test-threadlocal-threaded.cpp', - 'test-threadlocal-unthreaded.cpp', - 'test-time.cpp', - 'test-vector.cpp', -] - -node = builder.Add(binary) -builder.AddCopy(node.binary, builder.dist_folder) diff --git a/metamod-source/third_party/amtl/tests/main.cpp b/metamod-source/third_party/amtl/tests/main.cpp deleted file mode 100644 index 2fad6d18..00000000 --- a/metamod-source/third_party/amtl/tests/main.cpp +++ /dev/null @@ -1,76 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include -#include "runner.h" - -using namespace ke; - -int -main(int argc, char** argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} - -#if defined(__GNUC__) -extern "C" void -__cxa_pure_virtual() -{ - abort(); -} - -void* -operator new(size_t amount) -{ - return malloc(amount); -} - -void* -operator new[](size_t amount) -{ - return malloc(amount); -} - -void -operator delete(void* p) -{ - free(p); -} - -void -operator delete[](void* p) -{ - free(p); -} -#endif diff --git a/metamod-source/third_party/amtl/tests/runner.h b/metamod-source/third_party/amtl/tests/runner.h deleted file mode 100644 index 40b1c667..00000000 --- a/metamod-source/third_party/amtl/tests/runner.h +++ /dev/null @@ -1,92 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#ifndef _include_amtl_runner_h_ -#define _include_amtl_runner_h_ - -#include -#include -#include -#include - -namespace ke { - -class FallibleMalloc -{ - public: - FallibleMalloc() - : shouldOutOfMemory_(false), - ooms_(0), - overflows_(0) - {} - - void* am_malloc(size_t amount) { - if (shouldOutOfMemory_) { - reportOutOfMemory(); - return nullptr; - } -#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) - return malloc(amount); -#else - return ::malloc(amount); -#endif - } - void am_free(void* p) { -#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) - return free(p); -#else - return ::free(p); -#endif - } - void reportOutOfMemory() { - ooms_++; - } - void reportAllocationOverflow() { - overflows_++; - } - - void setOutOfMemory(bool oom) { - shouldOutOfMemory_ = oom; - } - size_t ooms() const { - return ooms_; - } - size_t overflows() const { - return overflows_; - } - - private: - bool shouldOutOfMemory_; - size_t ooms_; - size_t overflows_; -}; - -} // namespace ke - -#endif // _include_amtl_runner_h_ diff --git a/metamod-source/third_party/amtl/tests/test-argparser.cpp b/metamod-source/third_party/amtl/tests/test-argparser.cpp deleted file mode 100644 index e252b592..00000000 --- a/metamod-source/third_party/amtl/tests/test-argparser.cpp +++ /dev/null @@ -1,213 +0,0 @@ -// vim: set sts=8 ts=4 sw=4 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include "runner.h" - -using namespace ke; -using namespace ke::args; - -TEST(ArgParser, Basic) { - Parser parser("help"); - - EXPECT_TRUE(parser.parsev(nullptr)); - EXPECT_FALSE(parser.parsev("asdf", nullptr)); - EXPECT_FALSE(parser.parsev("--asdf", nullptr)); -} - -TEST(ArgParser, ToggleArg) { - Parser parser("help"); - - ToggleOption x(parser, "x", nullptr, Nothing(), "help"); - ToggleOption y(parser, "y", nullptr, Some(true), "help"); - ToggleOption z(parser, "z", nullptr, Some(false), "help"); - - parser.reset(); - EXPECT_TRUE(parser.parsev(nullptr)); - EXPECT_FALSE(x.value()); - - parser.reset(); - EXPECT_TRUE(parser.parsev("-x", nullptr)); - EXPECT_TRUE(x.value()); - - parser.reset(); - EXPECT_TRUE(parser.parsev("-y", nullptr)); - EXPECT_FALSE(y.value()); - - parser.reset(); - EXPECT_TRUE(parser.parsev("-z", nullptr)); - EXPECT_TRUE(z.value()); - - parser.reset(); - EXPECT_FALSE(parser.parsev("-z=false", nullptr)); -} - -TEST(ArgParser, StringArg) { - Parser parser("help"); - - StringOption s(parser, "s", "string", Nothing(), "help"); - StringOption t(parser, "t", "ttt", Some(std::string("whatever")), "help"); - StringOption mode(parser, "mode", "help"); - - parser.reset(); - EXPECT_FALSE(parser.parsev(nullptr)); - - parser.reset(); - EXPECT_TRUE(parser.parsev("crab", nullptr)); - EXPECT_FALSE(s.hasValue()); - EXPECT_EQ(t.value().compare("whatever"), 0); - EXPECT_EQ(mode.value().compare("crab"), 0); - - parser.reset(); - EXPECT_TRUE(parser.parsev("-s", "yam", "egg", nullptr)); - EXPECT_EQ(s.value().compare("yam"), 0); - EXPECT_EQ(mode.value().compare("egg"), 0); -} - -TEST(ArgParser, IntArg) { - Parser parser("help"); - - IntOption val1(parser, nullptr, "val", Nothing(), "help"); - - parser.reset(); - EXPECT_TRUE(parser.parsev("--val", "308", nullptr)); - EXPECT_EQ(val1.value(), 308); - - parser.reset(); - EXPECT_FALSE(parser.parsev("--val", "30x", nullptr)); -} - -TEST(ArgParser, RepeatArg) { - Parser parser("help"); - - RepeatOption inc(parser, "-i", "--include-path", "Include path."); - - ASSERT_TRUE(parser.parsev("-i", "blah", "-i", "crab", "--include-path=yam", nullptr)); - - std::vector values = std::move(inc.values()); - ASSERT_EQ(values.size(), (size_t)3); - EXPECT_EQ(values[0].compare("blah"), 0); - EXPECT_EQ(values[1].compare("crab"), 0); - EXPECT_EQ(values[2].compare("yam"), 0); -} - -TEST(ArgParser, StopArg1) { - Parser parser("help"); - - StopOption show_version(parser, "-v", "--version", Some(false), "Show the version and exit."); - StringOption required(parser, "something_required", "This is a required positional argument."); - - EXPECT_FALSE(parser.parsev(nullptr)); - EXPECT_TRUE(parser.parsev("-v", nullptr)); - EXPECT_TRUE(show_version.value()); -} - -TEST(ArgParser, StopArg2) { - Parser parser("help"); - - StopOption show_version(parser, "-v", "--version", Some(false), "Show the version and exit."); - StringOption filename(parser, "file", "SMX file to execute."); - - EXPECT_TRUE(parser.parsev("-v", "-w", nullptr)); - EXPECT_TRUE(show_version.value()); -} - -TEST(ArgParser, NoSeparator) { - Parser parser("help"); - parser.enable_inline_values(); - - IntOption opt(parser, "-O", nullptr, {}, "Optimization level"); - - ASSERT_TRUE(parser.parsev("-O2", nullptr)); - EXPECT_EQ(opt.value(), 2); -} - -TEST(ArgParser, ColonSeparator) { - Parser parser("help"); - parser.enable_inline_values(); - - IntOption opt(parser, "-O", nullptr, {}, "Optimization level"); - - ASSERT_TRUE(parser.parsev("-O:2", nullptr)); - EXPECT_EQ(opt.value(), 2); -} - -TEST(ArgParser, Slashes) { - Parser parser("help"); - parser.enable_inline_values(); - parser.allow_slashes(); - - IntOption opt(parser, "-O", nullptr, {}, "Optimization level"); - - ASSERT_TRUE(parser.parsev("/O:2", nullptr)); - EXPECT_EQ(opt.value(), 2); -} - -TEST(ArgParser, CollectExtra) { - Parser parser("help"); - parser.collect_extra_args(); - - ASSERT_TRUE(parser.parsev("a", "b", "c", nullptr)); - ASSERT_EQ(parser.extra_args().size(), (unsigned)3); - EXPECT_EQ(parser.extra_args()[0].compare("a"), 0); - EXPECT_EQ(parser.extra_args()[1].compare("b"), 0); - EXPECT_EQ(parser.extra_args()[2].compare("c"), 0); -} - -TEST(ArgParser, OptionWithNo) { - Parser parser("help"); - - EnableOption stuff(parser, nullptr, "--stuff", false, "Stuff or whatever"); - EnableOption other(parser, nullptr, "--other", true, "Other or whatever"); - - ASSERT_TRUE(parser.parsev("--stuff", "--other", nullptr)); - ASSERT_TRUE(stuff.value()); - ASSERT_TRUE(other.value()); - - parser.reset(); - - ASSERT_TRUE(parser.parsev("--no-stuff", "--no-other", nullptr)); - ASSERT_FALSE(stuff.value()); - ASSERT_FALSE(other.value()); -} - -TEST(ArgParser, PassthroughArgs) { - Parser parser("help"); - parser.allow_passthrough_args(); - - EnableOption stuff(parser, nullptr, "--stuff", false, "Stuff or whatever"); - - ASSERT_TRUE(parser.parsev("--stuff", "--", "crab", "ham", nullptr)); - ASSERT_TRUE(stuff.value()); - ASSERT_EQ(parser.passthrough_args().size(), 2); - ASSERT_EQ(parser.passthrough_args()[0], "crab"); - ASSERT_EQ(parser.passthrough_args()[1], "ham"); -} diff --git a/metamod-source/third_party/amtl/tests/test-bits.cpp b/metamod-source/third_party/amtl/tests/test-bits.cpp deleted file mode 100644 index dc21a17d..00000000 --- a/metamod-source/third_party/amtl/tests/test-bits.cpp +++ /dev/null @@ -1,62 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include "runner.h" - -using namespace ke; - -TEST(Bits, Multiply) { - EXPECT_TRUE(IsUintMultiplySafe(0x80000000, 1)); - EXPECT_FALSE(IsUintMultiplySafe(0x80000000, 2)); -} - -TEST(Bits, MallocAlignment) { - EXPECT_GE(kMallocAlignment, (size_t)16); -} - -TEST(Bits, FindLeftmostBit) { - EXPECT_EQ(FindLeftmostBit32(0x7f), 6); - EXPECT_EQ(FindLeftmostBit64(0x7f), 6); - - EXPECT_EQ(FindLeftmostBit32(0xffffffff), 31); - EXPECT_EQ(FindLeftmostBit64(0xffffffffffffffffULL), 63); -} - -TEST(Bits, FindRightmostBit) { - EXPECT_EQ(FindRightmostBit(0x7d), 0); - EXPECT_EQ(FindRightmostBit(0x7d), 0); - - EXPECT_EQ(FindRightmostBit(0xffffffc0), 6); - if (sizeof(size_t) == 8) - EXPECT_EQ(FindRightmostBit(0xfffc000000000000ULL), 50); - else - EXPECT_EQ(FindRightmostBit(0xfffc000000000000ULL), 0); -} diff --git a/metamod-source/third_party/amtl/tests/test-callable.cpp b/metamod-source/third_party/amtl/tests/test-callable.cpp deleted file mode 100644 index fc9d660f..00000000 --- a/metamod-source/third_party/amtl/tests/test-callable.cpp +++ /dev/null @@ -1,178 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include "runner.h" - -using namespace ke; - -static int -test_old_fn(int x) -{ - return 99 + x; -} - -class MoveObj -{ - public: - static unsigned sNumMoves; - - MoveObj() { - sNumMoves = 0; - } - MoveObj(MoveObj&& other) { - sNumMoves++; - } - - unsigned count() const { - return sNumMoves; - } - - private: - MoveObj(const MoveObj& other); - void operator =(const MoveObj& other); -}; -unsigned MoveObj::sNumMoves = 0; - -class CallableObj -{ - public: - int operator ()(int x) const { - return x + 34; - } -}; - -TEST(Callable, BasicFunction) { - int egg = 20; - auto fn = [&egg](int x) -> int { return egg + x + 1; }; - - Function ptr(fn); - EXPECT_EQ(ptr(10), 31); - - ptr = [](int x) -> int { return x + 15; }; - EXPECT_EQ(ptr(7), 22); - - ptr = test_old_fn; - EXPECT_EQ(ptr(10), 109); - - CallableObj obj; - ptr = obj; - EXPECT_EQ(ptr(66), 100); - - Function ptr2 = [](MoveObj&& obj) -> unsigned { - MoveObj other(std::move(obj)); - return other.count(); - }; - - MoveObj moveObj; - EXPECT_EQ(ptr2(std::move(moveObj)), (unsigned)1); -} - -TEST(Callable, InlineStorage) { - Function ptr = []() -> int { return 10; }; - - EXPECT_TRUE(ptr.usingInlineStorage()); - EXPECT_EQ(ptr(), 10); - - static size_t dtors = 0; - struct CallDtorObj { - ~CallDtorObj() { - dtors++; - } - }; - - struct { - int a; - void *b, *c, *d, *e, *f, *g; - void *h, *j, *k, *m, *n, *o, *p; - } huge_struct = {20}; - CallDtorObj test_dtor; - ptr = [huge_struct, test_dtor]() -> int { return huge_struct.a; }; - EXPECT_FALSE(ptr.usingInlineStorage()); - EXPECT_EQ(ptr(), 20); - - ptr = nullptr; - EXPECT_EQ(dtors, (size_t)2); -} - -TEST(Callable, Move) { - static size_t ctors = 0; - static size_t copyctors = 0; - static size_t movectors = 0; - static size_t dtors = 0; - struct CallDtorObj { - CallDtorObj() { - ctors++; - } - CallDtorObj(const CallDtorObj& other) { - copyctors++; - } - CallDtorObj(CallDtorObj&& other) { - movectors++; - } - ~CallDtorObj() { - dtors++; - } - }; - - CallDtorObj test_dtor; - Function ptr = [test_dtor] {}; - - EXPECT_EQ(dtors, (size_t)1); - - ctors = 0; - copyctors = 0; - movectors = 0; - dtors = 0; - - Function ptr2 = ptr; - EXPECT_EQ(ctors, (size_t)0); - EXPECT_EQ(copyctors, (size_t)1); - EXPECT_EQ(movectors, (size_t)0); - EXPECT_EQ(dtors, (size_t)0); - - copyctors = 0; - - Function ptr3 = std::move(ptr2); - EXPECT_EQ(ctors, (size_t)0); - EXPECT_EQ(copyctors, (size_t)0); - EXPECT_EQ(movectors, (size_t)0); - EXPECT_EQ(dtors, (size_t)0); - - copyctors = 0; - - auto fn = [test_dtor] {}; - Function ptr4 = std::move(fn); - EXPECT_EQ(ctors, (size_t)0); - EXPECT_EQ(copyctors, (size_t)1); - EXPECT_EQ(movectors, (size_t)1); - EXPECT_EQ(dtors, (size_t)0); -} diff --git a/metamod-source/third_party/amtl/tests/test-deque.cpp b/metamod-source/third_party/amtl/tests/test-deque.cpp deleted file mode 100644 index 4ee5cc35..00000000 --- a/metamod-source/third_party/amtl/tests/test-deque.cpp +++ /dev/null @@ -1,121 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#include -#include -#include -#include "runner.h" - -using namespace ke; - -TEST(Deque, Basic) { - std::deque dq; - - for (int i = 0; i < 4; i++) { - dq.push_back(i); - ASSERT_EQ(dq.size(), size_t(i + 1)); - } - for (int i = 0; i < 4; i++) { - dq.push_front(i + 4); - ASSERT_EQ(dq.size(), size_t(i + 5)); - } - - EXPECT_EQ(dq.back(), 3); - EXPECT_EQ(dq.front(), 7); - dq.pop_back(); - dq.pop_front(); - EXPECT_EQ(PopFront(&dq), 6); - EXPECT_EQ(PopBack(&dq), 2); - - EXPECT_EQ(dq.size(), (size_t)4); - - while (!dq.empty()) - dq.pop_back(); - EXPECT_EQ(dq.size(), (size_t)0); -} - -TEST(Deque, PrependEmpty) { - std::deque dq; - - for (int i = 0; i < 8; i++) { - if (i % 2 == 0) - dq.push_front(i); - else - dq.push_back(i); - EXPECT_EQ(dq.size(), size_t(i + 1)); - } - - while (!dq.empty()) - dq.pop_front(); - EXPECT_EQ(dq.size(), (size_t)0); -} - -TEST(Deque, Resize) { - std::deque dq; - for (int i = 0; i < 387; i++) - dq.push_front(i); - for (int i = 0; i < 293; i++) - dq.push_back(i); - - ASSERT_EQ(dq.size(), size_t(293 + 387)); - - for (int i = 292; i >= 0; i--) { - EXPECT_EQ(PopBack(&dq), i); - } - for (int i = 386; i >= 0; i--) { - EXPECT_EQ(PopFront(&dq), i); - } - - // Check that we can still add. - dq.push_back(5); - ASSERT_EQ(PopFront(&dq), 5); - dq.push_back(6); - ASSERT_EQ(PopBack(&dq), 6); - - dq.push_front(7); - ASSERT_EQ(PopBack(&dq), 7); - dq.push_front(8); - ASSERT_EQ(PopFront(&dq), 8); -} - -TEST(Deque, Move) { - std::deque dq1; - - dq1.push_back(10); - - { - std::deque dq2 = std::move(dq1); - ASSERT_EQ(dq2.size(), (size_t)1); - ASSERT_EQ(PopFront(&dq2), 10); - } - - ASSERT_EQ(dq1.size(), (size_t)0); - - // Append so we can make sure that it's not holding a deleted pointer. - dq1.push_back(11); -} diff --git a/metamod-source/third_party/amtl/tests/test-flags.cpp b/metamod-source/third_party/amtl/tests/test-flags.cpp deleted file mode 100644 index 1eb257f7..00000000 --- a/metamod-source/third_party/amtl/tests/test-flags.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include "runner.h" - -using namespace ke; - -enum class Scoped : uint32_t { - Flag0 = (1 << 0), - Flag1 = (1 << 1), - Flag2 = (1 << 2), - Flag3 = (1 << 3) -}; -KE_DEFINE_ENUM_OPERATORS(Scoped) - -TEST(Flags, Basic) { - Flags flags; - ASSERT_TRUE(!flags); - ASSERT_FALSE(flags); - - flags += Scoped::Flag0; - ASSERT_TRUE((bool)flags); - - flags += Scoped::Flag1; - - Flags other(Scoped::Flag1 | Scoped::Flag2); - ASSERT_NE(flags, other); - ASSERT_EQ(other.bits(), (uint32_t)0x6); - - flags -= other; - ASSERT_EQ(flags, Scoped::Flag0); - - uint32_t value = flags.bits(); - ASSERT_EQ(value, (uint32_t)0x1); - - flags |= other; - ASSERT_EQ(flags.bits(), (uint32_t)0x7); - - flags &= other; - ASSERT_EQ(flags.bits(), (uint32_t)0x6); -} diff --git a/metamod-source/third_party/amtl/tests/test-hashmap.cpp b/metamod-source/third_party/amtl/tests/test-hashmap.cpp deleted file mode 100644 index 7f9178fc..00000000 --- a/metamod-source/third_party/amtl/tests/test-hashmap.cpp +++ /dev/null @@ -1,125 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include "runner.h" - -using namespace ke; - -struct StringPolicy { - static inline uint32_t hash(const char* key) { - return FastHashCharSequence(key, strlen(key)); - } - static inline bool matches(const char* find, const std::string& key) { - return key.compare(find) == 0; - } -}; - -TEST(HashMap, Basic) { - typedef HashMap Map; - Map map; - - ASSERT_TRUE(map.init()); - - Map::Result r = map.find("cat"); - ASSERT_FALSE(r.found()); - - Map::Insert i = map.findForAdd("cat"); - ASSERT_FALSE(i.found()); - ASSERT_TRUE(map.add(i, std::string("cat"), 5)); - EXPECT_EQ(r->value, 5); - - Map::iterator iter = map.iter(); - EXPECT_EQ(iter->key.compare("cat"), 0); - EXPECT_EQ(iter->value, 5); - iter.next(); - EXPECT_TRUE(iter.empty()); - - i = map.findForAdd("cat"); - EXPECT_TRUE(i.found()); - - r = map.find("dog"); - EXPECT_FALSE(r.found()); - - r = map.find("cat"); - ASSERT_TRUE(r.found()); - EXPECT_EQ(r->value, 5); - map.remove(r); - - r = map.find("cat"); - EXPECT_FALSE(r.found()); -} - -TEST(HashMap, Bug6527) { - typedef HashMap Map; - Map map; - - ASSERT_TRUE(map.init(16)); - - { - char key[] = "bb"; - Map::Insert p = map.findForAdd(key); - ASSERT_FALSE(p.found()); - ASSERT_TRUE(map.add(p, key)); - p->value = 0xabab; - } - - { - char key[] = "dddd"; - Map::Insert p = map.findForAdd(key); - ASSERT_FALSE(p.found()); - ASSERT_TRUE(map.add(p, key)); - p->value = 0xacac; - } - - { - char key[] = "bb"; - map.removeIfExists(key); - } - - { - char key[] = "dddd"; - Map::Insert p = map.findForAdd(key); - if (!p.found()) - map.add(p, key); - p->value = 0xadad; - } - - bool found = false; - for (Map::iterator iter = map.iter(); !iter.empty(); iter.next()) { - if (iter->key.compare("dddd") == 0) { - // Should only occur once. - EXPECT_FALSE(found); - found = true; - } - } -} diff --git a/metamod-source/third_party/amtl/tests/test-inlinelist.cpp b/metamod-source/third_party/amtl/tests/test-inlinelist.cpp deleted file mode 100644 index 08f12ec9..00000000 --- a/metamod-source/third_party/amtl/tests/test-inlinelist.cpp +++ /dev/null @@ -1,106 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include "runner.h" - -using namespace ke; - -class IntThing : public InlineListNode -{ - public: - IntThing(int value) - : value_(value) - {} - ~IntThing() {} - int value() const { - return value_; - } - - private: - int value_; -}; - -TEST(InlineList, Basic) { - IntThing thing1(1); - IntThing thing2(2); - IntThing thing3(3); - IntThing thing4(4); - IntThing thing5(5); - - // Do these test twice. InlineList does not take ownership of pointers, - // so we should be guaranteed we can keep moving them in between lists. - for (size_t i = 0; i <= 1; i++) { - InlineList list; - - InlineList::iterator iter = list.begin(); - ASSERT_EQ(iter, list.end()); - - list.append(&thing1); - list.append(&thing2); - list.append(&thing3); - list.append(&thing4); - list.append(&thing5); - - iter = list.begin(); - for (int n = 1; n <= 5; n++) { - EXPECT_EQ(iter->value(), n); - iter++; - } - EXPECT_EQ(iter, list.end()); - - list.remove(&thing1); - iter = list.begin(); - EXPECT_EQ(iter->value(), 2); - - list.remove(&thing5); - iter = list.begin(); - iter++; - iter++; - EXPECT_EQ(iter->value(), 4); - iter++; - EXPECT_EQ(iter, list.end()); - - list.remove(&thing3); - iter = list.begin(); - EXPECT_EQ(iter->value(), 2); - iter++; - EXPECT_EQ(iter->value(), 4); - iter++; - EXPECT_EQ(iter, list.end()); - - iter = list.begin(); - while (iter != list.end()) - iter = list.erase(iter); - - EXPECT_EQ(list.begin(), list.end()); - } -} diff --git a/metamod-source/third_party/amtl/tests/test-priority-queue.cpp b/metamod-source/third_party/amtl/tests/test-priority-queue.cpp deleted file mode 100644 index b5e02a19..00000000 --- a/metamod-source/third_party/amtl/tests/test-priority-queue.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include "runner.h" - -using namespace ke; - -TEST(PriorityQueue, Basic) { - PriorityQueue pq; - pq.add(16); - pq.add(16); - pq.add(16); - pq.add(9); - pq.add(77); - pq.add(3); - - EXPECT_EQ(pq.pop(), 3); - EXPECT_EQ(pq.pop(), 9); - EXPECT_EQ(pq.pop(), 16); - EXPECT_EQ(pq.pop(), 16); - EXPECT_EQ(pq.pop(), 16); - EXPECT_EQ(pq.pop(), 77); - EXPECT_TRUE(pq.empty()); -} diff --git a/metamod-source/third_party/amtl/tests/test-raii.cpp b/metamod-source/third_party/amtl/tests/test-raii.cpp deleted file mode 100644 index f28eb162..00000000 --- a/metamod-source/third_party/amtl/tests/test-raii.cpp +++ /dev/null @@ -1,67 +0,0 @@ -// vim: set sts=4 ts=8 sw=4 tw=99 et: -// -// Copyright (C) 2021 AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include "runner.h" - -using namespace ke; - -TEST(ScopeGuard, Invoke) -{ - int invokes = 0; - - { - auto guard1 = MakeScopeGuard([&]() -> void { - invokes++; - }); - - { - auto guard2 = MakeScopeGuard([&]() -> void { - invokes++; - }); - } - ASSERT_EQ(invokes, 1); - } - ASSERT_EQ(invokes, 2); -} - -TEST(ScopeGuard, Cancel) -{ - int invokes = 0; - - { - auto guard1 = MakeScopeGuard([&]() -> void { - invokes++; - }); - - guard1.cancel(); - } - ASSERT_EQ(invokes, 0); -} diff --git a/metamod-source/third_party/amtl/tests/test-refcounting.cpp b/metamod-source/third_party/amtl/tests/test-refcounting.cpp deleted file mode 100644 index d1bd4b0b..00000000 --- a/metamod-source/third_party/amtl/tests/test-refcounting.cpp +++ /dev/null @@ -1,119 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include -#include "runner.h" - -using namespace ke; - -static int sDtors = 0; - -class Counted : public Refcounted -{ - public: - ~Counted() { - sDtors++; - } -}; - -class SubCounted : public Counted -{ -}; - -void -TypeChecks_DoNotCall() -{ - RefPtr counted; - if (counted) - abort(); -} - -static inline RefPtr -PassThrough(const RefPtr& obj) -{ - return obj; -} - -TEST(RefPtr, Basic) { - { RefPtr obj(new Counted()); } - EXPECT_EQ(sDtors, 1); - { RefPtr obj(new Counted()); } - EXPECT_EQ(sDtors, 2); - { - Counted* counted = new Counted(); - counted->AddRef(); - RefPtr obj(AdoptRef(counted)); - } - EXPECT_EQ(sDtors, 3); - - // Check that subclass assignment works. - { - RefPtr obj(new SubCounted()); - RefPtr obj2(PassThrough(new SubCounted())); - } - EXPECT_EQ(sDtors, 5); - - sDtors = 0; - - { - RefPtr obj(new Counted()); - RefPtr obj2 = PassThrough(obj); - RefPtr obj3 = PassThrough(obj); - EXPECT_EQ(sDtors, 0); - RefPtr obj4 = PassThrough(PassThrough(PassThrough(obj))); - EXPECT_EQ(sDtors, 0); - } - EXPECT_EQ(sDtors, 1); - - sDtors = 0; - { AtomicRef obj(new Counted()); } - EXPECT_EQ(sDtors, 1); - - sDtors = 0; - { - AtomicRef obj; - obj = new Counted(); - obj = new Counted(); - obj = nullptr; - } - EXPECT_EQ(sDtors, 2); - - sDtors = 0; - { - RefPtr obj(new Counted()); - AlreadyRefed xfer = obj.take(); - EXPECT_FALSE(obj); - EXPECT_TRUE(!!xfer); - } - EXPECT_EQ(sDtors, 1); -} diff --git a/metamod-source/third_party/amtl/tests/test-string.cpp b/metamod-source/third_party/amtl/tests/test-string.cpp deleted file mode 100644 index 263b5c22..00000000 --- a/metamod-source/third_party/amtl/tests/test-string.cpp +++ /dev/null @@ -1,165 +0,0 @@ -// vim: set sts=4 ts=8 sw=4 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include "runner.h" - -using namespace ke; - -TEST(String, Sprintf) { - int64_t x = 1234; - char buffer[256]; - SafeSprintf(buffer, sizeof(buffer), "%" KE_FMT_I64, x); - ASSERT_EQ(strcmp(buffer, "1234"), 0); -} - -TEST(String, Allocating) { - int a = INT_MAX; - const char* value = "Hello this is a test."; - const char* expect = "A: 2147483647 B: Hello this is a test."; - std::unique_ptr ptr = Sprintf("A: %d B: %s", a, value); - EXPECT_EQ(strcmp(ptr.get(), expect), 0); - - auto str = StringPrintf("A: %d B: %s", a, value); - EXPECT_EQ(str, expect); -} - -TEST(String, Split) { - auto out = Split(" ", " "); - EXPECT_EQ(out.size(), (size_t)6); - for (size_t i = 0; i < out.size(); i++) { - EXPECT_EQ(out[i].size(), (size_t)0); - } - - out = Split("egg", " "); - EXPECT_EQ(out.size(), (size_t)1); - EXPECT_EQ(out[0].compare("egg"), 0); - - out = Split("", "egg"); - EXPECT_EQ(out.size(), (size_t)0); - - out = Split("xaba", "a"); - EXPECT_EQ(out.size(), (size_t)3); - EXPECT_EQ(out[0].compare("x"), 0); - EXPECT_EQ(out[1].compare("b"), 0); - EXPECT_EQ(out[2].compare(""), 0); - - out = Split("egg ham", " "); - EXPECT_EQ(out.size(), (size_t)2); - EXPECT_EQ(out[0].compare("egg"), 0); - EXPECT_EQ(out[1].compare("ham"), 0); -} - -TEST(String, Join) { - std::vector in; - - auto result = Join(in, "x"); - EXPECT_EQ(result, ""); - - in.emplace_back("abc"); - result = Join(in, "x"); - EXPECT_EQ(result, "abc"); - - in.emplace_back("xyz"); - result = Join(in, "T"); - EXPECT_EQ(result, "abcTxyz"); - - in.emplace_back("def"); - result = Join(in, ""); - EXPECT_EQ(result, "abcxyzdef"); - - in = {"a", "b", "", "d" }; - result = Join(in, ","); - EXPECT_EQ(result, "a,b,,d"); - - in = {"a", "b", "c", "" }; - result = Join(in, ","); - EXPECT_EQ(result, "a,b,c,"); -} - -TEST(String, Case) { - const char* str = "samPle1.com"; - EXPECT_EQ(Uppercase(str), "SAMPLE1.COM"); - EXPECT_EQ(Lowercase(str), "sample1.com"); - - EXPECT_EQ(Lowercase(""), ""); -} - -TEST(String, StrCpy) { - char buffer[6]; - - SafeStrcpy(buffer, sizeof(buffer), "hello"); - EXPECT_EQ(strcmp(buffer, "hello"), 0); - - SafeStrcpy(buffer, sizeof(buffer), "hello, crab"); - EXPECT_EQ(strcmp(buffer, "hello"), 0); - - SafeStrcpyN(buffer, sizeof(buffer), "asdfasdf", 8); - EXPECT_EQ(strcmp(buffer, "asdfa"), 0); - - SafeStrcpyN(buffer, sizeof(buffer), "qwertyuiop", 3); - EXPECT_EQ(strcmp(buffer, "qwe"), 0); -} - -TEST(String, StartsWith) { - std::string str("blah"); - - EXPECT_TRUE(StartsWith(str, "b")); - EXPECT_TRUE(StartsWith(str, "blah")); - EXPECT_FALSE(StartsWith(str, "a")); - EXPECT_FALSE(StartsWith(str, "blah2")); -} - -TEST(String, EndsWith) { - std::string str("blah"); - - EXPECT_TRUE(EndsWith(str, "h")); - EXPECT_TRUE(EndsWith(str, "blah")); - EXPECT_FALSE(EndsWith(str, "a")); - EXPECT_FALSE(EndsWith(str, "blah2")); -} - -TEST(String, SafeStrcat) { - char buffer[6] = "hello"; - - buffer[1] = '\0'; - EXPECT_EQ(SafeStrcat(buffer, 0, "blah"), (size_t)1); - EXPECT_EQ(SafeStrcat(buffer, 1, "blah"), (size_t)1); - EXPECT_EQ(SafeStrcat(buffer, 2, "blah"), (size_t)1); - EXPECT_EQ(buffer[1], '\0'); - EXPECT_EQ(buffer[2], 'l'); - - EXPECT_EQ(SafeStrcat(buffer, sizeof(buffer), "b"), (size_t)2); - EXPECT_EQ(strcmp(buffer, "hb"), 0); - - EXPECT_EQ(SafeStrcat(buffer, sizeof(buffer), "hamocrab"), (size_t)5); - EXPECT_EQ(strcmp(buffer, "hbham"), 0); -} diff --git a/metamod-source/third_party/amtl/tests/test-system.cpp b/metamod-source/third_party/amtl/tests/test-system.cpp deleted file mode 100644 index cce92f1a..00000000 --- a/metamod-source/third_party/amtl/tests/test-system.cpp +++ /dev/null @@ -1,69 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -#include -#include -#include -#include -#include "runner.h" - -using namespace ke; - -TEST(System, SharedLibs) { - const char* libname = "unknown-library"; -#if defined(KE_WINDOWS) - const char* symbol = "GetProcAddress"; - libname = "kernel32.dll"; -#elif defined(KE_POSIX) - const char* symbol = "malloc"; -# if defined(KE_MACOSX) - libname = "libc.dylib"; -# elif defined(KE_LINUX) - libname = "libc.so.6"; -# endif -#endif - - RefPtr lib = SharedLib::Open(libname, nullptr, 0); - EXPECT_TRUE(lib); - EXPECT_NE(lib->lookup(symbol), nullptr); - EXPECT_NE(lib->get(symbol), nullptr); -} - -TEST(System, Paths) { -#if defined(KE_WINDOWS) - const char* bad = "C:/egg.txt"; - const char* good = "C:\\egg.txt"; -#else - const char* bad = "\\egg.txt"; - const char* good = "/egg.txt"; -#endif - - char buffer[255]; - path::Format(buffer, sizeof(buffer), "%s", bad); - EXPECT_EQ(strcmp(buffer, good), 0); -} diff --git a/metamod-source/third_party/amtl/tests/test-threadlocal-threaded.cpp b/metamod-source/third_party/amtl/tests/test-threadlocal-threaded.cpp deleted file mode 100644 index 4362888d..00000000 --- a/metamod-source/third_party/amtl/tests/test-threadlocal-threaded.cpp +++ /dev/null @@ -1,82 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include - -#include -#include -#include -#include "runner.h" - -using namespace ke; - -static ThreadLocal sThreadVar; -static ThreadLocal sThreadVarPointer; - -class VarThread -{ - public: - VarThread() - : succeeded_(false) - {} - - void Run(int value) { - ASSERT_EQ(sThreadVar.get(), 0); - - sThreadVar = value; - ASSERT_EQ(sThreadVar.get(), 20); - - succeeded_ = true; - } - - bool succeeded() const { - return succeeded_; - } - - private: - bool succeeded_; -}; - -TEST(ThreadLocal, Threaded) { - sThreadVar = 10; - - VarThread run; - auto thread = ke::NewThread("Test Thread", [&run](int value) -> void { - run.Run(value); - }, 20); - thread->join(); - thread = nullptr; - - ASSERT_TRUE(run.succeeded()); - EXPECT_EQ(sThreadVar.get(), 10); - - // Check that pointers are allowed in T. - sThreadVarPointer = &run; - EXPECT_EQ(sThreadVarPointer.get(), &run); -} diff --git a/metamod-source/third_party/amtl/tests/test-threadlocal-unthreaded.cpp b/metamod-source/third_party/amtl/tests/test-threadlocal-unthreaded.cpp deleted file mode 100644 index 9685d195..00000000 --- a/metamod-source/third_party/amtl/tests/test-threadlocal-unthreaded.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#define KE_SINGLE_THREADED -#include -#include -#include "runner.h" - -using namespace ke; - -static ThreadLocal sVar; - -TEST(ThreadLocal, Unthreaded) { - EXPECT_EQ(sVar.get(), 0); - sVar = 10; - EXPECT_EQ(sVar.get(), 10); -} diff --git a/metamod-source/third_party/amtl/tests/test-time.cpp b/metamod-source/third_party/amtl/tests/test-time.cpp deleted file mode 100644 index 0d05faa1..00000000 --- a/metamod-source/third_party/amtl/tests/test-time.cpp +++ /dev/null @@ -1,49 +0,0 @@ -// vim: set sts=4 ts=8 sw=4 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include -#include - -#if __cplusplus >= 201703L - -using namespace ke; - -TEST(Time, Timespec) -{ - struct timespec ts = {}; - ts.tv_sec = 100; - ts.tv_nsec = 500000; - - auto tp = TimespecToTimePoint(ts); - auto tt = std::chrono::system_clock::to_time_t(tp); - EXPECT_EQ(tt, 100); - EXPECT_EQ(tp.time_since_epoch(), TimespecToDuration(ts)); -} - -#endif diff --git a/metamod-source/third_party/amtl/tests/test-vector.cpp b/metamod-source/third_party/amtl/tests/test-vector.cpp deleted file mode 100644 index af4ecf36..00000000 --- a/metamod-source/third_party/amtl/tests/test-vector.cpp +++ /dev/null @@ -1,306 +0,0 @@ -// vim: set sts=8 ts=2 sw=2 tw=99 et: -// -// Copyright (C) 2013, David Anderson and AlliedModders LLC -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// * Neither the name of AlliedModders LLC nor the names of its contributors -// may be used to endorse or promote products derived from this software -// without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include "runner.h" - -using namespace ke; - -static int sCtors = 0; -static int sCopyCtors = 0; -static int sMovingCtors = 0; -static int sMovedDtors = 0; -static int sDtors = 0; - -namespace { - -static void -ResetGlobals() -{ - sCtors = 0; - sCopyCtors = 0; - sMovingCtors = 0; - sMovedDtors = 0; - sDtors = 0; -} - -class BasicThing -{ - public: - BasicThing() { - sCtors++; - } - BasicThing(const BasicThing& other) { - sCopyCtors++; - } - ~BasicThing() { - sDtors++; - } -}; - -class MovingThing -{ - public: - MovingThing() - : moved_(false) - { - sCtors++; - } - MovingThing(MovingThing&& other) { - assert(!other.moved_); - sMovingCtors++; - moved_ = false; - other.moved_ = true; - } - ~MovingThing() { - sDtors++; - if (moved_) - sMovedDtors++; - } - MovingThing& operator =(MovingThing&& other) { - assert(!other.moved_); - sCopyCtors++; - moved_ = false; - other.moved_ = true; - return *this; - } - bool moved() const { - return moved_; - } - - private: - MovingThing(const MovingThing& other) = delete; - bool moved_; -}; - -} // anonymous namespace - -TEST(Vector, Ints) { - std::vector vector; - - EXPECT_TRUE(vector.empty()); - EXPECT_EQ(vector.size(), (size_t)0); - - vector.emplace_back(1); - vector.emplace_back(2); - vector.emplace_back(3); - vector.emplace_back(4); - vector.emplace_back(5); - for (int i = 0; i < 5; i++) { - EXPECT_EQ(vector[i], i + 1); - } - EXPECT_EQ(vector.size(), (size_t)5); - EXPECT_FALSE(vector.empty()); - - EXPECT_EQ(PopBack(&vector), 5); - EXPECT_EQ(PopBack(&vector), 4); - EXPECT_EQ(vector.size(), (size_t)3); - - ke::InsertAt(&vector, 0, 88); - ke::InsertAt(&vector, 0, 99); - ke::InsertAt(&vector, 4, 111); - EXPECT_EQ(vector[0], 99); - EXPECT_EQ(vector[1], 88); - EXPECT_EQ(vector[2], 1); - EXPECT_EQ(vector[3], 2); - EXPECT_EQ(vector[4], 111); - EXPECT_EQ(vector[5], 3); - EXPECT_EQ(vector.size(), (size_t)6); - - ke::RemoveAt(&vector, 5); - EXPECT_EQ(vector[4], 111); - ke::RemoveAt(&vector, 0); - EXPECT_EQ(vector[0], 88); - EXPECT_EQ(vector[3], 111); - EXPECT_EQ(vector.size(), (size_t)4); - - while (!vector.empty()) - vector.pop_back(); - - EXPECT_TRUE(vector.empty()); - - for (int i = 0; i < 128; i++) - vector.emplace_back(i); - EXPECT_EQ(vector.size(), (size_t)128); - - vector.clear(); - EXPECT_TRUE(vector.empty()); -} - -TEST(Vector, Destructors) { - ResetGlobals(); - - { - std::vector vector; - vector.emplace_back(); - vector.emplace_back(); - vector.emplace_back(); - } - EXPECT_EQ(sCtors, 3); - EXPECT_EQ(sCopyCtors, 3); - EXPECT_EQ(sDtors, 6); - - sDtors = 0; - { - std::vector vector; - vector.emplace_back(BasicThing()); - vector.clear(); - } - EXPECT_EQ(sDtors, 2); -} - -TEST(Vector, Moving) { - ResetGlobals(); - { - std::vector vector; - MovingThing a, b, c; - vector.emplace_back(std::move(a)); - vector.emplace_back(std::move(b)); - vector.emplace_back(std::move(c)); - } - - EXPECT_EQ(sCtors, 3); - EXPECT_GE(sMovingCtors, 3); - EXPECT_EQ(sMovedDtors, sMovingCtors); - EXPECT_GT(sDtors, sMovingCtors); - - sCtors = 0; - sMovingCtors = 0; - sMovedDtors = 0; - sDtors = 0; - - std::vector v1; - v1.emplace_back(10); - std::vector v2(std::move(v1)); - EXPECT_EQ(v2.size(), (size_t)1); - EXPECT_EQ(v1.size(), (size_t)0); -} - -TEST(Vector, MoveDuringInsert) { - std::vector vector; - for (size_t i = 1; i <= 8; i++) { - MovingThing x; - vector.emplace_back(std::move(x)); - } - { - MovingThing x; - ke::InsertAt(&vector, 0, std::move(x)); - } - for (size_t i = 0; i < vector.size(); i++) { - EXPECT_FALSE(vector[i].moved()); - } -} - -TEST(Vector, Resize) { - std::vector vector; - vector.emplace_back(true); - vector.resize(100); - EXPECT_EQ(vector.size(), (size_t)100); - EXPECT_TRUE(vector[0]); - for (size_t i = 1; i < 100; i++) { - EXPECT_FALSE(vector[i]); - } - vector.resize(1); - ASSERT_EQ(vector.size(), (size_t)1); - for (size_t i = 0; i < 1; i++) { - EXPECT_TRUE(vector[i]); - } -} - -TEST(Vector, InsertAtEnd) { - std::vector vector; - ke::InsertAt(&vector, 0, 555); - ASSERT_EQ(vector.size(), (size_t)1); - EXPECT_EQ(vector[0], 555); -} - -TEST(Vector, Remove) { - class HeldThing - { - public: - HeldThing() - : refcount(0) - {} - virtual ~HeldThing() {} - - void AddRef() { - refcount++; - } - void Release() { - if (--refcount == 0) - delete this; - } - - uintptr_t refcount; - }; - - class WrappedThing - { - public: - WrappedThing(HeldThing* thing) - : thing(thing) - {} - WrappedThing(WrappedThing&& other) - : thing(std::move(other.thing)) - {} - WrappedThing& operator =(WrappedThing&& other) { - thing = std::move(other.thing); - return *this; - } - - ke::RefPtr thing; - - private: - WrappedThing(const WrappedThing& other) = delete; - void operator =(const WrappedThing& other) = delete; - }; - - ke::RefPtr thing1(new HeldThing); - ke::RefPtr thing2(new HeldThing); - - std::vector things; - things.emplace_back(WrappedThing(thing1)); - things.emplace_back(WrappedThing(thing2)); - - EXPECT_EQ(thing1->refcount, (size_t)2); - EXPECT_EQ(thing2->refcount, (size_t)2); - - ke::RemoveAt(&things, 0); - - EXPECT_EQ(thing1->refcount, (size_t)1); - EXPECT_EQ(thing2->refcount, (size_t)2); - - ke::RemoveAt(&things, 0); - - EXPECT_EQ(thing1->refcount, (size_t)1); - EXPECT_EQ(thing2->refcount, (size_t)1); -} diff --git a/metamod-source/third_party/amtl/third_party/googletest/.clang-format b/metamod-source/third_party/amtl/third_party/googletest/.clang-format deleted file mode 100644 index 5b9bfe6d..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/.clang-format +++ /dev/null @@ -1,4 +0,0 @@ -# Run manually to reformat a file: -# clang-format -i --style=file -Language: Cpp -BasedOnStyle: Google diff --git a/metamod-source/third_party/amtl/third_party/googletest/.gitignore b/metamod-source/third_party/amtl/third_party/googletest/.gitignore deleted file mode 100644 index d6916f5d..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/.gitignore +++ /dev/null @@ -1,56 +0,0 @@ -# Ignore CI build directory -build/ -xcuserdata -cmake-build-debug/ -.idea/ -bazel-bin -bazel-genfiles -bazel-googletest -bazel-out -bazel-testlogs -# python -*.pyc - -# Visual Studio files -*.sdf -*.opensdf -*.VC.opendb -*.suo -*.user -_ReSharper.Caches/ -Win32-Debug/ -Win32-Release/ -x64-Debug/ -x64-Release/ - -# Ignore autoconf / automake files -Makefile.in -aclocal.m4 -configure -build-aux/ -autom4te.cache/ -googletest/m4/libtool.m4 -googletest/m4/ltoptions.m4 -googletest/m4/ltsugar.m4 -googletest/m4/ltversion.m4 -googletest/m4/lt~obsolete.m4 - -# Ignore generated directories. -googlemock/fused-src/ -googletest/fused-src/ - -# macOS files -.DS_Store -googletest/.DS_Store -googletest/xcode/.DS_Store - -# Ignore cmake generated directories and files. -CMakeFiles -CTestTestfile.cmake -Makefile -cmake_install.cmake -googlemock/CMakeFiles -googlemock/CTestTestfile.cmake -googlemock/Makefile -googlemock/cmake_install.cmake -googlemock/gtest diff --git a/metamod-source/third_party/amtl/third_party/googletest/.travis.yml b/metamod-source/third_party/amtl/third_party/googletest/.travis.yml deleted file mode 100644 index 2b0ac21a..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/.travis.yml +++ /dev/null @@ -1,71 +0,0 @@ -# Build matrix / environment variable are explained on: -# https://docs.travis-ci.com/user/customizing-the-build/ -# This file can be validated on: -# http://lint.travis-ci.org/ - -sudo: false -language: cpp - -# Define the matrix explicitly, manually expanding the combinations of (os, compiler, env). -# It is more tedious, but grants us far more flexibility. -matrix: - include: - - os: linux - compiler: gcc - sudo : true - install: ./ci/install-linux.sh && ./ci/log-config.sh - script: ./ci/build-linux-bazel.sh - - os: linux - compiler: clang - sudo : true - install: ./ci/install-linux.sh && ./ci/log-config.sh - script: ./ci/build-linux-bazel.sh - - os: linux - group: deprecated-2017Q4 - compiler: gcc - install: ./ci/install-linux.sh && ./ci/log-config.sh - script: ./ci/build-linux-autotools.sh - env: VERBOSE=1 CXXFLAGS=-std=c++11 - - os: linux - group: deprecated-2017Q4 - compiler: gcc - env: BUILD_TYPE=Debug VERBOSE=1 CXX_FLAGS=-std=c++11 - - os: linux - group: deprecated-2017Q4 - compiler: clang - env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 - - os: linux - compiler: clang - env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 NO_EXCEPTION=ON NO_RTTI=ON COMPILER_IS_GNUCXX=ON - - os: osx - compiler: gcc - env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 - - os: osx - env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 - if: type != pull_request - -# These are the install and build (script) phases for the most common entries in the matrix. They could be included -# in each entry in the matrix, but that is just repetitive. -install: - - ./ci/install-${TRAVIS_OS_NAME}.sh - - . ./ci/env-${TRAVIS_OS_NAME}.sh - - ./ci/log-config.sh - -script: ./ci/travis.sh - -# For sudo=false builds this section installs the necessary dependencies. -addons: - apt: - # List of whitelisted in travis packages for ubuntu-precise can be found here: - # https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise - # List of whitelisted in travis apt-sources: - # https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json - sources: - - ubuntu-toolchain-r-test - - llvm-toolchain-precise-3.9 - packages: - - g++-4.9 - - clang-3.9 - -notifications: - email: false diff --git a/metamod-source/third_party/amtl/third_party/googletest/BUILD.bazel b/metamod-source/third_party/amtl/third_party/googletest/BUILD.bazel deleted file mode 100644 index 4e5bb0f7..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/BUILD.bazel +++ /dev/null @@ -1,180 +0,0 @@ -# Copyright 2017 Google Inc. -# All Rights Reserved. -# -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Author: misterg@google.com (Gennadiy Civil) -# -# Bazel Build for Google C++ Testing Framework(Google Test) - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -config_setting( - name = "windows", - values = {"cpu": "x64_windows"}, -) - -config_setting( - name = "windows_msvc", - values = {"cpu": "x64_windows_msvc"}, -) - -config_setting( - name = "has_absl", - values = {"define": "absl=1"}, -) - -# Google Test including Google Mock -cc_library( - name = "gtest", - srcs = glob( - include = [ - "googletest/src/*.cc", - "googletest/src/*.h", - "googletest/include/gtest/**/*.h", - "googlemock/src/*.cc", - "googlemock/include/gmock/**/*.h", - ], - exclude = [ - "googletest/src/gtest-all.cc", - "googletest/src/gtest_main.cc", - "googlemock/src/gmock-all.cc", - "googlemock/src/gmock_main.cc", - ], - ), - hdrs = glob([ - "googletest/include/gtest/*.h", - "googlemock/include/gmock/*.h", - ]), - copts = select( - { - ":windows": [], - ":windows_msvc": [], - "//conditions:default": ["-pthread"], - }, - ), - defines = select( - { - ":has_absl": [ - "GTEST_HAS_ABSL=1", - ], - "//conditions:default": [], - }, - ), - includes = [ - "googlemock", - "googlemock/include", - "googletest", - "googletest/include", - ], - linkopts = select({ - ":windows": [], - ":windows_msvc": [], - "//conditions:default": [ - "-pthread", - ], - }), - deps = select( - { - ":has_absl": [ - "@com_google_absl//absl/debugging:failure_signal_handler", - "@com_google_absl//absl/debugging:stacktrace", - "@com_google_absl//absl/debugging:symbolize", - "@com_google_absl//absl/strings", - "@com_google_absl//absl/types:optional", - "@com_google_absl//absl/types:variant", - ], - "//conditions:default": [], - }, - ), -) - -cc_library( - name = "gtest_main", - srcs = [ - "googlemock/src/gmock_main.cc", - ], - deps = [":gtest"], -) - -# The following rules build samples of how to use gTest. -cc_library( - name = "gtest_sample_lib", - srcs = [ - "googletest/samples/sample1.cc", - "googletest/samples/sample2.cc", - "googletest/samples/sample4.cc", - ], - hdrs = [ - "googletest/samples/prime_tables.h", - "googletest/samples/sample1.h", - "googletest/samples/sample2.h", - "googletest/samples/sample3-inl.h", - "googletest/samples/sample4.h", - ], -) - -cc_test( - name = "gtest_samples", - size = "small", - # All Samples except: - # sample9 (main) - # sample10 (main and takes a command line option and needs to be separate) - srcs = [ - "googletest/samples/sample1_unittest.cc", - "googletest/samples/sample2_unittest.cc", - "googletest/samples/sample3_unittest.cc", - "googletest/samples/sample4_unittest.cc", - "googletest/samples/sample5_unittest.cc", - "googletest/samples/sample6_unittest.cc", - "googletest/samples/sample7_unittest.cc", - "googletest/samples/sample8_unittest.cc", - ], - deps = [ - "gtest_sample_lib", - ":gtest_main", - ], -) - -cc_test( - name = "sample9_unittest", - size = "small", - srcs = ["googletest/samples/sample9_unittest.cc"], - deps = [":gtest"], -) - -cc_test( - name = "sample10_unittest", - size = "small", - srcs = ["googletest/samples/sample10_unittest.cc"], - deps = [ - ":gtest", - ], -) diff --git a/metamod-source/third_party/amtl/third_party/googletest/CMakeLists.txt b/metamod-source/third_party/amtl/third_party/googletest/CMakeLists.txt deleted file mode 100644 index 572dac00..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -cmake_minimum_required(VERSION 2.8.8) -add_definitions(-std=c++11) - -if (POLICY CMP0048) - cmake_policy(SET CMP0048 NEW) -endif (POLICY CMP0048) - -project(googletest-distribution) -set(GOOGLETEST_VERSION 1.9.0) - -enable_testing() - -include(CMakeDependentOption) -include(GNUInstallDirs) - -#Note that googlemock target already builds googletest -option(BUILD_GMOCK "Builds the googlemock subproject" ON) -option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) - -if(BUILD_GMOCK) - add_subdirectory( googlemock ) -else() - add_subdirectory( googletest ) -endif() diff --git a/metamod-source/third_party/amtl/third_party/googletest/CONTRIBUTING.md b/metamod-source/third_party/amtl/third_party/googletest/CONTRIBUTING.md deleted file mode 100644 index b52f8ee5..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/CONTRIBUTING.md +++ /dev/null @@ -1,161 +0,0 @@ -# How to become a contributor and submit your own code - -## Contributor License Agreements - -We'd love to accept your patches! Before we can take them, we -have to jump a couple of legal hurdles. - -Please fill out either the individual or corporate Contributor License Agreement -(CLA). - - * If you are an individual writing original source code and you're sure you - own the intellectual property, then you'll need to sign an - [individual CLA](https://developers.google.com/open-source/cla/individual). - * If you work for a company that wants to allow you to contribute your work, - then you'll need to sign a - [corporate CLA](https://developers.google.com/open-source/cla/corporate). - -Follow either of the two links above to access the appropriate CLA and -instructions for how to sign and return it. Once we receive it, we'll be able to -accept your pull requests. - -## Are you a Googler? -If you are a Googler, you can either create an internal change or work on GitHub directly. - - -## Contributing A Patch - -1. Submit an issue describing your proposed change to the - [issue tracker](https://github.com/google/googletest). -1. Please don't mix more than one logical change per submittal, - because it makes the history hard to follow. If you want to make a - change that doesn't have a corresponding issue in the issue - tracker, please create one. -1. Also, coordinate with team members that are listed on the issue in - question. This ensures that work isn't being duplicated and - communicating your plan early also generally leads to better - patches. -1. If your proposed change is accepted, and you haven't already done so, sign a - Contributor License Agreement (see details above). -1. Fork the desired repo, develop and test your code changes. -1. Ensure that your code adheres to the existing style in the sample to which - you are contributing. -1. Ensure that your code has an appropriate set of unit tests which all pass. -1. Submit a pull request. - -## The Google Test and Google Mock Communities ## - -The Google Test community exists primarily through the -[discussion group](http://groups.google.com/group/googletestframework) -and the GitHub repository. -Likewise, the Google Mock community exists primarily through their own -[discussion group](http://groups.google.com/group/googlemock). -You are definitely encouraged to contribute to the -discussion and you can also help us to keep the effectiveness of the -group high by following and promoting the guidelines listed here. - -### Please Be Friendly ### - -Showing courtesy and respect to others is a vital part of the Google -culture, and we strongly encourage everyone participating in Google -Test development to join us in accepting nothing less. Of course, -being courteous is not the same as failing to constructively disagree -with each other, but it does mean that we should be respectful of each -other when enumerating the 42 technical reasons that a particular -proposal may not be the best choice. There's never a reason to be -antagonistic or dismissive toward anyone who is sincerely trying to -contribute to a discussion. - -Sure, C++ testing is serious business and all that, but it's also -a lot of fun. Let's keep it that way. Let's strive to be one of the -friendliest communities in all of open source. - -As always, discuss Google Test in the official GoogleTest discussion group. -You don't have to actually submit code in order to sign up. Your participation -itself is a valuable contribution. - -## Style - -To keep the source consistent, readable, diffable and easy to merge, -we use a fairly rigid coding style, as defined by the [google-styleguide](https://github.com/google/styleguide) project. All patches will be expected -to conform to the style outlined [here](https://google.github.io/styleguide/cppguide.html). -Use [.clang-format](https://github.com/google/googletest/blob/master/.clang-format) to check your formatting - -## Requirements for Contributors ### - -If you plan to contribute a patch, you need to build Google Test, -Google Mock, and their own tests from a git checkout, which has -further requirements: - - * [Python](https://www.python.org/) v2.3 or newer (for running some of - the tests and re-generating certain source files from templates) - * [CMake](https://cmake.org/) v2.6.4 or newer - * [GNU Build System](https://en.wikipedia.org/wiki/GNU_Build_System) - including automake (>= 1.9), autoconf (>= 2.59), and - libtool / libtoolize. - -## Developing Google Test ## - -This section discusses how to make your own changes to Google Test. - -### Testing Google Test Itself ### - -To make sure your changes work as intended and don't break existing -functionality, you'll want to compile and run Google Test's own tests. -For that you can use CMake: - - mkdir mybuild - cd mybuild - cmake -Dgtest_build_tests=ON ${GTEST_DIR} - -Make sure you have Python installed, as some of Google Test's tests -are written in Python. If the cmake command complains about not being -able to find Python (`Could NOT find PythonInterp (missing: -PYTHON_EXECUTABLE)`), try telling it explicitly where your Python -executable can be found: - - cmake -DPYTHON_EXECUTABLE=path/to/python -Dgtest_build_tests=ON ${GTEST_DIR} - -Next, you can build Google Test and all of its own tests. On \*nix, -this is usually done by 'make'. To run the tests, do - - make test - -All tests should pass. - -### Regenerating Source Files ## - -Some of Google Test's source files are generated from templates (not -in the C++ sense) using a script. -For example, the -file include/gtest/internal/gtest-type-util.h.pump is used to generate -gtest-type-util.h in the same directory. - -You don't need to worry about regenerating the source files -unless you need to modify them. You would then modify the -corresponding `.pump` files and run the '[pump.py](googletest/scripts/pump.py)' -generator script. See the [Pump Manual](googletest/docs/PumpManual.md). - -## Developing Google Mock ### - -This section discusses how to make your own changes to Google Mock. - -#### Testing Google Mock Itself #### - -To make sure your changes work as intended and don't break existing -functionality, you'll want to compile and run Google Test's own tests. -For that you'll need Autotools. First, make sure you have followed -the instructions above to configure Google Mock. -Then, create a build output directory and enter it. Next, - - ${GMOCK_DIR}/configure # try --help for more info - -Once you have successfully configured Google Mock, the build steps are -standard for GNU-style OSS packages. - - make # Standard makefile following GNU conventions - make check # Builds and runs all tests - all should pass. - -Note that when building your project against Google Mock, you are building -against Google Test as well. There is no need to configure Google Test -separately. diff --git a/metamod-source/third_party/amtl/third_party/googletest/LICENSE b/metamod-source/third_party/amtl/third_party/googletest/LICENSE deleted file mode 100644 index 1941a11f..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/metamod-source/third_party/amtl/third_party/googletest/Makefile.am b/metamod-source/third_party/amtl/third_party/googletest/Makefile.am deleted file mode 100644 index 433eefeb..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -## Process this file with automake to produce Makefile.in -ACLOCAL_AMFLAGS = -I m4 - -AUTOMAKE_OPTIONS = foreign - -# Build . before src so that our all-local and clean-local hooks kicks in at -# the right time. -SUBDIRS = googletest googlemock - -EXTRA_DIST = \ - BUILD.bazel \ - CMakeLists.txt \ - README.md \ - WORKSPACE diff --git a/metamod-source/third_party/amtl/third_party/googletest/README.md b/metamod-source/third_party/amtl/third_party/googletest/README.md deleted file mode 100644 index b58638b7..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/README.md +++ /dev/null @@ -1,128 +0,0 @@ - -# Google Test # - -[![Build Status](https://travis-ci.org/google/googletest.svg?branch=master)](https://travis-ci.org/google/googletest) -[![Build status](https://ci.appveyor.com/api/projects/status/4o38plt0xbo1ubc8/branch/master?svg=true)](https://ci.appveyor.com/project/GoogleTestAppVeyor/googletest/branch/master) - -**Future Plans**: -* 1.8.x Release - [the 1.8.x](https://github.com/google/googletest/releases/tag/release-1.8.1) is the last release that works with pre-C++11 compilers. The 1.8.x will not accept any requests for any new features and any bugfix requests will only be accepted if proven "critical" -* Post 1.8.x - work to improve/cleanup/pay technical debt. When this work is completed there will be a 1.9.x tagged release -* Post 1.9.x googletest will follow [Abseil Live at Head philosophy](https://abseil.io/about/philosophy) - - -Welcome to **Google Test**, Google's C++ test framework! - -This repository is a merger of the formerly separate GoogleTest and -GoogleMock projects. These were so closely related that it makes sense to -maintain and release them together. - -Please the mailing list at googletestframework@googlegroups.com for questions, discussions, and development. -There is also an IRC channel on [OFTC](https://webchat.oftc.net/) (irc.oftc.net) #gtest available. - -Getting started information for **Google Test** is available in the -[Google Test Primer](googletest/docs/primer.md) documentation. - -**Google Mock** is an extension to Google Test for writing and using C++ mock -classes. See the separate [Google Mock documentation](googlemock/README.md). - -More detailed documentation for googletest (including build instructions) are -in its interior [googletest/README.md](googletest/README.md) file. - -## Features ## - - * An [xUnit](https://en.wikipedia.org/wiki/XUnit) test framework. - * Test discovery. - * A rich set of assertions. - * User-defined assertions. - * Death tests. - * Fatal and non-fatal failures. - * Value-parameterized tests. - * Type-parameterized tests. - * Various options for running the tests. - * XML test report generation. - -## Platforms ## - -Google test has been used on a variety of platforms: - - * Linux - * Mac OS X - * Windows - * Cygwin - * MinGW - * Windows Mobile - * Symbian - -## Who Is Using Google Test? ## - -In addition to many internal projects at Google, Google Test is also used by -the following notable projects: - - * The [Chromium projects](http://www.chromium.org/) (behind the Chrome - browser and Chrome OS). - * The [LLVM](http://llvm.org/) compiler. - * [Protocol Buffers](https://github.com/google/protobuf), Google's data - interchange format. - * The [OpenCV](http://opencv.org/) computer vision library. - * [tiny-dnn](https://github.com/tiny-dnn/tiny-dnn): header only, dependency-free deep learning framework in C++11. - -## Related Open Source Projects ## - -[GTest Runner](https://github.com/nholthaus/gtest-runner) is a Qt5 based automated test-runner and Graphical User Interface with powerful features for Windows and Linux platforms. - -[Google Test UI](https://github.com/ospector/gtest-gbar) is test runner that runs -your test binary, allows you to track its progress via a progress bar, and -displays a list of test failures. Clicking on one shows failure text. Google -Test UI is written in C#. - -[GTest TAP Listener](https://github.com/kinow/gtest-tap-listener) is an event -listener for Google Test that implements the -[TAP protocol](https://en.wikipedia.org/wiki/Test_Anything_Protocol) for test -result output. If your test runner understands TAP, you may find it useful. - -[gtest-parallel](https://github.com/google/gtest-parallel) is a test runner that -runs tests from your binary in parallel to provide significant speed-up. - -[GoogleTest Adapter](https://marketplace.visualstudio.com/items?itemName=DavidSchuldenfrei.gtest-adapter) is a VS Code extension allowing to view Google Tests in a tree view, and run/debug your tests. - -## Requirements ## - -Google Test is designed to have fairly minimal requirements to build -and use with your projects, but there are some. Currently, we support -Linux, Windows, Mac OS X, and Cygwin. We will also make our best -effort to support other platforms (e.g. Solaris, AIX, and z/OS). -However, since core members of the Google Test project have no access -to these platforms, Google Test may have outstanding issues there. If -you notice any problems on your platform, please notify -[googletestframework@googlegroups.com](https://groups.google.com/forum/#!forum/googletestframework). Patches for fixing them are -even more welcome! - -### Linux Requirements ### - -These are the base requirements to build and use Google Test from a source -package (as described below): - - * GNU-compatible Make or gmake - * POSIX-standard shell - * POSIX(-2) Regular Expressions (regex.h) - * A C++11-standard-compliant compiler - -### Windows Requirements ### - - * Microsoft Visual C++ 2015 or newer - -### Cygwin Requirements ### - - * Cygwin v1.5.25-14 or newer - -### Mac OS X Requirements ### - - * Mac OS X v10.4 Tiger or newer - * Xcode Developer Tools - -## Contributing change - -Please read the [`CONTRIBUTING.md`](CONTRIBUTING.md) for details on -how to contribute to this project. - -Happy testing! diff --git a/metamod-source/third_party/amtl/third_party/googletest/WORKSPACE b/metamod-source/third_party/amtl/third_party/googletest/WORKSPACE deleted file mode 100644 index 1d5d3886..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/WORKSPACE +++ /dev/null @@ -1,8 +0,0 @@ -workspace(name = "com_google_googletest") - -# Abseil -http_archive( - name = "com_google_absl", - urls = ["https://github.com/abseil/abseil-cpp/archive/master.zip"], - strip_prefix = "abseil-cpp-master", -) diff --git a/metamod-source/third_party/amtl/third_party/googletest/appveyor.yml b/metamod-source/third_party/amtl/third_party/googletest/appveyor.yml deleted file mode 100644 index f734a0c4..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/appveyor.yml +++ /dev/null @@ -1,103 +0,0 @@ -version: '{build}' - -os: Visual Studio 2015 - -environment: - matrix: - - compiler: msvc-15-seh - generator: "Visual Studio 15 2017" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - - compiler: msvc-15-seh - generator: "Visual Studio 15 2017 Win64" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - enabled_on_pr: yes - - - compiler: msvc-14-seh - generator: "Visual Studio 14 2015" - enabled_on_pr: yes - - - compiler: msvc-14-seh - generator: "Visual Studio 14 2015 Win64" - - - compiler: gcc-6.3.0-posix - generator: "MinGW Makefiles" - cxx_path: 'C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin' - enabled_on_pr: yes - -configuration: - - Debug - -build: - verbosity: minimal - -install: -- ps: | - Write-Output "Compiler: $env:compiler" - Write-Output "Generator: $env:generator" - Write-Output "Env:Configuation: $env:configuration" - Write-Output "Env: $env" - if (-not (Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER)) { - Write-Output "This is *NOT* a pull request build" - } else { - Write-Output "This is a pull request build" - if (-not (Test-Path env:enabled_on_pr) -or $env:enabled_on_pr -ne "yes") { - Write-Output "PR builds are *NOT* explicitly enabled" - } - } - - # git bash conflicts with MinGW makefiles - if ($env:generator -eq "MinGW Makefiles") { - $env:path = $env:path.replace("C:\Program Files\Git\usr\bin;", "") - if ($env:cxx_path -ne "") { - $env:path += ";$env:cxx_path" - } - } - -build_script: -- ps: | - # Only enable some builds for pull requests, the AppVeyor queue is too long. - if ((Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER) -And (-not (Test-Path env:enabled_on_pr) -or $env:enabled_on_pr -ne "yes")) { - return - } - md _build -Force | Out-Null - cd _build - - $conf = if ($env:generator -eq "MinGW Makefiles") {"-DCMAKE_BUILD_TYPE=$env:configuration"} else {"-DCMAKE_CONFIGURATION_TYPES=Debug;Release"} - # Disable test for MinGW (gtest tests fail, gmock tests can not build) - $gtest_build_tests = if ($env:generator -eq "MinGW Makefiles") {"-Dgtest_build_tests=OFF"} else {"-Dgtest_build_tests=ON"} - $gmock_build_tests = if ($env:generator -eq "MinGW Makefiles") {"-Dgmock_build_tests=OFF"} else {"-Dgmock_build_tests=ON"} - & cmake -G "$env:generator" $conf -Dgtest_build_samples=ON $gtest_build_tests $gmock_build_tests .. - if ($LastExitCode -ne 0) { - throw "Exec: $ErrorMessage" - } - $cmake_parallel = if ($env:generator -eq "MinGW Makefiles") {"-j2"} else {"/m"} - & cmake --build . --config $env:configuration -- $cmake_parallel - if ($LastExitCode -ne 0) { - throw "Exec: $ErrorMessage" - } - - -skip_commits: - files: - - '**/*.md' - -test_script: -- ps: | - # Only enable some builds for pull requests, the AppVeyor queue is too long. - if ((Test-Path env:APPVEYOR_PULL_REQUEST_NUMBER) -And (-not (Test-Path env:enabled_on_pr) -or $env:enabled_on_pr -ne "yes")) { - return - } - if ($env:generator -eq "MinGW Makefiles") { - return # No test available for MinGW - } - & ctest -C $env:configuration --timeout 600 --output-on-failure - if ($LastExitCode -ne 0) { - throw "Exec: $ErrorMessage" - } - -artifacts: - - path: '_build/CMakeFiles/*.log' - name: logs - - path: '_build/Testing/**/*.xml' - name: test_results diff --git a/metamod-source/third_party/amtl/third_party/googletest/ci/build-linux-autotools.sh b/metamod-source/third_party/amtl/third_party/googletest/ci/build-linux-autotools.sh deleted file mode 100644 index cc404e9b..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/ci/build-linux-autotools.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 Google Inc. -# All Rights Reserved. -# -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -set -e - -. ci/get-nprocessors.sh - -# Create the configuration script -autoreconf -i - -# Run in a subdirectory to keep the sources clean -mkdir build || true -cd build -../configure - -make -j ${NPROCESSORS:-2} diff --git a/metamod-source/third_party/amtl/third_party/googletest/ci/build-linux-bazel.sh b/metamod-source/third_party/amtl/third_party/googletest/ci/build-linux-bazel.sh deleted file mode 100644 index 3f1c7849..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/ci/build-linux-bazel.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 Google Inc. -# All Rights Reserved. -# -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -set -e - -bazel build --curses=no //...:all -bazel test --curses=no //...:all -bazel test --curses=no //...:all --define absl=1 diff --git a/metamod-source/third_party/amtl/third_party/googletest/ci/env-linux.sh b/metamod-source/third_party/amtl/third_party/googletest/ci/env-linux.sh deleted file mode 100644 index 37800d6a..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/ci/env-linux.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 Google Inc. -# All Rights Reserved. -# -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# -# This file should be sourced, and not executed as a standalone script. -# - -# TODO() - we can check if this is being sourced using $BASH_VERSION and $BASH_SOURCE[0] != ${0}. - -if [ "${TRAVIS_OS_NAME}" = "linux" ]; then - if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi - if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.9" CC="clang-3.9"; fi -fi diff --git a/metamod-source/third_party/amtl/third_party/googletest/ci/env-osx.sh b/metamod-source/third_party/amtl/third_party/googletest/ci/env-osx.sh deleted file mode 100644 index 03c2d15d..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/ci/env-osx.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 Google Inc. -# All Rights Reserved. -# -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# -# This file should be sourced, and not executed as a standalone script. -# - -# TODO() - we can check if this is being sourced using $BASH_VERSION and $BASH_SOURCE[0] != ${0}. -# - -if [ "${TRAVIS_OS_NAME}" = "osx" ]; then - if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.9" CC="clang-3.9"; fi -fi diff --git a/metamod-source/third_party/amtl/third_party/googletest/ci/get-nprocessors.sh b/metamod-source/third_party/amtl/third_party/googletest/ci/get-nprocessors.sh deleted file mode 100644 index 43635e76..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/ci/get-nprocessors.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 Google Inc. -# All Rights Reserved. -# -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# This file is typically sourced by another script. -# if possible, ask for the precise number of processors, -# otherwise take 2 processors as reasonable default; see -# https://docs.travis-ci.com/user/speeding-up-the-build/#Makefile-optimization -if [ -x /usr/bin/getconf ]; then - NPROCESSORS=$(/usr/bin/getconf _NPROCESSORS_ONLN) -else - NPROCESSORS=2 -fi - -# as of 2017-09-04 Travis CI reports 32 processors, but GCC build -# crashes if parallelized too much (maybe memory consumption problem), -# so limit to 4 processors for the time being. -if [ $NPROCESSORS -gt 4 ] ; then - echo "$0:Note: Limiting processors to use by make from $NPROCESSORS to 4." - NPROCESSORS=4 -fi diff --git a/metamod-source/third_party/amtl/third_party/googletest/ci/install-linux.sh b/metamod-source/third_party/amtl/third_party/googletest/ci/install-linux.sh deleted file mode 100644 index 05e2cb28..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/ci/install-linux.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 Google Inc. -# All Rights Reserved. -# -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -set -eu - -if [ "${TRAVIS_OS_NAME}" != linux ]; then - echo "Not a Linux build; skipping installation" - exit 0 -fi - - -if [ "${TRAVIS_SUDO}" = "true" ]; then - echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | \ - sudo tee /etc/apt/sources.list.d/bazel.list - curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - - sudo apt-get update && sudo apt-get install -y bazel gcc-4.9 g++-4.9 clang-3.9 -elif [ "${CXX}" = "clang++" ]; then - # Use ccache, assuming $HOME/bin is in the path, which is true in the Travis build environment. - ln -sf /usr/bin/ccache $HOME/bin/${CXX}; - ln -sf /usr/bin/ccache $HOME/bin/${CC}; -fi diff --git a/metamod-source/third_party/amtl/third_party/googletest/ci/install-osx.sh b/metamod-source/third_party/amtl/third_party/googletest/ci/install-osx.sh deleted file mode 100644 index 6550ff51..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/ci/install-osx.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 Google Inc. -# All Rights Reserved. -# -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -set -eu - -if [ "${TRAVIS_OS_NAME}" != "osx" ]; then - echo "Not a macOS build; skipping installation" - exit 0 -fi - -brew install ccache diff --git a/metamod-source/third_party/amtl/third_party/googletest/ci/log-config.sh b/metamod-source/third_party/amtl/third_party/googletest/ci/log-config.sh deleted file mode 100644 index 5fef1194..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/ci/log-config.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2017 Google Inc. -# All Rights Reserved. -# -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -set -e - -# ccache on OS X needs installation first -# reset ccache statistics -ccache --zero-stats - -echo PATH=${PATH} - -echo "Compiler configuration:" -echo CXX=${CXX} -echo CC=${CC} -echo CXXFLAGS=${CXXFLAGS} - -echo "C++ compiler version:" -${CXX} --version || echo "${CXX} does not seem to support the --version flag" -${CXX} -v || echo "${CXX} does not seem to support the -v flag" - -echo "C compiler version:" -${CC} --version || echo "${CXX} does not seem to support the --version flag" -${CC} -v || echo "${CXX} does not seem to support the -v flag" diff --git a/metamod-source/third_party/amtl/third_party/googletest/ci/travis.sh b/metamod-source/third_party/amtl/third_party/googletest/ci/travis.sh deleted file mode 100644 index 9ff3bad3..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/ci/travis.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env sh -set -evx - -. ci/get-nprocessors.sh - -# if possible, ask for the precise number of processors, -# otherwise take 2 processors as reasonable default; see -# https://docs.travis-ci.com/user/speeding-up-the-build/#Makefile-optimization -if [ -x /usr/bin/getconf ]; then - NPROCESSORS=$(/usr/bin/getconf _NPROCESSORS_ONLN) -else - NPROCESSORS=2 -fi -# as of 2017-09-04 Travis CI reports 32 processors, but GCC build -# crashes if parallelized too much (maybe memory consumption problem), -# so limit to 4 processors for the time being. -if [ $NPROCESSORS -gt 4 ] ; then - echo "$0:Note: Limiting processors to use by make from $NPROCESSORS to 4." - NPROCESSORS=4 -fi -# Tell make to use the processors. No preceding '-' required. -MAKEFLAGS="j${NPROCESSORS}" -export MAKEFLAGS - -env | sort - -# Set default values to OFF for these variables if not specified. -: "${NO_EXCEPTION:=OFF}" -: "${NO_RTTI:=OFF}" -: "${COMPILER_IS_GNUCXX:=OFF}" - -mkdir build || true -cd build -cmake -Dgtest_build_samples=ON \ - -Dgtest_build_tests=ON \ - -Dgmock_build_tests=ON \ - -Dcxx_no_exception=$NO_EXCEPTION \ - -Dcxx_no_rtti=$NO_RTTI \ - -DCMAKE_COMPILER_IS_GNUCXX=$COMPILER_IS_GNUCXX \ - -DCMAKE_CXX_FLAGS=$CXX_FLAGS \ - -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ - .. -make -CTEST_OUTPUT_ON_FAILURE=1 make test diff --git a/metamod-source/third_party/amtl/third_party/googletest/configure.ac b/metamod-source/third_party/amtl/third_party/googletest/configure.ac deleted file mode 100644 index 02c637b0..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/configure.ac +++ /dev/null @@ -1,16 +0,0 @@ -AC_INIT([Google C++ Mocking and Testing Frameworks], - [1.9.0], - [googlemock@googlegroups.com], - [googletest]) - -# Provide various options to initialize the Autoconf and configure processes. -AC_PREREQ([2.59]) -AC_CONFIG_SRCDIR([./README.md]) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_SUBDIRS([googletest googlemock]) - -AM_INIT_AUTOMAKE - -# Output the generated files. No further autoconf macros may be used. -AC_OUTPUT diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/CMakeLists.txt b/metamod-source/third_party/amtl/third_party/googletest/googlemock/CMakeLists.txt deleted file mode 100644 index 1fd758e7..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/CMakeLists.txt +++ /dev/null @@ -1,225 +0,0 @@ -######################################################################## -# CMake build script for Google Mock. -# -# To run the tests for Google Mock itself on Linux, use 'make test' or -# ctest. You can select which tests to run using 'ctest -R regex'. -# For more options, run 'ctest --help'. - -option(gmock_build_tests "Build all of Google Mock's own tests." OFF) - -# A directory to find Google Test sources. -if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt") - set(gtest_dir gtest) -else() - set(gtest_dir ../googletest) -endif() - -# Defines pre_project_set_up_hermetic_build() and set_up_hermetic_build(). -include("${gtest_dir}/cmake/hermetic_build.cmake" OPTIONAL) - -if (COMMAND pre_project_set_up_hermetic_build) - # Google Test also calls hermetic setup functions from add_subdirectory, - # although its changes will not affect things at the current scope. - pre_project_set_up_hermetic_build() -endif() - -######################################################################## -# -# Project-wide settings - -# Name of the project. -# -# CMake files in this project can refer to the root source directory -# as ${gmock_SOURCE_DIR} and to the root binary directory as -# ${gmock_BINARY_DIR}. -# Language "C" is required for find_package(Threads). -if (CMAKE_VERSION VERSION_LESS 3.0) - project(gmock CXX C) -else() - cmake_policy(SET CMP0048 NEW) - project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C) -endif() -cmake_minimum_required(VERSION 2.6.4) - -if (COMMAND set_up_hermetic_build) - set_up_hermetic_build() -endif() - -# Instructs CMake to process Google Test's CMakeLists.txt and add its -# targets to the current scope. We are placing Google Test's binary -# directory in a subdirectory of our own as VC compilation may break -# if they are the same (the default). -add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/gtest") - - -# These commands only run if this is the main project -if(CMAKE_PROJECT_NAME STREQUAL "gmock" OR CMAKE_PROJECT_NAME STREQUAL "googletest-distribution") - # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to - # make it prominent in the GUI. - option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF) -else() - mark_as_advanced(gmock_build_tests) -endif() - -# Although Google Test's CMakeLists.txt calls this function, the -# changes there don't affect the current scope. Therefore we have to -# call it again here. -config_compiler_and_linker() # from ${gtest_dir}/cmake/internal_utils.cmake - -# Adds Google Mock's and Google Test's header directories to the search path. -set(gmock_build_include_dirs - "${gmock_SOURCE_DIR}/include" - "${gmock_SOURCE_DIR}" - "${gtest_SOURCE_DIR}/include" - # This directory is needed to build directly from Google Test sources. - "${gtest_SOURCE_DIR}") -include_directories(${gmock_build_include_dirs}) - -######################################################################## -# -# Defines the gmock & gmock_main libraries. User tests should link -# with one of them. - -# Google Mock libraries. We build them using more strict warnings than what -# are used for other targets, to ensure that Google Mock can be compiled by -# a user aggressive about warnings. -if (MSVC) - cxx_library(gmock - "${cxx_strict}" - "${gtest_dir}/src/gtest-all.cc" - src/gmock-all.cc) - - cxx_library(gmock_main - "${cxx_strict}" - "${gtest_dir}/src/gtest-all.cc" - src/gmock-all.cc - src/gmock_main.cc) -else() - cxx_library(gmock "${cxx_strict}" src/gmock-all.cc) - target_link_libraries(gmock PUBLIC gtest) - cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc) - target_link_libraries(gmock_main PUBLIC gmock) -endif() -# If the CMake version supports it, attach header directory information -# to the targets for when we are part of a parent build (ie being pulled -# in via add_subdirectory() rather than being a standalone build). -if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11") - target_include_directories(gmock SYSTEM INTERFACE - "$" - "$/${CMAKE_INSTALL_INCLUDEDIR}>") - target_include_directories(gmock_main SYSTEM INTERFACE - "$" - "$/${CMAKE_INSTALL_INCLUDEDIR}>") -endif() - -######################################################################## -# -# Install rules -install_project(gmock gmock_main) - -######################################################################## -# -# Google Mock's own tests. -# -# You can skip this section if you aren't interested in testing -# Google Mock itself. -# -# The tests are not built by default. To build them, set the -# gmock_build_tests option to ON. You can do it by running ccmake -# or specifying the -Dgmock_build_tests=ON flag when running cmake. - -if (gmock_build_tests) - # This must be set in the root directory for the tests to be run by - # 'make test' or ctest. - enable_testing() - - if (WIN32) - file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/$/RunTest.ps1" - CONTENT -"$project_bin = \"${CMAKE_BINARY_DIR}/bin/$\" -$env:Path = \"$project_bin;$env:Path\" -& $args") - elseif (MINGW) - file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/RunTest.ps1" - CONTENT -"$project_bin = (cygpath --windows ${CMAKE_BINARY_DIR}/bin) -$env:Path = \"$project_bin;$env:Path\" -& $args") - endif() - - ############################################################ - # C++ tests built with standard compiler flags. - - cxx_test(gmock-actions_test gmock_main) - cxx_test(gmock-cardinalities_test gmock_main) - cxx_test(gmock_ex_test gmock_main) - cxx_test(gmock-generated-actions_test gmock_main) - cxx_test(gmock-generated-function-mockers_test gmock_main) - cxx_test(gmock-generated-internal-utils_test gmock_main) - cxx_test(gmock-generated-matchers_test gmock_main) - cxx_test(gmock-internal-utils_test gmock_main) - cxx_test(gmock-matchers_test gmock_main) - if (MINGW) - target_compile_options(gmock-matchers_test PRIVATE "-Wa,-mbig-obj") - endif() - cxx_test(gmock-more-actions_test gmock_main) - cxx_test(gmock-nice-strict_test gmock_main) - cxx_test(gmock-port_test gmock_main) - cxx_test(gmock-spec-builders_test gmock_main) - cxx_test(gmock_link_test gmock_main test/gmock_link2_test.cc) - cxx_test(gmock_test gmock_main) - - if (DEFINED GTEST_HAS_PTHREAD) - cxx_test(gmock_stress_test gmock) - endif() - - # gmock_all_test is commented to save time building and running tests. - # Uncomment if necessary. - # cxx_test(gmock_all_test gmock_main) - - ############################################################ - # C++ tests built with non-standard compiler flags. - - if (MSVC) - cxx_library(gmock_main_no_exception "${cxx_no_exception}" - "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) - - cxx_library(gmock_main_no_rtti "${cxx_no_rtti}" - "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) - - else() - cxx_library(gmock_main_no_exception "${cxx_no_exception}" src/gmock_main.cc) - target_link_libraries(gmock_main_no_exception PUBLIC gmock) - - cxx_library(gmock_main_no_rtti "${cxx_no_rtti}" src/gmock_main.cc) - target_link_libraries(gmock_main_no_rtti PUBLIC gmock) - endif() - cxx_test_with_flags(gmock-more-actions_no_exception_test "${cxx_no_exception}" - gmock_main_no_exception test/gmock-more-actions_test.cc) - - cxx_test_with_flags(gmock_no_rtti_test "${cxx_no_rtti}" - gmock_main_no_rtti test/gmock-spec-builders_test.cc) - - cxx_shared_library(shared_gmock_main "${cxx_default}" - "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc) - - # Tests that a binary can be built with Google Mock as a shared library. On - # some system configurations, it may not possible to run the binary without - # knowing more details about the system configurations. We do not try to run - # this binary. To get a more robust shared library coverage, configure with - # -DBUILD_SHARED_LIBS=ON. - cxx_executable_with_flags(shared_gmock_test_ "${cxx_default}" - shared_gmock_main test/gmock-spec-builders_test.cc) - set_target_properties(shared_gmock_test_ - PROPERTIES - COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1") - - ############################################################ - # Python tests. - - cxx_executable(gmock_leak_test_ test gmock_main) - py_test(gmock_leak_test) - - cxx_executable(gmock_output_test_ test gmock) - py_test(gmock_output_test) -endif() diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/CONTRIBUTORS b/metamod-source/third_party/amtl/third_party/googletest/googlemock/CONTRIBUTORS deleted file mode 100644 index 6e9ae362..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/CONTRIBUTORS +++ /dev/null @@ -1,40 +0,0 @@ -# This file contains a list of people who've made non-trivial -# contribution to the Google C++ Mocking Framework project. People -# who commit code to the project are encouraged to add their names -# here. Please keep the list sorted by first names. - -Benoit Sigoure -Bogdan Piloca -Chandler Carruth -Dave MacLachlan -David Anderson -Dean Sturtevant -Gene Volovich -Hal Burch -Jeffrey Yasskin -Jim Keller -Joe Walnes -Jon Wray -Keir Mierle -Keith Ray -Kostya Serebryany -Lev Makhlis -Manuel Klimek -Mario Tanev -Mark Paskin -Markus Heule -Matthew Simmons -Mike Bland -Neal Norwitz -Nermin Ozkiranartli -Owen Carlsen -Paneendra Ba -Paul Menage -Piotr Kaminski -Russ Rufer -Sverre Sundsdal -Takeshi Yoshino -Vadim Berman -Vlad Losev -Wolfgang Klier -Zhanyong Wan diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/LICENSE b/metamod-source/third_party/amtl/third_party/googletest/googlemock/LICENSE deleted file mode 100644 index 1941a11f..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2008, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/Makefile.am b/metamod-source/third_party/amtl/third_party/googletest/googlemock/Makefile.am deleted file mode 100644 index 9adbc516..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/Makefile.am +++ /dev/null @@ -1,224 +0,0 @@ -# Automake file - -# Nonstandard package files for distribution. -EXTRA_DIST = LICENSE - -# We may need to build our internally packaged gtest. If so, it will be -# included in the 'subdirs' variable. -SUBDIRS = $(subdirs) - -# This is generated by the configure script, so clean it for distribution. -DISTCLEANFILES = scripts/gmock-config - -# We define the global AM_CPPFLAGS as everything we compile includes from these -# directories. -AM_CPPFLAGS = $(GTEST_CPPFLAGS) -I$(srcdir)/include - -# Modifies compiler and linker flags for pthreads compatibility. -if HAVE_PTHREADS - AM_CXXFLAGS = @PTHREAD_CFLAGS@ -DGTEST_HAS_PTHREAD=1 - AM_LIBS = @PTHREAD_LIBS@ -endif - -# Build rules for libraries. -lib_LTLIBRARIES = lib/libgmock.la lib/libgmock_main.la - -lib_libgmock_la_SOURCES = src/gmock-all.cc - -pkginclude_HEADERS = \ - include/gmock/gmock-actions.h \ - include/gmock/gmock-cardinalities.h \ - include/gmock/gmock-generated-actions.h \ - include/gmock/gmock-generated-function-mockers.h \ - include/gmock/gmock-generated-matchers.h \ - include/gmock/gmock-generated-nice-strict.h \ - include/gmock/gmock-matchers.h \ - include/gmock/gmock-more-actions.h \ - include/gmock/gmock-more-matchers.h \ - include/gmock/gmock-spec-builders.h \ - include/gmock/gmock.h - -pkginclude_internaldir = $(pkgincludedir)/internal -pkginclude_internal_HEADERS = \ - include/gmock/internal/gmock-generated-internal-utils.h \ - include/gmock/internal/gmock-internal-utils.h \ - include/gmock/internal/gmock-port.h \ - include/gmock/internal/custom/gmock-generated-actions.h \ - include/gmock/internal/custom/gmock-matchers.h \ - include/gmock/internal/custom/gmock-port.h - -lib_libgmock_main_la_SOURCES = src/gmock_main.cc -lib_libgmock_main_la_LIBADD = lib/libgmock.la - -# Build rules for tests. Automake's naming for some of these variables isn't -# terribly obvious, so this is a brief reference: -# -# TESTS -- Programs run automatically by "make check" -# check_PROGRAMS -- Programs built by "make check" but not necessarily run - -TESTS= -check_PROGRAMS= -AM_LDFLAGS = $(GTEST_LDFLAGS) - -# This exercises all major components of Google Mock. It also -# verifies that libgmock works. -TESTS += test/gmock-spec-builders_test -check_PROGRAMS += test/gmock-spec-builders_test -test_gmock_spec_builders_test_SOURCES = test/gmock-spec-builders_test.cc -test_gmock_spec_builders_test_LDADD = $(GTEST_LIBS) lib/libgmock.la - -# This tests using Google Mock in multiple translation units. It also -# verifies that libgmock_main and libgmock work. -TESTS += test/gmock_link_test -check_PROGRAMS += test/gmock_link_test -test_gmock_link_test_SOURCES = \ - test/gmock_link2_test.cc \ - test/gmock_link_test.cc \ - test/gmock_link_test.h -test_gmock_link_test_LDADD = $(GTEST_LIBS) lib/libgmock_main.la lib/libgmock.la - -if HAVE_PYTHON - # Tests that fused gmock files compile and work. - TESTS += test/gmock_fused_test - check_PROGRAMS += test/gmock_fused_test - test_gmock_fused_test_SOURCES = \ - fused-src/gmock-gtest-all.cc \ - fused-src/gmock/gmock.h \ - fused-src/gmock_main.cc \ - fused-src/gtest/gtest.h \ - test/gmock_test.cc - test_gmock_fused_test_CPPFLAGS = -I"$(srcdir)/fused-src" -endif - -# Google Mock source files that we don't compile directly. -GMOCK_SOURCE_INGLUDES = \ - src/gmock-cardinalities.cc \ - src/gmock-internal-utils.cc \ - src/gmock-matchers.cc \ - src/gmock-spec-builders.cc \ - src/gmock.cc - -EXTRA_DIST += $(GMOCK_SOURCE_INGLUDES) - -# C++ tests that we don't compile using autotools. -EXTRA_DIST += \ - test/gmock-actions_test.cc \ - test/gmock_all_test.cc \ - test/gmock-cardinalities_test.cc \ - test/gmock_ex_test.cc \ - test/gmock-generated-actions_test.cc \ - test/gmock-generated-function-mockers_test.cc \ - test/gmock-generated-internal-utils_test.cc \ - test/gmock-generated-matchers_test.cc \ - test/gmock-internal-utils_test.cc \ - test/gmock-matchers_test.cc \ - test/gmock-more-actions_test.cc \ - test/gmock-nice-strict_test.cc \ - test/gmock-port_test.cc \ - test/gmock_stress_test.cc - -# Python tests, which we don't run using autotools. -EXTRA_DIST += \ - test/gmock_leak_test.py \ - test/gmock_leak_test_.cc \ - test/gmock_output_test.py \ - test/gmock_output_test_.cc \ - test/gmock_output_test_golden.txt \ - test/gmock_test_utils.py - -# Nonstandard package files for distribution. -EXTRA_DIST += \ - CHANGES \ - CONTRIBUTORS \ - make/Makefile - -# Pump scripts for generating Google Mock headers. -# TODO(chandlerc@google.com): automate the generation of *.h from *.h.pump. -EXTRA_DIST += \ - include/gmock/gmock-generated-actions.h.pump \ - include/gmock/gmock-generated-function-mockers.h.pump \ - include/gmock/gmock-generated-matchers.h.pump \ - include/gmock/gmock-generated-nice-strict.h.pump \ - include/gmock/internal/gmock-generated-internal-utils.h.pump \ - include/gmock/internal/custom/gmock-generated-actions.h.pump - -# Script for fusing Google Mock and Google Test source files. -EXTRA_DIST += scripts/fuse_gmock_files.py - -# The Google Mock Generator tool from the cppclean project. -EXTRA_DIST += \ - scripts/generator/LICENSE \ - scripts/generator/README \ - scripts/generator/README.cppclean \ - scripts/generator/cpp/__init__.py \ - scripts/generator/cpp/ast.py \ - scripts/generator/cpp/gmock_class.py \ - scripts/generator/cpp/keywords.py \ - scripts/generator/cpp/tokenize.py \ - scripts/generator/cpp/utils.py \ - scripts/generator/gmock_gen.py - -# Script for diagnosing compiler errors in programs that use Google -# Mock. -EXTRA_DIST += scripts/gmock_doctor.py - -# CMake scripts. -EXTRA_DIST += \ - CMakeLists.txt - -# Microsoft Visual Studio 2005 projects. -EXTRA_DIST += \ - msvc/2005/gmock.sln \ - msvc/2005/gmock.vcproj \ - msvc/2005/gmock_config.vsprops \ - msvc/2005/gmock_main.vcproj \ - msvc/2005/gmock_test.vcproj - -# Microsoft Visual Studio 2010 projects. -EXTRA_DIST += \ - msvc/2010/gmock.sln \ - msvc/2010/gmock.vcxproj \ - msvc/2010/gmock_config.props \ - msvc/2010/gmock_main.vcxproj \ - msvc/2010/gmock_test.vcxproj - -if HAVE_PYTHON -# gmock_test.cc does not really depend on files generated by the -# fused-gmock-internal rule. However, gmock_test.o does, and it is -# important to include test/gmock_test.cc as part of this rule in order to -# prevent compiling gmock_test.o until all dependent files have been -# generated. -$(test_gmock_fused_test_SOURCES): fused-gmock-internal - -# TODO(vladl@google.com): Find a way to add Google Tests's sources here. -fused-gmock-internal: $(pkginclude_HEADERS) $(pkginclude_internal_HEADERS) \ - $(lib_libgmock_la_SOURCES) $(GMOCK_SOURCE_INGLUDES) \ - $(lib_libgmock_main_la_SOURCES) \ - scripts/fuse_gmock_files.py - mkdir -p "$(srcdir)/fused-src" - chmod -R u+w "$(srcdir)/fused-src" - rm -f "$(srcdir)/fused-src/gtest/gtest.h" - rm -f "$(srcdir)/fused-src/gmock/gmock.h" - rm -f "$(srcdir)/fused-src/gmock-gtest-all.cc" - "$(srcdir)/scripts/fuse_gmock_files.py" "$(srcdir)/fused-src" - cp -f "$(srcdir)/src/gmock_main.cc" "$(srcdir)/fused-src" - -maintainer-clean-local: - rm -rf "$(srcdir)/fused-src" -endif - -# Death tests may produce core dumps in the build directory. In case -# this happens, clean them to keep distcleancheck happy. -CLEANFILES = core - -# Disables 'make install' as installing a compiled version of Google -# Mock can lead to undefined behavior due to violation of the -# One-Definition Rule. - -install-exec-local: - echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system." - false - -install-data-local: - echo "'make install' is dangerous and not supported. Instead, see README for how to integrate Google Mock into your build system." - false diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/README.md b/metamod-source/third_party/amtl/third_party/googletest/googlemock/README.md deleted file mode 100644 index fced671c..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/README.md +++ /dev/null @@ -1,293 +0,0 @@ -## Google Mock ## - -The Google C++ mocking framework. - -### Overview ### - -Google's framework for writing and using C++ mock classes. -It can help you derive better designs of your system and write better tests. - -It is inspired by: - - * [jMock](http://www.jmock.org/), - * [EasyMock](http://www.easymock.org/), and - * [Hamcrest](http://code.google.com/p/hamcrest/), - -and designed with C++'s specifics in mind. - -Google mock: - - * lets you create mock classes trivially using simple macros. - * supports a rich set of matchers and actions. - * handles unordered, partially ordered, or completely ordered expectations. - * is extensible by users. - -We hope you find it useful! - -### Features ### - - * Provides a declarative syntax for defining mocks. - * Can easily define partial (hybrid) mocks, which are a cross of real - and mock objects. - * Handles functions of arbitrary types and overloaded functions. - * Comes with a rich set of matchers for validating function arguments. - * Uses an intuitive syntax for controlling the behavior of a mock. - * Does automatic verification of expectations (no record-and-replay needed). - * Allows arbitrary (partial) ordering constraints on - function calls to be expressed,. - * Lets an user extend it by defining new matchers and actions. - * Does not use exceptions. - * Is easy to learn and use. - -Please see the project page above for more information as well as the -mailing list for questions, discussions, and development. There is -also an IRC channel on OFTC (irc.oftc.net) #gtest available. Please -join us! - -Please note that code under [scripts/generator](scripts/generator/) is -from [cppclean](http://code.google.com/p/cppclean/) and released under -the Apache License, which is different from Google Mock's license. - -## Getting Started ## - -If you are new to the project, we suggest that you read the user -documentation in the following order: - - * Learn the [basics](../googletest/docs/primer.md) of - Google Test, if you choose to use Google Mock with it (recommended). - * Read [Google Mock for Dummies](../googlemock/docs/ForDummies.md). - * Read the instructions below on how to build Google Mock. - -You can also watch Zhanyong's [talk](http://www.youtube.com/watch?v=sYpCyLI47rM) on Google Mock's usage and implementation. - -Once you understand the basics, check out the rest of the docs: - - * [CheatSheet](../googlemock/docs/CheatSheet.md) - all the commonly used stuff - at a glance. - * [CookBook](../googlemock/docs/CookBook.md) - recipes for getting things done, - including advanced techniques. - -If you need help, please check the -[KnownIssues](docs/KnownIssues.md) and -[FrequentlyAskedQuestions](docs/FrequentlyAskedQuestions.md) before -posting a question on the -[discussion group](http://groups.google.com/group/googlemock). - - -### Using Google Mock Without Google Test ### - -Google Mock is not a testing framework itself. Instead, it needs a -testing framework for writing tests. Google Mock works seamlessly -with [Google Test](https://github.com/google/googletest), but -you can also use it with [any C++ testing framework](../googlemock/docs/ForDummies.md#using-google-mock-with-any-testing-framework). - -### Requirements for End Users ### - -Google Mock is implemented on top of [Google Test]( -http://github.com/google/googletest/), and depends on it. -You must use the bundled version of Google Test when using Google Mock. - -You can also easily configure Google Mock to work with another testing -framework, although it will still need Google Test. Please read -["Using_Google_Mock_with_Any_Testing_Framework"]( - ../googlemock/docs/ForDummies.md#using-google-mock-with-any-testing-framework) -for instructions. - -Google Mock depends on advanced C++ features and thus requires a more -modern compiler. The following are needed to use Google Mock: - -#### Linux Requirements #### - - * GNU-compatible Make or "gmake" - * POSIX-standard shell - * POSIX(-2) Regular Expressions (regex.h) - * C++98-standard-compliant compiler (e.g. GCC 3.4 or newer) - -#### Windows Requirements #### - - * Microsoft Visual C++ 8.0 SP1 or newer - -#### Mac OS X Requirements #### - - * Mac OS X 10.4 Tiger or newer - * Developer Tools Installed - -### Requirements for Contributors ### - -We welcome patches. If you plan to contribute a patch, you need to -build Google Mock and its tests, which has further requirements: - - * Automake version 1.9 or newer - * Autoconf version 2.59 or newer - * Libtool / Libtoolize - * Python version 2.3 or newer (for running some of the tests and - re-generating certain source files from templates) - -### Building Google Mock ### - -#### Using CMake #### - -If you have CMake available, it is recommended that you follow the -[build instructions][gtest_cmakebuild] -as described for Google Test. - -If are using Google Mock with an -existing CMake project, the section -[Incorporating Into An Existing CMake Project][gtest_incorpcmake] -may be of particular interest. -To make it work for Google Mock you will need to change - - target_link_libraries(example gtest_main) - -to - - target_link_libraries(example gmock_main) - -This works because `gmock_main` library is compiled with Google Test. - -#### Preparing to Build (Unix only) #### - -If you are using a Unix system and plan to use the GNU Autotools build -system to build Google Mock (described below), you'll need to -configure it now. - -To prepare the Autotools build system: - - cd googlemock - autoreconf -fvi - -To build Google Mock and your tests that use it, you need to tell your -build system where to find its headers and source files. The exact -way to do it depends on which build system you use, and is usually -straightforward. - -This section shows how you can integrate Google Mock into your -existing build system. - -Suppose you put Google Mock in directory `${GMOCK_DIR}` and Google Test -in `${GTEST_DIR}` (the latter is `${GMOCK_DIR}/gtest` by default). To -build Google Mock, create a library build target (or a project as -called by Visual Studio and Xcode) to compile - - ${GTEST_DIR}/src/gtest-all.cc and ${GMOCK_DIR}/src/gmock-all.cc - -with - - ${GTEST_DIR}/include and ${GMOCK_DIR}/include - -in the system header search path, and - - ${GTEST_DIR} and ${GMOCK_DIR} - -in the normal header search path. Assuming a Linux-like system and gcc, -something like the following will do: - - g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} \ - -isystem ${GMOCK_DIR}/include -I${GMOCK_DIR} \ - -pthread -c ${GTEST_DIR}/src/gtest-all.cc - g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} \ - -isystem ${GMOCK_DIR}/include -I${GMOCK_DIR} \ - -pthread -c ${GMOCK_DIR}/src/gmock-all.cc - ar -rv libgmock.a gtest-all.o gmock-all.o - -(We need -pthread as Google Test and Google Mock use threads.) - -Next, you should compile your test source file with -${GTEST\_DIR}/include and ${GMOCK\_DIR}/include in the header search -path, and link it with gmock and any other necessary libraries: - - g++ -isystem ${GTEST_DIR}/include -isystem ${GMOCK_DIR}/include \ - -pthread path/to/your_test.cc libgmock.a -o your_test - -As an example, the make/ directory contains a Makefile that you can -use to build Google Mock on systems where GNU make is available -(e.g. Linux, Mac OS X, and Cygwin). It doesn't try to build Google -Mock's own tests. Instead, it just builds the Google Mock library and -a sample test. You can use it as a starting point for your own build -script. - -If the default settings are correct for your environment, the -following commands should succeed: - - cd ${GMOCK_DIR}/make - make - ./gmock_test - -If you see errors, try to tweak the contents of -[make/Makefile](make/Makefile) to make them go away. - -### Windows ### - -The msvc/2005 directory contains VC++ 2005 projects and the msvc/2010 -directory contains VC++ 2010 projects for building Google Mock and -selected tests. - -Change to the appropriate directory and run "msbuild gmock.sln" to -build the library and tests (or open the gmock.sln in the MSVC IDE). -If you want to create your own project to use with Google Mock, you'll -have to configure it to use the `gmock_config` propety sheet. For that: - - * Open the Property Manager window (View | Other Windows | Property Manager) - * Right-click on your project and select "Add Existing Property Sheet..." - * Navigate to `gmock_config.vsprops` or `gmock_config.props` and select it. - * In Project Properties | Configuration Properties | General | Additional - Include Directories, type /include. - -### Tweaking Google Mock ### - -Google Mock can be used in diverse environments. The default -configuration may not work (or may not work well) out of the box in -some environments. However, you can easily tweak Google Mock by -defining control macros on the compiler command line. Generally, -these macros are named like `GTEST_XYZ` and you define them to either 1 -or 0 to enable or disable a certain feature. - -We list the most frequently used macros below. For a complete list, -see file [${GTEST\_DIR}/include/gtest/internal/gtest-port.h]( -../googletest/include/gtest/internal/gtest-port.h). - -### As a Shared Library (DLL) ### - -Google Mock is compact, so most users can build and link it as a static -library for the simplicity. Google Mock can be used as a DLL, but the -same DLL must contain Google Test as well. See -[Google Test's README][gtest_readme] -for instructions on how to set up necessary compiler settings. - -### Tweaking Google Mock ### - -Most of Google Test's control macros apply to Google Mock as well. -Please see [Google Test's README][gtest_readme] for how to tweak them. - -### Upgrading from an Earlier Version ### - -We strive to keep Google Mock releases backward compatible. -Sometimes, though, we have to make some breaking changes for the -users' long-term benefits. This section describes what you'll need to -do if you are upgrading from an earlier version of Google Mock. - -#### Upgrading from 1.1.0 or Earlier #### - -You may need to explicitly enable or disable Google Test's own TR1 -tuple library. See the instructions in section "[Choosing a TR1 Tuple -Library](#choosing-a-tr1-tuple-library)". - -#### Upgrading from 1.4.0 or Earlier #### - -On platforms where the pthread library is available, Google Test and -Google Mock use it in order to be thread-safe. For this to work, you -may need to tweak your compiler and/or linker flags. Please see the -"[Multi-threaded Tests](../googletest/README.md#multi-threaded-tests)" section in file Google Test's README for what you may need to do. - -If you have custom matchers defined using `MatcherInterface` or -`MakePolymorphicMatcher()`, you'll need to update their definitions to -use the new matcher API ( -[monomorphic](./docs/CookBook.md#writing-new-monomorphic-matchers), -[polymorphic](./docs/CookBook.md#writing-new-polymorphic-matchers)). -Matchers defined using `MATCHER()` or `MATCHER_P*()` aren't affected. - -Happy testing! - -[gtest_readme]: ../googletest/README.md "googletest" -[gtest_cmakebuild]: ../googletest/README.md#using-cmake "Using CMake" -[gtest_incorpcmake]: ../googletest/README.md#incorporating-into-an-existing-cmake-project "Incorporating Into An Existing CMake Project" diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/cmake/gmock.pc.in b/metamod-source/third_party/amtl/third_party/googletest/googlemock/cmake/gmock.pc.in deleted file mode 100644 index 2ef0fbca..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/cmake/gmock.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - -Name: gmock -Description: GoogleMock (without main() function) -Version: @PROJECT_VERSION@ -URL: https://github.com/google/googletest -Requires: gtest -Libs: -L${libdir} -lgmock @CMAKE_THREAD_LIBS_INIT@ -Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/cmake/gmock_main.pc.in b/metamod-source/third_party/amtl/third_party/googletest/googlemock/cmake/gmock_main.pc.in deleted file mode 100644 index 04658fe2..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/cmake/gmock_main.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ - -Name: gmock_main -Description: GoogleMock (with main() function) -Version: @PROJECT_VERSION@ -URL: https://github.com/google/googletest -Requires: gmock -Libs: -L${libdir} -lgmock_main @CMAKE_THREAD_LIBS_INIT@ -Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ @CMAKE_THREAD_LIBS_INIT@ diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/configure.ac b/metamod-source/third_party/amtl/third_party/googletest/googlemock/configure.ac deleted file mode 100644 index cb5e1a6a..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/configure.ac +++ /dev/null @@ -1,146 +0,0 @@ -m4_include(../googletest/m4/acx_pthread.m4) - -AC_INIT([Google C++ Mocking Framework], - [1.8.0], - [googlemock@googlegroups.com], - [gmock]) - -# Provide various options to initialize the Autoconf and configure processes. -AC_PREREQ([2.59]) -AC_CONFIG_SRCDIR([./LICENSE]) -AC_CONFIG_AUX_DIR([build-aux]) -AC_CONFIG_HEADERS([build-aux/config.h]) -AC_CONFIG_FILES([Makefile]) -AC_CONFIG_FILES([scripts/gmock-config], [chmod +x scripts/gmock-config]) - -# Initialize Automake with various options. We require at least v1.9, prevent -# pedantic complaints about package files, and enable various distribution -# targets. -AM_INIT_AUTOMAKE([1.9 dist-bzip2 dist-zip foreign subdir-objects]) - -# Check for programs used in building Google Test. -AC_PROG_CC -AC_PROG_CXX -AC_LANG([C++]) -AC_PROG_LIBTOOL - -# TODO(chandlerc@google.com): Currently we aren't running the Python tests -# against the interpreter detected by AM_PATH_PYTHON, and so we condition -# HAVE_PYTHON by requiring "python" to be in the PATH, and that interpreter's -# version to be >= 2.3. This will allow the scripts to use a "/usr/bin/env" -# hashbang. -PYTHON= # We *do not* allow the user to specify a python interpreter -AC_PATH_PROG([PYTHON],[python],[:]) -AS_IF([test "$PYTHON" != ":"], - [AM_PYTHON_CHECK_VERSION([$PYTHON],[2.3],[:],[PYTHON=":"])]) -AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != ":"]) - -# TODO(chandlerc@google.com) Check for the necessary system headers. - -# Configure pthreads. -AC_ARG_WITH([pthreads], - [AS_HELP_STRING([--with-pthreads], - [use pthreads (default is yes)])], - [with_pthreads=$withval], - [with_pthreads=check]) - -have_pthreads=no -AS_IF([test "x$with_pthreads" != "xno"], - [ACX_PTHREAD( - [], - [AS_IF([test "x$with_pthreads" != "xcheck"], - [AC_MSG_FAILURE( - [--with-pthreads was specified, but unable to be used])])]) - have_pthreads="$acx_pthread_ok"]) -AM_CONDITIONAL([HAVE_PTHREADS],[test "x$have_pthreads" == "xyes"]) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_LIBS) - -# GoogleMock currently has hard dependencies upon GoogleTest above and beyond -# running its own test suite, so we both provide our own version in -# a subdirectory and provide some logic to use a custom version or a system -# installed version. -AC_ARG_WITH([gtest], - [AS_HELP_STRING([--with-gtest], - [Specifies how to find the gtest package. If no - arguments are given, the default behavior, a - system installed gtest will be used if present, - and an internal version built otherwise. If a - path is provided, the gtest built or installed at - that prefix will be used.])], - [], - [with_gtest=yes]) -AC_ARG_ENABLE([external-gtest], - [AS_HELP_STRING([--disable-external-gtest], - [Disables any detection or use of a system - installed or user provided gtest. Any option to - '--with-gtest' is ignored. (Default is enabled.)]) - ], [], [enable_external_gtest=yes]) -AS_IF([test "x$with_gtest" == "xno"], - [AC_MSG_ERROR([dnl -Support for GoogleTest was explicitly disabled. Currently GoogleMock has a hard -dependency upon GoogleTest to build, please provide a version, or allow -GoogleMock to use any installed version and fall back upon its internal -version.])]) - -# Setup various GTEST variables. TODO(chandlerc@google.com): When these are -# used below, they should be used such that any pre-existing values always -# trump values we set them to, so that they can be used to selectively override -# details of the detection process. -AC_ARG_VAR([GTEST_CONFIG], - [The exact path of Google Test's 'gtest-config' script.]) -AC_ARG_VAR([GTEST_CPPFLAGS], - [C-like preprocessor flags for Google Test.]) -AC_ARG_VAR([GTEST_CXXFLAGS], - [C++ compile flags for Google Test.]) -AC_ARG_VAR([GTEST_LDFLAGS], - [Linker path and option flags for Google Test.]) -AC_ARG_VAR([GTEST_LIBS], - [Library linking flags for Google Test.]) -AC_ARG_VAR([GTEST_VERSION], - [The version of Google Test available.]) -HAVE_BUILT_GTEST="no" - -GTEST_MIN_VERSION="1.8.0" - -AS_IF([test "x${enable_external_gtest}" = "xyes"], - [# Begin filling in variables as we are able. - AS_IF([test "x${with_gtest}" != "xyes"], - [AS_IF([test -x "${with_gtest}/scripts/gtest-config"], - [GTEST_CONFIG="${with_gtest}/scripts/gtest-config"], - [GTEST_CONFIG="${with_gtest}/bin/gtest-config"]) - AS_IF([test -x "${GTEST_CONFIG}"], [], - [AC_MSG_ERROR([dnl -Unable to locate either a built or installed Google Test at '${with_gtest}'.]) - ])]) - - AS_IF([test -x "${GTEST_CONFIG}"], [], - [AC_PATH_PROG([GTEST_CONFIG], [gtest-config])]) - AS_IF([test -x "${GTEST_CONFIG}"], - [AC_MSG_CHECKING([for Google Test version >= ${GTEST_MIN_VERSION}]) - AS_IF([${GTEST_CONFIG} --min-version=${GTEST_MIN_VERSION}], - [AC_MSG_RESULT([yes]) - HAVE_BUILT_GTEST="yes"], - [AC_MSG_RESULT([no])])])]) - -AS_IF([test "x${HAVE_BUILT_GTEST}" = "xyes"], - [GTEST_CPPFLAGS=`${GTEST_CONFIG} --cppflags` - GTEST_CXXFLAGS=`${GTEST_CONFIG} --cxxflags` - GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags` - GTEST_LIBS=`${GTEST_CONFIG} --libs` - GTEST_VERSION=`${GTEST_CONFIG} --version`], - [ - # GTEST_CONFIG needs to be executable both in a Makefile environment and - # in a shell script environment, so resolve an absolute path for it here. - GTEST_CONFIG="`pwd -P`/../googletest/scripts/gtest-config" - GTEST_CPPFLAGS='-I$(top_srcdir)/../googletest/include' - GTEST_CXXFLAGS='-g' - GTEST_LDFLAGS='' - GTEST_LIBS='$(top_builddir)/../googletest/lib/libgtest.la' - GTEST_VERSION="${GTEST_MIN_VERSION}"]) - -# TODO(chandlerc@google.com) Check the types, structures, and other compiler -# and architecture characteristics. - -# Output the generated files. No further autoconf macros may be used. -AC_OUTPUT diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/CheatSheet.md b/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/CheatSheet.md deleted file mode 100644 index d5757b23..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/CheatSheet.md +++ /dev/null @@ -1,588 +0,0 @@ - - -# Defining a Mock Class # - -## Mocking a Normal Class ## - -Given -```cpp -class Foo { - ... - virtual ~Foo(); - virtual int GetSize() const = 0; - virtual string Describe(const char* name) = 0; - virtual string Describe(int type) = 0; - virtual bool Process(Bar elem, int count) = 0; -}; -``` -(note that `~Foo()` **must** be virtual) we can define its mock as -```cpp -#include "gmock/gmock.h" - -class MockFoo : public Foo { - MOCK_CONST_METHOD0(GetSize, int()); - MOCK_METHOD1(Describe, string(const char* name)); - MOCK_METHOD1(Describe, string(int type)); - MOCK_METHOD2(Process, bool(Bar elem, int count)); -}; -``` - -To create a "nice" mock object which ignores all uninteresting calls, -or a "strict" mock object, which treats them as failures: -```cpp -NiceMock nice_foo; // The type is a subclass of MockFoo. -StrictMock strict_foo; // The type is a subclass of MockFoo. -``` - -## Mocking a Class Template ## - -To mock -```cpp -template -class StackInterface { - public: - ... - virtual ~StackInterface(); - virtual int GetSize() const = 0; - virtual void Push(const Elem& x) = 0; -}; -``` -(note that `~StackInterface()` **must** be virtual) just append `_T` to the `MOCK_*` macros: -```cpp -template -class MockStack : public StackInterface { - public: - ... - MOCK_CONST_METHOD0_T(GetSize, int()); - MOCK_METHOD1_T(Push, void(const Elem& x)); -}; -``` - -## Specifying Calling Conventions for Mock Functions ## - -If your mock function doesn't use the default calling convention, you -can specify it by appending `_WITH_CALLTYPE` to any of the macros -described in the previous two sections and supplying the calling -convention as the first argument to the macro. For example, -```cpp - MOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, Foo, bool(int n)); - MOCK_CONST_METHOD2_WITH_CALLTYPE(STDMETHODCALLTYPE, Bar, int(double x, double y)); -``` -where `STDMETHODCALLTYPE` is defined by `` on Windows. - -# Using Mocks in Tests # - -The typical flow is: - 1. Import the Google Mock names you need to use. All Google Mock names are in the `testing` namespace unless they are macros or otherwise noted. - 1. Create the mock objects. - 1. Optionally, set the default actions of the mock objects. - 1. Set your expectations on the mock objects (How will they be called? What wil they do?). - 1. Exercise code that uses the mock objects; if necessary, check the result using [Google Test](../../googletest/) assertions. - 1. When a mock objects is destructed, Google Mock automatically verifies that all expectations on it have been satisfied. - -Here is an example: -```cpp -using ::testing::Return; // #1 - -TEST(BarTest, DoesThis) { - MockFoo foo; // #2 - - ON_CALL(foo, GetSize()) // #3 - .WillByDefault(Return(1)); - // ... other default actions ... - - EXPECT_CALL(foo, Describe(5)) // #4 - .Times(3) - .WillRepeatedly(Return("Category 5")); - // ... other expectations ... - - EXPECT_EQ("good", MyProductionFunction(&foo)); // #5 -} // #6 -``` - -# Setting Default Actions # - -Google Mock has a **built-in default action** for any function that -returns `void`, `bool`, a numeric value, or a pointer. - -To customize the default action for functions with return type `T` globally: -```cpp -using ::testing::DefaultValue; - -// Sets the default value to be returned. T must be CopyConstructible. -DefaultValue::Set(value); -// Sets a factory. Will be invoked on demand. T must be MoveConstructible. -// T MakeT(); -DefaultValue::SetFactory(&MakeT); -// ... use the mocks ... -// Resets the default value. -DefaultValue::Clear(); -``` - -To customize the default action for a particular method, use `ON_CALL()`: -```cpp -ON_CALL(mock_object, method(matchers)) - .With(multi_argument_matcher) ? - .WillByDefault(action); -``` - -# Setting Expectations # - -`EXPECT_CALL()` sets **expectations** on a mock method (How will it be -called? What will it do?): -```cpp -EXPECT_CALL(mock_object, method(matchers)) - .With(multi_argument_matcher) ? - .Times(cardinality) ? - .InSequence(sequences) * - .After(expectations) * - .WillOnce(action) * - .WillRepeatedly(action) ? - .RetiresOnSaturation(); ? -``` - -If `Times()` is omitted, the cardinality is assumed to be: - - * `Times(1)` when there is neither `WillOnce()` nor `WillRepeatedly()`; - * `Times(n)` when there are `n WillOnce()`s but no `WillRepeatedly()`, where `n` >= 1; or - * `Times(AtLeast(n))` when there are `n WillOnce()`s and a `WillRepeatedly()`, where `n` >= 0. - -A method with no `EXPECT_CALL()` is free to be invoked _any number of times_, and the default action will be taken each time. - -# Matchers # - -A **matcher** matches a _single_ argument. You can use it inside -`ON_CALL()` or `EXPECT_CALL()`, or use it to validate a value -directly: - -| Matcher | Description | -|:--------|:------------| -| `EXPECT_THAT(value, matcher)` | Asserts that `value` matches `matcher`. | -| `ASSERT_THAT(value, matcher)` | The same as `EXPECT_THAT(value, matcher)`, except that it generates a **fatal** failure. | - -Built-in matchers (where `argument` is the function argument) are -divided into several categories: - -## Wildcard ## -| Matcher | Description | -|:--------|:------------| -|`_`|`argument` can be any value of the correct type.| -|`A()` or `An()`|`argument` can be any value of type `type`. | - -## Generic Comparison ## - -| Matcher | Description | -|:---------------------|:------------------| -|`Eq(value)` or `value`|`argument == value`| -|`Ge(value)` |`argument >= value`| -|`Gt(value)` |`argument > value` | -|`Le(value)` |`argument <= value`| -|`Lt(value)` |`argument < value` | -|`Ne(value)` |`argument != value`| -|`IsNull()` |`argument` is a `NULL` pointer (raw or smart).| -|`NotNull()` |`argument` is a non-null pointer (raw or smart).| -|`VariantWith(m)` |`argument` is `variant<>` that holds the alternative of type T with a value matching `m`.| -|`Ref(variable)` |`argument` is a reference to `variable`.| -|`TypedEq(value)`|`argument` has type `type` and is equal to `value`. You may need to use this instead of `Eq(value)` when the mock function is overloaded.| - -Except `Ref()`, these matchers make a _copy_ of `value` in case it's -modified or destructed later. If the compiler complains that `value` -doesn't have a public copy constructor, try wrap it in `ByRef()`, -e.g. `Eq(ByRef(non_copyable_value))`. If you do that, make sure -`non_copyable_value` is not changed afterwards, or the meaning of your -matcher will be changed. - -## Floating-Point Matchers ## - -| Matcher | Description | -|:-------------------|:---------------------------------------------------------------------------------------------------------| -|`DoubleEq(a_double)`|`argument` is a `double` value approximately equal to `a_double`, treating two NaNs as unequal. | -|`FloatEq(a_float)` |`argument` is a `float` value approximately equal to `a_float`, treating two NaNs as unequal. | -|`NanSensitiveDoubleEq(a_double)`|`argument` is a `double` value approximately equal to `a_double`, treating two NaNs as equal. | -|`NanSensitiveFloatEq(a_float)`|`argument` is a `float` value approximately equal to `a_float`, treating two NaNs as equal. | - -The above matchers use ULP-based comparison (the same as used in -[Google Test](../../googletest/)). They -automatically pick a reasonable error bound based on the absolute -value of the expected value. `DoubleEq()` and `FloatEq()` conform to -the IEEE standard, which requires comparing two NaNs for equality to -return false. The `NanSensitive*` version instead treats two NaNs as -equal, which is often what a user wants. - -| Matcher | Description | -|:--------|:------------| -|`DoubleNear(a_double, max_abs_error)`|`argument` is a `double` value close to `a_double` (absolute error <= `max_abs_error`), treating two NaNs as unequal.| -|`FloatNear(a_float, max_abs_error)`|`argument` is a `float` value close to `a_float` (absolute error <= `max_abs_error`), treating two NaNs as unequal.| -|`NanSensitiveDoubleNear(a_double, max_abs_error)`|`argument` is a `double` value close to `a_double` (absolute error <= `max_abs_error`), treating two NaNs as equal.| -|`NanSensitiveFloatNear(a_float, max_abs_error)`|`argument` is a `float` value close to `a_float` (absolute error <= `max_abs_error`), treating two NaNs as equal.| - -## String Matchers ## - -The `argument` can be either a C string or a C++ string object: - -| Matcher | Description | -|:----------------------|:--------------------------------------------------| -|`ContainsRegex(string)`|`argument` matches the given regular expression. | -|`EndsWith(suffix)` |`argument` ends with string `suffix`. | -|`HasSubstr(string)` |`argument` contains `string` as a sub-string. | -|`MatchesRegex(string)` |`argument` matches the given regular expression with the match starting at the first character and ending at the last character.| -|`StartsWith(prefix)` |`argument` starts with string `prefix`. | -|`StrCaseEq(string)` |`argument` is equal to `string`, ignoring case. | -|`StrCaseNe(string)` |`argument` is not equal to `string`, ignoring case.| -|`StrEq(string)` |`argument` is equal to `string`. | -|`StrNe(string)` |`argument` is not equal to `string`. | - -`ContainsRegex()` and `MatchesRegex()` use the regular expression -syntax defined -[here](../../googletest/docs/advanced.md#regular-expression-syntax). -`StrCaseEq()`, `StrCaseNe()`, `StrEq()`, and `StrNe()` work for wide -strings as well. - -## Container Matchers ## - -Most STL-style containers support `==`, so you can use -`Eq(expected_container)` or simply `expected_container` to match a -container exactly. If you want to write the elements in-line, -match them more flexibly, or get more informative messages, you can use: - -| Matcher | Description | -|:--------|:------------| -| `ContainerEq(container)` | The same as `Eq(container)` except that the failure message also includes which elements are in one container but not the other. | -| `Contains(e)` | `argument` contains an element that matches `e`, which can be either a value or a matcher. | -| `Each(e)` | `argument` is a container where _every_ element matches `e`, which can be either a value or a matcher. | -| `ElementsAre(e0, e1, ..., en)` | `argument` has `n + 1` elements, where the i-th element matches `ei`, which can be a value or a matcher. 0 to 10 arguments are allowed. | -| `ElementsAreArray({ e0, e1, ..., en })`, `ElementsAreArray(array)`, or `ElementsAreArray(array, count)` | The same as `ElementsAre()` except that the expected element values/matchers come from an initializer list, STL-style container, or C-style array. | -| `IsEmpty()` | `argument` is an empty container (`container.empty()`). | -| `Pointwise(m, container)` | `argument` contains the same number of elements as in `container`, and for all i, (the i-th element in `argument`, the i-th element in `container`) match `m`, which is a matcher on 2-tuples. E.g. `Pointwise(Le(), upper_bounds)` verifies that each element in `argument` doesn't exceed the corresponding element in `upper_bounds`. See more detail below. | -| `SizeIs(m)` | `argument` is a container whose size matches `m`. E.g. `SizeIs(2)` or `SizeIs(Lt(2))`. | -| `UnorderedElementsAre(e0, e1, ..., en)` | `argument` has `n + 1` elements, and under some permutation each element matches an `ei` (for a different `i`), which can be a value or a matcher. 0 to 10 arguments are allowed. | -| `UnorderedElementsAreArray({ e0, e1, ..., en })`, `UnorderedElementsAreArray(array)`, or `UnorderedElementsAreArray(array, count)` | The same as `UnorderedElementsAre()` except that the expected element values/matchers come from an initializer list, STL-style container, or C-style array. | -| `WhenSorted(m)` | When `argument` is sorted using the `<` operator, it matches container matcher `m`. E.g. `WhenSorted(ElementsAre(1, 2, 3))` verifies that `argument` contains elements `1`, `2`, and `3`, ignoring order. | -| `WhenSortedBy(comparator, m)` | The same as `WhenSorted(m)`, except that the given comparator instead of `<` is used to sort `argument`. E.g. `WhenSortedBy(std::greater(), ElementsAre(3, 2, 1))`. | - -Notes: - - * These matchers can also match: - 1. a native array passed by reference (e.g. in `Foo(const int (&a)[5])`), and - 1. an array passed as a pointer and a count (e.g. in `Bar(const T* buffer, int len)` -- see [Multi-argument Matchers](#multiargument-matchers)). - * The array being matched may be multi-dimensional (i.e. its elements can be arrays). - * `m` in `Pointwise(m, ...)` should be a matcher for `::testing::tuple` where `T` and `U` are the element type of the actual container and the expected container, respectively. For example, to compare two `Foo` containers where `Foo` doesn't support `operator==` but has an `Equals()` method, one might write: - -```cpp -using ::testing::get; -MATCHER(FooEq, "") { - return get<0>(arg).Equals(get<1>(arg)); -} -... -EXPECT_THAT(actual_foos, Pointwise(FooEq(), expected_foos)); -``` - -## Member Matchers ## - -| Matcher | Description | -|:--------|:------------| -|`Field(&class::field, m)`|`argument.field` (or `argument->field` when `argument` is a plain pointer) matches matcher `m`, where `argument` is an object of type _class_.| -|`Key(e)`|`argument.first` matches `e`, which can be either a value or a matcher. E.g. `Contains(Key(Le(5)))` can verify that a `map` contains a key `<= 5`.| -|`Pair(m1, m2)`|`argument` is an `std::pair` whose `first` field matches `m1` and `second` field matches `m2`.| -|`Property(&class::property, m)`|`argument.property()` (or `argument->property()` when `argument` is a plain pointer) matches matcher `m`, where `argument` is an object of type _class_.| - -## Matching the Result of a Function or Functor ## - -| Matcher | Description | -|:---------------|:---------------------------------------------------------------------| -|`ResultOf(f, m)`|`f(argument)` matches matcher `m`, where `f` is a function or functor.| - -## Pointer Matchers ## - -| Matcher | Description | -|:------------------------|:-----------------------------------------------------------------------------------------------| -|`Pointee(m)` |`argument` (either a smart pointer or a raw pointer) points to a value that matches matcher `m`.| -|`WhenDynamicCastTo(m)`| when `argument` is passed through `dynamic_cast()`, it matches matcher `m`. | - -## Multiargument Matchers ## - -Technically, all matchers match a _single_ value. A "multi-argument" -matcher is just one that matches a _tuple_. The following matchers can -be used to match a tuple `(x, y)`: - -| Matcher | Description | -|:--------|:------------| -|`Eq()`|`x == y`| -|`Ge()`|`x >= y`| -|`Gt()`|`x > y` | -|`Le()`|`x <= y`| -|`Lt()`|`x < y` | -|`Ne()`|`x != y`| - -You can use the following selectors to pick a subset of the arguments -(or reorder them) to participate in the matching: - -| Matcher | Description | -|:--------|:------------| -|`AllArgs(m)`|Equivalent to `m`. Useful as syntactic sugar in `.With(AllArgs(m))`.| -|`Args(m)`|The tuple of the `k` selected (using 0-based indices) arguments matches `m`, e.g. `Args<1, 2>(Eq())`.| - -## Composite Matchers ## - -You can make a matcher from one or more other matchers: - -| Matcher | Description | -|:-----------------------|:------------------------------------------------------------| -|`AllOf(m1, m2, ..., mn)`|`argument` matches all of the matchers `m1` to `mn`. | -|`AnyOf(m1, m2, ..., mn)`|`argument` matches at least one of the matchers `m1` to `mn`.| -|`Not(m)` |`argument` doesn't match matcher `m`. | - -## Adapters for Matchers ## - -| Matcher | Description | -|:--------|:------------| -|`MatcherCast(m)`|casts matcher `m` to type `Matcher`.| -|`SafeMatcherCast(m)`| [safely casts](CookBook.md#casting-matchers) matcher `m` to type `Matcher`.| -|`Truly(predicate)`|`predicate(argument)` returns something considered by C++ to be true, where `predicate` is a function or functor.| - -## Matchers as Predicates ## - -| Matcher | Description | -|:--------|:------------| -|`Matches(m)(value)`|evaluates to `true` if `value` matches `m`. You can use `Matches(m)` alone as a unary functor.| -|`ExplainMatchResult(m, value, result_listener)`|evaluates to `true` if `value` matches `m`, explaining the result to `result_listener`.| -|`Value(value, m)`|evaluates to `true` if `value` matches `m`.| - -## Defining Matchers ## - -| Matcher | Description | -|:--------|:------------| -| `MATCHER(IsEven, "") { return (arg % 2) == 0; }` | Defines a matcher `IsEven()` to match an even number. | -| `MATCHER_P(IsDivisibleBy, n, "") { *result_listener << "where the remainder is " << (arg % n); return (arg % n) == 0; }` | Defines a macher `IsDivisibleBy(n)` to match a number divisible by `n`. | -| `MATCHER_P2(IsBetween, a, b, std::string(negation ? "isn't" : "is") + " between " + PrintToString(a) + " and " + PrintToString(b)) { return a <= arg && arg <= b; }` | Defines a matcher `IsBetween(a, b)` to match a value in the range [`a`, `b`]. | - -**Notes:** - - 1. The `MATCHER*` macros cannot be used inside a function or class. - 1. The matcher body must be _purely functional_ (i.e. it cannot have any side effect, and the result must not depend on anything other than the value being matched and the matcher parameters). - 1. You can use `PrintToString(x)` to convert a value `x` of any type to a string. - -## Matchers as Test Assertions ## - -| Matcher | Description | -|:--------|:------------| -|`ASSERT_THAT(expression, m)`|Generates a [fatal failure](../../googletest/docs/primer.md#assertions) if the value of `expression` doesn't match matcher `m`.| -|`EXPECT_THAT(expression, m)`|Generates a non-fatal failure if the value of `expression` doesn't match matcher `m`.| - -# Actions # - -**Actions** specify what a mock function should do when invoked. - -## Returning a Value ## - -| Matcher | Description | -|:--------|:------------| -|`Return()`|Return from a `void` mock function.| -|`Return(value)`|Return `value`. If the type of `value` is different to the mock function's return type, `value` is converted to the latter type at the time the expectation is set, not when the action is executed.| -|`ReturnArg()`|Return the `N`-th (0-based) argument.| -|`ReturnNew(a1, ..., ak)`|Return `new T(a1, ..., ak)`; a different object is created each time.| -|`ReturnNull()`|Return a null pointer.| -|`ReturnPointee(ptr)`|Return the value pointed to by `ptr`.| -|`ReturnRef(variable)`|Return a reference to `variable`.| -|`ReturnRefOfCopy(value)`|Return a reference to a copy of `value`; the copy lives as long as the action.| - -## Side Effects ## - -| Matcher | Description | -|:--------|:------------| -|`Assign(&variable, value)`|Assign `value` to variable.| -|`DeleteArg()`| Delete the `N`-th (0-based) argument, which must be a pointer.| -|`SaveArg(pointer)`| Save the `N`-th (0-based) argument to `*pointer`.| -|`SaveArgPointee(pointer)`| Save the value pointed to by the `N`-th (0-based) argument to `*pointer`.| -|`SetArgReferee(value)` | Assign value to the variable referenced by the `N`-th (0-based) argument. | -|`SetArgPointee(value)` |Assign `value` to the variable pointed by the `N`-th (0-based) argument.| -|`SetArgumentPointee(value)`|Same as `SetArgPointee(value)`. Deprecated. Will be removed in v1.7.0.| -|`SetArrayArgument(first, last)`|Copies the elements in source range [`first`, `last`) to the array pointed to by the `N`-th (0-based) argument, which can be either a pointer or an iterator. The action does not take ownership of the elements in the source range.| -|`SetErrnoAndReturn(error, value)`|Set `errno` to `error` and return `value`.| -|`Throw(exception)`|Throws the given exception, which can be any copyable value. Available since v1.1.0.| - -## Using a Function or a Functor as an Action ## - -| Matcher | Description | -|:--------|:------------| -|`Invoke(f)`|Invoke `f` with the arguments passed to the mock function, where `f` can be a global/static function or a functor.| -|`Invoke(object_pointer, &class::method)`|Invoke the {method on the object with the arguments passed to the mock function.| -|`InvokeWithoutArgs(f)`|Invoke `f`, which can be a global/static function or a functor. `f` must take no arguments.| -|`InvokeWithoutArgs(object_pointer, &class::method)`|Invoke the method on the object, which takes no arguments.| -|`InvokeArgument(arg1, arg2, ..., argk)`|Invoke the mock function's `N`-th (0-based) argument, which must be a function or a functor, with the `k` arguments.| - -The return value of the invoked function is used as the return value -of the action. - -When defining a function or functor to be used with `Invoke*()`, you can declare any unused parameters as `Unused`: -```cpp - double Distance(Unused, double x, double y) { return sqrt(x*x + y*y); } - ... - EXPECT_CALL(mock, Foo("Hi", _, _)).WillOnce(Invoke(Distance)); -``` - -In `InvokeArgument(...)`, if an argument needs to be passed by reference, wrap it inside `ByRef()`. For example, -```cpp - InvokeArgument<2>(5, string("Hi"), ByRef(foo)) -``` -calls the mock function's #2 argument, passing to it `5` and `string("Hi")` by value, and `foo` by reference. - -## Default Action ## - -| Matcher | Description | -|:--------|:------------| -|`DoDefault()`|Do the default action (specified by `ON_CALL()` or the built-in one).| - -**Note:** due to technical reasons, `DoDefault()` cannot be used inside a composite action - trying to do so will result in a run-time error. - -## Composite Actions ## - -| Matcher | Description | -|:-----------------------------|:-----------------------------------------------------------------------------------------------------------------------------| -|`DoAll(a1, a2, ..., an)` |Do all actions `a1` to `an` and return the result of `an` in each invocation. The first `n - 1` sub-actions must return void. | -|`IgnoreResult(a)` |Perform action `a` and ignore its result. `a` must not return void. | -|`WithArg(a)` |Pass the `N`-th (0-based) argument of the mock function to action `a` and perform it. | -|`WithArgs(a)`|Pass the selected (0-based) arguments of the mock function to action `a` and perform it. | -|`WithoutArgs(a)` |Perform action `a` without any arguments. | - -## Defining Actions ## - -| Matcher | Description | -|:----------------------------------------------|:------------------------------------------------------------------------------------------| -| `ACTION(Sum) { return arg0 + arg1; }` | Defines an action `Sum()` to return the sum of the mock function's argument #0 and #1. | -| `ACTION_P(Plus, n) { return arg0 + n; }` | Defines an action `Plus(n)` to return the sum of the mock function's argument #0 and `n`. | -| `ACTION_Pk(Foo, p1, ..., pk) { statements; }` | Defines a parameterized action `Foo(p1, ..., pk)` to execute the given `statements`. | - -The `ACTION*` macros cannot be used inside a function or class. - -# Cardinalities # - -These are used in `Times()` to specify how many times a mock function will be called: - -| Matcher | Description | -|:--------|:------------| -|`AnyNumber()`|The function can be called any number of times.| -|`AtLeast(n)`|The call is expected at least `n` times.| -|`AtMost(n)`|The call is expected at most `n` times.| -|`Between(m, n)`|The call is expected between `m` and `n` (inclusive) times.| -|`Exactly(n) or n`|The call is expected exactly `n` times. In particular, the call should never happen when `n` is 0.| - -# Expectation Order # - -By default, the expectations can be matched in _any_ order. If some -or all expectations must be matched in a given order, there are two -ways to specify it. They can be used either independently or -together. - -## The After Clause ## - -```cpp -using ::testing::Expectation; -... -Expectation init_x = EXPECT_CALL(foo, InitX()); -Expectation init_y = EXPECT_CALL(foo, InitY()); -EXPECT_CALL(foo, Bar()) - .After(init_x, init_y); -``` -says that `Bar()` can be called only after both `InitX()` and -`InitY()` have been called. - -If you don't know how many pre-requisites an expectation has when you -write it, you can use an `ExpectationSet` to collect them: - -```cpp -using ::testing::ExpectationSet; -... -ExpectationSet all_inits; -for (int i = 0; i < element_count; i++) { - all_inits += EXPECT_CALL(foo, InitElement(i)); -} -EXPECT_CALL(foo, Bar()) - .After(all_inits); -``` -says that `Bar()` can be called only after all elements have been -initialized (but we don't care about which elements get initialized -before the others). - -Modifying an `ExpectationSet` after using it in an `.After()` doesn't -affect the meaning of the `.After()`. - -## Sequences ## - -When you have a long chain of sequential expectations, it's easier to -specify the order using **sequences**, which don't require you to given -each expectation in the chain a different name. All expected
    -calls
    in the same sequence must occur in the order they are -specified. - -```cpp -using ::testing::Sequence; -Sequence s1, s2; -... -EXPECT_CALL(foo, Reset()) - .InSequence(s1, s2) - .WillOnce(Return(true)); -EXPECT_CALL(foo, GetSize()) - .InSequence(s1) - .WillOnce(Return(1)); -EXPECT_CALL(foo, Describe(A())) - .InSequence(s2) - .WillOnce(Return("dummy")); -``` -says that `Reset()` must be called before _both_ `GetSize()` _and_ -`Describe()`, and the latter two can occur in any order. - -To put many expectations in a sequence conveniently: -```cpp -using ::testing::InSequence; -{ - InSequence dummy; - - EXPECT_CALL(...)...; - EXPECT_CALL(...)...; - ... - EXPECT_CALL(...)...; -} -``` -says that all expected calls in the scope of `dummy` must occur in -strict order. The name `dummy` is irrelevant.) - -# Verifying and Resetting a Mock # - -Google Mock will verify the expectations on a mock object when it is destructed, or you can do it earlier: -```cpp -using ::testing::Mock; -... -// Verifies and removes the expectations on mock_obj; -// returns true iff successful. -Mock::VerifyAndClearExpectations(&mock_obj); -... -// Verifies and removes the expectations on mock_obj; -// also removes the default actions set by ON_CALL(); -// returns true iff successful. -Mock::VerifyAndClear(&mock_obj); -``` - -You can also tell Google Mock that a mock object can be leaked and doesn't -need to be verified: -```cpp -Mock::AllowLeak(&mock_obj); -``` - -# Mock Classes # - -Google Mock defines a convenient mock class template -```cpp -class MockFunction { - public: - MOCK_METHODn(Call, R(A1, ..., An)); -}; -``` -See this [recipe](CookBook.md#using-check-points) for one application of it. - -# Flags # - -| Flag | Description | -|:--------|:------------| -| `--gmock_catch_leaked_mocks=0` | Don't report leaked mock objects as failures. | -| `--gmock_verbose=LEVEL` | Sets the default verbosity level (`info`, `warning`, or `error`) of Google Mock messages. | diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/CookBook.md b/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/CookBook.md deleted file mode 100644 index 52091109..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/CookBook.md +++ /dev/null @@ -1,3660 +0,0 @@ - - -You can find recipes for using Google Mock here. If you haven't yet, -please read the [ForDummies](ForDummies.md) document first to make sure you understand -the basics. - -**Note:** Google Mock lives in the `testing` name space. For -readability, it is recommended to write `using ::testing::Foo;` once in -your file before using the name `Foo` defined by Google Mock. We omit -such `using` statements in this page for brevity, but you should do it -in your own code. - -# Creating Mock Classes # - -## Mocking Private or Protected Methods ## - -You must always put a mock method definition (`MOCK_METHOD*`) in a -`public:` section of the mock class, regardless of the method being -mocked being `public`, `protected`, or `private` in the base class. -This allows `ON_CALL` and `EXPECT_CALL` to reference the mock function -from outside of the mock class. (Yes, C++ allows a subclass to specify -a different access level than the base class on a virtual function.) -Example: - -```cpp -class Foo { - public: - ... - virtual bool Transform(Gadget* g) = 0; - - protected: - virtual void Resume(); - - private: - virtual int GetTimeOut(); -}; - -class MockFoo : public Foo { - public: - ... - MOCK_METHOD1(Transform, bool(Gadget* g)); - - // The following must be in the public section, even though the - // methods are protected or private in the base class. - MOCK_METHOD0(Resume, void()); - MOCK_METHOD0(GetTimeOut, int()); -}; -``` - -## Mocking Overloaded Methods ## - -You can mock overloaded functions as usual. No special attention is required: - -```cpp -class Foo { - ... - - // Must be virtual as we'll inherit from Foo. - virtual ~Foo(); - - // Overloaded on the types and/or numbers of arguments. - virtual int Add(Element x); - virtual int Add(int times, Element x); - - // Overloaded on the const-ness of this object. - virtual Bar& GetBar(); - virtual const Bar& GetBar() const; -}; - -class MockFoo : public Foo { - ... - MOCK_METHOD1(Add, int(Element x)); - MOCK_METHOD2(Add, int(int times, Element x); - - MOCK_METHOD0(GetBar, Bar&()); - MOCK_CONST_METHOD0(GetBar, const Bar&()); -}; -``` - -**Note:** if you don't mock all versions of the overloaded method, the -compiler will give you a warning about some methods in the base class -being hidden. To fix that, use `using` to bring them in scope: - -```cpp -class MockFoo : public Foo { - ... - using Foo::Add; - MOCK_METHOD1(Add, int(Element x)); - // We don't want to mock int Add(int times, Element x); - ... -}; -``` - -## Mocking Class Templates ## - -To mock a class template, append `_T` to the `MOCK_*` macros: - -```cpp -template -class StackInterface { - ... - // Must be virtual as we'll inherit from StackInterface. - virtual ~StackInterface(); - - virtual int GetSize() const = 0; - virtual void Push(const Elem& x) = 0; -}; - -template -class MockStack : public StackInterface { - ... - MOCK_CONST_METHOD0_T(GetSize, int()); - MOCK_METHOD1_T(Push, void(const Elem& x)); -}; -``` - -## Mocking Nonvirtual Methods ## - -Google Mock can mock non-virtual functions to be used in what we call _hi-perf -dependency injection_. - -In this case, instead of sharing a common base class with the real -class, your mock class will be _unrelated_ to the real class, but -contain methods with the same signatures. The syntax for mocking -non-virtual methods is the _same_ as mocking virtual methods: - -```cpp -// A simple packet stream class. None of its members is virtual. -class ConcretePacketStream { - public: - void AppendPacket(Packet* new_packet); - const Packet* GetPacket(size_t packet_number) const; - size_t NumberOfPackets() const; - ... -}; - -// A mock packet stream class. It inherits from no other, but defines -// GetPacket() and NumberOfPackets(). -class MockPacketStream { - public: - MOCK_CONST_METHOD1(GetPacket, const Packet*(size_t packet_number)); - MOCK_CONST_METHOD0(NumberOfPackets, size_t()); - ... -}; -``` - -Note that the mock class doesn't define `AppendPacket()`, unlike the -real class. That's fine as long as the test doesn't need to call it. - -Next, you need a way to say that you want to use -`ConcretePacketStream` in production code and to use `MockPacketStream` -in tests. Since the functions are not virtual and the two classes are -unrelated, you must specify your choice at _compile time_ (as opposed -to run time). - -One way to do it is to templatize your code that needs to use a packet -stream. More specifically, you will give your code a template type -argument for the type of the packet stream. In production, you will -instantiate your template with `ConcretePacketStream` as the type -argument. In tests, you will instantiate the same template with -`MockPacketStream`. For example, you may write: - -```cpp -template -void CreateConnection(PacketStream* stream) { ... } - -template -class PacketReader { - public: - void ReadPackets(PacketStream* stream, size_t packet_num); -}; -``` - -Then you can use `CreateConnection()` and -`PacketReader` in production code, and use -`CreateConnection()` and -`PacketReader` in tests. - -```cpp - MockPacketStream mock_stream; - EXPECT_CALL(mock_stream, ...)...; - .. set more expectations on mock_stream ... - PacketReader reader(&mock_stream); - ... exercise reader ... -``` - -## Mocking Free Functions ## - -It's possible to use Google Mock to mock a free function (i.e. a -C-style function or a static method). You just need to rewrite your -code to use an interface (abstract class). - -Instead of calling a free function (say, `OpenFile`) directly, -introduce an interface for it and have a concrete subclass that calls -the free function: - -```cpp -class FileInterface { - public: - ... - virtual bool Open(const char* path, const char* mode) = 0; -}; - -class File : public FileInterface { - public: - ... - virtual bool Open(const char* path, const char* mode) { - return OpenFile(path, mode); - } -}; -``` - -Your code should talk to `FileInterface` to open a file. Now it's -easy to mock out the function. - -This may seem much hassle, but in practice you often have multiple -related functions that you can put in the same interface, so the -per-function syntactic overhead will be much lower. - -If you are concerned about the performance overhead incurred by -virtual functions, and profiling confirms your concern, you can -combine this with the recipe for [mocking non-virtual methods](#mocking-nonvirtual-methods). - -## The Nice, the Strict, and the Naggy ## - -If a mock method has no `EXPECT_CALL` spec but is called, Google Mock -will print a warning about the "uninteresting call". The rationale is: - - * New methods may be added to an interface after a test is written. We shouldn't fail a test just because a method it doesn't know about is called. - * However, this may also mean there's a bug in the test, so Google Mock shouldn't be silent either. If the user believes these calls are harmless, they can add an `EXPECT_CALL()` to suppress the warning. - -However, sometimes you may want to suppress all "uninteresting call" -warnings, while sometimes you may want the opposite, i.e. to treat all -of them as errors. Google Mock lets you make the decision on a -per-mock-object basis. - -Suppose your test uses a mock class `MockFoo`: - -```cpp -TEST(...) { - MockFoo mock_foo; - EXPECT_CALL(mock_foo, DoThis()); - ... code that uses mock_foo ... -} -``` - -If a method of `mock_foo` other than `DoThis()` is called, it will be -reported by Google Mock as a warning. However, if you rewrite your -test to use `NiceMock` instead, the warning will be gone, -resulting in a cleaner test output: - -```cpp -using ::testing::NiceMock; - -TEST(...) { - NiceMock mock_foo; - EXPECT_CALL(mock_foo, DoThis()); - ... code that uses mock_foo ... -} -``` - -`NiceMock` is a subclass of `MockFoo`, so it can be used -wherever `MockFoo` is accepted. - -It also works if `MockFoo`'s constructor takes some arguments, as -`NiceMock` "inherits" `MockFoo`'s constructors: - -```cpp -using ::testing::NiceMock; - -TEST(...) { - NiceMock mock_foo(5, "hi"); // Calls MockFoo(5, "hi"). - EXPECT_CALL(mock_foo, DoThis()); - ... code that uses mock_foo ... -} -``` - -The usage of `StrictMock` is similar, except that it makes all -uninteresting calls failures: - -```cpp -using ::testing::StrictMock; - -TEST(...) { - StrictMock mock_foo; - EXPECT_CALL(mock_foo, DoThis()); - ... code that uses mock_foo ... - - // The test will fail if a method of mock_foo other than DoThis() - // is called. -} -``` - -There are some caveats though (I don't like them just as much as the -next guy, but sadly they are side effects of C++'s limitations): - - 1. `NiceMock` and `StrictMock` only work for mock methods defined using the `MOCK_METHOD*` family of macros **directly** in the `MockFoo` class. If a mock method is defined in a **base class** of `MockFoo`, the "nice" or "strict" modifier may not affect it, depending on the compiler. In particular, nesting `NiceMock` and `StrictMock` (e.g. `NiceMock >`) is **not** supported. - 1. The constructors of the base mock (`MockFoo`) cannot have arguments passed by non-const reference, which happens to be banned by the [Google C++ style guide](https://google.github.io/styleguide/cppguide.html). - 1. During the constructor or destructor of `MockFoo`, the mock object is _not_ nice or strict. This may cause surprises if the constructor or destructor calls a mock method on `this` object. (This behavior, however, is consistent with C++'s general rule: if a constructor or destructor calls a virtual method of `this` object, that method is treated as non-virtual. In other words, to the base class's constructor or destructor, `this` object behaves like an instance of the base class, not the derived class. This rule is required for safety. Otherwise a base constructor may use members of a derived class before they are initialized, or a base destructor may use members of a derived class after they have been destroyed.) - -Finally, you should be **very cautious** about when to use naggy or strict mocks, as they tend to make tests more brittle and harder to maintain. When you refactor your code without changing its externally visible behavior, ideally you should't need to update any tests. If your code interacts with a naggy mock, however, you may start to get spammed with warnings as the result of your change. Worse, if your code interacts with a strict mock, your tests may start to fail and you'll be forced to fix them. Our general recommendation is to use nice mocks (not yet the default) most of the time, use naggy mocks (the current default) when developing or debugging tests, and use strict mocks only as the last resort. - -## Simplifying the Interface without Breaking Existing Code ## - -Sometimes a method has a long list of arguments that is mostly -uninteresting. For example, - -```cpp -class LogSink { - public: - ... - virtual void send(LogSeverity severity, const char* full_filename, - const char* base_filename, int line, - const struct tm* tm_time, - const char* message, size_t message_len) = 0; -}; -``` - -This method's argument list is lengthy and hard to work with (let's -say that the `message` argument is not even 0-terminated). If we mock -it as is, using the mock will be awkward. If, however, we try to -simplify this interface, we'll need to fix all clients depending on -it, which is often infeasible. - -The trick is to re-dispatch the method in the mock class: - -```cpp -class ScopedMockLog : public LogSink { - public: - ... - virtual void send(LogSeverity severity, const char* full_filename, - const char* base_filename, int line, const tm* tm_time, - const char* message, size_t message_len) { - // We are only interested in the log severity, full file name, and - // log message. - Log(severity, full_filename, std::string(message, message_len)); - } - - // Implements the mock method: - // - // void Log(LogSeverity severity, - // const string& file_path, - // const string& message); - MOCK_METHOD3(Log, void(LogSeverity severity, const string& file_path, - const string& message)); -}; -``` - -By defining a new mock method with a trimmed argument list, we make -the mock class much more user-friendly. - -## Alternative to Mocking Concrete Classes ## - -Often you may find yourself using classes that don't implement -interfaces. In order to test your code that uses such a class (let's -call it `Concrete`), you may be tempted to make the methods of -`Concrete` virtual and then mock it. - -Try not to do that. - -Making a non-virtual function virtual is a big decision. It creates an -extension point where subclasses can tweak your class' behavior. This -weakens your control on the class because now it's harder to maintain -the class' invariants. You should make a function virtual only when -there is a valid reason for a subclass to override it. - -Mocking concrete classes directly is problematic as it creates a tight -coupling between the class and the tests - any small change in the -class may invalidate your tests and make test maintenance a pain. - -To avoid such problems, many programmers have been practicing "coding -to interfaces": instead of talking to the `Concrete` class, your code -would define an interface and talk to it. Then you implement that -interface as an adaptor on top of `Concrete`. In tests, you can easily -mock that interface to observe how your code is doing. - -This technique incurs some overhead: - - * You pay the cost of virtual function calls (usually not a problem). - * There is more abstraction for the programmers to learn. - -However, it can also bring significant benefits in addition to better -testability: - - * `Concrete`'s API may not fit your problem domain very well, as you may not be the only client it tries to serve. By designing your own interface, you have a chance to tailor it to your need - you may add higher-level functionalities, rename stuff, etc instead of just trimming the class. This allows you to write your code (user of the interface) in a more natural way, which means it will be more readable, more maintainable, and you'll be more productive. - * If `Concrete`'s implementation ever has to change, you don't have to rewrite everywhere it is used. Instead, you can absorb the change in your implementation of the interface, and your other code and tests will be insulated from this change. - -Some people worry that if everyone is practicing this technique, they -will end up writing lots of redundant code. This concern is totally -understandable. However, there are two reasons why it may not be the -case: - - * Different projects may need to use `Concrete` in different ways, so the best interfaces for them will be different. Therefore, each of them will have its own domain-specific interface on top of `Concrete`, and they will not be the same code. - * If enough projects want to use the same interface, they can always share it, just like they have been sharing `Concrete`. You can check in the interface and the adaptor somewhere near `Concrete` (perhaps in a `contrib` sub-directory) and let many projects use it. - -You need to weigh the pros and cons carefully for your particular -problem, but I'd like to assure you that the Java community has been -practicing this for a long time and it's a proven effective technique -applicable in a wide variety of situations. :-) - -## Delegating Calls to a Fake ## - -Some times you have a non-trivial fake implementation of an -interface. For example: - -```cpp -class Foo { - public: - virtual ~Foo() {} - virtual char DoThis(int n) = 0; - virtual void DoThat(const char* s, int* p) = 0; -}; - -class FakeFoo : public Foo { - public: - virtual char DoThis(int n) { - return (n > 0) ? '+' : - (n < 0) ? '-' : '0'; - } - - virtual void DoThat(const char* s, int* p) { - *p = strlen(s); - } -}; -``` - -Now you want to mock this interface such that you can set expectations -on it. However, you also want to use `FakeFoo` for the default -behavior, as duplicating it in the mock object is, well, a lot of -work. - -When you define the mock class using Google Mock, you can have it -delegate its default action to a fake class you already have, using -this pattern: - -```cpp -using ::testing::_; -using ::testing::Invoke; - -class MockFoo : public Foo { - public: - // Normal mock method definitions using Google Mock. - MOCK_METHOD1(DoThis, char(int n)); - MOCK_METHOD2(DoThat, void(const char* s, int* p)); - - // Delegates the default actions of the methods to a FakeFoo object. - // This must be called *before* the custom ON_CALL() statements. - void DelegateToFake() { - ON_CALL(*this, DoThis(_)) - .WillByDefault(Invoke(&fake_, &FakeFoo::DoThis)); - ON_CALL(*this, DoThat(_, _)) - .WillByDefault(Invoke(&fake_, &FakeFoo::DoThat)); - } - private: - FakeFoo fake_; // Keeps an instance of the fake in the mock. -}; -``` - -With that, you can use `MockFoo` in your tests as usual. Just remember -that if you don't explicitly set an action in an `ON_CALL()` or -`EXPECT_CALL()`, the fake will be called upon to do it: - -```cpp -using ::testing::_; - -TEST(AbcTest, Xyz) { - MockFoo foo; - foo.DelegateToFake(); // Enables the fake for delegation. - - // Put your ON_CALL(foo, ...)s here, if any. - - // No action specified, meaning to use the default action. - EXPECT_CALL(foo, DoThis(5)); - EXPECT_CALL(foo, DoThat(_, _)); - - int n = 0; - EXPECT_EQ('+', foo.DoThis(5)); // FakeFoo::DoThis() is invoked. - foo.DoThat("Hi", &n); // FakeFoo::DoThat() is invoked. - EXPECT_EQ(2, n); -} -``` - -**Some tips:** - - * If you want, you can still override the default action by providing your own `ON_CALL()` or using `.WillOnce()` / `.WillRepeatedly()` in `EXPECT_CALL()`. - * In `DelegateToFake()`, you only need to delegate the methods whose fake implementation you intend to use. - * The general technique discussed here works for overloaded methods, but you'll need to tell the compiler which version you mean. To disambiguate a mock function (the one you specify inside the parentheses of `ON_CALL()`), see the "Selecting Between Overloaded Functions" section on this page; to disambiguate a fake function (the one you place inside `Invoke()`), use a `static_cast` to specify the function's type. For instance, if class `Foo` has methods `char DoThis(int n)` and `bool DoThis(double x) const`, and you want to invoke the latter, you need to write `Invoke(&fake_, static_cast(&FakeFoo::DoThis))` instead of `Invoke(&fake_, &FakeFoo::DoThis)` (The strange-looking thing inside the angled brackets of `static_cast` is the type of a function pointer to the second `DoThis()` method.). - * Having to mix a mock and a fake is often a sign of something gone wrong. Perhaps you haven't got used to the interaction-based way of testing yet. Or perhaps your interface is taking on too many roles and should be split up. Therefore, **don't abuse this**. We would only recommend to do it as an intermediate step when you are refactoring your code. - -Regarding the tip on mixing a mock and a fake, here's an example on -why it may be a bad sign: Suppose you have a class `System` for -low-level system operations. In particular, it does file and I/O -operations. And suppose you want to test how your code uses `System` -to do I/O, and you just want the file operations to work normally. If -you mock out the entire `System` class, you'll have to provide a fake -implementation for the file operation part, which suggests that -`System` is taking on too many roles. - -Instead, you can define a `FileOps` interface and an `IOOps` interface -and split `System`'s functionalities into the two. Then you can mock -`IOOps` without mocking `FileOps`. - -## Delegating Calls to a Real Object ## - -When using testing doubles (mocks, fakes, stubs, and etc), sometimes -their behaviors will differ from those of the real objects. This -difference could be either intentional (as in simulating an error such -that you can test the error handling code) or unintentional. If your -mocks have different behaviors than the real objects by mistake, you -could end up with code that passes the tests but fails in production. - -You can use the _delegating-to-real_ technique to ensure that your -mock has the same behavior as the real object while retaining the -ability to validate calls. This technique is very similar to the -delegating-to-fake technique, the difference being that we use a real -object instead of a fake. Here's an example: - -```cpp -using ::testing::_; -using ::testing::AtLeast; -using ::testing::Invoke; - -class MockFoo : public Foo { - public: - MockFoo() { - // By default, all calls are delegated to the real object. - ON_CALL(*this, DoThis()) - .WillByDefault(Invoke(&real_, &Foo::DoThis)); - ON_CALL(*this, DoThat(_)) - .WillByDefault(Invoke(&real_, &Foo::DoThat)); - ... - } - MOCK_METHOD0(DoThis, ...); - MOCK_METHOD1(DoThat, ...); - ... - private: - Foo real_; -}; -... - - MockFoo mock; - - EXPECT_CALL(mock, DoThis()) - .Times(3); - EXPECT_CALL(mock, DoThat("Hi")) - .Times(AtLeast(1)); - ... use mock in test ... -``` - -With this, Google Mock will verify that your code made the right calls -(with the right arguments, in the right order, called the right number -of times, etc), and a real object will answer the calls (so the -behavior will be the same as in production). This gives you the best -of both worlds. - -## Delegating Calls to a Parent Class ## - -Ideally, you should code to interfaces, whose methods are all pure -virtual. In reality, sometimes you do need to mock a virtual method -that is not pure (i.e, it already has an implementation). For example: - -```cpp -class Foo { - public: - virtual ~Foo(); - - virtual void Pure(int n) = 0; - virtual int Concrete(const char* str) { ... } -}; - -class MockFoo : public Foo { - public: - // Mocking a pure method. - MOCK_METHOD1(Pure, void(int n)); - // Mocking a concrete method. Foo::Concrete() is shadowed. - MOCK_METHOD1(Concrete, int(const char* str)); -}; -``` - -Sometimes you may want to call `Foo::Concrete()` instead of -`MockFoo::Concrete()`. Perhaps you want to do it as part of a stub -action, or perhaps your test doesn't need to mock `Concrete()` at all -(but it would be oh-so painful to have to define a new mock class -whenever you don't need to mock one of its methods). - -The trick is to leave a back door in your mock class for accessing the -real methods in the base class: - -```cpp -class MockFoo : public Foo { - public: - // Mocking a pure method. - MOCK_METHOD1(Pure, void(int n)); - // Mocking a concrete method. Foo::Concrete() is shadowed. - MOCK_METHOD1(Concrete, int(const char* str)); - - // Use this to call Concrete() defined in Foo. - int FooConcrete(const char* str) { return Foo::Concrete(str); } -}; -``` - -Now, you can call `Foo::Concrete()` inside an action by: - -```cpp -using ::testing::_; -using ::testing::Invoke; -... - EXPECT_CALL(foo, Concrete(_)) - .WillOnce(Invoke(&foo, &MockFoo::FooConcrete)); -``` - -or tell the mock object that you don't want to mock `Concrete()`: - -```cpp -using ::testing::Invoke; -... - ON_CALL(foo, Concrete(_)) - .WillByDefault(Invoke(&foo, &MockFoo::FooConcrete)); -``` - -(Why don't we just write `Invoke(&foo, &Foo::Concrete)`? If you do -that, `MockFoo::Concrete()` will be called (and cause an infinite -recursion) since `Foo::Concrete()` is virtual. That's just how C++ -works.) - -# Using Matchers # - -## Matching Argument Values Exactly ## - -You can specify exactly which arguments a mock method is expecting: - -```cpp -using ::testing::Return; -... - EXPECT_CALL(foo, DoThis(5)) - .WillOnce(Return('a')); - EXPECT_CALL(foo, DoThat("Hello", bar)); -``` - -## Using Simple Matchers ## - -You can use matchers to match arguments that have a certain property: - -```cpp -using ::testing::Ge; -using ::testing::NotNull; -using ::testing::Return; -... - EXPECT_CALL(foo, DoThis(Ge(5))) // The argument must be >= 5. - .WillOnce(Return('a')); - EXPECT_CALL(foo, DoThat("Hello", NotNull())); - // The second argument must not be NULL. -``` - -A frequently used matcher is `_`, which matches anything: - -```cpp -using ::testing::_; -using ::testing::NotNull; -... - EXPECT_CALL(foo, DoThat(_, NotNull())); -``` - -## Combining Matchers ## - -You can build complex matchers from existing ones using `AllOf()`, -`AnyOf()`, and `Not()`: - -```cpp -using ::testing::AllOf; -using ::testing::Gt; -using ::testing::HasSubstr; -using ::testing::Ne; -using ::testing::Not; -... - // The argument must be > 5 and != 10. - EXPECT_CALL(foo, DoThis(AllOf(Gt(5), - Ne(10)))); - - // The first argument must not contain sub-string "blah". - EXPECT_CALL(foo, DoThat(Not(HasSubstr("blah")), - NULL)); -``` - -## Casting Matchers ## - -Google Mock matchers are statically typed, meaning that the compiler -can catch your mistake if you use a matcher of the wrong type (for -example, if you use `Eq(5)` to match a `string` argument). Good for -you! - -Sometimes, however, you know what you're doing and want the compiler -to give you some slack. One example is that you have a matcher for -`long` and the argument you want to match is `int`. While the two -types aren't exactly the same, there is nothing really wrong with -using a `Matcher` to match an `int` - after all, we can first -convert the `int` argument to a `long` before giving it to the -matcher. - -To support this need, Google Mock gives you the -`SafeMatcherCast(m)` function. It casts a matcher `m` to type -`Matcher`. To ensure safety, Google Mock checks that (let `U` be the -type `m` accepts): - - 1. Type `T` can be implicitly cast to type `U`; - 1. When both `T` and `U` are built-in arithmetic types (`bool`, integers, and floating-point numbers), the conversion from `T` to `U` is not lossy (in other words, any value representable by `T` can also be represented by `U`); and - 1. When `U` is a reference, `T` must also be a reference (as the underlying matcher may be interested in the address of the `U` value). - -The code won't compile if any of these conditions aren't met. - -Here's one example: - -```cpp -using ::testing::SafeMatcherCast; - -// A base class and a child class. -class Base { ... }; -class Derived : public Base { ... }; - -class MockFoo : public Foo { - public: - MOCK_METHOD1(DoThis, void(Derived* derived)); -}; -... - - MockFoo foo; - // m is a Matcher we got from somewhere. - EXPECT_CALL(foo, DoThis(SafeMatcherCast(m))); -``` - -If you find `SafeMatcherCast(m)` too limiting, you can use a similar -function `MatcherCast(m)`. The difference is that `MatcherCast` works -as long as you can `static_cast` type `T` to type `U`. - -`MatcherCast` essentially lets you bypass C++'s type system -(`static_cast` isn't always safe as it could throw away information, -for example), so be careful not to misuse/abuse it. - -## Selecting Between Overloaded Functions ## - -If you expect an overloaded function to be called, the compiler may -need some help on which overloaded version it is. - -To disambiguate functions overloaded on the const-ness of this object, -use the `Const()` argument wrapper. - -```cpp -using ::testing::ReturnRef; - -class MockFoo : public Foo { - ... - MOCK_METHOD0(GetBar, Bar&()); - MOCK_CONST_METHOD0(GetBar, const Bar&()); -}; -... - - MockFoo foo; - Bar bar1, bar2; - EXPECT_CALL(foo, GetBar()) // The non-const GetBar(). - .WillOnce(ReturnRef(bar1)); - EXPECT_CALL(Const(foo), GetBar()) // The const GetBar(). - .WillOnce(ReturnRef(bar2)); -``` - -(`Const()` is defined by Google Mock and returns a `const` reference -to its argument.) - -To disambiguate overloaded functions with the same number of arguments -but different argument types, you may need to specify the exact type -of a matcher, either by wrapping your matcher in `Matcher()`, or -using a matcher whose type is fixed (`TypedEq`, `An()`, -etc): - -```cpp -using ::testing::An; -using ::testing::Lt; -using ::testing::Matcher; -using ::testing::TypedEq; - -class MockPrinter : public Printer { - public: - MOCK_METHOD1(Print, void(int n)); - MOCK_METHOD1(Print, void(char c)); -}; - -TEST(PrinterTest, Print) { - MockPrinter printer; - - EXPECT_CALL(printer, Print(An())); // void Print(int); - EXPECT_CALL(printer, Print(Matcher(Lt(5)))); // void Print(int); - EXPECT_CALL(printer, Print(TypedEq('a'))); // void Print(char); - - printer.Print(3); - printer.Print(6); - printer.Print('a'); -} -``` - -## Performing Different Actions Based on the Arguments ## - -When a mock method is called, the _last_ matching expectation that's -still active will be selected (think "newer overrides older"). So, you -can make a method do different things depending on its argument values -like this: - -```cpp -using ::testing::_; -using ::testing::Lt; -using ::testing::Return; -... - // The default case. - EXPECT_CALL(foo, DoThis(_)) - .WillRepeatedly(Return('b')); - - // The more specific case. - EXPECT_CALL(foo, DoThis(Lt(5))) - .WillRepeatedly(Return('a')); -``` - -Now, if `foo.DoThis()` is called with a value less than 5, `'a'` will -be returned; otherwise `'b'` will be returned. - -## Matching Multiple Arguments as a Whole ## - -Sometimes it's not enough to match the arguments individually. For -example, we may want to say that the first argument must be less than -the second argument. The `With()` clause allows us to match -all arguments of a mock function as a whole. For example, - -```cpp -using ::testing::_; -using ::testing::Lt; -using ::testing::Ne; -... - EXPECT_CALL(foo, InRange(Ne(0), _)) - .With(Lt()); -``` - -says that the first argument of `InRange()` must not be 0, and must be -less than the second argument. - -The expression inside `With()` must be a matcher of type -`Matcher< ::testing::tuple >`, where `A1`, ..., `An` are the -types of the function arguments. - -You can also write `AllArgs(m)` instead of `m` inside `.With()`. The -two forms are equivalent, but `.With(AllArgs(Lt()))` is more readable -than `.With(Lt())`. - -You can use `Args(m)` to match the `n` selected arguments -(as a tuple) against `m`. For example, - -```cpp -using ::testing::_; -using ::testing::AllOf; -using ::testing::Args; -using ::testing::Lt; -... - EXPECT_CALL(foo, Blah(_, _, _)) - .With(AllOf(Args<0, 1>(Lt()), Args<1, 2>(Lt()))); -``` - -says that `Blah()` will be called with arguments `x`, `y`, and `z` where -`x < y < z`. - -As a convenience and example, Google Mock provides some matchers for -2-tuples, including the `Lt()` matcher above. See the [CheatSheet](CheatSheet.md) for -the complete list. - -Note that if you want to pass the arguments to a predicate of your own -(e.g. `.With(Args<0, 1>(Truly(&MyPredicate)))`), that predicate MUST be -written to take a `::testing::tuple` as its argument; Google Mock will pass the `n` selected arguments as _one_ single tuple to the predicate. - -## Using Matchers as Predicates ## - -Have you noticed that a matcher is just a fancy predicate that also -knows how to describe itself? Many existing algorithms take predicates -as arguments (e.g. those defined in STL's `` header), and -it would be a shame if Google Mock matchers are not allowed to -participate. - -Luckily, you can use a matcher where a unary predicate functor is -expected by wrapping it inside the `Matches()` function. For example, - -```cpp -#include -#include - -std::vector v; -... -// How many elements in v are >= 10? -const int count = count_if(v.begin(), v.end(), Matches(Ge(10))); -``` - -Since you can build complex matchers from simpler ones easily using -Google Mock, this gives you a way to conveniently construct composite -predicates (doing the same using STL's `` header is just -painful). For example, here's a predicate that's satisfied by any -number that is >= 0, <= 100, and != 50: - -```cpp -Matches(AllOf(Ge(0), Le(100), Ne(50))) -``` - -## Using Matchers in Google Test Assertions ## - -Since matchers are basically predicates that also know how to describe -themselves, there is a way to take advantage of them in -[Google Test](../../googletest/) assertions. It's -called `ASSERT_THAT` and `EXPECT_THAT`: - -```cpp - ASSERT_THAT(value, matcher); // Asserts that value matches matcher. - EXPECT_THAT(value, matcher); // The non-fatal version. -``` - -For example, in a Google Test test you can write: - -```cpp -#include "gmock/gmock.h" - -using ::testing::AllOf; -using ::testing::Ge; -using ::testing::Le; -using ::testing::MatchesRegex; -using ::testing::StartsWith; -... - - EXPECT_THAT(Foo(), StartsWith("Hello")); - EXPECT_THAT(Bar(), MatchesRegex("Line \\d+")); - ASSERT_THAT(Baz(), AllOf(Ge(5), Le(10))); -``` - -which (as you can probably guess) executes `Foo()`, `Bar()`, and -`Baz()`, and verifies that: - - * `Foo()` returns a string that starts with `"Hello"`. - * `Bar()` returns a string that matches regular expression `"Line \\d+"`. - * `Baz()` returns a number in the range [5, 10]. - -The nice thing about these macros is that _they read like -English_. They generate informative messages too. For example, if the -first `EXPECT_THAT()` above fails, the message will be something like: - -``` -Value of: Foo() - Actual: "Hi, world!" -Expected: starts with "Hello" -``` - -**Credit:** The idea of `(ASSERT|EXPECT)_THAT` was stolen from the -[Hamcrest](https://github.com/hamcrest/) project, which adds -`assertThat()` to JUnit. - -## Using Predicates as Matchers ## - -Google Mock provides a built-in set of matchers. In case you find them -lacking, you can use an arbitray unary predicate function or functor -as a matcher - as long as the predicate accepts a value of the type -you want. You do this by wrapping the predicate inside the `Truly()` -function, for example: - -```cpp -using ::testing::Truly; - -int IsEven(int n) { return (n % 2) == 0 ? 1 : 0; } -... - - // Bar() must be called with an even number. - EXPECT_CALL(foo, Bar(Truly(IsEven))); -``` - -Note that the predicate function / functor doesn't have to return -`bool`. It works as long as the return value can be used as the -condition in statement `if (condition) ...`. - -## Matching Arguments that Are Not Copyable ## - -When you do an `EXPECT_CALL(mock_obj, Foo(bar))`, Google Mock saves -away a copy of `bar`. When `Foo()` is called later, Google Mock -compares the argument to `Foo()` with the saved copy of `bar`. This -way, you don't need to worry about `bar` being modified or destroyed -after the `EXPECT_CALL()` is executed. The same is true when you use -matchers like `Eq(bar)`, `Le(bar)`, and so on. - -But what if `bar` cannot be copied (i.e. has no copy constructor)? You -could define your own matcher function and use it with `Truly()`, as -the previous couple of recipes have shown. Or, you may be able to get -away from it if you can guarantee that `bar` won't be changed after -the `EXPECT_CALL()` is executed. Just tell Google Mock that it should -save a reference to `bar`, instead of a copy of it. Here's how: - -```cpp -using ::testing::Eq; -using ::testing::ByRef; -using ::testing::Lt; -... - // Expects that Foo()'s argument == bar. - EXPECT_CALL(mock_obj, Foo(Eq(ByRef(bar)))); - - // Expects that Foo()'s argument < bar. - EXPECT_CALL(mock_obj, Foo(Lt(ByRef(bar)))); -``` - -Remember: if you do this, don't change `bar` after the -`EXPECT_CALL()`, or the result is undefined. - -## Validating a Member of an Object ## - -Often a mock function takes a reference to object as an argument. When -matching the argument, you may not want to compare the entire object -against a fixed object, as that may be over-specification. Instead, -you may need to validate a certain member variable or the result of a -certain getter method of the object. You can do this with `Field()` -and `Property()`. More specifically, - -```cpp -Field(&Foo::bar, m) -``` - -is a matcher that matches a `Foo` object whose `bar` member variable -satisfies matcher `m`. - -```cpp -Property(&Foo::baz, m) -``` - -is a matcher that matches a `Foo` object whose `baz()` method returns -a value that satisfies matcher `m`. - -For example: - -| Expression | Description | -|:-----------------------------|:-----------------------------------| -| `Field(&Foo::number, Ge(3))` | Matches `x` where `x.number >= 3`. | -| `Property(&Foo::name, StartsWith("John "))` | Matches `x` where `x.name()` starts with `"John "`. | - -Note that in `Property(&Foo::baz, ...)`, method `baz()` must take no -argument and be declared as `const`. - -BTW, `Field()` and `Property()` can also match plain pointers to -objects. For instance, - -```cpp -Field(&Foo::number, Ge(3)) -``` - -matches a plain pointer `p` where `p->number >= 3`. If `p` is `NULL`, -the match will always fail regardless of the inner matcher. - -What if you want to validate more than one members at the same time? -Remember that there is `AllOf()`. - -## Validating the Value Pointed to by a Pointer Argument ## - -C++ functions often take pointers as arguments. You can use matchers -like `IsNull()`, `NotNull()`, and other comparison matchers to match a -pointer, but what if you want to make sure the value _pointed to_ by -the pointer, instead of the pointer itself, has a certain property? -Well, you can use the `Pointee(m)` matcher. - -`Pointee(m)` matches a pointer iff `m` matches the value the pointer -points to. For example: - -```cpp -using ::testing::Ge; -using ::testing::Pointee; -... - EXPECT_CALL(foo, Bar(Pointee(Ge(3)))); -``` - -expects `foo.Bar()` to be called with a pointer that points to a value -greater than or equal to 3. - -One nice thing about `Pointee()` is that it treats a `NULL` pointer as -a match failure, so you can write `Pointee(m)` instead of - -```cpp - AllOf(NotNull(), Pointee(m)) -``` - -without worrying that a `NULL` pointer will crash your test. - -Also, did we tell you that `Pointee()` works with both raw pointers -**and** smart pointers (`linked_ptr`, `shared_ptr`, `scoped_ptr`, and -etc)? - -What if you have a pointer to pointer? You guessed it - you can use -nested `Pointee()` to probe deeper inside the value. For example, -`Pointee(Pointee(Lt(3)))` matches a pointer that points to a pointer -that points to a number less than 3 (what a mouthful...). - -## Testing a Certain Property of an Object ## - -Sometimes you want to specify that an object argument has a certain -property, but there is no existing matcher that does this. If you want -good error messages, you should define a matcher. If you want to do it -quick and dirty, you could get away with writing an ordinary function. - -Let's say you have a mock function that takes an object of type `Foo`, -which has an `int bar()` method and an `int baz()` method, and you -want to constrain that the argument's `bar()` value plus its `baz()` -value is a given number. Here's how you can define a matcher to do it: - -```cpp -using ::testing::MatcherInterface; -using ::testing::MatchResultListener; - -class BarPlusBazEqMatcher : public MatcherInterface { - public: - explicit BarPlusBazEqMatcher(int expected_sum) - : expected_sum_(expected_sum) {} - - virtual bool MatchAndExplain(const Foo& foo, - MatchResultListener* listener) const { - return (foo.bar() + foo.baz()) == expected_sum_; - } - - virtual void DescribeTo(::std::ostream* os) const { - *os << "bar() + baz() equals " << expected_sum_; - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "bar() + baz() does not equal " << expected_sum_; - } - private: - const int expected_sum_; -}; - -inline Matcher BarPlusBazEq(int expected_sum) { - return MakeMatcher(new BarPlusBazEqMatcher(expected_sum)); -} - -... - - EXPECT_CALL(..., DoThis(BarPlusBazEq(5)))...; -``` - -## Matching Containers ## - -Sometimes an STL container (e.g. list, vector, map, ...) is passed to -a mock function and you may want to validate it. Since most STL -containers support the `==` operator, you can write -`Eq(expected_container)` or simply `expected_container` to match a -container exactly. - -Sometimes, though, you may want to be more flexible (for example, the -first element must be an exact match, but the second element can be -any positive number, and so on). Also, containers used in tests often -have a small number of elements, and having to define the expected -container out-of-line is a bit of a hassle. - -You can use the `ElementsAre()` or `UnorderedElementsAre()` matcher in -such cases: - -```cpp -using ::testing::_; -using ::testing::ElementsAre; -using ::testing::Gt; -... - - MOCK_METHOD1(Foo, void(const vector& numbers)); -... - - EXPECT_CALL(mock, Foo(ElementsAre(1, Gt(0), _, 5))); -``` - -The above matcher says that the container must have 4 elements, which -must be 1, greater than 0, anything, and 5 respectively. - -If you instead write: - -```cpp -using ::testing::_; -using ::testing::Gt; -using ::testing::UnorderedElementsAre; -... - - MOCK_METHOD1(Foo, void(const vector& numbers)); -... - - EXPECT_CALL(mock, Foo(UnorderedElementsAre(1, Gt(0), _, 5))); -``` - -It means that the container must have 4 elements, which under some -permutation must be 1, greater than 0, anything, and 5 respectively. - -`ElementsAre()` and `UnorderedElementsAre()` are overloaded to take 0 -to 10 arguments. If more are needed, you can place them in a C-style -array and use `ElementsAreArray()` or `UnorderedElementsAreArray()` -instead: - -```cpp -using ::testing::ElementsAreArray; -... - - // ElementsAreArray accepts an array of element values. - const int expected_vector1[] = { 1, 5, 2, 4, ... }; - EXPECT_CALL(mock, Foo(ElementsAreArray(expected_vector1))); - - // Or, an array of element matchers. - Matcher expected_vector2 = { 1, Gt(2), _, 3, ... }; - EXPECT_CALL(mock, Foo(ElementsAreArray(expected_vector2))); -``` - -In case the array needs to be dynamically created (and therefore the -array size cannot be inferred by the compiler), you can give -`ElementsAreArray()` an additional argument to specify the array size: - -```cpp -using ::testing::ElementsAreArray; -... - int* const expected_vector3 = new int[count]; - ... fill expected_vector3 with values ... - EXPECT_CALL(mock, Foo(ElementsAreArray(expected_vector3, count))); -``` - -**Tips:** - - * `ElementsAre*()` can be used to match _any_ container that implements the STL iterator pattern (i.e. it has a `const_iterator` type and supports `begin()/end()`), not just the ones defined in STL. It will even work with container types yet to be written - as long as they follows the above pattern. - * You can use nested `ElementsAre*()` to match nested (multi-dimensional) containers. - * If the container is passed by pointer instead of by reference, just write `Pointee(ElementsAre*(...))`. - * The order of elements _matters_ for `ElementsAre*()`. Therefore don't use it with containers whose element order is undefined (e.g. `hash_map`). - -## Sharing Matchers ## - -Under the hood, a Google Mock matcher object consists of a pointer to -a ref-counted implementation object. Copying matchers is allowed and -very efficient, as only the pointer is copied. When the last matcher -that references the implementation object dies, the implementation -object will be deleted. - -Therefore, if you have some complex matcher that you want to use again -and again, there is no need to build it every time. Just assign it to a -matcher variable and use that variable repeatedly! For example, - -```cpp - Matcher in_range = AllOf(Gt(5), Le(10)); - ... use in_range as a matcher in multiple EXPECT_CALLs ... -``` - -# Setting Expectations # - -## Knowing When to Expect ## - -`ON_CALL` is likely the single most under-utilized construct in Google Mock. - -There are basically two constructs for defining the behavior of a mock object: `ON_CALL` and `EXPECT_CALL`. The difference? `ON_CALL` defines what happens when a mock method is called, but _doesn't imply any expectation on the method being called._ `EXPECT_CALL` not only defines the behavior, but also sets an expectation that _the method will be called with the given arguments, for the given number of times_ (and _in the given order_ when you specify the order too). - -Since `EXPECT_CALL` does more, isn't it better than `ON_CALL`? Not really. Every `EXPECT_CALL` adds a constraint on the behavior of the code under test. Having more constraints than necessary is _baaad_ - even worse than not having enough constraints. - -This may be counter-intuitive. How could tests that verify more be worse than tests that verify less? Isn't verification the whole point of tests? - -The answer, lies in _what_ a test should verify. **A good test verifies the contract of the code.** If a test over-specifies, it doesn't leave enough freedom to the implementation. As a result, changing the implementation without breaking the contract (e.g. refactoring and optimization), which should be perfectly fine to do, can break such tests. Then you have to spend time fixing them, only to see them broken again the next time the implementation is changed. - -Keep in mind that one doesn't have to verify more than one property in one test. In fact, **it's a good style to verify only one thing in one test.** If you do that, a bug will likely break only one or two tests instead of dozens (which case would you rather debug?). If you are also in the habit of giving tests descriptive names that tell what they verify, you can often easily guess what's wrong just from the test log itself. - -So use `ON_CALL` by default, and only use `EXPECT_CALL` when you actually intend to verify that the call is made. For example, you may have a bunch of `ON_CALL`s in your test fixture to set the common mock behavior shared by all tests in the same group, and write (scarcely) different `EXPECT_CALL`s in different `TEST_F`s to verify different aspects of the code's behavior. Compared with the style where each `TEST` has many `EXPECT_CALL`s, this leads to tests that are more resilient to implementational changes (and thus less likely to require maintenance) and makes the intent of the tests more obvious (so they are easier to maintain when you do need to maintain them). - -If you are bothered by the "Uninteresting mock function call" message printed when a mock method without an `EXPECT_CALL` is called, you may use a `NiceMock` instead to suppress all such messages for the mock object, or suppress the message for specific methods by adding `EXPECT_CALL(...).Times(AnyNumber())`. DO NOT suppress it by blindly adding an `EXPECT_CALL(...)`, or you'll have a test that's a pain to maintain. - -## Ignoring Uninteresting Calls ## - -If you are not interested in how a mock method is called, just don't -say anything about it. In this case, if the method is ever called, -Google Mock will perform its default action to allow the test program -to continue. If you are not happy with the default action taken by -Google Mock, you can override it using `DefaultValue::Set()` -(described later in this document) or `ON_CALL()`. - -Please note that once you expressed interest in a particular mock -method (via `EXPECT_CALL()`), all invocations to it must match some -expectation. If this function is called but the arguments don't match -any `EXPECT_CALL()` statement, it will be an error. - -## Disallowing Unexpected Calls ## - -If a mock method shouldn't be called at all, explicitly say so: - -```cpp -using ::testing::_; -... - EXPECT_CALL(foo, Bar(_)) - .Times(0); -``` - -If some calls to the method are allowed, but the rest are not, just -list all the expected calls: - -```cpp -using ::testing::AnyNumber; -using ::testing::Gt; -... - EXPECT_CALL(foo, Bar(5)); - EXPECT_CALL(foo, Bar(Gt(10))) - .Times(AnyNumber()); -``` - -A call to `foo.Bar()` that doesn't match any of the `EXPECT_CALL()` -statements will be an error. - -## Understanding Uninteresting vs Unexpected Calls ## - -_Uninteresting_ calls and _unexpected_ calls are different concepts in Google Mock. _Very_ different. - -A call `x.Y(...)` is **uninteresting** if there's _not even a single_ `EXPECT_CALL(x, Y(...))` set. In other words, the test isn't interested in the `x.Y()` method at all, as evident in that the test doesn't care to say anything about it. - -A call `x.Y(...)` is **unexpected** if there are some `EXPECT_CALL(x, Y(...))s` set, but none of them matches the call. Put another way, the test is interested in the `x.Y()` method (therefore it _explicitly_ sets some `EXPECT_CALL` to verify how it's called); however, the verification fails as the test doesn't expect this particular call to happen. - -**An unexpected call is always an error,** as the code under test doesn't behave the way the test expects it to behave. - -**By default, an uninteresting call is not an error,** as it violates no constraint specified by the test. (Google Mock's philosophy is that saying nothing means there is no constraint.) However, it leads to a warning, as it _might_ indicate a problem (e.g. the test author might have forgotten to specify a constraint). - -In Google Mock, `NiceMock` and `StrictMock` can be used to make a mock class "nice" or "strict". How does this affect uninteresting calls and unexpected calls? - -A **nice mock** suppresses uninteresting call warnings. It is less chatty than the default mock, but otherwise is the same. If a test fails with a default mock, it will also fail using a nice mock instead. And vice versa. Don't expect making a mock nice to change the test's result. - -A **strict mock** turns uninteresting call warnings into errors. So making a mock strict may change the test's result. - -Let's look at an example: - -```cpp -TEST(...) { - NiceMock mock_registry; - EXPECT_CALL(mock_registry, GetDomainOwner("google.com")) - .WillRepeatedly(Return("Larry Page")); - - // Use mock_registry in code under test. - ... &mock_registry ... -} -``` - -The sole `EXPECT_CALL` here says that all calls to `GetDomainOwner()` must have `"google.com"` as the argument. If `GetDomainOwner("yahoo.com")` is called, it will be an unexpected call, and thus an error. Having a nice mock doesn't change the severity of an unexpected call. - -So how do we tell Google Mock that `GetDomainOwner()` can be called with some other arguments as well? The standard technique is to add a "catch all" `EXPECT_CALL`: - -```cpp - EXPECT_CALL(mock_registry, GetDomainOwner(_)) - .Times(AnyNumber()); // catches all other calls to this method. - EXPECT_CALL(mock_registry, GetDomainOwner("google.com")) - .WillRepeatedly(Return("Larry Page")); -``` - -Remember that `_` is the wildcard matcher that matches anything. With this, if `GetDomainOwner("google.com")` is called, it will do what the second `EXPECT_CALL` says; if it is called with a different argument, it will do what the first `EXPECT_CALL` says. - -Note that the order of the two `EXPECT_CALLs` is important, as a newer `EXPECT_CALL` takes precedence over an older one. - -For more on uninteresting calls, nice mocks, and strict mocks, read ["The Nice, the Strict, and the Naggy"](#the-nice-the-strict-and-the-naggy). - -## Expecting Ordered Calls ## - -Although an `EXPECT_CALL()` statement defined earlier takes precedence -when Google Mock tries to match a function call with an expectation, -by default calls don't have to happen in the order `EXPECT_CALL()` -statements are written. For example, if the arguments match the -matchers in the third `EXPECT_CALL()`, but not those in the first two, -then the third expectation will be used. - -If you would rather have all calls occur in the order of the -expectations, put the `EXPECT_CALL()` statements in a block where you -define a variable of type `InSequence`: - -```cpp - using ::testing::_; - using ::testing::InSequence; - - { - InSequence s; - - EXPECT_CALL(foo, DoThis(5)); - EXPECT_CALL(bar, DoThat(_)) - .Times(2); - EXPECT_CALL(foo, DoThis(6)); - } -``` - -In this example, we expect a call to `foo.DoThis(5)`, followed by two -calls to `bar.DoThat()` where the argument can be anything, which are -in turn followed by a call to `foo.DoThis(6)`. If a call occurred -out-of-order, Google Mock will report an error. - -## Expecting Partially Ordered Calls ## - -Sometimes requiring everything to occur in a predetermined order can -lead to brittle tests. For example, we may care about `A` occurring -before both `B` and `C`, but aren't interested in the relative order -of `B` and `C`. In this case, the test should reflect our real intent, -instead of being overly constraining. - -Google Mock allows you to impose an arbitrary DAG (directed acyclic -graph) on the calls. One way to express the DAG is to use the -[After](CheatSheet.md#the-after-clause) clause of `EXPECT_CALL`. - -Another way is via the `InSequence()` clause (not the same as the -`InSequence` class), which we borrowed from jMock 2. It's less -flexible than `After()`, but more convenient when you have long chains -of sequential calls, as it doesn't require you to come up with -different names for the expectations in the chains. Here's how it -works: - -If we view `EXPECT_CALL()` statements as nodes in a graph, and add an -edge from node A to node B wherever A must occur before B, we can get -a DAG. We use the term "sequence" to mean a directed path in this -DAG. Now, if we decompose the DAG into sequences, we just need to know -which sequences each `EXPECT_CALL()` belongs to in order to be able to -reconstruct the original DAG. - -So, to specify the partial order on the expectations we need to do two -things: first to define some `Sequence` objects, and then for each -`EXPECT_CALL()` say which `Sequence` objects it is part -of. Expectations in the same sequence must occur in the order they are -written. For example, - -```cpp - using ::testing::Sequence; - - Sequence s1, s2; - - EXPECT_CALL(foo, A()) - .InSequence(s1, s2); - EXPECT_CALL(bar, B()) - .InSequence(s1); - EXPECT_CALL(bar, C()) - .InSequence(s2); - EXPECT_CALL(foo, D()) - .InSequence(s2); -``` - -specifies the following DAG (where `s1` is `A -> B`, and `s2` is `A -> -C -> D`): - -``` - +---> B - | - A ---| - | - +---> C ---> D -``` - -This means that A must occur before B and C, and C must occur before -D. There's no restriction about the order other than these. - -## Controlling When an Expectation Retires ## - -When a mock method is called, Google Mock only consider expectations -that are still active. An expectation is active when created, and -becomes inactive (aka _retires_) when a call that has to occur later -has occurred. For example, in - -```cpp - using ::testing::_; - using ::testing::Sequence; - - Sequence s1, s2; - - EXPECT_CALL(log, Log(WARNING, _, "File too large.")) // #1 - .Times(AnyNumber()) - .InSequence(s1, s2); - EXPECT_CALL(log, Log(WARNING, _, "Data set is empty.")) // #2 - .InSequence(s1); - EXPECT_CALL(log, Log(WARNING, _, "User not found.")) // #3 - .InSequence(s2); -``` - -as soon as either #2 or #3 is matched, #1 will retire. If a warning -`"File too large."` is logged after this, it will be an error. - -Note that an expectation doesn't retire automatically when it's -saturated. For example, - -```cpp -using ::testing::_; -... - EXPECT_CALL(log, Log(WARNING, _, _)); // #1 - EXPECT_CALL(log, Log(WARNING, _, "File too large.")); // #2 -``` - -says that there will be exactly one warning with the message `"File -too large."`. If the second warning contains this message too, #2 will -match again and result in an upper-bound-violated error. - -If this is not what you want, you can ask an expectation to retire as -soon as it becomes saturated: - -```cpp -using ::testing::_; -... - EXPECT_CALL(log, Log(WARNING, _, _)); // #1 - EXPECT_CALL(log, Log(WARNING, _, "File too large.")) // #2 - .RetiresOnSaturation(); -``` - -Here #2 can be used only once, so if you have two warnings with the -message `"File too large."`, the first will match #2 and the second -will match #1 - there will be no error. - -# Using Actions # - -## Returning References from Mock Methods ## - -If a mock function's return type is a reference, you need to use -`ReturnRef()` instead of `Return()` to return a result: - -```cpp -using ::testing::ReturnRef; - -class MockFoo : public Foo { - public: - MOCK_METHOD0(GetBar, Bar&()); -}; -... - - MockFoo foo; - Bar bar; - EXPECT_CALL(foo, GetBar()) - .WillOnce(ReturnRef(bar)); -``` - -## Returning Live Values from Mock Methods ## - -The `Return(x)` action saves a copy of `x` when the action is -_created_, and always returns the same value whenever it's -executed. Sometimes you may want to instead return the _live_ value of -`x` (i.e. its value at the time when the action is _executed_.). - -If the mock function's return type is a reference, you can do it using -`ReturnRef(x)`, as shown in the previous recipe ("Returning References -from Mock Methods"). However, Google Mock doesn't let you use -`ReturnRef()` in a mock function whose return type is not a reference, -as doing that usually indicates a user error. So, what shall you do? - -You may be tempted to try `ByRef()`: - -```cpp -using testing::ByRef; -using testing::Return; - -class MockFoo : public Foo { - public: - MOCK_METHOD0(GetValue, int()); -}; -... - int x = 0; - MockFoo foo; - EXPECT_CALL(foo, GetValue()) - .WillRepeatedly(Return(ByRef(x))); - x = 42; - EXPECT_EQ(42, foo.GetValue()); -``` - -Unfortunately, it doesn't work here. The above code will fail with error: - -``` -Value of: foo.GetValue() - Actual: 0 -Expected: 42 -``` - -The reason is that `Return(value)` converts `value` to the actual -return type of the mock function at the time when the action is -_created_, not when it is _executed_. (This behavior was chosen for -the action to be safe when `value` is a proxy object that references -some temporary objects.) As a result, `ByRef(x)` is converted to an -`int` value (instead of a `const int&`) when the expectation is set, -and `Return(ByRef(x))` will always return 0. - -`ReturnPointee(pointer)` was provided to solve this problem -specifically. It returns the value pointed to by `pointer` at the time -the action is _executed_: - -```cpp -using testing::ReturnPointee; -... - int x = 0; - MockFoo foo; - EXPECT_CALL(foo, GetValue()) - .WillRepeatedly(ReturnPointee(&x)); // Note the & here. - x = 42; - EXPECT_EQ(42, foo.GetValue()); // This will succeed now. -``` - -## Combining Actions ## - -Want to do more than one thing when a function is called? That's -fine. `DoAll()` allow you to do sequence of actions every time. Only -the return value of the last action in the sequence will be used. - -```cpp -using ::testing::DoAll; - -class MockFoo : public Foo { - public: - MOCK_METHOD1(Bar, bool(int n)); -}; -... - - EXPECT_CALL(foo, Bar(_)) - .WillOnce(DoAll(action_1, - action_2, - ... - action_n)); -``` - -## Mocking Side Effects ## - -Sometimes a method exhibits its effect not via returning a value but -via side effects. For example, it may change some global state or -modify an output argument. To mock side effects, in general you can -define your own action by implementing `::testing::ActionInterface`. - -If all you need to do is to change an output argument, the built-in -`SetArgPointee()` action is convenient: - -```cpp -using ::testing::SetArgPointee; - -class MockMutator : public Mutator { - public: - MOCK_METHOD2(Mutate, void(bool mutate, int* value)); - ... -}; -... - - MockMutator mutator; - EXPECT_CALL(mutator, Mutate(true, _)) - .WillOnce(SetArgPointee<1>(5)); -``` - -In this example, when `mutator.Mutate()` is called, we will assign 5 -to the `int` variable pointed to by argument #1 -(0-based). - -`SetArgPointee()` conveniently makes an internal copy of the -value you pass to it, removing the need to keep the value in scope and -alive. The implication however is that the value must have a copy -constructor and assignment operator. - -If the mock method also needs to return a value as well, you can chain -`SetArgPointee()` with `Return()` using `DoAll()`: - -```cpp -using ::testing::_; -using ::testing::Return; -using ::testing::SetArgPointee; - -class MockMutator : public Mutator { - public: - ... - MOCK_METHOD1(MutateInt, bool(int* value)); -}; -... - - MockMutator mutator; - EXPECT_CALL(mutator, MutateInt(_)) - .WillOnce(DoAll(SetArgPointee<0>(5), - Return(true))); -``` - -If the output argument is an array, use the -`SetArrayArgument(first, last)` action instead. It copies the -elements in source range `[first, last)` to the array pointed to by -the `N`-th (0-based) argument: - -```cpp -using ::testing::NotNull; -using ::testing::SetArrayArgument; - -class MockArrayMutator : public ArrayMutator { - public: - MOCK_METHOD2(Mutate, void(int* values, int num_values)); - ... -}; -... - - MockArrayMutator mutator; - int values[5] = { 1, 2, 3, 4, 5 }; - EXPECT_CALL(mutator, Mutate(NotNull(), 5)) - .WillOnce(SetArrayArgument<0>(values, values + 5)); -``` - -This also works when the argument is an output iterator: - -```cpp -using ::testing::_; -using ::testing::SetArrayArgument; - -class MockRolodex : public Rolodex { - public: - MOCK_METHOD1(GetNames, void(std::back_insert_iterator >)); - ... -}; -... - - MockRolodex rolodex; - vector names; - names.push_back("George"); - names.push_back("John"); - names.push_back("Thomas"); - EXPECT_CALL(rolodex, GetNames(_)) - .WillOnce(SetArrayArgument<0>(names.begin(), names.end())); -``` - -## Changing a Mock Object's Behavior Based on the State ## - -If you expect a call to change the behavior of a mock object, you can use `::testing::InSequence` to specify different behaviors before and after the call: - -```cpp -using ::testing::InSequence; -using ::testing::Return; - -... - { - InSequence seq; - EXPECT_CALL(my_mock, IsDirty()) - .WillRepeatedly(Return(true)); - EXPECT_CALL(my_mock, Flush()); - EXPECT_CALL(my_mock, IsDirty()) - .WillRepeatedly(Return(false)); - } - my_mock.FlushIfDirty(); -``` - -This makes `my_mock.IsDirty()` return `true` before `my_mock.Flush()` is called and return `false` afterwards. - -If the behavior change is more complex, you can store the effects in a variable and make a mock method get its return value from that variable: - -```cpp -using ::testing::_; -using ::testing::SaveArg; -using ::testing::Return; - -ACTION_P(ReturnPointee, p) { return *p; } -... - int previous_value = 0; - EXPECT_CALL(my_mock, GetPrevValue()) - .WillRepeatedly(ReturnPointee(&previous_value)); - EXPECT_CALL(my_mock, UpdateValue(_)) - .WillRepeatedly(SaveArg<0>(&previous_value)); - my_mock.DoSomethingToUpdateValue(); -``` - -Here `my_mock.GetPrevValue()` will always return the argument of the last `UpdateValue()` call. - -## Setting the Default Value for a Return Type ## - -If a mock method's return type is a built-in C++ type or pointer, by -default it will return 0 when invoked. Also, in C++ 11 and above, a mock -method whose return type has a default constructor will return a default-constructed -value by default. You only need to specify an -action if this default value doesn't work for you. - -Sometimes, you may want to change this default value, or you may want -to specify a default value for types Google Mock doesn't know -about. You can do this using the `::testing::DefaultValue` class -template: - -```cpp -class MockFoo : public Foo { - public: - MOCK_METHOD0(CalculateBar, Bar()); -}; -... - - Bar default_bar; - // Sets the default return value for type Bar. - DefaultValue::Set(default_bar); - - MockFoo foo; - - // We don't need to specify an action here, as the default - // return value works for us. - EXPECT_CALL(foo, CalculateBar()); - - foo.CalculateBar(); // This should return default_bar. - - // Unsets the default return value. - DefaultValue::Clear(); -``` - -Please note that changing the default value for a type can make you -tests hard to understand. We recommend you to use this feature -judiciously. For example, you may want to make sure the `Set()` and -`Clear()` calls are right next to the code that uses your mock. - -## Setting the Default Actions for a Mock Method ## - -You've learned how to change the default value of a given -type. However, this may be too coarse for your purpose: perhaps you -have two mock methods with the same return type and you want them to -have different behaviors. The `ON_CALL()` macro allows you to -customize your mock's behavior at the method level: - -```cpp -using ::testing::_; -using ::testing::AnyNumber; -using ::testing::Gt; -using ::testing::Return; -... - ON_CALL(foo, Sign(_)) - .WillByDefault(Return(-1)); - ON_CALL(foo, Sign(0)) - .WillByDefault(Return(0)); - ON_CALL(foo, Sign(Gt(0))) - .WillByDefault(Return(1)); - - EXPECT_CALL(foo, Sign(_)) - .Times(AnyNumber()); - - foo.Sign(5); // This should return 1. - foo.Sign(-9); // This should return -1. - foo.Sign(0); // This should return 0. -``` - -As you may have guessed, when there are more than one `ON_CALL()` -statements, the news order take precedence over the older ones. In -other words, the **last** one that matches the function arguments will -be used. This matching order allows you to set up the common behavior -in a mock object's constructor or the test fixture's set-up phase and -specialize the mock's behavior later. - -## Using Functions/Methods/Functors as Actions ## - -If the built-in actions don't suit you, you can easily use an existing -function, method, or functor as an action: - -```cpp -using ::testing::_; -using ::testing::Invoke; - -class MockFoo : public Foo { - public: - MOCK_METHOD2(Sum, int(int x, int y)); - MOCK_METHOD1(ComplexJob, bool(int x)); -}; - -int CalculateSum(int x, int y) { return x + y; } - -class Helper { - public: - bool ComplexJob(int x); -}; -... - - MockFoo foo; - Helper helper; - EXPECT_CALL(foo, Sum(_, _)) - .WillOnce(Invoke(CalculateSum)); - EXPECT_CALL(foo, ComplexJob(_)) - .WillOnce(Invoke(&helper, &Helper::ComplexJob)); - - foo.Sum(5, 6); // Invokes CalculateSum(5, 6). - foo.ComplexJob(10); // Invokes helper.ComplexJob(10); -``` - -The only requirement is that the type of the function, etc must be -_compatible_ with the signature of the mock function, meaning that the -latter's arguments can be implicitly converted to the corresponding -arguments of the former, and the former's return type can be -implicitly converted to that of the latter. So, you can invoke -something whose type is _not_ exactly the same as the mock function, -as long as it's safe to do so - nice, huh? - -## Invoking a Function/Method/Functor Without Arguments ## - -`Invoke()` is very useful for doing actions that are more complex. It -passes the mock function's arguments to the function or functor being -invoked such that the callee has the full context of the call to work -with. If the invoked function is not interested in some or all of the -arguments, it can simply ignore them. - -Yet, a common pattern is that a test author wants to invoke a function -without the arguments of the mock function. `Invoke()` allows her to -do that using a wrapper function that throws away the arguments before -invoking an underlining nullary function. Needless to say, this can be -tedious and obscures the intent of the test. - -`InvokeWithoutArgs()` solves this problem. It's like `Invoke()` except -that it doesn't pass the mock function's arguments to the -callee. Here's an example: - -```cpp -using ::testing::_; -using ::testing::InvokeWithoutArgs; - -class MockFoo : public Foo { - public: - MOCK_METHOD1(ComplexJob, bool(int n)); -}; - -bool Job1() { ... } -... - - MockFoo foo; - EXPECT_CALL(foo, ComplexJob(_)) - .WillOnce(InvokeWithoutArgs(Job1)); - - foo.ComplexJob(10); // Invokes Job1(). -``` - -## Invoking an Argument of the Mock Function ## - -Sometimes a mock function will receive a function pointer or a functor -(in other words, a "callable") as an argument, e.g. - -```cpp -class MockFoo : public Foo { - public: - MOCK_METHOD2(DoThis, bool(int n, bool (*fp)(int))); -}; -``` - -and you may want to invoke this callable argument: - -```cpp -using ::testing::_; -... - MockFoo foo; - EXPECT_CALL(foo, DoThis(_, _)) - .WillOnce(...); - // Will execute (*fp)(5), where fp is the - // second argument DoThis() receives. -``` - -Arghh, you need to refer to a mock function argument but your version -of C++ has no lambdas, so you have to define your own action. :-( -Or do you really? - -Well, Google Mock has an action to solve _exactly_ this problem: - -```cpp - InvokeArgument(arg_1, arg_2, ..., arg_m) -``` - -will invoke the `N`-th (0-based) argument the mock function receives, -with `arg_1`, `arg_2`, ..., and `arg_m`. No matter if the argument is -a function pointer or a functor, Google Mock handles them both. - -With that, you could write: - -```cpp -using ::testing::_; -using ::testing::InvokeArgument; -... - EXPECT_CALL(foo, DoThis(_, _)) - .WillOnce(InvokeArgument<1>(5)); - // Will execute (*fp)(5), where fp is the - // second argument DoThis() receives. -``` - -What if the callable takes an argument by reference? No problem - just -wrap it inside `ByRef()`: - -```cpp -... - MOCK_METHOD1(Bar, bool(bool (*fp)(int, const Helper&))); -... -using ::testing::_; -using ::testing::ByRef; -using ::testing::InvokeArgument; -... - - MockFoo foo; - Helper helper; - ... - EXPECT_CALL(foo, Bar(_)) - .WillOnce(InvokeArgument<0>(5, ByRef(helper))); - // ByRef(helper) guarantees that a reference to helper, not a copy of it, - // will be passed to the callable. -``` - -What if the callable takes an argument by reference and we do **not** -wrap the argument in `ByRef()`? Then `InvokeArgument()` will _make a -copy_ of the argument, and pass a _reference to the copy_, instead of -a reference to the original value, to the callable. This is especially -handy when the argument is a temporary value: - -```cpp -... - MOCK_METHOD1(DoThat, bool(bool (*f)(const double& x, const string& s))); -... -using ::testing::_; -using ::testing::InvokeArgument; -... - - MockFoo foo; - ... - EXPECT_CALL(foo, DoThat(_)) - .WillOnce(InvokeArgument<0>(5.0, string("Hi"))); - // Will execute (*f)(5.0, string("Hi")), where f is the function pointer - // DoThat() receives. Note that the values 5.0 and string("Hi") are - // temporary and dead once the EXPECT_CALL() statement finishes. Yet - // it's fine to perform this action later, since a copy of the values - // are kept inside the InvokeArgument action. -``` - -## Ignoring an Action's Result ## - -Sometimes you have an action that returns _something_, but you need an -action that returns `void` (perhaps you want to use it in a mock -function that returns `void`, or perhaps it needs to be used in -`DoAll()` and it's not the last in the list). `IgnoreResult()` lets -you do that. For example: - -```cpp -using ::testing::_; -using ::testing::Invoke; -using ::testing::Return; - -int Process(const MyData& data); -string DoSomething(); - -class MockFoo : public Foo { - public: - MOCK_METHOD1(Abc, void(const MyData& data)); - MOCK_METHOD0(Xyz, bool()); -}; -... - - MockFoo foo; - EXPECT_CALL(foo, Abc(_)) - // .WillOnce(Invoke(Process)); - // The above line won't compile as Process() returns int but Abc() needs - // to return void. - .WillOnce(IgnoreResult(Invoke(Process))); - - EXPECT_CALL(foo, Xyz()) - .WillOnce(DoAll(IgnoreResult(Invoke(DoSomething)), - // Ignores the string DoSomething() returns. - Return(true))); -``` - -Note that you **cannot** use `IgnoreResult()` on an action that already -returns `void`. Doing so will lead to ugly compiler errors. - -## Selecting an Action's Arguments ## - -Say you have a mock function `Foo()` that takes seven arguments, and -you have a custom action that you want to invoke when `Foo()` is -called. Trouble is, the custom action only wants three arguments: - -```cpp -using ::testing::_; -using ::testing::Invoke; -... - MOCK_METHOD7(Foo, bool(bool visible, const string& name, int x, int y, - const map, double>& weight, - double min_weight, double max_wight)); -... - -bool IsVisibleInQuadrant1(bool visible, int x, int y) { - return visible && x >= 0 && y >= 0; -} -... - - EXPECT_CALL(mock, Foo(_, _, _, _, _, _, _)) - .WillOnce(Invoke(IsVisibleInQuadrant1)); // Uh, won't compile. :-( -``` - -To please the compiler God, you can to define an "adaptor" that has -the same signature as `Foo()` and calls the custom action with the -right arguments: - -```cpp -using ::testing::_; -using ::testing::Invoke; - -bool MyIsVisibleInQuadrant1(bool visible, const string& name, int x, int y, - const map, double>& weight, - double min_weight, double max_wight) { - return IsVisibleInQuadrant1(visible, x, y); -} -... - - EXPECT_CALL(mock, Foo(_, _, _, _, _, _, _)) - .WillOnce(Invoke(MyIsVisibleInQuadrant1)); // Now it works. -``` - -But isn't this awkward? - -Google Mock provides a generic _action adaptor_, so you can spend your -time minding more important business than writing your own -adaptors. Here's the syntax: - -```cpp - WithArgs(action) -``` - -creates an action that passes the arguments of the mock function at -the given indices (0-based) to the inner `action` and performs -it. Using `WithArgs`, our original example can be written as: - -```cpp -using ::testing::_; -using ::testing::Invoke; -using ::testing::WithArgs; -... - EXPECT_CALL(mock, Foo(_, _, _, _, _, _, _)) - .WillOnce(WithArgs<0, 2, 3>(Invoke(IsVisibleInQuadrant1))); - // No need to define your own adaptor. -``` - -For better readability, Google Mock also gives you: - - * `WithoutArgs(action)` when the inner `action` takes _no_ argument, and - * `WithArg(action)` (no `s` after `Arg`) when the inner `action` takes _one_ argument. - -As you may have realized, `InvokeWithoutArgs(...)` is just syntactic -sugar for `WithoutArgs(Invoke(...))`. - -Here are more tips: - - * The inner action used in `WithArgs` and friends does not have to be `Invoke()` -- it can be anything. - * You can repeat an argument in the argument list if necessary, e.g. `WithArgs<2, 3, 3, 5>(...)`. - * You can change the order of the arguments, e.g. `WithArgs<3, 2, 1>(...)`. - * The types of the selected arguments do _not_ have to match the signature of the inner action exactly. It works as long as they can be implicitly converted to the corresponding arguments of the inner action. For example, if the 4-th argument of the mock function is an `int` and `my_action` takes a `double`, `WithArg<4>(my_action)` will work. - -## Ignoring Arguments in Action Functions ## - -The selecting-an-action's-arguments recipe showed us one way to make a -mock function and an action with incompatible argument lists fit -together. The downside is that wrapping the action in -`WithArgs<...>()` can get tedious for people writing the tests. - -If you are defining a function, method, or functor to be used with -`Invoke*()`, and you are not interested in some of its arguments, an -alternative to `WithArgs` is to declare the uninteresting arguments as -`Unused`. This makes the definition less cluttered and less fragile in -case the types of the uninteresting arguments change. It could also -increase the chance the action function can be reused. For example, -given - -```cpp - MOCK_METHOD3(Foo, double(const string& label, double x, double y)); - MOCK_METHOD3(Bar, double(int index, double x, double y)); -``` - -instead of - -```cpp -using ::testing::_; -using ::testing::Invoke; - -double DistanceToOriginWithLabel(const string& label, double x, double y) { - return sqrt(x*x + y*y); -} - -double DistanceToOriginWithIndex(int index, double x, double y) { - return sqrt(x*x + y*y); -} -... - - EXEPCT_CALL(mock, Foo("abc", _, _)) - .WillOnce(Invoke(DistanceToOriginWithLabel)); - EXEPCT_CALL(mock, Bar(5, _, _)) - .WillOnce(Invoke(DistanceToOriginWithIndex)); -``` - -you could write - -```cpp -using ::testing::_; -using ::testing::Invoke; -using ::testing::Unused; - -double DistanceToOrigin(Unused, double x, double y) { - return sqrt(x*x + y*y); -} -... - - EXEPCT_CALL(mock, Foo("abc", _, _)) - .WillOnce(Invoke(DistanceToOrigin)); - EXEPCT_CALL(mock, Bar(5, _, _)) - .WillOnce(Invoke(DistanceToOrigin)); -``` - -## Sharing Actions ## - -Just like matchers, a Google Mock action object consists of a pointer -to a ref-counted implementation object. Therefore copying actions is -also allowed and very efficient. When the last action that references -the implementation object dies, the implementation object will be -deleted. - -If you have some complex action that you want to use again and again, -you may not have to build it from scratch every time. If the action -doesn't have an internal state (i.e. if it always does the same thing -no matter how many times it has been called), you can assign it to an -action variable and use that variable repeatedly. For example: - -```cpp - Action set_flag = DoAll(SetArgPointee<0>(5), - Return(true)); - ... use set_flag in .WillOnce() and .WillRepeatedly() ... -``` - -However, if the action has its own state, you may be surprised if you -share the action object. Suppose you have an action factory -`IncrementCounter(init)` which creates an action that increments and -returns a counter whose initial value is `init`, using two actions -created from the same expression and using a shared action will -exihibit different behaviors. Example: - -```cpp - EXPECT_CALL(foo, DoThis()) - .WillRepeatedly(IncrementCounter(0)); - EXPECT_CALL(foo, DoThat()) - .WillRepeatedly(IncrementCounter(0)); - foo.DoThis(); // Returns 1. - foo.DoThis(); // Returns 2. - foo.DoThat(); // Returns 1 - Blah() uses a different - // counter than Bar()'s. -``` - -versus - -```cpp - Action increment = IncrementCounter(0); - - EXPECT_CALL(foo, DoThis()) - .WillRepeatedly(increment); - EXPECT_CALL(foo, DoThat()) - .WillRepeatedly(increment); - foo.DoThis(); // Returns 1. - foo.DoThis(); // Returns 2. - foo.DoThat(); // Returns 3 - the counter is shared. -``` - -# Misc Recipes on Using Google Mock # - -## Mocking Methods That Use Move-Only Types ## - -C++11 introduced *move-only types*. A move-only-typed value can be moved from -one object to another, but cannot be copied. `std::unique_ptr` is -probably the most commonly used move-only type. - -Mocking a method that takes and/or returns move-only types presents some -challenges, but nothing insurmountable. This recipe shows you how you can do it. -Note that the support for move-only method arguments was only introduced to -gMock in April 2017; in older code, you may find more complex -[workarounds](#legacy-workarounds-for-move-only-types) for lack of this feature. - -Let’s say we are working on a fictional project that lets one post and share -snippets called “buzzesâ€. Your code uses these types: - -```cpp -enum class AccessLevel { kInternal, kPublic }; - -class Buzz { - public: - explicit Buzz(AccessLevel access) { ... } - ... -}; - -class Buzzer { - public: - virtual ~Buzzer() {} - virtual std::unique_ptr MakeBuzz(StringPiece text) = 0; - virtual bool ShareBuzz(std::unique_ptr buzz, int64_t timestamp) = 0; - ... -}; -``` - -A `Buzz` object represents a snippet being posted. A class that implements the -`Buzzer` interface is capable of creating and sharing `Buzz`es. Methods in -`Buzzer` may return a `unique_ptr` or take a -`unique_ptr`. Now we need to mock `Buzzer` in our tests. - -To mock a method that accepts or returns move-only types, you just use the -familiar `MOCK_METHOD` syntax as usual: - -```cpp -class MockBuzzer : public Buzzer { - public: - MOCK_METHOD1(MakeBuzz, std::unique_ptr(StringPiece text)); - MOCK_METHOD2(ShareBuzz, bool(std::unique_ptr buzz, int64_t timestamp)); -}; -``` - -Now that we have the mock class defined, we can use it in tests. In the -following code examples, we assume that we have defined a `MockBuzzer` object -named `mock_buzzer_`: - -```cpp - MockBuzzer mock_buzzer_; -``` - -First let’s see how we can set expectations on the `MakeBuzz()` method, which -returns a `unique_ptr`. - -As usual, if you set an expectation without an action (i.e. the `.WillOnce()` or -`.WillRepeated()` clause), when that expectation fires, the default action for -that method will be taken. Since `unique_ptr<>` has a default constructor -that returns a null `unique_ptr`, that’s what you’ll get if you don’t specify an -action: - -```cpp - // Use the default action. - EXPECT_CALL(mock_buzzer_, MakeBuzz("hello")); - - // Triggers the previous EXPECT_CALL. - EXPECT_EQ(nullptr, mock_buzzer_.MakeBuzz("hello")); -``` - -If you are not happy with the default action, you can tweak it as usual; see -[Setting Default Actions](#setting-the-default-actions-for-a-mock-method). - -If you just need to return a pre-defined move-only value, you can use the -`Return(ByMove(...))` action: - -```cpp - // When this fires, the unique_ptr<> specified by ByMove(...) will - // be returned. - EXPECT_CALL(mock_buzzer_, MakeBuzz("world")) - .WillOnce(Return(ByMove(MakeUnique(AccessLevel::kInternal)))); - - EXPECT_NE(nullptr, mock_buzzer_.MakeBuzz("world")); -``` - -Note that `ByMove()` is essential here - if you drop it, the code won’t compile. - -Quiz time! What do you think will happen if a `Return(ByMove(...))` action is -performed more than once (e.g. you write -`.WillRepeatedly(Return(ByMove(...)));`)? Come think of it, after the first -time the action runs, the source value will be consumed (since it’s a move-only -value), so the next time around, there’s no value to move from -- you’ll get a -run-time error that `Return(ByMove(...))` can only be run once. - -If you need your mock method to do more than just moving a pre-defined value, -remember that you can always use a lambda or a callable object, which can do -pretty much anything you want: - -```cpp - EXPECT_CALL(mock_buzzer_, MakeBuzz("x")) - .WillRepeatedly([](StringPiece text) { - return MakeUnique(AccessLevel::kInternal); - }); - - EXPECT_NE(nullptr, mock_buzzer_.MakeBuzz("x")); - EXPECT_NE(nullptr, mock_buzzer_.MakeBuzz("x")); -``` - -Every time this `EXPECT_CALL` fires, a new `unique_ptr` will be -created and returned. You cannot do this with `Return(ByMove(...))`. - -That covers returning move-only values; but how do we work with methods -accepting move-only arguments? The answer is that they work normally, although -some actions will not compile when any of method's arguments are move-only. You -can always use `Return`, or a [lambda or functor](#using-functionsmethodsfunctors-as-actions): - -```cpp - using ::testing::Unused; - - EXPECT_CALL(mock_buzzer_, ShareBuzz(NotNull(), _)) .WillOnce(Return(true)); - EXPECT_TRUE(mock_buzzer_.ShareBuzz(MakeUnique(AccessLevel::kInternal)), - 0); - - EXPECT_CALL(mock_buzzer_, ShareBuzz(_, _)) .WillOnce( - [](std::unique_ptr buzz, Unused) { return buzz != nullptr; }); - EXPECT_FALSE(mock_buzzer_.ShareBuzz(nullptr, 0)); -``` - -Many built-in actions (`WithArgs`, `WithoutArgs`,`DeleteArg`, `SaveArg`, ...) -could in principle support move-only arguments, but the support for this is not -implemented yet. If this is blocking you, please file a bug. - -A few actions (e.g. `DoAll`) copy their arguments internally, so they can never -work with non-copyable objects; you'll have to use functors instead. - -##### Legacy workarounds for move-only types - -Support for move-only function arguments was only introduced to gMock in April -2017. In older code, you may encounter the following workaround for the lack of -this feature (it is no longer necessary - we're including it just for -reference): - -```cpp -class MockBuzzer : public Buzzer { - public: - MOCK_METHOD2(DoShareBuzz, bool(Buzz* buzz, Time timestamp)); - bool ShareBuzz(std::unique_ptr buzz, Time timestamp) override { - return DoShareBuzz(buzz.get(), timestamp); - } -}; -``` - -The trick is to delegate the `ShareBuzz()` method to a mock method (let’s call -it `DoShareBuzz()`) that does not take move-only parameters. Then, instead of -setting expectations on `ShareBuzz()`, you set them on the `DoShareBuzz()` mock -method: - -```cpp - MockBuzzer mock_buzzer_; - EXPECT_CALL(mock_buzzer_, DoShareBuzz(NotNull(), _)); - - // When one calls ShareBuzz() on the MockBuzzer like this, the call is - // forwarded to DoShareBuzz(), which is mocked. Therefore this statement - // will trigger the above EXPECT_CALL. - mock_buzzer_.ShareBuzz(MakeUnique(AccessLevel::kInternal), 0); -``` - - - -## Making the Compilation Faster ## - -Believe it or not, the _vast majority_ of the time spent on compiling -a mock class is in generating its constructor and destructor, as they -perform non-trivial tasks (e.g. verification of the -expectations). What's more, mock methods with different signatures -have different types and thus their constructors/destructors need to -be generated by the compiler separately. As a result, if you mock many -different types of methods, compiling your mock class can get really -slow. - -If you are experiencing slow compilation, you can move the definition -of your mock class' constructor and destructor out of the class body -and into a `.cpp` file. This way, even if you `#include` your mock -class in N files, the compiler only needs to generate its constructor -and destructor once, resulting in a much faster compilation. - -Let's illustrate the idea using an example. Here's the definition of a -mock class before applying this recipe: - -```cpp -// File mock_foo.h. -... -class MockFoo : public Foo { - public: - // Since we don't declare the constructor or the destructor, - // the compiler will generate them in every translation unit - // where this mock class is used. - - MOCK_METHOD0(DoThis, int()); - MOCK_METHOD1(DoThat, bool(const char* str)); - ... more mock methods ... -}; -``` - -After the change, it would look like: - -```cpp -// File mock_foo.h. -... -class MockFoo : public Foo { - public: - // The constructor and destructor are declared, but not defined, here. - MockFoo(); - virtual ~MockFoo(); - - MOCK_METHOD0(DoThis, int()); - MOCK_METHOD1(DoThat, bool(const char* str)); - ... more mock methods ... -}; -``` -and -```cpp -// File mock_foo.cpp. -#include "path/to/mock_foo.h" - -// The definitions may appear trivial, but the functions actually do a -// lot of things through the constructors/destructors of the member -// variables used to implement the mock methods. -MockFoo::MockFoo() {} -MockFoo::~MockFoo() {} -``` - -## Forcing a Verification ## - -When it's being destroyed, your friendly mock object will automatically -verify that all expectations on it have been satisfied, and will -generate [Google Test](../../googletest/) failures -if not. This is convenient as it leaves you with one less thing to -worry about. That is, unless you are not sure if your mock object will -be destroyed. - -How could it be that your mock object won't eventually be destroyed? -Well, it might be created on the heap and owned by the code you are -testing. Suppose there's a bug in that code and it doesn't delete the -mock object properly - you could end up with a passing test when -there's actually a bug. - -Using a heap checker is a good idea and can alleviate the concern, but -its implementation may not be 100% reliable. So, sometimes you do want -to _force_ Google Mock to verify a mock object before it is -(hopefully) destructed. You can do this with -`Mock::VerifyAndClearExpectations(&mock_object)`: - -```cpp -TEST(MyServerTest, ProcessesRequest) { - using ::testing::Mock; - - MockFoo* const foo = new MockFoo; - EXPECT_CALL(*foo, ...)...; - // ... other expectations ... - - // server now owns foo. - MyServer server(foo); - server.ProcessRequest(...); - - // In case that server's destructor will forget to delete foo, - // this will verify the expectations anyway. - Mock::VerifyAndClearExpectations(foo); -} // server is destroyed when it goes out of scope here. -``` - -**Tip:** The `Mock::VerifyAndClearExpectations()` function returns a -`bool` to indicate whether the verification was successful (`true` for -yes), so you can wrap that function call inside a `ASSERT_TRUE()` if -there is no point going further when the verification has failed. - -## Using Check Points ## - -Sometimes you may want to "reset" a mock object at various check -points in your test: at each check point, you verify that all existing -expectations on the mock object have been satisfied, and then you set -some new expectations on it as if it's newly created. This allows you -to work with a mock object in "phases" whose sizes are each -manageable. - -One such scenario is that in your test's `SetUp()` function, you may -want to put the object you are testing into a certain state, with the -help from a mock object. Once in the desired state, you want to clear -all expectations on the mock, such that in the `TEST_F` body you can -set fresh expectations on it. - -As you may have figured out, the `Mock::VerifyAndClearExpectations()` -function we saw in the previous recipe can help you here. Or, if you -are using `ON_CALL()` to set default actions on the mock object and -want to clear the default actions as well, use -`Mock::VerifyAndClear(&mock_object)` instead. This function does what -`Mock::VerifyAndClearExpectations(&mock_object)` does and returns the -same `bool`, **plus** it clears the `ON_CALL()` statements on -`mock_object` too. - -Another trick you can use to achieve the same effect is to put the -expectations in sequences and insert calls to a dummy "check-point" -function at specific places. Then you can verify that the mock -function calls do happen at the right time. For example, if you are -exercising code: - -```cpp -Foo(1); -Foo(2); -Foo(3); -``` - -and want to verify that `Foo(1)` and `Foo(3)` both invoke -`mock.Bar("a")`, but `Foo(2)` doesn't invoke anything. You can write: - -```cpp -using ::testing::MockFunction; - -TEST(FooTest, InvokesBarCorrectly) { - MyMock mock; - // Class MockFunction has exactly one mock method. It is named - // Call() and has type F. - MockFunction check; - { - InSequence s; - - EXPECT_CALL(mock, Bar("a")); - EXPECT_CALL(check, Call("1")); - EXPECT_CALL(check, Call("2")); - EXPECT_CALL(mock, Bar("a")); - } - Foo(1); - check.Call("1"); - Foo(2); - check.Call("2"); - Foo(3); -} -``` - -The expectation spec says that the first `Bar("a")` must happen before -check point "1", the second `Bar("a")` must happen after check point "2", -and nothing should happen between the two check points. The explicit -check points make it easy to tell which `Bar("a")` is called by which -call to `Foo()`. - -## Mocking Destructors ## - -Sometimes you want to make sure a mock object is destructed at the -right time, e.g. after `bar->A()` is called but before `bar->B()` is -called. We already know that you can specify constraints on the order -of mock function calls, so all we need to do is to mock the destructor -of the mock function. - -This sounds simple, except for one problem: a destructor is a special -function with special syntax and special semantics, and the -`MOCK_METHOD0` macro doesn't work for it: - -```cpp - MOCK_METHOD0(~MockFoo, void()); // Won't compile! -``` - -The good news is that you can use a simple pattern to achieve the same -effect. First, add a mock function `Die()` to your mock class and call -it in the destructor, like this: - -```cpp -class MockFoo : public Foo { - ... - // Add the following two lines to the mock class. - MOCK_METHOD0(Die, void()); - virtual ~MockFoo() { Die(); } -}; -``` - -(If the name `Die()` clashes with an existing symbol, choose another -name.) Now, we have translated the problem of testing when a `MockFoo` -object dies to testing when its `Die()` method is called: - -```cpp - MockFoo* foo = new MockFoo; - MockBar* bar = new MockBar; - ... - { - InSequence s; - - // Expects *foo to die after bar->A() and before bar->B(). - EXPECT_CALL(*bar, A()); - EXPECT_CALL(*foo, Die()); - EXPECT_CALL(*bar, B()); - } -``` - -And that's that. - -## Using Google Mock and Threads ## - -**IMPORTANT NOTE:** What we describe in this recipe is **ONLY** true on -platforms where Google Mock is thread-safe. Currently these are only -platforms that support the pthreads library (this includes Linux and Mac). -To make it thread-safe on other platforms we only need to implement -some synchronization operations in `"gtest/internal/gtest-port.h"`. - -In a **unit** test, it's best if you could isolate and test a piece of -code in a single-threaded context. That avoids race conditions and -dead locks, and makes debugging your test much easier. - -Yet many programs are multi-threaded, and sometimes to test something -we need to pound on it from more than one thread. Google Mock works -for this purpose too. - -Remember the steps for using a mock: - - 1. Create a mock object `foo`. - 1. Set its default actions and expectations using `ON_CALL()` and `EXPECT_CALL()`. - 1. The code under test calls methods of `foo`. - 1. Optionally, verify and reset the mock. - 1. Destroy the mock yourself, or let the code under test destroy it. The destructor will automatically verify it. - -If you follow the following simple rules, your mocks and threads can -live happily together: - - * Execute your _test code_ (as opposed to the code being tested) in _one_ thread. This makes your test easy to follow. - * Obviously, you can do step #1 without locking. - * When doing step #2 and #5, make sure no other thread is accessing `foo`. Obvious too, huh? - * #3 and #4 can be done either in one thread or in multiple threads - anyway you want. Google Mock takes care of the locking, so you don't have to do any - unless required by your test logic. - -If you violate the rules (for example, if you set expectations on a -mock while another thread is calling its methods), you get undefined -behavior. That's not fun, so don't do it. - -Google Mock guarantees that the action for a mock function is done in -the same thread that called the mock function. For example, in - -```cpp - EXPECT_CALL(mock, Foo(1)) - .WillOnce(action1); - EXPECT_CALL(mock, Foo(2)) - .WillOnce(action2); -``` - -if `Foo(1)` is called in thread 1 and `Foo(2)` is called in thread 2, -Google Mock will execute `action1` in thread 1 and `action2` in thread -2. - -Google Mock does _not_ impose a sequence on actions performed in -different threads (doing so may create deadlocks as the actions may -need to cooperate). This means that the execution of `action1` and -`action2` in the above example _may_ interleave. If this is a problem, -you should add proper synchronization logic to `action1` and `action2` -to make the test thread-safe. - - -Also, remember that `DefaultValue` is a global resource that -potentially affects _all_ living mock objects in your -program. Naturally, you won't want to mess with it from multiple -threads or when there still are mocks in action. - -## Controlling How Much Information Google Mock Prints ## - -When Google Mock sees something that has the potential of being an -error (e.g. a mock function with no expectation is called, a.k.a. an -uninteresting call, which is allowed but perhaps you forgot to -explicitly ban the call), it prints some warning messages, including -the arguments of the function and the return value. Hopefully this -will remind you to take a look and see if there is indeed a problem. - -Sometimes you are confident that your tests are correct and may not -appreciate such friendly messages. Some other times, you are debugging -your tests or learning about the behavior of the code you are testing, -and wish you could observe every mock call that happens (including -argument values and the return value). Clearly, one size doesn't fit -all. - -You can control how much Google Mock tells you using the -`--gmock_verbose=LEVEL` command-line flag, where `LEVEL` is a string -with three possible values: - - * `info`: Google Mock will print all informational messages, warnings, and errors (most verbose). At this setting, Google Mock will also log any calls to the `ON_CALL/EXPECT_CALL` macros. - * `warning`: Google Mock will print both warnings and errors (less verbose). This is the default. - * `error`: Google Mock will print errors only (least verbose). - -Alternatively, you can adjust the value of that flag from within your -tests like so: - -```cpp - ::testing::FLAGS_gmock_verbose = "error"; -``` - -Now, judiciously use the right flag to enable Google Mock serve you better! - -## Gaining Super Vision into Mock Calls ## - -You have a test using Google Mock. It fails: Google Mock tells you -that some expectations aren't satisfied. However, you aren't sure why: -Is there a typo somewhere in the matchers? Did you mess up the order -of the `EXPECT_CALL`s? Or is the code under test doing something -wrong? How can you find out the cause? - -Won't it be nice if you have X-ray vision and can actually see the -trace of all `EXPECT_CALL`s and mock method calls as they are made? -For each call, would you like to see its actual argument values and -which `EXPECT_CALL` Google Mock thinks it matches? - -You can unlock this power by running your test with the -`--gmock_verbose=info` flag. For example, given the test program: - -```cpp -using testing::_; -using testing::HasSubstr; -using testing::Return; - -class MockFoo { - public: - MOCK_METHOD2(F, void(const string& x, const string& y)); -}; - -TEST(Foo, Bar) { - MockFoo mock; - EXPECT_CALL(mock, F(_, _)).WillRepeatedly(Return()); - EXPECT_CALL(mock, F("a", "b")); - EXPECT_CALL(mock, F("c", HasSubstr("d"))); - - mock.F("a", "good"); - mock.F("a", "b"); -} -``` - -if you run it with `--gmock_verbose=info`, you will see this output: - -``` -[ RUN ] Foo.Bar - -foo_test.cc:14: EXPECT_CALL(mock, F(_, _)) invoked -foo_test.cc:15: EXPECT_CALL(mock, F("a", "b")) invoked -foo_test.cc:16: EXPECT_CALL(mock, F("c", HasSubstr("d"))) invoked -foo_test.cc:14: Mock function call matches EXPECT_CALL(mock, F(_, _))... - Function call: F(@0x7fff7c8dad40"a", @0x7fff7c8dad10"good") -foo_test.cc:15: Mock function call matches EXPECT_CALL(mock, F("a", "b"))... - Function call: F(@0x7fff7c8dada0"a", @0x7fff7c8dad70"b") -foo_test.cc:16: Failure -Actual function call count doesn't match EXPECT_CALL(mock, F("c", HasSubstr("d")))... - Expected: to be called once - Actual: never called - unsatisfied and active -[ FAILED ] Foo.Bar -``` - -Suppose the bug is that the `"c"` in the third `EXPECT_CALL` is a typo -and should actually be `"a"`. With the above message, you should see -that the actual `F("a", "good")` call is matched by the first -`EXPECT_CALL`, not the third as you thought. From that it should be -obvious that the third `EXPECT_CALL` is written wrong. Case solved. - -## Running Tests in Emacs ## - -If you build and run your tests in Emacs, the source file locations of -Google Mock and [Google Test](../../googletest/) -errors will be highlighted. Just press `` on one of them and -you'll be taken to the offending line. Or, you can just type `C-x `` -to jump to the next error. - -To make it even easier, you can add the following lines to your -`~/.emacs` file: - -``` -(global-set-key "\M-m" 'compile) ; m is for make -(global-set-key [M-down] 'next-error) -(global-set-key [M-up] '(lambda () (interactive) (next-error -1))) -``` - -Then you can type `M-m` to start a build, or `M-up`/`M-down` to move -back and forth between errors. - -## Fusing Google Mock Source Files ## - -Google Mock's implementation consists of dozens of files (excluding -its own tests). Sometimes you may want them to be packaged up in -fewer files instead, such that you can easily copy them to a new -machine and start hacking there. For this we provide an experimental -Python script `fuse_gmock_files.py` in the `scripts/` directory -(starting with release 1.2.0). Assuming you have Python 2.4 or above -installed on your machine, just go to that directory and run -``` -python fuse_gmock_files.py OUTPUT_DIR -``` - -and you should see an `OUTPUT_DIR` directory being created with files -`gtest/gtest.h`, `gmock/gmock.h`, and `gmock-gtest-all.cc` in it. -These three files contain everything you need to use Google Mock (and -Google Test). Just copy them to anywhere you want and you are ready -to write tests and use mocks. You can use the -[make/Makefile](../make/Makefile) file as an example on how to compile your tests -against them. - -# Extending Google Mock # - -## Writing New Matchers Quickly ## - -The `MATCHER*` family of macros can be used to define custom matchers -easily. The syntax: - -```cpp -MATCHER(name, description_string_expression) { statements; } -``` - -will define a matcher with the given name that executes the -statements, which must return a `bool` to indicate if the match -succeeds. Inside the statements, you can refer to the value being -matched by `arg`, and refer to its type by `arg_type`. - -The description string is a `string`-typed expression that documents -what the matcher does, and is used to generate the failure message -when the match fails. It can (and should) reference the special -`bool` variable `negation`, and should evaluate to the description of -the matcher when `negation` is `false`, or that of the matcher's -negation when `negation` is `true`. - -For convenience, we allow the description string to be empty (`""`), -in which case Google Mock will use the sequence of words in the -matcher name as the description. - -For example: -```cpp -MATCHER(IsDivisibleBy7, "") { return (arg % 7) == 0; } -``` -allows you to write -```cpp - // Expects mock_foo.Bar(n) to be called where n is divisible by 7. - EXPECT_CALL(mock_foo, Bar(IsDivisibleBy7())); -``` -or, -```cpp -using ::testing::Not; -... - EXPECT_THAT(some_expression, IsDivisibleBy7()); - EXPECT_THAT(some_other_expression, Not(IsDivisibleBy7())); -``` -If the above assertions fail, they will print something like: -``` - Value of: some_expression - Expected: is divisible by 7 - Actual: 27 -... - Value of: some_other_expression - Expected: not (is divisible by 7) - Actual: 21 -``` -where the descriptions `"is divisible by 7"` and `"not (is divisible -by 7)"` are automatically calculated from the matcher name -`IsDivisibleBy7`. - -As you may have noticed, the auto-generated descriptions (especially -those for the negation) may not be so great. You can always override -them with a string expression of your own: -```cpp -MATCHER(IsDivisibleBy7, std::string(negation ? "isn't" : "is") + - " divisible by 7") { - return (arg % 7) == 0; -} -``` - -Optionally, you can stream additional information to a hidden argument -named `result_listener` to explain the match result. For example, a -better definition of `IsDivisibleBy7` is: -```cpp -MATCHER(IsDivisibleBy7, "") { - if ((arg % 7) == 0) - return true; - - *result_listener << "the remainder is " << (arg % 7); - return false; -} -``` - -With this definition, the above assertion will give a better message: -``` - Value of: some_expression - Expected: is divisible by 7 - Actual: 27 (the remainder is 6) -``` - -You should let `MatchAndExplain()` print _any additional information_ -that can help a user understand the match result. Note that it should -explain why the match succeeds in case of a success (unless it's -obvious) - this is useful when the matcher is used inside -`Not()`. There is no need to print the argument value itself, as -Google Mock already prints it for you. - -**Notes:** - - 1. The type of the value being matched (`arg_type`) is determined by the context in which you use the matcher and is supplied to you by the compiler, so you don't need to worry about declaring it (nor can you). This allows the matcher to be polymorphic. For example, `IsDivisibleBy7()` can be used to match any type where the value of `(arg % 7) == 0` can be implicitly converted to a `bool`. In the `Bar(IsDivisibleBy7())` example above, if method `Bar()` takes an `int`, `arg_type` will be `int`; if it takes an `unsigned long`, `arg_type` will be `unsigned long`; and so on. - 1. Google Mock doesn't guarantee when or how many times a matcher will be invoked. Therefore the matcher logic must be _purely functional_ (i.e. it cannot have any side effect, and the result must not depend on anything other than the value being matched and the matcher parameters). This requirement must be satisfied no matter how you define the matcher (e.g. using one of the methods described in the following recipes). In particular, a matcher can never call a mock function, as that will affect the state of the mock object and Google Mock. - -## Writing New Parameterized Matchers Quickly ## - -Sometimes you'll want to define a matcher that has parameters. For that you -can use the macro: -```cpp -MATCHER_P(name, param_name, description_string) { statements; } -``` -where the description string can be either `""` or a string expression -that references `negation` and `param_name`. - -For example: -```cpp -MATCHER_P(HasAbsoluteValue, value, "") { return abs(arg) == value; } -``` -will allow you to write: -```cpp - EXPECT_THAT(Blah("a"), HasAbsoluteValue(n)); -``` -which may lead to this message (assuming `n` is 10): -``` - Value of: Blah("a") - Expected: has absolute value 10 - Actual: -9 -``` - -Note that both the matcher description and its parameter are -printed, making the message human-friendly. - -In the matcher definition body, you can write `foo_type` to -reference the type of a parameter named `foo`. For example, in the -body of `MATCHER_P(HasAbsoluteValue, value)` above, you can write -`value_type` to refer to the type of `value`. - -Google Mock also provides `MATCHER_P2`, `MATCHER_P3`, ..., up to -`MATCHER_P10` to support multi-parameter matchers: -```cpp -MATCHER_Pk(name, param_1, ..., param_k, description_string) { statements; } -``` - -Please note that the custom description string is for a particular -**instance** of the matcher, where the parameters have been bound to -actual values. Therefore usually you'll want the parameter values to -be part of the description. Google Mock lets you do that by -referencing the matcher parameters in the description string -expression. - -For example, -```cpp - using ::testing::PrintToString; - MATCHER_P2(InClosedRange, low, hi, - std::string(negation ? "isn't" : "is") + " in range [" + - PrintToString(low) + ", " + PrintToString(hi) + "]") { - return low <= arg && arg <= hi; - } - ... - EXPECT_THAT(3, InClosedRange(4, 6)); -``` -would generate a failure that contains the message: -``` - Expected: is in range [4, 6] -``` - -If you specify `""` as the description, the failure message will -contain the sequence of words in the matcher name followed by the -parameter values printed as a tuple. For example, -```cpp - MATCHER_P2(InClosedRange, low, hi, "") { ... } - ... - EXPECT_THAT(3, InClosedRange(4, 6)); -``` -would generate a failure that contains the text: -``` - Expected: in closed range (4, 6) -``` - -For the purpose of typing, you can view -```cpp -MATCHER_Pk(Foo, p1, ..., pk, description_string) { ... } -``` -as shorthand for -```cpp -template -FooMatcherPk -Foo(p1_type p1, ..., pk_type pk) { ... } -``` - -When you write `Foo(v1, ..., vk)`, the compiler infers the types of -the parameters `v1`, ..., and `vk` for you. If you are not happy with -the result of the type inference, you can specify the types by -explicitly instantiating the template, as in `Foo(5, false)`. -As said earlier, you don't get to (or need to) specify -`arg_type` as that's determined by the context in which the matcher -is used. - -You can assign the result of expression `Foo(p1, ..., pk)` to a -variable of type `FooMatcherPk`. This can be -useful when composing matchers. Matchers that don't have a parameter -or have only one parameter have special types: you can assign `Foo()` -to a `FooMatcher`-typed variable, and assign `Foo(p)` to a -`FooMatcherP`-typed variable. - -While you can instantiate a matcher template with reference types, -passing the parameters by pointer usually makes your code more -readable. If, however, you still want to pass a parameter by -reference, be aware that in the failure message generated by the -matcher you will see the value of the referenced object but not its -address. - -You can overload matchers with different numbers of parameters: -```cpp -MATCHER_P(Blah, a, description_string_1) { ... } -MATCHER_P2(Blah, a, b, description_string_2) { ... } -``` - -While it's tempting to always use the `MATCHER*` macros when defining -a new matcher, you should also consider implementing -`MatcherInterface` or using `MakePolymorphicMatcher()` instead (see -the recipes that follow), especially if you need to use the matcher a -lot. While these approaches require more work, they give you more -control on the types of the value being matched and the matcher -parameters, which in general leads to better compiler error messages -that pay off in the long run. They also allow overloading matchers -based on parameter types (as opposed to just based on the number of -parameters). - -## Writing New Monomorphic Matchers ## - -A matcher of argument type `T` implements -`::testing::MatcherInterface` and does two things: it tests whether a -value of type `T` matches the matcher, and can describe what kind of -values it matches. The latter ability is used for generating readable -error messages when expectations are violated. - -The interface looks like this: - -```cpp -class MatchResultListener { - public: - ... - // Streams x to the underlying ostream; does nothing if the ostream - // is NULL. - template - MatchResultListener& operator<<(const T& x); - - // Returns the underlying ostream. - ::std::ostream* stream(); -}; - -template -class MatcherInterface { - public: - virtual ~MatcherInterface(); - - // Returns true iff the matcher matches x; also explains the match - // result to 'listener'. - virtual bool MatchAndExplain(T x, MatchResultListener* listener) const = 0; - - // Describes this matcher to an ostream. - virtual void DescribeTo(::std::ostream* os) const = 0; - - // Describes the negation of this matcher to an ostream. - virtual void DescribeNegationTo(::std::ostream* os) const; -}; -``` - -If you need a custom matcher but `Truly()` is not a good option (for -example, you may not be happy with the way `Truly(predicate)` -describes itself, or you may want your matcher to be polymorphic as -`Eq(value)` is), you can define a matcher to do whatever you want in -two steps: first implement the matcher interface, and then define a -factory function to create a matcher instance. The second step is not -strictly needed but it makes the syntax of using the matcher nicer. - -For example, you can define a matcher to test whether an `int` is -divisible by 7 and then use it like this: -```cpp -using ::testing::MakeMatcher; -using ::testing::Matcher; -using ::testing::MatcherInterface; -using ::testing::MatchResultListener; - -class DivisibleBy7Matcher : public MatcherInterface { - public: - virtual bool MatchAndExplain(int n, MatchResultListener* listener) const { - return (n % 7) == 0; - } - - virtual void DescribeTo(::std::ostream* os) const { - *os << "is divisible by 7"; - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "is not divisible by 7"; - } -}; - -inline Matcher DivisibleBy7() { - return MakeMatcher(new DivisibleBy7Matcher); -} -... - - EXPECT_CALL(foo, Bar(DivisibleBy7())); -``` - -You may improve the matcher message by streaming additional -information to the `listener` argument in `MatchAndExplain()`: - -```cpp -class DivisibleBy7Matcher : public MatcherInterface { - public: - virtual bool MatchAndExplain(int n, - MatchResultListener* listener) const { - const int remainder = n % 7; - if (remainder != 0) { - *listener << "the remainder is " << remainder; - } - return remainder == 0; - } - ... -}; -``` - -Then, `EXPECT_THAT(x, DivisibleBy7());` may general a message like this: -``` -Value of: x -Expected: is divisible by 7 - Actual: 23 (the remainder is 2) -``` - -## Writing New Polymorphic Matchers ## - -You've learned how to write your own matchers in the previous -recipe. Just one problem: a matcher created using `MakeMatcher()` only -works for one particular type of arguments. If you want a -_polymorphic_ matcher that works with arguments of several types (for -instance, `Eq(x)` can be used to match a `value` as long as `value` == -`x` compiles -- `value` and `x` don't have to share the same type), -you can learn the trick from `"gmock/gmock-matchers.h"` but it's a bit -involved. - -Fortunately, most of the time you can define a polymorphic matcher -easily with the help of `MakePolymorphicMatcher()`. Here's how you can -define `NotNull()` as an example: - -```cpp -using ::testing::MakePolymorphicMatcher; -using ::testing::MatchResultListener; -using ::testing::NotNull; -using ::testing::PolymorphicMatcher; - -class NotNullMatcher { - public: - // To implement a polymorphic matcher, first define a COPYABLE class - // that has three members MatchAndExplain(), DescribeTo(), and - // DescribeNegationTo(), like the following. - - // In this example, we want to use NotNull() with any pointer, so - // MatchAndExplain() accepts a pointer of any type as its first argument. - // In general, you can define MatchAndExplain() as an ordinary method or - // a method template, or even overload it. - template - bool MatchAndExplain(T* p, - MatchResultListener* /* listener */) const { - return p != NULL; - } - - // Describes the property of a value matching this matcher. - void DescribeTo(::std::ostream* os) const { *os << "is not NULL"; } - - // Describes the property of a value NOT matching this matcher. - void DescribeNegationTo(::std::ostream* os) const { *os << "is NULL"; } -}; - -// To construct a polymorphic matcher, pass an instance of the class -// to MakePolymorphicMatcher(). Note the return type. -inline PolymorphicMatcher NotNull() { - return MakePolymorphicMatcher(NotNullMatcher()); -} -... - - EXPECT_CALL(foo, Bar(NotNull())); // The argument must be a non-NULL pointer. -``` - -**Note:** Your polymorphic matcher class does **not** need to inherit from -`MatcherInterface` or any other class, and its methods do **not** need -to be virtual. - -Like in a monomorphic matcher, you may explain the match result by -streaming additional information to the `listener` argument in -`MatchAndExplain()`. - -## Writing New Cardinalities ## - -A cardinality is used in `Times()` to tell Google Mock how many times -you expect a call to occur. It doesn't have to be exact. For example, -you can say `AtLeast(5)` or `Between(2, 4)`. - -If the built-in set of cardinalities doesn't suit you, you are free to -define your own by implementing the following interface (in namespace -`testing`): - -```cpp -class CardinalityInterface { - public: - virtual ~CardinalityInterface(); - - // Returns true iff call_count calls will satisfy this cardinality. - virtual bool IsSatisfiedByCallCount(int call_count) const = 0; - - // Returns true iff call_count calls will saturate this cardinality. - virtual bool IsSaturatedByCallCount(int call_count) const = 0; - - // Describes self to an ostream. - virtual void DescribeTo(::std::ostream* os) const = 0; -}; -``` - -For example, to specify that a call must occur even number of times, -you can write - -```cpp -using ::testing::Cardinality; -using ::testing::CardinalityInterface; -using ::testing::MakeCardinality; - -class EvenNumberCardinality : public CardinalityInterface { - public: - virtual bool IsSatisfiedByCallCount(int call_count) const { - return (call_count % 2) == 0; - } - - virtual bool IsSaturatedByCallCount(int call_count) const { - return false; - } - - virtual void DescribeTo(::std::ostream* os) const { - *os << "called even number of times"; - } -}; - -Cardinality EvenNumber() { - return MakeCardinality(new EvenNumberCardinality); -} -... - - EXPECT_CALL(foo, Bar(3)) - .Times(EvenNumber()); -``` - -## Writing New Actions Quickly ## - -If the built-in actions don't work for you, and you find it -inconvenient to use `Invoke()`, you can use a macro from the `ACTION*` -family to quickly define a new action that can be used in your code as -if it's a built-in action. - -By writing -```cpp -ACTION(name) { statements; } -``` -in a namespace scope (i.e. not inside a class or function), you will -define an action with the given name that executes the statements. -The value returned by `statements` will be used as the return value of -the action. Inside the statements, you can refer to the K-th -(0-based) argument of the mock function as `argK`. For example: -```cpp -ACTION(IncrementArg1) { return ++(*arg1); } -``` -allows you to write -```cpp -... WillOnce(IncrementArg1()); -``` - -Note that you don't need to specify the types of the mock function -arguments. Rest assured that your code is type-safe though: -you'll get a compiler error if `*arg1` doesn't support the `++` -operator, or if the type of `++(*arg1)` isn't compatible with the mock -function's return type. - -Another example: -```cpp -ACTION(Foo) { - (*arg2)(5); - Blah(); - *arg1 = 0; - return arg0; -} -``` -defines an action `Foo()` that invokes argument #2 (a function pointer) -with 5, calls function `Blah()`, sets the value pointed to by argument -#1 to 0, and returns argument #0. - -For more convenience and flexibility, you can also use the following -pre-defined symbols in the body of `ACTION`: - -| `argK_type` | The type of the K-th (0-based) argument of the mock function | -|:----------------|:-------------------------------------------------------------| -| `args` | All arguments of the mock function as a tuple | -| `args_type` | The type of all arguments of the mock function as a tuple | -| `return_type` | The return type of the mock function | -| `function_type` | The type of the mock function | - -For example, when using an `ACTION` as a stub action for mock function: -```cpp -int DoSomething(bool flag, int* ptr); -``` -we have: - -| **Pre-defined Symbol** | **Is Bound To** | -|:-----------------------|:----------------| -| `arg0` | the value of `flag` | -| `arg0_type` | the type `bool` | -| `arg1` | the value of `ptr` | -| `arg1_type` | the type `int*` | -| `args` | the tuple `(flag, ptr)` | -| `args_type` | the type `::testing::tuple` | -| `return_type` | the type `int` | -| `function_type` | the type `int(bool, int*)` | - -## Writing New Parameterized Actions Quickly ## - -Sometimes you'll want to parameterize an action you define. For that -we have another macro -```cpp -ACTION_P(name, param) { statements; } -``` - -For example, -```cpp -ACTION_P(Add, n) { return arg0 + n; } -``` -will allow you to write -```cpp -// Returns argument #0 + 5. -... WillOnce(Add(5)); -``` - -For convenience, we use the term _arguments_ for the values used to -invoke the mock function, and the term _parameters_ for the values -used to instantiate an action. - -Note that you don't need to provide the type of the parameter either. -Suppose the parameter is named `param`, you can also use the -Google-Mock-defined symbol `param_type` to refer to the type of the -parameter as inferred by the compiler. For example, in the body of -`ACTION_P(Add, n)` above, you can write `n_type` for the type of `n`. - -Google Mock also provides `ACTION_P2`, `ACTION_P3`, and etc to support -multi-parameter actions. For example, -```cpp -ACTION_P2(ReturnDistanceTo, x, y) { - double dx = arg0 - x; - double dy = arg1 - y; - return sqrt(dx*dx + dy*dy); -} -``` -lets you write -```cpp -... WillOnce(ReturnDistanceTo(5.0, 26.5)); -``` - -You can view `ACTION` as a degenerated parameterized action where the -number of parameters is 0. - -You can also easily define actions overloaded on the number of parameters: -```cpp -ACTION_P(Plus, a) { ... } -ACTION_P2(Plus, a, b) { ... } -``` - -## Restricting the Type of an Argument or Parameter in an ACTION ## - -For maximum brevity and reusability, the `ACTION*` macros don't ask -you to provide the types of the mock function arguments and the action -parameters. Instead, we let the compiler infer the types for us. - -Sometimes, however, we may want to be more explicit about the types. -There are several tricks to do that. For example: -```cpp -ACTION(Foo) { - // Makes sure arg0 can be converted to int. - int n = arg0; - ... use n instead of arg0 here ... -} - -ACTION_P(Bar, param) { - // Makes sure the type of arg1 is const char*. - ::testing::StaticAssertTypeEq(); - - // Makes sure param can be converted to bool. - bool flag = param; -} -``` -where `StaticAssertTypeEq` is a compile-time assertion in Google Test -that verifies two types are the same. - -## Writing New Action Templates Quickly ## - -Sometimes you want to give an action explicit template parameters that -cannot be inferred from its value parameters. `ACTION_TEMPLATE()` -supports that and can be viewed as an extension to `ACTION()` and -`ACTION_P*()`. - -The syntax: -```cpp -ACTION_TEMPLATE(ActionName, - HAS_m_TEMPLATE_PARAMS(kind1, name1, ..., kind_m, name_m), - AND_n_VALUE_PARAMS(p1, ..., p_n)) { statements; } -``` - -defines an action template that takes _m_ explicit template parameters -and _n_ value parameters, where _m_ is between 1 and 10, and _n_ is -between 0 and 10. `name_i` is the name of the i-th template -parameter, and `kind_i` specifies whether it's a `typename`, an -integral constant, or a template. `p_i` is the name of the i-th value -parameter. - -Example: -```cpp -// DuplicateArg(output) converts the k-th argument of the mock -// function to type T and copies it to *output. -ACTION_TEMPLATE(DuplicateArg, - // Note the comma between int and k: - HAS_2_TEMPLATE_PARAMS(int, k, typename, T), - AND_1_VALUE_PARAMS(output)) { - *output = T(::testing::get(args)); -} -``` - -To create an instance of an action template, write: -```cpp - ActionName(v1, ..., v_n) -``` -where the `t`s are the template arguments and the -`v`s are the value arguments. The value argument -types are inferred by the compiler. For example: -```cpp -using ::testing::_; -... - int n; - EXPECT_CALL(mock, Foo(_, _)) - .WillOnce(DuplicateArg<1, unsigned char>(&n)); -``` - -If you want to explicitly specify the value argument types, you can -provide additional template arguments: -```cpp - ActionName(v1, ..., v_n) -``` -where `u_i` is the desired type of `v_i`. - -`ACTION_TEMPLATE` and `ACTION`/`ACTION_P*` can be overloaded on the -number of value parameters, but not on the number of template -parameters. Without the restriction, the meaning of the following is -unclear: - -```cpp - OverloadedAction(x); -``` - -Are we using a single-template-parameter action where `bool` refers to -the type of `x`, or a two-template-parameter action where the compiler -is asked to infer the type of `x`? - -## Using the ACTION Object's Type ## - -If you are writing a function that returns an `ACTION` object, you'll -need to know its type. The type depends on the macro used to define -the action and the parameter types. The rule is relatively simple: - -| **Given Definition** | **Expression** | **Has Type** | -|:---------------------|:---------------|:-------------| -| `ACTION(Foo)` | `Foo()` | `FooAction` | -| `ACTION_TEMPLATE(Foo, HAS_m_TEMPLATE_PARAMS(...), AND_0_VALUE_PARAMS())` | `Foo()` | `FooAction` | -| `ACTION_P(Bar, param)` | `Bar(int_value)` | `BarActionP` | -| `ACTION_TEMPLATE(Bar, HAS_m_TEMPLATE_PARAMS(...), AND_1_VALUE_PARAMS(p1))` | `Bar(int_value)` | `FooActionP` | -| `ACTION_P2(Baz, p1, p2)` | `Baz(bool_value, int_value)` | `BazActionP2` | -| `ACTION_TEMPLATE(Baz, HAS_m_TEMPLATE_PARAMS(...), AND_2_VALUE_PARAMS(p1, p2))`| `Baz(bool_value, int_value)` | `FooActionP2` | -| ... | ... | ... | - -Note that we have to pick different suffixes (`Action`, `ActionP`, -`ActionP2`, and etc) for actions with different numbers of value -parameters, or the action definitions cannot be overloaded on the -number of them. - -## Writing New Monomorphic Actions ## - -While the `ACTION*` macros are very convenient, sometimes they are -inappropriate. For example, despite the tricks shown in the previous -recipes, they don't let you directly specify the types of the mock -function arguments and the action parameters, which in general leads -to unoptimized compiler error messages that can baffle unfamiliar -users. They also don't allow overloading actions based on parameter -types without jumping through some hoops. - -An alternative to the `ACTION*` macros is to implement -`::testing::ActionInterface`, where `F` is the type of the mock -function in which the action will be used. For example: - -```cpp -template class ActionInterface { - public: - virtual ~ActionInterface(); - - // Performs the action. Result is the return type of function type - // F, and ArgumentTuple is the tuple of arguments of F. - // - // For example, if F is int(bool, const string&), then Result would - // be int, and ArgumentTuple would be ::testing::tuple. - virtual Result Perform(const ArgumentTuple& args) = 0; -}; - -using ::testing::_; -using ::testing::Action; -using ::testing::ActionInterface; -using ::testing::MakeAction; - -typedef int IncrementMethod(int*); - -class IncrementArgumentAction : public ActionInterface { - public: - virtual int Perform(const ::testing::tuple& args) { - int* p = ::testing::get<0>(args); // Grabs the first argument. - return *p++; - } -}; - -Action IncrementArgument() { - return MakeAction(new IncrementArgumentAction); -} -... - - EXPECT_CALL(foo, Baz(_)) - .WillOnce(IncrementArgument()); - - int n = 5; - foo.Baz(&n); // Should return 5 and change n to 6. -``` - -## Writing New Polymorphic Actions ## - -The previous recipe showed you how to define your own action. This is -all good, except that you need to know the type of the function in -which the action will be used. Sometimes that can be a problem. For -example, if you want to use the action in functions with _different_ -types (e.g. like `Return()` and `SetArgPointee()`). - -If an action can be used in several types of mock functions, we say -it's _polymorphic_. The `MakePolymorphicAction()` function template -makes it easy to define such an action: - -```cpp -namespace testing { - -template -PolymorphicAction MakePolymorphicAction(const Impl& impl); - -} // namespace testing -``` - -As an example, let's define an action that returns the second argument -in the mock function's argument list. The first step is to define an -implementation class: - -```cpp -class ReturnSecondArgumentAction { - public: - template - Result Perform(const ArgumentTuple& args) const { - // To get the i-th (0-based) argument, use ::testing::get(args). - return ::testing::get<1>(args); - } -}; -``` - -This implementation class does _not_ need to inherit from any -particular class. What matters is that it must have a `Perform()` -method template. This method template takes the mock function's -arguments as a tuple in a **single** argument, and returns the result of -the action. It can be either `const` or not, but must be invokable -with exactly one template argument, which is the result type. In other -words, you must be able to call `Perform(args)` where `R` is the -mock function's return type and `args` is its arguments in a tuple. - -Next, we use `MakePolymorphicAction()` to turn an instance of the -implementation class into the polymorphic action we need. It will be -convenient to have a wrapper for this: - -```cpp -using ::testing::MakePolymorphicAction; -using ::testing::PolymorphicAction; - -PolymorphicAction ReturnSecondArgument() { - return MakePolymorphicAction(ReturnSecondArgumentAction()); -} -``` - -Now, you can use this polymorphic action the same way you use the -built-in ones: - -```cpp -using ::testing::_; - -class MockFoo : public Foo { - public: - MOCK_METHOD2(DoThis, int(bool flag, int n)); - MOCK_METHOD3(DoThat, string(int x, const char* str1, const char* str2)); -}; -... - - MockFoo foo; - EXPECT_CALL(foo, DoThis(_, _)) - .WillOnce(ReturnSecondArgument()); - EXPECT_CALL(foo, DoThat(_, _, _)) - .WillOnce(ReturnSecondArgument()); - ... - foo.DoThis(true, 5); // Will return 5. - foo.DoThat(1, "Hi", "Bye"); // Will return "Hi". -``` - -## Teaching Google Mock How to Print Your Values ## - -When an uninteresting or unexpected call occurs, Google Mock prints the -argument values and the stack trace to help you debug. Assertion -macros like `EXPECT_THAT` and `EXPECT_EQ` also print the values in -question when the assertion fails. Google Mock and Google Test do this using -Google Test's user-extensible value printer. - -This printer knows how to print built-in C++ types, native arrays, STL -containers, and any type that supports the `<<` operator. For other -types, it prints the raw bytes in the value and hopes that you the -user can figure it out. -[Google Test's advanced guide](../../googletest/docs/advanced.md#teaching-googletest-how-to-print-your-values) -explains how to extend the printer to do a better job at -printing your particular type than to dump the bytes. diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/DesignDoc.md b/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/DesignDoc.md deleted file mode 100644 index 4cddc9d0..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/DesignDoc.md +++ /dev/null @@ -1,282 +0,0 @@ -This page discusses the design of new Google Mock features. - - - -# Macros for Defining Actions # - -## Problem ## - -Due to the lack of closures in C++, it currently requires some -non-trivial effort to define a custom action in Google Mock. For -example, suppose you want to "increment the value pointed to by the -second argument of the mock function and return it", you could write: - -```cpp -int IncrementArg1(Unused, int* p, Unused) { - return ++(*p); -} - -... WillOnce(Invoke(IncrementArg1)); -``` - -There are several things unsatisfactory about this approach: - - * Even though the action only cares about the second argument of the mock function, its definition needs to list other arguments as dummies. This is tedious. - * The defined action is usable only in mock functions that takes exactly 3 arguments - an unnecessary restriction. - * To use the action, one has to say `Invoke(IncrementArg1)`, which isn't as nice as `IncrementArg1()`. - -The latter two problems can be overcome using `MakePolymorphicAction()`, -but it requires much more boilerplate code: - -```cpp -class IncrementArg1Action { - public: - template - Result Perform(const ArgumentTuple& args) const { - return ++(*tr1::get<1>(args)); - } -}; - -PolymorphicAction IncrementArg1() { - return MakePolymorphicAction(IncrementArg1Action()); -} - -... WillOnce(IncrementArg1()); -``` - -Our goal is to allow defining custom actions with the least amount of -boiler-plate C++ requires. - -## Solution ## - -We propose to introduce a new macro: -```cpp -ACTION(name) { statements; } -``` - -Using this in a namespace scope will define an action with the given -name that executes the statements. Inside the statements, you can -refer to the K-th (0-based) argument of the mock function as `argK`. -For example: -```cpp -ACTION(IncrementArg1) { return ++(*arg1); } -``` -allows you to write -```cpp -... WillOnce(IncrementArg1()); -``` - -Note that you don't need to specify the types of the mock function -arguments, as brevity is a top design goal here. Rest assured that -your code is still type-safe though: you'll get a compiler error if -`*arg1` doesn't support the `++` operator, or if the type of -`++(*arg1)` isn't compatible with the mock function's return type. - -Another example: -```cpp -ACTION(Foo) { - (*arg2)(5); - Blah(); - *arg1 = 0; - return arg0; -} -``` -defines an action `Foo()` that invokes argument #2 (a function pointer) -with 5, calls function `Blah()`, sets the value pointed to by argument -#1 to 0, and returns argument #0. - -For more convenience and flexibility, you can also use the following -pre-defined symbols in the body of `ACTION`: - -| Argument | Description | -|:----------------|:-------------------------------------------------------------| -| `argK_type` | The type of the K-th (0-based) argument of the mock function | -| `args` | All arguments of the mock function as a tuple | -| `args_type` | The type of all arguments of the mock function as a tuple | -| `return_type` | The return type of the mock function | -| `function_type` | The type of the mock function | - -For example, when using an `ACTION` as a stub action for mock function: -```cpp -int DoSomething(bool flag, int* ptr); -``` -we have: - -| **Pre-defined Symbol** | **Is Bound To** | -|:-----------------------|:----------------| -| `arg0` | the value of `flag` | -| `arg0_type` | the type `bool` | -| `arg1` | the value of `ptr` | -| `arg1_type` | the type `int*` | -| `args` | the tuple `(flag, ptr)` | -| `args_type` | the type `std::tr1::tuple` | -| `return_type` | the type `int` | -| `function_type` | the type `int(bool, int*)` | - -## Parameterized actions ## - -Sometimes you'll want to parameterize the action. For that we propose -another macro -```cpp -ACTION_P(name, param) { statements; } -``` - -For example, -```cpp -ACTION_P(Add, n) { return arg0 + n; } -``` -will allow you to write -```cpp -// Returns argument #0 + 5. -... WillOnce(Add(5)); -``` - -For convenience, we use the term _arguments_ for the values used to -invoke the mock function, and the term _parameters_ for the values -used to instantiate an action. - -Note that you don't need to provide the type of the parameter either. -Suppose the parameter is named `param`, you can also use the -Google-Mock-defined symbol `param_type` to refer to the type of the -parameter as inferred by the compiler. - -We will also provide `ACTION_P2`, `ACTION_P3`, and etc to support -multi-parameter actions. For example, -```cpp -ACTION_P2(ReturnDistanceTo, x, y) { - double dx = arg0 - x; - double dy = arg1 - y; - return sqrt(dx*dx + dy*dy); -} -``` -lets you write -```cpp -... WillOnce(ReturnDistanceTo(5.0, 26.5)); -``` - -You can view `ACTION` as a degenerated parameterized action where the -number of parameters is 0. - -## Advanced Usages ## - -### Overloading Actions ### - -You can easily define actions overloaded on the number of parameters: -```cpp -ACTION_P(Plus, a) { ... } -ACTION_P2(Plus, a, b) { ... } -``` - -### Restricting the Type of an Argument or Parameter ### - -For maximum brevity and reusability, the `ACTION*` macros don't let -you specify the types of the mock function arguments and the action -parameters. Instead, we let the compiler infer the types for us. - -Sometimes, however, we may want to be more explicit about the types. -There are several tricks to do that. For example: -```cpp -ACTION(Foo) { - // Makes sure arg0 can be converted to int. - int n = arg0; - ... use n instead of arg0 here ... -} - -ACTION_P(Bar, param) { - // Makes sure the type of arg1 is const char*. - ::testing::StaticAssertTypeEq(); - - // Makes sure param can be converted to bool. - bool flag = param; -} -``` -where `StaticAssertTypeEq` is a compile-time assertion we plan to add to -Google Test (the name is chosen to match `static_assert` in C++0x). - -### Using the ACTION Object's Type ### - -If you are writing a function that returns an `ACTION` object, you'll -need to know its type. The type depends on the macro used to define -the action and the parameter types. The rule is relatively simple: -| **Given Definition** | **Expression** | **Has Type** | -|:-------------------------|:-----------------------------|:-------------------------| -| `ACTION(Foo)` | `Foo()` | `FooAction` | -| `ACTION_P(Bar, param)` | `Bar(int_value)` | `BarActionP` | -| `ACTION_P2(Baz, p1, p2)` | `Baz(bool_value, int_value)` | `BazActionP2` | -| ... | ... | ... | - -Note that we have to pick different suffixes (`Action`, `ActionP`, -`ActionP2`, and etc) for actions with different numbers of parameters, -or the action definitions cannot be overloaded on the number of -parameters. - -## When to Use ## - -While the new macros are very convenient, please also consider other -means of implementing actions (e.g. via `ActionInterface` or -`MakePolymorphicAction()`), especially if you need to use the defined -action a lot. While the other approaches require more work, they give -you more control on the types of the mock function arguments and the -action parameters, which in general leads to better compiler error -messages that pay off in the long run. They also allow overloading -actions based on parameter types, as opposed to just the number of -parameters. - -## Related Work ## - -As you may have realized, the `ACTION*` macros resemble closures (also -known as lambda expressions or anonymous functions). Indeed, both of -them seek to lower the syntactic overhead for defining a function. - -C++0x will support lambdas, but they are not part of C++ right now. -Some non-standard libraries (most notably BLL or Boost Lambda Library) -try to alleviate this problem. However, they are not a good choice -for defining actions as: - - * They are non-standard and not widely installed. Google Mock only depends on standard libraries and `tr1::tuple`, which is part of the new C++ standard and comes with gcc 4+. We want to keep it that way. - * They are not trivial to learn. - * They will become obsolete when C++0x's lambda feature is widely supported. We don't want to make our users use a dying library. - * Since they are based on operators, they are rather ad hoc: you cannot use statements, and you cannot pass the lambda arguments to a function, for example. - * They have subtle semantics that easily confuses new users. For example, in expression `_1++ + foo++`, `foo` will be incremented only once where the expression is evaluated, while `_1` will be incremented every time the unnamed function is invoked. This is far from intuitive. - -`ACTION*` avoid all these problems. - -## Future Improvements ## - -There may be a need for composing `ACTION*` definitions (i.e. invoking -another `ACTION` inside the definition of one `ACTION*`). We are not -sure we want it yet, as one can get a similar effect by putting -`ACTION` definitions in function templates and composing the function -templates. We'll revisit this based on user feedback. - -The reason we don't allow `ACTION*()` inside a function body is that -the current C++ standard doesn't allow function-local types to be used -to instantiate templates. The upcoming C++0x standard will lift this -restriction. Once this feature is widely supported by compilers, we -can revisit the implementation and add support for using `ACTION*()` -inside a function. - -C++0x will also support lambda expressions. When they become -available, we may want to support using lambdas as actions. - -# Macros for Defining Matchers # - -Once the macros for defining actions are implemented, we plan to do -the same for matchers: - -```cpp -MATCHER(name) { statements; } -``` - -where you can refer to the value being matched as `arg`. For example, -given: - -```cpp -MATCHER(IsPositive) { return arg > 0; } -``` - -you can use `IsPositive()` as a matcher that matches a value iff it is -greater than 0. - -We will also add `MATCHER_P`, `MATCHER_P2`, and etc for parameterized -matchers. diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/Documentation.md b/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/Documentation.md deleted file mode 100644 index a42bd113..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/Documentation.md +++ /dev/null @@ -1,15 +0,0 @@ -This page lists all documentation markdown files for Google Mock **(the -current git version)** --- **if you use a former version of Google Mock, please read the -documentation for that specific version instead (e.g. by checking out -the respective git branch/tag).** - - * [ForDummies](ForDummies.md) -- start here if you are new to Google Mock. - * [CheatSheet](CheatSheet.md) -- a quick reference. - * [CookBook](CookBook.md) -- recipes for doing various tasks using Google Mock. - * [FrequentlyAskedQuestions](FrequentlyAskedQuestions.md) -- check here before asking a question on the mailing list. - -To contribute code to Google Mock, read: - - * [CONTRIBUTING](../../CONTRIBUTING.md) -- read this _before_ writing your first patch. - * [Pump Manual](../../googletest/docs/PumpManual.md) -- how we generate some of Google Mock's source files. diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/ForDummies.md b/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/ForDummies.md deleted file mode 100644 index e2a430f8..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/ForDummies.md +++ /dev/null @@ -1,447 +0,0 @@ - - -(**Note:** If you get compiler errors that you don't understand, be sure to consult [Google Mock Doctor](FrequentlyAskedQuestions.md#how-am-i-supposed-to-make-sense-of-these-horrible-template-errors).) - -# What Is Google C++ Mocking Framework? # -When you write a prototype or test, often it's not feasible or wise to rely on real objects entirely. A **mock object** implements the same interface as a real object (so it can be used as one), but lets you specify at run time how it will be used and what it should do (which methods will be called? in which order? how many times? with what arguments? what will they return? etc). - -**Note:** It is easy to confuse the term _fake objects_ with mock objects. Fakes and mocks actually mean very different things in the Test-Driven Development (TDD) community: - - * **Fake** objects have working implementations, but usually take some shortcut (perhaps to make the operations less expensive), which makes them not suitable for production. An in-memory file system would be an example of a fake. - * **Mocks** are objects pre-programmed with _expectations_, which form a specification of the calls they are expected to receive. - -If all this seems too abstract for you, don't worry - the most important thing to remember is that a mock allows you to check the _interaction_ between itself and code that uses it. The difference between fakes and mocks will become much clearer once you start to use mocks. - -**Google C++ Mocking Framework** (or **Google Mock** for short) is a library (sometimes we also call it a "framework" to make it sound cool) for creating mock classes and using them. It does to C++ what [jMock](http://www.jmock.org/) and [EasyMock](http://www.easymock.org/) do to Java. - -Using Google Mock involves three basic steps: - - 1. Use some simple macros to describe the interface you want to mock, and they will expand to the implementation of your mock class; - 1. Create some mock objects and specify its expectations and behavior using an intuitive syntax; - 1. Exercise code that uses the mock objects. Google Mock will catch any violation of the expectations as soon as it arises. - -# Why Google Mock? # -While mock objects help you remove unnecessary dependencies in tests and make them fast and reliable, using mocks manually in C++ is _hard_: - - * Someone has to implement the mocks. The job is usually tedious and error-prone. No wonder people go great distances to avoid it. - * The quality of those manually written mocks is a bit, uh, unpredictable. You may see some really polished ones, but you may also see some that were hacked up in a hurry and have all sorts of ad-hoc restrictions. - * The knowledge you gained from using one mock doesn't transfer to the next. - -In contrast, Java and Python programmers have some fine mock frameworks, which automate the creation of mocks. As a result, mocking is a proven effective technique and widely adopted practice in those communities. Having the right tool absolutely makes the difference. - -Google Mock was built to help C++ programmers. It was inspired by [jMock](http://www.jmock.org/) and [EasyMock](http://www.easymock.org/), but designed with C++'s specifics in mind. It is your friend if any of the following problems is bothering you: - - * You are stuck with a sub-optimal design and wish you had done more prototyping before it was too late, but prototyping in C++ is by no means "rapid". - * Your tests are slow as they depend on too many libraries or use expensive resources (e.g. a database). - * Your tests are brittle as some resources they use are unreliable (e.g. the network). - * You want to test how your code handles a failure (e.g. a file checksum error), but it's not easy to cause one. - * You need to make sure that your module interacts with other modules in the right way, but it's hard to observe the interaction; therefore you resort to observing the side effects at the end of the action, which is awkward at best. - * You want to "mock out" your dependencies, except that they don't have mock implementations yet; and, frankly, you aren't thrilled by some of those hand-written mocks. - -We encourage you to use Google Mock as: - - * a _design_ tool, for it lets you experiment with your interface design early and often. More iterations lead to better designs! - * a _testing_ tool to cut your tests' outbound dependencies and probe the interaction between your module and its collaborators. - -# Getting Started # -Using Google Mock is easy! Inside your C++ source file, just `#include` `"gtest/gtest.h"` and `"gmock/gmock.h"`, and you are ready to go. - -# A Case for Mock Turtles # -Let's look at an example. Suppose you are developing a graphics program that relies on a LOGO-like API for drawing. How would you test that it does the right thing? Well, you can run it and compare the screen with a golden screen snapshot, but let's admit it: tests like this are expensive to run and fragile (What if you just upgraded to a shiny new graphics card that has better anti-aliasing? Suddenly you have to update all your golden images.). It would be too painful if all your tests are like this. Fortunately, you learned about Dependency Injection and know the right thing to do: instead of having your application talk to the drawing API directly, wrap the API in an interface (say, `Turtle`) and code to that interface: - -```cpp -class Turtle { - ... - virtual ~Turtle() {} - virtual void PenUp() = 0; - virtual void PenDown() = 0; - virtual void Forward(int distance) = 0; - virtual void Turn(int degrees) = 0; - virtual void GoTo(int x, int y) = 0; - virtual int GetX() const = 0; - virtual int GetY() const = 0; -}; -``` - -(Note that the destructor of `Turtle` **must** be virtual, as is the case for **all** classes you intend to inherit from - otherwise the destructor of the derived class will not be called when you delete an object through a base pointer, and you'll get corrupted program states like memory leaks.) - -You can control whether the turtle's movement will leave a trace using `PenUp()` and `PenDown()`, and control its movement using `Forward()`, `Turn()`, and `GoTo()`. Finally, `GetX()` and `GetY()` tell you the current position of the turtle. - -Your program will normally use a real implementation of this interface. In tests, you can use a mock implementation instead. This allows you to easily check what drawing primitives your program is calling, with what arguments, and in which order. Tests written this way are much more robust (they won't break because your new machine does anti-aliasing differently), easier to read and maintain (the intent of a test is expressed in the code, not in some binary images), and run _much, much faster_. - -# Writing the Mock Class # -If you are lucky, the mocks you need to use have already been implemented by some nice people. If, however, you find yourself in the position to write a mock class, relax - Google Mock turns this task into a fun game! (Well, almost.) - -## How to Define It ## -Using the `Turtle` interface as example, here are the simple steps you need to follow: - - 1. Derive a class `MockTurtle` from `Turtle`. - 1. Take a _virtual_ function of `Turtle` (while it's possible to [mock non-virtual methods using templates](CookBook.md#mocking-nonvirtual-methods), it's much more involved). Count how many arguments it has. - 1. In the `public:` section of the child class, write `MOCK_METHODn();` (or `MOCK_CONST_METHODn();` if you are mocking a `const` method), where `n` is the number of the arguments; if you counted wrong, shame on you, and a compiler error will tell you so. - 1. Now comes the fun part: you take the function signature, cut-and-paste the _function name_ as the _first_ argument to the macro, and leave what's left as the _second_ argument (in case you're curious, this is the _type of the function_). - 1. Repeat until all virtual functions you want to mock are done. - -After the process, you should have something like: - -```cpp -#include "gmock/gmock.h" // Brings in Google Mock. -class MockTurtle : public Turtle { - public: - ... - MOCK_METHOD0(PenUp, void()); - MOCK_METHOD0(PenDown, void()); - MOCK_METHOD1(Forward, void(int distance)); - MOCK_METHOD1(Turn, void(int degrees)); - MOCK_METHOD2(GoTo, void(int x, int y)); - MOCK_CONST_METHOD0(GetX, int()); - MOCK_CONST_METHOD0(GetY, int()); -}; -``` - -You don't need to define these mock methods somewhere else - the `MOCK_METHOD*` macros will generate the definitions for you. It's that simple! Once you get the hang of it, you can pump out mock classes faster than your source-control system can handle your check-ins. - -**Tip:** If even this is too much work for you, you'll find the -`gmock_gen.py` tool in Google Mock's `scripts/generator/` directory (courtesy of the [cppclean](http://code.google.com/p/cppclean/) project) useful. This command-line -tool requires that you have Python 2.4 installed. You give it a C++ file and the name of an abstract class defined in it, -and it will print the definition of the mock class for you. Due to the -complexity of the C++ language, this script may not always work, but -it can be quite handy when it does. For more details, read the [user documentation](../scripts/generator/README). - -## Where to Put It ## -When you define a mock class, you need to decide where to put its definition. Some people put it in a `*_test.cc`. This is fine when the interface being mocked (say, `Foo`) is owned by the same person or team. Otherwise, when the owner of `Foo` changes it, your test could break. (You can't really expect `Foo`'s maintainer to fix every test that uses `Foo`, can you?) - -So, the rule of thumb is: if you need to mock `Foo` and it's owned by others, define the mock class in `Foo`'s package (better, in a `testing` sub-package such that you can clearly separate production code and testing utilities), and put it in a `mock_foo.h`. Then everyone can reference `mock_foo.h` from their tests. If `Foo` ever changes, there is only one copy of `MockFoo` to change, and only tests that depend on the changed methods need to be fixed. - -Another way to do it: you can introduce a thin layer `FooAdaptor` on top of `Foo` and code to this new interface. Since you own `FooAdaptor`, you can absorb changes in `Foo` much more easily. While this is more work initially, carefully choosing the adaptor interface can make your code easier to write and more readable (a net win in the long run), as you can choose `FooAdaptor` to fit your specific domain much better than `Foo` does. - -# Using Mocks in Tests # -Once you have a mock class, using it is easy. The typical work flow is: - - 1. Import the Google Mock names from the `testing` namespace such that you can use them unqualified (You only have to do it once per file. Remember that namespaces are a good idea and good for your health.). - 1. Create some mock objects. - 1. Specify your expectations on them (How many times will a method be called? With what arguments? What should it do? etc.). - 1. Exercise some code that uses the mocks; optionally, check the result using Google Test assertions. If a mock method is called more than expected or with wrong arguments, you'll get an error immediately. - 1. When a mock is destructed, Google Mock will automatically check whether all expectations on it have been satisfied. - -Here's an example: - -```cpp -#include "path/to/mock-turtle.h" -#include "gmock/gmock.h" -#include "gtest/gtest.h" -using ::testing::AtLeast; // #1 - -TEST(PainterTest, CanDrawSomething) { - MockTurtle turtle; // #2 - EXPECT_CALL(turtle, PenDown()) // #3 - .Times(AtLeast(1)); - - Painter painter(&turtle); // #4 - - EXPECT_TRUE(painter.DrawCircle(0, 0, 10)); -} // #5 - -int main(int argc, char** argv) { - // The following line must be executed to initialize Google Mock - // (and Google Test) before running the tests. - ::testing::InitGoogleMock(&argc, argv); - return RUN_ALL_TESTS(); -} -``` - -As you might have guessed, this test checks that `PenDown()` is called at least once. If the `painter` object didn't call this method, your test will fail with a message like this: - -``` -path/to/my_test.cc:119: Failure -Actual function call count doesn't match this expectation: -Actually: never called; -Expected: called at least once. -``` - -**Tip 1:** If you run the test from an Emacs buffer, you can hit `` on the line number displayed in the error message to jump right to the failed expectation. - -**Tip 2:** If your mock objects are never deleted, the final verification won't happen. Therefore it's a good idea to use a heap leak checker in your tests when you allocate mocks on the heap. - -**Important note:** Google Mock requires expectations to be set **before** the mock functions are called, otherwise the behavior is **undefined**. In particular, you mustn't interleave `EXPECT_CALL()`s and calls to the mock functions. - -This means `EXPECT_CALL()` should be read as expecting that a call will occur _in the future_, not that a call has occurred. Why does Google Mock work like that? Well, specifying the expectation beforehand allows Google Mock to report a violation as soon as it arises, when the context (stack trace, etc) is still available. This makes debugging much easier. - -Admittedly, this test is contrived and doesn't do much. You can easily achieve the same effect without using Google Mock. However, as we shall reveal soon, Google Mock allows you to do _much more_ with the mocks. - -## Using Google Mock with Any Testing Framework ## -If you want to use something other than Google Test (e.g. [CppUnit](http://sourceforge.net/projects/cppunit/) or -[CxxTest](https://cxxtest.com/)) as your testing framework, just change the `main()` function in the previous section to: -```cpp -int main(int argc, char** argv) { - // The following line causes Google Mock to throw an exception on failure, - // which will be interpreted by your testing framework as a test failure. - ::testing::GTEST_FLAG(throw_on_failure) = true; - ::testing::InitGoogleMock(&argc, argv); - ... whatever your testing framework requires ... -} -``` - -This approach has a catch: it makes Google Mock throw an exception -from a mock object's destructor sometimes. With some compilers, this -sometimes causes the test program to crash. You'll still be able to -notice that the test has failed, but it's not a graceful failure. - -A better solution is to use Google Test's -[event listener API](../../googletest/docs/advanced.md#extending-googletest-by-handling-test-events) -to report a test failure to your testing framework properly. You'll need to -implement the `OnTestPartResult()` method of the event listener interface, but it -should be straightforward. - -If this turns out to be too much work, we suggest that you stick with -Google Test, which works with Google Mock seamlessly (in fact, it is -technically part of Google Mock.). If there is a reason that you -cannot use Google Test, please let us know. - -# Setting Expectations # -The key to using a mock object successfully is to set the _right expectations_ on it. If you set the expectations too strict, your test will fail as the result of unrelated changes. If you set them too loose, bugs can slip through. You want to do it just right such that your test can catch exactly the kind of bugs you intend it to catch. Google Mock provides the necessary means for you to do it "just right." - -## General Syntax ## -In Google Mock we use the `EXPECT_CALL()` macro to set an expectation on a mock method. The general syntax is: - -```cpp -EXPECT_CALL(mock_object, method(matchers)) - .Times(cardinality) - .WillOnce(action) - .WillRepeatedly(action); -``` - -The macro has two arguments: first the mock object, and then the method and its arguments. Note that the two are separated by a comma (`,`), not a period (`.`). (Why using a comma? The answer is that it was necessary for technical reasons.) - -The macro can be followed by some optional _clauses_ that provide more information about the expectation. We'll discuss how each clause works in the coming sections. - -This syntax is designed to make an expectation read like English. For example, you can probably guess that - -```cpp -using ::testing::Return; -... -EXPECT_CALL(turtle, GetX()) - .Times(5) - .WillOnce(Return(100)) - .WillOnce(Return(150)) - .WillRepeatedly(Return(200)); -``` - -says that the `turtle` object's `GetX()` method will be called five times, it will return 100 the first time, 150 the second time, and then 200 every time. Some people like to call this style of syntax a Domain-Specific Language (DSL). - -**Note:** Why do we use a macro to do this? It serves two purposes: first it makes expectations easily identifiable (either by `grep` or by a human reader), and second it allows Google Mock to include the source file location of a failed expectation in messages, making debugging easier. - -## Matchers: What Arguments Do We Expect? ## -When a mock function takes arguments, we must specify what arguments we are expecting; for example: - -```cpp -// Expects the turtle to move forward by 100 units. -EXPECT_CALL(turtle, Forward(100)); -``` - -Sometimes you may not want to be too specific (Remember that talk about tests being too rigid? Over specification leads to brittle tests and obscures the intent of tests. Therefore we encourage you to specify only what's necessary - no more, no less.). If you care to check that `Forward()` will be called but aren't interested in its actual argument, write `_` as the argument, which means "anything goes": - -```cpp -using ::testing::_; -... -// Expects the turtle to move forward. -EXPECT_CALL(turtle, Forward(_)); -``` - -`_` is an instance of what we call **matchers**. A matcher is like a predicate and can test whether an argument is what we'd expect. You can use a matcher inside `EXPECT_CALL()` wherever a function argument is expected. - -A list of built-in matchers can be found in the [CheatSheet](CheatSheet.md). For example, here's the `Ge` (greater than or equal) matcher: - -```cpp -using ::testing::Ge; -... -EXPECT_CALL(turtle, Forward(Ge(100))); -``` - -This checks that the turtle will be told to go forward by at least 100 units. - -## Cardinalities: How Many Times Will It Be Called? ## -The first clause we can specify following an `EXPECT_CALL()` is `Times()`. We call its argument a **cardinality** as it tells _how many times_ the call should occur. It allows us to repeat an expectation many times without actually writing it as many times. More importantly, a cardinality can be "fuzzy", just like a matcher can be. This allows a user to express the intent of a test exactly. - -An interesting special case is when we say `Times(0)`. You may have guessed - it means that the function shouldn't be called with the given arguments at all, and Google Mock will report a Google Test failure whenever the function is (wrongfully) called. - -We've seen `AtLeast(n)` as an example of fuzzy cardinalities earlier. For the list of built-in cardinalities you can use, see the [CheatSheet](CheatSheet.md). - -The `Times()` clause can be omitted. **If you omit `Times()`, Google Mock will infer the cardinality for you.** The rules are easy to remember: - - * If **neither** `WillOnce()` **nor** `WillRepeatedly()` is in the `EXPECT_CALL()`, the inferred cardinality is `Times(1)`. - * If there are `n WillOnce()`'s but **no** `WillRepeatedly()`, where `n` >= 1, the cardinality is `Times(n)`. - * If there are `n WillOnce()`'s and **one** `WillRepeatedly()`, where `n` >= 0, the cardinality is `Times(AtLeast(n))`. - -**Quick quiz:** what do you think will happen if a function is expected to be called twice but actually called four times? - -## Actions: What Should It Do? ## -Remember that a mock object doesn't really have a working implementation? We as users have to tell it what to do when a method is invoked. This is easy in Google Mock. - -First, if the return type of a mock function is a built-in type or a pointer, the function has a **default action** (a `void` function will just return, a `bool` function will return `false`, and other functions will return 0). In addition, in C++ 11 and above, a mock function whose return type is default-constructible (i.e. has a default constructor) has a default action of returning a default-constructed value. If you don't say anything, this behavior will be used. - -Second, if a mock function doesn't have a default action, or the default action doesn't suit you, you can specify the action to be taken each time the expectation matches using a series of `WillOnce()` clauses followed by an optional `WillRepeatedly()`. For example, - -```cpp -using ::testing::Return; -... -EXPECT_CALL(turtle, GetX()) - .WillOnce(Return(100)) - .WillOnce(Return(200)) - .WillOnce(Return(300)); -``` - -This says that `turtle.GetX()` will be called _exactly three times_ (Google Mock inferred this from how many `WillOnce()` clauses we've written, since we didn't explicitly write `Times()`), and will return 100, 200, and 300 respectively. - -```cpp -using ::testing::Return; -... -EXPECT_CALL(turtle, GetY()) - .WillOnce(Return(100)) - .WillOnce(Return(200)) - .WillRepeatedly(Return(300)); -``` - -says that `turtle.GetY()` will be called _at least twice_ (Google Mock knows this as we've written two `WillOnce()` clauses and a `WillRepeatedly()` while having no explicit `Times()`), will return 100 the first time, 200 the second time, and 300 from the third time on. - -Of course, if you explicitly write a `Times()`, Google Mock will not try to infer the cardinality itself. What if the number you specified is larger than there are `WillOnce()` clauses? Well, after all `WillOnce()`s are used up, Google Mock will do the _default_ action for the function every time (unless, of course, you have a `WillRepeatedly()`.). - -What can we do inside `WillOnce()` besides `Return()`? You can return a reference using `ReturnRef(variable)`, or invoke a pre-defined function, among [others](CheatSheet.md#actions). - -**Important note:** The `EXPECT_CALL()` statement evaluates the action clause only once, even though the action may be performed many times. Therefore you must be careful about side effects. The following may not do what you want: - -```cpp -int n = 100; -EXPECT_CALL(turtle, GetX()) -.Times(4) -.WillRepeatedly(Return(n++)); -``` - -Instead of returning 100, 101, 102, ..., consecutively, this mock function will always return 100 as `n++` is only evaluated once. Similarly, `Return(new Foo)` will create a new `Foo` object when the `EXPECT_CALL()` is executed, and will return the same pointer every time. If you want the side effect to happen every time, you need to define a custom action, which we'll teach in the [CookBook](CookBook.md). - -Time for another quiz! What do you think the following means? - -```cpp -using ::testing::Return; -... -EXPECT_CALL(turtle, GetY()) -.Times(4) -.WillOnce(Return(100)); -``` - -Obviously `turtle.GetY()` is expected to be called four times. But if you think it will return 100 every time, think twice! Remember that one `WillOnce()` clause will be consumed each time the function is invoked and the default action will be taken afterwards. So the right answer is that `turtle.GetY()` will return 100 the first time, but **return 0 from the second time on**, as returning 0 is the default action for `int` functions. - -## Using Multiple Expectations ## -So far we've only shown examples where you have a single expectation. More realistically, you're going to specify expectations on multiple mock methods, which may be from multiple mock objects. - -By default, when a mock method is invoked, Google Mock will search the expectations in the **reverse order** they are defined, and stop when an active expectation that matches the arguments is found (you can think of it as "newer rules override older ones."). If the matching expectation cannot take any more calls, you will get an upper-bound-violated failure. Here's an example: - -```cpp -using ::testing::_; -... -EXPECT_CALL(turtle, Forward(_)); // #1 -EXPECT_CALL(turtle, Forward(10)) // #2 - .Times(2); -``` - -If `Forward(10)` is called three times in a row, the third time it will be an error, as the last matching expectation (#2) has been saturated. If, however, the third `Forward(10)` call is replaced by `Forward(20)`, then it would be OK, as now #1 will be the matching expectation. - -**Side note:** Why does Google Mock search for a match in the _reverse_ order of the expectations? The reason is that this allows a user to set up the default expectations in a mock object's constructor or the test fixture's set-up phase and then customize the mock by writing more specific expectations in the test body. So, if you have two expectations on the same method, you want to put the one with more specific matchers **after** the other, or the more specific rule would be shadowed by the more general one that comes after it. - -## Ordered vs Unordered Calls ## -By default, an expectation can match a call even though an earlier expectation hasn't been satisfied. In other words, the calls don't have to occur in the order the expectations are specified. - -Sometimes, you may want all the expected calls to occur in a strict order. To say this in Google Mock is easy: - -```cpp -using ::testing::InSequence; -... -TEST(FooTest, DrawsLineSegment) { - ... - { - InSequence dummy; - - EXPECT_CALL(turtle, PenDown()); - EXPECT_CALL(turtle, Forward(100)); - EXPECT_CALL(turtle, PenUp()); - } - Foo(); -} -``` - -By creating an object of type `InSequence`, all expectations in its scope are put into a _sequence_ and have to occur _sequentially_. Since we are just relying on the constructor and destructor of this object to do the actual work, its name is really irrelevant. - -In this example, we test that `Foo()` calls the three expected functions in the order as written. If a call is made out-of-order, it will be an error. - -(What if you care about the relative order of some of the calls, but not all of them? Can you specify an arbitrary partial order? The answer is ... yes! If you are impatient, the details can be found in the [CookBook](CookBook.md#expecting-partially-ordered-calls).) - -## All Expectations Are Sticky (Unless Said Otherwise) ## -Now let's do a quick quiz to see how well you can use this mock stuff already. How would you test that the turtle is asked to go to the origin _exactly twice_ (you want to ignore any other instructions it receives)? - -After you've come up with your answer, take a look at ours and compare notes (solve it yourself first - don't cheat!): - -```cpp -using ::testing::_; -... -EXPECT_CALL(turtle, GoTo(_, _)) // #1 - .Times(AnyNumber()); -EXPECT_CALL(turtle, GoTo(0, 0)) // #2 - .Times(2); -``` - -Suppose `turtle.GoTo(0, 0)` is called three times. In the third time, Google Mock will see that the arguments match expectation #2 (remember that we always pick the last matching expectation). Now, since we said that there should be only two such calls, Google Mock will report an error immediately. This is basically what we've told you in the "Using Multiple Expectations" section above. - -This example shows that **expectations in Google Mock are "sticky" by default**, in the sense that they remain active even after we have reached their invocation upper bounds. This is an important rule to remember, as it affects the meaning of the spec, and is **different** to how it's done in many other mocking frameworks (Why'd we do that? Because we think our rule makes the common cases easier to express and understand.). - -Simple? Let's see if you've really understood it: what does the following code say? - -```cpp -using ::testing::Return; -... -for (int i = n; i > 0; i--) { - EXPECT_CALL(turtle, GetX()) - .WillOnce(Return(10*i)); -} -``` - -If you think it says that `turtle.GetX()` will be called `n` times and will return 10, 20, 30, ..., consecutively, think twice! The problem is that, as we said, expectations are sticky. So, the second time `turtle.GetX()` is called, the last (latest) `EXPECT_CALL()` statement will match, and will immediately lead to an "upper bound exceeded" error - this piece of code is not very useful! - -One correct way of saying that `turtle.GetX()` will return 10, 20, 30, ..., is to explicitly say that the expectations are _not_ sticky. In other words, they should _retire_ as soon as they are saturated: - -```cpp -using ::testing::Return; -... -for (int i = n; i > 0; i--) { - EXPECT_CALL(turtle, GetX()) - .WillOnce(Return(10*i)) - .RetiresOnSaturation(); -} -``` - -And, there's a better way to do it: in this case, we expect the calls to occur in a specific order, and we line up the actions to match the order. Since the order is important here, we should make it explicit using a sequence: - -```cpp -using ::testing::InSequence; -using ::testing::Return; -... -{ - InSequence s; - - for (int i = 1; i <= n; i++) { - EXPECT_CALL(turtle, GetX()) - .WillOnce(Return(10*i)) - .RetiresOnSaturation(); - } -} -``` - -By the way, the other situation where an expectation may _not_ be sticky is when it's in a sequence - as soon as another expectation that comes after it in the sequence has been used, it automatically retires (and will never be used to match any call). - -## Uninteresting Calls ## -A mock object may have many methods, and not all of them are that interesting. For example, in some tests we may not care about how many times `GetX()` and `GetY()` get called. - -In Google Mock, if you are not interested in a method, just don't say anything about it. If a call to this method occurs, you'll see a warning in the test output, but it won't be a failure. - -# What Now? # -Congratulations! You've learned enough about Google Mock to start using it. Now, you might want to join the [googlemock](http://groups.google.com/group/googlemock) discussion group and actually write some tests using Google Mock - it will be fun. Hey, it may even be addictive - you've been warned. - -Then, if you feel like increasing your mock quotient, you should move on to the [CookBook](CookBook.md). You can learn many advanced features of Google Mock there -- and advance your level of enjoyment and testing bliss. diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/FrequentlyAskedQuestions.md b/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/FrequentlyAskedQuestions.md deleted file mode 100644 index e91f038c..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/FrequentlyAskedQuestions.md +++ /dev/null @@ -1,627 +0,0 @@ - - -Please send your questions to the -[googlemock](http://groups.google.com/group/googlemock) discussion -group. If you need help with compiler errors, make sure you have -tried [Google Mock Doctor](#how-am-i-supposed-to-make-sense-of-these-horrible-template-errors) first. - -## When I call a method on my mock object, the method for the real object is invoked instead. What's the problem? ## - -In order for a method to be mocked, it must be _virtual_, unless you use the [high-perf dependency injection technique](CookBook.md#mocking-nonvirtual-methods). - -## I wrote some matchers. After I upgraded to a new version of Google Mock, they no longer compile. What's going on? ## - -After version 1.4.0 of Google Mock was released, we had an idea on how -to make it easier to write matchers that can generate informative -messages efficiently. We experimented with this idea and liked what -we saw. Therefore we decided to implement it. - -Unfortunately, this means that if you have defined your own matchers -by implementing `MatcherInterface` or using `MakePolymorphicMatcher()`, -your definitions will no longer compile. Matchers defined using the -`MATCHER*` family of macros are not affected. - -Sorry for the hassle if your matchers are affected. We believe it's -in everyone's long-term interest to make this change sooner than -later. Fortunately, it's usually not hard to migrate an existing -matcher to the new API. Here's what you need to do: - -If you wrote your matcher like this: -```cpp -// Old matcher definition that doesn't work with the latest -// Google Mock. -using ::testing::MatcherInterface; -... -class MyWonderfulMatcher : public MatcherInterface { - public: - ... - virtual bool Matches(MyType value) const { - // Returns true if value matches. - return value.GetFoo() > 5; - } - ... -}; -``` - -you'll need to change it to: -```cpp -// New matcher definition that works with the latest Google Mock. -using ::testing::MatcherInterface; -using ::testing::MatchResultListener; -... -class MyWonderfulMatcher : public MatcherInterface { - public: - ... - virtual bool MatchAndExplain(MyType value, - MatchResultListener* listener) const { - // Returns true if value matches. - return value.GetFoo() > 5; - } - ... -}; -``` -(i.e. rename `Matches()` to `MatchAndExplain()` and give it a second -argument of type `MatchResultListener*`.) - -If you were also using `ExplainMatchResultTo()` to improve the matcher -message: -```cpp -// Old matcher definition that doesn't work with the lastest -// Google Mock. -using ::testing::MatcherInterface; -... -class MyWonderfulMatcher : public MatcherInterface { - public: - ... - virtual bool Matches(MyType value) const { - // Returns true if value matches. - return value.GetFoo() > 5; - } - - virtual void ExplainMatchResultTo(MyType value, - ::std::ostream* os) const { - // Prints some helpful information to os to help - // a user understand why value matches (or doesn't match). - *os << "the Foo property is " << value.GetFoo(); - } - ... -}; -``` - -you should move the logic of `ExplainMatchResultTo()` into -`MatchAndExplain()`, using the `MatchResultListener` argument where -the `::std::ostream` was used: -```cpp -// New matcher definition that works with the latest Google Mock. -using ::testing::MatcherInterface; -using ::testing::MatchResultListener; -... -class MyWonderfulMatcher : public MatcherInterface { - public: - ... - virtual bool MatchAndExplain(MyType value, - MatchResultListener* listener) const { - // Returns true if value matches. - *listener << "the Foo property is " << value.GetFoo(); - return value.GetFoo() > 5; - } - ... -}; -``` - -If your matcher is defined using `MakePolymorphicMatcher()`: -```cpp -// Old matcher definition that doesn't work with the latest -// Google Mock. -using ::testing::MakePolymorphicMatcher; -... -class MyGreatMatcher { - public: - ... - bool Matches(MyType value) const { - // Returns true if value matches. - return value.GetBar() < 42; - } - ... -}; -... MakePolymorphicMatcher(MyGreatMatcher()) ... -``` - -you should rename the `Matches()` method to `MatchAndExplain()` and -add a `MatchResultListener*` argument (the same as what you need to do -for matchers defined by implementing `MatcherInterface`): -```cpp -// New matcher definition that works with the latest Google Mock. -using ::testing::MakePolymorphicMatcher; -using ::testing::MatchResultListener; -... -class MyGreatMatcher { - public: - ... - bool MatchAndExplain(MyType value, - MatchResultListener* listener) const { - // Returns true if value matches. - return value.GetBar() < 42; - } - ... -}; -... MakePolymorphicMatcher(MyGreatMatcher()) ... -``` - -If your polymorphic matcher uses `ExplainMatchResultTo()` for better -failure messages: -```cpp -// Old matcher definition that doesn't work with the latest -// Google Mock. -using ::testing::MakePolymorphicMatcher; -... -class MyGreatMatcher { - public: - ... - bool Matches(MyType value) const { - // Returns true if value matches. - return value.GetBar() < 42; - } - ... -}; -void ExplainMatchResultTo(const MyGreatMatcher& matcher, - MyType value, - ::std::ostream* os) { - // Prints some helpful information to os to help - // a user understand why value matches (or doesn't match). - *os << "the Bar property is " << value.GetBar(); -} -... MakePolymorphicMatcher(MyGreatMatcher()) ... -``` - -you'll need to move the logic inside `ExplainMatchResultTo()` to -`MatchAndExplain()`: -```cpp -// New matcher definition that works with the latest Google Mock. -using ::testing::MakePolymorphicMatcher; -using ::testing::MatchResultListener; -... -class MyGreatMatcher { - public: - ... - bool MatchAndExplain(MyType value, - MatchResultListener* listener) const { - // Returns true if value matches. - *listener << "the Bar property is " << value.GetBar(); - return value.GetBar() < 42; - } - ... -}; -... MakePolymorphicMatcher(MyGreatMatcher()) ... -``` - -For more information, you can read these -[two](CookBook.md#writing-new-monomorphic-matchers) -[recipes](CookBook.md#writing-new-polymorphic-matchers) -from the cookbook. As always, you -are welcome to post questions on `googlemock@googlegroups.com` if you -need any help. - -## When using Google Mock, do I have to use Google Test as the testing framework? I have my favorite testing framework and don't want to switch. ## - -Google Mock works out of the box with Google Test. However, it's easy -to configure it to work with any testing framework of your choice. -[Here](ForDummies.md#using-google-mock-with-any-testing-framework) is how. - -## How am I supposed to make sense of these horrible template errors? ## - -If you are confused by the compiler errors gcc threw at you, -try consulting the _Google Mock Doctor_ tool first. What it does is to -scan stdin for gcc error messages, and spit out diagnoses on the -problems (we call them diseases) your code has. - -To "install", run command: -``` -alias gmd='/scripts/gmock_doctor.py' -``` - -To use it, do: -``` - 2>&1 | gmd -``` - -For example: -``` -make my_test 2>&1 | gmd -``` - -Or you can run `gmd` and copy-n-paste gcc's error messages to it. - -## Can I mock a variadic function? ## - -You cannot mock a variadic function (i.e. a function taking ellipsis -(`...`) arguments) directly in Google Mock. - -The problem is that in general, there is _no way_ for a mock object to -know how many arguments are passed to the variadic method, and what -the arguments' types are. Only the _author of the base class_ knows -the protocol, and we cannot look into their head. - -Therefore, to mock such a function, the _user_ must teach the mock -object how to figure out the number of arguments and their types. One -way to do it is to provide overloaded versions of the function. - -Ellipsis arguments are inherited from C and not really a C++ feature. -They are unsafe to use and don't work with arguments that have -constructors or destructors. Therefore we recommend to avoid them in -C++ as much as possible. - -## MSVC gives me warning C4301 or C4373 when I define a mock method with a const parameter. Why? ## - -If you compile this using Microsoft Visual C++ 2005 SP1: -```cpp -class Foo { - ... - virtual void Bar(const int i) = 0; -}; - -class MockFoo : public Foo { - ... - MOCK_METHOD1(Bar, void(const int i)); -}; -``` -You may get the following warning: -``` -warning C4301: 'MockFoo::Bar': overriding virtual function only differs from 'Foo::Bar' by const/volatile qualifier -``` - -This is a MSVC bug. The same code compiles fine with gcc ,for -example. If you use Visual C++ 2008 SP1, you would get the warning: -``` -warning C4373: 'MockFoo::Bar': virtual function overrides 'Foo::Bar', previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers -``` - -In C++, if you _declare_ a function with a `const` parameter, the -`const` modifier is _ignored_. Therefore, the `Foo` base class above -is equivalent to: -```cpp -class Foo { - ... - virtual void Bar(int i) = 0; // int or const int? Makes no difference. -}; -``` - -In fact, you can _declare_ Bar() with an `int` parameter, and _define_ -it with a `const int` parameter. The compiler will still match them -up. - -Since making a parameter `const` is meaningless in the method -_declaration_, we recommend to remove it in both `Foo` and `MockFoo`. -That should workaround the VC bug. - -Note that we are talking about the _top-level_ `const` modifier here. -If the function parameter is passed by pointer or reference, declaring -the _pointee_ or _referee_ as `const` is still meaningful. For -example, the following two declarations are _not_ equivalent: -```cpp -void Bar(int* p); // Neither p nor *p is const. -void Bar(const int* p); // p is not const, but *p is. -``` - -## I have a huge mock class, and Microsoft Visual C++ runs out of memory when compiling it. What can I do? ## - -We've noticed that when the `/clr` compiler flag is used, Visual C++ -uses 5~6 times as much memory when compiling a mock class. We suggest -to avoid `/clr` when compiling native C++ mocks. - -## I can't figure out why Google Mock thinks my expectations are not satisfied. What should I do? ## - -You might want to run your test with -`--gmock_verbose=info`. This flag lets Google Mock print a trace -of every mock function call it receives. By studying the trace, -you'll gain insights on why the expectations you set are not met. - -## How can I assert that a function is NEVER called? ## - -```cpp -EXPECT_CALL(foo, Bar(_)) - .Times(0); -``` - -## I have a failed test where Google Mock tells me TWICE that a particular expectation is not satisfied. Isn't this redundant? ## - -When Google Mock detects a failure, it prints relevant information -(the mock function arguments, the state of relevant expectations, and -etc) to help the user debug. If another failure is detected, Google -Mock will do the same, including printing the state of relevant -expectations. - -Sometimes an expectation's state didn't change between two failures, -and you'll see the same description of the state twice. They are -however _not_ redundant, as they refer to _different points in time_. -The fact they are the same _is_ interesting information. - -## I get a heap check failure when using a mock object, but using a real object is fine. What can be wrong? ## - -Does the class (hopefully a pure interface) you are mocking have a -virtual destructor? - -Whenever you derive from a base class, make sure its destructor is -virtual. Otherwise Bad Things will happen. Consider the following -code: - -```cpp -class Base { - public: - // Not virtual, but should be. - ~Base() { ... } - ... -}; - -class Derived : public Base { - public: - ... - private: - std::string value_; -}; - -... - Base* p = new Derived; - ... - delete p; // Surprise! ~Base() will be called, but ~Derived() will not - // - value_ is leaked. -``` - -By changing `~Base()` to virtual, `~Derived()` will be correctly -called when `delete p` is executed, and the heap checker -will be happy. - -## The "newer expectations override older ones" rule makes writing expectations awkward. Why does Google Mock do that? ## - -When people complain about this, often they are referring to code like: - -```cpp -// foo.Bar() should be called twice, return 1 the first time, and return -// 2 the second time. However, I have to write the expectations in the -// reverse order. This sucks big time!!! -EXPECT_CALL(foo, Bar()) - .WillOnce(Return(2)) - .RetiresOnSaturation(); -EXPECT_CALL(foo, Bar()) - .WillOnce(Return(1)) - .RetiresOnSaturation(); -``` - -The problem is that they didn't pick the **best** way to express the test's -intent. - -By default, expectations don't have to be matched in _any_ particular -order. If you want them to match in a certain order, you need to be -explicit. This is Google Mock's (and jMock's) fundamental philosophy: it's -easy to accidentally over-specify your tests, and we want to make it -harder to do so. - -There are two better ways to write the test spec. You could either -put the expectations in sequence: - -```cpp -// foo.Bar() should be called twice, return 1 the first time, and return -// 2 the second time. Using a sequence, we can write the expectations -// in their natural order. -{ - InSequence s; - EXPECT_CALL(foo, Bar()) - .WillOnce(Return(1)) - .RetiresOnSaturation(); - EXPECT_CALL(foo, Bar()) - .WillOnce(Return(2)) - .RetiresOnSaturation(); -} -``` - -or you can put the sequence of actions in the same expectation: - -```cpp -// foo.Bar() should be called twice, return 1 the first time, and return -// 2 the second time. -EXPECT_CALL(foo, Bar()) - .WillOnce(Return(1)) - .WillOnce(Return(2)) - .RetiresOnSaturation(); -``` - -Back to the original questions: why does Google Mock search the -expectations (and `ON_CALL`s) from back to front? Because this -allows a user to set up a mock's behavior for the common case early -(e.g. in the mock's constructor or the test fixture's set-up phase) -and customize it with more specific rules later. If Google Mock -searches from front to back, this very useful pattern won't be -possible. - -## Google Mock prints a warning when a function without EXPECT\_CALL is called, even if I have set its behavior using ON\_CALL. Would it be reasonable not to show the warning in this case? ## - -When choosing between being neat and being safe, we lean toward the -latter. So the answer is that we think it's better to show the -warning. - -Often people write `ON_CALL`s in the mock object's -constructor or `SetUp()`, as the default behavior rarely changes from -test to test. Then in the test body they set the expectations, which -are often different for each test. Having an `ON_CALL` in the set-up -part of a test doesn't mean that the calls are expected. If there's -no `EXPECT_CALL` and the method is called, it's possibly an error. If -we quietly let the call go through without notifying the user, bugs -may creep in unnoticed. - -If, however, you are sure that the calls are OK, you can write - -```cpp -EXPECT_CALL(foo, Bar(_)) - .WillRepeatedly(...); -``` - -instead of - -```cpp -ON_CALL(foo, Bar(_)) - .WillByDefault(...); -``` - -This tells Google Mock that you do expect the calls and no warning should be -printed. - -Also, you can control the verbosity using the `--gmock_verbose` flag. -If you find the output too noisy when debugging, just choose a less -verbose level. - -## How can I delete the mock function's argument in an action? ## - -If you find yourself needing to perform some action that's not -supported by Google Mock directly, remember that you can define your own -actions using -[MakeAction()](CookBook.md#writing-new-actions-quickly) or -[MakePolymorphicAction()](CookBook.md#writing-new-polymorphic-actions), -or you can write a stub function and invoke it using -[Invoke()](CookBook.md#using-functionsmethodsfunctors-as-actions). - -## MOCK\_METHODn()'s second argument looks funny. Why don't you use the MOCK\_METHODn(Method, return\_type, arg\_1, ..., arg\_n) syntax? ## - -What?! I think it's beautiful. :-) - -While which syntax looks more natural is a subjective matter to some -extent, Google Mock's syntax was chosen for several practical advantages it -has. - -Try to mock a function that takes a map as an argument: -```cpp -virtual int GetSize(const map& m); -``` - -Using the proposed syntax, it would be: -```cpp -MOCK_METHOD1(GetSize, int, const map& m); -``` - -Guess what? You'll get a compiler error as the compiler thinks that -`const map& m` are **two**, not one, arguments. To work -around this you can use `typedef` to give the map type a name, but -that gets in the way of your work. Google Mock's syntax avoids this -problem as the function's argument types are protected inside a pair -of parentheses: -```cpp -// This compiles fine. -MOCK_METHOD1(GetSize, int(const map& m)); -``` - -You still need a `typedef` if the return type contains an unprotected -comma, but that's much rarer. - -Other advantages include: - 1. `MOCK_METHOD1(Foo, int, bool)` can leave a reader wonder whether the method returns `int` or `bool`, while there won't be such confusion using Google Mock's syntax. - 1. The way Google Mock describes a function type is nothing new, although many people may not be familiar with it. The same syntax was used in C, and the `function` library in `tr1` uses this syntax extensively. Since `tr1` will become a part of the new version of STL, we feel very comfortable to be consistent with it. - 1. The function type syntax is also used in other parts of Google Mock's API (e.g. the action interface) in order to make the implementation tractable. A user needs to learn it anyway in order to utilize Google Mock's more advanced features. We'd as well stick to the same syntax in `MOCK_METHOD*`! - -## My code calls a static/global function. Can I mock it? ## - -You can, but you need to make some changes. - -In general, if you find yourself needing to mock a static function, -it's a sign that your modules are too tightly coupled (and less -flexible, less reusable, less testable, etc). You are probably better -off defining a small interface and call the function through that -interface, which then can be easily mocked. It's a bit of work -initially, but usually pays for itself quickly. - -This Google Testing Blog -[post](https://testing.googleblog.com/2008/06/defeat-static-cling.html) -says it excellently. Check it out. - -## My mock object needs to do complex stuff. It's a lot of pain to specify the actions. Google Mock sucks! ## - -I know it's not a question, but you get an answer for free any way. :-) - -With Google Mock, you can create mocks in C++ easily. And people might be -tempted to use them everywhere. Sometimes they work great, and -sometimes you may find them, well, a pain to use. So, what's wrong in -the latter case? - -When you write a test without using mocks, you exercise the code and -assert that it returns the correct value or that the system is in an -expected state. This is sometimes called "state-based testing". - -Mocks are great for what some call "interaction-based" testing: -instead of checking the system state at the very end, mock objects -verify that they are invoked the right way and report an error as soon -as it arises, giving you a handle on the precise context in which the -error was triggered. This is often more effective and economical to -do than state-based testing. - -If you are doing state-based testing and using a test double just to -simulate the real object, you are probably better off using a fake. -Using a mock in this case causes pain, as it's not a strong point for -mocks to perform complex actions. If you experience this and think -that mocks suck, you are just not using the right tool for your -problem. Or, you might be trying to solve the wrong problem. :-) - -## I got a warning "Uninteresting function call encountered - default action taken.." Should I panic? ## - -By all means, NO! It's just an FYI. - -What it means is that you have a mock function, you haven't set any -expectations on it (by Google Mock's rule this means that you are not -interested in calls to this function and therefore it can be called -any number of times), and it is called. That's OK - you didn't say -it's not OK to call the function! - -What if you actually meant to disallow this function to be called, but -forgot to write `EXPECT_CALL(foo, Bar()).Times(0)`? While -one can argue that it's the user's fault, Google Mock tries to be nice and -prints you a note. - -So, when you see the message and believe that there shouldn't be any -uninteresting calls, you should investigate what's going on. To make -your life easier, Google Mock prints the function name and arguments -when an uninteresting call is encountered. - -## I want to define a custom action. Should I use Invoke() or implement the action interface? ## - -Either way is fine - you want to choose the one that's more convenient -for your circumstance. - -Usually, if your action is for a particular function type, defining it -using `Invoke()` should be easier; if your action can be used in -functions of different types (e.g. if you are defining -`Return(value)`), `MakePolymorphicAction()` is -easiest. Sometimes you want precise control on what types of -functions the action can be used in, and implementing -`ActionInterface` is the way to go here. See the implementation of -`Return()` in `include/gmock/gmock-actions.h` for an example. - -## I'm using the set-argument-pointee action, and the compiler complains about "conflicting return type specified". What does it mean? ## - -You got this error as Google Mock has no idea what value it should return -when the mock method is called. `SetArgPointee()` says what the -side effect is, but doesn't say what the return value should be. You -need `DoAll()` to chain a `SetArgPointee()` with a `Return()`. - -See this [recipe](CookBook.md#mocking-side-effects) for more details and an example. - - -## My question is not in your FAQ! ## - -If you cannot find the answer to your question in this FAQ, there are -some other resources you can use: - - 1. search the mailing list [archive](http://groups.google.com/group/googlemock/topics), - 1. ask it on [googlemock@googlegroups.com](mailto:googlemock@googlegroups.com) and someone will answer it (to prevent spam, we require you to join the [discussion group](http://groups.google.com/group/googlemock) before you can post.). - -Please note that creating an issue in the -[issue tracker](https://github.com/google/googletest/issues) is _not_ -a good way to get your answer, as it is monitored infrequently by a -very small number of people. - -When asking a question, it's helpful to provide as much of the -following information as possible (people cannot help you if there's -not enough information in your question): - - * the version (or the revision number if you check out from SVN directly) of Google Mock you use (Google Mock is under active development, so it's possible that your problem has been solved in a later version), - * your operating system, - * the name and version of your compiler, - * the complete command line flags you give to your compiler, - * the complete compiler error messages (if the question is about compilation), - * the _actual_ code (ideally, a minimal but complete program) that has the problem you encounter. diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/KnownIssues.md b/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/KnownIssues.md deleted file mode 100644 index adadf514..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/docs/KnownIssues.md +++ /dev/null @@ -1,19 +0,0 @@ -As any non-trivial software system, Google Mock has some known limitations and problems. We are working on improving it, and welcome your help! The follow is a list of issues we know about. - - - -## README contains outdated information on Google Mock's compatibility with other testing frameworks ## - -The `README` file in release 1.1.0 still says that Google Mock only works with Google Test. Actually, you can configure Google Mock to work with any testing framework you choose. - -## Tests failing on machines using Power PC CPUs (e.g. some Macs) ## - -`gmock_output_test` and `gmock-printers_test` are known to fail with Power PC CPUs. This is due to portability issues with these tests, and is not an indication of problems in Google Mock itself. You can safely ignore them. - -## Failed to resolve libgtest.so.0 in tests when built against installed Google Test ## - -This only applies if you manually built and installed Google Test, and then built a Google Mock against it (either explicitly, or because gtest-config was in your path post-install). In this situation, Libtool has a known issue with certain systems' ldconfig setup: - -http://article.gmane.org/gmane.comp.sysutils.automake.general/9025 - -This requires a manual run of "sudo ldconfig" after the "sudo make install" for Google Test before any binaries which link against it can be executed. This isn't a bug in our install, but we should at least have documented it or hacked a work-around into our install. We should have one of these solutions in our next release. \ No newline at end of file diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-actions.h b/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-actions.h deleted file mode 100644 index 8e7e0e7b..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-actions.h +++ /dev/null @@ -1,1262 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements some commonly used actions. - -// GOOGLETEST_CM0002 DO NOT DELETE - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_ - -#ifndef _WIN32_WCE -# include -#endif - -#include -#include - -#include "gmock/internal/gmock-internal-utils.h" -#include "gmock/internal/gmock-port.h" - -#if GTEST_LANG_CXX11 // Defined by gtest-port.h via gmock-port.h. -#include -#include -#endif // GTEST_LANG_CXX11 - -namespace testing { - -// To implement an action Foo, define: -// 1. a class FooAction that implements the ActionInterface interface, and -// 2. a factory function that creates an Action object from a -// const FooAction*. -// -// The two-level delegation design follows that of Matcher, providing -// consistency for extension developers. It also eases ownership -// management as Action objects can now be copied like plain values. - -namespace internal { - -template -class ActionAdaptor; - -// BuiltInDefaultValueGetter::Get() returns a -// default-constructed T value. BuiltInDefaultValueGetter::Get() crashes with an error. -// -// This primary template is used when kDefaultConstructible is true. -template -struct BuiltInDefaultValueGetter { - static T Get() { return T(); } -}; -template -struct BuiltInDefaultValueGetter { - static T Get() { - Assert(false, __FILE__, __LINE__, - "Default action undefined for the function return type."); - return internal::Invalid(); - // The above statement will never be reached, but is required in - // order for this function to compile. - } -}; - -// BuiltInDefaultValue::Get() returns the "built-in" default value -// for type T, which is NULL when T is a raw pointer type, 0 when T is -// a numeric type, false when T is bool, or "" when T is string or -// std::string. In addition, in C++11 and above, it turns a -// default-constructed T value if T is default constructible. For any -// other type T, the built-in default T value is undefined, and the -// function will abort the process. -template -class BuiltInDefaultValue { - public: -#if GTEST_LANG_CXX11 - // This function returns true iff type T has a built-in default value. - static bool Exists() { - return ::std::is_default_constructible::value; - } - - static T Get() { - return BuiltInDefaultValueGetter< - T, ::std::is_default_constructible::value>::Get(); - } - -#else // GTEST_LANG_CXX11 - // This function returns true iff type T has a built-in default value. - static bool Exists() { - return false; - } - - static T Get() { - return BuiltInDefaultValueGetter::Get(); - } - -#endif // GTEST_LANG_CXX11 -}; - -// This partial specialization says that we use the same built-in -// default value for T and const T. -template -class BuiltInDefaultValue { - public: - static bool Exists() { return BuiltInDefaultValue::Exists(); } - static T Get() { return BuiltInDefaultValue::Get(); } -}; - -// This partial specialization defines the default values for pointer -// types. -template -class BuiltInDefaultValue { - public: - static bool Exists() { return true; } - static T* Get() { return nullptr; } -}; - -// The following specializations define the default values for -// specific types we care about. -#define GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(type, value) \ - template <> \ - class BuiltInDefaultValue { \ - public: \ - static bool Exists() { return true; } \ - static type Get() { return value; } \ - } - -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(void, ); // NOLINT -#if GTEST_HAS_GLOBAL_STRING -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::string, ""); -#endif // GTEST_HAS_GLOBAL_STRING -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(::std::string, ""); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(bool, false); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned char, '\0'); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed char, '\0'); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(char, '\0'); - -// There's no need for a default action for signed wchar_t, as that -// type is the same as wchar_t for gcc, and invalid for MSVC. -// -// There's also no need for a default action for unsigned wchar_t, as -// that type is the same as unsigned int for gcc, and invalid for -// MSVC. -#if GMOCK_WCHAR_T_IS_NATIVE_ -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(wchar_t, 0U); // NOLINT -#endif - -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned short, 0U); // NOLINT -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed short, 0); // NOLINT -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned int, 0U); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed int, 0); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(unsigned long, 0UL); // NOLINT -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(signed long, 0L); // NOLINT -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(UInt64, 0); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(Int64, 0); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(float, 0); -GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_(double, 0); - -#undef GMOCK_DEFINE_DEFAULT_ACTION_FOR_RETURN_TYPE_ - -} // namespace internal - -// When an unexpected function call is encountered, Google Mock will -// let it return a default value if the user has specified one for its -// return type, or if the return type has a built-in default value; -// otherwise Google Mock won't know what value to return and will have -// to abort the process. -// -// The DefaultValue class allows a user to specify the -// default value for a type T that is both copyable and publicly -// destructible (i.e. anything that can be used as a function return -// type). The usage is: -// -// // Sets the default value for type T to be foo. -// DefaultValue::Set(foo); -template -class DefaultValue { - public: - // Sets the default value for type T; requires T to be - // copy-constructable and have a public destructor. - static void Set(T x) { - delete producer_; - producer_ = new FixedValueProducer(x); - } - - // Provides a factory function to be called to generate the default value. - // This method can be used even if T is only move-constructible, but it is not - // limited to that case. - typedef T (*FactoryFunction)(); - static void SetFactory(FactoryFunction factory) { - delete producer_; - producer_ = new FactoryValueProducer(factory); - } - - // Unsets the default value for type T. - static void Clear() { - delete producer_; - producer_ = nullptr; - } - - // Returns true iff the user has set the default value for type T. - static bool IsSet() { return producer_ != nullptr; } - - // Returns true if T has a default return value set by the user or there - // exists a built-in default value. - static bool Exists() { - return IsSet() || internal::BuiltInDefaultValue::Exists(); - } - - // Returns the default value for type T if the user has set one; - // otherwise returns the built-in default value. Requires that Exists() - // is true, which ensures that the return value is well-defined. - static T Get() { - return producer_ == nullptr ? internal::BuiltInDefaultValue::Get() - : producer_->Produce(); - } - - private: - class ValueProducer { - public: - virtual ~ValueProducer() {} - virtual T Produce() = 0; - }; - - class FixedValueProducer : public ValueProducer { - public: - explicit FixedValueProducer(T value) : value_(value) {} - virtual T Produce() { return value_; } - - private: - const T value_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(FixedValueProducer); - }; - - class FactoryValueProducer : public ValueProducer { - public: - explicit FactoryValueProducer(FactoryFunction factory) - : factory_(factory) {} - virtual T Produce() { return factory_(); } - - private: - const FactoryFunction factory_; - GTEST_DISALLOW_COPY_AND_ASSIGN_(FactoryValueProducer); - }; - - static ValueProducer* producer_; -}; - -// This partial specialization allows a user to set default values for -// reference types. -template -class DefaultValue { - public: - // Sets the default value for type T&. - static void Set(T& x) { // NOLINT - address_ = &x; - } - - // Unsets the default value for type T&. - static void Clear() { address_ = nullptr; } - - // Returns true iff the user has set the default value for type T&. - static bool IsSet() { return address_ != nullptr; } - - // Returns true if T has a default return value set by the user or there - // exists a built-in default value. - static bool Exists() { - return IsSet() || internal::BuiltInDefaultValue::Exists(); - } - - // Returns the default value for type T& if the user has set one; - // otherwise returns the built-in default value if there is one; - // otherwise aborts the process. - static T& Get() { - return address_ == nullptr ? internal::BuiltInDefaultValue::Get() - : *address_; - } - - private: - static T* address_; -}; - -// This specialization allows DefaultValue::Get() to -// compile. -template <> -class DefaultValue { - public: - static bool Exists() { return true; } - static void Get() {} -}; - -// Points to the user-set default value for type T. -template -typename DefaultValue::ValueProducer* DefaultValue::producer_ = nullptr; - -// Points to the user-set default value for type T&. -template -T* DefaultValue::address_ = nullptr; - -// Implement this interface to define an action for function type F. -template -class ActionInterface { - public: - typedef typename internal::Function::Result Result; - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - ActionInterface() {} - virtual ~ActionInterface() {} - - // Performs the action. This method is not const, as in general an - // action can have side effects and be stateful. For example, a - // get-the-next-element-from-the-collection action will need to - // remember the current element. - virtual Result Perform(const ArgumentTuple& args) = 0; - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(ActionInterface); -}; - -// An Action is a copyable and IMMUTABLE (except by assignment) -// object that represents an action to be taken when a mock function -// of type F is called. The implementation of Action is just a -// linked_ptr to const ActionInterface, so copying is fairly cheap. -// Don't inherit from Action! -// -// You can view an object implementing ActionInterface as a -// concrete action (including its current state), and an Action -// object as a handle to it. -template -class Action { - public: - typedef typename internal::Function::Result Result; - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - // Constructs a null Action. Needed for storing Action objects in - // STL containers. - Action() {} - -#if GTEST_LANG_CXX11 - // Construct an Action from a specified callable. - // This cannot take std::function directly, because then Action would not be - // directly constructible from lambda (it would require two conversions). - template , G>::value>::type> - Action(G&& fun) : fun_(::std::forward(fun)) {} // NOLINT -#endif - - // Constructs an Action from its implementation. - explicit Action(ActionInterface* impl) : impl_(impl) {} - - // This constructor allows us to turn an Action object into an - // Action, as long as F's arguments can be implicitly converted - // to Func's and Func's return type can be implicitly converted to - // F's. - template - explicit Action(const Action& action); - - // Returns true iff this is the DoDefault() action. - bool IsDoDefault() const { -#if GTEST_LANG_CXX11 - return impl_ == nullptr && fun_ == nullptr; -#else - return impl_ == NULL; -#endif - } - - // Performs the action. Note that this method is const even though - // the corresponding method in ActionInterface is not. The reason - // is that a const Action means that it cannot be re-bound to - // another concrete action, not that the concrete action it binds to - // cannot change state. (Think of the difference between a const - // pointer and a pointer to const.) - Result Perform(ArgumentTuple args) const { - if (IsDoDefault()) { - internal::IllegalDoDefault(__FILE__, __LINE__); - } -#if GTEST_LANG_CXX11 - if (fun_ != nullptr) { - return internal::Apply(fun_, ::std::move(args)); - } -#endif - return impl_->Perform(args); - } - - private: - template - friend class internal::ActionAdaptor; - - template - friend class Action; - - // In C++11, Action can be implemented either as a generic functor (through - // std::function), or legacy ActionInterface. In C++98, only ActionInterface - // is available. The invariants are as follows: - // * in C++98, impl_ is null iff this is the default action - // * in C++11, at most one of fun_ & impl_ may be nonnull; both are null iff - // this is the default action -#if GTEST_LANG_CXX11 - ::std::function fun_; -#endif - internal::linked_ptr > impl_; -}; - -// The PolymorphicAction class template makes it easy to implement a -// polymorphic action (i.e. an action that can be used in mock -// functions of than one type, e.g. Return()). -// -// To define a polymorphic action, a user first provides a COPYABLE -// implementation class that has a Perform() method template: -// -// class FooAction { -// public: -// template -// Result Perform(const ArgumentTuple& args) const { -// // Processes the arguments and returns a result, using -// // std::get(args) to get the N-th (0-based) argument in the tuple. -// } -// ... -// }; -// -// Then the user creates the polymorphic action using -// MakePolymorphicAction(object) where object has type FooAction. See -// the definition of Return(void) and SetArgumentPointee(value) for -// complete examples. -template -class PolymorphicAction { - public: - explicit PolymorphicAction(const Impl& impl) : impl_(impl) {} - - template - operator Action() const { - return Action(new MonomorphicImpl(impl_)); - } - - private: - template - class MonomorphicImpl : public ActionInterface { - public: - typedef typename internal::Function::Result Result; - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {} - - virtual Result Perform(const ArgumentTuple& args) { - return impl_.template Perform(args); - } - - private: - Impl impl_; - - GTEST_DISALLOW_ASSIGN_(MonomorphicImpl); - }; - - Impl impl_; - - GTEST_DISALLOW_ASSIGN_(PolymorphicAction); -}; - -// Creates an Action from its implementation and returns it. The -// created Action object owns the implementation. -template -Action MakeAction(ActionInterface* impl) { - return Action(impl); -} - -// Creates a polymorphic action from its implementation. This is -// easier to use than the PolymorphicAction constructor as it -// doesn't require you to explicitly write the template argument, e.g. -// -// MakePolymorphicAction(foo); -// vs -// PolymorphicAction(foo); -template -inline PolymorphicAction MakePolymorphicAction(const Impl& impl) { - return PolymorphicAction(impl); -} - -namespace internal { - -// Allows an Action object to pose as an Action, as long as F2 -// and F1 are compatible. -template -class ActionAdaptor : public ActionInterface { - public: - typedef typename internal::Function::Result Result; - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - explicit ActionAdaptor(const Action& from) : impl_(from.impl_) {} - - virtual Result Perform(const ArgumentTuple& args) { - return impl_->Perform(args); - } - - private: - const internal::linked_ptr > impl_; - - GTEST_DISALLOW_ASSIGN_(ActionAdaptor); -}; - -// Helper struct to specialize ReturnAction to execute a move instead of a copy -// on return. Useful for move-only types, but could be used on any type. -template -struct ByMoveWrapper { - explicit ByMoveWrapper(T value) : payload(internal::move(value)) {} - T payload; -}; - -// Implements the polymorphic Return(x) action, which can be used in -// any function that returns the type of x, regardless of the argument -// types. -// -// Note: The value passed into Return must be converted into -// Function::Result when this action is cast to Action rather than -// when that action is performed. This is important in scenarios like -// -// MOCK_METHOD1(Method, T(U)); -// ... -// { -// Foo foo; -// X x(&foo); -// EXPECT_CALL(mock, Method(_)).WillOnce(Return(x)); -// } -// -// In the example above the variable x holds reference to foo which leaves -// scope and gets destroyed. If copying X just copies a reference to foo, -// that copy will be left with a hanging reference. If conversion to T -// makes a copy of foo, the above code is safe. To support that scenario, we -// need to make sure that the type conversion happens inside the EXPECT_CALL -// statement, and conversion of the result of Return to Action is a -// good place for that. -// -// The real life example of the above scenario happens when an invocation -// of gtl::Container() is passed into Return. -// -template -class ReturnAction { - public: - // Constructs a ReturnAction object from the value to be returned. - // 'value' is passed by value instead of by const reference in order - // to allow Return("string literal") to compile. - explicit ReturnAction(R value) : value_(new R(internal::move(value))) {} - - // This template type conversion operator allows Return(x) to be - // used in ANY function that returns x's type. - template - operator Action() const { - // Assert statement belongs here because this is the best place to verify - // conditions on F. It produces the clearest error messages - // in most compilers. - // Impl really belongs in this scope as a local class but can't - // because MSVC produces duplicate symbols in different translation units - // in this case. Until MS fixes that bug we put Impl into the class scope - // and put the typedef both here (for use in assert statement) and - // in the Impl class. But both definitions must be the same. - typedef typename Function::Result Result; - GTEST_COMPILE_ASSERT_( - !is_reference::value, - use_ReturnRef_instead_of_Return_to_return_a_reference); - return Action(new Impl(value_)); - } - - private: - // Implements the Return(x) action for a particular function type F. - template - class Impl : public ActionInterface { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - - // The implicit cast is necessary when Result has more than one - // single-argument constructor (e.g. Result is std::vector) and R - // has a type conversion operator template. In that case, value_(value) - // won't compile as the compiler doesn't known which constructor of - // Result to call. ImplicitCast_ forces the compiler to convert R to - // Result without considering explicit constructors, thus resolving the - // ambiguity. value_ is then initialized using its copy constructor. - explicit Impl(const linked_ptr& value) - : value_before_cast_(*value), - value_(ImplicitCast_(value_before_cast_)) {} - - virtual Result Perform(const ArgumentTuple&) { return value_; } - - private: - GTEST_COMPILE_ASSERT_(!is_reference::value, - Result_cannot_be_a_reference_type); - // We save the value before casting just in case it is being cast to a - // wrapper type. - R value_before_cast_; - Result value_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(Impl); - }; - - // Partially specialize for ByMoveWrapper. This version of ReturnAction will - // move its contents instead. - template - class Impl, F> : public ActionInterface { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - - explicit Impl(const linked_ptr& wrapper) - : performed_(false), wrapper_(wrapper) {} - - virtual Result Perform(const ArgumentTuple&) { - GTEST_CHECK_(!performed_) - << "A ByMove() action should only be performed once."; - performed_ = true; - return internal::move(wrapper_->payload); - } - - private: - bool performed_; - const linked_ptr wrapper_; - - GTEST_DISALLOW_ASSIGN_(Impl); - }; - - const linked_ptr value_; - - GTEST_DISALLOW_ASSIGN_(ReturnAction); -}; - -// Implements the ReturnNull() action. -class ReturnNullAction { - public: - // Allows ReturnNull() to be used in any pointer-returning function. In C++11 - // this is enforced by returning nullptr, and in non-C++11 by asserting a - // pointer type on compile time. - template - static Result Perform(const ArgumentTuple&) { -#if GTEST_LANG_CXX11 - return nullptr; -#else - GTEST_COMPILE_ASSERT_(internal::is_pointer::value, - ReturnNull_can_be_used_to_return_a_pointer_only); - return NULL; -#endif // GTEST_LANG_CXX11 - } -}; - -// Implements the Return() action. -class ReturnVoidAction { - public: - // Allows Return() to be used in any void-returning function. - template - static void Perform(const ArgumentTuple&) { - CompileAssertTypesEqual(); - } -}; - -// Implements the polymorphic ReturnRef(x) action, which can be used -// in any function that returns a reference to the type of x, -// regardless of the argument types. -template -class ReturnRefAction { - public: - // Constructs a ReturnRefAction object from the reference to be returned. - explicit ReturnRefAction(T& ref) : ref_(ref) {} // NOLINT - - // This template type conversion operator allows ReturnRef(x) to be - // used in ANY function that returns a reference to x's type. - template - operator Action() const { - typedef typename Function::Result Result; - // Asserts that the function return type is a reference. This - // catches the user error of using ReturnRef(x) when Return(x) - // should be used, and generates some helpful error message. - GTEST_COMPILE_ASSERT_(internal::is_reference::value, - use_Return_instead_of_ReturnRef_to_return_a_value); - return Action(new Impl(ref_)); - } - - private: - // Implements the ReturnRef(x) action for a particular function type F. - template - class Impl : public ActionInterface { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - - explicit Impl(T& ref) : ref_(ref) {} // NOLINT - - virtual Result Perform(const ArgumentTuple&) { - return ref_; - } - - private: - T& ref_; - - GTEST_DISALLOW_ASSIGN_(Impl); - }; - - T& ref_; - - GTEST_DISALLOW_ASSIGN_(ReturnRefAction); -}; - -// Implements the polymorphic ReturnRefOfCopy(x) action, which can be -// used in any function that returns a reference to the type of x, -// regardless of the argument types. -template -class ReturnRefOfCopyAction { - public: - // Constructs a ReturnRefOfCopyAction object from the reference to - // be returned. - explicit ReturnRefOfCopyAction(const T& value) : value_(value) {} // NOLINT - - // This template type conversion operator allows ReturnRefOfCopy(x) to be - // used in ANY function that returns a reference to x's type. - template - operator Action() const { - typedef typename Function::Result Result; - // Asserts that the function return type is a reference. This - // catches the user error of using ReturnRefOfCopy(x) when Return(x) - // should be used, and generates some helpful error message. - GTEST_COMPILE_ASSERT_( - internal::is_reference::value, - use_Return_instead_of_ReturnRefOfCopy_to_return_a_value); - return Action(new Impl(value_)); - } - - private: - // Implements the ReturnRefOfCopy(x) action for a particular function type F. - template - class Impl : public ActionInterface { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - - explicit Impl(const T& value) : value_(value) {} // NOLINT - - virtual Result Perform(const ArgumentTuple&) { - return value_; - } - - private: - T value_; - - GTEST_DISALLOW_ASSIGN_(Impl); - }; - - const T value_; - - GTEST_DISALLOW_ASSIGN_(ReturnRefOfCopyAction); -}; - -// Implements the polymorphic DoDefault() action. -class DoDefaultAction { - public: - // This template type conversion operator allows DoDefault() to be - // used in any function. - template - operator Action() const { return Action(); } // NOLINT -}; - -// Implements the Assign action to set a given pointer referent to a -// particular value. -template -class AssignAction { - public: - AssignAction(T1* ptr, T2 value) : ptr_(ptr), value_(value) {} - - template - void Perform(const ArgumentTuple& /* args */) const { - *ptr_ = value_; - } - - private: - T1* const ptr_; - const T2 value_; - - GTEST_DISALLOW_ASSIGN_(AssignAction); -}; - -#if !GTEST_OS_WINDOWS_MOBILE - -// Implements the SetErrnoAndReturn action to simulate return from -// various system calls and libc functions. -template -class SetErrnoAndReturnAction { - public: - SetErrnoAndReturnAction(int errno_value, T result) - : errno_(errno_value), - result_(result) {} - template - Result Perform(const ArgumentTuple& /* args */) const { - errno = errno_; - return result_; - } - - private: - const int errno_; - const T result_; - - GTEST_DISALLOW_ASSIGN_(SetErrnoAndReturnAction); -}; - -#endif // !GTEST_OS_WINDOWS_MOBILE - -// Implements the SetArgumentPointee(x) action for any function -// whose N-th argument (0-based) is a pointer to x's type. The -// template parameter kIsProto is true iff type A is ProtocolMessage, -// proto2::Message, or a sub-class of those. -template -class SetArgumentPointeeAction { - public: - // Constructs an action that sets the variable pointed to by the - // N-th function argument to 'value'. - explicit SetArgumentPointeeAction(const A& value) : value_(value) {} - - template - void Perform(const ArgumentTuple& args) const { - CompileAssertTypesEqual(); - *::std::get(args) = value_; - } - - private: - const A value_; - - GTEST_DISALLOW_ASSIGN_(SetArgumentPointeeAction); -}; - -template -class SetArgumentPointeeAction { - public: - // Constructs an action that sets the variable pointed to by the - // N-th function argument to 'proto'. Both ProtocolMessage and - // proto2::Message have the CopyFrom() method, so the same - // implementation works for both. - explicit SetArgumentPointeeAction(const Proto& proto) : proto_(new Proto) { - proto_->CopyFrom(proto); - } - - template - void Perform(const ArgumentTuple& args) const { - CompileAssertTypesEqual(); - ::std::get(args)->CopyFrom(*proto_); - } - - private: - const internal::linked_ptr proto_; - - GTEST_DISALLOW_ASSIGN_(SetArgumentPointeeAction); -}; - -// Implements the InvokeWithoutArgs(f) action. The template argument -// FunctionImpl is the implementation type of f, which can be either a -// function pointer or a functor. InvokeWithoutArgs(f) can be used as an -// Action as long as f's type is compatible with F (i.e. f can be -// assigned to a tr1::function). -template -class InvokeWithoutArgsAction { - public: - // The c'tor makes a copy of function_impl (either a function - // pointer or a functor). - explicit InvokeWithoutArgsAction(FunctionImpl function_impl) - : function_impl_(function_impl) {} - - // Allows InvokeWithoutArgs(f) to be used as any action whose type is - // compatible with f. - template - Result Perform(const ArgumentTuple&) { return function_impl_(); } - - private: - FunctionImpl function_impl_; - - GTEST_DISALLOW_ASSIGN_(InvokeWithoutArgsAction); -}; - -// Implements the InvokeWithoutArgs(object_ptr, &Class::Method) action. -template -class InvokeMethodWithoutArgsAction { - public: - InvokeMethodWithoutArgsAction(Class* obj_ptr, MethodPtr method_ptr) - : obj_ptr_(obj_ptr), method_ptr_(method_ptr) {} - - template - Result Perform(const ArgumentTuple&) const { - return (obj_ptr_->*method_ptr_)(); - } - - private: - Class* const obj_ptr_; - const MethodPtr method_ptr_; - - GTEST_DISALLOW_ASSIGN_(InvokeMethodWithoutArgsAction); -}; - -// Implements the InvokeWithoutArgs(callback) action. -template -class InvokeCallbackWithoutArgsAction { - public: - // The c'tor takes ownership of the callback. - explicit InvokeCallbackWithoutArgsAction(CallbackType* callback) - : callback_(callback) { - callback->CheckIsRepeatable(); // Makes sure the callback is permanent. - } - - // This type conversion operator template allows Invoke(callback) to - // be used wherever the callback's return type can be implicitly - // converted to that of the mock function. - template - Result Perform(const ArgumentTuple&) const { return callback_->Run(); } - - private: - const internal::linked_ptr callback_; - - GTEST_DISALLOW_ASSIGN_(InvokeCallbackWithoutArgsAction); -}; - -// Implements the IgnoreResult(action) action. -template -class IgnoreResultAction { - public: - explicit IgnoreResultAction(const A& action) : action_(action) {} - - template - operator Action() const { - // Assert statement belongs here because this is the best place to verify - // conditions on F. It produces the clearest error messages - // in most compilers. - // Impl really belongs in this scope as a local class but can't - // because MSVC produces duplicate symbols in different translation units - // in this case. Until MS fixes that bug we put Impl into the class scope - // and put the typedef both here (for use in assert statement) and - // in the Impl class. But both definitions must be the same. - typedef typename internal::Function::Result Result; - - // Asserts at compile time that F returns void. - CompileAssertTypesEqual(); - - return Action(new Impl(action_)); - } - - private: - template - class Impl : public ActionInterface { - public: - typedef typename internal::Function::Result Result; - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - explicit Impl(const A& action) : action_(action) {} - - virtual void Perform(const ArgumentTuple& args) { - // Performs the action and ignores its result. - action_.Perform(args); - } - - private: - // Type OriginalFunction is the same as F except that its return - // type is IgnoredValue. - typedef typename internal::Function::MakeResultIgnoredValue - OriginalFunction; - - const Action action_; - - GTEST_DISALLOW_ASSIGN_(Impl); - }; - - const A action_; - - GTEST_DISALLOW_ASSIGN_(IgnoreResultAction); -}; - -// A ReferenceWrapper object represents a reference to type T, -// which can be either const or not. It can be explicitly converted -// from, and implicitly converted to, a T&. Unlike a reference, -// ReferenceWrapper can be copied and can survive template type -// inference. This is used to support by-reference arguments in the -// InvokeArgument(...) action. The idea was from "reference -// wrappers" in tr1, which we don't have in our source tree yet. -template -class ReferenceWrapper { - public: - // Constructs a ReferenceWrapper object from a T&. - explicit ReferenceWrapper(T& l_value) : pointer_(&l_value) {} // NOLINT - - // Allows a ReferenceWrapper object to be implicitly converted to - // a T&. - operator T&() const { return *pointer_; } - private: - T* pointer_; -}; - -// Allows the expression ByRef(x) to be printed as a reference to x. -template -void PrintTo(const ReferenceWrapper& ref, ::std::ostream* os) { - T& value = ref; - UniversalPrinter::Print(value, os); -} - -// Does two actions sequentially. Used for implementing the DoAll(a1, -// a2, ...) action. -template -class DoBothAction { - public: - DoBothAction(Action1 action1, Action2 action2) - : action1_(action1), action2_(action2) {} - - // This template type conversion operator allows DoAll(a1, ..., a_n) - // to be used in ANY function of compatible type. - template - operator Action() const { - return Action(new Impl(action1_, action2_)); - } - - private: - // Implements the DoAll(...) action for a particular function type F. - template - class Impl : public ActionInterface { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - typedef typename Function::MakeResultVoid VoidResult; - - Impl(const Action& action1, const Action& action2) - : action1_(action1), action2_(action2) {} - - virtual Result Perform(const ArgumentTuple& args) { - action1_.Perform(args); - return action2_.Perform(args); - } - - private: - const Action action1_; - const Action action2_; - - GTEST_DISALLOW_ASSIGN_(Impl); - }; - - Action1 action1_; - Action2 action2_; - - GTEST_DISALLOW_ASSIGN_(DoBothAction); -}; - -} // namespace internal - -// An Unused object can be implicitly constructed from ANY value. -// This is handy when defining actions that ignore some or all of the -// mock function arguments. For example, given -// -// MOCK_METHOD3(Foo, double(const string& label, double x, double y)); -// MOCK_METHOD3(Bar, double(int index, double x, double y)); -// -// instead of -// -// double DistanceToOriginWithLabel(const string& label, double x, double y) { -// return sqrt(x*x + y*y); -// } -// double DistanceToOriginWithIndex(int index, double x, double y) { -// return sqrt(x*x + y*y); -// } -// ... -// EXPECT_CALL(mock, Foo("abc", _, _)) -// .WillOnce(Invoke(DistanceToOriginWithLabel)); -// EXPECT_CALL(mock, Bar(5, _, _)) -// .WillOnce(Invoke(DistanceToOriginWithIndex)); -// -// you could write -// -// // We can declare any uninteresting argument as Unused. -// double DistanceToOrigin(Unused, double x, double y) { -// return sqrt(x*x + y*y); -// } -// ... -// EXPECT_CALL(mock, Foo("abc", _, _)).WillOnce(Invoke(DistanceToOrigin)); -// EXPECT_CALL(mock, Bar(5, _, _)).WillOnce(Invoke(DistanceToOrigin)); -typedef internal::IgnoredValue Unused; - -// This constructor allows us to turn an Action object into an -// Action, as long as To's arguments can be implicitly converted -// to From's and From's return type cann be implicitly converted to -// To's. -template -template -Action::Action(const Action& from) - : -#if GTEST_LANG_CXX11 - fun_(from.fun_), -#endif - impl_(from.impl_ == nullptr - ? nullptr - : new internal::ActionAdaptor(from)) { -} - -// Creates an action that returns 'value'. 'value' is passed by value -// instead of const reference - otherwise Return("string literal") -// will trigger a compiler error about using array as initializer. -template -internal::ReturnAction Return(R value) { - return internal::ReturnAction(internal::move(value)); -} - -// Creates an action that returns NULL. -inline PolymorphicAction ReturnNull() { - return MakePolymorphicAction(internal::ReturnNullAction()); -} - -// Creates an action that returns from a void function. -inline PolymorphicAction Return() { - return MakePolymorphicAction(internal::ReturnVoidAction()); -} - -// Creates an action that returns the reference to a variable. -template -inline internal::ReturnRefAction ReturnRef(R& x) { // NOLINT - return internal::ReturnRefAction(x); -} - -// Creates an action that returns the reference to a copy of the -// argument. The copy is created when the action is constructed and -// lives as long as the action. -template -inline internal::ReturnRefOfCopyAction ReturnRefOfCopy(const R& x) { - return internal::ReturnRefOfCopyAction(x); -} - -// Modifies the parent action (a Return() action) to perform a move of the -// argument instead of a copy. -// Return(ByMove()) actions can only be executed once and will assert this -// invariant. -template -internal::ByMoveWrapper ByMove(R x) { - return internal::ByMoveWrapper(internal::move(x)); -} - -// Creates an action that does the default action for the give mock function. -inline internal::DoDefaultAction DoDefault() { - return internal::DoDefaultAction(); -} - -// Creates an action that sets the variable pointed by the N-th -// (0-based) function argument to 'value'. -template -PolymorphicAction< - internal::SetArgumentPointeeAction< - N, T, internal::IsAProtocolMessage::value> > -SetArgPointee(const T& x) { - return MakePolymorphicAction(internal::SetArgumentPointeeAction< - N, T, internal::IsAProtocolMessage::value>(x)); -} - -#if !((GTEST_GCC_VER_ && GTEST_GCC_VER_ < 40000) || GTEST_OS_SYMBIAN) -// This overload allows SetArgPointee() to accept a string literal. -// GCC prior to the version 4.0 and Symbian C++ compiler cannot distinguish -// this overload from the templated version and emit a compile error. -template -PolymorphicAction< - internal::SetArgumentPointeeAction > -SetArgPointee(const char* p) { - return MakePolymorphicAction(internal::SetArgumentPointeeAction< - N, const char*, false>(p)); -} - -template -PolymorphicAction< - internal::SetArgumentPointeeAction > -SetArgPointee(const wchar_t* p) { - return MakePolymorphicAction(internal::SetArgumentPointeeAction< - N, const wchar_t*, false>(p)); -} -#endif - -// The following version is DEPRECATED. -template -PolymorphicAction< - internal::SetArgumentPointeeAction< - N, T, internal::IsAProtocolMessage::value> > -SetArgumentPointee(const T& x) { - return MakePolymorphicAction(internal::SetArgumentPointeeAction< - N, T, internal::IsAProtocolMessage::value>(x)); -} - -// Creates an action that sets a pointer referent to a given value. -template -PolymorphicAction > Assign(T1* ptr, T2 val) { - return MakePolymorphicAction(internal::AssignAction(ptr, val)); -} - -#if !GTEST_OS_WINDOWS_MOBILE - -// Creates an action that sets errno and returns the appropriate error. -template -PolymorphicAction > -SetErrnoAndReturn(int errval, T result) { - return MakePolymorphicAction( - internal::SetErrnoAndReturnAction(errval, result)); -} - -#endif // !GTEST_OS_WINDOWS_MOBILE - -// Various overloads for InvokeWithoutArgs(). - -// Creates an action that invokes 'function_impl' with no argument. -template -PolymorphicAction > -InvokeWithoutArgs(FunctionImpl function_impl) { - return MakePolymorphicAction( - internal::InvokeWithoutArgsAction(function_impl)); -} - -// Creates an action that invokes the given method on the given object -// with no argument. -template -PolymorphicAction > -InvokeWithoutArgs(Class* obj_ptr, MethodPtr method_ptr) { - return MakePolymorphicAction( - internal::InvokeMethodWithoutArgsAction( - obj_ptr, method_ptr)); -} - -// Creates an action that performs an_action and throws away its -// result. In other words, it changes the return type of an_action to -// void. an_action MUST NOT return void, or the code won't compile. -template -inline internal::IgnoreResultAction
    IgnoreResult(const A& an_action) { - return internal::IgnoreResultAction(an_action); -} - -// Creates a reference wrapper for the given L-value. If necessary, -// you can explicitly specify the type of the reference. For example, -// suppose 'derived' is an object of type Derived, ByRef(derived) -// would wrap a Derived&. If you want to wrap a const Base& instead, -// where Base is a base class of Derived, just write: -// -// ByRef(derived) -template -inline internal::ReferenceWrapper ByRef(T& l_value) { // NOLINT - return internal::ReferenceWrapper(l_value); -} - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_ACTIONS_H_ diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-cardinalities.h b/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-cardinalities.h deleted file mode 100644 index f9169315..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-cardinalities.h +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements some commonly used cardinalities. More -// cardinalities can be defined by the user implementing the -// CardinalityInterface interface if necessary. - -// GOOGLETEST_CM0002 DO NOT DELETE - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ - -#include -#include // NOLINT -#include "gmock/internal/gmock-port.h" -#include "gtest/gtest.h" - -GTEST_DISABLE_MSC_WARNINGS_PUSH_(4251 \ -/* class A needs to have dll-interface to be used by clients of class B */) - -namespace testing { - -// To implement a cardinality Foo, define: -// 1. a class FooCardinality that implements the -// CardinalityInterface interface, and -// 2. a factory function that creates a Cardinality object from a -// const FooCardinality*. -// -// The two-level delegation design follows that of Matcher, providing -// consistency for extension developers. It also eases ownership -// management as Cardinality objects can now be copied like plain values. - -// The implementation of a cardinality. -class CardinalityInterface { - public: - virtual ~CardinalityInterface() {} - - // Conservative estimate on the lower/upper bound of the number of - // calls allowed. - virtual int ConservativeLowerBound() const { return 0; } - virtual int ConservativeUpperBound() const { return INT_MAX; } - - // Returns true iff call_count calls will satisfy this cardinality. - virtual bool IsSatisfiedByCallCount(int call_count) const = 0; - - // Returns true iff call_count calls will saturate this cardinality. - virtual bool IsSaturatedByCallCount(int call_count) const = 0; - - // Describes self to an ostream. - virtual void DescribeTo(::std::ostream* os) const = 0; -}; - -// A Cardinality is a copyable and IMMUTABLE (except by assignment) -// object that specifies how many times a mock function is expected to -// be called. The implementation of Cardinality is just a linked_ptr -// to const CardinalityInterface, so copying is fairly cheap. -// Don't inherit from Cardinality! -class GTEST_API_ Cardinality { - public: - // Constructs a null cardinality. Needed for storing Cardinality - // objects in STL containers. - Cardinality() {} - - // Constructs a Cardinality from its implementation. - explicit Cardinality(const CardinalityInterface* impl) : impl_(impl) {} - - // Conservative estimate on the lower/upper bound of the number of - // calls allowed. - int ConservativeLowerBound() const { return impl_->ConservativeLowerBound(); } - int ConservativeUpperBound() const { return impl_->ConservativeUpperBound(); } - - // Returns true iff call_count calls will satisfy this cardinality. - bool IsSatisfiedByCallCount(int call_count) const { - return impl_->IsSatisfiedByCallCount(call_count); - } - - // Returns true iff call_count calls will saturate this cardinality. - bool IsSaturatedByCallCount(int call_count) const { - return impl_->IsSaturatedByCallCount(call_count); - } - - // Returns true iff call_count calls will over-saturate this - // cardinality, i.e. exceed the maximum number of allowed calls. - bool IsOverSaturatedByCallCount(int call_count) const { - return impl_->IsSaturatedByCallCount(call_count) && - !impl_->IsSatisfiedByCallCount(call_count); - } - - // Describes self to an ostream - void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); } - - // Describes the given actual call count to an ostream. - static void DescribeActualCallCountTo(int actual_call_count, - ::std::ostream* os); - - private: - internal::linked_ptr impl_; -}; - -// Creates a cardinality that allows at least n calls. -GTEST_API_ Cardinality AtLeast(int n); - -// Creates a cardinality that allows at most n calls. -GTEST_API_ Cardinality AtMost(int n); - -// Creates a cardinality that allows any number of calls. -GTEST_API_ Cardinality AnyNumber(); - -// Creates a cardinality that allows between min and max calls. -GTEST_API_ Cardinality Between(int min, int max); - -// Creates a cardinality that allows exactly n calls. -GTEST_API_ Cardinality Exactly(int n); - -// Creates a cardinality from its implementation. -inline Cardinality MakeCardinality(const CardinalityInterface* c) { - return Cardinality(c); -} - -} // namespace testing - -GTEST_DISABLE_MSC_WARNINGS_POP_() // 4251 - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_ diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h b/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h deleted file mode 100644 index 3ea14dde..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h +++ /dev/null @@ -1,2579 +0,0 @@ -// This file was GENERATED by command: -// pump.py gmock-generated-actions.h.pump -// DO NOT EDIT BY HAND!!! - -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements some commonly used variadic actions. - -// GOOGLETEST_CM0002 DO NOT DELETE - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ - -#include "gmock/gmock-actions.h" -#include "gmock/internal/gmock-port.h" - -namespace testing { -namespace internal { - -// InvokeHelper knows how to unpack an N-tuple and invoke an N-ary -// function, method, or callback with the unpacked values, where F is -// a function type that takes N arguments. -template -class InvokeHelper; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tuple<>&) { - return function(); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tuple<>&) { - return (obj_ptr->*method_ptr)(); - } - - template - static R InvokeCallback(CallbackType* callback, - const ::std::tuple<>&) { - return callback->Run(); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tuple& args) { - return function(std::get<0>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tuple& args) { - return (obj_ptr->*method_ptr)(std::get<0>(args)); - } - - template - static R InvokeCallback(CallbackType* callback, - const ::std::tuple& args) { - return callback->Run(std::get<0>(args)); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tuple& args) { - return function(std::get<0>(args), std::get<1>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tuple& args) { - return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args)); - } - - template - static R InvokeCallback(CallbackType* callback, - const ::std::tuple& args) { - return callback->Run(std::get<0>(args), std::get<1>(args)); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tuple& args) { - return function(std::get<0>(args), std::get<1>(args), - std::get<2>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tuple& args) { - return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args), - std::get<2>(args)); - } - - template - static R InvokeCallback(CallbackType* callback, - const ::std::tuple& args) { - return callback->Run(std::get<0>(args), std::get<1>(args), - std::get<2>(args)); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tuple& args) { - return function(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tuple& args) { - return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args)); - } - - template - static R InvokeCallback(CallbackType* callback, - const ::std::tuple& args) { - return callback->Run(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args)); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tuple& args) { - return function(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args), std::get<4>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tuple& args) { - return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args), std::get<4>(args)); - } - - template - static R InvokeCallback(CallbackType* callback, - const ::std::tuple& args) { - return callback->Run(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args), std::get<4>(args)); - } -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tuple& args) { - return function(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args), std::get<4>(args), - std::get<5>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tuple& args) { - return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args), std::get<4>(args), - std::get<5>(args)); - } - - // There is no InvokeCallback() for 6-tuples -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tuple& args) { - return function(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args), std::get<4>(args), - std::get<5>(args), std::get<6>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tuple& args) { - return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args), std::get<4>(args), - std::get<5>(args), std::get<6>(args)); - } - - // There is no InvokeCallback() for 7-tuples -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tuple& args) { - return function(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args), std::get<4>(args), - std::get<5>(args), std::get<6>(args), std::get<7>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tuple& args) { - return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args), std::get<4>(args), - std::get<5>(args), std::get<6>(args), std::get<7>(args)); - } - - // There is no InvokeCallback() for 8-tuples -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tuple& args) { - return function(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args), std::get<4>(args), - std::get<5>(args), std::get<6>(args), std::get<7>(args), - std::get<8>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tuple& args) { - return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args), std::get<4>(args), - std::get<5>(args), std::get<6>(args), std::get<7>(args), - std::get<8>(args)); - } - - // There is no InvokeCallback() for 9-tuples -}; - -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tuple& args) { - return function(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args), std::get<4>(args), - std::get<5>(args), std::get<6>(args), std::get<7>(args), - std::get<8>(args), std::get<9>(args)); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tuple& args) { - return (obj_ptr->*method_ptr)(std::get<0>(args), std::get<1>(args), - std::get<2>(args), std::get<3>(args), std::get<4>(args), - std::get<5>(args), std::get<6>(args), std::get<7>(args), - std::get<8>(args), std::get<9>(args)); - } - - // There is no InvokeCallback() for 10-tuples -}; - -// Implements the Invoke(callback) action. -template -class InvokeCallbackAction { - public: - // The c'tor takes ownership of the callback. - explicit InvokeCallbackAction(CallbackType* callback) - : callback_(callback) { - callback->CheckIsRepeatable(); // Makes sure the callback is permanent. - } - - // This type conversion operator template allows Invoke(callback) to - // be used wherever the callback's type is compatible with that of - // the mock function, i.e. if the mock function's arguments can be - // implicitly converted to the callback's arguments and the - // callback's result can be implicitly converted to the mock - // function's result. - template - Result Perform(const ArgumentTuple& args) const { - return InvokeHelper::InvokeCallback( - callback_.get(), args); - } - private: - const linked_ptr callback_; -}; - -// An INTERNAL macro for extracting the type of a tuple field. It's -// subject to change without notice - DO NOT USE IN USER CODE! -#define GMOCK_FIELD_(Tuple, N) \ - typename ::std::tuple_element::type - -// SelectArgs::type is the -// type of an n-ary function whose i-th (1-based) argument type is the -// k{i}-th (0-based) field of ArgumentTuple, which must be a tuple -// type, and whose return type is Result. For example, -// SelectArgs, 0, 3>::type -// is int(bool, long). -// -// SelectArgs::Select(args) -// returns the selected fields (k1, k2, ..., k_n) of args as a tuple. -// For example, -// SelectArgs, 2, 0>::Select( -// ::std::make_tuple(true, 'a', 2.5)) -// returns tuple (2.5, true). -// -// The numbers in list k1, k2, ..., k_n must be >= 0, where n can be -// in the range [0, 10]. Duplicates are allowed and they don't have -// to be in an ascending or descending order. - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), - GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9), - GMOCK_FIELD_(ArgumentTuple, k10)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - return SelectedArgs(std::get(args), std::get(args), - std::get(args), std::get(args), std::get(args), - std::get(args), std::get(args), std::get(args), - std::get(args), std::get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& /* args */) { - return SelectedArgs(); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - return SelectedArgs(std::get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - return SelectedArgs(std::get(args), std::get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - return SelectedArgs(std::get(args), std::get(args), - std::get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - return SelectedArgs(std::get(args), std::get(args), - std::get(args), std::get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - return SelectedArgs(std::get(args), std::get(args), - std::get(args), std::get(args), std::get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - return SelectedArgs(std::get(args), std::get(args), - std::get(args), std::get(args), std::get(args), - std::get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - return SelectedArgs(std::get(args), std::get(args), - std::get(args), std::get(args), std::get(args), - std::get(args), std::get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), - GMOCK_FIELD_(ArgumentTuple, k8)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - return SelectedArgs(std::get(args), std::get(args), - std::get(args), std::get(args), std::get(args), - std::get(args), std::get(args), std::get(args)); - } -}; - -template -class SelectArgs { - public: - typedef Result type(GMOCK_FIELD_(ArgumentTuple, k1), - GMOCK_FIELD_(ArgumentTuple, k2), GMOCK_FIELD_(ArgumentTuple, k3), - GMOCK_FIELD_(ArgumentTuple, k4), GMOCK_FIELD_(ArgumentTuple, k5), - GMOCK_FIELD_(ArgumentTuple, k6), GMOCK_FIELD_(ArgumentTuple, k7), - GMOCK_FIELD_(ArgumentTuple, k8), GMOCK_FIELD_(ArgumentTuple, k9)); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - return SelectedArgs(std::get(args), std::get(args), - std::get(args), std::get(args), std::get(args), - std::get(args), std::get(args), std::get(args), - std::get(args)); - } -}; - -#undef GMOCK_FIELD_ - -// Implements the WithArgs action. -template -class WithArgsAction { - public: - explicit WithArgsAction(const InnerAction& action) : action_(action) {} - - template - operator Action() const { return MakeAction(new Impl(action_)); } - - private: - template - class Impl : public ActionInterface { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - - explicit Impl(const InnerAction& action) : action_(action) {} - - virtual Result Perform(const ArgumentTuple& args) { - return action_.Perform(SelectArgs::Select(args)); - } - - private: - typedef typename SelectArgs::type InnerFunctionType; - - Action action_; - }; - - const InnerAction action_; - - GTEST_DISALLOW_ASSIGN_(WithArgsAction); -}; - -// A macro from the ACTION* family (defined later in this file) -// defines an action that can be used in a mock function. Typically, -// these actions only care about a subset of the arguments of the mock -// function. For example, if such an action only uses the second -// argument, it can be used in any mock function that takes >= 2 -// arguments where the type of the second argument is compatible. -// -// Therefore, the action implementation must be prepared to take more -// arguments than it needs. The ExcessiveArg type is used to -// represent those excessive arguments. In order to keep the compiler -// error messages tractable, we define it in the testing namespace -// instead of testing::internal. However, this is an INTERNAL TYPE -// and subject to change without notice, so a user MUST NOT USE THIS -// TYPE DIRECTLY. -struct ExcessiveArg {}; - -// A helper class needed for implementing the ACTION* macros. -template -class ActionHelper { - public: - static Result Perform(Impl* impl, const ::std::tuple<>& args) { - return impl->template gmock_PerformImpl<>(args, ExcessiveArg(), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tuple& args) { - return impl->template gmock_PerformImpl(args, std::get<0>(args), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tuple& args) { - return impl->template gmock_PerformImpl(args, std::get<0>(args), - std::get<1>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tuple& args) { - return impl->template gmock_PerformImpl(args, - std::get<0>(args), std::get<1>(args), std::get<2>(args), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tuple& args) { - return impl->template gmock_PerformImpl(args, - std::get<0>(args), std::get<1>(args), std::get<2>(args), - std::get<3>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tuple& args) { - return impl->template gmock_PerformImpl(args, - std::get<0>(args), std::get<1>(args), std::get<2>(args), - std::get<3>(args), std::get<4>(args), ExcessiveArg(), ExcessiveArg(), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tuple& args) { - return impl->template gmock_PerformImpl(args, - std::get<0>(args), std::get<1>(args), std::get<2>(args), - std::get<3>(args), std::get<4>(args), std::get<5>(args), - ExcessiveArg(), ExcessiveArg(), ExcessiveArg(), ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tuple& args) { - return impl->template gmock_PerformImpl(args, - std::get<0>(args), std::get<1>(args), std::get<2>(args), - std::get<3>(args), std::get<4>(args), std::get<5>(args), - std::get<6>(args), ExcessiveArg(), ExcessiveArg(), ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tuple& args) { - return impl->template gmock_PerformImpl(args, std::get<0>(args), std::get<1>(args), std::get<2>(args), - std::get<3>(args), std::get<4>(args), std::get<5>(args), - std::get<6>(args), std::get<7>(args), ExcessiveArg(), ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tuple& args) { - return impl->template gmock_PerformImpl(args, std::get<0>(args), std::get<1>(args), std::get<2>(args), - std::get<3>(args), std::get<4>(args), std::get<5>(args), - std::get<6>(args), std::get<7>(args), std::get<8>(args), - ExcessiveArg()); - } - - template - static Result Perform(Impl* impl, const ::std::tuple& args) { - return impl->template gmock_PerformImpl(args, std::get<0>(args), std::get<1>(args), std::get<2>(args), - std::get<3>(args), std::get<4>(args), std::get<5>(args), - std::get<6>(args), std::get<7>(args), std::get<8>(args), - std::get<9>(args)); - } -}; - -} // namespace internal - -// Various overloads for Invoke(). - -// WithArgs(an_action) creates an action that passes -// the selected arguments of the mock function to an_action and -// performs it. It serves as an adaptor between actions with -// different argument lists. C++ doesn't support default arguments for -// function templates, so we have to overload it. -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -template -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - -// Creates an action that does actions a1, a2, ..., sequentially in -// each invocation. -template -inline internal::DoBothAction -DoAll(Action1 a1, Action2 a2) { - return internal::DoBothAction(a1, a2); -} - -template -inline internal::DoBothAction > -DoAll(Action1 a1, Action2 a2, Action3 a3) { - return DoAll(a1, DoAll(a2, a3)); -} - -template -inline internal::DoBothAction > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4) { - return DoAll(a1, DoAll(a2, a3, a4)); -} - -template -inline internal::DoBothAction > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5) { - return DoAll(a1, DoAll(a2, a3, a4, a5)); -} - -template -inline internal::DoBothAction > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6) { - return DoAll(a1, DoAll(a2, a3, a4, a5, a6)); -} - -template -inline internal::DoBothAction > > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, - Action7 a7) { - return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7)); -} - -template -inline internal::DoBothAction > > > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, - Action7 a7, Action8 a8) { - return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8)); -} - -template -inline internal::DoBothAction > > > > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, - Action7 a7, Action8 a8, Action9 a9) { - return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9)); -} - -template -inline internal::DoBothAction > > > > > > > > -DoAll(Action1 a1, Action2 a2, Action3 a3, Action4 a4, Action5 a5, Action6 a6, - Action7 a7, Action8 a8, Action9 a9, Action10 a10) { - return DoAll(a1, DoAll(a2, a3, a4, a5, a6, a7, a8, a9, a10)); -} - -} // namespace testing - -// The ACTION* family of macros can be used in a namespace scope to -// define custom actions easily. The syntax: -// -// ACTION(name) { statements; } -// -// will define an action with the given name that executes the -// statements. The value returned by the statements will be used as -// the return value of the action. Inside the statements, you can -// refer to the K-th (0-based) argument of the mock function by -// 'argK', and refer to its type by 'argK_type'. For example: -// -// ACTION(IncrementArg1) { -// arg1_type temp = arg1; -// return ++(*temp); -// } -// -// allows you to write -// -// ...WillOnce(IncrementArg1()); -// -// You can also refer to the entire argument tuple and its type by -// 'args' and 'args_type', and refer to the mock function type and its -// return type by 'function_type' and 'return_type'. -// -// Note that you don't need to specify the types of the mock function -// arguments. However rest assured that your code is still type-safe: -// you'll get a compiler error if *arg1 doesn't support the ++ -// operator, or if the type of ++(*arg1) isn't compatible with the -// mock function's return type, for example. -// -// Sometimes you'll want to parameterize the action. For that you can use -// another macro: -// -// ACTION_P(name, param_name) { statements; } -// -// For example: -// -// ACTION_P(Add, n) { return arg0 + n; } -// -// will allow you to write: -// -// ...WillOnce(Add(5)); -// -// Note that you don't need to provide the type of the parameter -// either. If you need to reference the type of a parameter named -// 'foo', you can write 'foo_type'. For example, in the body of -// ACTION_P(Add, n) above, you can write 'n_type' to refer to the type -// of 'n'. -// -// We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P10 to support -// multi-parameter actions. -// -// For the purpose of typing, you can view -// -// ACTION_Pk(Foo, p1, ..., pk) { ... } -// -// as shorthand for -// -// template -// FooActionPk Foo(p1_type p1, ..., pk_type pk) { ... } -// -// In particular, you can provide the template type arguments -// explicitly when invoking Foo(), as in Foo(5, false); -// although usually you can rely on the compiler to infer the types -// for you automatically. You can assign the result of expression -// Foo(p1, ..., pk) to a variable of type FooActionPk. This can be useful when composing actions. -// -// You can also overload actions with different numbers of parameters: -// -// ACTION_P(Plus, a) { ... } -// ACTION_P2(Plus, a, b) { ... } -// -// While it's tempting to always use the ACTION* macros when defining -// a new action, you should also consider implementing ActionInterface -// or using MakePolymorphicAction() instead, especially if you need to -// use the action a lot. While these approaches require more work, -// they give you more control on the types of the mock function -// arguments and the action parameters, which in general leads to -// better compiler error messages that pay off in the long run. They -// also allow overloading actions based on parameter types (as opposed -// to just based on the number of parameters). -// -// CAVEAT: -// -// ACTION*() can only be used in a namespace scope. The reason is -// that C++ doesn't yet allow function-local types to be used to -// instantiate templates. The up-coming C++0x standard will fix this. -// Once that's done, we'll consider supporting using ACTION*() inside -// a function. -// -// MORE INFORMATION: -// -// To learn more about using these macros, please search for 'ACTION' on -// https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md - -// An internal macro needed for implementing ACTION*(). -#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\ - const args_type& args GTEST_ATTRIBUTE_UNUSED_, \ - arg0_type arg0 GTEST_ATTRIBUTE_UNUSED_, \ - arg1_type arg1 GTEST_ATTRIBUTE_UNUSED_, \ - arg2_type arg2 GTEST_ATTRIBUTE_UNUSED_, \ - arg3_type arg3 GTEST_ATTRIBUTE_UNUSED_, \ - arg4_type arg4 GTEST_ATTRIBUTE_UNUSED_, \ - arg5_type arg5 GTEST_ATTRIBUTE_UNUSED_, \ - arg6_type arg6 GTEST_ATTRIBUTE_UNUSED_, \ - arg7_type arg7 GTEST_ATTRIBUTE_UNUSED_, \ - arg8_type arg8 GTEST_ATTRIBUTE_UNUSED_, \ - arg9_type arg9 GTEST_ATTRIBUTE_UNUSED_ - -// Sometimes you want to give an action explicit template parameters -// that cannot be inferred from its value parameters. ACTION() and -// ACTION_P*() don't support that. ACTION_TEMPLATE() remedies that -// and can be viewed as an extension to ACTION() and ACTION_P*(). -// -// The syntax: -// -// ACTION_TEMPLATE(ActionName, -// HAS_m_TEMPLATE_PARAMS(kind1, name1, ..., kind_m, name_m), -// AND_n_VALUE_PARAMS(p1, ..., p_n)) { statements; } -// -// defines an action template that takes m explicit template -// parameters and n value parameters. name_i is the name of the i-th -// template parameter, and kind_i specifies whether it's a typename, -// an integral constant, or a template. p_i is the name of the i-th -// value parameter. -// -// Example: -// -// // DuplicateArg(output) converts the k-th argument of the mock -// // function to type T and copies it to *output. -// ACTION_TEMPLATE(DuplicateArg, -// HAS_2_TEMPLATE_PARAMS(int, k, typename, T), -// AND_1_VALUE_PARAMS(output)) { -// *output = T(::std::get(args)); -// } -// ... -// int n; -// EXPECT_CALL(mock, Foo(_, _)) -// .WillOnce(DuplicateArg<1, unsigned char>(&n)); -// -// To create an instance of an action template, write: -// -// ActionName(v1, ..., v_n) -// -// where the ts are the template arguments and the vs are the value -// arguments. The value argument types are inferred by the compiler. -// If you want to explicitly specify the value argument types, you can -// provide additional template arguments: -// -// ActionName(v1, ..., v_n) -// -// where u_i is the desired type of v_i. -// -// ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded on the -// number of value parameters, but not on the number of template -// parameters. Without the restriction, the meaning of the following -// is unclear: -// -// OverloadedAction(x); -// -// Are we using a single-template-parameter action where 'bool' refers -// to the type of x, or are we using a two-template-parameter action -// where the compiler is asked to infer the type of x? -// -// Implementation notes: -// -// GMOCK_INTERNAL_*_HAS_m_TEMPLATE_PARAMS and -// GMOCK_INTERNAL_*_AND_n_VALUE_PARAMS are internal macros for -// implementing ACTION_TEMPLATE. The main trick we use is to create -// new macro invocations when expanding a macro. For example, we have -// -// #define ACTION_TEMPLATE(name, template_params, value_params) -// ... GMOCK_INTERNAL_DECL_##template_params ... -// -// which causes ACTION_TEMPLATE(..., HAS_1_TEMPLATE_PARAMS(typename, T), ...) -// to expand to -// -// ... GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(typename, T) ... -// -// Since GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS is a macro, the -// preprocessor will continue to expand it to -// -// ... typename T ... -// -// This technique conforms to the C++ standard and is portable. It -// allows us to implement action templates using O(N) code, where N is -// the maximum number of template/value parameters supported. Without -// using it, we'd have to devote O(N^2) amount of code to implement all -// combinations of m and n. - -// Declares the template parameters. -#define GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(kind0, name0) kind0 name0 -#define GMOCK_INTERNAL_DECL_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \ - name1) kind0 name0, kind1 name1 -#define GMOCK_INTERNAL_DECL_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2) kind0 name0, kind1 name1, kind2 name2 -#define GMOCK_INTERNAL_DECL_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3) kind0 name0, kind1 name1, kind2 name2, \ - kind3 name3 -#define GMOCK_INTERNAL_DECL_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4) kind0 name0, kind1 name1, \ - kind2 name2, kind3 name3, kind4 name4 -#define GMOCK_INTERNAL_DECL_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5) kind0 name0, \ - kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5 -#define GMOCK_INTERNAL_DECL_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \ - name6) kind0 name0, kind1 name1, kind2 name2, kind3 name3, kind4 name4, \ - kind5 name5, kind6 name6 -#define GMOCK_INTERNAL_DECL_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \ - kind7, name7) kind0 name0, kind1 name1, kind2 name2, kind3 name3, \ - kind4 name4, kind5 name5, kind6 name6, kind7 name7 -#define GMOCK_INTERNAL_DECL_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \ - kind7, name7, kind8, name8) kind0 name0, kind1 name1, kind2 name2, \ - kind3 name3, kind4 name4, kind5 name5, kind6 name6, kind7 name7, \ - kind8 name8 -#define GMOCK_INTERNAL_DECL_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \ - name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \ - name6, kind7, name7, kind8, name8, kind9, name9) kind0 name0, \ - kind1 name1, kind2 name2, kind3 name3, kind4 name4, kind5 name5, \ - kind6 name6, kind7 name7, kind8 name8, kind9 name9 - -// Lists the template parameters. -#define GMOCK_INTERNAL_LIST_HAS_1_TEMPLATE_PARAMS(kind0, name0) name0 -#define GMOCK_INTERNAL_LIST_HAS_2_TEMPLATE_PARAMS(kind0, name0, kind1, \ - name1) name0, name1 -#define GMOCK_INTERNAL_LIST_HAS_3_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2) name0, name1, name2 -#define GMOCK_INTERNAL_LIST_HAS_4_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3) name0, name1, name2, name3 -#define GMOCK_INTERNAL_LIST_HAS_5_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4) name0, name1, name2, name3, \ - name4 -#define GMOCK_INTERNAL_LIST_HAS_6_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5) name0, name1, \ - name2, name3, name4, name5 -#define GMOCK_INTERNAL_LIST_HAS_7_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \ - name6) name0, name1, name2, name3, name4, name5, name6 -#define GMOCK_INTERNAL_LIST_HAS_8_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \ - kind7, name7) name0, name1, name2, name3, name4, name5, name6, name7 -#define GMOCK_INTERNAL_LIST_HAS_9_TEMPLATE_PARAMS(kind0, name0, kind1, name1, \ - kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, name6, \ - kind7, name7, kind8, name8) name0, name1, name2, name3, name4, name5, \ - name6, name7, name8 -#define GMOCK_INTERNAL_LIST_HAS_10_TEMPLATE_PARAMS(kind0, name0, kind1, \ - name1, kind2, name2, kind3, name3, kind4, name4, kind5, name5, kind6, \ - name6, kind7, name7, kind8, name8, kind9, name9) name0, name1, name2, \ - name3, name4, name5, name6, name7, name8, name9 - -// Declares the types of value parameters. -#define GMOCK_INTERNAL_DECL_TYPE_AND_0_VALUE_PARAMS() -#define GMOCK_INTERNAL_DECL_TYPE_AND_1_VALUE_PARAMS(p0) , typename p0##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_2_VALUE_PARAMS(p0, p1) , \ - typename p0##_type, typename p1##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , \ - typename p0##_type, typename p1##_type, typename p2##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \ - typename p0##_type, typename p1##_type, typename p2##_type, \ - typename p3##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \ - typename p0##_type, typename p1##_type, typename p2##_type, \ - typename p3##_type, typename p4##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \ - typename p0##_type, typename p1##_type, typename p2##_type, \ - typename p3##_type, typename p4##_type, typename p5##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6) , typename p0##_type, typename p1##_type, typename p2##_type, \ - typename p3##_type, typename p4##_type, typename p5##_type, \ - typename p6##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6, p7) , typename p0##_type, typename p1##_type, typename p2##_type, \ - typename p3##_type, typename p4##_type, typename p5##_type, \ - typename p6##_type, typename p7##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6, p7, p8) , typename p0##_type, typename p1##_type, typename p2##_type, \ - typename p3##_type, typename p4##_type, typename p5##_type, \ - typename p6##_type, typename p7##_type, typename p8##_type -#define GMOCK_INTERNAL_DECL_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6, p7, p8, p9) , typename p0##_type, typename p1##_type, \ - typename p2##_type, typename p3##_type, typename p4##_type, \ - typename p5##_type, typename p6##_type, typename p7##_type, \ - typename p8##_type, typename p9##_type - -// Initializes the value parameters. -#define GMOCK_INTERNAL_INIT_AND_0_VALUE_PARAMS()\ - () -#define GMOCK_INTERNAL_INIT_AND_1_VALUE_PARAMS(p0)\ - (p0##_type gmock_p0) : p0(::testing::internal::move(gmock_p0)) -#define GMOCK_INTERNAL_INIT_AND_2_VALUE_PARAMS(p0, p1)\ - (p0##_type gmock_p0, \ - p1##_type gmock_p1) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)) -#define GMOCK_INTERNAL_INIT_AND_3_VALUE_PARAMS(p0, p1, p2)\ - (p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)) -#define GMOCK_INTERNAL_INIT_AND_4_VALUE_PARAMS(p0, p1, p2, p3)\ - (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)) -#define GMOCK_INTERNAL_INIT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)\ - (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, \ - p4##_type gmock_p4) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)) -#define GMOCK_INTERNAL_INIT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)\ - (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)) -#define GMOCK_INTERNAL_INIT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)\ - (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)), \ - p6(::testing::internal::move(gmock_p6)) -#define GMOCK_INTERNAL_INIT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)\ - (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, \ - p7##_type gmock_p7) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)), \ - p6(::testing::internal::move(gmock_p6)), \ - p7(::testing::internal::move(gmock_p7)) -#define GMOCK_INTERNAL_INIT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8)\ - (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7, \ - p8##_type gmock_p8) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)), \ - p6(::testing::internal::move(gmock_p6)), \ - p7(::testing::internal::move(gmock_p7)), \ - p8(::testing::internal::move(gmock_p8)) -#define GMOCK_INTERNAL_INIT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8, p9)\ - (p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \ - p9##_type gmock_p9) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)), \ - p6(::testing::internal::move(gmock_p6)), \ - p7(::testing::internal::move(gmock_p7)), \ - p8(::testing::internal::move(gmock_p8)), \ - p9(::testing::internal::move(gmock_p9)) - -// Declares the fields for storing the value parameters. -#define GMOCK_INTERNAL_DEFN_AND_0_VALUE_PARAMS() -#define GMOCK_INTERNAL_DEFN_AND_1_VALUE_PARAMS(p0) p0##_type p0; -#define GMOCK_INTERNAL_DEFN_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0; \ - p1##_type p1; -#define GMOCK_INTERNAL_DEFN_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0; \ - p1##_type p1; p2##_type p2; -#define GMOCK_INTERNAL_DEFN_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0; \ - p1##_type p1; p2##_type p2; p3##_type p3; -#define GMOCK_INTERNAL_DEFN_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \ - p4) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; -#define GMOCK_INTERNAL_DEFN_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \ - p5) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \ - p5##_type p5; -#define GMOCK_INTERNAL_DEFN_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \ - p5##_type p5; p6##_type p6; -#define GMOCK_INTERNAL_DEFN_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; p4##_type p4; \ - p5##_type p5; p6##_type p6; p7##_type p7; -#define GMOCK_INTERNAL_DEFN_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \ - p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; -#define GMOCK_INTERNAL_DEFN_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8, p9) p0##_type p0; p1##_type p1; p2##_type p2; p3##_type p3; \ - p4##_type p4; p5##_type p5; p6##_type p6; p7##_type p7; p8##_type p8; \ - p9##_type p9; - -// Lists the value parameters. -#define GMOCK_INTERNAL_LIST_AND_0_VALUE_PARAMS() -#define GMOCK_INTERNAL_LIST_AND_1_VALUE_PARAMS(p0) p0 -#define GMOCK_INTERNAL_LIST_AND_2_VALUE_PARAMS(p0, p1) p0, p1 -#define GMOCK_INTERNAL_LIST_AND_3_VALUE_PARAMS(p0, p1, p2) p0, p1, p2 -#define GMOCK_INTERNAL_LIST_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0, p1, p2, p3 -#define GMOCK_INTERNAL_LIST_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) p0, p1, \ - p2, p3, p4 -#define GMOCK_INTERNAL_LIST_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) p0, \ - p1, p2, p3, p4, p5 -#define GMOCK_INTERNAL_LIST_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6) p0, p1, p2, p3, p4, p5, p6 -#define GMOCK_INTERNAL_LIST_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7) p0, p1, p2, p3, p4, p5, p6, p7 -#define GMOCK_INTERNAL_LIST_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8) p0, p1, p2, p3, p4, p5, p6, p7, p8 -#define GMOCK_INTERNAL_LIST_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8, p9) p0, p1, p2, p3, p4, p5, p6, p7, p8, p9 - -// Lists the value parameter types. -#define GMOCK_INTERNAL_LIST_TYPE_AND_0_VALUE_PARAMS() -#define GMOCK_INTERNAL_LIST_TYPE_AND_1_VALUE_PARAMS(p0) , p0##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_2_VALUE_PARAMS(p0, p1) , p0##_type, \ - p1##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_3_VALUE_PARAMS(p0, p1, p2) , p0##_type, \ - p1##_type, p2##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_4_VALUE_PARAMS(p0, p1, p2, p3) , \ - p0##_type, p1##_type, p2##_type, p3##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) , \ - p0##_type, p1##_type, p2##_type, p3##_type, p4##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) , \ - p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, p5##_type, \ - p6##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6, p7) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \ - p5##_type, p6##_type, p7##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6, p7, p8) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \ - p5##_type, p6##_type, p7##_type, p8##_type -#define GMOCK_INTERNAL_LIST_TYPE_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6, p7, p8, p9) , p0##_type, p1##_type, p2##_type, p3##_type, p4##_type, \ - p5##_type, p6##_type, p7##_type, p8##_type, p9##_type - -// Declares the value parameters. -#define GMOCK_INTERNAL_DECL_AND_0_VALUE_PARAMS() -#define GMOCK_INTERNAL_DECL_AND_1_VALUE_PARAMS(p0) p0##_type p0 -#define GMOCK_INTERNAL_DECL_AND_2_VALUE_PARAMS(p0, p1) p0##_type p0, \ - p1##_type p1 -#define GMOCK_INTERNAL_DECL_AND_3_VALUE_PARAMS(p0, p1, p2) p0##_type p0, \ - p1##_type p1, p2##_type p2 -#define GMOCK_INTERNAL_DECL_AND_4_VALUE_PARAMS(p0, p1, p2, p3) p0##_type p0, \ - p1##_type p1, p2##_type p2, p3##_type p3 -#define GMOCK_INTERNAL_DECL_AND_5_VALUE_PARAMS(p0, p1, p2, p3, \ - p4) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4 -#define GMOCK_INTERNAL_DECL_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, \ - p5) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \ - p5##_type p5 -#define GMOCK_INTERNAL_DECL_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, \ - p6) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \ - p5##_type p5, p6##_type p6 -#define GMOCK_INTERNAL_DECL_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, \ - p5##_type p5, p6##_type p6, p7##_type p7 -#define GMOCK_INTERNAL_DECL_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8 -#define GMOCK_INTERNAL_DECL_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8, p9) p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \ - p9##_type p9 - -// The suffix of the class template implementing the action template. -#define GMOCK_INTERNAL_COUNT_AND_0_VALUE_PARAMS() -#define GMOCK_INTERNAL_COUNT_AND_1_VALUE_PARAMS(p0) P -#define GMOCK_INTERNAL_COUNT_AND_2_VALUE_PARAMS(p0, p1) P2 -#define GMOCK_INTERNAL_COUNT_AND_3_VALUE_PARAMS(p0, p1, p2) P3 -#define GMOCK_INTERNAL_COUNT_AND_4_VALUE_PARAMS(p0, p1, p2, p3) P4 -#define GMOCK_INTERNAL_COUNT_AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4) P5 -#define GMOCK_INTERNAL_COUNT_AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5) P6 -#define GMOCK_INTERNAL_COUNT_AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6) P7 -#define GMOCK_INTERNAL_COUNT_AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7) P8 -#define GMOCK_INTERNAL_COUNT_AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8) P9 -#define GMOCK_INTERNAL_COUNT_AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, \ - p7, p8, p9) P10 - -// The name of the class template implementing the action template. -#define GMOCK_ACTION_CLASS_(name, value_params)\ - GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params) - -#define ACTION_TEMPLATE(name, template_params, value_params)\ - template \ - class GMOCK_ACTION_CLASS_(name, value_params) {\ - public:\ - explicit GMOCK_ACTION_CLASS_(name, value_params)\ - GMOCK_INTERNAL_INIT_##value_params {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - explicit gmock_Impl GMOCK_INTERNAL_INIT_##value_params {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - GMOCK_INTERNAL_DEFN_##value_params\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(\ - new gmock_Impl(GMOCK_INTERNAL_LIST_##value_params));\ - }\ - GMOCK_INTERNAL_DEFN_##value_params\ - private:\ - GTEST_DISALLOW_ASSIGN_(GMOCK_ACTION_CLASS_(name, value_params));\ - };\ - template \ - inline GMOCK_ACTION_CLASS_(name, value_params)<\ - GMOCK_INTERNAL_LIST_##template_params\ - GMOCK_INTERNAL_LIST_TYPE_##value_params> name(\ - GMOCK_INTERNAL_DECL_##value_params) {\ - return GMOCK_ACTION_CLASS_(name, value_params)<\ - GMOCK_INTERNAL_LIST_##template_params\ - GMOCK_INTERNAL_LIST_TYPE_##value_params>(\ - GMOCK_INTERNAL_LIST_##value_params);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - GMOCK_ACTION_CLASS_(name, value_params)<\ - GMOCK_INTERNAL_LIST_##template_params\ - GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl::\ - gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION(name)\ - class name##Action {\ - public:\ - name##Action() {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl() {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl());\ - }\ - private:\ - GTEST_DISALLOW_ASSIGN_(name##Action);\ - };\ - inline name##Action name() {\ - return name##Action();\ - }\ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##Action::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P(name, p0)\ - template \ - class name##ActionP {\ - public:\ - explicit name##ActionP(p0##_type gmock_p0) : \ - p0(::testing::internal::forward(gmock_p0)) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - explicit gmock_Impl(p0##_type gmock_p0) : \ - p0(::testing::internal::forward(gmock_p0)) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0));\ - }\ - p0##_type p0;\ - private:\ - GTEST_DISALLOW_ASSIGN_(name##ActionP);\ - };\ - template \ - inline name##ActionP name(p0##_type p0) {\ - return name##ActionP(p0);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P2(name, p0, p1)\ - template \ - class name##ActionP2 {\ - public:\ - name##ActionP2(p0##_type gmock_p0, \ - p1##_type gmock_p1) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, \ - p1##_type gmock_p1) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - private:\ - GTEST_DISALLOW_ASSIGN_(name##ActionP2);\ - };\ - template \ - inline name##ActionP2 name(p0##_type p0, \ - p1##_type p1) {\ - return name##ActionP2(p0, p1);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP2::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P3(name, p0, p1, p2)\ - template \ - class name##ActionP3 {\ - public:\ - name##ActionP3(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - private:\ - GTEST_DISALLOW_ASSIGN_(name##ActionP3);\ - };\ - template \ - inline name##ActionP3 name(p0##_type p0, \ - p1##_type p1, p2##_type p2) {\ - return name##ActionP3(p0, p1, p2);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP3::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P4(name, p0, p1, p2, p3)\ - template \ - class name##ActionP4 {\ - public:\ - name##ActionP4(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, \ - p3##_type gmock_p3) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)), \ - p3(::testing::internal::forward(gmock_p3)) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)), \ - p3(::testing::internal::forward(gmock_p3)) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2, p3));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - private:\ - GTEST_DISALLOW_ASSIGN_(name##ActionP4);\ - };\ - template \ - inline name##ActionP4 name(p0##_type p0, p1##_type p1, p2##_type p2, \ - p3##_type p3) {\ - return name##ActionP4(p0, p1, \ - p2, p3);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP4::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P5(name, p0, p1, p2, p3, p4)\ - template \ - class name##ActionP5 {\ - public:\ - name##ActionP5(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, \ - p4##_type gmock_p4) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)), \ - p3(::testing::internal::forward(gmock_p3)), \ - p4(::testing::internal::forward(gmock_p4)) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, \ - p4##_type gmock_p4) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)), \ - p3(::testing::internal::forward(gmock_p3)), \ - p4(::testing::internal::forward(gmock_p4)) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - private:\ - GTEST_DISALLOW_ASSIGN_(name##ActionP5);\ - };\ - template \ - inline name##ActionP5 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4) {\ - return name##ActionP5(p0, p1, p2, p3, p4);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP5::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P6(name, p0, p1, p2, p3, p4, p5)\ - template \ - class name##ActionP6 {\ - public:\ - name##ActionP6(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)), \ - p3(::testing::internal::forward(gmock_p3)), \ - p4(::testing::internal::forward(gmock_p4)), \ - p5(::testing::internal::forward(gmock_p5)) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)), \ - p3(::testing::internal::forward(gmock_p3)), \ - p4(::testing::internal::forward(gmock_p4)), \ - p5(::testing::internal::forward(gmock_p5)) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - private:\ - GTEST_DISALLOW_ASSIGN_(name##ActionP6);\ - };\ - template \ - inline name##ActionP6 name(p0##_type p0, p1##_type p1, p2##_type p2, \ - p3##_type p3, p4##_type p4, p5##_type p5) {\ - return name##ActionP6(p0, p1, p2, p3, p4, p5);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP6::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P7(name, p0, p1, p2, p3, p4, p5, p6)\ - template \ - class name##ActionP7 {\ - public:\ - name##ActionP7(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, \ - p6##_type gmock_p6) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)), \ - p3(::testing::internal::forward(gmock_p3)), \ - p4(::testing::internal::forward(gmock_p4)), \ - p5(::testing::internal::forward(gmock_p5)), \ - p6(::testing::internal::forward(gmock_p6)) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)), \ - p3(::testing::internal::forward(gmock_p3)), \ - p4(::testing::internal::forward(gmock_p4)), \ - p5(::testing::internal::forward(gmock_p5)), \ - p6(::testing::internal::forward(gmock_p6)) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5, \ - p6));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - private:\ - GTEST_DISALLOW_ASSIGN_(name##ActionP7);\ - };\ - template \ - inline name##ActionP7 name(p0##_type p0, p1##_type p1, \ - p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \ - p6##_type p6) {\ - return name##ActionP7(p0, p1, p2, p3, p4, p5, p6);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP7::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P8(name, p0, p1, p2, p3, p4, p5, p6, p7)\ - template \ - class name##ActionP8 {\ - public:\ - name##ActionP8(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, p6##_type gmock_p6, \ - p7##_type gmock_p7) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)), \ - p3(::testing::internal::forward(gmock_p3)), \ - p4(::testing::internal::forward(gmock_p4)), \ - p5(::testing::internal::forward(gmock_p5)), \ - p6(::testing::internal::forward(gmock_p6)), \ - p7(::testing::internal::forward(gmock_p7)) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, \ - p7##_type gmock_p7) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)), \ - p3(::testing::internal::forward(gmock_p3)), \ - p4(::testing::internal::forward(gmock_p4)), \ - p5(::testing::internal::forward(gmock_p5)), \ - p6(::testing::internal::forward(gmock_p6)), \ - p7(::testing::internal::forward(gmock_p7)) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5, \ - p6, p7));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - private:\ - GTEST_DISALLOW_ASSIGN_(name##ActionP8);\ - };\ - template \ - inline name##ActionP8 name(p0##_type p0, \ - p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \ - p6##_type p6, p7##_type p7) {\ - return name##ActionP8(p0, p1, p2, p3, p4, p5, \ - p6, p7);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP8::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8)\ - template \ - class name##ActionP9 {\ - public:\ - name##ActionP9(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \ - p8##_type gmock_p8) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)), \ - p3(::testing::internal::forward(gmock_p3)), \ - p4(::testing::internal::forward(gmock_p4)), \ - p5(::testing::internal::forward(gmock_p5)), \ - p6(::testing::internal::forward(gmock_p6)), \ - p7(::testing::internal::forward(gmock_p7)), \ - p8(::testing::internal::forward(gmock_p8)) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7, \ - p8##_type gmock_p8) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)), \ - p3(::testing::internal::forward(gmock_p3)), \ - p4(::testing::internal::forward(gmock_p4)), \ - p5(::testing::internal::forward(gmock_p5)), \ - p6(::testing::internal::forward(gmock_p6)), \ - p7(::testing::internal::forward(gmock_p7)), \ - p8(::testing::internal::forward(gmock_p8)) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - p8##_type p8;\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5, \ - p6, p7, p8));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - p8##_type p8;\ - private:\ - GTEST_DISALLOW_ASSIGN_(name##ActionP9);\ - };\ - template \ - inline name##ActionP9 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \ - p8##_type p8) {\ - return name##ActionP9(p0, p1, p2, \ - p3, p4, p5, p6, p7, p8);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP9::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -#define ACTION_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)\ - template \ - class name##ActionP10 {\ - public:\ - name##ActionP10(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \ - p8##_type gmock_p8, \ - p9##_type gmock_p9) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)), \ - p3(::testing::internal::forward(gmock_p3)), \ - p4(::testing::internal::forward(gmock_p4)), \ - p5(::testing::internal::forward(gmock_p5)), \ - p6(::testing::internal::forward(gmock_p6)), \ - p7(::testing::internal::forward(gmock_p7)), \ - p8(::testing::internal::forward(gmock_p8)), \ - p9(::testing::internal::forward(gmock_p9)) {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \ - p9##_type gmock_p9) : p0(::testing::internal::forward(gmock_p0)), \ - p1(::testing::internal::forward(gmock_p1)), \ - p2(::testing::internal::forward(gmock_p2)), \ - p3(::testing::internal::forward(gmock_p3)), \ - p4(::testing::internal::forward(gmock_p4)), \ - p5(::testing::internal::forward(gmock_p5)), \ - p6(::testing::internal::forward(gmock_p6)), \ - p7(::testing::internal::forward(gmock_p7)), \ - p8(::testing::internal::forward(gmock_p8)), \ - p9(::testing::internal::forward(gmock_p9)) {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template \ - return_type gmock_PerformImpl(const args_type& args, arg0_type arg0, \ - arg1_type arg1, arg2_type arg2, arg3_type arg3, arg4_type arg4, \ - arg5_type arg5, arg6_type arg6, arg7_type arg7, arg8_type arg8, \ - arg9_type arg9) const;\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - p8##_type p8;\ - p9##_type p9;\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl(p0, p1, p2, p3, p4, p5, \ - p6, p7, p8, p9));\ - }\ - p0##_type p0;\ - p1##_type p1;\ - p2##_type p2;\ - p3##_type p3;\ - p4##_type p4;\ - p5##_type p5;\ - p6##_type p6;\ - p7##_type p7;\ - p8##_type p8;\ - p9##_type p9;\ - private:\ - GTEST_DISALLOW_ASSIGN_(name##ActionP10);\ - };\ - template \ - inline name##ActionP10 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \ - p9##_type p9) {\ - return name##ActionP10(p0, \ - p1, p2, p3, p4, p5, p6, p7, p8, p9);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - name##ActionP10::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -namespace testing { - - -// The ACTION*() macros trigger warning C4100 (unreferenced formal -// parameter) in MSVC with -W4. Unfortunately they cannot be fixed in -// the macro definition, as the warnings are generated when the macro -// is expanded and macro expansion cannot contain #pragma. Therefore -// we suppress them here. -#ifdef _MSC_VER -# pragma warning(push) -# pragma warning(disable:4100) -#endif - -// Various overloads for InvokeArgument(). -// -// The InvokeArgument(a1, a2, ..., a_k) action invokes the N-th -// (0-based) argument, which must be a k-ary callable, of the mock -// function, with arguments a1, a2, ..., a_k. -// -// Notes: -// -// 1. The arguments are passed by value by default. If you need to -// pass an argument by reference, wrap it inside ByRef(). For -// example, -// -// InvokeArgument<1>(5, string("Hello"), ByRef(foo)) -// -// passes 5 and string("Hello") by value, and passes foo by -// reference. -// -// 2. If the callable takes an argument by reference but ByRef() is -// not used, it will receive the reference to a copy of the value, -// instead of the original value. For example, when the 0-th -// argument of the mock function takes a const string&, the action -// -// InvokeArgument<0>(string("Hello")) -// -// makes a copy of the temporary string("Hello") object and passes a -// reference of the copy, instead of the original temporary object, -// to the callable. This makes it easy for a user to define an -// InvokeArgument action from temporary values and have it performed -// later. - -namespace internal { -namespace invoke_argument { - -// Appears in InvokeArgumentAdl's argument list to help avoid -// accidental calls to user functions of the same name. -struct AdlTag {}; - -// InvokeArgumentAdl - a helper for InvokeArgument. -// The basic overloads are provided here for generic functors. -// Overloads for other custom-callables are provided in the -// internal/custom/callback-actions.h header. - -template -R InvokeArgumentAdl(AdlTag, F f) { - return f(); -} -template -R InvokeArgumentAdl(AdlTag, F f, A1 a1) { - return f(a1); -} -template -R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2) { - return f(a1, a2); -} -template -R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3) { - return f(a1, a2, a3); -} -template -R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4) { - return f(a1, a2, a3, a4); -} -template -R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { - return f(a1, a2, a3, a4, a5); -} -template -R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { - return f(a1, a2, a3, a4, a5, a6); -} -template -R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, - A7 a7) { - return f(a1, a2, a3, a4, a5, a6, a7); -} -template -R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, - A7 a7, A8 a8) { - return f(a1, a2, a3, a4, a5, a6, a7, a8); -} -template -R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, - A7 a7, A8 a8, A9 a9) { - return f(a1, a2, a3, a4, a5, a6, a7, a8, a9); -} -template -R InvokeArgumentAdl(AdlTag, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, - A7 a7, A8 a8, A9 a9, A10 a10) { - return f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); -} -} // namespace invoke_argument -} // namespace internal - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_0_VALUE_PARAMS()) { - using internal::invoke_argument::InvokeArgumentAdl; - return InvokeArgumentAdl( - internal::invoke_argument::AdlTag(), - ::std::get(args)); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_1_VALUE_PARAMS(p0)) { - using internal::invoke_argument::InvokeArgumentAdl; - return InvokeArgumentAdl( - internal::invoke_argument::AdlTag(), - ::std::get(args), p0); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_2_VALUE_PARAMS(p0, p1)) { - using internal::invoke_argument::InvokeArgumentAdl; - return InvokeArgumentAdl( - internal::invoke_argument::AdlTag(), - ::std::get(args), p0, p1); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_3_VALUE_PARAMS(p0, p1, p2)) { - using internal::invoke_argument::InvokeArgumentAdl; - return InvokeArgumentAdl( - internal::invoke_argument::AdlTag(), - ::std::get(args), p0, p1, p2); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_4_VALUE_PARAMS(p0, p1, p2, p3)) { - using internal::invoke_argument::InvokeArgumentAdl; - return InvokeArgumentAdl( - internal::invoke_argument::AdlTag(), - ::std::get(args), p0, p1, p2, p3); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) { - using internal::invoke_argument::InvokeArgumentAdl; - return InvokeArgumentAdl( - internal::invoke_argument::AdlTag(), - ::std::get(args), p0, p1, p2, p3, p4); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) { - using internal::invoke_argument::InvokeArgumentAdl; - return InvokeArgumentAdl( - internal::invoke_argument::AdlTag(), - ::std::get(args), p0, p1, p2, p3, p4, p5); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) { - using internal::invoke_argument::InvokeArgumentAdl; - return InvokeArgumentAdl( - internal::invoke_argument::AdlTag(), - ::std::get(args), p0, p1, p2, p3, p4, p5, p6); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) { - using internal::invoke_argument::InvokeArgumentAdl; - return InvokeArgumentAdl( - internal::invoke_argument::AdlTag(), - ::std::get(args), p0, p1, p2, p3, p4, p5, p6, p7); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) { - using internal::invoke_argument::InvokeArgumentAdl; - return InvokeArgumentAdl( - internal::invoke_argument::AdlTag(), - ::std::get(args), p0, p1, p2, p3, p4, p5, p6, p7, p8); -} - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) { - using internal::invoke_argument::InvokeArgumentAdl; - return InvokeArgumentAdl( - internal::invoke_argument::AdlTag(), - ::std::get(args), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); -} - -// Various overloads for ReturnNew(). -// -// The ReturnNew(a1, a2, ..., a_k) action returns a pointer to a new -// instance of type T, constructed on the heap with constructor arguments -// a1, a2, ..., and a_k. The caller assumes ownership of the returned value. -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_0_VALUE_PARAMS()) { - return new T(); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_1_VALUE_PARAMS(p0)) { - return new T(p0); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_2_VALUE_PARAMS(p0, p1)) { - return new T(p0, p1); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_3_VALUE_PARAMS(p0, p1, p2)) { - return new T(p0, p1, p2); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_4_VALUE_PARAMS(p0, p1, p2, p3)) { - return new T(p0, p1, p2, p3); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_5_VALUE_PARAMS(p0, p1, p2, p3, p4)) { - return new T(p0, p1, p2, p3, p4); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_6_VALUE_PARAMS(p0, p1, p2, p3, p4, p5)) { - return new T(p0, p1, p2, p3, p4, p5); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_7_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6)) { - return new T(p0, p1, p2, p3, p4, p5, p6); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_8_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7)) { - return new T(p0, p1, p2, p3, p4, p5, p6, p7); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_9_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8)) { - return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8); -} - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_10_VALUE_PARAMS(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)) { - return new T(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); -} - -#ifdef _MSC_VER -# pragma warning(pop) -#endif - -} // namespace testing - -// Include any custom callback actions added by the local installation. -// We must include this header at the end to make sure it can use the -// declarations from this file. -#include "gmock/internal/custom/gmock-generated-actions.h" - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h.pump b/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h.pump deleted file mode 100644 index 2794ebb7..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h.pump +++ /dev/null @@ -1,833 +0,0 @@ -$$ -*- mode: c++; -*- -$$ This is a Pump source file. Please use Pump to convert it to -$$ gmock-generated-actions.h. -$$ -$var n = 10 $$ The maximum arity we support. -$$}} This meta comment fixes auto-indentation in editors. -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements some commonly used variadic actions. - -// GOOGLETEST_CM0002 DO NOT DELETE - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ - -#include "gmock/gmock-actions.h" -#include "gmock/internal/gmock-port.h" - -namespace testing { -namespace internal { - -// InvokeHelper knows how to unpack an N-tuple and invoke an N-ary -// function, method, or callback with the unpacked values, where F is -// a function type that takes N arguments. -template -class InvokeHelper; - - -$var max_callback_arity = 5 -$range i 0..n -$for i [[ -$range j 1..i -$var types = [[$for j [[, typename A$j]]]] -$var as = [[$for j, [[A$j]]]] -$var args = [[$if i==0 [[]] $else [[ args]]]] -$var gets = [[$for j, [[std::get<$(j - 1)>(args)]]]] -template -class InvokeHelper > { - public: - template - static R Invoke(Function function, const ::std::tuple<$as>&$args) { - return function($gets); - } - - template - static R InvokeMethod(Class* obj_ptr, - MethodPtr method_ptr, - const ::std::tuple<$as>&$args) { - return (obj_ptr->*method_ptr)($gets); - } - - -$if i <= max_callback_arity [[ - template - static R InvokeCallback(CallbackType* callback, - const ::std::tuple<$as>&$args) { - return callback->Run($gets); - } -]] $else [[ - // There is no InvokeCallback() for $i-tuples -]] - -}; - - -]] -// Implements the Invoke(callback) action. -template -class InvokeCallbackAction { - public: - // The c'tor takes ownership of the callback. - explicit InvokeCallbackAction(CallbackType* callback) - : callback_(callback) { - callback->CheckIsRepeatable(); // Makes sure the callback is permanent. - } - - // This type conversion operator template allows Invoke(callback) to - // be used wherever the callback's type is compatible with that of - // the mock function, i.e. if the mock function's arguments can be - // implicitly converted to the callback's arguments and the - // callback's result can be implicitly converted to the mock - // function's result. - template - Result Perform(const ArgumentTuple& args) const { - return InvokeHelper::InvokeCallback( - callback_.get(), args); - } - private: - const linked_ptr callback_; -}; - -// An INTERNAL macro for extracting the type of a tuple field. It's -// subject to change without notice - DO NOT USE IN USER CODE! -#define GMOCK_FIELD_(Tuple, N) \ - typename ::std::tuple_element::type - -$range i 1..n - -// SelectArgs::type is the -// type of an n-ary function whose i-th (1-based) argument type is the -// k{i}-th (0-based) field of ArgumentTuple, which must be a tuple -// type, and whose return type is Result. For example, -// SelectArgs, 0, 3>::type -// is int(bool, long). -// -// SelectArgs::Select(args) -// returns the selected fields (k1, k2, ..., k_n) of args as a tuple. -// For example, -// SelectArgs, 2, 0>::Select( -// ::std::make_tuple(true, 'a', 2.5)) -// returns tuple (2.5, true). -// -// The numbers in list k1, k2, ..., k_n must be >= 0, where n can be -// in the range [0, $n]. Duplicates are allowed and they don't have -// to be in an ascending or descending order. - -template -class SelectArgs { - public: - typedef Result type($for i, [[GMOCK_FIELD_(ArgumentTuple, k$i)]]); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& args) { - return SelectedArgs($for i, [[std::get(args)]]); - } -}; - - -$for i [[ -$range j 1..n -$range j1 1..i-1 -template -class SelectArgs { - public: - typedef Result type($for j1, [[GMOCK_FIELD_(ArgumentTuple, k$j1)]]); - typedef typename Function::ArgumentTuple SelectedArgs; - static SelectedArgs Select(const ArgumentTuple& [[]] -$if i == 1 [[/* args */]] $else [[args]]) { - return SelectedArgs($for j1, [[std::get(args)]]); - } -}; - - -]] -#undef GMOCK_FIELD_ - -$var ks = [[$for i, [[k$i]]]] - -// Implements the WithArgs action. -template -class WithArgsAction { - public: - explicit WithArgsAction(const InnerAction& action) : action_(action) {} - - template - operator Action() const { return MakeAction(new Impl(action_)); } - - private: - template - class Impl : public ActionInterface { - public: - typedef typename Function::Result Result; - typedef typename Function::ArgumentTuple ArgumentTuple; - - explicit Impl(const InnerAction& action) : action_(action) {} - - virtual Result Perform(const ArgumentTuple& args) { - return action_.Perform(SelectArgs::Select(args)); - } - - private: - typedef typename SelectArgs::type InnerFunctionType; - - Action action_; - }; - - const InnerAction action_; - - GTEST_DISALLOW_ASSIGN_(WithArgsAction); -}; - -// A macro from the ACTION* family (defined later in this file) -// defines an action that can be used in a mock function. Typically, -// these actions only care about a subset of the arguments of the mock -// function. For example, if such an action only uses the second -// argument, it can be used in any mock function that takes >= 2 -// arguments where the type of the second argument is compatible. -// -// Therefore, the action implementation must be prepared to take more -// arguments than it needs. The ExcessiveArg type is used to -// represent those excessive arguments. In order to keep the compiler -// error messages tractable, we define it in the testing namespace -// instead of testing::internal. However, this is an INTERNAL TYPE -// and subject to change without notice, so a user MUST NOT USE THIS -// TYPE DIRECTLY. -struct ExcessiveArg {}; - -// A helper class needed for implementing the ACTION* macros. -template -class ActionHelper { - public: -$range i 0..n -$for i - -[[ -$var template = [[$if i==0 [[]] $else [[ -$range j 0..i-1 - template <$for j, [[typename A$j]]> -]]]] -$range j 0..i-1 -$var As = [[$for j, [[A$j]]]] -$var as = [[$for j, [[std::get<$j>(args)]]]] -$range k 1..n-i -$var eas = [[$for k, [[ExcessiveArg()]]]] -$var arg_list = [[$if (i==0) | (i==n) [[$as$eas]] $else [[$as, $eas]]]] -$template - static Result Perform(Impl* impl, const ::std::tuple<$As>& args) { - return impl->template gmock_PerformImpl<$As>(args, $arg_list); - } - -]] -}; - -} // namespace internal - -// Various overloads for Invoke(). - -// WithArgs(an_action) creates an action that passes -// the selected arguments of the mock function to an_action and -// performs it. It serves as an adaptor between actions with -// different argument lists. C++ doesn't support default arguments for -// function templates, so we have to overload it. - -$range i 1..n -$for i [[ -$range j 1..i -template <$for j [[int k$j, ]]typename InnerAction> -inline internal::WithArgsAction -WithArgs(const InnerAction& action) { - return internal::WithArgsAction(action); -} - - -]] -// Creates an action that does actions a1, a2, ..., sequentially in -// each invocation. -$range i 2..n -$for i [[ -$range j 2..i -$var types = [[$for j, [[typename Action$j]]]] -$var Aas = [[$for j [[, Action$j a$j]]]] - -template -$range k 1..i-1 - -inline $for k [[internal::DoBothAction]] - -DoAll(Action1 a1$Aas) { -$if i==2 [[ - - return internal::DoBothAction(a1, a2); -]] $else [[ -$range j2 2..i - - return DoAll(a1, DoAll($for j2, [[a$j2]])); -]] - -} - -]] - -} // namespace testing - -// The ACTION* family of macros can be used in a namespace scope to -// define custom actions easily. The syntax: -// -// ACTION(name) { statements; } -// -// will define an action with the given name that executes the -// statements. The value returned by the statements will be used as -// the return value of the action. Inside the statements, you can -// refer to the K-th (0-based) argument of the mock function by -// 'argK', and refer to its type by 'argK_type'. For example: -// -// ACTION(IncrementArg1) { -// arg1_type temp = arg1; -// return ++(*temp); -// } -// -// allows you to write -// -// ...WillOnce(IncrementArg1()); -// -// You can also refer to the entire argument tuple and its type by -// 'args' and 'args_type', and refer to the mock function type and its -// return type by 'function_type' and 'return_type'. -// -// Note that you don't need to specify the types of the mock function -// arguments. However rest assured that your code is still type-safe: -// you'll get a compiler error if *arg1 doesn't support the ++ -// operator, or if the type of ++(*arg1) isn't compatible with the -// mock function's return type, for example. -// -// Sometimes you'll want to parameterize the action. For that you can use -// another macro: -// -// ACTION_P(name, param_name) { statements; } -// -// For example: -// -// ACTION_P(Add, n) { return arg0 + n; } -// -// will allow you to write: -// -// ...WillOnce(Add(5)); -// -// Note that you don't need to provide the type of the parameter -// either. If you need to reference the type of a parameter named -// 'foo', you can write 'foo_type'. For example, in the body of -// ACTION_P(Add, n) above, you can write 'n_type' to refer to the type -// of 'n'. -// -// We also provide ACTION_P2, ACTION_P3, ..., up to ACTION_P$n to support -// multi-parameter actions. -// -// For the purpose of typing, you can view -// -// ACTION_Pk(Foo, p1, ..., pk) { ... } -// -// as shorthand for -// -// template -// FooActionPk Foo(p1_type p1, ..., pk_type pk) { ... } -// -// In particular, you can provide the template type arguments -// explicitly when invoking Foo(), as in Foo(5, false); -// although usually you can rely on the compiler to infer the types -// for you automatically. You can assign the result of expression -// Foo(p1, ..., pk) to a variable of type FooActionPk. This can be useful when composing actions. -// -// You can also overload actions with different numbers of parameters: -// -// ACTION_P(Plus, a) { ... } -// ACTION_P2(Plus, a, b) { ... } -// -// While it's tempting to always use the ACTION* macros when defining -// a new action, you should also consider implementing ActionInterface -// or using MakePolymorphicAction() instead, especially if you need to -// use the action a lot. While these approaches require more work, -// they give you more control on the types of the mock function -// arguments and the action parameters, which in general leads to -// better compiler error messages that pay off in the long run. They -// also allow overloading actions based on parameter types (as opposed -// to just based on the number of parameters). -// -// CAVEAT: -// -// ACTION*() can only be used in a namespace scope. The reason is -// that C++ doesn't yet allow function-local types to be used to -// instantiate templates. The up-coming C++0x standard will fix this. -// Once that's done, we'll consider supporting using ACTION*() inside -// a function. -// -// MORE INFORMATION: -// -// To learn more about using these macros, please search for 'ACTION' on -// https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md - -$range i 0..n -$range k 0..n-1 - -// An internal macro needed for implementing ACTION*(). -#define GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_\ - const args_type& args GTEST_ATTRIBUTE_UNUSED_ -$for k [[, \ - arg$k[[]]_type arg$k GTEST_ATTRIBUTE_UNUSED_]] - - -// Sometimes you want to give an action explicit template parameters -// that cannot be inferred from its value parameters. ACTION() and -// ACTION_P*() don't support that. ACTION_TEMPLATE() remedies that -// and can be viewed as an extension to ACTION() and ACTION_P*(). -// -// The syntax: -// -// ACTION_TEMPLATE(ActionName, -// HAS_m_TEMPLATE_PARAMS(kind1, name1, ..., kind_m, name_m), -// AND_n_VALUE_PARAMS(p1, ..., p_n)) { statements; } -// -// defines an action template that takes m explicit template -// parameters and n value parameters. name_i is the name of the i-th -// template parameter, and kind_i specifies whether it's a typename, -// an integral constant, or a template. p_i is the name of the i-th -// value parameter. -// -// Example: -// -// // DuplicateArg(output) converts the k-th argument of the mock -// // function to type T and copies it to *output. -// ACTION_TEMPLATE(DuplicateArg, -// HAS_2_TEMPLATE_PARAMS(int, k, typename, T), -// AND_1_VALUE_PARAMS(output)) { -// *output = T(::std::get(args)); -// } -// ... -// int n; -// EXPECT_CALL(mock, Foo(_, _)) -// .WillOnce(DuplicateArg<1, unsigned char>(&n)); -// -// To create an instance of an action template, write: -// -// ActionName(v1, ..., v_n) -// -// where the ts are the template arguments and the vs are the value -// arguments. The value argument types are inferred by the compiler. -// If you want to explicitly specify the value argument types, you can -// provide additional template arguments: -// -// ActionName(v1, ..., v_n) -// -// where u_i is the desired type of v_i. -// -// ACTION_TEMPLATE and ACTION/ACTION_P* can be overloaded on the -// number of value parameters, but not on the number of template -// parameters. Without the restriction, the meaning of the following -// is unclear: -// -// OverloadedAction(x); -// -// Are we using a single-template-parameter action where 'bool' refers -// to the type of x, or are we using a two-template-parameter action -// where the compiler is asked to infer the type of x? -// -// Implementation notes: -// -// GMOCK_INTERNAL_*_HAS_m_TEMPLATE_PARAMS and -// GMOCK_INTERNAL_*_AND_n_VALUE_PARAMS are internal macros for -// implementing ACTION_TEMPLATE. The main trick we use is to create -// new macro invocations when expanding a macro. For example, we have -// -// #define ACTION_TEMPLATE(name, template_params, value_params) -// ... GMOCK_INTERNAL_DECL_##template_params ... -// -// which causes ACTION_TEMPLATE(..., HAS_1_TEMPLATE_PARAMS(typename, T), ...) -// to expand to -// -// ... GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS(typename, T) ... -// -// Since GMOCK_INTERNAL_DECL_HAS_1_TEMPLATE_PARAMS is a macro, the -// preprocessor will continue to expand it to -// -// ... typename T ... -// -// This technique conforms to the C++ standard and is portable. It -// allows us to implement action templates using O(N) code, where N is -// the maximum number of template/value parameters supported. Without -// using it, we'd have to devote O(N^2) amount of code to implement all -// combinations of m and n. - -// Declares the template parameters. - -$range j 1..n -$for j [[ -$range m 0..j-1 -#define GMOCK_INTERNAL_DECL_HAS_$j[[]] -_TEMPLATE_PARAMS($for m, [[kind$m, name$m]]) $for m, [[kind$m name$m]] - - -]] - -// Lists the template parameters. - -$for j [[ -$range m 0..j-1 -#define GMOCK_INTERNAL_LIST_HAS_$j[[]] -_TEMPLATE_PARAMS($for m, [[kind$m, name$m]]) $for m, [[name$m]] - - -]] - -// Declares the types of value parameters. - -$for i [[ -$range j 0..i-1 -#define GMOCK_INTERNAL_DECL_TYPE_AND_$i[[]] -_VALUE_PARAMS($for j, [[p$j]]) $for j [[, typename p$j##_type]] - - -]] - -// Initializes the value parameters. - -$for i [[ -$range j 0..i-1 -#define GMOCK_INTERNAL_INIT_AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]])\ - ($for j, [[p$j##_type gmock_p$j]])$if i>0 [[ : ]]$for j, [[p$j(::testing::internal::move(gmock_p$j))]] - - -]] - -// Declares the fields for storing the value parameters. - -$for i [[ -$range j 0..i-1 -#define GMOCK_INTERNAL_DEFN_AND_$i[[]] -_VALUE_PARAMS($for j, [[p$j]]) $for j [[p$j##_type p$j; ]] - - -]] - -// Lists the value parameters. - -$for i [[ -$range j 0..i-1 -#define GMOCK_INTERNAL_LIST_AND_$i[[]] -_VALUE_PARAMS($for j, [[p$j]]) $for j, [[p$j]] - - -]] - -// Lists the value parameter types. - -$for i [[ -$range j 0..i-1 -#define GMOCK_INTERNAL_LIST_TYPE_AND_$i[[]] -_VALUE_PARAMS($for j, [[p$j]]) $for j [[, p$j##_type]] - - -]] - -// Declares the value parameters. - -$for i [[ -$range j 0..i-1 -#define GMOCK_INTERNAL_DECL_AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]]) [[]] -$for j, [[p$j##_type p$j]] - - -]] - -// The suffix of the class template implementing the action template. -$for i [[ - - -$range j 0..i-1 -#define GMOCK_INTERNAL_COUNT_AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]]) [[]] -$if i==1 [[P]] $elif i>=2 [[P$i]] -]] - - -// The name of the class template implementing the action template. -#define GMOCK_ACTION_CLASS_(name, value_params)\ - GTEST_CONCAT_TOKEN_(name##Action, GMOCK_INTERNAL_COUNT_##value_params) - -$range k 0..n-1 - -#define ACTION_TEMPLATE(name, template_params, value_params)\ - template \ - class GMOCK_ACTION_CLASS_(name, value_params) {\ - public:\ - explicit GMOCK_ACTION_CLASS_(name, value_params)\ - GMOCK_INTERNAL_INIT_##value_params {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - explicit gmock_Impl GMOCK_INTERNAL_INIT_##value_params {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template <$for k, [[typename arg$k[[]]_type]]>\ - return_type gmock_PerformImpl(const args_type& args[[]] -$for k [[, arg$k[[]]_type arg$k]]) const;\ - GMOCK_INTERNAL_DEFN_##value_params\ - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(\ - new gmock_Impl(GMOCK_INTERNAL_LIST_##value_params));\ - }\ - GMOCK_INTERNAL_DEFN_##value_params\ - private:\ - GTEST_DISALLOW_ASSIGN_(GMOCK_ACTION_CLASS_(name, value_params));\ - };\ - template \ - inline GMOCK_ACTION_CLASS_(name, value_params)<\ - GMOCK_INTERNAL_LIST_##template_params\ - GMOCK_INTERNAL_LIST_TYPE_##value_params> name(\ - GMOCK_INTERNAL_DECL_##value_params) {\ - return GMOCK_ACTION_CLASS_(name, value_params)<\ - GMOCK_INTERNAL_LIST_##template_params\ - GMOCK_INTERNAL_LIST_TYPE_##value_params>(\ - GMOCK_INTERNAL_LIST_##value_params);\ - }\ - template \ - template \ - template \ - typename ::testing::internal::Function::Result\ - GMOCK_ACTION_CLASS_(name, value_params)<\ - GMOCK_INTERNAL_LIST_##template_params\ - GMOCK_INTERNAL_LIST_TYPE_##value_params>::gmock_Impl::\ - gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const - -$for i - -[[ -$var template = [[$if i==0 [[]] $else [[ -$range j 0..i-1 - - template <$for j, [[typename p$j##_type]]>\ -]]]] -$var class_name = [[name##Action[[$if i==0 [[]] $elif i==1 [[P]] - $else [[P$i]]]]]] -$range j 0..i-1 -$var ctor_param_list = [[$for j, [[p$j##_type gmock_p$j]]]] -$var param_types_and_names = [[$for j, [[p$j##_type p$j]]]] -$var inits = [[$if i==0 [[]] $else [[ : $for j, [[p$j(::testing::internal::forward(gmock_p$j))]]]]]] -$var param_field_decls = [[$for j -[[ - - p$j##_type p$j;\ -]]]] -$var param_field_decls2 = [[$for j -[[ - - p$j##_type p$j;\ -]]]] -$var params = [[$for j, [[p$j]]]] -$var param_types = [[$if i==0 [[]] $else [[<$for j, [[p$j##_type]]>]]]] -$var typename_arg_types = [[$for k, [[typename arg$k[[]]_type]]]] -$var arg_types_and_names = [[$for k, [[arg$k[[]]_type arg$k]]]] -$var macro_name = [[$if i==0 [[ACTION]] $elif i==1 [[ACTION_P]] - $else [[ACTION_P$i]]]] - -#define $macro_name(name$for j [[, p$j]])\$template - class $class_name {\ - public:\ - [[$if i==1 [[explicit ]]]]$class_name($ctor_param_list)$inits {}\ - template \ - class gmock_Impl : public ::testing::ActionInterface {\ - public:\ - typedef F function_type;\ - typedef typename ::testing::internal::Function::Result return_type;\ - typedef typename ::testing::internal::Function::ArgumentTuple\ - args_type;\ - [[$if i==1 [[explicit ]]]]gmock_Impl($ctor_param_list)$inits {}\ - virtual return_type Perform(const args_type& args) {\ - return ::testing::internal::ActionHelper::\ - Perform(this, args);\ - }\ - template <$typename_arg_types>\ - return_type gmock_PerformImpl(const args_type& args, [[]] -$arg_types_and_names) const;\$param_field_decls - private:\ - GTEST_DISALLOW_ASSIGN_(gmock_Impl);\ - };\ - template operator ::testing::Action() const {\ - return ::testing::Action(new gmock_Impl($params));\ - }\$param_field_decls2 - private:\ - GTEST_DISALLOW_ASSIGN_($class_name);\ - };\$template - inline $class_name$param_types name($param_types_and_names) {\ - return $class_name$param_types($params);\ - }\$template - template \ - template <$typename_arg_types>\ - typename ::testing::internal::Function::Result\ - $class_name$param_types::gmock_Impl::gmock_PerformImpl(\ - GMOCK_ACTION_ARG_TYPES_AND_NAMES_UNUSED_) const -]] -$$ } // This meta comment fixes auto-indentation in Emacs. It won't -$$ // show up in the generated code. - - -namespace testing { - - -// The ACTION*() macros trigger warning C4100 (unreferenced formal -// parameter) in MSVC with -W4. Unfortunately they cannot be fixed in -// the macro definition, as the warnings are generated when the macro -// is expanded and macro expansion cannot contain #pragma. Therefore -// we suppress them here. -#ifdef _MSC_VER -# pragma warning(push) -# pragma warning(disable:4100) -#endif - -// Various overloads for InvokeArgument(). -// -// The InvokeArgument(a1, a2, ..., a_k) action invokes the N-th -// (0-based) argument, which must be a k-ary callable, of the mock -// function, with arguments a1, a2, ..., a_k. -// -// Notes: -// -// 1. The arguments are passed by value by default. If you need to -// pass an argument by reference, wrap it inside ByRef(). For -// example, -// -// InvokeArgument<1>(5, string("Hello"), ByRef(foo)) -// -// passes 5 and string("Hello") by value, and passes foo by -// reference. -// -// 2. If the callable takes an argument by reference but ByRef() is -// not used, it will receive the reference to a copy of the value, -// instead of the original value. For example, when the 0-th -// argument of the mock function takes a const string&, the action -// -// InvokeArgument<0>(string("Hello")) -// -// makes a copy of the temporary string("Hello") object and passes a -// reference of the copy, instead of the original temporary object, -// to the callable. This makes it easy for a user to define an -// InvokeArgument action from temporary values and have it performed -// later. - -namespace internal { -namespace invoke_argument { - -// Appears in InvokeArgumentAdl's argument list to help avoid -// accidental calls to user functions of the same name. -struct AdlTag {}; - -// InvokeArgumentAdl - a helper for InvokeArgument. -// The basic overloads are provided here for generic functors. -// Overloads for other custom-callables are provided in the -// internal/custom/callback-actions.h header. - -$range i 0..n -$for i -[[ -$range j 1..i - -template -R InvokeArgumentAdl(AdlTag, F f[[$for j [[, A$j a$j]]]]) { - return f([[$for j, [[a$j]]]]); -} -]] - -} // namespace invoke_argument -} // namespace internal - -$range i 0..n -$for i [[ -$range j 0..i-1 - -ACTION_TEMPLATE(InvokeArgument, - HAS_1_TEMPLATE_PARAMS(int, k), - AND_$i[[]]_VALUE_PARAMS($for j, [[p$j]])) { - using internal::invoke_argument::InvokeArgumentAdl; - return InvokeArgumentAdl( - internal::invoke_argument::AdlTag(), - ::std::get(args)$for j [[, p$j]]); -} - -]] - -// Various overloads for ReturnNew(). -// -// The ReturnNew(a1, a2, ..., a_k) action returns a pointer to a new -// instance of type T, constructed on the heap with constructor arguments -// a1, a2, ..., and a_k. The caller assumes ownership of the returned value. -$range i 0..n -$for i [[ -$range j 0..i-1 -$var ps = [[$for j, [[p$j]]]] - -ACTION_TEMPLATE(ReturnNew, - HAS_1_TEMPLATE_PARAMS(typename, T), - AND_$i[[]]_VALUE_PARAMS($ps)) { - return new T($ps); -} - -]] - -#ifdef _MSC_VER -# pragma warning(pop) -#endif - -} // namespace testing - -// Include any custom callback actions added by the local installation. -// We must include this header at the end to make sure it can use the -// declarations from this file. -#include "gmock/internal/custom/gmock-generated-actions.h" - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_ACTIONS_H_ diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h b/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h deleted file mode 100644 index 98861156..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h +++ /dev/null @@ -1,1333 +0,0 @@ -// This file was GENERATED by command: -// pump.py gmock-generated-function-mockers.h.pump -// DO NOT EDIT BY HAND!!! - -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements function mockers of various arities. - -// GOOGLETEST_CM0002 DO NOT DELETE - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ - -#include "gmock/gmock-spec-builders.h" -#include "gmock/internal/gmock-internal-utils.h" - -#if GTEST_HAS_STD_FUNCTION_ -# include -#endif - -namespace testing { -namespace internal { - -template -class FunctionMockerBase; - -// Note: class FunctionMocker really belongs to the ::testing -// namespace. However if we define it in ::testing, MSVC will -// complain when classes in ::testing::internal declare it as a -// friend class template. To workaround this compiler bug, we define -// FunctionMocker in ::testing::internal and import it into ::testing. -template -class FunctionMocker; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec With() { - return MockSpec(this, ::std::make_tuple()); - } - - R Invoke() { - // Even though gcc and MSVC don't enforce it, 'this->' is required - // by the C++ standard [14.6.4] here, as the base class type is - // dependent on the template argument (and thus shouldn't be - // looked into when resolving InvokeWith). - return this->InvokeWith(ArgumentTuple()); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec With(const Matcher& m1) { - return MockSpec(this, ::std::make_tuple(m1)); - } - - R Invoke(A1 a1) { - // Even though gcc and MSVC don't enforce it, 'this->' is required - // by the C++ standard [14.6.4] here, as the base class type is - // dependent on the template argument (and thus shouldn't be - // looked into when resolving InvokeWith). - return this->InvokeWith(ArgumentTuple(internal::forward(a1))); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec With(const Matcher& m1, const Matcher& m2) { - return MockSpec(this, ::std::make_tuple(m1, m2)); - } - - R Invoke(A1 a1, A2 a2) { - // Even though gcc and MSVC don't enforce it, 'this->' is required - // by the C++ standard [14.6.4] here, as the base class type is - // dependent on the template argument (and thus shouldn't be - // looked into when resolving InvokeWith). - return this->InvokeWith(ArgumentTuple(internal::forward(a1), - internal::forward(a2))); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec With(const Matcher& m1, const Matcher& m2, - const Matcher& m3) { - return MockSpec(this, ::std::make_tuple(m1, m2, m3)); - } - - R Invoke(A1 a1, A2 a2, A3 a3) { - // Even though gcc and MSVC don't enforce it, 'this->' is required - // by the C++ standard [14.6.4] here, as the base class type is - // dependent on the template argument (and thus shouldn't be - // looked into when resolving InvokeWith). - return this->InvokeWith(ArgumentTuple(internal::forward(a1), - internal::forward(a2), internal::forward(a3))); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3, A4); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec With(const Matcher& m1, const Matcher& m2, - const Matcher& m3, const Matcher& m4) { - return MockSpec(this, ::std::make_tuple(m1, m2, m3, m4)); - } - - R Invoke(A1 a1, A2 a2, A3 a3, A4 a4) { - // Even though gcc and MSVC don't enforce it, 'this->' is required - // by the C++ standard [14.6.4] here, as the base class type is - // dependent on the template argument (and thus shouldn't be - // looked into when resolving InvokeWith). - return this->InvokeWith(ArgumentTuple(internal::forward(a1), - internal::forward(a2), internal::forward(a3), - internal::forward(a4))); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3, A4, A5); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec With(const Matcher& m1, const Matcher& m2, - const Matcher& m3, const Matcher& m4, const Matcher& m5) { - return MockSpec(this, ::std::make_tuple(m1, m2, m3, m4, m5)); - } - - R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { - // Even though gcc and MSVC don't enforce it, 'this->' is required - // by the C++ standard [14.6.4] here, as the base class type is - // dependent on the template argument (and thus shouldn't be - // looked into when resolving InvokeWith). - return this->InvokeWith(ArgumentTuple(internal::forward(a1), - internal::forward(a2), internal::forward(a3), - internal::forward(a4), internal::forward(a5))); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3, A4, A5, A6); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec With(const Matcher& m1, const Matcher& m2, - const Matcher& m3, const Matcher& m4, const Matcher& m5, - const Matcher& m6) { - return MockSpec(this, ::std::make_tuple(m1, m2, m3, m4, m5, m6)); - } - - R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { - // Even though gcc and MSVC don't enforce it, 'this->' is required - // by the C++ standard [14.6.4] here, as the base class type is - // dependent on the template argument (and thus shouldn't be - // looked into when resolving InvokeWith). - return this->InvokeWith(ArgumentTuple(internal::forward(a1), - internal::forward(a2), internal::forward(a3), - internal::forward(a4), internal::forward(a5), - internal::forward(a6))); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3, A4, A5, A6, A7); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec With(const Matcher& m1, const Matcher& m2, - const Matcher& m3, const Matcher& m4, const Matcher& m5, - const Matcher& m6, const Matcher& m7) { - return MockSpec(this, ::std::make_tuple(m1, m2, m3, m4, m5, m6, m7)); - } - - R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { - // Even though gcc and MSVC don't enforce it, 'this->' is required - // by the C++ standard [14.6.4] here, as the base class type is - // dependent on the template argument (and thus shouldn't be - // looked into when resolving InvokeWith). - return this->InvokeWith(ArgumentTuple(internal::forward(a1), - internal::forward(a2), internal::forward(a3), - internal::forward(a4), internal::forward(a5), - internal::forward(a6), internal::forward(a7))); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3, A4, A5, A6, A7, A8); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec With(const Matcher& m1, const Matcher& m2, - const Matcher& m3, const Matcher& m4, const Matcher& m5, - const Matcher& m6, const Matcher& m7, const Matcher& m8) { - return MockSpec(this, ::std::make_tuple(m1, m2, m3, m4, m5, m6, m7, m8)); - } - - R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { - // Even though gcc and MSVC don't enforce it, 'this->' is required - // by the C++ standard [14.6.4] here, as the base class type is - // dependent on the template argument (and thus shouldn't be - // looked into when resolving InvokeWith). - return this->InvokeWith(ArgumentTuple(internal::forward(a1), - internal::forward(a2), internal::forward(a3), - internal::forward(a4), internal::forward(a5), - internal::forward(a6), internal::forward(a7), - internal::forward(a8))); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec With(const Matcher& m1, const Matcher& m2, - const Matcher& m3, const Matcher& m4, const Matcher& m5, - const Matcher& m6, const Matcher& m7, const Matcher& m8, - const Matcher& m9) { - return MockSpec(this, ::std::make_tuple(m1, m2, m3, m4, m5, m6, m7, m8, - m9)); - } - - R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { - // Even though gcc and MSVC don't enforce it, 'this->' is required - // by the C++ standard [14.6.4] here, as the base class type is - // dependent on the template argument (and thus shouldn't be - // looked into when resolving InvokeWith). - return this->InvokeWith(ArgumentTuple(internal::forward(a1), - internal::forward(a2), internal::forward(a3), - internal::forward(a4), internal::forward(a5), - internal::forward(a6), internal::forward(a7), - internal::forward(a8), internal::forward(a9))); - } -}; - -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec With(const Matcher& m1, const Matcher& m2, - const Matcher& m3, const Matcher& m4, const Matcher& m5, - const Matcher& m6, const Matcher& m7, const Matcher& m8, - const Matcher& m9, const Matcher& m10) { - return MockSpec(this, ::std::make_tuple(m1, m2, m3, m4, m5, m6, m7, m8, - m9, m10)); - } - - R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, - A10 a10) { - // Even though gcc and MSVC don't enforce it, 'this->' is required - // by the C++ standard [14.6.4] here, as the base class type is - // dependent on the template argument (and thus shouldn't be - // looked into when resolving InvokeWith). - return this->InvokeWith(ArgumentTuple(internal::forward(a1), - internal::forward(a2), internal::forward(a3), - internal::forward(a4), internal::forward(a5), - internal::forward(a6), internal::forward(a7), - internal::forward(a8), internal::forward(a9), - internal::forward(a10))); - } -}; - -// Removes the given pointer; this is a helper for the expectation setter method -// for parameterless matchers. -// -// We want to make sure that the user cannot set a parameterless expectation on -// overloaded methods, including methods which are overloaded on const. Example: -// -// class MockClass { -// MOCK_METHOD0(GetName, string&()); -// MOCK_CONST_METHOD0(GetName, const string&()); -// }; -// -// TEST() { -// // This should be an error, as it's not clear which overload is expected. -// EXPECT_CALL(mock, GetName).WillOnce(ReturnRef(value)); -// } -// -// Here are the generated expectation-setter methods: -// -// class MockClass { -// // Overload 1 -// MockSpec gmock_GetName() { ... } -// // Overload 2. Declared const so that the compiler will generate an -// // error when trying to resolve between this and overload 4 in -// // 'gmock_GetName(WithoutMatchers(), nullptr)'. -// MockSpec gmock_GetName( -// const WithoutMatchers&, const Function*) const { -// // Removes const from this, calls overload 1 -// return AdjustConstness_(this)->gmock_GetName(); -// } -// -// // Overload 3 -// const string& gmock_GetName() const { ... } -// // Overload 4 -// MockSpec gmock_GetName( -// const WithoutMatchers&, const Function*) const { -// // Does not remove const, calls overload 3 -// return AdjustConstness_const(this)->gmock_GetName(); -// } -// } -// -template -const MockType* AdjustConstness_const(const MockType* mock) { - return mock; -} - -// Removes const from and returns the given pointer; this is a helper for the -// expectation setter method for parameterless matchers. -template -MockType* AdjustConstness_(const MockType* mock) { - return const_cast(mock); -} - -} // namespace internal - -// The style guide prohibits "using" statements in a namespace scope -// inside a header file. However, the FunctionMocker class template -// is meant to be defined in the ::testing namespace. The following -// line is just a trick for working around a bug in MSVC 8.0, which -// cannot handle it if we define FunctionMocker in ::testing. -using internal::FunctionMocker; - -// GMOCK_RESULT_(tn, F) expands to the result type of function type F. -// We define this as a variadic macro in case F contains unprotected -// commas (the same reason that we use variadic macros in other places -// in this file). -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_RESULT_(tn, ...) \ - tn ::testing::internal::Function<__VA_ARGS__>::Result - -// The type of argument N of the given function type. -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_ARG_(tn, N, ...) \ - tn ::testing::internal::Function<__VA_ARGS__>::Argument##N - -// The matcher type for argument N of the given function type. -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_MATCHER_(tn, N, ...) \ - const ::testing::Matcher& - -// The variable for mocking the given method. -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_MOCKER_(arity, constness, Method) \ - GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD0_(tn, constness, ct, Method, ...) \ - GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ - ) constness { \ - GTEST_COMPILE_ASSERT_((::std::tuple_size< \ - tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \ - == 0), \ - this_method_does_not_take_0_arguments); \ - GMOCK_MOCKER_(0, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(0, constness, Method).Invoke(); \ - } \ - ::testing::MockSpec<__VA_ARGS__> \ - gmock_##Method() constness { \ - GMOCK_MOCKER_(0, constness, Method).RegisterOwner(this); \ - return GMOCK_MOCKER_(0, constness, Method).With(); \ - } \ - ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ - const ::testing::internal::WithoutMatchers&, \ - constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ - return ::testing::internal::AdjustConstness_##constness(this)-> \ - gmock_##Method(); \ - } \ - mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(0, constness, \ - Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD1_(tn, constness, ct, Method, ...) \ - GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ - GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1) constness { \ - GTEST_COMPILE_ASSERT_((::std::tuple_size< \ - tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \ - == 1), \ - this_method_does_not_take_1_argument); \ - GMOCK_MOCKER_(1, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(1, constness, \ - Method).Invoke(::testing::internal::forward(gmock_a1)); \ - } \ - ::testing::MockSpec<__VA_ARGS__> \ - gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1) constness { \ - GMOCK_MOCKER_(1, constness, Method).RegisterOwner(this); \ - return GMOCK_MOCKER_(1, constness, Method).With(gmock_a1); \ - } \ - ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ - const ::testing::internal::WithoutMatchers&, \ - constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ - return ::testing::internal::AdjustConstness_##constness(this)-> \ - gmock_##Method(::testing::A()); \ - } \ - mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(1, constness, \ - Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD2_(tn, constness, ct, Method, ...) \ - GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ - GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ - __VA_ARGS__) gmock_a2) constness { \ - GTEST_COMPILE_ASSERT_((::std::tuple_size< \ - tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \ - == 2), \ - this_method_does_not_take_2_arguments); \ - GMOCK_MOCKER_(2, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(2, constness, \ - Method).Invoke(::testing::internal::forward(gmock_a1), \ - ::testing::internal::forward(gmock_a2)); \ - } \ - ::testing::MockSpec<__VA_ARGS__> \ - gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ - GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2) constness { \ - GMOCK_MOCKER_(2, constness, Method).RegisterOwner(this); \ - return GMOCK_MOCKER_(2, constness, Method).With(gmock_a1, gmock_a2); \ - } \ - ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ - const ::testing::internal::WithoutMatchers&, \ - constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ - return ::testing::internal::AdjustConstness_##constness(this)-> \ - gmock_##Method(::testing::A(), \ - ::testing::A()); \ - } \ - mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(2, constness, \ - Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD3_(tn, constness, ct, Method, ...) \ - GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ - GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ - __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, \ - __VA_ARGS__) gmock_a3) constness { \ - GTEST_COMPILE_ASSERT_((::std::tuple_size< \ - tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \ - == 3), \ - this_method_does_not_take_3_arguments); \ - GMOCK_MOCKER_(3, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(3, constness, \ - Method).Invoke(::testing::internal::forward(gmock_a1), \ - ::testing::internal::forward(gmock_a2), \ - ::testing::internal::forward(gmock_a3)); \ - } \ - ::testing::MockSpec<__VA_ARGS__> \ - gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ - GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ - GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3) constness { \ - GMOCK_MOCKER_(3, constness, Method).RegisterOwner(this); \ - return GMOCK_MOCKER_(3, constness, Method).With(gmock_a1, gmock_a2, \ - gmock_a3); \ - } \ - ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ - const ::testing::internal::WithoutMatchers&, \ - constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ - return ::testing::internal::AdjustConstness_##constness(this)-> \ - gmock_##Method(::testing::A(), \ - ::testing::A(), \ - ::testing::A()); \ - } \ - mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(3, constness, \ - Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD4_(tn, constness, ct, Method, ...) \ - GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ - GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ - __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ - GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4) constness { \ - GTEST_COMPILE_ASSERT_((::std::tuple_size< \ - tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \ - == 4), \ - this_method_does_not_take_4_arguments); \ - GMOCK_MOCKER_(4, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(4, constness, \ - Method).Invoke(::testing::internal::forward(gmock_a1), \ - ::testing::internal::forward(gmock_a2), \ - ::testing::internal::forward(gmock_a3), \ - ::testing::internal::forward(gmock_a4)); \ - } \ - ::testing::MockSpec<__VA_ARGS__> \ - gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ - GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ - GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ - GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4) constness { \ - GMOCK_MOCKER_(4, constness, Method).RegisterOwner(this); \ - return GMOCK_MOCKER_(4, constness, Method).With(gmock_a1, gmock_a2, \ - gmock_a3, gmock_a4); \ - } \ - ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ - const ::testing::internal::WithoutMatchers&, \ - constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ - return ::testing::internal::AdjustConstness_##constness(this)-> \ - gmock_##Method(::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A()); \ - } \ - mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(4, constness, \ - Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD5_(tn, constness, ct, Method, ...) \ - GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ - GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ - __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ - GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \ - __VA_ARGS__) gmock_a5) constness { \ - GTEST_COMPILE_ASSERT_((::std::tuple_size< \ - tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \ - == 5), \ - this_method_does_not_take_5_arguments); \ - GMOCK_MOCKER_(5, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(5, constness, \ - Method).Invoke(::testing::internal::forward(gmock_a1), \ - ::testing::internal::forward(gmock_a2), \ - ::testing::internal::forward(gmock_a3), \ - ::testing::internal::forward(gmock_a4), \ - ::testing::internal::forward(gmock_a5)); \ - } \ - ::testing::MockSpec<__VA_ARGS__> \ - gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ - GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ - GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ - GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \ - GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5) constness { \ - GMOCK_MOCKER_(5, constness, Method).RegisterOwner(this); \ - return GMOCK_MOCKER_(5, constness, Method).With(gmock_a1, gmock_a2, \ - gmock_a3, gmock_a4, gmock_a5); \ - } \ - ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ - const ::testing::internal::WithoutMatchers&, \ - constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ - return ::testing::internal::AdjustConstness_##constness(this)-> \ - gmock_##Method(::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A()); \ - } \ - mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(5, constness, \ - Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD6_(tn, constness, ct, Method, ...) \ - GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ - GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ - __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ - GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \ - __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, \ - __VA_ARGS__) gmock_a6) constness { \ - GTEST_COMPILE_ASSERT_((::std::tuple_size< \ - tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \ - == 6), \ - this_method_does_not_take_6_arguments); \ - GMOCK_MOCKER_(6, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(6, constness, \ - Method).Invoke(::testing::internal::forward(gmock_a1), \ - ::testing::internal::forward(gmock_a2), \ - ::testing::internal::forward(gmock_a3), \ - ::testing::internal::forward(gmock_a4), \ - ::testing::internal::forward(gmock_a5), \ - ::testing::internal::forward(gmock_a6)); \ - } \ - ::testing::MockSpec<__VA_ARGS__> \ - gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ - GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ - GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ - GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \ - GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \ - GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6) constness { \ - GMOCK_MOCKER_(6, constness, Method).RegisterOwner(this); \ - return GMOCK_MOCKER_(6, constness, Method).With(gmock_a1, gmock_a2, \ - gmock_a3, gmock_a4, gmock_a5, gmock_a6); \ - } \ - ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ - const ::testing::internal::WithoutMatchers&, \ - constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ - return ::testing::internal::AdjustConstness_##constness(this)-> \ - gmock_##Method(::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A()); \ - } \ - mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(6, constness, \ - Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD7_(tn, constness, ct, Method, ...) \ - GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ - GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ - __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ - GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \ - __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \ - GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7) constness { \ - GTEST_COMPILE_ASSERT_((::std::tuple_size< \ - tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \ - == 7), \ - this_method_does_not_take_7_arguments); \ - GMOCK_MOCKER_(7, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(7, constness, \ - Method).Invoke(::testing::internal::forward(gmock_a1), \ - ::testing::internal::forward(gmock_a2), \ - ::testing::internal::forward(gmock_a3), \ - ::testing::internal::forward(gmock_a4), \ - ::testing::internal::forward(gmock_a5), \ - ::testing::internal::forward(gmock_a6), \ - ::testing::internal::forward(gmock_a7)); \ - } \ - ::testing::MockSpec<__VA_ARGS__> \ - gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ - GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ - GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ - GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \ - GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \ - GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \ - GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7) constness { \ - GMOCK_MOCKER_(7, constness, Method).RegisterOwner(this); \ - return GMOCK_MOCKER_(7, constness, Method).With(gmock_a1, gmock_a2, \ - gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7); \ - } \ - ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ - const ::testing::internal::WithoutMatchers&, \ - constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ - return ::testing::internal::AdjustConstness_##constness(this)-> \ - gmock_##Method(::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A()); \ - } \ - mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(7, constness, \ - Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD8_(tn, constness, ct, Method, ...) \ - GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ - GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ - __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ - GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \ - __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \ - GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, GMOCK_ARG_(tn, 8, \ - __VA_ARGS__) gmock_a8) constness { \ - GTEST_COMPILE_ASSERT_((::std::tuple_size< \ - tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \ - == 8), \ - this_method_does_not_take_8_arguments); \ - GMOCK_MOCKER_(8, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(8, constness, \ - Method).Invoke(::testing::internal::forward(gmock_a1), \ - ::testing::internal::forward(gmock_a2), \ - ::testing::internal::forward(gmock_a3), \ - ::testing::internal::forward(gmock_a4), \ - ::testing::internal::forward(gmock_a5), \ - ::testing::internal::forward(gmock_a6), \ - ::testing::internal::forward(gmock_a7), \ - ::testing::internal::forward(gmock_a8)); \ - } \ - ::testing::MockSpec<__VA_ARGS__> \ - gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ - GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ - GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ - GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \ - GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \ - GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \ - GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \ - GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8) constness { \ - GMOCK_MOCKER_(8, constness, Method).RegisterOwner(this); \ - return GMOCK_MOCKER_(8, constness, Method).With(gmock_a1, gmock_a2, \ - gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8); \ - } \ - ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ - const ::testing::internal::WithoutMatchers&, \ - constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ - return ::testing::internal::AdjustConstness_##constness(this)-> \ - gmock_##Method(::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A()); \ - } \ - mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(8, constness, \ - Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD9_(tn, constness, ct, Method, ...) \ - GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ - GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ - __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ - GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \ - __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \ - GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, GMOCK_ARG_(tn, 8, \ - __VA_ARGS__) gmock_a8, GMOCK_ARG_(tn, 9, \ - __VA_ARGS__) gmock_a9) constness { \ - GTEST_COMPILE_ASSERT_((::std::tuple_size< \ - tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \ - == 9), \ - this_method_does_not_take_9_arguments); \ - GMOCK_MOCKER_(9, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(9, constness, \ - Method).Invoke(::testing::internal::forward(gmock_a1), \ - ::testing::internal::forward(gmock_a2), \ - ::testing::internal::forward(gmock_a3), \ - ::testing::internal::forward(gmock_a4), \ - ::testing::internal::forward(gmock_a5), \ - ::testing::internal::forward(gmock_a6), \ - ::testing::internal::forward(gmock_a7), \ - ::testing::internal::forward(gmock_a8), \ - ::testing::internal::forward(gmock_a9)); \ - } \ - ::testing::MockSpec<__VA_ARGS__> \ - gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ - GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ - GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ - GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \ - GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \ - GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \ - GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \ - GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \ - GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9) constness { \ - GMOCK_MOCKER_(9, constness, Method).RegisterOwner(this); \ - return GMOCK_MOCKER_(9, constness, Method).With(gmock_a1, gmock_a2, \ - gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, \ - gmock_a9); \ - } \ - ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ - const ::testing::internal::WithoutMatchers&, \ - constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ - return ::testing::internal::AdjustConstness_##constness(this)-> \ - gmock_##Method(::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A()); \ - } \ - mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(9, constness, \ - Method) - -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD10_(tn, constness, ct, Method, ...) \ - GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ - GMOCK_ARG_(tn, 1, __VA_ARGS__) gmock_a1, GMOCK_ARG_(tn, 2, \ - __VA_ARGS__) gmock_a2, GMOCK_ARG_(tn, 3, __VA_ARGS__) gmock_a3, \ - GMOCK_ARG_(tn, 4, __VA_ARGS__) gmock_a4, GMOCK_ARG_(tn, 5, \ - __VA_ARGS__) gmock_a5, GMOCK_ARG_(tn, 6, __VA_ARGS__) gmock_a6, \ - GMOCK_ARG_(tn, 7, __VA_ARGS__) gmock_a7, GMOCK_ARG_(tn, 8, \ - __VA_ARGS__) gmock_a8, GMOCK_ARG_(tn, 9, __VA_ARGS__) gmock_a9, \ - GMOCK_ARG_(tn, 10, __VA_ARGS__) gmock_a10) constness { \ - GTEST_COMPILE_ASSERT_((::std::tuple_size< \ - tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value \ - == 10), \ - this_method_does_not_take_10_arguments); \ - GMOCK_MOCKER_(10, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_(10, constness, \ - Method).Invoke(::testing::internal::forward(gmock_a1), \ - ::testing::internal::forward(gmock_a2), \ - ::testing::internal::forward(gmock_a3), \ - ::testing::internal::forward(gmock_a4), \ - ::testing::internal::forward(gmock_a5), \ - ::testing::internal::forward(gmock_a6), \ - ::testing::internal::forward(gmock_a7), \ - ::testing::internal::forward(gmock_a8), \ - ::testing::internal::forward(gmock_a9), \ - ::testing::internal::forward(gmock_a10)); \ - } \ - ::testing::MockSpec<__VA_ARGS__> \ - gmock_##Method(GMOCK_MATCHER_(tn, 1, __VA_ARGS__) gmock_a1, \ - GMOCK_MATCHER_(tn, 2, __VA_ARGS__) gmock_a2, \ - GMOCK_MATCHER_(tn, 3, __VA_ARGS__) gmock_a3, \ - GMOCK_MATCHER_(tn, 4, __VA_ARGS__) gmock_a4, \ - GMOCK_MATCHER_(tn, 5, __VA_ARGS__) gmock_a5, \ - GMOCK_MATCHER_(tn, 6, __VA_ARGS__) gmock_a6, \ - GMOCK_MATCHER_(tn, 7, __VA_ARGS__) gmock_a7, \ - GMOCK_MATCHER_(tn, 8, __VA_ARGS__) gmock_a8, \ - GMOCK_MATCHER_(tn, 9, __VA_ARGS__) gmock_a9, \ - GMOCK_MATCHER_(tn, 10, \ - __VA_ARGS__) gmock_a10) constness { \ - GMOCK_MOCKER_(10, constness, Method).RegisterOwner(this); \ - return GMOCK_MOCKER_(10, constness, Method).With(gmock_a1, gmock_a2, \ - gmock_a3, gmock_a4, gmock_a5, gmock_a6, gmock_a7, gmock_a8, gmock_a9, \ - gmock_a10); \ - } \ - ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ - const ::testing::internal::WithoutMatchers&, \ - constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ - return ::testing::internal::AdjustConstness_##constness(this)-> \ - gmock_##Method(::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A(), \ - ::testing::A()); \ - } \ - mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_(10, constness, \ - Method) - -#define MOCK_METHOD0(m, ...) GMOCK_METHOD0_(, , , m, __VA_ARGS__) -#define MOCK_METHOD1(m, ...) GMOCK_METHOD1_(, , , m, __VA_ARGS__) -#define MOCK_METHOD2(m, ...) GMOCK_METHOD2_(, , , m, __VA_ARGS__) -#define MOCK_METHOD3(m, ...) GMOCK_METHOD3_(, , , m, __VA_ARGS__) -#define MOCK_METHOD4(m, ...) GMOCK_METHOD4_(, , , m, __VA_ARGS__) -#define MOCK_METHOD5(m, ...) GMOCK_METHOD5_(, , , m, __VA_ARGS__) -#define MOCK_METHOD6(m, ...) GMOCK_METHOD6_(, , , m, __VA_ARGS__) -#define MOCK_METHOD7(m, ...) GMOCK_METHOD7_(, , , m, __VA_ARGS__) -#define MOCK_METHOD8(m, ...) GMOCK_METHOD8_(, , , m, __VA_ARGS__) -#define MOCK_METHOD9(m, ...) GMOCK_METHOD9_(, , , m, __VA_ARGS__) -#define MOCK_METHOD10(m, ...) GMOCK_METHOD10_(, , , m, __VA_ARGS__) - -#define MOCK_CONST_METHOD0(m, ...) GMOCK_METHOD0_(, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD1(m, ...) GMOCK_METHOD1_(, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD2(m, ...) GMOCK_METHOD2_(, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD3(m, ...) GMOCK_METHOD3_(, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD4(m, ...) GMOCK_METHOD4_(, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD5(m, ...) GMOCK_METHOD5_(, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD6(m, ...) GMOCK_METHOD6_(, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD7(m, ...) GMOCK_METHOD7_(, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD8(m, ...) GMOCK_METHOD8_(, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD9(m, ...) GMOCK_METHOD9_(, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD10(m, ...) GMOCK_METHOD10_(, const, , m, __VA_ARGS__) - -#define MOCK_METHOD0_T(m, ...) GMOCK_METHOD0_(typename, , , m, __VA_ARGS__) -#define MOCK_METHOD1_T(m, ...) GMOCK_METHOD1_(typename, , , m, __VA_ARGS__) -#define MOCK_METHOD2_T(m, ...) GMOCK_METHOD2_(typename, , , m, __VA_ARGS__) -#define MOCK_METHOD3_T(m, ...) GMOCK_METHOD3_(typename, , , m, __VA_ARGS__) -#define MOCK_METHOD4_T(m, ...) GMOCK_METHOD4_(typename, , , m, __VA_ARGS__) -#define MOCK_METHOD5_T(m, ...) GMOCK_METHOD5_(typename, , , m, __VA_ARGS__) -#define MOCK_METHOD6_T(m, ...) GMOCK_METHOD6_(typename, , , m, __VA_ARGS__) -#define MOCK_METHOD7_T(m, ...) GMOCK_METHOD7_(typename, , , m, __VA_ARGS__) -#define MOCK_METHOD8_T(m, ...) GMOCK_METHOD8_(typename, , , m, __VA_ARGS__) -#define MOCK_METHOD9_T(m, ...) GMOCK_METHOD9_(typename, , , m, __VA_ARGS__) -#define MOCK_METHOD10_T(m, ...) GMOCK_METHOD10_(typename, , , m, __VA_ARGS__) - -#define MOCK_CONST_METHOD0_T(m, ...) \ - GMOCK_METHOD0_(typename, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD1_T(m, ...) \ - GMOCK_METHOD1_(typename, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD2_T(m, ...) \ - GMOCK_METHOD2_(typename, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD3_T(m, ...) \ - GMOCK_METHOD3_(typename, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD4_T(m, ...) \ - GMOCK_METHOD4_(typename, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD5_T(m, ...) \ - GMOCK_METHOD5_(typename, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD6_T(m, ...) \ - GMOCK_METHOD6_(typename, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD7_T(m, ...) \ - GMOCK_METHOD7_(typename, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD8_T(m, ...) \ - GMOCK_METHOD8_(typename, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD9_T(m, ...) \ - GMOCK_METHOD9_(typename, const, , m, __VA_ARGS__) -#define MOCK_CONST_METHOD10_T(m, ...) \ - GMOCK_METHOD10_(typename, const, , m, __VA_ARGS__) - -#define MOCK_METHOD0_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD0_(, , ct, m, __VA_ARGS__) -#define MOCK_METHOD1_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD1_(, , ct, m, __VA_ARGS__) -#define MOCK_METHOD2_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD2_(, , ct, m, __VA_ARGS__) -#define MOCK_METHOD3_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD3_(, , ct, m, __VA_ARGS__) -#define MOCK_METHOD4_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD4_(, , ct, m, __VA_ARGS__) -#define MOCK_METHOD5_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD5_(, , ct, m, __VA_ARGS__) -#define MOCK_METHOD6_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD6_(, , ct, m, __VA_ARGS__) -#define MOCK_METHOD7_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD7_(, , ct, m, __VA_ARGS__) -#define MOCK_METHOD8_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD8_(, , ct, m, __VA_ARGS__) -#define MOCK_METHOD9_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD9_(, , ct, m, __VA_ARGS__) -#define MOCK_METHOD10_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD10_(, , ct, m, __VA_ARGS__) - -#define MOCK_CONST_METHOD0_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD0_(, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD1_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD1_(, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD2_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD2_(, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD3_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD3_(, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD4_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD4_(, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD5_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD5_(, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD6_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD6_(, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD7_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD7_(, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD8_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD8_(, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD9_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD9_(, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD10_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD10_(, const, ct, m, __VA_ARGS__) - -#define MOCK_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD0_(typename, , ct, m, __VA_ARGS__) -#define MOCK_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD1_(typename, , ct, m, __VA_ARGS__) -#define MOCK_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD2_(typename, , ct, m, __VA_ARGS__) -#define MOCK_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD3_(typename, , ct, m, __VA_ARGS__) -#define MOCK_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD4_(typename, , ct, m, __VA_ARGS__) -#define MOCK_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD5_(typename, , ct, m, __VA_ARGS__) -#define MOCK_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD6_(typename, , ct, m, __VA_ARGS__) -#define MOCK_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD7_(typename, , ct, m, __VA_ARGS__) -#define MOCK_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD8_(typename, , ct, m, __VA_ARGS__) -#define MOCK_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD9_(typename, , ct, m, __VA_ARGS__) -#define MOCK_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD10_(typename, , ct, m, __VA_ARGS__) - -#define MOCK_CONST_METHOD0_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD0_(typename, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD1_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD1_(typename, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD2_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD2_(typename, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD3_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD3_(typename, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD4_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD4_(typename, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD5_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD5_(typename, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD6_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD6_(typename, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD7_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD7_(typename, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD8_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD8_(typename, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD9_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD9_(typename, const, ct, m, __VA_ARGS__) -#define MOCK_CONST_METHOD10_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD10_(typename, const, ct, m, __VA_ARGS__) - -// A MockFunction class has one mock method whose type is F. It is -// useful when you just want your test code to emit some messages and -// have Google Mock verify the right messages are sent (and perhaps at -// the right times). For example, if you are exercising code: -// -// Foo(1); -// Foo(2); -// Foo(3); -// -// and want to verify that Foo(1) and Foo(3) both invoke -// mock.Bar("a"), but Foo(2) doesn't invoke anything, you can write: -// -// TEST(FooTest, InvokesBarCorrectly) { -// MyMock mock; -// MockFunction check; -// { -// InSequence s; -// -// EXPECT_CALL(mock, Bar("a")); -// EXPECT_CALL(check, Call("1")); -// EXPECT_CALL(check, Call("2")); -// EXPECT_CALL(mock, Bar("a")); -// } -// Foo(1); -// check.Call("1"); -// Foo(2); -// check.Call("2"); -// Foo(3); -// } -// -// The expectation spec says that the first Bar("a") must happen -// before check point "1", the second Bar("a") must happen after check -// point "2", and nothing should happen between the two check -// points. The explicit check points make it easy to tell which -// Bar("a") is called by which call to Foo(). -// -// MockFunction can also be used to exercise code that accepts -// std::function callbacks. To do so, use AsStdFunction() method -// to create std::function proxy forwarding to original object's Call. -// Example: -// -// TEST(FooTest, RunsCallbackWithBarArgument) { -// MockFunction callback; -// EXPECT_CALL(callback, Call("bar")).WillOnce(Return(1)); -// Foo(callback.AsStdFunction()); -// } -template -class MockFunction; - -template -class MockFunction { - public: - MockFunction() {} - - MOCK_METHOD0_T(Call, R()); - -#if GTEST_HAS_STD_FUNCTION_ - ::std::function AsStdFunction() { - return [this]() -> R { - return this->Call(); - }; - } -#endif // GTEST_HAS_STD_FUNCTION_ - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); -}; - -template -class MockFunction { - public: - MockFunction() {} - - MOCK_METHOD1_T(Call, R(A0)); - -#if GTEST_HAS_STD_FUNCTION_ - ::std::function AsStdFunction() { - return [this](A0 a0) -> R { - return this->Call(::std::forward(a0)); - }; - } -#endif // GTEST_HAS_STD_FUNCTION_ - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); -}; - -template -class MockFunction { - public: - MockFunction() {} - - MOCK_METHOD2_T(Call, R(A0, A1)); - -#if GTEST_HAS_STD_FUNCTION_ - ::std::function AsStdFunction() { - return [this](A0 a0, A1 a1) -> R { - return this->Call(::std::forward(a0), ::std::forward(a1)); - }; - } -#endif // GTEST_HAS_STD_FUNCTION_ - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); -}; - -template -class MockFunction { - public: - MockFunction() {} - - MOCK_METHOD3_T(Call, R(A0, A1, A2)); - -#if GTEST_HAS_STD_FUNCTION_ - ::std::function AsStdFunction() { - return [this](A0 a0, A1 a1, A2 a2) -> R { - return this->Call(::std::forward(a0), ::std::forward(a1), - ::std::forward(a2)); - }; - } -#endif // GTEST_HAS_STD_FUNCTION_ - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); -}; - -template -class MockFunction { - public: - MockFunction() {} - - MOCK_METHOD4_T(Call, R(A0, A1, A2, A3)); - -#if GTEST_HAS_STD_FUNCTION_ - ::std::function AsStdFunction() { - return [this](A0 a0, A1 a1, A2 a2, A3 a3) -> R { - return this->Call(::std::forward(a0), ::std::forward(a1), - ::std::forward(a2), ::std::forward(a3)); - }; - } -#endif // GTEST_HAS_STD_FUNCTION_ - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); -}; - -template -class MockFunction { - public: - MockFunction() {} - - MOCK_METHOD5_T(Call, R(A0, A1, A2, A3, A4)); - -#if GTEST_HAS_STD_FUNCTION_ - ::std::function AsStdFunction() { - return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) -> R { - return this->Call(::std::forward(a0), ::std::forward(a1), - ::std::forward(a2), ::std::forward(a3), - ::std::forward(a4)); - }; - } -#endif // GTEST_HAS_STD_FUNCTION_ - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); -}; - -template -class MockFunction { - public: - MockFunction() {} - - MOCK_METHOD6_T(Call, R(A0, A1, A2, A3, A4, A5)); - -#if GTEST_HAS_STD_FUNCTION_ - ::std::function AsStdFunction() { - return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -> R { - return this->Call(::std::forward(a0), ::std::forward(a1), - ::std::forward(a2), ::std::forward(a3), - ::std::forward(a4), ::std::forward(a5)); - }; - } -#endif // GTEST_HAS_STD_FUNCTION_ - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); -}; - -template -class MockFunction { - public: - MockFunction() {} - - MOCK_METHOD7_T(Call, R(A0, A1, A2, A3, A4, A5, A6)); - -#if GTEST_HAS_STD_FUNCTION_ - ::std::function AsStdFunction() { - return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -> R { - return this->Call(::std::forward(a0), ::std::forward(a1), - ::std::forward(a2), ::std::forward(a3), - ::std::forward(a4), ::std::forward(a5), - ::std::forward(a6)); - }; - } -#endif // GTEST_HAS_STD_FUNCTION_ - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); -}; - -template -class MockFunction { - public: - MockFunction() {} - - MOCK_METHOD8_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7)); - -#if GTEST_HAS_STD_FUNCTION_ - ::std::function AsStdFunction() { - return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -> R { - return this->Call(::std::forward(a0), ::std::forward(a1), - ::std::forward(a2), ::std::forward(a3), - ::std::forward(a4), ::std::forward(a5), - ::std::forward(a6), ::std::forward(a7)); - }; - } -#endif // GTEST_HAS_STD_FUNCTION_ - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); -}; - -template -class MockFunction { - public: - MockFunction() {} - - MOCK_METHOD9_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8)); - -#if GTEST_HAS_STD_FUNCTION_ - ::std::function AsStdFunction() { - return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, - A8 a8) -> R { - return this->Call(::std::forward(a0), ::std::forward(a1), - ::std::forward(a2), ::std::forward(a3), - ::std::forward(a4), ::std::forward(a5), - ::std::forward(a6), ::std::forward(a7), - ::std::forward(a8)); - }; - } -#endif // GTEST_HAS_STD_FUNCTION_ - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); -}; - -template -class MockFunction { - public: - MockFunction() {} - - MOCK_METHOD10_T(Call, R(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)); - -#if GTEST_HAS_STD_FUNCTION_ - ::std::function AsStdFunction() { - return [this](A0 a0, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, - A8 a8, A9 a9) -> R { - return this->Call(::std::forward(a0), ::std::forward(a1), - ::std::forward(a2), ::std::forward(a3), - ::std::forward(a4), ::std::forward(a5), - ::std::forward(a6), ::std::forward(a7), - ::std::forward(a8), ::std::forward(a9)); - }; - } -#endif // GTEST_HAS_STD_FUNCTION_ - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); -}; - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump b/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump deleted file mode 100644 index e05b18db..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +++ /dev/null @@ -1,348 +0,0 @@ -$$ -*- mode: c++; -*- -$$ This is a Pump source file. Please use Pump to convert -$$ it to gmock-generated-function-mockers.h. -$$ -$var n = 10 $$ The maximum arity we support. -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements function mockers of various arities. - -// GOOGLETEST_CM0002 DO NOT DELETE - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ - -#include "gmock/gmock-spec-builders.h" -#include "gmock/internal/gmock-internal-utils.h" - -#if GTEST_HAS_STD_FUNCTION_ -# include -#endif - -namespace testing { -namespace internal { - -template -class FunctionMockerBase; - -// Note: class FunctionMocker really belongs to the ::testing -// namespace. However if we define it in ::testing, MSVC will -// complain when classes in ::testing::internal declare it as a -// friend class template. To workaround this compiler bug, we define -// FunctionMocker in ::testing::internal and import it into ::testing. -template -class FunctionMocker; - - -$range i 0..n -$for i [[ -$range j 1..i -$var typename_As = [[$for j [[, typename A$j]]]] -$var As = [[$for j, [[A$j]]]] -$var as = [[$for j, [[internal::forward(a$j)]]]] -$var Aas = [[$for j, [[A$j a$j]]]] -$var ms = [[$for j, [[m$j]]]] -$var matchers = [[$for j, [[const Matcher& m$j]]]] -template -class FunctionMocker : public - internal::FunctionMockerBase { - public: - typedef R F($As); - typedef typename internal::Function::ArgumentTuple ArgumentTuple; - - MockSpec With($matchers) { - return MockSpec(this, ::std::make_tuple($ms)); - } - - R Invoke($Aas) { - // Even though gcc and MSVC don't enforce it, 'this->' is required - // by the C++ standard [14.6.4] here, as the base class type is - // dependent on the template argument (and thus shouldn't be - // looked into when resolving InvokeWith). - return this->InvokeWith(ArgumentTuple($as)); - } -}; - - -]] -// Removes the given pointer; this is a helper for the expectation setter method -// for parameterless matchers. -// -// We want to make sure that the user cannot set a parameterless expectation on -// overloaded methods, including methods which are overloaded on const. Example: -// -// class MockClass { -// MOCK_METHOD0(GetName, string&()); -// MOCK_CONST_METHOD0(GetName, const string&()); -// }; -// -// TEST() { -// // This should be an error, as it's not clear which overload is expected. -// EXPECT_CALL(mock, GetName).WillOnce(ReturnRef(value)); -// } -// -// Here are the generated expectation-setter methods: -// -// class MockClass { -// // Overload 1 -// MockSpec gmock_GetName() { ... } -// // Overload 2. Declared const so that the compiler will generate an -// // error when trying to resolve between this and overload 4 in -// // 'gmock_GetName(WithoutMatchers(), nullptr)'. -// MockSpec gmock_GetName( -// const WithoutMatchers&, const Function*) const { -// // Removes const from this, calls overload 1 -// return AdjustConstness_(this)->gmock_GetName(); -// } -// -// // Overload 3 -// const string& gmock_GetName() const { ... } -// // Overload 4 -// MockSpec gmock_GetName( -// const WithoutMatchers&, const Function*) const { -// // Does not remove const, calls overload 3 -// return AdjustConstness_const(this)->gmock_GetName(); -// } -// } -// -template -const MockType* AdjustConstness_const(const MockType* mock) { - return mock; -} - -// Removes const from and returns the given pointer; this is a helper for the -// expectation setter method for parameterless matchers. -template -MockType* AdjustConstness_(const MockType* mock) { - return const_cast(mock); -} - -} // namespace internal - -// The style guide prohibits "using" statements in a namespace scope -// inside a header file. However, the FunctionMocker class template -// is meant to be defined in the ::testing namespace. The following -// line is just a trick for working around a bug in MSVC 8.0, which -// cannot handle it if we define FunctionMocker in ::testing. -using internal::FunctionMocker; - -// GMOCK_RESULT_(tn, F) expands to the result type of function type F. -// We define this as a variadic macro in case F contains unprotected -// commas (the same reason that we use variadic macros in other places -// in this file). -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_RESULT_(tn, ...) \ - tn ::testing::internal::Function<__VA_ARGS__>::Result - -// The type of argument N of the given function type. -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_ARG_(tn, N, ...) \ - tn ::testing::internal::Function<__VA_ARGS__>::Argument##N - -// The matcher type for argument N of the given function type. -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_MATCHER_(tn, N, ...) \ - const ::testing::Matcher& - -// The variable for mocking the given method. -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_MOCKER_(arity, constness, Method) \ - GTEST_CONCAT_TOKEN_(gmock##constness##arity##_##Method##_, __LINE__) - - -$for i [[ -$range j 1..i -$var arg_as = [[$for j, [[GMOCK_ARG_(tn, $j, __VA_ARGS__) gmock_a$j]]]] -$var as = [[$for j, \ - [[::testing::internal::forward(gmock_a$j)]]]] -$var matcher_arg_as = [[$for j, \ - [[GMOCK_MATCHER_(tn, $j, __VA_ARGS__) gmock_a$j]]]] -$var matcher_as = [[$for j, [[gmock_a$j]]]] -$var anything_matchers = [[$for j, \ - [[::testing::A()]]]] -// INTERNAL IMPLEMENTATION - DON'T USE IN USER CODE!!! -#define GMOCK_METHOD$i[[]]_(tn, constness, ct, Method, ...) \ - GMOCK_RESULT_(tn, __VA_ARGS__) ct Method( \ - $arg_as) constness { \ - GTEST_COMPILE_ASSERT_((::std::tuple_size< \ - tn ::testing::internal::Function<__VA_ARGS__>::ArgumentTuple>::value == $i), \ - this_method_does_not_take_$i[[]]_argument[[$if i != 1 [[s]]]]); \ - GMOCK_MOCKER_($i, constness, Method).SetOwnerAndName(this, #Method); \ - return GMOCK_MOCKER_($i, constness, Method).Invoke($as); \ - } \ - ::testing::MockSpec<__VA_ARGS__> \ - gmock_##Method($matcher_arg_as) constness { \ - GMOCK_MOCKER_($i, constness, Method).RegisterOwner(this); \ - return GMOCK_MOCKER_($i, constness, Method).With($matcher_as); \ - } \ - ::testing::MockSpec<__VA_ARGS__> gmock_##Method( \ - const ::testing::internal::WithoutMatchers&, \ - constness ::testing::internal::Function<__VA_ARGS__>* ) const { \ - return ::testing::internal::AdjustConstness_##constness(this)-> \ - gmock_##Method($anything_matchers); \ - } \ - mutable ::testing::FunctionMocker<__VA_ARGS__> GMOCK_MOCKER_($i, constness, Method) - - -]] -$for i [[ -#define MOCK_METHOD$i(m, ...) GMOCK_METHOD$i[[]]_(, , , m, __VA_ARGS__) - -]] - - -$for i [[ -#define MOCK_CONST_METHOD$i(m, ...) GMOCK_METHOD$i[[]]_(, const, , m, __VA_ARGS__) - -]] - - -$for i [[ -#define MOCK_METHOD$i[[]]_T(m, ...) GMOCK_METHOD$i[[]]_(typename, , , m, __VA_ARGS__) - -]] - - -$for i [[ -#define MOCK_CONST_METHOD$i[[]]_T(m, ...) \ - GMOCK_METHOD$i[[]]_(typename, const, , m, __VA_ARGS__) - -]] - - -$for i [[ -#define MOCK_METHOD$i[[]]_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD$i[[]]_(, , ct, m, __VA_ARGS__) - -]] - - -$for i [[ -#define MOCK_CONST_METHOD$i[[]]_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD$i[[]]_(, const, ct, m, __VA_ARGS__) - -]] - - -$for i [[ -#define MOCK_METHOD$i[[]]_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD$i[[]]_(typename, , ct, m, __VA_ARGS__) - -]] - - -$for i [[ -#define MOCK_CONST_METHOD$i[[]]_T_WITH_CALLTYPE(ct, m, ...) \ - GMOCK_METHOD$i[[]]_(typename, const, ct, m, __VA_ARGS__) - -]] - -// A MockFunction class has one mock method whose type is F. It is -// useful when you just want your test code to emit some messages and -// have Google Mock verify the right messages are sent (and perhaps at -// the right times). For example, if you are exercising code: -// -// Foo(1); -// Foo(2); -// Foo(3); -// -// and want to verify that Foo(1) and Foo(3) both invoke -// mock.Bar("a"), but Foo(2) doesn't invoke anything, you can write: -// -// TEST(FooTest, InvokesBarCorrectly) { -// MyMock mock; -// MockFunction check; -// { -// InSequence s; -// -// EXPECT_CALL(mock, Bar("a")); -// EXPECT_CALL(check, Call("1")); -// EXPECT_CALL(check, Call("2")); -// EXPECT_CALL(mock, Bar("a")); -// } -// Foo(1); -// check.Call("1"); -// Foo(2); -// check.Call("2"); -// Foo(3); -// } -// -// The expectation spec says that the first Bar("a") must happen -// before check point "1", the second Bar("a") must happen after check -// point "2", and nothing should happen between the two check -// points. The explicit check points make it easy to tell which -// Bar("a") is called by which call to Foo(). -// -// MockFunction can also be used to exercise code that accepts -// std::function callbacks. To do so, use AsStdFunction() method -// to create std::function proxy forwarding to original object's Call. -// Example: -// -// TEST(FooTest, RunsCallbackWithBarArgument) { -// MockFunction callback; -// EXPECT_CALL(callback, Call("bar")).WillOnce(Return(1)); -// Foo(callback.AsStdFunction()); -// } -template -class MockFunction; - - -$for i [[ -$range j 0..i-1 -$var ArgTypes = [[$for j, [[A$j]]]] -$var ArgValues = [[$for j, [[::std::forward(a$j)]]]] -$var ArgDecls = [[$for j, [[A$j a$j]]]] -template -class MockFunction { - public: - MockFunction() {} - - MOCK_METHOD$i[[]]_T(Call, R($ArgTypes)); - -#if GTEST_HAS_STD_FUNCTION_ - ::std::function AsStdFunction() { - return [this]($ArgDecls) -> R { - return this->Call($ArgValues); - }; - } -#endif // GTEST_HAS_STD_FUNCTION_ - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); -}; - - -]] -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_FUNCTION_MOCKERS_H_ diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-matchers.h b/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-matchers.h deleted file mode 100644 index 166122a7..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-matchers.h +++ /dev/null @@ -1,1486 +0,0 @@ -// This file was GENERATED by command: -// pump.py gmock-generated-matchers.h.pump -// DO NOT EDIT BY HAND!!! - -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements some commonly used variadic matchers. - -// GOOGLETEST_CM0002 DO NOT DELETE - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ - -#include -#include -#include -#include -#include "gmock/gmock-matchers.h" - -namespace testing { -namespace internal { - -// The type of the i-th (0-based) field of Tuple. -#define GMOCK_FIELD_TYPE_(Tuple, i) \ - typename ::std::tuple_element::type - -// TupleFields is for selecting fields from a -// tuple of type Tuple. It has two members: -// -// type: a tuple type whose i-th field is the ki-th field of Tuple. -// GetSelectedFields(t): returns fields k0, ..., and kn of t as a tuple. -// -// For example, in class TupleFields, 2, 0>, -// we have: -// -// type is std::tuple, and -// GetSelectedFields(std::make_tuple(true, 'a', 42)) is (42, true). - -template -class TupleFields; - -// This generic version is used when there are 10 selectors. -template -class TupleFields { - public: - typedef ::std::tuple type; - static type GetSelectedFields(const Tuple& t) { - return type(std::get(t), std::get(t), std::get(t), - std::get(t), std::get(t), std::get(t), std::get(t), - std::get(t), std::get(t), std::get(t)); - } -}; - -// The following specialization is used for 0 ~ 9 selectors. - -template -class TupleFields { - public: - typedef ::std::tuple<> type; - static type GetSelectedFields(const Tuple& /* t */) { - return type(); - } -}; - -template -class TupleFields { - public: - typedef ::std::tuple type; - static type GetSelectedFields(const Tuple& t) { - return type(std::get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tuple type; - static type GetSelectedFields(const Tuple& t) { - return type(std::get(t), std::get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tuple type; - static type GetSelectedFields(const Tuple& t) { - return type(std::get(t), std::get(t), std::get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tuple type; - static type GetSelectedFields(const Tuple& t) { - return type(std::get(t), std::get(t), std::get(t), - std::get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tuple type; - static type GetSelectedFields(const Tuple& t) { - return type(std::get(t), std::get(t), std::get(t), - std::get(t), std::get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tuple type; - static type GetSelectedFields(const Tuple& t) { - return type(std::get(t), std::get(t), std::get(t), - std::get(t), std::get(t), std::get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tuple type; - static type GetSelectedFields(const Tuple& t) { - return type(std::get(t), std::get(t), std::get(t), - std::get(t), std::get(t), std::get(t), std::get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tuple type; - static type GetSelectedFields(const Tuple& t) { - return type(std::get(t), std::get(t), std::get(t), - std::get(t), std::get(t), std::get(t), std::get(t), - std::get(t)); - } -}; - -template -class TupleFields { - public: - typedef ::std::tuple type; - static type GetSelectedFields(const Tuple& t) { - return type(std::get(t), std::get(t), std::get(t), - std::get(t), std::get(t), std::get(t), std::get(t), - std::get(t), std::get(t)); - } -}; - -#undef GMOCK_FIELD_TYPE_ - -// Implements the Args() matcher. -template -class ArgsMatcherImpl : public MatcherInterface { - public: - // ArgsTuple may have top-level const or reference modifiers. - typedef GTEST_REMOVE_REFERENCE_AND_CONST_(ArgsTuple) RawArgsTuple; - typedef typename internal::TupleFields::type SelectedArgs; - typedef Matcher MonomorphicInnerMatcher; - - template - explicit ArgsMatcherImpl(const InnerMatcher& inner_matcher) - : inner_matcher_(SafeMatcherCast(inner_matcher)) {} - - virtual bool MatchAndExplain(ArgsTuple args, - MatchResultListener* listener) const { - const SelectedArgs& selected_args = GetSelectedArgs(args); - if (!listener->IsInterested()) - return inner_matcher_.Matches(selected_args); - - PrintIndices(listener->stream()); - *listener << "are " << PrintToString(selected_args); - - StringMatchResultListener inner_listener; - const bool match = inner_matcher_.MatchAndExplain(selected_args, - &inner_listener); - PrintIfNotEmpty(inner_listener.str(), listener->stream()); - return match; - } - - virtual void DescribeTo(::std::ostream* os) const { - *os << "are a tuple "; - PrintIndices(os); - inner_matcher_.DescribeTo(os); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "are a tuple "; - PrintIndices(os); - inner_matcher_.DescribeNegationTo(os); - } - - private: - static SelectedArgs GetSelectedArgs(ArgsTuple args) { - return TupleFields::GetSelectedFields(args); - } - - // Prints the indices of the selected fields. - static void PrintIndices(::std::ostream* os) { - *os << "whose fields ("; - const int indices[10] = { k0, k1, k2, k3, k4, k5, k6, k7, k8, k9 }; - for (int i = 0; i < 10; i++) { - if (indices[i] < 0) - break; - - if (i >= 1) - *os << ", "; - - *os << "#" << indices[i]; - } - *os << ") "; - } - - const MonomorphicInnerMatcher inner_matcher_; - - GTEST_DISALLOW_ASSIGN_(ArgsMatcherImpl); -}; - -template -class ArgsMatcher { - public: - explicit ArgsMatcher(const InnerMatcher& inner_matcher) - : inner_matcher_(inner_matcher) {} - - template - operator Matcher() const { - return MakeMatcher(new ArgsMatcherImpl(inner_matcher_)); - } - - private: - const InnerMatcher inner_matcher_; - - GTEST_DISALLOW_ASSIGN_(ArgsMatcher); -}; - -} // namespace internal - -// Args(a_matcher) matches a tuple if the selected -// fields of it matches a_matcher. C++ doesn't support default -// arguments for function templates, so we have to overload it. -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - -template -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - - - -} // namespace testing - - -// The MATCHER* family of macros can be used in a namespace scope to -// define custom matchers easily. -// -// Basic Usage -// =========== -// -// The syntax -// -// MATCHER(name, description_string) { statements; } -// -// defines a matcher with the given name that executes the statements, -// which must return a bool to indicate if the match succeeds. Inside -// the statements, you can refer to the value being matched by 'arg', -// and refer to its type by 'arg_type'. -// -// The description string documents what the matcher does, and is used -// to generate the failure message when the match fails. Since a -// MATCHER() is usually defined in a header file shared by multiple -// C++ source files, we require the description to be a C-string -// literal to avoid possible side effects. It can be empty, in which -// case we'll use the sequence of words in the matcher name as the -// description. -// -// For example: -// -// MATCHER(IsEven, "") { return (arg % 2) == 0; } -// -// allows you to write -// -// // Expects mock_foo.Bar(n) to be called where n is even. -// EXPECT_CALL(mock_foo, Bar(IsEven())); -// -// or, -// -// // Verifies that the value of some_expression is even. -// EXPECT_THAT(some_expression, IsEven()); -// -// If the above assertion fails, it will print something like: -// -// Value of: some_expression -// Expected: is even -// Actual: 7 -// -// where the description "is even" is automatically calculated from the -// matcher name IsEven. -// -// Argument Type -// ============= -// -// Note that the type of the value being matched (arg_type) is -// determined by the context in which you use the matcher and is -// supplied to you by the compiler, so you don't need to worry about -// declaring it (nor can you). This allows the matcher to be -// polymorphic. For example, IsEven() can be used to match any type -// where the value of "(arg % 2) == 0" can be implicitly converted to -// a bool. In the "Bar(IsEven())" example above, if method Bar() -// takes an int, 'arg_type' will be int; if it takes an unsigned long, -// 'arg_type' will be unsigned long; and so on. -// -// Parameterizing Matchers -// ======================= -// -// Sometimes you'll want to parameterize the matcher. For that you -// can use another macro: -// -// MATCHER_P(name, param_name, description_string) { statements; } -// -// For example: -// -// MATCHER_P(HasAbsoluteValue, value, "") { return abs(arg) == value; } -// -// will allow you to write: -// -// EXPECT_THAT(Blah("a"), HasAbsoluteValue(n)); -// -// which may lead to this message (assuming n is 10): -// -// Value of: Blah("a") -// Expected: has absolute value 10 -// Actual: -9 -// -// Note that both the matcher description and its parameter are -// printed, making the message human-friendly. -// -// In the matcher definition body, you can write 'foo_type' to -// reference the type of a parameter named 'foo'. For example, in the -// body of MATCHER_P(HasAbsoluteValue, value) above, you can write -// 'value_type' to refer to the type of 'value'. -// -// We also provide MATCHER_P2, MATCHER_P3, ..., up to MATCHER_P10 to -// support multi-parameter matchers. -// -// Describing Parameterized Matchers -// ================================= -// -// The last argument to MATCHER*() is a string-typed expression. The -// expression can reference all of the matcher's parameters and a -// special bool-typed variable named 'negation'. When 'negation' is -// false, the expression should evaluate to the matcher's description; -// otherwise it should evaluate to the description of the negation of -// the matcher. For example, -// -// using testing::PrintToString; -// -// MATCHER_P2(InClosedRange, low, hi, -// std::string(negation ? "is not" : "is") + " in range [" + -// PrintToString(low) + ", " + PrintToString(hi) + "]") { -// return low <= arg && arg <= hi; -// } -// ... -// EXPECT_THAT(3, InClosedRange(4, 6)); -// EXPECT_THAT(3, Not(InClosedRange(2, 4))); -// -// would generate two failures that contain the text: -// -// Expected: is in range [4, 6] -// ... -// Expected: is not in range [2, 4] -// -// If you specify "" as the description, the failure message will -// contain the sequence of words in the matcher name followed by the -// parameter values printed as a tuple. For example, -// -// MATCHER_P2(InClosedRange, low, hi, "") { ... } -// ... -// EXPECT_THAT(3, InClosedRange(4, 6)); -// EXPECT_THAT(3, Not(InClosedRange(2, 4))); -// -// would generate two failures that contain the text: -// -// Expected: in closed range (4, 6) -// ... -// Expected: not (in closed range (2, 4)) -// -// Types of Matcher Parameters -// =========================== -// -// For the purpose of typing, you can view -// -// MATCHER_Pk(Foo, p1, ..., pk, description_string) { ... } -// -// as shorthand for -// -// template -// FooMatcherPk -// Foo(p1_type p1, ..., pk_type pk) { ... } -// -// When you write Foo(v1, ..., vk), the compiler infers the types of -// the parameters v1, ..., and vk for you. If you are not happy with -// the result of the type inference, you can specify the types by -// explicitly instantiating the template, as in Foo(5, -// false). As said earlier, you don't get to (or need to) specify -// 'arg_type' as that's determined by the context in which the matcher -// is used. You can assign the result of expression Foo(p1, ..., pk) -// to a variable of type FooMatcherPk. This -// can be useful when composing matchers. -// -// While you can instantiate a matcher template with reference types, -// passing the parameters by pointer usually makes your code more -// readable. If, however, you still want to pass a parameter by -// reference, be aware that in the failure message generated by the -// matcher you will see the value of the referenced object but not its -// address. -// -// Explaining Match Results -// ======================== -// -// Sometimes the matcher description alone isn't enough to explain why -// the match has failed or succeeded. For example, when expecting a -// long string, it can be very helpful to also print the diff between -// the expected string and the actual one. To achieve that, you can -// optionally stream additional information to a special variable -// named result_listener, whose type is a pointer to class -// MatchResultListener: -// -// MATCHER_P(EqualsLongString, str, "") { -// if (arg == str) return true; -// -// *result_listener << "the difference: " -/// << DiffStrings(str, arg); -// return false; -// } -// -// Overloading Matchers -// ==================== -// -// You can overload matchers with different numbers of parameters: -// -// MATCHER_P(Blah, a, description_string1) { ... } -// MATCHER_P2(Blah, a, b, description_string2) { ... } -// -// Caveats -// ======= -// -// When defining a new matcher, you should also consider implementing -// MatcherInterface or using MakePolymorphicMatcher(). These -// approaches require more work than the MATCHER* macros, but also -// give you more control on the types of the value being matched and -// the matcher parameters, which may leads to better compiler error -// messages when the matcher is used wrong. They also allow -// overloading matchers based on parameter types (as opposed to just -// based on the number of parameters). -// -// MATCHER*() can only be used in a namespace scope. The reason is -// that C++ doesn't yet allow function-local types to be used to -// instantiate templates. The up-coming C++0x standard will fix this. -// Once that's done, we'll consider supporting using MATCHER*() inside -// a function. -// -// More Information -// ================ -// -// To learn more about using these macros, please search for 'MATCHER' -// on -// https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md - -#define MATCHER(name, description)\ - class name##Matcher {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface<\ - GTEST_REFERENCE_TO_CONST_(arg_type)> {\ - public:\ - gmock_Impl()\ - {}\ - virtual bool MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(false);\ - }\ - virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(true);\ - }\ - private:\ - ::std::string FormatDescription(bool negation) const {\ - ::std::string gmock_description = (description);\ - if (!gmock_description.empty()) {\ - return gmock_description;\ - }\ - return ::testing::internal::FormatMatcherDescription(\ - negation, #name, \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tuple<>()));\ - }\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl());\ - }\ - name##Matcher() {\ - }\ - private:\ - };\ - inline name##Matcher name() {\ - return name##Matcher();\ - }\ - template \ - bool name##Matcher::gmock_Impl::MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ - const - -#define MATCHER_P(name, p0, description)\ - template \ - class name##MatcherP {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface<\ - GTEST_REFERENCE_TO_CONST_(arg_type)> {\ - public:\ - explicit gmock_Impl(p0##_type gmock_p0)\ - : p0(::testing::internal::move(gmock_p0)) {}\ - virtual bool MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(false);\ - }\ - virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(true);\ - }\ - p0##_type const p0;\ - private:\ - ::std::string FormatDescription(bool negation) const {\ - ::std::string gmock_description = (description);\ - if (!gmock_description.empty()) {\ - return gmock_description;\ - }\ - return ::testing::internal::FormatMatcherDescription(\ - negation, #name, \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tuple(p0)));\ - }\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0));\ - }\ - explicit name##MatcherP(p0##_type gmock_p0) : \ - p0(::testing::internal::move(gmock_p0)) {\ - }\ - p0##_type const p0;\ - private:\ - };\ - template \ - inline name##MatcherP name(p0##_type p0) {\ - return name##MatcherP(p0);\ - }\ - template \ - template \ - bool name##MatcherP::gmock_Impl::MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ - const - -#define MATCHER_P2(name, p0, p1, description)\ - template \ - class name##MatcherP2 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface<\ - GTEST_REFERENCE_TO_CONST_(arg_type)> {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1)\ - : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)) {}\ - virtual bool MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(false);\ - }\ - virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(true);\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - private:\ - ::std::string FormatDescription(bool negation) const {\ - ::std::string gmock_description = (description);\ - if (!gmock_description.empty()) {\ - return gmock_description;\ - }\ - return ::testing::internal::FormatMatcherDescription(\ - negation, #name, \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tuple(p0, p1)));\ - }\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1));\ - }\ - name##MatcherP2(p0##_type gmock_p0, \ - p1##_type gmock_p1) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)) {\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - private:\ - };\ - template \ - inline name##MatcherP2 name(p0##_type p0, \ - p1##_type p1) {\ - return name##MatcherP2(p0, p1);\ - }\ - template \ - template \ - bool name##MatcherP2::gmock_Impl::MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ - const - -#define MATCHER_P3(name, p0, p1, p2, description)\ - template \ - class name##MatcherP3 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface<\ - GTEST_REFERENCE_TO_CONST_(arg_type)> {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2)\ - : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)) {}\ - virtual bool MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(false);\ - }\ - virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(true);\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - private:\ - ::std::string FormatDescription(bool negation) const {\ - ::std::string gmock_description = (description);\ - if (!gmock_description.empty()) {\ - return gmock_description;\ - }\ - return ::testing::internal::FormatMatcherDescription(\ - negation, #name, \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tuple(p0, p1, p2)));\ - }\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2));\ - }\ - name##MatcherP3(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)) {\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - private:\ - };\ - template \ - inline name##MatcherP3 name(p0##_type p0, \ - p1##_type p1, p2##_type p2) {\ - return name##MatcherP3(p0, p1, p2);\ - }\ - template \ - template \ - bool name##MatcherP3::gmock_Impl::MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ - const - -#define MATCHER_P4(name, p0, p1, p2, p3, description)\ - template \ - class name##MatcherP4 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface<\ - GTEST_REFERENCE_TO_CONST_(arg_type)> {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3)\ - : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)) {}\ - virtual bool MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(false);\ - }\ - virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(true);\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - p3##_type const p3;\ - private:\ - ::std::string FormatDescription(bool negation) const {\ - ::std::string gmock_description = (description);\ - if (!gmock_description.empty()) {\ - return gmock_description;\ - }\ - return ::testing::internal::FormatMatcherDescription(\ - negation, #name, \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tuple(p0, \ - p1, p2, p3)));\ - }\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, p3));\ - }\ - name##MatcherP4(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, \ - p3##_type gmock_p3) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)) {\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - p3##_type const p3;\ - private:\ - };\ - template \ - inline name##MatcherP4 name(p0##_type p0, p1##_type p1, p2##_type p2, \ - p3##_type p3) {\ - return name##MatcherP4(p0, \ - p1, p2, p3);\ - }\ - template \ - template \ - bool name##MatcherP4::gmock_Impl::MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ - const - -#define MATCHER_P5(name, p0, p1, p2, p3, p4, description)\ - template \ - class name##MatcherP5 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface<\ - GTEST_REFERENCE_TO_CONST_(arg_type)> {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4)\ - : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)) {}\ - virtual bool MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(false);\ - }\ - virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(true);\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - p3##_type const p3;\ - p4##_type const p4;\ - private:\ - ::std::string FormatDescription(bool negation) const {\ - ::std::string gmock_description = (description);\ - if (!gmock_description.empty()) {\ - return gmock_description;\ - }\ - return ::testing::internal::FormatMatcherDescription(\ - negation, #name, \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tuple(p0, p1, p2, p3, p4)));\ - }\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, p3, p4));\ - }\ - name##MatcherP5(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, \ - p4##_type gmock_p4) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)) {\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - p3##_type const p3;\ - p4##_type const p4;\ - private:\ - };\ - template \ - inline name##MatcherP5 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4) {\ - return name##MatcherP5(p0, p1, p2, p3, p4);\ - }\ - template \ - template \ - bool name##MatcherP5::gmock_Impl::MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ - const - -#define MATCHER_P6(name, p0, p1, p2, p3, p4, p5, description)\ - template \ - class name##MatcherP6 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface<\ - GTEST_REFERENCE_TO_CONST_(arg_type)> {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5)\ - : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)) {}\ - virtual bool MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(false);\ - }\ - virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(true);\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - p3##_type const p3;\ - p4##_type const p4;\ - p5##_type const p5;\ - private:\ - ::std::string FormatDescription(bool negation) const {\ - ::std::string gmock_description = (description);\ - if (!gmock_description.empty()) {\ - return gmock_description;\ - }\ - return ::testing::internal::FormatMatcherDescription(\ - negation, #name, \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tuple(p0, p1, p2, p3, p4, p5)));\ - }\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, p3, p4, p5));\ - }\ - name##MatcherP6(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)) {\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - p3##_type const p3;\ - p4##_type const p4;\ - p5##_type const p5;\ - private:\ - };\ - template \ - inline name##MatcherP6 name(p0##_type p0, p1##_type p1, p2##_type p2, \ - p3##_type p3, p4##_type p4, p5##_type p5) {\ - return name##MatcherP6(p0, p1, p2, p3, p4, p5);\ - }\ - template \ - template \ - bool name##MatcherP6::gmock_Impl::MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ - const - -#define MATCHER_P7(name, p0, p1, p2, p3, p4, p5, p6, description)\ - template \ - class name##MatcherP7 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface<\ - GTEST_REFERENCE_TO_CONST_(arg_type)> {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6)\ - : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)), \ - p6(::testing::internal::move(gmock_p6)) {}\ - virtual bool MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(false);\ - }\ - virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(true);\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - p3##_type const p3;\ - p4##_type const p4;\ - p5##_type const p5;\ - p6##_type const p6;\ - private:\ - ::std::string FormatDescription(bool negation) const {\ - ::std::string gmock_description = (description);\ - if (!gmock_description.empty()) {\ - return gmock_description;\ - }\ - return ::testing::internal::FormatMatcherDescription(\ - negation, #name, \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tuple(p0, p1, p2, p3, p4, p5, \ - p6)));\ - }\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, p3, p4, p5, p6));\ - }\ - name##MatcherP7(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, \ - p6##_type gmock_p6) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)), \ - p6(::testing::internal::move(gmock_p6)) {\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - p3##_type const p3;\ - p4##_type const p4;\ - p5##_type const p5;\ - p6##_type const p6;\ - private:\ - };\ - template \ - inline name##MatcherP7 name(p0##_type p0, p1##_type p1, \ - p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \ - p6##_type p6) {\ - return name##MatcherP7(p0, p1, p2, p3, p4, p5, p6);\ - }\ - template \ - template \ - bool name##MatcherP7::gmock_Impl::MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ - const - -#define MATCHER_P8(name, p0, p1, p2, p3, p4, p5, p6, p7, description)\ - template \ - class name##MatcherP8 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface<\ - GTEST_REFERENCE_TO_CONST_(arg_type)> {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7)\ - : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)), \ - p6(::testing::internal::move(gmock_p6)), \ - p7(::testing::internal::move(gmock_p7)) {}\ - virtual bool MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(false);\ - }\ - virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(true);\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - p3##_type const p3;\ - p4##_type const p4;\ - p5##_type const p5;\ - p6##_type const p6;\ - p7##_type const p7;\ - private:\ - ::std::string FormatDescription(bool negation) const {\ - ::std::string gmock_description = (description);\ - if (!gmock_description.empty()) {\ - return gmock_description;\ - }\ - return ::testing::internal::FormatMatcherDescription(\ - negation, #name, \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tuple(p0, p1, p2, \ - p3, p4, p5, p6, p7)));\ - }\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, p3, p4, p5, p6, p7));\ - }\ - name##MatcherP8(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, p6##_type gmock_p6, \ - p7##_type gmock_p7) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)), \ - p6(::testing::internal::move(gmock_p6)), \ - p7(::testing::internal::move(gmock_p7)) {\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - p3##_type const p3;\ - p4##_type const p4;\ - p5##_type const p5;\ - p6##_type const p6;\ - p7##_type const p7;\ - private:\ - };\ - template \ - inline name##MatcherP8 name(p0##_type p0, \ - p1##_type p1, p2##_type p2, p3##_type p3, p4##_type p4, p5##_type p5, \ - p6##_type p6, p7##_type p7) {\ - return name##MatcherP8(p0, p1, p2, p3, p4, p5, \ - p6, p7);\ - }\ - template \ - template \ - bool name##MatcherP8::gmock_Impl::MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ - const - -#define MATCHER_P9(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, description)\ - template \ - class name##MatcherP9 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface<\ - GTEST_REFERENCE_TO_CONST_(arg_type)> {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8)\ - : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)), \ - p6(::testing::internal::move(gmock_p6)), \ - p7(::testing::internal::move(gmock_p7)), \ - p8(::testing::internal::move(gmock_p8)) {}\ - virtual bool MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(false);\ - }\ - virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(true);\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - p3##_type const p3;\ - p4##_type const p4;\ - p5##_type const p5;\ - p6##_type const p6;\ - p7##_type const p7;\ - p8##_type const p8;\ - private:\ - ::std::string FormatDescription(bool negation) const {\ - ::std::string gmock_description = (description);\ - if (!gmock_description.empty()) {\ - return gmock_description;\ - }\ - return ::testing::internal::FormatMatcherDescription(\ - negation, #name, \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tuple(p0, p1, p2, p3, p4, p5, p6, p7, p8)));\ - }\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, p3, p4, p5, p6, p7, p8));\ - }\ - name##MatcherP9(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \ - p8##_type gmock_p8) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)), \ - p6(::testing::internal::move(gmock_p6)), \ - p7(::testing::internal::move(gmock_p7)), \ - p8(::testing::internal::move(gmock_p8)) {\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - p3##_type const p3;\ - p4##_type const p4;\ - p5##_type const p5;\ - p6##_type const p6;\ - p7##_type const p7;\ - p8##_type const p8;\ - private:\ - };\ - template \ - inline name##MatcherP9 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, \ - p8##_type p8) {\ - return name##MatcherP9(p0, p1, p2, \ - p3, p4, p5, p6, p7, p8);\ - }\ - template \ - template \ - bool name##MatcherP9::gmock_Impl::MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ - const - -#define MATCHER_P10(name, p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, description)\ - template \ - class name##MatcherP10 {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface<\ - GTEST_REFERENCE_TO_CONST_(arg_type)> {\ - public:\ - gmock_Impl(p0##_type gmock_p0, p1##_type gmock_p1, p2##_type gmock_p2, \ - p3##_type gmock_p3, p4##_type gmock_p4, p5##_type gmock_p5, \ - p6##_type gmock_p6, p7##_type gmock_p7, p8##_type gmock_p8, \ - p9##_type gmock_p9)\ - : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)), \ - p6(::testing::internal::move(gmock_p6)), \ - p7(::testing::internal::move(gmock_p7)), \ - p8(::testing::internal::move(gmock_p8)), \ - p9(::testing::internal::move(gmock_p9)) {}\ - virtual bool MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(false);\ - }\ - virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(true);\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - p3##_type const p3;\ - p4##_type const p4;\ - p5##_type const p5;\ - p6##_type const p6;\ - p7##_type const p7;\ - p8##_type const p8;\ - p9##_type const p9;\ - private:\ - ::std::string FormatDescription(bool negation) const {\ - ::std::string gmock_description = (description);\ - if (!gmock_description.empty()) {\ - return gmock_description;\ - }\ - return ::testing::internal::FormatMatcherDescription(\ - negation, #name, \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tuple(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)));\ - }\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9));\ - }\ - name##MatcherP10(p0##_type gmock_p0, p1##_type gmock_p1, \ - p2##_type gmock_p2, p3##_type gmock_p3, p4##_type gmock_p4, \ - p5##_type gmock_p5, p6##_type gmock_p6, p7##_type gmock_p7, \ - p8##_type gmock_p8, \ - p9##_type gmock_p9) : p0(::testing::internal::move(gmock_p0)), \ - p1(::testing::internal::move(gmock_p1)), \ - p2(::testing::internal::move(gmock_p2)), \ - p3(::testing::internal::move(gmock_p3)), \ - p4(::testing::internal::move(gmock_p4)), \ - p5(::testing::internal::move(gmock_p5)), \ - p6(::testing::internal::move(gmock_p6)), \ - p7(::testing::internal::move(gmock_p7)), \ - p8(::testing::internal::move(gmock_p8)), \ - p9(::testing::internal::move(gmock_p9)) {\ - }\ - p0##_type const p0;\ - p1##_type const p1;\ - p2##_type const p2;\ - p3##_type const p3;\ - p4##_type const p4;\ - p5##_type const p5;\ - p6##_type const p6;\ - p7##_type const p7;\ - p8##_type const p8;\ - p9##_type const p9;\ - private:\ - };\ - template \ - inline name##MatcherP10 name(p0##_type p0, p1##_type p1, p2##_type p2, p3##_type p3, \ - p4##_type p4, p5##_type p5, p6##_type p6, p7##_type p7, p8##_type p8, \ - p9##_type p9) {\ - return name##MatcherP10(p0, \ - p1, p2, p3, p4, p5, p6, p7, p8, p9);\ - }\ - template \ - template \ - bool name##MatcherP10::gmock_Impl::MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ - const - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-matchers.h.pump b/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-matchers.h.pump deleted file mode 100644 index 29b004d2..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-matchers.h.pump +++ /dev/null @@ -1,511 +0,0 @@ -$$ -*- mode: c++; -*- -$$ This is a Pump source file. Please use Pump to convert -$$ it to gmock-generated-matchers.h. -$$ -$var n = 10 $$ The maximum arity we support. -$$ }} This line fixes auto-indentation of the following code in Emacs. -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements some commonly used variadic matchers. - -// GOOGLETEST_CM0002 DO NOT DELETE - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ - -#include -#include -#include -#include -#include "gmock/gmock-matchers.h" - -namespace testing { -namespace internal { - -$range i 0..n-1 - -// The type of the i-th (0-based) field of Tuple. -#define GMOCK_FIELD_TYPE_(Tuple, i) \ - typename ::std::tuple_element::type - -// TupleFields is for selecting fields from a -// tuple of type Tuple. It has two members: -// -// type: a tuple type whose i-th field is the ki-th field of Tuple. -// GetSelectedFields(t): returns fields k0, ..., and kn of t as a tuple. -// -// For example, in class TupleFields, 2, 0>, -// we have: -// -// type is std::tuple, and -// GetSelectedFields(std::make_tuple(true, 'a', 42)) is (42, true). - -template -class TupleFields; - -// This generic version is used when there are $n selectors. -template -class TupleFields { - public: - typedef ::std::tuple<$for i, [[GMOCK_FIELD_TYPE_(Tuple, k$i)]]> type; - static type GetSelectedFields(const Tuple& t) { - return type($for i, [[std::get(t)]]); - } -}; - -// The following specialization is used for 0 ~ $(n-1) selectors. - -$for i [[ -$$ }}} -$range j 0..i-1 -$range k 0..n-1 - -template -class TupleFields { - public: - typedef ::std::tuple<$for j, [[GMOCK_FIELD_TYPE_(Tuple, k$j)]]> type; - static type GetSelectedFields(const Tuple& $if i==0 [[/* t */]] $else [[t]]) { - return type($for j, [[std::get(t)]]); - } -}; - -]] - -#undef GMOCK_FIELD_TYPE_ - -// Implements the Args() matcher. - -$var ks = [[$for i, [[k$i]]]] -template -class ArgsMatcherImpl : public MatcherInterface { - public: - // ArgsTuple may have top-level const or reference modifiers. - typedef GTEST_REMOVE_REFERENCE_AND_CONST_(ArgsTuple) RawArgsTuple; - typedef typename internal::TupleFields::type SelectedArgs; - typedef Matcher MonomorphicInnerMatcher; - - template - explicit ArgsMatcherImpl(const InnerMatcher& inner_matcher) - : inner_matcher_(SafeMatcherCast(inner_matcher)) {} - - virtual bool MatchAndExplain(ArgsTuple args, - MatchResultListener* listener) const { - const SelectedArgs& selected_args = GetSelectedArgs(args); - if (!listener->IsInterested()) - return inner_matcher_.Matches(selected_args); - - PrintIndices(listener->stream()); - *listener << "are " << PrintToString(selected_args); - - StringMatchResultListener inner_listener; - const bool match = inner_matcher_.MatchAndExplain(selected_args, - &inner_listener); - PrintIfNotEmpty(inner_listener.str(), listener->stream()); - return match; - } - - virtual void DescribeTo(::std::ostream* os) const { - *os << "are a tuple "; - PrintIndices(os); - inner_matcher_.DescribeTo(os); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "are a tuple "; - PrintIndices(os); - inner_matcher_.DescribeNegationTo(os); - } - - private: - static SelectedArgs GetSelectedArgs(ArgsTuple args) { - return TupleFields::GetSelectedFields(args); - } - - // Prints the indices of the selected fields. - static void PrintIndices(::std::ostream* os) { - *os << "whose fields ("; - const int indices[$n] = { $ks }; - for (int i = 0; i < $n; i++) { - if (indices[i] < 0) - break; - - if (i >= 1) - *os << ", "; - - *os << "#" << indices[i]; - } - *os << ") "; - } - - const MonomorphicInnerMatcher inner_matcher_; - - GTEST_DISALLOW_ASSIGN_(ArgsMatcherImpl); -}; - -template -class ArgsMatcher { - public: - explicit ArgsMatcher(const InnerMatcher& inner_matcher) - : inner_matcher_(inner_matcher) {} - - template - operator Matcher() const { - return MakeMatcher(new ArgsMatcherImpl(inner_matcher_)); - } - - private: - const InnerMatcher inner_matcher_; - - GTEST_DISALLOW_ASSIGN_(ArgsMatcher); -}; - -} // namespace internal - -// Args(a_matcher) matches a tuple if the selected -// fields of it matches a_matcher. C++ doesn't support default -// arguments for function templates, so we have to overload it. - -$range i 0..n -$for i [[ -$range j 1..i -template <$for j [[int k$j, ]]typename InnerMatcher> -inline internal::ArgsMatcher -Args(const InnerMatcher& matcher) { - return internal::ArgsMatcher(matcher); -} - - -]] - -} // namespace testing -$$ } // This Pump meta comment fixes auto-indentation in Emacs. It will not -$$ // show up in the generated code. - - -// The MATCHER* family of macros can be used in a namespace scope to -// define custom matchers easily. -// -// Basic Usage -// =========== -// -// The syntax -// -// MATCHER(name, description_string) { statements; } -// -// defines a matcher with the given name that executes the statements, -// which must return a bool to indicate if the match succeeds. Inside -// the statements, you can refer to the value being matched by 'arg', -// and refer to its type by 'arg_type'. -// -// The description string documents what the matcher does, and is used -// to generate the failure message when the match fails. Since a -// MATCHER() is usually defined in a header file shared by multiple -// C++ source files, we require the description to be a C-string -// literal to avoid possible side effects. It can be empty, in which -// case we'll use the sequence of words in the matcher name as the -// description. -// -// For example: -// -// MATCHER(IsEven, "") { return (arg % 2) == 0; } -// -// allows you to write -// -// // Expects mock_foo.Bar(n) to be called where n is even. -// EXPECT_CALL(mock_foo, Bar(IsEven())); -// -// or, -// -// // Verifies that the value of some_expression is even. -// EXPECT_THAT(some_expression, IsEven()); -// -// If the above assertion fails, it will print something like: -// -// Value of: some_expression -// Expected: is even -// Actual: 7 -// -// where the description "is even" is automatically calculated from the -// matcher name IsEven. -// -// Argument Type -// ============= -// -// Note that the type of the value being matched (arg_type) is -// determined by the context in which you use the matcher and is -// supplied to you by the compiler, so you don't need to worry about -// declaring it (nor can you). This allows the matcher to be -// polymorphic. For example, IsEven() can be used to match any type -// where the value of "(arg % 2) == 0" can be implicitly converted to -// a bool. In the "Bar(IsEven())" example above, if method Bar() -// takes an int, 'arg_type' will be int; if it takes an unsigned long, -// 'arg_type' will be unsigned long; and so on. -// -// Parameterizing Matchers -// ======================= -// -// Sometimes you'll want to parameterize the matcher. For that you -// can use another macro: -// -// MATCHER_P(name, param_name, description_string) { statements; } -// -// For example: -// -// MATCHER_P(HasAbsoluteValue, value, "") { return abs(arg) == value; } -// -// will allow you to write: -// -// EXPECT_THAT(Blah("a"), HasAbsoluteValue(n)); -// -// which may lead to this message (assuming n is 10): -// -// Value of: Blah("a") -// Expected: has absolute value 10 -// Actual: -9 -// -// Note that both the matcher description and its parameter are -// printed, making the message human-friendly. -// -// In the matcher definition body, you can write 'foo_type' to -// reference the type of a parameter named 'foo'. For example, in the -// body of MATCHER_P(HasAbsoluteValue, value) above, you can write -// 'value_type' to refer to the type of 'value'. -// -// We also provide MATCHER_P2, MATCHER_P3, ..., up to MATCHER_P$n to -// support multi-parameter matchers. -// -// Describing Parameterized Matchers -// ================================= -// -// The last argument to MATCHER*() is a string-typed expression. The -// expression can reference all of the matcher's parameters and a -// special bool-typed variable named 'negation'. When 'negation' is -// false, the expression should evaluate to the matcher's description; -// otherwise it should evaluate to the description of the negation of -// the matcher. For example, -// -// using testing::PrintToString; -// -// MATCHER_P2(InClosedRange, low, hi, -// std::string(negation ? "is not" : "is") + " in range [" + -// PrintToString(low) + ", " + PrintToString(hi) + "]") { -// return low <= arg && arg <= hi; -// } -// ... -// EXPECT_THAT(3, InClosedRange(4, 6)); -// EXPECT_THAT(3, Not(InClosedRange(2, 4))); -// -// would generate two failures that contain the text: -// -// Expected: is in range [4, 6] -// ... -// Expected: is not in range [2, 4] -// -// If you specify "" as the description, the failure message will -// contain the sequence of words in the matcher name followed by the -// parameter values printed as a tuple. For example, -// -// MATCHER_P2(InClosedRange, low, hi, "") { ... } -// ... -// EXPECT_THAT(3, InClosedRange(4, 6)); -// EXPECT_THAT(3, Not(InClosedRange(2, 4))); -// -// would generate two failures that contain the text: -// -// Expected: in closed range (4, 6) -// ... -// Expected: not (in closed range (2, 4)) -// -// Types of Matcher Parameters -// =========================== -// -// For the purpose of typing, you can view -// -// MATCHER_Pk(Foo, p1, ..., pk, description_string) { ... } -// -// as shorthand for -// -// template -// FooMatcherPk -// Foo(p1_type p1, ..., pk_type pk) { ... } -// -// When you write Foo(v1, ..., vk), the compiler infers the types of -// the parameters v1, ..., and vk for you. If you are not happy with -// the result of the type inference, you can specify the types by -// explicitly instantiating the template, as in Foo(5, -// false). As said earlier, you don't get to (or need to) specify -// 'arg_type' as that's determined by the context in which the matcher -// is used. You can assign the result of expression Foo(p1, ..., pk) -// to a variable of type FooMatcherPk. This -// can be useful when composing matchers. -// -// While you can instantiate a matcher template with reference types, -// passing the parameters by pointer usually makes your code more -// readable. If, however, you still want to pass a parameter by -// reference, be aware that in the failure message generated by the -// matcher you will see the value of the referenced object but not its -// address. -// -// Explaining Match Results -// ======================== -// -// Sometimes the matcher description alone isn't enough to explain why -// the match has failed or succeeded. For example, when expecting a -// long string, it can be very helpful to also print the diff between -// the expected string and the actual one. To achieve that, you can -// optionally stream additional information to a special variable -// named result_listener, whose type is a pointer to class -// MatchResultListener: -// -// MATCHER_P(EqualsLongString, str, "") { -// if (arg == str) return true; -// -// *result_listener << "the difference: " -/// << DiffStrings(str, arg); -// return false; -// } -// -// Overloading Matchers -// ==================== -// -// You can overload matchers with different numbers of parameters: -// -// MATCHER_P(Blah, a, description_string1) { ... } -// MATCHER_P2(Blah, a, b, description_string2) { ... } -// -// Caveats -// ======= -// -// When defining a new matcher, you should also consider implementing -// MatcherInterface or using MakePolymorphicMatcher(). These -// approaches require more work than the MATCHER* macros, but also -// give you more control on the types of the value being matched and -// the matcher parameters, which may leads to better compiler error -// messages when the matcher is used wrong. They also allow -// overloading matchers based on parameter types (as opposed to just -// based on the number of parameters). -// -// MATCHER*() can only be used in a namespace scope. The reason is -// that C++ doesn't yet allow function-local types to be used to -// instantiate templates. The up-coming C++0x standard will fix this. -// Once that's done, we'll consider supporting using MATCHER*() inside -// a function. -// -// More Information -// ================ -// -// To learn more about using these macros, please search for 'MATCHER' -// on -// https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md - -$range i 0..n -$for i - -[[ -$var macro_name = [[$if i==0 [[MATCHER]] $elif i==1 [[MATCHER_P]] - $else [[MATCHER_P$i]]]] -$var class_name = [[name##Matcher[[$if i==0 [[]] $elif i==1 [[P]] - $else [[P$i]]]]]] -$range j 0..i-1 -$var template = [[$if i==0 [[]] $else [[ - - template <$for j, [[typename p$j##_type]]>\ -]]]] -$var ctor_param_list = [[$for j, [[p$j##_type gmock_p$j]]]] -$var impl_ctor_param_list = [[$for j, [[p$j##_type gmock_p$j]]]] -$var impl_inits = [[$if i==0 [[]] $else [[ : $for j, [[p$j(::testing::internal::move(gmock_p$j))]]]]]] -$var inits = [[$if i==0 [[]] $else [[ : $for j, [[p$j(::testing::internal::move(gmock_p$j))]]]]]] -$var params = [[$for j, [[p$j]]]] -$var param_types = [[$if i==0 [[]] $else [[<$for j, [[p$j##_type]]>]]]] -$var param_types_and_names = [[$for j, [[p$j##_type p$j]]]] -$var param_field_decls = [[$for j -[[ - - p$j##_type const p$j;\ -]]]] -$var param_field_decls2 = [[$for j -[[ - - p$j##_type const p$j;\ -]]]] - -#define $macro_name(name$for j [[, p$j]], description)\$template - class $class_name {\ - public:\ - template \ - class gmock_Impl : public ::testing::MatcherInterface<\ - GTEST_REFERENCE_TO_CONST_(arg_type)> {\ - public:\ - [[$if i==1 [[explicit ]]]]gmock_Impl($impl_ctor_param_list)\ - $impl_inits {}\ - virtual bool MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener) const;\ - virtual void DescribeTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(false);\ - }\ - virtual void DescribeNegationTo(::std::ostream* gmock_os) const {\ - *gmock_os << FormatDescription(true);\ - }\$param_field_decls - private:\ - ::std::string FormatDescription(bool negation) const {\ - ::std::string gmock_description = (description);\ - if (!gmock_description.empty()) {\ - return gmock_description;\ - }\ - return ::testing::internal::FormatMatcherDescription(\ - negation, #name, \ - ::testing::internal::UniversalTersePrintTupleFieldsToStrings(\ - ::std::tuple<$for j, [[p$j##_type]]>($for j, [[p$j]])));\ - }\ - };\ - template \ - operator ::testing::Matcher() const {\ - return ::testing::Matcher(\ - new gmock_Impl($params));\ - }\ - [[$if i==1 [[explicit ]]]]$class_name($ctor_param_list)$inits {\ - }\$param_field_decls2 - private:\ - };\$template - inline $class_name$param_types name($param_types_and_names) {\ - return $class_name$param_types($params);\ - }\$template - template \ - bool $class_name$param_types::gmock_Impl::MatchAndExplain(\ - GTEST_REFERENCE_TO_CONST_(arg_type) arg,\ - ::testing::MatchResultListener* result_listener GTEST_ATTRIBUTE_UNUSED_)\ - const -]] - - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_MATCHERS_H_ diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-nice-strict.h b/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-nice-strict.h deleted file mode 100644 index 91ba1d9b..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-nice-strict.h +++ /dev/null @@ -1,459 +0,0 @@ -// This file was GENERATED by command: -// pump.py gmock-generated-nice-strict.h.pump -// DO NOT EDIT BY HAND!!! - -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// Implements class templates NiceMock, NaggyMock, and StrictMock. -// -// Given a mock class MockFoo that is created using Google Mock, -// NiceMock is a subclass of MockFoo that allows -// uninteresting calls (i.e. calls to mock methods that have no -// EXPECT_CALL specs), NaggyMock is a subclass of MockFoo -// that prints a warning when an uninteresting call occurs, and -// StrictMock is a subclass of MockFoo that treats all -// uninteresting calls as errors. -// -// Currently a mock is naggy by default, so MockFoo and -// NaggyMock behave like the same. However, we will soon -// switch the default behavior of mocks to be nice, as that in general -// leads to more maintainable tests. When that happens, MockFoo will -// stop behaving like NaggyMock and start behaving like -// NiceMock. -// -// NiceMock, NaggyMock, and StrictMock "inherit" the constructors of -// their respective base class. Therefore you can write -// NiceMock(5, "a") to construct a nice mock where MockFoo -// has a constructor that accepts (int, const char*), for example. -// -// A known limitation is that NiceMock, NaggyMock, -// and StrictMock only works for mock methods defined using -// the MOCK_METHOD* family of macros DIRECTLY in the MockFoo class. -// If a mock method is defined in a base class of MockFoo, the "nice" -// or "strict" modifier may not affect it, depending on the compiler. -// In particular, nesting NiceMock, NaggyMock, and StrictMock is NOT -// supported. - -// GOOGLETEST_CM0002 DO NOT DELETE - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_ - -#include "gmock/gmock-spec-builders.h" -#include "gmock/internal/gmock-port.h" - -namespace testing { - -template -class NiceMock : public MockClass { - public: - NiceMock() : MockClass() { - ::testing::Mock::AllowUninterestingCalls( - internal::ImplicitCast_(this)); - } - -#if GTEST_LANG_CXX11 - // Ideally, we would inherit base class's constructors through a using - // declaration, which would preserve their visibility. However, many existing - // tests rely on the fact that current implementation reexports protected - // constructors as public. These tests would need to be cleaned up first. - - // Single argument constructor is special-cased so that it can be - // made explicit. - template - explicit NiceMock(A&& arg) : MockClass(std::forward(arg)) { - ::testing::Mock::AllowUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NiceMock(A1&& arg1, A2&& arg2, An&&... args) - : MockClass(std::forward(arg1), std::forward(arg2), - std::forward(args)...) { - ::testing::Mock::AllowUninterestingCalls( - internal::ImplicitCast_(this)); - } -#else - // C++98 doesn't have variadic templates, so we have to define one - // for each arity. - template - explicit NiceMock(const A1& a1) : MockClass(a1) { - ::testing::Mock::AllowUninterestingCalls( - internal::ImplicitCast_(this)); - } - template - NiceMock(const A1& a1, const A2& a2) : MockClass(a1, a2) { - ::testing::Mock::AllowUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) { - ::testing::Mock::AllowUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3, - const A4& a4) : MockClass(a1, a2, a3, a4) { - ::testing::Mock::AllowUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5) : MockClass(a1, a2, a3, a4, a5) { - ::testing::Mock::AllowUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) { - ::testing::Mock::AllowUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5, - a6, a7) { - ::testing::Mock::AllowUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1, - a2, a3, a4, a5, a6, a7, a8) { - ::testing::Mock::AllowUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8, - const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) { - ::testing::Mock::AllowUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NiceMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, - const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) { - ::testing::Mock::AllowUninterestingCalls( - internal::ImplicitCast_(this)); - } - -#endif // GTEST_LANG_CXX11 - - ~NiceMock() { - ::testing::Mock::UnregisterCallReaction( - internal::ImplicitCast_(this)); - } - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(NiceMock); -}; - -template -class NaggyMock : public MockClass { - public: - NaggyMock() : MockClass() { - ::testing::Mock::WarnUninterestingCalls( - internal::ImplicitCast_(this)); - } - -#if GTEST_LANG_CXX11 - // Ideally, we would inherit base class's constructors through a using - // declaration, which would preserve their visibility. However, many existing - // tests rely on the fact that current implementation reexports protected - // constructors as public. These tests would need to be cleaned up first. - - // Single argument constructor is special-cased so that it can be - // made explicit. - template - explicit NaggyMock(A&& arg) : MockClass(std::forward(arg)) { - ::testing::Mock::WarnUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NaggyMock(A1&& arg1, A2&& arg2, An&&... args) - : MockClass(std::forward(arg1), std::forward(arg2), - std::forward(args)...) { - ::testing::Mock::WarnUninterestingCalls( - internal::ImplicitCast_(this)); - } -#else - // C++98 doesn't have variadic templates, so we have to define one - // for each arity. - template - explicit NaggyMock(const A1& a1) : MockClass(a1) { - ::testing::Mock::WarnUninterestingCalls( - internal::ImplicitCast_(this)); - } - template - NaggyMock(const A1& a1, const A2& a2) : MockClass(a1, a2) { - ::testing::Mock::WarnUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NaggyMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) { - ::testing::Mock::WarnUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NaggyMock(const A1& a1, const A2& a2, const A3& a3, - const A4& a4) : MockClass(a1, a2, a3, a4) { - ::testing::Mock::WarnUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5) : MockClass(a1, a2, a3, a4, a5) { - ::testing::Mock::WarnUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) { - ::testing::Mock::WarnUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5, - a6, a7) { - ::testing::Mock::WarnUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1, - a2, a3, a4, a5, a6, a7, a8) { - ::testing::Mock::WarnUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8, - const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) { - ::testing::Mock::WarnUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - NaggyMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, - const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) { - ::testing::Mock::WarnUninterestingCalls( - internal::ImplicitCast_(this)); - } - -#endif // GTEST_LANG_CXX11 - - ~NaggyMock() { - ::testing::Mock::UnregisterCallReaction( - internal::ImplicitCast_(this)); - } - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(NaggyMock); -}; - -template -class StrictMock : public MockClass { - public: - StrictMock() : MockClass() { - ::testing::Mock::FailUninterestingCalls( - internal::ImplicitCast_(this)); - } - -#if GTEST_LANG_CXX11 - // Ideally, we would inherit base class's constructors through a using - // declaration, which would preserve their visibility. However, many existing - // tests rely on the fact that current implementation reexports protected - // constructors as public. These tests would need to be cleaned up first. - - // Single argument constructor is special-cased so that it can be - // made explicit. - template - explicit StrictMock(A&& arg) : MockClass(std::forward(arg)) { - ::testing::Mock::FailUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - StrictMock(A1&& arg1, A2&& arg2, An&&... args) - : MockClass(std::forward(arg1), std::forward(arg2), - std::forward(args)...) { - ::testing::Mock::FailUninterestingCalls( - internal::ImplicitCast_(this)); - } -#else - // C++98 doesn't have variadic templates, so we have to define one - // for each arity. - template - explicit StrictMock(const A1& a1) : MockClass(a1) { - ::testing::Mock::FailUninterestingCalls( - internal::ImplicitCast_(this)); - } - template - StrictMock(const A1& a1, const A2& a2) : MockClass(a1, a2) { - ::testing::Mock::FailUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3) : MockClass(a1, a2, a3) { - ::testing::Mock::FailUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3, - const A4& a4) : MockClass(a1, a2, a3, a4) { - ::testing::Mock::FailUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5) : MockClass(a1, a2, a3, a4, a5) { - ::testing::Mock::FailUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6) : MockClass(a1, a2, a3, a4, a5, a6) { - ::testing::Mock::FailUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7) : MockClass(a1, a2, a3, a4, a5, - a6, a7) { - ::testing::Mock::FailUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8) : MockClass(a1, - a2, a3, a4, a5, a6, a7, a8) { - ::testing::Mock::FailUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8, - const A9& a9) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9) { - ::testing::Mock::FailUninterestingCalls( - internal::ImplicitCast_(this)); - } - - template - StrictMock(const A1& a1, const A2& a2, const A3& a3, const A4& a4, - const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, - const A10& a10) : MockClass(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) { - ::testing::Mock::FailUninterestingCalls( - internal::ImplicitCast_(this)); - } - -#endif // GTEST_LANG_CXX11 - - ~StrictMock() { - ::testing::Mock::UnregisterCallReaction( - internal::ImplicitCast_(this)); - } - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(StrictMock); -}; - -// The following specializations catch some (relatively more common) -// user errors of nesting nice and strict mocks. They do NOT catch -// all possible errors. - -// These specializations are declared but not defined, as NiceMock, -// NaggyMock, and StrictMock cannot be nested. - -template -class NiceMock >; -template -class NiceMock >; -template -class NiceMock >; - -template -class NaggyMock >; -template -class NaggyMock >; -template -class NaggyMock >; - -template -class StrictMock >; -template -class StrictMock >; -template -class StrictMock >; - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_ diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump b/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump deleted file mode 100644 index ed49f4ab..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +++ /dev/null @@ -1,179 +0,0 @@ -$$ -*- mode: c++; -*- -$$ This is a Pump source file. Please use Pump to convert -$$ it to gmock-generated-nice-strict.h. -$$ -$var n = 10 $$ The maximum arity we support. -// Copyright 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// Implements class templates NiceMock, NaggyMock, and StrictMock. -// -// Given a mock class MockFoo that is created using Google Mock, -// NiceMock is a subclass of MockFoo that allows -// uninteresting calls (i.e. calls to mock methods that have no -// EXPECT_CALL specs), NaggyMock is a subclass of MockFoo -// that prints a warning when an uninteresting call occurs, and -// StrictMock is a subclass of MockFoo that treats all -// uninteresting calls as errors. -// -// Currently a mock is naggy by default, so MockFoo and -// NaggyMock behave like the same. However, we will soon -// switch the default behavior of mocks to be nice, as that in general -// leads to more maintainable tests. When that happens, MockFoo will -// stop behaving like NaggyMock and start behaving like -// NiceMock. -// -// NiceMock, NaggyMock, and StrictMock "inherit" the constructors of -// their respective base class. Therefore you can write -// NiceMock(5, "a") to construct a nice mock where MockFoo -// has a constructor that accepts (int, const char*), for example. -// -// A known limitation is that NiceMock, NaggyMock, -// and StrictMock only works for mock methods defined using -// the MOCK_METHOD* family of macros DIRECTLY in the MockFoo class. -// If a mock method is defined in a base class of MockFoo, the "nice" -// or "strict" modifier may not affect it, depending on the compiler. -// In particular, nesting NiceMock, NaggyMock, and StrictMock is NOT -// supported. - -// GOOGLETEST_CM0002 DO NOT DELETE - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_ - -#include "gmock/gmock-spec-builders.h" -#include "gmock/internal/gmock-port.h" - -namespace testing { - -$range kind 0..2 -$for kind [[ - -$var clazz=[[$if kind==0 [[NiceMock]] - $elif kind==1 [[NaggyMock]] - $else [[StrictMock]]]] - -$var method=[[$if kind==0 [[AllowUninterestingCalls]] - $elif kind==1 [[WarnUninterestingCalls]] - $else [[FailUninterestingCalls]]]] - -template -class $clazz : public MockClass { - public: - $clazz() : MockClass() { - ::testing::Mock::$method( - internal::ImplicitCast_(this)); - } - -#if GTEST_LANG_CXX11 - // Ideally, we would inherit base class's constructors through a using - // declaration, which would preserve their visibility. However, many existing - // tests rely on the fact that current implementation reexports protected - // constructors as public. These tests would need to be cleaned up first. - - // Single argument constructor is special-cased so that it can be - // made explicit. - template - explicit $clazz(A&& arg) : MockClass(std::forward(arg)) { - ::testing::Mock::$method( - internal::ImplicitCast_(this)); - } - - template - $clazz(A1&& arg1, A2&& arg2, An&&... args) - : MockClass(std::forward(arg1), std::forward(arg2), - std::forward(args)...) { - ::testing::Mock::$method( - internal::ImplicitCast_(this)); - } -#else - // C++98 doesn't have variadic templates, so we have to define one - // for each arity. - template - explicit $clazz(const A1& a1) : MockClass(a1) { - ::testing::Mock::$method( - internal::ImplicitCast_(this)); - } - -$range i 2..n -$for i [[ -$range j 1..i - template <$for j, [[typename A$j]]> - $clazz($for j, [[const A$j& a$j]]) : MockClass($for j, [[a$j]]) { - ::testing::Mock::$method( - internal::ImplicitCast_(this)); - } - - -]] -#endif // GTEST_LANG_CXX11 - - ~$clazz() { - ::testing::Mock::UnregisterCallReaction( - internal::ImplicitCast_(this)); - } - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_($clazz); -}; - -]] - -// The following specializations catch some (relatively more common) -// user errors of nesting nice and strict mocks. They do NOT catch -// all possible errors. - -// These specializations are declared but not defined, as NiceMock, -// NaggyMock, and StrictMock cannot be nested. - -template -class NiceMock >; -template -class NiceMock >; -template -class NiceMock >; - -template -class NaggyMock >; -template -class NaggyMock >; -template -class NaggyMock >; - -template -class StrictMock >; -template -class StrictMock >; -template -class StrictMock >; - -} // namespace testing - -#endif // GMOCK_INCLUDE_GMOCK_GMOCK_GENERATED_NICE_STRICT_H_ diff --git a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-matchers.h b/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-matchers.h deleted file mode 100644 index cdb7367b..00000000 --- a/metamod-source/third_party/amtl/third_party/googletest/googlemock/include/gmock/gmock-matchers.h +++ /dev/null @@ -1,5207 +0,0 @@ -// Copyright 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -// Google Mock - a framework for writing C++ mock classes. -// -// This file implements some commonly used argument matchers. More -// matchers can be defined by the user implementing the -// MatcherInterface interface if necessary. - -// GOOGLETEST_CM0002 DO NOT DELETE - -#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_ -#define GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_ - -#include -#include -#include -#include -#include // NOLINT -#include -#include -#include -#include -#include "gtest/gtest.h" -#include "gmock/internal/gmock-internal-utils.h" -#include "gmock/internal/gmock-port.h" - -#if GTEST_HAS_STD_INITIALIZER_LIST_ -# include // NOLINT -- must be after gtest.h -#endif - -GTEST_DISABLE_MSC_WARNINGS_PUSH_( - 4251 5046 /* class A needs to have dll-interface to be used by clients of - class B */ - /* Symbol involving type with internal linkage not defined */) - -namespace testing { - -// To implement a matcher Foo for type T, define: -// 1. a class FooMatcherImpl that implements the -// MatcherInterface interface, and -// 2. a factory function that creates a Matcher object from a -// FooMatcherImpl*. -// -// The two-level delegation design makes it possible to allow a user -// to write "v" instead of "Eq(v)" where a Matcher is expected, which -// is impossible if we pass matchers by pointers. It also eases -// ownership management as Matcher objects can now be copied like -// plain values. - -// MatchResultListener is an abstract class. Its << operator can be -// used by a matcher to explain why a value matches or doesn't match. -// -// FIXME: add method -// bool InterestedInWhy(bool result) const; -// to indicate whether the listener is interested in why the match -// result is 'result'. -class MatchResultListener { - public: - // Creates a listener object with the given underlying ostream. The - // listener does not own the ostream, and does not dereference it - // in the constructor or destructor. - explicit MatchResultListener(::std::ostream* os) : stream_(os) {} - virtual ~MatchResultListener() = 0; // Makes this class abstract. - - // Streams x to the underlying ostream; does nothing if the ostream - // is NULL. - template - MatchResultListener& operator<<(const T& x) { - if (stream_ != nullptr) *stream_ << x; - return *this; - } - - // Returns the underlying ostream. - ::std::ostream* stream() { return stream_; } - - // Returns true iff the listener is interested in an explanation of - // the match result. A matcher's MatchAndExplain() method can use - // this information to avoid generating the explanation when no one - // intends to hear it. - bool IsInterested() const { return stream_ != nullptr; } - - private: - ::std::ostream* const stream_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(MatchResultListener); -}; - -inline MatchResultListener::~MatchResultListener() { -} - -// An instance of a subclass of this knows how to describe itself as a -// matcher. -class MatcherDescriberInterface { - public: - virtual ~MatcherDescriberInterface() {} - - // Describes this matcher to an ostream. The function should print - // a verb phrase that describes the property a value matching this - // matcher should have. The subject of the verb phrase is the value - // being matched. For example, the DescribeTo() method of the Gt(7) - // matcher prints "is greater than 7". - virtual void DescribeTo(::std::ostream* os) const = 0; - - // Describes the negation of this matcher to an ostream. For - // example, if the description of this matcher is "is greater than - // 7", the negated description could be "is not greater than 7". - // You are not required to override this when implementing - // MatcherInterface, but it is highly advised so that your matcher - // can produce good error messages. - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "not ("; - DescribeTo(os); - *os << ")"; - } -}; - -// The implementation of a matcher. -template -class MatcherInterface : public MatcherDescriberInterface { - public: - // Returns true iff the matcher matches x; also explains the match - // result to 'listener' if necessary (see the next paragraph), in - // the form of a non-restrictive relative clause ("which ...", - // "whose ...", etc) that describes x. For example, the - // MatchAndExplain() method of the Pointee(...) matcher should - // generate an explanation like "which points to ...". - // - // Implementations of MatchAndExplain() should add an explanation of - // the match result *if and only if* they can provide additional - // information that's not already present (or not obvious) in the - // print-out of x and the matcher's description. Whether the match - // succeeds is not a factor in deciding whether an explanation is - // needed, as sometimes the caller needs to print a failure message - // when the match succeeds (e.g. when the matcher is used inside - // Not()). - // - // For example, a "has at least 10 elements" matcher should explain - // what the actual element count is, regardless of the match result, - // as it is useful information to the reader; on the other hand, an - // "is empty" matcher probably only needs to explain what the actual - // size is when the match fails, as it's redundant to say that the - // size is 0 when the value is already known to be empty. - // - // You should override this method when defining a new matcher. - // - // It's the responsibility of the caller (Google Mock) to guarantee - // that 'listener' is not NULL. This helps to simplify a matcher's - // implementation when it doesn't care about the performance, as it - // can talk to 'listener' without checking its validity first. - // However, in order to implement dummy listeners efficiently, - // listener->stream() may be NULL. - virtual bool MatchAndExplain(T x, MatchResultListener* listener) const = 0; - - // Inherits these methods from MatcherDescriberInterface: - // virtual void DescribeTo(::std::ostream* os) const = 0; - // virtual void DescribeNegationTo(::std::ostream* os) const; -}; - -namespace internal { - -// Converts a MatcherInterface to a MatcherInterface. -template -class MatcherInterfaceAdapter : public MatcherInterface { - public: - explicit MatcherInterfaceAdapter(const MatcherInterface* impl) - : impl_(impl) {} - virtual ~MatcherInterfaceAdapter() { delete impl_; } - - virtual void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); } - - virtual void DescribeNegationTo(::std::ostream* os) const { - impl_->DescribeNegationTo(os); - } - - virtual bool MatchAndExplain(const T& x, - MatchResultListener* listener) const { - return impl_->MatchAndExplain(x, listener); - } - - private: - const MatcherInterface* const impl_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(MatcherInterfaceAdapter); -}; - -} // namespace internal - -// A match result listener that stores the explanation in a string. -class StringMatchResultListener : public MatchResultListener { - public: - StringMatchResultListener() : MatchResultListener(&ss_) {} - - // Returns the explanation accumulated so far. - std::string str() const { return ss_.str(); } - - // Clears the explanation accumulated so far. - void Clear() { ss_.str(""); } - - private: - ::std::stringstream ss_; - - GTEST_DISALLOW_COPY_AND_ASSIGN_(StringMatchResultListener); -}; - -namespace internal { - -struct AnyEq { - template - bool operator()(const A& a, const B& b) const { return a == b; } -}; -struct AnyNe { - template - bool operator()(const A& a, const B& b) const { return a != b; } -}; -struct AnyLt { - template - bool operator()(const A& a, const B& b) const { return a < b; } -}; -struct AnyGt { - template - bool operator()(const A& a, const B& b) const { return a > b; } -}; -struct AnyLe { - template - bool operator()(const A& a, const B& b) const { return a <= b; } -}; -struct AnyGe { - template - bool operator()(const A& a, const B& b) const { return a >= b; } -}; - -// A match result listener that ignores the explanation. -class DummyMatchResultListener : public MatchResultListener { - public: - DummyMatchResultListener() : MatchResultListener(nullptr) {} - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(DummyMatchResultListener); -}; - -// A match result listener that forwards the explanation to a given -// ostream. The difference between this and MatchResultListener is -// that the former is concrete. -class StreamMatchResultListener : public MatchResultListener { - public: - explicit StreamMatchResultListener(::std::ostream* os) - : MatchResultListener(os) {} - - private: - GTEST_DISALLOW_COPY_AND_ASSIGN_(StreamMatchResultListener); -}; - -// An internal class for implementing Matcher, which will derive -// from it. We put functionalities common to all Matcher -// specializations here to avoid code duplication. -template -class MatcherBase { - public: - // Returns true iff the matcher matches x; also explains the match - // result to 'listener'. - bool MatchAndExplain(GTEST_REFERENCE_TO_CONST_(T) x, - MatchResultListener* listener) const { - return impl_->MatchAndExplain(x, listener); - } - - // Returns true iff this matcher matches x. - bool Matches(GTEST_REFERENCE_TO_CONST_(T) x) const { - DummyMatchResultListener dummy; - return MatchAndExplain(x, &dummy); - } - - // Describes this matcher to an ostream. - void DescribeTo(::std::ostream* os) const { impl_->DescribeTo(os); } - - // Describes the negation of this matcher to an ostream. - void DescribeNegationTo(::std::ostream* os) const { - impl_->DescribeNegationTo(os); - } - - // Explains why x matches, or doesn't match, the matcher. - void ExplainMatchResultTo(GTEST_REFERENCE_TO_CONST_(T) x, - ::std::ostream* os) const { - StreamMatchResultListener listener(os); - MatchAndExplain(x, &listener); - } - - // Returns the describer for this matcher object; retains ownership - // of the describer, which is only guaranteed to be alive when - // this matcher object is alive. - const MatcherDescriberInterface* GetDescriber() const { - return impl_.get(); - } - - protected: - MatcherBase() {} - - // Constructs a matcher from its implementation. - explicit MatcherBase( - const MatcherInterface* impl) - : impl_(impl) {} - - template - explicit MatcherBase( - const MatcherInterface* impl, - typename internal::EnableIf< - !internal::IsSame::value>::type* = - nullptr) - : impl_(new internal::MatcherInterfaceAdapter(impl)) {} - - virtual ~MatcherBase() {} - - private: - // shared_ptr (util/gtl/shared_ptr.h) and linked_ptr have similar - // interfaces. The former dynamically allocates a chunk of memory - // to hold the reference count, while the latter tracks all - // references using a circular linked list without allocating - // memory. It has been observed that linked_ptr performs better in - // typical scenarios. However, shared_ptr can out-perform - // linked_ptr when there are many more uses of the copy constructor - // than the default constructor. - // - // If performance becomes a problem, we should see if using - // shared_ptr helps. - ::testing::internal::linked_ptr< - const MatcherInterface > - impl_; -}; - -} // namespace internal - -// A Matcher is a copyable and IMMUTABLE (except by assignment) -// object that can check whether a value of type T matches. The -// implementation of Matcher is just a linked_ptr to const -// MatcherInterface, so copying is fairly cheap. Don't inherit -// from Matcher! -template -class Matcher : public internal::MatcherBase { - public: - // Constructs a null matcher. Needed for storing Matcher objects in STL - // containers. A default-constructed matcher is not yet initialized. You - // cannot use it until a valid value has been assigned to it. - explicit Matcher() {} // NOLINT - - // Constructs a matcher from its implementation. - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} - - template - explicit Matcher( - const MatcherInterface* impl, - typename internal::EnableIf< - !internal::IsSame::value>::type* = - nullptr) - : internal::MatcherBase(impl) {} - - // Implicit constructor here allows people to write - // EXPECT_CALL(foo, Bar(5)) instead of EXPECT_CALL(foo, Bar(Eq(5))) sometimes - Matcher(T value); // NOLINT -}; - -// The following two specializations allow the user to write str -// instead of Eq(str) and "foo" instead of Eq("foo") when a std::string -// matcher is expected. -template <> -class GTEST_API_ Matcher - : public internal::MatcherBase { - public: - Matcher() {} - - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} - - // Allows the user to write str instead of Eq(str) sometimes, where - // str is a std::string object. - Matcher(const std::string& s); // NOLINT - -#if GTEST_HAS_GLOBAL_STRING - // Allows the user to write str instead of Eq(str) sometimes, where - // str is a ::string object. - Matcher(const ::string& s); // NOLINT -#endif // GTEST_HAS_GLOBAL_STRING - - // Allows the user to write "foo" instead of Eq("foo") sometimes. - Matcher(const char* s); // NOLINT -}; - -template <> -class GTEST_API_ Matcher - : public internal::MatcherBase { - public: - Matcher() {} - - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} - - // Allows the user to write str instead of Eq(str) sometimes, where - // str is a string object. - Matcher(const std::string& s); // NOLINT - -#if GTEST_HAS_GLOBAL_STRING - // Allows the user to write str instead of Eq(str) sometimes, where - // str is a ::string object. - Matcher(const ::string& s); // NOLINT -#endif // GTEST_HAS_GLOBAL_STRING - - // Allows the user to write "foo" instead of Eq("foo") sometimes. - Matcher(const char* s); // NOLINT -}; - -#if GTEST_HAS_GLOBAL_STRING -// The following two specializations allow the user to write str -// instead of Eq(str) and "foo" instead of Eq("foo") when a ::string -// matcher is expected. -template <> -class GTEST_API_ Matcher - : public internal::MatcherBase { - public: - Matcher() {} - - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} - - // Allows the user to write str instead of Eq(str) sometimes, where - // str is a std::string object. - Matcher(const std::string& s); // NOLINT - - // Allows the user to write str instead of Eq(str) sometimes, where - // str is a ::string object. - Matcher(const ::string& s); // NOLINT - - // Allows the user to write "foo" instead of Eq("foo") sometimes. - Matcher(const char* s); // NOLINT -}; - -template <> -class GTEST_API_ Matcher< ::string> - : public internal::MatcherBase< ::string> { - public: - Matcher() {} - - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase< ::string>(impl) {} - explicit Matcher(const MatcherInterface< ::string>* impl) - : internal::MatcherBase< ::string>(impl) {} - - // Allows the user to write str instead of Eq(str) sometimes, where - // str is a std::string object. - Matcher(const std::string& s); // NOLINT - - // Allows the user to write str instead of Eq(str) sometimes, where - // str is a ::string object. - Matcher(const ::string& s); // NOLINT - - // Allows the user to write "foo" instead of Eq("foo") sometimes. - Matcher(const char* s); // NOLINT -}; -#endif // GTEST_HAS_GLOBAL_STRING - -#if GTEST_HAS_ABSL -// The following two specializations allow the user to write str -// instead of Eq(str) and "foo" instead of Eq("foo") when a absl::string_view -// matcher is expected. -template <> -class GTEST_API_ Matcher - : public internal::MatcherBase { - public: - Matcher() {} - - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} - - // Allows the user to write str instead of Eq(str) sometimes, where - // str is a std::string object. - Matcher(const std::string& s); // NOLINT - -#if GTEST_HAS_GLOBAL_STRING - // Allows the user to write str instead of Eq(str) sometimes, where - // str is a ::string object. - Matcher(const ::string& s); // NOLINT -#endif // GTEST_HAS_GLOBAL_STRING - - // Allows the user to write "foo" instead of Eq("foo") sometimes. - Matcher(const char* s); // NOLINT - - // Allows the user to pass absl::string_views directly. - Matcher(absl::string_view s); // NOLINT -}; - -template <> -class GTEST_API_ Matcher - : public internal::MatcherBase { - public: - Matcher() {} - - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} - explicit Matcher(const MatcherInterface* impl) - : internal::MatcherBase(impl) {} - - // Allows the user to write str instead of Eq(str) sometimes, where - // str is a std::string object. - Matcher(const std::string& s); // NOLINT - -#if GTEST_HAS_GLOBAL_STRING - // Allows the user to write str instead of Eq(str) sometimes, where - // str is a ::string object. - Matcher(const ::string& s); // NOLINT -#endif // GTEST_HAS_GLOBAL_STRING - - // Allows the user to write "foo" instead of Eq("foo") sometimes. - Matcher(const char* s); // NOLINT - - // Allows the user to pass absl::string_views directly. - Matcher(absl::string_view s); // NOLINT -}; -#endif // GTEST_HAS_ABSL - -// Prints a matcher in a human-readable format. -template -std::ostream& operator<<(std::ostream& os, const Matcher& matcher) { - matcher.DescribeTo(&os); - return os; -} - -// The PolymorphicMatcher class template makes it easy to implement a -// polymorphic matcher (i.e. a matcher that can match values of more -// than one type, e.g. Eq(n) and NotNull()). -// -// To define a polymorphic matcher, a user should provide an Impl -// class that has a DescribeTo() method and a DescribeNegationTo() -// method, and define a member function (or member function template) -// -// bool MatchAndExplain(const Value& value, -// MatchResultListener* listener) const; -// -// See the definition of NotNull() for a complete example. -template -class PolymorphicMatcher { - public: - explicit PolymorphicMatcher(const Impl& an_impl) : impl_(an_impl) {} - - // Returns a mutable reference to the underlying matcher - // implementation object. - Impl& mutable_impl() { return impl_; } - - // Returns an immutable reference to the underlying matcher - // implementation object. - const Impl& impl() const { return impl_; } - - template - operator Matcher() const { - return Matcher(new MonomorphicImpl(impl_)); - } - - private: - template - class MonomorphicImpl : public MatcherInterface { - public: - explicit MonomorphicImpl(const Impl& impl) : impl_(impl) {} - - virtual void DescribeTo(::std::ostream* os) const { - impl_.DescribeTo(os); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - impl_.DescribeNegationTo(os); - } - - virtual bool MatchAndExplain(T x, MatchResultListener* listener) const { - return impl_.MatchAndExplain(x, listener); - } - - private: - const Impl impl_; - - GTEST_DISALLOW_ASSIGN_(MonomorphicImpl); - }; - - Impl impl_; - - GTEST_DISALLOW_ASSIGN_(PolymorphicMatcher); -}; - -// Creates a matcher from its implementation. This is easier to use -// than the Matcher constructor as it doesn't require you to -// explicitly write the template argument, e.g. -// -// MakeMatcher(foo); -// vs -// Matcher(foo); -template -inline Matcher MakeMatcher(const MatcherInterface* impl) { - return Matcher(impl); -} - -// Creates a polymorphic matcher from its implementation. This is -// easier to use than the PolymorphicMatcher constructor as it -// doesn't require you to explicitly write the template argument, e.g. -// -// MakePolymorphicMatcher(foo); -// vs -// PolymorphicMatcher(foo); -template -inline PolymorphicMatcher MakePolymorphicMatcher(const Impl& impl) { - return PolymorphicMatcher(impl); -} - -// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION -// and MUST NOT BE USED IN USER CODE!!! -namespace internal { - -// The MatcherCastImpl class template is a helper for implementing -// MatcherCast(). We need this helper in order to partially -// specialize the implementation of MatcherCast() (C++ allows -// class/struct templates to be partially specialized, but not -// function templates.). - -// This general version is used when MatcherCast()'s argument is a -// polymorphic matcher (i.e. something that can be converted to a -// Matcher but is not one yet; for example, Eq(value)) or a value (for -// example, "hello"). -template -class MatcherCastImpl { - public: - static Matcher Cast(const M& polymorphic_matcher_or_value) { - // M can be a polymorphic matcher, in which case we want to use - // its conversion operator to create Matcher. Or it can be a value - // that should be passed to the Matcher's constructor. - // - // We can't call Matcher(polymorphic_matcher_or_value) when M is a - // polymorphic matcher because it'll be ambiguous if T has an implicit - // constructor from M (this usually happens when T has an implicit - // constructor from any type). - // - // It won't work to unconditionally implict_cast - // polymorphic_matcher_or_value to Matcher because it won't trigger - // a user-defined conversion from M to T if one exists (assuming M is - // a value). - return CastImpl( - polymorphic_matcher_or_value, - BooleanConstant< - internal::ImplicitlyConvertible >::value>(), - BooleanConstant< - internal::ImplicitlyConvertible::value>()); - } - - private: - template - static Matcher CastImpl(const M& polymorphic_matcher_or_value, - BooleanConstant /* convertible_to_matcher */, - BooleanConstant) { - // M is implicitly convertible to Matcher, which means that either - // M is a polymorphic matcher or Matcher has an implicit constructor - // from M. In both cases using the implicit conversion will produce a - // matcher. - // - // Even if T has an implicit constructor from M, it won't be called because - // creating Matcher would require a chain of two user-defined conversions - // (first to create T from M and then to create Matcher from T). - return polymorphic_matcher_or_value; - } - - // M can't be implicitly converted to Matcher, so M isn't a polymorphic - // matcher. It's a value of a type implicitly convertible to T. Use direct - // initialization to create a matcher. - static Matcher CastImpl( - const M& value, BooleanConstant /* convertible_to_matcher */, - BooleanConstant /* convertible_to_T */) { - return Matcher(ImplicitCast_(value)); - } - - // M can't be implicitly converted to either Matcher or T. Attempt to use - // polymorphic matcher Eq(value) in this case. - // - // Note that we first attempt to perform an implicit cast on the value and - // only fall back to the polymorphic Eq() matcher afterwards because the - // latter calls bool operator==(const Lhs& lhs, const Rhs& rhs) in the end - // which might be undefined even when Rhs is implicitly convertible to Lhs - // (e.g. std::pair vs. std::pair). - // - // We don't define this method inline as we need the declaration of Eq(). - static Matcher CastImpl( - const M& value, BooleanConstant /* convertible_to_matcher */, - BooleanConstant /* convertible_to_T */); -}; - -// This more specialized version is used when MatcherCast()'s argument -// is already a Matcher. This only compiles when type T can be -// statically converted to type U. -template -class MatcherCastImpl > { - public: - static Matcher Cast(const Matcher& source_matcher) { - return Matcher(new Impl(source_matcher)); - } - - private: - class Impl : public MatcherInterface { - public: - explicit Impl(const Matcher& source_matcher) - : source_matcher_(source_matcher) {} - - // We delegate the matching logic to the source matcher. - virtual bool MatchAndExplain(T x, MatchResultListener* listener) const { -#if GTEST_LANG_CXX11 - using FromType = typename std::remove_cv::type>::type>::type; - using ToType = typename std::remove_cv::type>::type>::type; - // Do not allow implicitly converting base*/& to derived*/&. - static_assert( - // Do not trigger if only one of them is a pointer. That implies a - // regular conversion and not a down_cast. - (std::is_pointer::type>::value != - std::is_pointer::type>::value) || - std::is_same::value || - !std::is_base_of::value, - "Can't implicitly convert from to "); -#endif // GTEST_LANG_CXX11 - - return source_matcher_.MatchAndExplain(static_cast(x), listener); - } - - virtual void DescribeTo(::std::ostream* os) const { - source_matcher_.DescribeTo(os); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - source_matcher_.DescribeNegationTo(os); - } - - private: - const Matcher source_matcher_; - - GTEST_DISALLOW_ASSIGN_(Impl); - }; -}; - -// This even more specialized version is used for efficiently casting -// a matcher to its own type. -template -class MatcherCastImpl > { - public: - static Matcher Cast(const Matcher& matcher) { return matcher; } -}; - -} // namespace internal - -// In order to be safe and clear, casting between different matcher -// types is done explicitly via MatcherCast(m), which takes a -// matcher m and returns a Matcher. It compiles only when T can be -// statically converted to the argument type of m. -template -inline Matcher MatcherCast(const M& matcher) { - return internal::MatcherCastImpl::Cast(matcher); -} - -// Implements SafeMatcherCast(). -// -// We use an intermediate class to do the actual safe casting as Nokia's -// Symbian compiler cannot decide between -// template ... (M) and -// template ... (const Matcher&) -// for function templates but can for member function templates. -template -class SafeMatcherCastImpl { - public: - // This overload handles polymorphic matchers and values only since - // monomorphic matchers are handled by the next one. - template - static inline Matcher Cast(const M& polymorphic_matcher_or_value) { - return internal::MatcherCastImpl::Cast(polymorphic_matcher_or_value); - } - - // This overload handles monomorphic matchers. - // - // In general, if type T can be implicitly converted to type U, we can - // safely convert a Matcher to a Matcher (i.e. Matcher is - // contravariant): just keep a copy of the original Matcher, convert the - // argument from type T to U, and then pass it to the underlying Matcher. - // The only exception is when U is a reference and T is not, as the - // underlying Matcher may be interested in the argument's address, which - // is not preserved in the conversion from T to U. - template - static inline Matcher Cast(const Matcher& matcher) { - // Enforce that T can be implicitly converted to U. - GTEST_COMPILE_ASSERT_((internal::ImplicitlyConvertible::value), - T_must_be_implicitly_convertible_to_U); - // Enforce that we are not converting a non-reference type T to a reference - // type U. - GTEST_COMPILE_ASSERT_( - internal::is_reference::value || !internal::is_reference::value, - cannot_convert_non_reference_arg_to_reference); - // In case both T and U are arithmetic types, enforce that the - // conversion is not lossy. - typedef GTEST_REMOVE_REFERENCE_AND_CONST_(T) RawT; - typedef GTEST_REMOVE_REFERENCE_AND_CONST_(U) RawU; - const bool kTIsOther = GMOCK_KIND_OF_(RawT) == internal::kOther; - const bool kUIsOther = GMOCK_KIND_OF_(RawU) == internal::kOther; - GTEST_COMPILE_ASSERT_( - kTIsOther || kUIsOther || - (internal::LosslessArithmeticConvertible::value), - conversion_of_arithmetic_types_must_be_lossless); - return MatcherCast(matcher); - } -}; - -template -inline Matcher SafeMatcherCast(const M& polymorphic_matcher) { - return SafeMatcherCastImpl::Cast(polymorphic_matcher); -} - -// A() returns a matcher that matches any value of type T. -template -Matcher A(); - -// Anything inside the 'internal' namespace IS INTERNAL IMPLEMENTATION -// and MUST NOT BE USED IN USER CODE!!! -namespace internal { - -// If the explanation is not empty, prints it to the ostream. -inline void PrintIfNotEmpty(const std::string& explanation, - ::std::ostream* os) { - if (explanation != "" && os != nullptr) { - *os << ", " << explanation; - } -} - -// Returns true if the given type name is easy to read by a human. -// This is used to decide whether printing the type of a value might -// be helpful. -inline bool IsReadableTypeName(const std::string& type_name) { - // We consider a type name readable if it's short or doesn't contain - // a template or function type. - return (type_name.length() <= 20 || - type_name.find_first_of("<(") == std::string::npos); -} - -// Matches the value against the given matcher, prints the value and explains -// the match result to the listener. Returns the match result. -// 'listener' must not be NULL. -// Value cannot be passed by const reference, because some matchers take a -// non-const argument. -template -bool MatchPrintAndExplain(Value& value, const Matcher& matcher, - MatchResultListener* listener) { - if (!listener->IsInterested()) { - // If the listener is not interested, we do not need to construct the - // inner explanation. - return matcher.Matches(value); - } - - StringMatchResultListener inner_listener; - const bool match = matcher.MatchAndExplain(value, &inner_listener); - - UniversalPrint(value, listener->stream()); -#if GTEST_HAS_RTTI - const std::string& type_name = GetTypeName(); - if (IsReadableTypeName(type_name)) - *listener->stream() << " (of type " << type_name << ")"; -#endif - PrintIfNotEmpty(inner_listener.str(), listener->stream()); - - return match; -} - -// An internal helper class for doing compile-time loop on a tuple's -// fields. -template -class TuplePrefix { - public: - // TuplePrefix::Matches(matcher_tuple, value_tuple) returns true - // iff the first N fields of matcher_tuple matches the first N - // fields of value_tuple, respectively. - template - static bool Matches(const MatcherTuple& matcher_tuple, - const ValueTuple& value_tuple) { - return TuplePrefix::Matches(matcher_tuple, value_tuple) && - std::get(matcher_tuple).Matches(std::get(value_tuple)); - } - - // TuplePrefix::ExplainMatchFailuresTo(matchers, values, os) - // describes failures in matching the first N fields of matchers - // against the first N fields of values. If there is no failure, - // nothing will be streamed to os. - template - static void ExplainMatchFailuresTo(const MatcherTuple& matchers, - const ValueTuple& values, - ::std::ostream* os) { - // First, describes failures in the first N - 1 fields. - TuplePrefix::ExplainMatchFailuresTo(matchers, values, os); - - // Then describes the failure (if any) in the (N - 1)-th (0-based) - // field. - typename std::tuple_element::type matcher = - std::get(matchers); - typedef typename std::tuple_element::type Value; - GTEST_REFERENCE_TO_CONST_(Value) value = std::get(values); - StringMatchResultListener listener; - if (!matcher.MatchAndExplain(value, &listener)) { - // FIXME: include in the message the name of the parameter - // as used in MOCK_METHOD*() when possible. - *os << " Expected arg #" << N - 1 << ": "; - std::get(matchers).DescribeTo(os); - *os << "\n Actual: "; - // We remove the reference in type Value to prevent the - // universal printer from printing the address of value, which - // isn't interesting to the user most of the time. The - // matcher's MatchAndExplain() method handles the case when - // the address is interesting. - internal::UniversalPrint(value, os); - PrintIfNotEmpty(listener.str(), os); - *os << "\n"; - } - } -}; - -// The base case. -template <> -class TuplePrefix<0> { - public: - template - static bool Matches(const MatcherTuple& /* matcher_tuple */, - const ValueTuple& /* value_tuple */) { - return true; - } - - template - static void ExplainMatchFailuresTo(const MatcherTuple& /* matchers */, - const ValueTuple& /* values */, - ::std::ostream* /* os */) {} -}; - -// TupleMatches(matcher_tuple, value_tuple) returns true iff all -// matchers in matcher_tuple match the corresponding fields in -// value_tuple. It is a compiler error if matcher_tuple and -// value_tuple have different number of fields or incompatible field -// types. -template -bool TupleMatches(const MatcherTuple& matcher_tuple, - const ValueTuple& value_tuple) { - // Makes sure that matcher_tuple and value_tuple have the same - // number of fields. - GTEST_COMPILE_ASSERT_(std::tuple_size::value == - std::tuple_size::value, - matcher_and_value_have_different_numbers_of_fields); - return TuplePrefix::value>::Matches(matcher_tuple, - value_tuple); -} - -// Describes failures in matching matchers against values. If there -// is no failure, nothing will be streamed to os. -template -void ExplainMatchFailureTupleTo(const MatcherTuple& matchers, - const ValueTuple& values, - ::std::ostream* os) { - TuplePrefix::value>::ExplainMatchFailuresTo( - matchers, values, os); -} - -// TransformTupleValues and its helper. -// -// TransformTupleValuesHelper hides the internal machinery that -// TransformTupleValues uses to implement a tuple traversal. -template -class TransformTupleValuesHelper { - private: - typedef ::std::tuple_size TupleSize; - - public: - // For each member of tuple 't', taken in order, evaluates '*out++ = f(t)'. - // Returns the final value of 'out' in case the caller needs it. - static OutIter Run(Func f, const Tuple& t, OutIter out) { - return IterateOverTuple()(f, t, out); - } - - private: - template - struct IterateOverTuple { - OutIter operator() (Func f, const Tup& t, OutIter out) const { - *out++ = f(::std::get(t)); - return IterateOverTuple()(f, t, out); - } - }; - template - struct IterateOverTuple { - OutIter operator() (Func /* f */, const Tup& /* t */, OutIter out) const { - return out; - } - }; -}; - -// Successively invokes 'f(element)' on each element of the tuple 't', -// appending each result to the 'out' iterator. Returns the final value -// of 'out'. -template -OutIter TransformTupleValues(Func f, const Tuple& t, OutIter out) { - return TransformTupleValuesHelper::Run(f, t, out); -} - -// Implements A(). -template -class AnyMatcherImpl : public MatcherInterface { - public: - virtual bool MatchAndExplain(GTEST_REFERENCE_TO_CONST_(T) /* x */, - MatchResultListener* /* listener */) const { - return true; - } - virtual void DescribeTo(::std::ostream* os) const { *os << "is anything"; } - virtual void DescribeNegationTo(::std::ostream* os) const { - // This is mostly for completeness' safe, as it's not very useful - // to write Not(A()). However we cannot completely rule out - // such a possibility, and it doesn't hurt to be prepared. - *os << "never matches"; - } -}; - -// Implements _, a matcher that matches any value of any -// type. This is a polymorphic matcher, so we need a template type -// conversion operator to make it appearing as a Matcher for any -// type T. -class AnythingMatcher { - public: - template - operator Matcher() const { return A(); } -}; - -// Implements a matcher that compares a given value with a -// pre-supplied value using one of the ==, <=, <, etc, operators. The -// two values being compared don't have to have the same type. -// -// The matcher defined here is polymorphic (for example, Eq(5) can be -// used to match an int, a short, a double, etc). Therefore we use -// a template type conversion operator in the implementation. -// -// The following template definition assumes that the Rhs parameter is -// a "bare" type (i.e. neither 'const T' nor 'T&'). -template -class ComparisonBase { - public: - explicit ComparisonBase(const Rhs& rhs) : rhs_(rhs) {} - template - operator Matcher() const { - return MakeMatcher(new Impl(rhs_)); - } - - private: - template - class Impl : public MatcherInterface { - public: - explicit Impl(const Rhs& rhs) : rhs_(rhs) {} - virtual bool MatchAndExplain( - Lhs lhs, MatchResultListener* /* listener */) const { - return Op()(lhs, rhs_); - } - virtual void DescribeTo(::std::ostream* os) const { - *os << D::Desc() << " "; - UniversalPrint(rhs_, os); - } - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << D::NegatedDesc() << " "; - UniversalPrint(rhs_, os); - } - private: - Rhs rhs_; - GTEST_DISALLOW_ASSIGN_(Impl); - }; - Rhs rhs_; - GTEST_DISALLOW_ASSIGN_(ComparisonBase); -}; - -template -class EqMatcher : public ComparisonBase, Rhs, AnyEq> { - public: - explicit EqMatcher(const Rhs& rhs) - : ComparisonBase, Rhs, AnyEq>(rhs) { } - static const char* Desc() { return "is equal to"; } - static const char* NegatedDesc() { return "isn't equal to"; } -}; -template -class NeMatcher : public ComparisonBase, Rhs, AnyNe> { - public: - explicit NeMatcher(const Rhs& rhs) - : ComparisonBase, Rhs, AnyNe>(rhs) { } - static const char* Desc() { return "isn't equal to"; } - static const char* NegatedDesc() { return "is equal to"; } -}; -template -class LtMatcher : public ComparisonBase, Rhs, AnyLt> { - public: - explicit LtMatcher(const Rhs& rhs) - : ComparisonBase, Rhs, AnyLt>(rhs) { } - static const char* Desc() { return "is <"; } - static const char* NegatedDesc() { return "isn't <"; } -}; -template -class GtMatcher : public ComparisonBase, Rhs, AnyGt> { - public: - explicit GtMatcher(const Rhs& rhs) - : ComparisonBase, Rhs, AnyGt>(rhs) { } - static const char* Desc() { return "is >"; } - static const char* NegatedDesc() { return "isn't >"; } -}; -template -class LeMatcher : public ComparisonBase, Rhs, AnyLe> { - public: - explicit LeMatcher(const Rhs& rhs) - : ComparisonBase, Rhs, AnyLe>(rhs) { } - static const char* Desc() { return "is <="; } - static const char* NegatedDesc() { return "isn't <="; } -}; -template -class GeMatcher : public ComparisonBase, Rhs, AnyGe> { - public: - explicit GeMatcher(const Rhs& rhs) - : ComparisonBase, Rhs, AnyGe>(rhs) { } - static const char* Desc() { return "is >="; } - static const char* NegatedDesc() { return "isn't >="; } -}; - -// Implements the polymorphic IsNull() matcher, which matches any raw or smart -// pointer that is NULL. -class IsNullMatcher { - public: - template - bool MatchAndExplain(const Pointer& p, - MatchResultListener* /* listener */) const { -#if GTEST_LANG_CXX11 - return p == nullptr; -#else // GTEST_LANG_CXX11 - return GetRawPointer(p) == NULL; -#endif // GTEST_LANG_CXX11 - } - - void DescribeTo(::std::ostream* os) const { *os << "is NULL"; } - void DescribeNegationTo(::std::ostream* os) const { - *os << "isn't NULL"; - } -}; - -// Implements the polymorphic NotNull() matcher, which matches any raw or smart -// pointer that is not NULL. -class NotNullMatcher { - public: - template - bool MatchAndExplain(const Pointer& p, - MatchResultListener* /* listener */) const { -#if GTEST_LANG_CXX11 - return p != nullptr; -#else // GTEST_LANG_CXX11 - return GetRawPointer(p) != NULL; -#endif // GTEST_LANG_CXX11 - } - - void DescribeTo(::std::ostream* os) const { *os << "isn't NULL"; } - void DescribeNegationTo(::std::ostream* os) const { - *os << "is NULL"; - } -}; - -// Ref(variable) matches any argument that is a reference to -// 'variable'. This matcher is polymorphic as it can match any -// super type of the type of 'variable'. -// -// The RefMatcher template class implements Ref(variable). It can -// only be instantiated with a reference type. This prevents a user -// from mistakenly using Ref(x) to match a non-reference function -// argument. For example, the following will righteously cause a -// compiler error: -// -// int n; -// Matcher m1 = Ref(n); // This won't compile. -// Matcher m2 = Ref(n); // This will compile. -template -class RefMatcher; - -template -class RefMatcher { - // Google Mock is a generic framework and thus needs to support - // mocking any function types, including those that take non-const - // reference arguments. Therefore the template parameter T (and - // Super below) can be instantiated to either a const type or a - // non-const type. - public: - // RefMatcher() takes a T& instead of const T&, as we want the - // compiler to catch using Ref(const_value) as a matcher for a - // non-const reference. - explicit RefMatcher(T& x) : object_(x) {} // NOLINT - - template - operator Matcher() const { - // By passing object_ (type T&) to Impl(), which expects a Super&, - // we make sure that Super is a super type of T. In particular, - // this catches using Ref(const_value) as a matcher for a - // non-const reference, as you cannot implicitly convert a const - // reference to a non-const reference. - return MakeMatcher(new Impl(object_)); - } - - private: - template - class Impl : public MatcherInterface { - public: - explicit Impl(Super& x) : object_(x) {} // NOLINT - - // MatchAndExplain() takes a Super& (as opposed to const Super&) - // in order to match the interface MatcherInterface. - virtual bool MatchAndExplain( - Super& x, MatchResultListener* listener) const { - *listener << "which is located @" << static_cast(&x); - return &x == &object_; - } - - virtual void DescribeTo(::std::ostream* os) const { - *os << "references the variable "; - UniversalPrinter::Print(object_, os); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "does not reference the variable "; - UniversalPrinter::Print(object_, os); - } - - private: - const Super& object_; - - GTEST_DISALLOW_ASSIGN_(Impl); - }; - - T& object_; - - GTEST_DISALLOW_ASSIGN_(RefMatcher); -}; - -// Polymorphic helper functions for narrow and wide string matchers. -inline bool CaseInsensitiveCStringEquals(const char* lhs, const char* rhs) { - return String::CaseInsensitiveCStringEquals(lhs, rhs); -} - -inline bool CaseInsensitiveCStringEquals(const wchar_t* lhs, - const wchar_t* rhs) { - return String::CaseInsensitiveWideCStringEquals(lhs, rhs); -} - -// String comparison for narrow or wide strings that can have embedded NUL -// characters. -template -bool CaseInsensitiveStringEquals(const StringType& s1, - const StringType& s2) { - // Are the heads equal? - if (!CaseInsensitiveCStringEquals(s1.c_str(), s2.c_str())) { - return false; - } - - // Skip the equal heads. - const typename StringType::value_type nul = 0; - const size_t i1 = s1.find(nul), i2 = s2.find(nul); - - // Are we at the end of either s1 or s2? - if (i1 == StringType::npos || i2 == StringType::npos) { - return i1 == i2; - } - - // Are the tails equal? - return CaseInsensitiveStringEquals(s1.substr(i1 + 1), s2.substr(i2 + 1)); -} - -// String matchers. - -// Implements equality-based string matchers like StrEq, StrCaseNe, and etc. -template -class StrEqualityMatcher { - public: - StrEqualityMatcher(const StringType& str, bool expect_eq, - bool case_sensitive) - : string_(str), expect_eq_(expect_eq), case_sensitive_(case_sensitive) {} - -#if GTEST_HAS_ABSL - bool MatchAndExplain(const absl::string_view& s, - MatchResultListener* listener) const { - // This should fail to compile if absl::string_view is used with wide - // strings. - const StringType& str = string(s); - return MatchAndExplain(str, listener); - } -#endif // GTEST_HAS_ABSL - - // Accepts pointer types, particularly: - // const char* - // char* - // const wchar_t* - // wchar_t* - template - bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { - if (s == nullptr) { - return !expect_eq_; - } - return MatchAndExplain(StringType(s), listener); - } - - // Matches anything that can convert to StringType. - // - // This is a template, not just a plain function with const StringType&, - // because absl::string_view has some interfering non-explicit constructors. - template - bool MatchAndExplain(const MatcheeStringType& s, - MatchResultListener* /* listener */) const { - const StringType& s2(s); - const bool eq = case_sensitive_ ? s2 == string_ : - CaseInsensitiveStringEquals(s2, string_); - return expect_eq_ == eq; - } - - void DescribeTo(::std::ostream* os) const { - DescribeToHelper(expect_eq_, os); - } - - void DescribeNegationTo(::std::ostream* os) const { - DescribeToHelper(!expect_eq_, os); - } - - private: - void DescribeToHelper(bool expect_eq, ::std::ostream* os) const { - *os << (expect_eq ? "is " : "isn't "); - *os << "equal to "; - if (!case_sensitive_) { - *os << "(ignoring case) "; - } - UniversalPrint(string_, os); - } - - const StringType string_; - const bool expect_eq_; - const bool case_sensitive_; - - GTEST_DISALLOW_ASSIGN_(StrEqualityMatcher); -}; - -// Implements the polymorphic HasSubstr(substring) matcher, which -// can be used as a Matcher as long as T can be converted to a -// string. -template -class HasSubstrMatcher { - public: - explicit HasSubstrMatcher(const StringType& substring) - : substring_(substring) {} - -#if GTEST_HAS_ABSL - bool MatchAndExplain(const absl::string_view& s, - MatchResultListener* listener) const { - // This should fail to compile if absl::string_view is used with wide - // strings. - const StringType& str = string(s); - return MatchAndExplain(str, listener); - } -#endif // GTEST_HAS_ABSL - - // Accepts pointer types, particularly: - // const char* - // char* - // const wchar_t* - // wchar_t* - template - bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { - return s != nullptr && MatchAndExplain(StringType(s), listener); - } - - // Matches anything that can convert to StringType. - // - // This is a template, not just a plain function with const StringType&, - // because absl::string_view has some interfering non-explicit constructors. - template - bool MatchAndExplain(const MatcheeStringType& s, - MatchResultListener* /* listener */) const { - const StringType& s2(s); - return s2.find(substring_) != StringType::npos; - } - - // Describes what this matcher matches. - void DescribeTo(::std::ostream* os) const { - *os << "has substring "; - UniversalPrint(substring_, os); - } - - void DescribeNegationTo(::std::ostream* os) const { - *os << "has no substring "; - UniversalPrint(substring_, os); - } - - private: - const StringType substring_; - - GTEST_DISALLOW_ASSIGN_(HasSubstrMatcher); -}; - -// Implements the polymorphic StartsWith(substring) matcher, which -// can be used as a Matcher as long as T can be converted to a -// string. -template -class StartsWithMatcher { - public: - explicit StartsWithMatcher(const StringType& prefix) : prefix_(prefix) { - } - -#if GTEST_HAS_ABSL - bool MatchAndExplain(const absl::string_view& s, - MatchResultListener* listener) const { - // This should fail to compile if absl::string_view is used with wide - // strings. - const StringType& str = string(s); - return MatchAndExplain(str, listener); - } -#endif // GTEST_HAS_ABSL - - // Accepts pointer types, particularly: - // const char* - // char* - // const wchar_t* - // wchar_t* - template - bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { - return s != nullptr && MatchAndExplain(StringType(s), listener); - } - - // Matches anything that can convert to StringType. - // - // This is a template, not just a plain function with const StringType&, - // because absl::string_view has some interfering non-explicit constructors. - template - bool MatchAndExplain(const MatcheeStringType& s, - MatchResultListener* /* listener */) const { - const StringType& s2(s); - return s2.length() >= prefix_.length() && - s2.substr(0, prefix_.length()) == prefix_; - } - - void DescribeTo(::std::ostream* os) const { - *os << "starts with "; - UniversalPrint(prefix_, os); - } - - void DescribeNegationTo(::std::ostream* os) const { - *os << "doesn't start with "; - UniversalPrint(prefix_, os); - } - - private: - const StringType prefix_; - - GTEST_DISALLOW_ASSIGN_(StartsWithMatcher); -}; - -// Implements the polymorphic EndsWith(substring) matcher, which -// can be used as a Matcher as long as T can be converted to a -// string. -template -class EndsWithMatcher { - public: - explicit EndsWithMatcher(const StringType& suffix) : suffix_(suffix) {} - -#if GTEST_HAS_ABSL - bool MatchAndExplain(const absl::string_view& s, - MatchResultListener* listener) const { - // This should fail to compile if absl::string_view is used with wide - // strings. - const StringType& str = string(s); - return MatchAndExplain(str, listener); - } -#endif // GTEST_HAS_ABSL - - // Accepts pointer types, particularly: - // const char* - // char* - // const wchar_t* - // wchar_t* - template - bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { - return s != nullptr && MatchAndExplain(StringType(s), listener); - } - - // Matches anything that can convert to StringType. - // - // This is a template, not just a plain function with const StringType&, - // because absl::string_view has some interfering non-explicit constructors. - template - bool MatchAndExplain(const MatcheeStringType& s, - MatchResultListener* /* listener */) const { - const StringType& s2(s); - return s2.length() >= suffix_.length() && - s2.substr(s2.length() - suffix_.length()) == suffix_; - } - - void DescribeTo(::std::ostream* os) const { - *os << "ends with "; - UniversalPrint(suffix_, os); - } - - void DescribeNegationTo(::std::ostream* os) const { - *os << "doesn't end with "; - UniversalPrint(suffix_, os); - } - - private: - const StringType suffix_; - - GTEST_DISALLOW_ASSIGN_(EndsWithMatcher); -}; - -// Implements polymorphic matchers MatchesRegex(regex) and -// ContainsRegex(regex), which can be used as a Matcher as long as -// T can be converted to a string. -class MatchesRegexMatcher { - public: - MatchesRegexMatcher(const RE* regex, bool full_match) - : regex_(regex), full_match_(full_match) {} - -#if GTEST_HAS_ABSL - bool MatchAndExplain(const absl::string_view& s, - MatchResultListener* listener) const { - return MatchAndExplain(string(s), listener); - } -#endif // GTEST_HAS_ABSL - - // Accepts pointer types, particularly: - // const char* - // char* - // const wchar_t* - // wchar_t* - template - bool MatchAndExplain(CharType* s, MatchResultListener* listener) const { - return s != nullptr && MatchAndExplain(std::string(s), listener); - } - - // Matches anything that can convert to std::string. - // - // This is a template, not just a plain function with const std::string&, - // because absl::string_view has some interfering non-explicit constructors. - template - bool MatchAndExplain(const MatcheeStringType& s, - MatchResultListener* /* listener */) const { - const std::string& s2(s); - return full_match_ ? RE::FullMatch(s2, *regex_) : - RE::PartialMatch(s2, *regex_); - } - - void DescribeTo(::std::ostream* os) const { - *os << (full_match_ ? "matches" : "contains") - << " regular expression "; - UniversalPrinter::Print(regex_->pattern(), os); - } - - void DescribeNegationTo(::std::ostream* os) const { - *os << "doesn't " << (full_match_ ? "match" : "contain") - << " regular expression "; - UniversalPrinter::Print(regex_->pattern(), os); - } - - private: - const internal::linked_ptr regex_; - const bool full_match_; - - GTEST_DISALLOW_ASSIGN_(MatchesRegexMatcher); -}; - -// Implements a matcher that compares the two fields of a 2-tuple -// using one of the ==, <=, <, etc, operators. The two fields being -// compared don't have to have the same type. -// -// The matcher defined here is polymorphic (for example, Eq() can be -// used to match a std::tuple, a std::tuple, -// etc). Therefore we use a template type conversion operator in the -// implementation. -template -class PairMatchBase { - public: - template - operator Matcher<::std::tuple>() const { - return MakeMatcher(new Impl<::std::tuple>); - } - template - operator Matcher&>() const { - return MakeMatcher(new Impl&>); - } - - private: - static ::std::ostream& GetDesc(::std::ostream& os) { // NOLINT - return os << D::Desc(); - } - - template - class Impl : public MatcherInterface { - public: - virtual bool MatchAndExplain( - Tuple args, - MatchResultListener* /* listener */) const { - return Op()(::std::get<0>(args), ::std::get<1>(args)); - } - virtual void DescribeTo(::std::ostream* os) const { - *os << "are " << GetDesc; - } - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "aren't " << GetDesc; - } - }; -}; - -class Eq2Matcher : public PairMatchBase { - public: - static const char* Desc() { return "an equal pair"; } -}; -class Ne2Matcher : public PairMatchBase { - public: - static const char* Desc() { return "an unequal pair"; } -}; -class Lt2Matcher : public PairMatchBase { - public: - static const char* Desc() { return "a pair where the first < the second"; } -}; -class Gt2Matcher : public PairMatchBase { - public: - static const char* Desc() { return "a pair where the first > the second"; } -}; -class Le2Matcher : public PairMatchBase { - public: - static const char* Desc() { return "a pair where the first <= the second"; } -}; -class Ge2Matcher : public PairMatchBase { - public: - static const char* Desc() { return "a pair where the first >= the second"; } -}; - -// Implements the Not(...) matcher for a particular argument type T. -// We do not nest it inside the NotMatcher class template, as that -// will prevent different instantiations of NotMatcher from sharing -// the same NotMatcherImpl class. -template -class NotMatcherImpl : public MatcherInterface { - public: - explicit NotMatcherImpl(const Matcher& matcher) - : matcher_(matcher) {} - - virtual bool MatchAndExplain(GTEST_REFERENCE_TO_CONST_(T) x, - MatchResultListener* listener) const { - return !matcher_.MatchAndExplain(x, listener); - } - - virtual void DescribeTo(::std::ostream* os) const { - matcher_.DescribeNegationTo(os); - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - matcher_.DescribeTo(os); - } - - private: - const Matcher matcher_; - - GTEST_DISALLOW_ASSIGN_(NotMatcherImpl); -}; - -// Implements the Not(m) matcher, which matches a value that doesn't -// match matcher m. -template -class NotMatcher { - public: - explicit NotMatcher(InnerMatcher matcher) : matcher_(matcher) {} - - // This template type conversion operator allows Not(m) to be used - // to match any type m can match. - template - operator Matcher() const { - return Matcher(new NotMatcherImpl(SafeMatcherCast(matcher_))); - } - - private: - InnerMatcher matcher_; - - GTEST_DISALLOW_ASSIGN_(NotMatcher); -}; - -// Implements the AllOf(m1, m2) matcher for a particular argument type -// T. We do not nest it inside the BothOfMatcher class template, as -// that will prevent different instantiations of BothOfMatcher from -// sharing the same BothOfMatcherImpl class. -template -class AllOfMatcherImpl - : public MatcherInterface { - public: - explicit AllOfMatcherImpl(std::vector > matchers) - : matchers_(internal::move(matchers)) {} - - virtual void DescribeTo(::std::ostream* os) const { - *os << "("; - for (size_t i = 0; i < matchers_.size(); ++i) { - if (i != 0) *os << ") and ("; - matchers_[i].DescribeTo(os); - } - *os << ")"; - } - - virtual void DescribeNegationTo(::std::ostream* os) const { - *os << "("; - for (size_t i = 0; i < matchers_.size(); ++i) { - if (i != 0) *os << ") or ("; - matchers_[i].DescribeNegationTo(os); - } - *os << ")"; - } - - virtual bool MatchAndExplain(GTEST_REFERENCE_TO_CONST_(T) x, - MatchResultListener* listener) const { - // If either matcher1_ or matcher2_ doesn't match x, we only need - // to explain why one of them fails. - std::string all_match_result; - - for (size_t i = 0; i < matchers_.size(); ++i) { - StringMatchResultListener slistener; - if (matchers_[i].MatchAndExplain(x, &slistener)) { - if (all_match_result.empty()) { - all_match_result = slistener.str(); - } else { - std::string result = slistener.str(); - if (!result.empty()) { - all_match_result += ", and "; - all_match_result += result; - } - } - } else { - *listener << slistener.str(); - return false; - } - } - - // Otherwise we need to explain why *both* of them match. - *listener << all_match_result; - return true; - } - - private: - const std::vector > matchers_; - - GTEST_DISALLOW_ASSIGN_(AllOfMatcherImpl); -}; - -// VariadicMatcher is used for the variadic implementation of -// AllOf(m_1, m_2, ...) and AnyOf(m_1, m_2, ...). -// CombiningMatcher is used to recursively combine the provided matchers -// (of type Args...). -template