sourcepp 2024.11.11.dev2__tar.gz → 2024.12.13.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/CMakeLists.txt +2 -2
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/PKG-INFO +3 -2
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/README.md +2 -1
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/THIRDPARTY_LEGAL_NOTICES.txt +25 -0
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/pyproject.toml +1 -1
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/src/sourcepp/__init__.py +1 -1
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/src/vcryptpp.h +1 -0
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/src/vtfpp.h +6 -1
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/LICENSE +0 -0
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/cfg/CMakeLists.txt +0 -0
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/cfg/pyproject.toml +0 -0
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/src/gamepp.h +0 -0
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/src/sourcepp.cpp +0 -0
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/src/sourcepp.h +0 -0
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/src/steampp.h +0 -0
- {sourcepp-2024.11.11.dev2 → sourcepp-2024.12.13.dev1}/src/toolpp.h +0 -0
|
@@ -30,7 +30,7 @@ endif()
|
|
|
30
30
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
31
31
|
|
|
32
32
|
set(SOURCEPP_BUILD_PYTHON_WRAPPERS ON CACHE INTERNAL "" FORCE)
|
|
33
|
-
set(SOURCEPP_PYTHON_VERSION "2024.
|
|
33
|
+
set(SOURCEPP_PYTHON_VERSION "2024.12.13dev1")
|
|
34
34
|
|
|
35
35
|
# As weird as this looks, this is necessary for sdist wheel
|
|
36
36
|
set(SOURCEPP_PYTHON_IS_SUBDIR OFF)
|
|
@@ -41,6 +41,6 @@ else()
|
|
|
41
41
|
FetchContent_Declare(
|
|
42
42
|
sourcepp
|
|
43
43
|
GIT_REPOSITORY "https://github.com/craftablescience/sourcepp.git"
|
|
44
|
-
GIT_TAG "
|
|
44
|
+
GIT_TAG "b5bdd34dd72fdf1f4cabaad6b31124b2d4d2955e")
|
|
45
45
|
FetchContent_MakeAvailable(sourcepp)
|
|
46
46
|
endif()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sourcepp
|
|
3
|
-
Version: 2024.
|
|
3
|
+
Version: 2024.12.13.dev1
|
|
4
4
|
Summary: Several modern C++20 libraries for sanely parsing Valve formats.
|
|
5
5
|
Home-page: https://github.com/craftablescience/sourcepp
|
|
6
6
|
Author-Email: craftablescience <lauralewisdev@gmail.com>
|
|
@@ -329,7 +329,8 @@ found on PyPI in the [sourcepp](https://pypi.org/project/sourcepp) package.
|
|
|
329
329
|
- `steampp` is based on the [SteamAppPathProvider](https://github.com/Trico-Everfire/SteamAppPathProvider) library by [@Trico Everfire](https://github.com/Trico-Everfire) and [Momentum Mod](https://momentum-mod.org) contributors.
|
|
330
330
|
- `vpkpp`'s GCF parser was contributed by [@bt](https://github.com/caatge) and [@ymgve](https://github.com/ymgve).
|
|
331
331
|
- `vpkpp`'s WAD3 parser was contributed by [@ozxybox](https://github.com/ozxybox).
|
|
332
|
-
- `vtfpp`'s write support is based on work by [@Trico Everfire](https://github.com/Trico-Everfire).
|
|
332
|
+
- `vtfpp`'s write support is loosely based on work by [@Trico Everfire](https://github.com/Trico-Everfire).
|
|
333
|
+
- `vtfpp`'s HDRI to cubemap conversion code is modified from the [HdriToCubemap](https://github.com/ivarout/HdriToCubemap) library by [@ivarout](https://github.com/ivarout).
|
|
333
334
|
|
|
334
335
|
## Gallery
|
|
335
336
|
|
|
@@ -306,7 +306,8 @@ found on PyPI in the [sourcepp](https://pypi.org/project/sourcepp) package.
|
|
|
306
306
|
- `steampp` is based on the [SteamAppPathProvider](https://github.com/Trico-Everfire/SteamAppPathProvider) library by [@Trico Everfire](https://github.com/Trico-Everfire) and [Momentum Mod](https://momentum-mod.org) contributors.
|
|
307
307
|
- `vpkpp`'s GCF parser was contributed by [@bt](https://github.com/caatge) and [@ymgve](https://github.com/ymgve).
|
|
308
308
|
- `vpkpp`'s WAD3 parser was contributed by [@ozxybox](https://github.com/ozxybox).
|
|
309
|
-
- `vtfpp`'s write support is based on work by [@Trico Everfire](https://github.com/Trico-Everfire).
|
|
309
|
+
- `vtfpp`'s write support is loosely based on work by [@Trico Everfire](https://github.com/Trico-Everfire).
|
|
310
|
+
- `vtfpp`'s HDRI to cubemap conversion code is modified from the [HdriToCubemap](https://github.com/ivarout/HdriToCubemap) library by [@ivarout](https://github.com/ivarout).
|
|
310
311
|
|
|
311
312
|
## Gallery
|
|
312
313
|
|
|
@@ -129,6 +129,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
129
129
|
SOFTWARE.
|
|
130
130
|
|
|
131
131
|
|
|
132
|
+
--------------- HdriToCubemap ---------------
|
|
133
|
+
|
|
134
|
+
MIT License
|
|
135
|
+
|
|
136
|
+
Copyright (c) 2020 Ingvar Out
|
|
137
|
+
|
|
138
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
139
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
140
|
+
in the Software without restriction, including without limitation the rights
|
|
141
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
142
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
143
|
+
furnished to do so, subject to the following conditions:
|
|
144
|
+
|
|
145
|
+
The above copyright notice and this permission notice shall be included in all
|
|
146
|
+
copies or substantial portions of the Software.
|
|
147
|
+
|
|
148
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
149
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
150
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
151
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
152
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
153
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
154
|
+
SOFTWARE.
|
|
155
|
+
|
|
156
|
+
|
|
132
157
|
--------------- liblzma ---------------
|
|
133
158
|
|
|
134
159
|
Permission to use, copy, modify, and/or distribute this
|
|
@@ -5,7 +5,7 @@ build-backend = "scikit_build_core.build"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "sourcepp"
|
|
8
|
-
version = "2024.
|
|
8
|
+
version = "2024.12.13dev1"
|
|
9
9
|
authors = [{ name = "craftablescience", email = "lauralewisdev@gmail.com" }]
|
|
10
10
|
maintainers = [{ name = "craftablescience", email = "lauralewisdev@gmail.com" }]
|
|
11
11
|
description = "Several modern C++20 libraries for sanely parsing Valve formats."
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from ._sourcepp_impl import __doc__, gamepp, sourcepp, steampp, toolpp, vcryptpp, vtfpp
|
|
2
2
|
|
|
3
3
|
__author__ = "craftablescience"
|
|
4
|
-
__version__ = "2024.
|
|
4
|
+
__version__ = "2024.12.13dev1"
|
|
5
5
|
__all__ = ['__author__', '__doc__', '__version__', 'gamepp', 'sourcepp', 'steampp', 'toolpp', 'vcryptpp', 'vtfpp']
|
|
@@ -36,6 +36,7 @@ inline void register_python(py::module_& m) {
|
|
|
36
36
|
using namespace KnownCodes;
|
|
37
37
|
|
|
38
38
|
KnownCodes.attr("DEFAULT") = DEFAULT;
|
|
39
|
+
KnownCodes.attr("BLOODY_GOOD_TIME") = BLOODY_GOOD_TIME;
|
|
39
40
|
KnownCodes.attr("CONTAGION_WEAPONS") = CONTAGION_WEAPONS;
|
|
40
41
|
KnownCodes.attr("CONTAGION_SCRIPTS") = CONTAGION_SCRIPTS;
|
|
41
42
|
KnownCodes.attr("COUNTER_STRIKE_SOURCE") = COUNTER_STRIKE_SOURCE;
|
|
@@ -118,6 +118,11 @@ void register_python(py::module_& m) {
|
|
|
118
118
|
return py::bytes{d.data(), d.size()};
|
|
119
119
|
}, py::arg("image_data"), py::arg("old_format"), py::arg("new_format"), py::arg("mip_count"), py::arg("frame_count"), py::arg("face_count"), py::arg("width"), py::arg("height"), py::arg("slice_count"));
|
|
120
120
|
|
|
121
|
+
ImageConversion.def("convert_hdri_to_cubemap", [](const py::bytes& imageData, ImageFormat format, uint16_t width, uint16_t height, uint16_t resolution = 0, bool bilinear = true) -> std::tuple<py::bytes, py::bytes, py::bytes, py::bytes, py::bytes, py::bytes> {
|
|
122
|
+
const auto ds = convertHDRIToCubeMap({reinterpret_cast<const std::byte*>(imageData.data()), imageData.size()}, format, width, height, resolution, bilinear);
|
|
123
|
+
return {py::bytes{ds[0].data(), ds[0].size()}, py::bytes{ds[1].data(), ds[1].size()}, py::bytes{ds[2].data(), ds[2].size()}, py::bytes{ds[3].data(), ds[3].size()}, py::bytes{ds[4].data(), ds[4].size()}, py::bytes{ds[5].data(), ds[5].size()}};
|
|
124
|
+
}, py::arg("image_data"), py::arg("format"), py::arg("width"), py::arg("height"), py::arg("resolution") = 0, py::arg("bilinear") = true);
|
|
125
|
+
|
|
121
126
|
py::enum_<FileFormat>(ImageConversion, "FileFormat")
|
|
122
127
|
.value("DEFAULT", FileFormat::DEFAULT)
|
|
123
128
|
.value("PNG", FileFormat::PNG)
|
|
@@ -271,7 +276,7 @@ void register_python(py::module_& m) {
|
|
|
271
276
|
.value("NORMAL", VTF::FLAG_NORMAL)
|
|
272
277
|
.value("NO_MIP", VTF::FLAG_NO_MIP)
|
|
273
278
|
.value("NO_LOD", VTF::FLAG_NO_LOD)
|
|
274
|
-
.value("
|
|
279
|
+
.value("LOAD_LOWEST_MIPS", VTF::FLAG_LOAD_LOWEST_MIPS)
|
|
275
280
|
.value("PROCEDURAL", VTF::FLAG_PROCEDURAL)
|
|
276
281
|
.value("ONE_BIT_ALPHA", VTF::FLAG_ONE_BIT_ALPHA)
|
|
277
282
|
.value("MULTI_BIT_ALPHA", VTF::FLAG_MULTI_BIT_ALPHA)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|