renamed media to assets in c++ layer

This commit is contained in:
Eric 2022-09-10 14:07:36 -07:00
parent 1cac234fc5
commit 7231ff2cfb
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
129 changed files with 1215 additions and 1207 deletions

View File

@ -3995,26 +3995,26 @@
"assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e",
"assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34",
"ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a",
"build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/91/e4/e85f3feee6640ce65027660e5590", "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/33/fa/2b4dc04a7e94af821486c0baaadd",
"build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/dd/50/db8d4e087b3fe272e9575b95996b", "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/39/c0/0a8c20d90b3bb0b605f56cf57cd6",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e8/2f/1c8653ee8f0bad9cded74ebf5100", "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9d/9e/36bc9196a661b7ac730309363b25",
"build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2e/86/b9fb1d80caf79d23b785327a0cc7", "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/78/61/3ee51d8c85ac897cb48326059f4f",
"build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/0f/4e/67f2eea7fa848b12994d487893dc", "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/41/24/ea579f7f46ee8764b99aa1f740e6",
"build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/b2/c4/d9555b8a060d11e6b1346cd82d12", "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d7/79/db7ba776fe53a432f501cc524f29",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/59/41/3aafb5bd7c6dddad37c89f304fb9", "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/67/8c/fd54c4640fe9574c819eb93235de",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cc/c1/a7cbdc71810ee752746eda33dd31", "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d0/23/0ed4f59b045bd996e9e8c3adac25",
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/36/67/6a8b809011b4023533712d2df7b6", "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/7b/7a/65e4a1a866aa716f339934316888",
"build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/11/8c/172381e8a477cc11ee0e24460901", "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/4c/96/40086b7256c6b69500231234816f",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/79/ab/05c53d0807929316235d6e7382cd", "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/25/4e/65658e3b1137e29c26e5a250cb7f",
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/18/c2/415efdababdd14553c3adbeaaf7b", "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a4/d3/9e94f9f4a3f326ab3fb4563605e8",
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/3a/2d/863cc304f4856e34c81093b59db1", "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/70/82/54ac546d3d6404259c025e4697a6",
"build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/33/fd/00a992c1d496ff85a99d381c6498", "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/8c/71/35e658ed48d1732ac1ace9a651d0",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e4/58/ac07183ee59eedbb78dcf2f0e91f", "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cb/c1/66f115696b5694b203d2a3e3f3b6",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cf/cb/91d2181102f6045e4d19cc73a18d", "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/76/7e/ef8ca6f4baae2d3540658a43238e",
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/ce/f8/3e7a2452dae94b5cd857424e31fa", "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/e5/01/48f01b3bfb0e11dfa298809751d6",
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/04/f8/46d2bcc4f5d5b7c7d9bcc7b91418", "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/4e/35/3e14be7308b3b8a4d7ee00223d02",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/3b/10/9c15dbfbca54c1260b146de3029b", "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/2f/8d/5bf66b9999ac4a0b109ce6a93ee9",
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/26/90/d2f4b8212b12508ed222609c7a7d", "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/6f/ba/6814ccb61a86032c381b59092b92",
"build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e0/b3/7ccccfd8721033582cabdfe11f73", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e0/b3/7ccccfd8721033582cabdfe11f73",
"build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/86/d2/d18cbc017a7d64001f96718cc5ed", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/86/d2/d18cbc017a7d64001f96718cc5ed",
"build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/64/9b/78cdb9eda7b30611774769859caa", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/64/9b/78cdb9eda7b30611774769859caa",
@ -4031,14 +4031,14 @@
"build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c8/d2/5df66f66e26c1beb8a1e2b1f0613", "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c8/d2/5df66f66e26c1beb8a1e2b1f0613",
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7e/57/593e8ceeee37a65972f1fb30d2cd", "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7e/57/593e8ceeee37a65972f1fb30d2cd",
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2f/fc/a2ac394899e6527f8def0cad4d8a", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2f/fc/a2ac394899e6527f8def0cad4d8a",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/20/4e/9afc0e73bb26d63032c3525d9373", "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/b9/00/54be93a362cac005b111902cf725",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/f2/ab/eac71319d5184a3dd6b2ad74cf92", "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/cf/33/0aba47dbe0848b9a0fe65e3fe5ac",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/ad/20/97feffa58fcbc8ac2ed2d9892326", "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/7f/a5/705f0b9b047d439d7b8805e684a1",
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/0a/d8/6e58979b57cf74c0d675508b207f", "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/e1/11/91da47c90faced11f80ce365e6ca",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/79/c7/cb4590d0e233fa0455f9bd3158b0", "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/f0/47/fec8d08adc467bc46516ce39423a",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/2a/14/99b6932f7e20e988d67faa4327d9", "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/c0/cb/36553e332fb3297e8f632387fdbb",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/b0/77/b85ef1b5a280aa2426a613e76ec5", "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a7/96/f19a4cc19386511d732533ead3d3",
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/b9/22/020a23ba4dba0b5871f78622bd67", "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/0c/23/5d5da73cd643d4fb344849768bf3",
"src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7",
"src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d" "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d"
} }

View File

@ -1,4 +1,4 @@
### 1.7.7 (build 20803, api 7, 2022-09-10) ### 1.7.7 (build 20806, api 7, 2022-09-10)
- Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread.
- Improved logging of missing playlist game types. - Improved logging of missing playlist game types.
- Some ba.Lstr functionality can now be used in background threads. - Some ba.Lstr functionality can now be used in background threads.
@ -20,6 +20,8 @@
- There is now a `_bainternal.py` dummy-module alongside the existing `_ba.py` one. Be sure to exclude it from any script collections used by the game (the same as `_ba.py`). - There is now a `_bainternal.py` dummy-module alongside the existing `_ba.py` one. Be sure to exclude it from any script collections used by the game (the same as `_ba.py`).
- Added checks to make sure _ba or _bainternal arent used outside of ba. Any 'internal' functionality needed outside of ba should be exposed through ba.internal. _ba and _bainternal are internal implementation details. - Added checks to make sure _ba or _bainternal arent used outside of ba. Any 'internal' functionality needed outside of ba should be exposed through ba.internal. _ba and _bainternal are internal implementation details.
- Removed C++ Module class and simplified Thread class. The Module class was an old relic of long ago before C++ had lambdas and its existence was pretty pointless and confusing these days. - Removed C++ Module class and simplified Thread class. The Module class was an old relic of long ago before C++ had lambdas and its existence was pretty pointless and confusing these days.
- Renamed C++ App to AppFlavor and AppGlobals to App
- Renamed C++ Media to Assets
### 1.7.6 (build 20687, api 7, 2022-08-11) ### 1.7.6 (build 20687, api 7, 2022-08-11)
- Cleaned up da MetaSubsystem code. - Cleaned up da MetaSubsystem code.

View File

@ -1 +1 @@
250920245305497630480226719424525454078 319717366410279141138094934973337011486

View File

@ -38,7 +38,7 @@ def bootstrap() -> None:
# Give a soft warning if we're being used with a different binary # Give a soft warning if we're being used with a different binary
# version than we expect. # version than we expect.
expected_build = 20803 expected_build = 20806
running_build: int = env['build_number'] running_build: int = env['build_number']
if running_build != expected_build: if running_build != expected_build:
print( print(

View File

@ -210,6 +210,40 @@ add_executable(ballisticacore
${BA_SRC_ROOT}/ballistica/app/app_flavor_vr.h ${BA_SRC_ROOT}/ballistica/app/app_flavor_vr.h
${BA_SRC_ROOT}/ballistica/app/stress_test.cc ${BA_SRC_ROOT}/ballistica/app/stress_test.cc
${BA_SRC_ROOT}/ballistica/app/stress_test.h ${BA_SRC_ROOT}/ballistica/app/stress_test.h
${BA_SRC_ROOT}/ballistica/assets/assets.cc
${BA_SRC_ROOT}/ballistica/assets/assets.h
${BA_SRC_ROOT}/ballistica/assets/assets_server.cc
${BA_SRC_ROOT}/ballistica/assets/assets_server.h
${BA_SRC_ROOT}/ballistica/assets/component/asset_component.cc
${BA_SRC_ROOT}/ballistica/assets/component/asset_component.h
${BA_SRC_ROOT}/ballistica/assets/component/collide_model.cc
${BA_SRC_ROOT}/ballistica/assets/component/collide_model.h
${BA_SRC_ROOT}/ballistica/assets/component/cube_map_texture.cc
${BA_SRC_ROOT}/ballistica/assets/component/cube_map_texture.h
${BA_SRC_ROOT}/ballistica/assets/component/data.cc
${BA_SRC_ROOT}/ballistica/assets/component/data.h
${BA_SRC_ROOT}/ballistica/assets/component/model.cc
${BA_SRC_ROOT}/ballistica/assets/component/model.h
${BA_SRC_ROOT}/ballistica/assets/component/sound.cc
${BA_SRC_ROOT}/ballistica/assets/component/sound.h
${BA_SRC_ROOT}/ballistica/assets/component/texture.cc
${BA_SRC_ROOT}/ballistica/assets/component/texture.h
${BA_SRC_ROOT}/ballistica/assets/data/asset_component_data.cc
${BA_SRC_ROOT}/ballistica/assets/data/asset_component_data.h
${BA_SRC_ROOT}/ballistica/assets/data/collide_model_data.cc
${BA_SRC_ROOT}/ballistica/assets/data/collide_model_data.h
${BA_SRC_ROOT}/ballistica/assets/data/data_data.cc
${BA_SRC_ROOT}/ballistica/assets/data/data_data.h
${BA_SRC_ROOT}/ballistica/assets/data/model_data.cc
${BA_SRC_ROOT}/ballistica/assets/data/model_data.h
${BA_SRC_ROOT}/ballistica/assets/data/model_renderer_data.h
${BA_SRC_ROOT}/ballistica/assets/data/sound_data.cc
${BA_SRC_ROOT}/ballistica/assets/data/sound_data.h
${BA_SRC_ROOT}/ballistica/assets/data/texture_data.cc
${BA_SRC_ROOT}/ballistica/assets/data/texture_data.h
${BA_SRC_ROOT}/ballistica/assets/data/texture_preload_data.cc
${BA_SRC_ROOT}/ballistica/assets/data/texture_preload_data.h
${BA_SRC_ROOT}/ballistica/assets/data/texture_renderer_data.h
${BA_SRC_ROOT}/ballistica/audio/al_sys.cc ${BA_SRC_ROOT}/ballistica/audio/al_sys.cc
${BA_SRC_ROOT}/ballistica/audio/al_sys.h ${BA_SRC_ROOT}/ballistica/audio/al_sys.h
${BA_SRC_ROOT}/ballistica/audio/audio.cc ${BA_SRC_ROOT}/ballistica/audio/audio.cc
@ -466,40 +500,6 @@ add_executable(ballisticacore
${BA_SRC_ROOT}/ballistica/math/vector3f.cc ${BA_SRC_ROOT}/ballistica/math/vector3f.cc
${BA_SRC_ROOT}/ballistica/math/vector3f.h ${BA_SRC_ROOT}/ballistica/math/vector3f.h
${BA_SRC_ROOT}/ballistica/math/vector4f.h ${BA_SRC_ROOT}/ballistica/math/vector4f.h
${BA_SRC_ROOT}/ballistica/media/component/collide_model.cc
${BA_SRC_ROOT}/ballistica/media/component/collide_model.h
${BA_SRC_ROOT}/ballistica/media/component/cube_map_texture.cc
${BA_SRC_ROOT}/ballistica/media/component/cube_map_texture.h
${BA_SRC_ROOT}/ballistica/media/component/data.cc
${BA_SRC_ROOT}/ballistica/media/component/data.h
${BA_SRC_ROOT}/ballistica/media/component/media_component.cc
${BA_SRC_ROOT}/ballistica/media/component/media_component.h
${BA_SRC_ROOT}/ballistica/media/component/model.cc
${BA_SRC_ROOT}/ballistica/media/component/model.h
${BA_SRC_ROOT}/ballistica/media/component/sound.cc
${BA_SRC_ROOT}/ballistica/media/component/sound.h
${BA_SRC_ROOT}/ballistica/media/component/texture.cc
${BA_SRC_ROOT}/ballistica/media/component/texture.h
${BA_SRC_ROOT}/ballistica/media/data/collide_model_data.cc
${BA_SRC_ROOT}/ballistica/media/data/collide_model_data.h
${BA_SRC_ROOT}/ballistica/media/data/data_data.cc
${BA_SRC_ROOT}/ballistica/media/data/data_data.h
${BA_SRC_ROOT}/ballistica/media/data/media_component_data.cc
${BA_SRC_ROOT}/ballistica/media/data/media_component_data.h
${BA_SRC_ROOT}/ballistica/media/data/model_data.cc
${BA_SRC_ROOT}/ballistica/media/data/model_data.h
${BA_SRC_ROOT}/ballistica/media/data/model_renderer_data.h
${BA_SRC_ROOT}/ballistica/media/data/sound_data.cc
${BA_SRC_ROOT}/ballistica/media/data/sound_data.h
${BA_SRC_ROOT}/ballistica/media/data/texture_data.cc
${BA_SRC_ROOT}/ballistica/media/data/texture_data.h
${BA_SRC_ROOT}/ballistica/media/data/texture_preload_data.cc
${BA_SRC_ROOT}/ballistica/media/data/texture_preload_data.h
${BA_SRC_ROOT}/ballistica/media/data/texture_renderer_data.h
${BA_SRC_ROOT}/ballistica/media/media.cc
${BA_SRC_ROOT}/ballistica/media/media.h
${BA_SRC_ROOT}/ballistica/media/media_server.cc
${BA_SRC_ROOT}/ballistica/media/media_server.h
${BA_SRC_ROOT}/ballistica/networking/network_reader.cc ${BA_SRC_ROOT}/ballistica/networking/network_reader.cc
${BA_SRC_ROOT}/ballistica/networking/network_reader.h ${BA_SRC_ROOT}/ballistica/networking/network_reader.h
${BA_SRC_ROOT}/ballistica/networking/network_writer.cc ${BA_SRC_ROOT}/ballistica/networking/network_writer.cc
@ -557,14 +557,14 @@ add_executable(ballisticacore
${BA_SRC_ROOT}/ballistica/python/class/python_class_widget.h ${BA_SRC_ROOT}/ballistica/python/class/python_class_widget.h
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_app.cc ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_app.cc
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_app.h ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_app.h
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_assets.cc
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_assets.h
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_gameplay.cc ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_gameplay.cc
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_gameplay.h ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_gameplay.h
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_graphics.cc ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_graphics.cc
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_graphics.h ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_graphics.h
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_input.cc ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_input.cc
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_input.h ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_input.h
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_media.cc
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_media.h
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_networking.cc ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_networking.cc
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_networking.h ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_networking.h
${BA_SRC_ROOT}/ballistica/python/methods/python_methods_system.cc ${BA_SRC_ROOT}/ballistica/python/methods/python_methods_system.cc

View File

@ -201,6 +201,40 @@
<ClInclude Include="..\..\src\ballistica\app\app_flavor_vr.h" /> <ClInclude Include="..\..\src\ballistica\app\app_flavor_vr.h" />
<ClCompile Include="..\..\src\ballistica\app\stress_test.cc" /> <ClCompile Include="..\..\src\ballistica\app\stress_test.cc" />
<ClInclude Include="..\..\src\ballistica\app\stress_test.h" /> <ClInclude Include="..\..\src\ballistica\app\stress_test.h" />
<ClCompile Include="..\..\src\ballistica\assets\assets.cc" />
<ClInclude Include="..\..\src\ballistica\assets\assets.h" />
<ClCompile Include="..\..\src\ballistica\assets\assets_server.cc" />
<ClInclude Include="..\..\src\ballistica\assets\assets_server.h" />
<ClCompile Include="..\..\src\ballistica\assets\component\asset_component.cc" />
<ClInclude Include="..\..\src\ballistica\assets\component\asset_component.h" />
<ClCompile Include="..\..\src\ballistica\assets\component\collide_model.cc" />
<ClInclude Include="..\..\src\ballistica\assets\component\collide_model.h" />
<ClCompile Include="..\..\src\ballistica\assets\component\cube_map_texture.cc" />
<ClInclude Include="..\..\src\ballistica\assets\component\cube_map_texture.h" />
<ClCompile Include="..\..\src\ballistica\assets\component\data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\component\data.h" />
<ClCompile Include="..\..\src\ballistica\assets\component\model.cc" />
<ClInclude Include="..\..\src\ballistica\assets\component\model.h" />
<ClCompile Include="..\..\src\ballistica\assets\component\sound.cc" />
<ClInclude Include="..\..\src\ballistica\assets\component\sound.h" />
<ClCompile Include="..\..\src\ballistica\assets\component\texture.cc" />
<ClInclude Include="..\..\src\ballistica\assets\component\texture.h" />
<ClCompile Include="..\..\src\ballistica\assets\data\asset_component_data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\data\asset_component_data.h" />
<ClCompile Include="..\..\src\ballistica\assets\data\collide_model_data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\data\collide_model_data.h" />
<ClCompile Include="..\..\src\ballistica\assets\data\data_data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\data\data_data.h" />
<ClCompile Include="..\..\src\ballistica\assets\data\model_data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\data\model_data.h" />
<ClInclude Include="..\..\src\ballistica\assets\data\model_renderer_data.h" />
<ClCompile Include="..\..\src\ballistica\assets\data\sound_data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\data\sound_data.h" />
<ClCompile Include="..\..\src\ballistica\assets\data\texture_data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\data\texture_data.h" />
<ClCompile Include="..\..\src\ballistica\assets\data\texture_preload_data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\data\texture_preload_data.h" />
<ClInclude Include="..\..\src\ballistica\assets\data\texture_renderer_data.h" />
<ClCompile Include="..\..\src\ballistica\audio\al_sys.cc" /> <ClCompile Include="..\..\src\ballistica\audio\al_sys.cc" />
<ClInclude Include="..\..\src\ballistica\audio\al_sys.h" /> <ClInclude Include="..\..\src\ballistica\audio\al_sys.h" />
<ClCompile Include="..\..\src\ballistica\audio\audio.cc" /> <ClCompile Include="..\..\src\ballistica\audio\audio.cc" />
@ -457,40 +491,6 @@
<ClCompile Include="..\..\src\ballistica\math\vector3f.cc" /> <ClCompile Include="..\..\src\ballistica\math\vector3f.cc" />
<ClInclude Include="..\..\src\ballistica\math\vector3f.h" /> <ClInclude Include="..\..\src\ballistica\math\vector3f.h" />
<ClInclude Include="..\..\src\ballistica\math\vector4f.h" /> <ClInclude Include="..\..\src\ballistica\math\vector4f.h" />
<ClCompile Include="..\..\src\ballistica\media\component\collide_model.cc" />
<ClInclude Include="..\..\src\ballistica\media\component\collide_model.h" />
<ClCompile Include="..\..\src\ballistica\media\component\cube_map_texture.cc" />
<ClInclude Include="..\..\src\ballistica\media\component\cube_map_texture.h" />
<ClCompile Include="..\..\src\ballistica\media\component\data.cc" />
<ClInclude Include="..\..\src\ballistica\media\component\data.h" />
<ClCompile Include="..\..\src\ballistica\media\component\media_component.cc" />
<ClInclude Include="..\..\src\ballistica\media\component\media_component.h" />
<ClCompile Include="..\..\src\ballistica\media\component\model.cc" />
<ClInclude Include="..\..\src\ballistica\media\component\model.h" />
<ClCompile Include="..\..\src\ballistica\media\component\sound.cc" />
<ClInclude Include="..\..\src\ballistica\media\component\sound.h" />
<ClCompile Include="..\..\src\ballistica\media\component\texture.cc" />
<ClInclude Include="..\..\src\ballistica\media\component\texture.h" />
<ClCompile Include="..\..\src\ballistica\media\data\collide_model_data.cc" />
<ClInclude Include="..\..\src\ballistica\media\data\collide_model_data.h" />
<ClCompile Include="..\..\src\ballistica\media\data\data_data.cc" />
<ClInclude Include="..\..\src\ballistica\media\data\data_data.h" />
<ClCompile Include="..\..\src\ballistica\media\data\media_component_data.cc" />
<ClInclude Include="..\..\src\ballistica\media\data\media_component_data.h" />
<ClCompile Include="..\..\src\ballistica\media\data\model_data.cc" />
<ClInclude Include="..\..\src\ballistica\media\data\model_data.h" />
<ClInclude Include="..\..\src\ballistica\media\data\model_renderer_data.h" />
<ClCompile Include="..\..\src\ballistica\media\data\sound_data.cc" />
<ClInclude Include="..\..\src\ballistica\media\data\sound_data.h" />
<ClCompile Include="..\..\src\ballistica\media\data\texture_data.cc" />
<ClInclude Include="..\..\src\ballistica\media\data\texture_data.h" />
<ClCompile Include="..\..\src\ballistica\media\data\texture_preload_data.cc" />
<ClInclude Include="..\..\src\ballistica\media\data\texture_preload_data.h" />
<ClInclude Include="..\..\src\ballistica\media\data\texture_renderer_data.h" />
<ClCompile Include="..\..\src\ballistica\media\media.cc" />
<ClInclude Include="..\..\src\ballistica\media\media.h" />
<ClCompile Include="..\..\src\ballistica\media\media_server.cc" />
<ClInclude Include="..\..\src\ballistica\media\media_server.h" />
<ClCompile Include="..\..\src\ballistica\networking\network_reader.cc" /> <ClCompile Include="..\..\src\ballistica\networking\network_reader.cc" />
<ClInclude Include="..\..\src\ballistica\networking\network_reader.h" /> <ClInclude Include="..\..\src\ballistica\networking\network_reader.h" />
<ClCompile Include="..\..\src\ballistica\networking\network_writer.cc" /> <ClCompile Include="..\..\src\ballistica\networking\network_writer.cc" />
@ -548,14 +548,14 @@
<ClInclude Include="..\..\src\ballistica\python\class\python_class_widget.h" /> <ClInclude Include="..\..\src\ballistica\python\class\python_class_widget.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_app.cc" /> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_app.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_app.h" /> <ClInclude Include="..\..\src\ballistica\python\methods\python_methods_app.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_assets.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_assets.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_gameplay.cc" /> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_gameplay.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_gameplay.h" /> <ClInclude Include="..\..\src\ballistica\python\methods\python_methods_gameplay.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_graphics.cc" /> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_graphics.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_graphics.h" /> <ClInclude Include="..\..\src\ballistica\python\methods\python_methods_graphics.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_input.cc" /> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_input.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_input.h" /> <ClInclude Include="..\..\src\ballistica\python\methods\python_methods_input.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_media.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_media.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_networking.cc" /> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_networking.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_networking.h" /> <ClInclude Include="..\..\src\ballistica\python\methods\python_methods_networking.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_system.cc" /> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_system.cc" />

View File

@ -37,6 +37,108 @@
<ClInclude Include="..\..\src\ballistica\app\stress_test.h"> <ClInclude Include="..\..\src\ballistica\app\stress_test.h">
<Filter>ballistica\app</Filter> <Filter>ballistica\app</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\assets.cc">
<Filter>ballistica\assets</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\assets.h">
<Filter>ballistica\assets</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\assets_server.cc">
<Filter>ballistica\assets</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\assets_server.h">
<Filter>ballistica\assets</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\component\asset_component.cc">
<Filter>ballistica\assets\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\component\asset_component.h">
<Filter>ballistica\assets\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\component\collide_model.cc">
<Filter>ballistica\assets\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\component\collide_model.h">
<Filter>ballistica\assets\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\component\cube_map_texture.cc">
<Filter>ballistica\assets\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\component\cube_map_texture.h">
<Filter>ballistica\assets\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\component\data.cc">
<Filter>ballistica\assets\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\component\data.h">
<Filter>ballistica\assets\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\component\model.cc">
<Filter>ballistica\assets\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\component\model.h">
<Filter>ballistica\assets\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\component\sound.cc">
<Filter>ballistica\assets\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\component\sound.h">
<Filter>ballistica\assets\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\component\texture.cc">
<Filter>ballistica\assets\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\component\texture.h">
<Filter>ballistica\assets\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\data\asset_component_data.cc">
<Filter>ballistica\assets\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\data\asset_component_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\data\collide_model_data.cc">
<Filter>ballistica\assets\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\data\collide_model_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\data\data_data.cc">
<Filter>ballistica\assets\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\data\data_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\data\model_data.cc">
<Filter>ballistica\assets\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\data\model_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ballistica\assets\data\model_renderer_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\data\sound_data.cc">
<Filter>ballistica\assets\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\data\sound_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\data\texture_data.cc">
<Filter>ballistica\assets\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\data\texture_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\data\texture_preload_data.cc">
<Filter>ballistica\assets\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\data\texture_preload_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ballistica\assets\data\texture_renderer_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\audio\al_sys.cc"> <ClCompile Include="..\..\src\ballistica\audio\al_sys.cc">
<Filter>ballistica\audio</Filter> <Filter>ballistica\audio</Filter>
</ClCompile> </ClCompile>
@ -805,108 +907,6 @@
<ClInclude Include="..\..\src\ballistica\math\vector4f.h"> <ClInclude Include="..\..\src\ballistica\math\vector4f.h">
<Filter>ballistica\math</Filter> <Filter>ballistica\math</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\ballistica\media\component\collide_model.cc">
<Filter>ballistica\media\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\component\collide_model.h">
<Filter>ballistica\media\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\component\cube_map_texture.cc">
<Filter>ballistica\media\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\component\cube_map_texture.h">
<Filter>ballistica\media\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\component\data.cc">
<Filter>ballistica\media\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\component\data.h">
<Filter>ballistica\media\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\component\media_component.cc">
<Filter>ballistica\media\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\component\media_component.h">
<Filter>ballistica\media\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\component\model.cc">
<Filter>ballistica\media\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\component\model.h">
<Filter>ballistica\media\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\component\sound.cc">
<Filter>ballistica\media\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\component\sound.h">
<Filter>ballistica\media\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\component\texture.cc">
<Filter>ballistica\media\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\component\texture.h">
<Filter>ballistica\media\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\data\collide_model_data.cc">
<Filter>ballistica\media\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\data\collide_model_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\data\data_data.cc">
<Filter>ballistica\media\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\data\data_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\data\media_component_data.cc">
<Filter>ballistica\media\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\data\media_component_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\data\model_data.cc">
<Filter>ballistica\media\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\data\model_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ballistica\media\data\model_renderer_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\data\sound_data.cc">
<Filter>ballistica\media\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\data\sound_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\data\texture_data.cc">
<Filter>ballistica\media\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\data\texture_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\data\texture_preload_data.cc">
<Filter>ballistica\media\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\data\texture_preload_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ballistica\media\data\texture_renderer_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\media.cc">
<Filter>ballistica\media</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\media.h">
<Filter>ballistica\media</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\media_server.cc">
<Filter>ballistica\media</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\media_server.h">
<Filter>ballistica\media</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\networking\network_reader.cc"> <ClCompile Include="..\..\src\ballistica\networking\network_reader.cc">
<Filter>ballistica\networking</Filter> <Filter>ballistica\networking</Filter>
</ClCompile> </ClCompile>
@ -1078,6 +1078,12 @@
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_app.h"> <ClInclude Include="..\..\src\ballistica\python\methods\python_methods_app.h">
<Filter>ballistica\python\methods</Filter> <Filter>ballistica\python\methods</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_assets.cc">
<Filter>ballistica\python\methods</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_assets.h">
<Filter>ballistica\python\methods</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_gameplay.cc"> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_gameplay.cc">
<Filter>ballistica\python\methods</Filter> <Filter>ballistica\python\methods</Filter>
</ClCompile> </ClCompile>
@ -1096,12 +1102,6 @@
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_input.h"> <ClInclude Include="..\..\src\ballistica\python\methods\python_methods_input.h">
<Filter>ballistica\python\methods</Filter> <Filter>ballistica\python\methods</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_media.cc">
<Filter>ballistica\python\methods</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_media.h">
<Filter>ballistica\python\methods</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_networking.cc"> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_networking.cc">
<Filter>ballistica\python\methods</Filter> <Filter>ballistica\python\methods</Filter>
</ClCompile> </ClCompile>
@ -1646,6 +1646,9 @@
<ItemGroup> <ItemGroup>
<Filter Include="ballistica" /> <Filter Include="ballistica" />
<Filter Include="ballistica\app" /> <Filter Include="ballistica\app" />
<Filter Include="ballistica\assets" />
<Filter Include="ballistica\assets\component" />
<Filter Include="ballistica\assets\data" />
<Filter Include="ballistica\audio" /> <Filter Include="ballistica\audio" />
<Filter Include="ballistica\config" /> <Filter Include="ballistica\config" />
<Filter Include="ballistica\core" /> <Filter Include="ballistica\core" />
@ -1666,9 +1669,6 @@
<Filter Include="ballistica\input\device" /> <Filter Include="ballistica\input\device" />
<Filter Include="ballistica\internal" /> <Filter Include="ballistica\internal" />
<Filter Include="ballistica\math" /> <Filter Include="ballistica\math" />
<Filter Include="ballistica\media" />
<Filter Include="ballistica\media\component" />
<Filter Include="ballistica\media\data" />
<Filter Include="ballistica\networking" /> <Filter Include="ballistica\networking" />
<Filter Include="ballistica\platform" /> <Filter Include="ballistica\platform" />
<Filter Include="ballistica\platform\apple" /> <Filter Include="ballistica\platform\apple" />

View File

@ -196,6 +196,40 @@
<ClInclude Include="..\..\src\ballistica\app\app_flavor_vr.h" /> <ClInclude Include="..\..\src\ballistica\app\app_flavor_vr.h" />
<ClCompile Include="..\..\src\ballistica\app\stress_test.cc" /> <ClCompile Include="..\..\src\ballistica\app\stress_test.cc" />
<ClInclude Include="..\..\src\ballistica\app\stress_test.h" /> <ClInclude Include="..\..\src\ballistica\app\stress_test.h" />
<ClCompile Include="..\..\src\ballistica\assets\assets.cc" />
<ClInclude Include="..\..\src\ballistica\assets\assets.h" />
<ClCompile Include="..\..\src\ballistica\assets\assets_server.cc" />
<ClInclude Include="..\..\src\ballistica\assets\assets_server.h" />
<ClCompile Include="..\..\src\ballistica\assets\component\asset_component.cc" />
<ClInclude Include="..\..\src\ballistica\assets\component\asset_component.h" />
<ClCompile Include="..\..\src\ballistica\assets\component\collide_model.cc" />
<ClInclude Include="..\..\src\ballistica\assets\component\collide_model.h" />
<ClCompile Include="..\..\src\ballistica\assets\component\cube_map_texture.cc" />
<ClInclude Include="..\..\src\ballistica\assets\component\cube_map_texture.h" />
<ClCompile Include="..\..\src\ballistica\assets\component\data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\component\data.h" />
<ClCompile Include="..\..\src\ballistica\assets\component\model.cc" />
<ClInclude Include="..\..\src\ballistica\assets\component\model.h" />
<ClCompile Include="..\..\src\ballistica\assets\component\sound.cc" />
<ClInclude Include="..\..\src\ballistica\assets\component\sound.h" />
<ClCompile Include="..\..\src\ballistica\assets\component\texture.cc" />
<ClInclude Include="..\..\src\ballistica\assets\component\texture.h" />
<ClCompile Include="..\..\src\ballistica\assets\data\asset_component_data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\data\asset_component_data.h" />
<ClCompile Include="..\..\src\ballistica\assets\data\collide_model_data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\data\collide_model_data.h" />
<ClCompile Include="..\..\src\ballistica\assets\data\data_data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\data\data_data.h" />
<ClCompile Include="..\..\src\ballistica\assets\data\model_data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\data\model_data.h" />
<ClInclude Include="..\..\src\ballistica\assets\data\model_renderer_data.h" />
<ClCompile Include="..\..\src\ballistica\assets\data\sound_data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\data\sound_data.h" />
<ClCompile Include="..\..\src\ballistica\assets\data\texture_data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\data\texture_data.h" />
<ClCompile Include="..\..\src\ballistica\assets\data\texture_preload_data.cc" />
<ClInclude Include="..\..\src\ballistica\assets\data\texture_preload_data.h" />
<ClInclude Include="..\..\src\ballistica\assets\data\texture_renderer_data.h" />
<ClCompile Include="..\..\src\ballistica\audio\al_sys.cc" /> <ClCompile Include="..\..\src\ballistica\audio\al_sys.cc" />
<ClInclude Include="..\..\src\ballistica\audio\al_sys.h" /> <ClInclude Include="..\..\src\ballistica\audio\al_sys.h" />
<ClCompile Include="..\..\src\ballistica\audio\audio.cc" /> <ClCompile Include="..\..\src\ballistica\audio\audio.cc" />
@ -452,40 +486,6 @@
<ClCompile Include="..\..\src\ballistica\math\vector3f.cc" /> <ClCompile Include="..\..\src\ballistica\math\vector3f.cc" />
<ClInclude Include="..\..\src\ballistica\math\vector3f.h" /> <ClInclude Include="..\..\src\ballistica\math\vector3f.h" />
<ClInclude Include="..\..\src\ballistica\math\vector4f.h" /> <ClInclude Include="..\..\src\ballistica\math\vector4f.h" />
<ClCompile Include="..\..\src\ballistica\media\component\collide_model.cc" />
<ClInclude Include="..\..\src\ballistica\media\component\collide_model.h" />
<ClCompile Include="..\..\src\ballistica\media\component\cube_map_texture.cc" />
<ClInclude Include="..\..\src\ballistica\media\component\cube_map_texture.h" />
<ClCompile Include="..\..\src\ballistica\media\component\data.cc" />
<ClInclude Include="..\..\src\ballistica\media\component\data.h" />
<ClCompile Include="..\..\src\ballistica\media\component\media_component.cc" />
<ClInclude Include="..\..\src\ballistica\media\component\media_component.h" />
<ClCompile Include="..\..\src\ballistica\media\component\model.cc" />
<ClInclude Include="..\..\src\ballistica\media\component\model.h" />
<ClCompile Include="..\..\src\ballistica\media\component\sound.cc" />
<ClInclude Include="..\..\src\ballistica\media\component\sound.h" />
<ClCompile Include="..\..\src\ballistica\media\component\texture.cc" />
<ClInclude Include="..\..\src\ballistica\media\component\texture.h" />
<ClCompile Include="..\..\src\ballistica\media\data\collide_model_data.cc" />
<ClInclude Include="..\..\src\ballistica\media\data\collide_model_data.h" />
<ClCompile Include="..\..\src\ballistica\media\data\data_data.cc" />
<ClInclude Include="..\..\src\ballistica\media\data\data_data.h" />
<ClCompile Include="..\..\src\ballistica\media\data\media_component_data.cc" />
<ClInclude Include="..\..\src\ballistica\media\data\media_component_data.h" />
<ClCompile Include="..\..\src\ballistica\media\data\model_data.cc" />
<ClInclude Include="..\..\src\ballistica\media\data\model_data.h" />
<ClInclude Include="..\..\src\ballistica\media\data\model_renderer_data.h" />
<ClCompile Include="..\..\src\ballistica\media\data\sound_data.cc" />
<ClInclude Include="..\..\src\ballistica\media\data\sound_data.h" />
<ClCompile Include="..\..\src\ballistica\media\data\texture_data.cc" />
<ClInclude Include="..\..\src\ballistica\media\data\texture_data.h" />
<ClCompile Include="..\..\src\ballistica\media\data\texture_preload_data.cc" />
<ClInclude Include="..\..\src\ballistica\media\data\texture_preload_data.h" />
<ClInclude Include="..\..\src\ballistica\media\data\texture_renderer_data.h" />
<ClCompile Include="..\..\src\ballistica\media\media.cc" />
<ClInclude Include="..\..\src\ballistica\media\media.h" />
<ClCompile Include="..\..\src\ballistica\media\media_server.cc" />
<ClInclude Include="..\..\src\ballistica\media\media_server.h" />
<ClCompile Include="..\..\src\ballistica\networking\network_reader.cc" /> <ClCompile Include="..\..\src\ballistica\networking\network_reader.cc" />
<ClInclude Include="..\..\src\ballistica\networking\network_reader.h" /> <ClInclude Include="..\..\src\ballistica\networking\network_reader.h" />
<ClCompile Include="..\..\src\ballistica\networking\network_writer.cc" /> <ClCompile Include="..\..\src\ballistica\networking\network_writer.cc" />
@ -543,14 +543,14 @@
<ClInclude Include="..\..\src\ballistica\python\class\python_class_widget.h" /> <ClInclude Include="..\..\src\ballistica\python\class\python_class_widget.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_app.cc" /> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_app.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_app.h" /> <ClInclude Include="..\..\src\ballistica\python\methods\python_methods_app.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_assets.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_assets.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_gameplay.cc" /> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_gameplay.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_gameplay.h" /> <ClInclude Include="..\..\src\ballistica\python\methods\python_methods_gameplay.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_graphics.cc" /> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_graphics.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_graphics.h" /> <ClInclude Include="..\..\src\ballistica\python\methods\python_methods_graphics.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_input.cc" /> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_input.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_input.h" /> <ClInclude Include="..\..\src\ballistica\python\methods\python_methods_input.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_media.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_media.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_networking.cc" /> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_networking.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_networking.h" /> <ClInclude Include="..\..\src\ballistica\python\methods\python_methods_networking.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_system.cc" /> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_system.cc" />

View File

@ -37,6 +37,108 @@
<ClInclude Include="..\..\src\ballistica\app\stress_test.h"> <ClInclude Include="..\..\src\ballistica\app\stress_test.h">
<Filter>ballistica\app</Filter> <Filter>ballistica\app</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\assets.cc">
<Filter>ballistica\assets</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\assets.h">
<Filter>ballistica\assets</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\assets_server.cc">
<Filter>ballistica\assets</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\assets_server.h">
<Filter>ballistica\assets</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\component\asset_component.cc">
<Filter>ballistica\assets\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\component\asset_component.h">
<Filter>ballistica\assets\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\component\collide_model.cc">
<Filter>ballistica\assets\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\component\collide_model.h">
<Filter>ballistica\assets\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\component\cube_map_texture.cc">
<Filter>ballistica\assets\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\component\cube_map_texture.h">
<Filter>ballistica\assets\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\component\data.cc">
<Filter>ballistica\assets\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\component\data.h">
<Filter>ballistica\assets\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\component\model.cc">
<Filter>ballistica\assets\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\component\model.h">
<Filter>ballistica\assets\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\component\sound.cc">
<Filter>ballistica\assets\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\component\sound.h">
<Filter>ballistica\assets\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\component\texture.cc">
<Filter>ballistica\assets\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\component\texture.h">
<Filter>ballistica\assets\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\data\asset_component_data.cc">
<Filter>ballistica\assets\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\data\asset_component_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\data\collide_model_data.cc">
<Filter>ballistica\assets\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\data\collide_model_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\data\data_data.cc">
<Filter>ballistica\assets\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\data\data_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\data\model_data.cc">
<Filter>ballistica\assets\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\data\model_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ballistica\assets\data\model_renderer_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\data\sound_data.cc">
<Filter>ballistica\assets\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\data\sound_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\data\texture_data.cc">
<Filter>ballistica\assets\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\data\texture_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\assets\data\texture_preload_data.cc">
<Filter>ballistica\assets\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\assets\data\texture_preload_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ballistica\assets\data\texture_renderer_data.h">
<Filter>ballistica\assets\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\audio\al_sys.cc"> <ClCompile Include="..\..\src\ballistica\audio\al_sys.cc">
<Filter>ballistica\audio</Filter> <Filter>ballistica\audio</Filter>
</ClCompile> </ClCompile>
@ -805,108 +907,6 @@
<ClInclude Include="..\..\src\ballistica\math\vector4f.h"> <ClInclude Include="..\..\src\ballistica\math\vector4f.h">
<Filter>ballistica\math</Filter> <Filter>ballistica\math</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\ballistica\media\component\collide_model.cc">
<Filter>ballistica\media\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\component\collide_model.h">
<Filter>ballistica\media\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\component\cube_map_texture.cc">
<Filter>ballistica\media\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\component\cube_map_texture.h">
<Filter>ballistica\media\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\component\data.cc">
<Filter>ballistica\media\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\component\data.h">
<Filter>ballistica\media\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\component\media_component.cc">
<Filter>ballistica\media\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\component\media_component.h">
<Filter>ballistica\media\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\component\model.cc">
<Filter>ballistica\media\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\component\model.h">
<Filter>ballistica\media\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\component\sound.cc">
<Filter>ballistica\media\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\component\sound.h">
<Filter>ballistica\media\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\component\texture.cc">
<Filter>ballistica\media\component</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\component\texture.h">
<Filter>ballistica\media\component</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\data\collide_model_data.cc">
<Filter>ballistica\media\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\data\collide_model_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\data\data_data.cc">
<Filter>ballistica\media\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\data\data_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\data\media_component_data.cc">
<Filter>ballistica\media\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\data\media_component_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\data\model_data.cc">
<Filter>ballistica\media\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\data\model_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ballistica\media\data\model_renderer_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\data\sound_data.cc">
<Filter>ballistica\media\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\data\sound_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\data\texture_data.cc">
<Filter>ballistica\media\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\data\texture_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\data\texture_preload_data.cc">
<Filter>ballistica\media\data</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\data\texture_preload_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ballistica\media\data\texture_renderer_data.h">
<Filter>ballistica\media\data</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\media.cc">
<Filter>ballistica\media</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\media.h">
<Filter>ballistica\media</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\media\media_server.cc">
<Filter>ballistica\media</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\media\media_server.h">
<Filter>ballistica\media</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\networking\network_reader.cc"> <ClCompile Include="..\..\src\ballistica\networking\network_reader.cc">
<Filter>ballistica\networking</Filter> <Filter>ballistica\networking</Filter>
</ClCompile> </ClCompile>
@ -1078,6 +1078,12 @@
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_app.h"> <ClInclude Include="..\..\src\ballistica\python\methods\python_methods_app.h">
<Filter>ballistica\python\methods</Filter> <Filter>ballistica\python\methods</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_assets.cc">
<Filter>ballistica\python\methods</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_assets.h">
<Filter>ballistica\python\methods</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_gameplay.cc"> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_gameplay.cc">
<Filter>ballistica\python\methods</Filter> <Filter>ballistica\python\methods</Filter>
</ClCompile> </ClCompile>
@ -1096,12 +1102,6 @@
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_input.h"> <ClInclude Include="..\..\src\ballistica\python\methods\python_methods_input.h">
<Filter>ballistica\python\methods</Filter> <Filter>ballistica\python\methods</Filter>
</ClInclude> </ClInclude>
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_media.cc">
<Filter>ballistica\python\methods</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_media.h">
<Filter>ballistica\python\methods</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_networking.cc"> <ClCompile Include="..\..\src\ballistica\python\methods\python_methods_networking.cc">
<Filter>ballistica\python\methods</Filter> <Filter>ballistica\python\methods</Filter>
</ClCompile> </ClCompile>
@ -1646,6 +1646,9 @@
<ItemGroup> <ItemGroup>
<Filter Include="ballistica" /> <Filter Include="ballistica" />
<Filter Include="ballistica\app" /> <Filter Include="ballistica\app" />
<Filter Include="ballistica\assets" />
<Filter Include="ballistica\assets\component" />
<Filter Include="ballistica\assets\data" />
<Filter Include="ballistica\audio" /> <Filter Include="ballistica\audio" />
<Filter Include="ballistica\config" /> <Filter Include="ballistica\config" />
<Filter Include="ballistica\core" /> <Filter Include="ballistica\core" />
@ -1666,9 +1669,6 @@
<Filter Include="ballistica\input\device" /> <Filter Include="ballistica\input\device" />
<Filter Include="ballistica\internal" /> <Filter Include="ballistica\internal" />
<Filter Include="ballistica\math" /> <Filter Include="ballistica\math" />
<Filter Include="ballistica\media" />
<Filter Include="ballistica\media\component" />
<Filter Include="ballistica\media\data" />
<Filter Include="ballistica\networking" /> <Filter Include="ballistica\networking" />
<Filter Include="ballistica\platform" /> <Filter Include="ballistica\platform" />
<Filter Include="ballistica\platform\apple" /> <Filter Include="ballistica\platform\apple" />

View File

@ -76,11 +76,11 @@ void StressTest::Update() {
uint32_t texture_count = 0; uint32_t texture_count = 0;
uint32_t sound_count = 0; uint32_t sound_count = 0;
uint32_t node_count = 0; uint32_t node_count = 0;
if (g_media) { if (g_assets) {
model_count = g_media->total_model_count(); model_count = g_assets->total_model_count();
collide_model_count = g_media->total_collide_model_count(); collide_model_count = g_assets->total_collide_model_count();
texture_count = g_media->total_texture_count(); texture_count = g_assets->total_texture_count();
sound_count = g_media->total_sound_count(); sound_count = g_assets->total_sound_count();
} }
assert(g_game); assert(g_game);
std::string mem_usage = g_platform->GetMemUsageInfo(); std::string mem_usage = g_platform->GetMemUsageInfo();

View File

@ -1,23 +1,23 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/media.h" #include "ballistica/assets/assets.h"
#if !BA_OSTYPE_WINDOWS #if !BA_OSTYPE_WINDOWS
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
#include "ballistica/assets/assets_server.h"
#include "ballistica/assets/component/collide_model.h"
#include "ballistica/assets/component/data.h"
#include "ballistica/assets/component/model.h"
#include "ballistica/assets/component/texture.h"
#include "ballistica/assets/data/sound_data.h"
#include "ballistica/audio/audio_server.h" #include "ballistica/audio/audio_server.h"
#include "ballistica/core/thread.h" #include "ballistica/core/thread.h"
#include "ballistica/game/game.h" #include "ballistica/game/game.h"
#include "ballistica/generic/timer.h" #include "ballistica/generic/timer.h"
#include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/graphics_server.h"
#include "ballistica/graphics/text/text_packer.h" #include "ballistica/graphics/text/text_packer.h"
#include "ballistica/media/component/collide_model.h"
#include "ballistica/media/component/data.h"
#include "ballistica/media/component/model.h"
#include "ballistica/media/component/texture.h"
#include "ballistica/media/data/sound_data.h"
#include "ballistica/media/media_server.h"
#include "ballistica/python/python_sys.h" #include "ballistica/python/python_sys.h"
namespace ballistica { namespace ballistica {
@ -26,8 +26,8 @@ namespace ballistica {
#define BA_SHOW_LOADS_UNLOADS 0 #define BA_SHOW_LOADS_UNLOADS 0
#define SHOW_PRUNING_INFO 0 #define SHOW_PRUNING_INFO 0
// Standard prune time for unused media: 10 minutes (1000ms * 60 * 10). // Standard prune time for unused assets: 10 minutes (1000ms * 60 * 10).
#define STANDARD_MEDIA_PRUNE_TIME 600000 #define STANDARD_ASSET_PRUNE_TIME 600000
// More aggressive prune time for dynamically-generated text-textures: 10 // More aggressive prune time for dynamically-generated text-textures: 10
// seconds. // seconds.
@ -35,53 +35,53 @@ namespace ballistica {
#define QR_TEXTURE_PRUNE_TIME 10000 #define QR_TEXTURE_PRUNE_TIME 10000
// How long we should spend loading media in each runPendingLoads() call. // How long we should spend loading assets in each runPendingLoads() call.
#define PENDING_LOAD_PROCESS_TIME 5 #define PENDING_LOAD_PROCESS_TIME 5
Media::Media() { Assets::Assets() {
media_paths_.emplace_back("ba_data"); asset_paths_.emplace_back("ba_data");
for (bool& have_pending_load : have_pending_loads_) { for (bool& have_pending_load : have_pending_loads_) {
have_pending_load = false; have_pending_load = false;
} }
} }
void Media::LoadSystemTexture(SystemTextureID id, const char* name) { void Assets::LoadSystemTexture(SystemTextureID id, const char* name) {
assert(media_lists_locked_); assert(asset_lists_locked_);
system_textures_.push_back(GetTextureData(name)); system_textures_.push_back(GetTextureData(name));
assert(system_textures_.size() == static_cast<int>(id) + 1); assert(system_textures_.size() == static_cast<int>(id) + 1);
} }
void Media::LoadSystemCubeMapTexture(SystemCubeMapTextureID id, void Assets::LoadSystemCubeMapTexture(SystemCubeMapTextureID id,
const char* name) { const char* name) {
assert(media_lists_locked_); assert(asset_lists_locked_);
system_cube_map_textures_.push_back(GetCubeMapTextureData(name)); system_cube_map_textures_.push_back(GetCubeMapTextureData(name));
assert(system_cube_map_textures_.size() == static_cast<int>(id) + 1); assert(system_cube_map_textures_.size() == static_cast<int>(id) + 1);
} }
void Media::LoadSystemSound(SystemSoundID id, const char* name) { void Assets::LoadSystemSound(SystemSoundID id, const char* name) {
system_sounds_.push_back(GetSoundData(name)); system_sounds_.push_back(GetSoundData(name));
assert(system_sounds_.size() == static_cast<int>(id) + 1); assert(system_sounds_.size() == static_cast<int>(id) + 1);
} }
void Media::LoadSystemData(SystemDataID id, const char* name) { void Assets::LoadSystemData(SystemDataID id, const char* name) {
system_datas_.push_back(GetDataData(name)); system_datas_.push_back(GetDataData(name));
assert(system_datas_.size() == static_cast<int>(id) + 1); assert(system_datas_.size() == static_cast<int>(id) + 1);
} }
void Media::LoadSystemModel(SystemModelID id, const char* name) { void Assets::LoadSystemModel(SystemModelID id, const char* name) {
system_models_.push_back(GetModelData(name)); system_models_.push_back(GetModelData(name));
assert(system_models_.size() == static_cast<int>(id) + 1); assert(system_models_.size() == static_cast<int>(id) + 1);
} }
void Media::LoadSystemMedia() { void Assets::LoadSystemAssets() {
assert(InLogicThread()); assert(InLogicThread());
assert(g_audio_server && g_media_server && g_graphics_server); assert(g_audio_server && g_assets_server && g_graphics_server);
assert(g_graphics_server assert(g_graphics_server
&& g_graphics_server->texture_compression_types_are_set()); && g_graphics_server->texture_compression_types_are_set());
assert(g_graphics && g_graphics_server->texture_quality_set()); assert(g_graphics && g_graphics_server->texture_quality_set());
// Just grab the lock once for all this stuff for efficiency. // Just grab the lock once for all this stuff for efficiency.
MediaListsLock lock; AssetListLock lock;
// System textures: // System textures:
LoadSystemTexture(SystemTextureID::kUIAtlas, "uiAtlas"); LoadSystemTexture(SystemTextureID::kUIAtlas, "uiAtlas");
@ -280,24 +280,24 @@ void Media::LoadSystemMedia() {
LoadSystemModel(SystemModelID::kWing, "wing"); LoadSystemModel(SystemModelID::kWing, "wing");
// Hooray! // Hooray!
system_media_loaded_ = true; system_assets_loaded_ = true;
} }
void Media::PrintLoadInfo() { void Assets::PrintLoadInfo() {
std::string s; std::string s;
char buffer[256]; char buffer[256];
int num = 1; int num = 1;
// Need to lock lists while iterating over them. // Need to lock lists while iterating over them.
MediaListsLock lock; AssetListLock lock;
s = "Media load results: (all times in milliseconds):\n"; s = "Assets load results: (all times in milliseconds):\n";
snprintf(buffer, sizeof(buffer), " %-50s %10s %10s", "FILE", snprintf(buffer, sizeof(buffer), " %-50s %10s %10s", "FILE",
"PRELOAD_TIME", "LOAD_TIME"); "PRELOAD_TIME", "LOAD_TIME");
s += buffer; s += buffer;
Log(s, true, false); Log(s, true, false);
millisecs_t total_preload_time = 0; millisecs_t total_preload_time = 0;
millisecs_t total_load_time = 0; millisecs_t total_load_time = 0;
assert(media_lists_locked_); assert(asset_lists_locked_);
for (auto&& i : models_) { for (auto&& i : models_) {
millisecs_t preload_time = i.second->preload_time(); millisecs_t preload_time = i.second->preload_time();
millisecs_t load_time = i.second->load_time(); millisecs_t load_time = i.second->load_time();
@ -310,7 +310,7 @@ void Media::PrintLoadInfo() {
Log(buffer, true, false); Log(buffer, true, false);
num++; num++;
} }
assert(media_lists_locked_); assert(asset_lists_locked_);
for (auto&& i : collide_models_) { for (auto&& i : collide_models_) {
millisecs_t preload_time = i.second->preload_time(); millisecs_t preload_time = i.second->preload_time();
millisecs_t load_time = i.second->load_time(); millisecs_t load_time = i.second->load_time();
@ -323,7 +323,7 @@ void Media::PrintLoadInfo() {
Log(buffer, true, false); Log(buffer, true, false);
num++; num++;
} }
assert(media_lists_locked_); assert(asset_lists_locked_);
for (auto&& i : sounds_) { for (auto&& i : sounds_) {
millisecs_t preload_time = i.second->preload_time(); millisecs_t preload_time = i.second->preload_time();
millisecs_t load_time = i.second->load_time(); millisecs_t load_time = i.second->load_time();
@ -336,7 +336,7 @@ void Media::PrintLoadInfo() {
Log(buffer, true, false); Log(buffer, true, false);
num++; num++;
} }
assert(media_lists_locked_); assert(asset_lists_locked_);
for (auto&& i : datas_) { for (auto&& i : datas_) {
millisecs_t preload_time = i.second->preload_time(); millisecs_t preload_time = i.second->preload_time();
millisecs_t load_time = i.second->load_time(); millisecs_t load_time = i.second->load_time();
@ -349,7 +349,7 @@ void Media::PrintLoadInfo() {
Log(buffer, true, false); Log(buffer, true, false);
num++; num++;
} }
assert(media_lists_locked_); assert(asset_lists_locked_);
for (auto&& i : textures_) { for (auto&& i : textures_) {
millisecs_t preload_time = i.second->preload_time(); millisecs_t preload_time = i.second->preload_time();
millisecs_t load_time = i.second->load_time(); millisecs_t load_time = i.second->load_time();
@ -370,96 +370,97 @@ void Media::PrintLoadInfo() {
Log(buffer, true, false); Log(buffer, true, false);
} }
void Media::MarkAllMediaForLoad() { void Assets::MarkAllAssetsForLoad() {
assert(InLogicThread()); assert(InLogicThread());
// Need to keep lists locked while iterating over them. // Need to keep lists locked while iterating over them.
MediaListsLock m_lock; AssetListLock m_lock;
for (auto&& i : textures_) { for (auto&& i : textures_) {
if (!i.second->preloaded()) { if (!i.second->preloaded()) {
MediaComponentData::LockGuard lock(i.second.get()); AssetComponentData::LockGuard lock(i.second.get());
have_pending_loads_[static_cast<int>(MediaType::kTexture)] = true; have_pending_loads_[static_cast<int>(AssetType::kTexture)] = true;
MarkComponentForLoad(i.second.get()); MarkComponentForLoad(i.second.get());
} }
} }
for (auto&& i : text_textures_) { for (auto&& i : text_textures_) {
if (!i.second->preloaded()) { if (!i.second->preloaded()) {
MediaComponentData::LockGuard lock(i.second.get()); AssetComponentData::LockGuard lock(i.second.get());
have_pending_loads_[static_cast<int>(MediaType::kTexture)] = true; have_pending_loads_[static_cast<int>(AssetType::kTexture)] = true;
MarkComponentForLoad(i.second.get()); MarkComponentForLoad(i.second.get());
} }
} }
for (auto&& i : qr_textures_) { for (auto&& i : qr_textures_) {
if (!i.second->preloaded()) { if (!i.second->preloaded()) {
MediaComponentData::LockGuard lock(i.second.get()); AssetComponentData::LockGuard lock(i.second.get());
have_pending_loads_[static_cast<int>(MediaType::kTexture)] = true; have_pending_loads_[static_cast<int>(AssetType::kTexture)] = true;
MarkComponentForLoad(i.second.get()); MarkComponentForLoad(i.second.get());
} }
} }
for (auto&& i : models_) { for (auto&& i : models_) {
if (!i.second->preloaded()) { if (!i.second->preloaded()) {
MediaComponentData::LockGuard lock(i.second.get()); AssetComponentData::LockGuard lock(i.second.get());
have_pending_loads_[static_cast<int>(MediaType::kModel)] = true; have_pending_loads_[static_cast<int>(AssetType::kModel)] = true;
MarkComponentForLoad(i.second.get()); MarkComponentForLoad(i.second.get());
} }
} }
} }
// Call this from the graphics thread to immediately unload all // Call this from the graphics thread to immediately unload all
// media used by it. (for when GL context gets lost, etc). // assets used by it. (for when GL context gets lost, etc).
void Media::UnloadRendererBits(bool do_textures, bool do_models) { void Assets::UnloadRendererBits(bool do_textures, bool do_models) {
assert(InGraphicsThread()); assert(InGraphicsThread());
// need to keep lists locked while iterating over them.. // need to keep lists locked while iterating over them..
MediaListsLock m_lock; AssetListLock m_lock;
if (do_textures) { if (do_textures) {
assert(media_lists_locked_); assert(asset_lists_locked_);
for (auto&& i : textures_) { for (auto&& i : textures_) {
MediaComponentData::LockGuard lock(i.second.get()); AssetComponentData::LockGuard lock(i.second.get());
i.second->Unload(true); i.second->Unload(true);
} }
for (auto&& i : text_textures_) { for (auto&& i : text_textures_) {
MediaComponentData::LockGuard lock(i.second.get()); AssetComponentData::LockGuard lock(i.second.get());
i.second->Unload(true); i.second->Unload(true);
} }
for (auto&& i : qr_textures_) { for (auto&& i : qr_textures_) {
MediaComponentData::LockGuard lock(i.second.get()); AssetComponentData::LockGuard lock(i.second.get());
i.second->Unload(true); i.second->Unload(true);
} }
} }
if (do_models) { if (do_models) {
for (auto&& i : models_) { for (auto&& i : models_) {
MediaComponentData::LockGuard lock(i.second.get()); AssetComponentData::LockGuard lock(i.second.get());
i.second->Unload(true); i.second->Unload(true);
} }
} }
} }
auto Media::GetModelData(const std::string& file_name) auto Assets::GetModelData(const std::string& file_name)
-> Object::Ref<ModelData> { -> Object::Ref<ModelData> {
return GetComponentData(file_name, &models_); return GetComponentData(file_name, &models_);
} }
auto Media::GetSoundData(const std::string& file_name) auto Assets::GetSoundData(const std::string& file_name)
-> Object::Ref<SoundData> { -> Object::Ref<SoundData> {
return GetComponentData(file_name, &sounds_); return GetComponentData(file_name, &sounds_);
} }
auto Media::GetDataData(const std::string& file_name) -> Object::Ref<DataData> { auto Assets::GetDataData(const std::string& file_name)
-> Object::Ref<DataData> {
return GetComponentData(file_name, &datas_); return GetComponentData(file_name, &datas_);
} }
auto Media::GetCollideModelData(const std::string& file_name) auto Assets::GetCollideModelData(const std::string& file_name)
-> Object::Ref<CollideModelData> { -> Object::Ref<CollideModelData> {
return GetComponentData(file_name, &collide_models_); return GetComponentData(file_name, &collide_models_);
} }
template <class T> template <class T>
auto Media::GetComponentData( auto Assets::GetComponentData(
const std::string& file_name, const std::string& file_name,
std::unordered_map<std::string, Object::Ref<T> >* c_list) std::unordered_map<std::string, Object::Ref<T> >* c_list)
-> Object::Ref<T> { -> Object::Ref<T> {
assert(InLogicThread()); assert(InLogicThread());
assert(media_lists_locked_); assert(asset_lists_locked_);
auto i = c_list->find(file_name); auto i = c_list->find(file_name);
if (i != c_list->end()) { if (i != c_list->end()) {
return Object::Ref<T>(i->second.get()); return Object::Ref<T>(i->second.get());
@ -467,8 +468,8 @@ auto Media::GetComponentData(
auto d(Object::New<T>(file_name)); auto d(Object::New<T>(file_name));
(*c_list)[file_name] = d; (*c_list)[file_name] = d;
{ {
MediaComponentData::LockGuard lock(d.get()); AssetComponentData::LockGuard lock(d.get());
have_pending_loads_[static_cast<int>(d->GetMediaType())] = true; have_pending_loads_[static_cast<int>(d->GetAssetType())] = true;
MarkComponentForLoad(d.get()); MarkComponentForLoad(d.get());
} }
d->set_last_used_time(GetRealTime()); d->set_last_used_time(GetRealTime());
@ -476,9 +477,9 @@ auto Media::GetComponentData(
} }
} }
auto Media::GetTextureData(TextPacker* packer) -> Object::Ref<TextureData> { auto Assets::GetTextureData(TextPacker* packer) -> Object::Ref<TextureData> {
assert(InLogicThread()); assert(InLogicThread());
assert(media_lists_locked_); assert(asset_lists_locked_);
const std::string& hash(packer->hash()); const std::string& hash(packer->hash());
auto i = text_textures_.find(hash); auto i = text_textures_.find(hash);
if (i != text_textures_.end()) { if (i != text_textures_.end()) {
@ -487,8 +488,8 @@ auto Media::GetTextureData(TextPacker* packer) -> Object::Ref<TextureData> {
auto d(Object::New<TextureData>(packer)); auto d(Object::New<TextureData>(packer));
text_textures_[hash] = d; text_textures_[hash] = d;
{ {
MediaComponentData::LockGuard lock(d.get()); AssetComponentData::LockGuard lock(d.get());
have_pending_loads_[static_cast<int>(d->GetMediaType())] = true; have_pending_loads_[static_cast<int>(d->GetAssetType())] = true;
MarkComponentForLoad(d.get()); MarkComponentForLoad(d.get());
} }
d->set_last_used_time(GetRealTime()); d->set_last_used_time(GetRealTime());
@ -496,10 +497,10 @@ auto Media::GetTextureData(TextPacker* packer) -> Object::Ref<TextureData> {
} }
} }
auto Media::GetTextureDataQRCode(const std::string& url) auto Assets::GetTextureDataQRCode(const std::string& url)
-> Object::Ref<TextureData> { -> Object::Ref<TextureData> {
assert(InLogicThread()); assert(InLogicThread());
assert(media_lists_locked_); assert(asset_lists_locked_);
auto i = qr_textures_.find(url); auto i = qr_textures_.find(url);
if (i != qr_textures_.end()) { if (i != qr_textures_.end()) {
return Object::Ref<TextureData>(i->second.get()); return Object::Ref<TextureData>(i->second.get());
@ -507,8 +508,8 @@ auto Media::GetTextureDataQRCode(const std::string& url)
auto d(Object::New<TextureData>(url)); auto d(Object::New<TextureData>(url));
qr_textures_[url] = d; qr_textures_[url] = d;
{ {
MediaComponentData::LockGuard lock(d.get()); AssetComponentData::LockGuard lock(d.get());
have_pending_loads_[static_cast<int>(d->GetMediaType())] = true; have_pending_loads_[static_cast<int>(d->GetAssetType())] = true;
MarkComponentForLoad(d.get()); MarkComponentForLoad(d.get());
} }
d->set_last_used_time(GetRealTime()); d->set_last_used_time(GetRealTime());
@ -518,10 +519,10 @@ auto Media::GetTextureDataQRCode(const std::string& url)
// Eww can't recycle GetComponent here since we need extra stuff (tex-type arg) // Eww can't recycle GetComponent here since we need extra stuff (tex-type arg)
// ..should fix. // ..should fix.
auto Media::GetCubeMapTextureData(const std::string& file_name) auto Assets::GetCubeMapTextureData(const std::string& file_name)
-> Object::Ref<TextureData> { -> Object::Ref<TextureData> {
assert(InLogicThread()); assert(InLogicThread());
assert(media_lists_locked_); assert(asset_lists_locked_);
auto i = textures_.find(file_name); auto i = textures_.find(file_name);
if (i != textures_.end()) { if (i != textures_.end()) {
return Object::Ref<TextureData>(i->second.get()); return Object::Ref<TextureData>(i->second.get());
@ -530,8 +531,8 @@ auto Media::GetCubeMapTextureData(const std::string& file_name)
TextureMinQuality::kLow)); TextureMinQuality::kLow));
textures_[file_name] = d; textures_[file_name] = d;
{ {
MediaComponentData::LockGuard lock(d.get()); AssetComponentData::LockGuard lock(d.get());
have_pending_loads_[static_cast<int>(d->GetMediaType())] = true; have_pending_loads_[static_cast<int>(d->GetAssetType())] = true;
MarkComponentForLoad(d.get()); MarkComponentForLoad(d.get());
} }
d->set_last_used_time(GetRealTime()); d->set_last_used_time(GetRealTime());
@ -541,10 +542,10 @@ auto Media::GetCubeMapTextureData(const std::string& file_name)
// Eww; can't recycle GetComponent here since we need extra stuff (quality // Eww; can't recycle GetComponent here since we need extra stuff (quality
// settings, etc). Should fix. // settings, etc). Should fix.
auto Media::GetTextureData(const std::string& file_name) auto Assets::GetTextureData(const std::string& file_name)
-> Object::Ref<TextureData> { -> Object::Ref<TextureData> {
assert(InLogicThread()); assert(InLogicThread());
assert(media_lists_locked_); assert(asset_lists_locked_);
auto i = textures_.find(file_name); auto i = textures_.find(file_name);
if (i != textures_.end()) { if (i != textures_.end()) {
return Object::Ref<TextureData>(i->second.get()); return Object::Ref<TextureData>(i->second.get());
@ -586,8 +587,8 @@ auto Media::GetTextureData(const std::string& file_name)
auto d(Object::New<TextureData>(file_name, TextureType::k2D, min_quality)); auto d(Object::New<TextureData>(file_name, TextureType::k2D, min_quality));
textures_[file_name] = d; textures_[file_name] = d;
{ {
MediaComponentData::LockGuard lock(d.get()); AssetComponentData::LockGuard lock(d.get());
have_pending_loads_[static_cast<int>(d->GetMediaType())] = true; have_pending_loads_[static_cast<int>(d->GetAssetType())] = true;
MarkComponentForLoad(d.get()); MarkComponentForLoad(d.get());
} }
d->set_last_used_time(GetRealTime()); d->set_last_used_time(GetRealTime());
@ -595,7 +596,7 @@ auto Media::GetTextureData(const std::string& file_name)
} }
} }
void Media::MarkComponentForLoad(MediaComponentData* c) { void Assets::MarkComponentForLoad(AssetComponentData* c) {
assert(InLogicThread()); assert(InLogicThread());
assert(c->locked()); assert(c->locked());
@ -606,19 +607,19 @@ void Media::MarkComponentForLoad(MediaComponentData* c) {
// once it makes it back to us we can delete the ref (in // once it makes it back to us we can delete the ref (in
// ClearPendingLoadsDoneList) // ClearPendingLoadsDoneList)
auto media_ptr = new Object::Ref<MediaComponentData>(c); auto asset_ptr = new Object::Ref<AssetComponentData>(c);
g_media_server->thread()->PushCall([media_ptr] { g_assets_server->thread()->PushCall([asset_ptr] {
assert(InMediaThread()); assert(InAssetsThread());
// add our pointer to one of the preload lists and shake our preload thread // add our pointer to one of the preload lists and shake our preload thread
// to wake it up // to wake it up
if ((**media_ptr).GetMediaType() == MediaType::kSound) { if ((**asset_ptr).GetAssetType() == AssetType::kSound) {
g_media_server->pending_preloads_audio_.push_back(media_ptr); g_assets_server->pending_preloads_audio_.push_back(asset_ptr);
} else { } else {
g_media_server->pending_preloads_.push_back(media_ptr); g_assets_server->pending_preloads_.push_back(asset_ptr);
} }
g_media_server->process_timer_->SetLength(0); g_assets_server->process_timer_->SetLength(0);
}); });
} }
@ -626,102 +627,102 @@ void Media::MarkComponentForLoad(MediaComponentData* c) {
#pragma ide diagnostic ignored "UnreachableCode" #pragma ide diagnostic ignored "UnreachableCode"
#pragma ide diagnostic ignored "ConstantFunctionResult" #pragma ide diagnostic ignored "ConstantFunctionResult"
auto Media::GetModelPendingLoadCount() -> int { auto Assets::GetModelPendingLoadCount() -> int {
if (!have_pending_loads_[static_cast<int>(MediaType::kModel)]) { if (!have_pending_loads_[static_cast<int>(AssetType::kModel)]) {
return 0; return 0;
} }
MediaListsLock lock; AssetListLock lock;
int total = GetComponentPendingLoadCount(&models_, MediaType::kModel); int total = GetComponentPendingLoadCount(&models_, AssetType::kModel);
if (total == 0) { if (total == 0) {
// When fully loaded, stop counting. // When fully loaded, stop counting.
have_pending_loads_[static_cast<int>(MediaType::kModel)] = false; have_pending_loads_[static_cast<int>(AssetType::kModel)] = false;
} }
return total; return total;
} }
auto Media::GetTexturePendingLoadCount() -> int { auto Assets::GetTexturePendingLoadCount() -> int {
if (!have_pending_loads_[static_cast<int>(MediaType::kTexture)]) { if (!have_pending_loads_[static_cast<int>(AssetType::kTexture)]) {
return 0; return 0;
} }
MediaListsLock lock; AssetListLock lock;
int total = int total =
(GetComponentPendingLoadCount(&textures_, MediaType::kTexture) (GetComponentPendingLoadCount(&textures_, AssetType::kTexture)
+ GetComponentPendingLoadCount(&text_textures_, MediaType::kTexture) + GetComponentPendingLoadCount(&text_textures_, AssetType::kTexture)
+ GetComponentPendingLoadCount(&qr_textures_, MediaType::kTexture)); + GetComponentPendingLoadCount(&qr_textures_, AssetType::kTexture));
if (total == 0) { if (total == 0) {
// When fully loaded, stop counting. // When fully loaded, stop counting.
have_pending_loads_[static_cast<int>(MediaType::kTexture)] = false; have_pending_loads_[static_cast<int>(AssetType::kTexture)] = false;
} }
return total; return total;
} }
auto Media::GetSoundPendingLoadCount() -> int { auto Assets::GetSoundPendingLoadCount() -> int {
if (!have_pending_loads_[static_cast<int>(MediaType::kSound)]) { if (!have_pending_loads_[static_cast<int>(AssetType::kSound)]) {
return 0; return 0;
} }
MediaListsLock lock; AssetListLock lock;
int total = GetComponentPendingLoadCount(&sounds_, MediaType::kSound); int total = GetComponentPendingLoadCount(&sounds_, AssetType::kSound);
if (total == 0) { if (total == 0) {
// When fully loaded, stop counting. // When fully loaded, stop counting.
have_pending_loads_[static_cast<int>(MediaType::kSound)] = false; have_pending_loads_[static_cast<int>(AssetType::kSound)] = false;
} }
return total; return total;
} }
auto Media::GetDataPendingLoadCount() -> int { auto Assets::GetDataPendingLoadCount() -> int {
if (!have_pending_loads_[static_cast<int>(MediaType::kData)]) { if (!have_pending_loads_[static_cast<int>(AssetType::kData)]) {
return 0; return 0;
} }
MediaListsLock lock; AssetListLock lock;
int total = GetComponentPendingLoadCount(&datas_, MediaType::kData); int total = GetComponentPendingLoadCount(&datas_, AssetType::kData);
if (total == 0) { if (total == 0) {
// When fully loaded, stop counting. // When fully loaded, stop counting.
have_pending_loads_[static_cast<int>(MediaType::kData)] = false; have_pending_loads_[static_cast<int>(AssetType::kData)] = false;
} }
return total; return total;
} }
auto Media::GetCollideModelPendingLoadCount() -> int { auto Assets::GetCollideModelPendingLoadCount() -> int {
if (!have_pending_loads_[static_cast<int>(MediaType::kCollideModel)]) { if (!have_pending_loads_[static_cast<int>(AssetType::kCollideModel)]) {
return 0; return 0;
} }
MediaListsLock lock; AssetListLock lock;
int total = int total =
GetComponentPendingLoadCount(&collide_models_, MediaType::kCollideModel); GetComponentPendingLoadCount(&collide_models_, AssetType::kCollideModel);
if (total == 0) { if (total == 0) {
// When fully loaded, stop counting. // When fully loaded, stop counting.
have_pending_loads_[static_cast<int>(MediaType::kCollideModel)] = false; have_pending_loads_[static_cast<int>(AssetType::kCollideModel)] = false;
} }
return total; return total;
} }
#pragma clang diagnostic pop #pragma clang diagnostic pop
auto Media::GetGraphicalPendingLoadCount() -> int { auto Assets::GetGraphicalPendingLoadCount() -> int {
// Each of these calls lock the media-lists so we don't. // Each of these calls lock the asset-lists so we don't.
return GetModelPendingLoadCount() + GetTexturePendingLoadCount(); return GetModelPendingLoadCount() + GetTexturePendingLoadCount();
} }
auto Media::GetPendingLoadCount() -> int { auto Assets::GetPendingLoadCount() -> int {
// Each of these calls lock the media-lists so we don't. // Each of these calls lock the asset-lists so we don't.
return GetModelPendingLoadCount() + GetTexturePendingLoadCount() return GetModelPendingLoadCount() + GetTexturePendingLoadCount()
+ GetDataPendingLoadCount() + GetSoundPendingLoadCount() + GetDataPendingLoadCount() + GetSoundPendingLoadCount()
+ GetCollideModelPendingLoadCount(); + GetCollideModelPendingLoadCount();
} }
template <class T> template <class T>
auto Media::GetComponentPendingLoadCount( auto Assets::GetComponentPendingLoadCount(
std::unordered_map<std::string, Object::Ref<T> >* t_list, MediaType type) std::unordered_map<std::string, Object::Ref<T> >* t_list, AssetType type)
-> int { -> int {
assert(InLogicThread()); assert(InLogicThread());
assert(media_lists_locked_); assert(asset_lists_locked_);
int c = 0; int c = 0;
for (auto&& i : (*t_list)) { for (auto&& i : (*t_list)) {
if (i.second.exists()) { if (i.second.exists()) {
if (i.second->TryLock()) { if (i.second->TryLock()) {
MediaComponentData::LockGuard lock( AssetComponentData::LockGuard lock(
i.second.get(), MediaComponentData::LockGuard::Type::kInheritLock); i.second.get(), AssetComponentData::LockGuard::Type::kInheritLock);
if (!i.second->loaded()) { if (!i.second->loaded()) {
c++; c++;
} }
@ -734,26 +735,26 @@ auto Media::GetComponentPendingLoadCount(
} }
// Runs the pending loads that need to run from the audio thread. // Runs the pending loads that need to run from the audio thread.
auto Media::RunPendingAudioLoads() -> bool { auto Assets::RunPendingAudioLoads() -> bool {
assert(InAudioThread()); assert(InAudioThread());
return RunPendingLoadList(&pending_loads_sounds_); return RunPendingLoadList(&pending_loads_sounds_);
} }
// Runs the pending loads that need to run from the graphics thread. // Runs the pending loads that need to run from the graphics thread.
auto Media::RunPendingGraphicsLoads() -> bool { auto Assets::RunPendingGraphicsLoads() -> bool {
assert(InGraphicsThread()); assert(InGraphicsThread());
return RunPendingLoadList(&pending_loads_graphics_); return RunPendingLoadList(&pending_loads_graphics_);
} }
// Runs the pending loads that run in the main thread. Also clears the list of // Runs the pending loads that run in the main thread. Also clears the list of
// done loads. // done loads.
auto Media::RunPendingLoadsLogicThread() -> bool { auto Assets::RunPendingLoadsLogicThread() -> bool {
assert(InLogicThread()); assert(InLogicThread());
return RunPendingLoadList(&pending_loads_other_); return RunPendingLoadList(&pending_loads_other_);
} }
template <class T> template <class T>
auto Media::RunPendingLoadList(std::vector<Object::Ref<T>*>* c_list) -> bool { auto Assets::RunPendingLoadList(std::vector<Object::Ref<T>*>* c_list) -> bool {
bool flush = false; bool flush = false;
millisecs_t starttime = GetRealTime(); millisecs_t starttime = GetRealTime();
@ -830,31 +831,31 @@ auto Media::RunPendingLoadList(std::vector<Object::Ref<T>*>* c_list) -> bool {
return (!l.empty()); return (!l.empty());
} }
void Media::Prune(int level) { void Assets::Prune(int level) {
assert(InLogicThread()); assert(InLogicThread());
millisecs_t current_time = GetRealTime(); millisecs_t current_time = GetRealTime();
// need lists locked while accessing/modifying them // need lists locked while accessing/modifying them
MediaListsLock lock; AssetListLock lock;
// we can specify level for more aggressive pruning (during memory warnings // we can specify level for more aggressive pruning (during memory warnings
// and whatnot) // and whatnot)
millisecs_t standard_media_prune_time = STANDARD_MEDIA_PRUNE_TIME; millisecs_t standard_asset_prune_time = STANDARD_ASSET_PRUNE_TIME;
millisecs_t text_texture_prune_time = TEXT_TEXTURE_PRUNE_TIME; millisecs_t text_texture_prune_time = TEXT_TEXTURE_PRUNE_TIME;
millisecs_t qr_texture_prune_time = QR_TEXTURE_PRUNE_TIME; millisecs_t qr_texture_prune_time = QR_TEXTURE_PRUNE_TIME;
switch (level) { switch (level) {
case 1: case 1:
standard_media_prune_time = 120000; // 2 min standard_asset_prune_time = 120000; // 2 min
text_texture_prune_time = 1000; // 1 sec text_texture_prune_time = 1000; // 1 sec
qr_texture_prune_time = 1000; // 1 sec qr_texture_prune_time = 1000; // 1 sec
break; break;
case 2: case 2:
standard_media_prune_time = 30000; // 30 sec standard_asset_prune_time = 30000; // 30 sec
text_texture_prune_time = 1000; // 1 sec text_texture_prune_time = 1000; // 1 sec
qr_texture_prune_time = 1000; // 1 sec qr_texture_prune_time = 1000; // 1 sec
break; break;
case 3: case 3:
standard_media_prune_time = 5000; // 5 sec standard_asset_prune_time = 5000; // 5 sec
text_texture_prune_time = 1000; // 1 sec text_texture_prune_time = 1000; // 1 sec
qr_texture_prune_time = 1000; // 1 sec qr_texture_prune_time = 1000; // 1 sec
break; break;
@ -862,11 +863,11 @@ void Media::Prune(int level) {
break; break;
} }
std::vector<Object::Ref<MediaComponentData>*> graphics_thread_unloads; std::vector<Object::Ref<AssetComponentData>*> graphics_thread_unloads;
std::vector<Object::Ref<MediaComponentData>*> audio_thread_unloads; std::vector<Object::Ref<AssetComponentData>*> audio_thread_unloads;
#if SHOW_PRUNING_INFO #if SHOW_PRUNING_INFO
assert(media_lists_locked_); assert(asset_lists_locked_);
int old_texture_count = textures_.size(); int old_texture_count = textures_.size();
int old_text_texture_count = text_textures_.size(); int old_text_texture_count = text_textures_.size();
int old_qr_texture_count = qr_textures_.size(); int old_qr_texture_count = qr_textures_.size();
@ -876,13 +877,13 @@ void Media::Prune(int level) {
#endif // SHOW_PRUNING_INFO #endif // SHOW_PRUNING_INFO
// prune textures.. // prune textures..
assert(media_lists_locked_); assert(asset_lists_locked_);
for (auto i = textures_.begin(); i != textures_.end();) { for (auto i = textures_.begin(); i != textures_.end();) {
TextureData* texture_data = i->second.get(); TextureData* texture_data = i->second.get();
// attempt to prune if there are no references remaining except our own and // attempt to prune if there are no references remaining except our own and
// its been a while since it was used // its been a while since it was used
if (current_time - texture_data->last_used_time() if (current_time - texture_data->last_used_time()
> standard_media_prune_time > standard_asset_prune_time
&& (texture_data->object_strong_ref_count() <= 1)) { && (texture_data->object_strong_ref_count() <= 1)) {
// if its preloaded/loaded we need to ask the graphics thread to unload it // if its preloaded/loaded we need to ask the graphics thread to unload it
// first // first
@ -890,7 +891,7 @@ void Media::Prune(int level) {
// allocate a reference to keep this texture_data alive while the unload // allocate a reference to keep this texture_data alive while the unload
// is happening // is happening
graphics_thread_unloads.push_back( graphics_thread_unloads.push_back(
new Object::Ref<MediaComponentData>(texture_data)); new Object::Ref<AssetComponentData>(texture_data));
auto i_next = i; auto i_next = i;
i_next++; i_next++;
textures_.erase(i); textures_.erase(i);
@ -904,7 +905,7 @@ void Media::Prune(int level) {
// prune text-textures more aggressively since we may generate lots of them // prune text-textures more aggressively since we may generate lots of them
// FIXME - we may want to prune based on total number of these instead of // FIXME - we may want to prune based on total number of these instead of
// time.. // time..
assert(media_lists_locked_); assert(asset_lists_locked_);
for (auto i = text_textures_.begin(); i != text_textures_.end();) { for (auto i = text_textures_.begin(); i != text_textures_.end();) {
TextureData* texture_data = i->second.get(); TextureData* texture_data = i->second.get();
// attempt to prune if there are no references remaining except our own and // attempt to prune if there are no references remaining except our own and
@ -917,7 +918,7 @@ void Media::Prune(int level) {
// allocate a reference to keep this texture_data alive while the unload // allocate a reference to keep this texture_data alive while the unload
// is happening // is happening
graphics_thread_unloads.push_back( graphics_thread_unloads.push_back(
new Object::Ref<MediaComponentData>(texture_data)); new Object::Ref<AssetComponentData>(texture_data));
auto i_next = i; auto i_next = i;
i_next++; i_next++;
text_textures_.erase(i); text_textures_.erase(i);
@ -929,7 +930,7 @@ void Media::Prune(int level) {
} }
// prune textures // prune textures
assert(media_lists_locked_); assert(asset_lists_locked_);
for (auto i = qr_textures_.begin(); i != qr_textures_.end();) { for (auto i = qr_textures_.begin(); i != qr_textures_.end();) {
TextureData* texture_data = i->second.get(); TextureData* texture_data = i->second.get();
// attempt to prune if there are no references remaining except our own and // attempt to prune if there are no references remaining except our own and
@ -942,7 +943,7 @@ void Media::Prune(int level) {
// allocate a reference to keep this texture_data alive while the unload // allocate a reference to keep this texture_data alive while the unload
// is happening // is happening
graphics_thread_unloads.push_back( graphics_thread_unloads.push_back(
new Object::Ref<MediaComponentData>(texture_data)); new Object::Ref<AssetComponentData>(texture_data));
auto i_next = i; auto i_next = i;
i_next++; i_next++;
qr_textures_.erase(i); qr_textures_.erase(i);
@ -954,12 +955,12 @@ void Media::Prune(int level) {
} }
// prune models.. // prune models..
assert(media_lists_locked_); assert(asset_lists_locked_);
for (auto i = models_.begin(); i != models_.end();) { for (auto i = models_.begin(); i != models_.end();) {
ModelData* model_data = i->second.get(); ModelData* model_data = i->second.get();
// attempt to prune if there are no references remaining except our own and // attempt to prune if there are no references remaining except our own and
// its been a while since it was used // its been a while since it was used
if (current_time - model_data->last_used_time() > standard_media_prune_time if (current_time - model_data->last_used_time() > standard_asset_prune_time
&& (model_data->object_strong_ref_count() <= 1)) { && (model_data->object_strong_ref_count() <= 1)) {
// if its preloaded/loaded we need to ask the graphics thread to unload it // if its preloaded/loaded we need to ask the graphics thread to unload it
// first // first
@ -967,7 +968,7 @@ void Media::Prune(int level) {
// allocate a reference to keep this model_data alive while the unload // allocate a reference to keep this model_data alive while the unload
// is happening // is happening
graphics_thread_unloads.push_back( graphics_thread_unloads.push_back(
new Object::Ref<MediaComponentData>(model_data)); new Object::Ref<AssetComponentData>(model_data));
auto i_next = i; auto i_next = i;
i_next++; i_next++;
models_.erase(i); models_.erase(i);
@ -979,14 +980,14 @@ void Media::Prune(int level) {
} }
// Prune collide-models. // Prune collide-models.
assert(media_lists_locked_); assert(asset_lists_locked_);
for (auto i = collide_models_.begin(); i != collide_models_.end();) { for (auto i = collide_models_.begin(); i != collide_models_.end();) {
CollideModelData* collide_model_data = i->second.get(); CollideModelData* collide_model_data = i->second.get();
// attempt to prune if there are no references remaining except our own and // attempt to prune if there are no references remaining except our own and
// its been a while since it was used (unlike other media we never prune // its been a while since it was used (unlike other assets we never prune
// these if there's still references to them // these if there's still references to them
if (current_time - collide_model_data->last_used_time() if (current_time - collide_model_data->last_used_time()
> standard_media_prune_time > standard_asset_prune_time
&& (collide_model_data->object_strong_ref_count() <= 1)) { && (collide_model_data->object_strong_ref_count() <= 1)) {
// we can unload it immediately since that happens in the game thread... // we can unload it immediately since that happens in the game thread...
collide_model_data->Unload(); collide_model_data->Unload();
@ -1004,13 +1005,13 @@ void Media::Prune(int level) {
// sounds are still in active use by OpenAL and ensure references exist for // sounds are still in active use by OpenAL and ensure references exist for
// them somewhere while that is the case // them somewhere while that is the case
if (explicit_bool(false)) { if (explicit_bool(false)) {
assert(media_lists_locked_); assert(asset_lists_locked_);
for (auto i = sounds_.begin(); i != sounds_.end();) { for (auto i = sounds_.begin(); i != sounds_.end();) {
SoundData* sound_data = i->second.get(); SoundData* sound_data = i->second.get();
// Attempt to prune if there are no references remaining except our own // Attempt to prune if there are no references remaining except our own
// and its been a while since it was used. // and its been a while since it was used.
if (current_time - sound_data->last_used_time() if (current_time - sound_data->last_used_time()
> standard_media_prune_time > standard_asset_prune_time
&& (sound_data->object_strong_ref_count() <= 1)) { && (sound_data->object_strong_ref_count() <= 1)) {
// If its preloaded/loaded we need to ask the graphics thread to unload // If its preloaded/loaded we need to ask the graphics thread to unload
// it first. // it first.
@ -1018,7 +1019,7 @@ void Media::Prune(int level) {
// Allocate a reference to keep this sound_data alive while the unload // Allocate a reference to keep this sound_data alive while the unload
// is happening. // is happening.
audio_thread_unloads.push_back( audio_thread_unloads.push_back(
new Object::Ref<MediaComponentData>(sound_data)); new Object::Ref<AssetComponentData>(sound_data));
auto i_next = i; auto i_next = i;
i_next++; i_next++;
sounds_.erase(i); sounds_.erase(i);
@ -1038,7 +1039,7 @@ void Media::Prune(int level) {
} }
#if SHOW_PRUNING_INFO #if SHOW_PRUNING_INFO
assert(media_lists_locked_); assert(asset_lists_locked_);
if (textures_.size() != old_texture_count) { if (textures_.size() != old_texture_count) {
Log("Textures pruned from " + std::to_string(old_texture_count) + " to " Log("Textures pruned from " + std::to_string(old_texture_count) + " to "
+ std::to_string(textures_.size())); + std::to_string(textures_.size()));
@ -1066,7 +1067,7 @@ void Media::Prune(int level) {
#endif // SHOW_PRUNING_INFO #endif // SHOW_PRUNING_INFO
} }
auto Media::FindMediaFile(FileType type, const std::string& name) auto Assets::FindAssetFile(FileType type, const std::string& name)
-> std::string { -> std::string {
std::string file_out; std::string file_out;
@ -1136,9 +1137,9 @@ auto Media::FindMediaFile(FileType type, const std::string& name)
break; break;
} }
const std::vector<std::string>& media_paths_used = media_paths_; const std::vector<std::string>& asset_paths_used = asset_paths_;
for (auto&& i : media_paths_used) { for (auto&& i : asset_paths_used) {
struct BA_STAT stats {}; struct BA_STAT stats {};
file_out = i + "/" + prefix + name + ext; // NOLINT file_out = i + "/" + prefix + name + ext; // NOLINT
int result; int result;
@ -1163,26 +1164,26 @@ auto Media::FindMediaFile(FileType type, const std::string& name)
// We wanna fail gracefully for some types. // We wanna fail gracefully for some types.
if (type == FileType::kSound && name != "blank") { if (type == FileType::kSound && name != "blank") {
Log("Unable to load audio: '" + name + "'; trying fallback..."); Log("Unable to load audio: '" + name + "'; trying fallback...");
return FindMediaFile(type, "blank"); return FindAssetFile(type, "blank");
} else if (type == FileType::kTexture && name != "white") { } else if (type == FileType::kTexture && name != "white") {
Log("Unable to load texture: '" + name + "'; trying fallback..."); Log("Unable to load texture: '" + name + "'; trying fallback...");
return FindMediaFile(type, "white"); return FindAssetFile(type, "white");
} }
throw Exception("Can't find media: \"" + name + "\""); throw Exception("Can't find asset: \"" + name + "\"");
// return file_out; // return file_out;
} }
void Media::AddPendingLoad(Object::Ref<MediaComponentData>* c) { void Assets::AddPendingLoad(Object::Ref<AssetComponentData>* c) {
switch ((**c).GetMediaType()) { switch ((**c).GetAssetType()) {
case MediaType::kTexture: case AssetType::kTexture:
case MediaType::kModel: { case AssetType::kModel: {
// Tell the graphics thread there's pending loads... // Tell the graphics thread there's pending loads...
std::scoped_lock lock(pending_load_list_mutex_); std::scoped_lock lock(pending_load_list_mutex_);
pending_loads_graphics_.push_back(c); pending_loads_graphics_.push_back(c);
break; break;
} }
case MediaType::kSound: { case AssetType::kSound: {
// Tell the audio thread there's pending loads. // Tell the audio thread there's pending loads.
{ {
std::scoped_lock lock(pending_load_list_mutex_); std::scoped_lock lock(pending_load_list_mutex_);
@ -1203,7 +1204,7 @@ void Media::AddPendingLoad(Object::Ref<MediaComponentData>* c) {
} }
} }
void Media::ClearPendingLoadsDoneList() { void Assets::ClearPendingLoadsDoneList() {
assert(InLogicThread()); assert(InLogicThread());
std::scoped_lock lock(pending_load_list_mutex_); std::scoped_lock lock(pending_load_list_mutex_);
@ -1213,13 +1214,13 @@ void Media::ClearPendingLoadsDoneList() {
// We can now kill the reference knowing that it's safe for this component // We can now kill the reference knowing that it's safe for this component
// to die at any time (anyone needing it to be alive now should be holding a // to die at any time (anyone needing it to be alive now should be holding a
// reference themselves). // reference themselves).
for (Object::Ref<MediaComponentData>* i : pending_loads_done_) { for (Object::Ref<AssetComponentData>* i : pending_loads_done_) {
delete i; delete i;
} }
pending_loads_done_.clear(); pending_loads_done_.clear();
} }
void Media::AddPackage(const std::string& name, const std::string& path) { void Assets::AddPackage(const std::string& name, const std::string& path) {
// we don't protect package-path access so make sure its always from here.. // we don't protect package-path access so make sure its always from here..
assert(InLogicThread()); assert(InLogicThread());
#if BA_DEBUG_BUILD #if BA_DEBUG_BUILD
@ -1230,18 +1231,18 @@ void Media::AddPackage(const std::string& name, const std::string& path) {
packages_[name] = path; packages_[name] = path;
} }
Media::MediaListsLock::MediaListsLock() { Assets::AssetListLock::AssetListLock() {
BA_DEBUG_FUNCTION_TIMER_BEGIN(); BA_DEBUG_FUNCTION_TIMER_BEGIN();
g_media->media_lists_mutex_.lock(); g_assets->asset_lists_mutex_.lock();
assert(!g_media->media_lists_locked_); assert(!g_assets->asset_lists_locked_);
g_media->media_lists_locked_ = true; g_assets->asset_lists_locked_ = true;
BA_DEBUG_FUNCTION_TIMER_END_THREAD(20); BA_DEBUG_FUNCTION_TIMER_END_THREAD(20);
} }
Media::MediaListsLock::~MediaListsLock() { Assets::AssetListLock::~AssetListLock() {
assert(g_media->media_lists_locked_); assert(g_assets->asset_lists_locked_);
g_media->media_lists_locked_ = false; g_assets->asset_lists_locked_ = false;
g_media->media_lists_mutex_.unlock(); g_assets->asset_lists_mutex_.unlock();
} }
} // namespace ballistica } // namespace ballistica

View File

@ -1,7 +1,7 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_MEDIA_H_ #ifndef BALLISTICA_ASSETS_ASSETS_H_
#define BALLISTICA_MEDIA_MEDIA_H_ #define BALLISTICA_ASSETS_ASSETS_H_
#include <mutex> #include <mutex>
#include <string> #include <string>
@ -12,15 +12,15 @@
namespace ballistica { namespace ballistica {
/// Global media wrangling class. /// Global assets wrangling class.
class Media { class Assets {
public: public:
Media(); Assets();
/// Handy function to try to return a bit of media from a std::unordered_map /// Handy function to try to return an asset from a std::unordered_map
/// of weak-refs, loading/adding it if need be. /// of weak-refs, loading/adding it if need be.
template <typename T> template <typename T>
static auto GetMedia( static auto GetAsset(
std::unordered_map<std::string, Object::WeakRef<T> >* list, std::unordered_map<std::string, Object::WeakRef<T> >* list,
const std::string& name, Scene* scene) -> Object::Ref<T> { const std::string& name, Scene* scene) -> Object::Ref<T> {
assert(InLogicThread()); assert(InLogicThread());
@ -43,7 +43,7 @@ class Media {
auto AddPackage(const std::string& name, const std::string& path) -> void; auto AddPackage(const std::string& name, const std::string& path) -> void;
auto Prune(int level = 0) -> void; auto Prune(int level = 0) -> void;
/// Finish loading any media that has been preloaded but still needs to be /// Finish loading any assets that have been preloaded but still need to be
/// loaded by the proper thread. /// loaded by the proper thread.
auto RunPendingLoadsLogicThread() -> bool; auto RunPendingLoadsLogicThread() -> bool;
@ -58,9 +58,9 @@ class Media {
/// This function takes a newly allocated pointer which /// This function takes a newly allocated pointer which
/// is deleted once the load is completed. /// is deleted once the load is completed.
auto AddPendingLoad(Object::Ref<MediaComponentData>* c) -> void; auto AddPendingLoad(Object::Ref<AssetComponentData>* c) -> void;
enum class FileType { kModel, kCollisionModel, kTexture, kSound, kData }; enum class FileType { kModel, kCollisionModel, kTexture, kSound, kData };
auto FindMediaFile(FileType fileType, const std::string& file_in) auto FindAssetFile(FileType fileType, const std::string& file_in)
-> std::string; -> std::string;
/// Unload renderer-specific bits only (gl display lists, etc) - used when /// Unload renderer-specific bits only (gl display lists, etc) - used when
@ -68,8 +68,8 @@ class Media {
auto UnloadRendererBits(bool textures, bool models) -> void; auto UnloadRendererBits(bool textures, bool models) -> void;
/// Should be called from the game thread after UnloadRendererBits(); /// Should be called from the game thread after UnloadRendererBits();
/// kicks off bg loads for all existing unloaded media. /// kicks off bg loads for all existing unloaded assets.
auto MarkAllMediaForLoad() -> void; auto MarkAllAssetsForLoad() -> void;
auto PrintLoadInfo() -> void; auto PrintLoadInfo() -> void;
auto GetModelPendingLoadCount() -> int; auto GetModelPendingLoadCount() -> int;
@ -85,13 +85,13 @@ class Media {
auto GetPendingLoadCount() -> int; auto GetPendingLoadCount() -> int;
/// You must hold one of these locks while calling Get*Data() below. /// You must hold one of these locks while calling Get*Data() below.
class MediaListsLock { class AssetListLock {
public: public:
MediaListsLock(); AssetListLock();
~MediaListsLock(); ~AssetListLock();
}; };
/// Load/cache media (make sure you hold a MediaListsLock). /// Load/cache assets (make sure you hold a AssetListLock).
auto GetTextureData(const std::string& file_name) -> Object::Ref<TextureData>; auto GetTextureData(const std::string& file_name) -> Object::Ref<TextureData>;
auto GetTextureData(TextPacker* packer) -> Object::Ref<TextureData>; auto GetTextureData(TextPacker* packer) -> Object::Ref<TextureData>;
auto GetTextureDataQRCode(const std::string& file_name) auto GetTextureDataQRCode(const std::string& file_name)
@ -106,32 +106,32 @@ class Media {
// Get system assets. // Get system assets.
auto GetTexture(SystemTextureID id) -> TextureData* { auto GetTexture(SystemTextureID id) -> TextureData* {
BA_PRECONDITION_FATAL(system_media_loaded_); // Revert to assert later. BA_PRECONDITION_FATAL(system_assets_loaded_); // Revert to assert later.
assert(InLogicThread()); assert(InLogicThread());
assert(static_cast<size_t>(id) < system_textures_.size()); assert(static_cast<size_t>(id) < system_textures_.size());
return system_textures_[static_cast<int>(id)].get(); return system_textures_[static_cast<int>(id)].get();
} }
auto GetCubeMapTexture(SystemCubeMapTextureID id) -> TextureData* { auto GetCubeMapTexture(SystemCubeMapTextureID id) -> TextureData* {
BA_PRECONDITION_FATAL(system_media_loaded_); // Revert to assert later. BA_PRECONDITION_FATAL(system_assets_loaded_); // Revert to assert later.
assert(InLogicThread()); assert(InLogicThread());
assert(static_cast<size_t>(id) < system_cube_map_textures_.size()); assert(static_cast<size_t>(id) < system_cube_map_textures_.size());
return system_cube_map_textures_[static_cast<int>(id)].get(); return system_cube_map_textures_[static_cast<int>(id)].get();
} }
auto GetSound(SystemSoundID id) -> SoundData* { auto GetSound(SystemSoundID id) -> SoundData* {
BA_PRECONDITION_FATAL(system_media_loaded_); // Revert to assert later. BA_PRECONDITION_FATAL(system_assets_loaded_); // Revert to assert later.
assert(InLogicThread()); assert(InLogicThread());
assert(static_cast<size_t>(id) < system_sounds_.size()); assert(static_cast<size_t>(id) < system_sounds_.size());
return system_sounds_[static_cast<int>(id)].get(); return system_sounds_[static_cast<int>(id)].get();
} }
auto GetModel(SystemModelID id) -> ModelData* { auto GetModel(SystemModelID id) -> ModelData* {
BA_PRECONDITION_FATAL(system_media_loaded_); // Revert to assert later. BA_PRECONDITION_FATAL(system_assets_loaded_); // Revert to assert later.
assert(InLogicThread()); assert(InLogicThread());
assert(static_cast<size_t>(id) < system_models_.size()); assert(static_cast<size_t>(id) < system_models_.size());
return system_models_[static_cast<int>(id)].get(); return system_models_[static_cast<int>(id)].get();
} }
/// Load up hard-coded media for interface, etc. /// Load up hard-coded assets for interface, etc.
auto LoadSystemMedia() -> void; auto LoadSystemAssets() -> void;
auto total_model_count() const -> uint32_t { auto total_model_count() const -> uint32_t {
return static_cast<uint32_t>(models_.size()); return static_cast<uint32_t>(models_.size());
@ -148,7 +148,7 @@ class Media {
} }
private: private:
static auto MarkComponentForLoad(MediaComponentData* c) -> void; static auto MarkComponentForLoad(AssetComponentData* c) -> void;
auto LoadSystemTexture(SystemTextureID id, const char* name) -> void; auto LoadSystemTexture(SystemTextureID id, const char* name) -> void;
auto LoadSystemCubeMapTexture(SystemCubeMapTextureID id, const char* name) auto LoadSystemCubeMapTexture(SystemCubeMapTextureID id, const char* name)
-> void; -> void;
@ -158,7 +158,7 @@ class Media {
template <class T> template <class T>
auto GetComponentPendingLoadCount( auto GetComponentPendingLoadCount(
std::unordered_map<std::string, Object::Ref<T> >* t_list, MediaType type) std::unordered_map<std::string, Object::Ref<T> >* t_list, AssetType type)
-> int; -> int;
template <class T> template <class T>
@ -167,26 +167,26 @@ class Media {
std::unordered_map<std::string, Object::Ref<T> >* c_list) std::unordered_map<std::string, Object::Ref<T> >* c_list)
-> Object::Ref<T>; -> Object::Ref<T>;
std::vector<std::string> media_paths_; std::vector<std::string> asset_paths_;
bool have_pending_loads_[static_cast<int>(MediaType::kLast)]{}; bool have_pending_loads_[static_cast<int>(AssetType::kLast)]{};
std::unordered_map<std::string, std::string> packages_; std::unordered_map<std::string, std::string> packages_;
// For use by MediaListsLock; don't manually acquire // For use by AssetListLock; don't manually acquire
std::mutex media_lists_mutex_; std::mutex asset_lists_mutex_;
// Will be true while a MediaListsLock exists. Good to debug-verify this // Will be true while a AssetListLock exists. Good to debug-verify this
// during any media list access. // during any asset list access.
bool media_lists_locked_{}; bool asset_lists_locked_{};
// 'hard-wired' internal media // 'hard-wired' internal assets
bool system_media_loaded_{}; bool system_assets_loaded_{};
std::vector<Object::Ref<TextureData> > system_textures_; std::vector<Object::Ref<TextureData> > system_textures_;
std::vector<Object::Ref<TextureData> > system_cube_map_textures_; std::vector<Object::Ref<TextureData> > system_cube_map_textures_;
std::vector<Object::Ref<SoundData> > system_sounds_; std::vector<Object::Ref<SoundData> > system_sounds_;
std::vector<Object::Ref<DataData> > system_datas_; std::vector<Object::Ref<DataData> > system_datas_;
std::vector<Object::Ref<ModelData> > system_models_; std::vector<Object::Ref<ModelData> > system_models_;
// All existing media by filename (including internal). // All existing assets by filename (including internal).
std::unordered_map<std::string, Object::Ref<TextureData> > textures_; std::unordered_map<std::string, Object::Ref<TextureData> > textures_;
std::unordered_map<std::string, Object::Ref<TextureData> > text_textures_; std::unordered_map<std::string, Object::Ref<TextureData> > text_textures_;
std::unordered_map<std::string, Object::Ref<TextureData> > qr_textures_; std::unordered_map<std::string, Object::Ref<TextureData> > qr_textures_;
@ -198,13 +198,13 @@ class Media {
// Components that have been preloaded but need to be loaded. // Components that have been preloaded but need to be loaded.
std::mutex pending_load_list_mutex_; std::mutex pending_load_list_mutex_;
std::vector<Object::Ref<MediaComponentData>*> pending_loads_graphics_; std::vector<Object::Ref<AssetComponentData>*> pending_loads_graphics_;
std::vector<Object::Ref<MediaComponentData>*> pending_loads_sounds_; std::vector<Object::Ref<AssetComponentData>*> pending_loads_sounds_;
std::vector<Object::Ref<MediaComponentData>*> pending_loads_datas_; std::vector<Object::Ref<AssetComponentData>*> pending_loads_datas_;
std::vector<Object::Ref<MediaComponentData>*> pending_loads_other_; std::vector<Object::Ref<AssetComponentData>*> pending_loads_other_;
std::vector<Object::Ref<MediaComponentData>*> pending_loads_done_; std::vector<Object::Ref<AssetComponentData>*> pending_loads_done_;
}; };
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_MEDIA_H_ #endif // BALLISTICA_ASSETS_ASSETS_H_

View File

@ -1,34 +1,34 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/media_server.h" #include "ballistica/assets/assets_server.h"
#include "ballistica/assets/assets.h"
#include "ballistica/assets/data/asset_component_data.h"
#include "ballistica/core/thread.h" #include "ballistica/core/thread.h"
#include "ballistica/generic/huffman.h" #include "ballistica/generic/huffman.h"
#include "ballistica/generic/timer.h" #include "ballistica/generic/timer.h"
#include "ballistica/generic/utils.h" #include "ballistica/generic/utils.h"
#include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/graphics_server.h"
#include "ballistica/media/data/media_component_data.h"
#include "ballistica/media/media.h"
namespace ballistica { namespace ballistica {
MediaServer::MediaServer(Thread* thread) AssetsServer::AssetsServer(Thread* thread)
: thread_(thread), : thread_(thread),
writing_replay_(false), writing_replay_(false),
replay_message_bytes_(0), replay_message_bytes_(0),
replays_broken_(false), replays_broken_(false),
replay_out_file_(nullptr) { replay_out_file_(nullptr) {
assert(g_media_server == nullptr); assert(g_assets_server == nullptr);
g_media_server = this; g_assets_server = this;
// get our thread to give us periodic processing time... // get our thread to give us periodic processing time...
process_timer_ = this->thread()->NewTimer( process_timer_ = this->thread()->NewTimer(
1000, true, NewLambdaRunnable([this] { Process(); })); 1000, true, NewLambdaRunnable([this] { Process(); }));
} }
MediaServer::~MediaServer() = default; AssetsServer::~AssetsServer() = default;
void MediaServer::PushBeginWriteReplayCall() { void AssetsServer::PushBeginWriteReplayCall() {
thread()->PushCall([this] { thread()->PushCall([this] {
if (replays_broken_) { if (replays_broken_) {
return; return;
@ -37,7 +37,7 @@ void MediaServer::PushBeginWriteReplayCall() {
// we only allow writing one replay at once; make sure that's actually the // we only allow writing one replay at once; make sure that's actually the
// case // case
if (writing_replay_) { if (writing_replay_) {
Log("MediaServer got BeginWriteReplayCall while already writing"); Log("AssetsServer got BeginWriteReplayCall while already writing");
WriteReplayMessages(); WriteReplayMessages();
if (replay_out_file_) { if (replay_out_file_) {
fclose(replay_out_file_); fclose(replay_out_file_);
@ -75,11 +75,12 @@ void MediaServer::PushBeginWriteReplayCall() {
// trigger our process timer to go off immediately // trigger our process timer to go off immediately
// (we may need to wake it up) // (we may need to wake it up)
g_media_server->process_timer_->SetLength(0); g_assets_server->process_timer_->SetLength(0);
}); });
} }
void MediaServer::PushAddMessageToReplayCall(const std::vector<uint8_t>& data) { void AssetsServer::PushAddMessageToReplayCall(
const std::vector<uint8_t>& data) {
thread()->PushCall([this, data] { thread()->PushCall([this, data] {
if (replays_broken_) { if (replays_broken_) {
return; return;
@ -87,7 +88,7 @@ void MediaServer::PushAddMessageToReplayCall(const std::vector<uint8_t>& data) {
// sanity check.. // sanity check..
if (!writing_replay_) { if (!writing_replay_) {
Log("MediaServer got AddMessageToReplayCall while not writing replay"); Log("AssetsServer got AddMessageToReplayCall while not writing replay");
replays_broken_ = true; replays_broken_ = true;
return; return;
} }
@ -110,7 +111,7 @@ void MediaServer::PushAddMessageToReplayCall(const std::vector<uint8_t>& data) {
}); });
} }
void MediaServer::PushEndWriteReplayCall() { void AssetsServer::PushEndWriteReplayCall() {
thread()->PushCall([this] { thread()->PushCall([this] {
if (replays_broken_) { if (replays_broken_) {
return; return;
@ -134,7 +135,7 @@ void MediaServer::PushEndWriteReplayCall() {
}); });
} }
void MediaServer::WriteReplayMessages() { void AssetsServer::WriteReplayMessages() {
if (replay_out_file_) { if (replay_out_file_) {
for (auto&& i : replay_messages_) { for (auto&& i : replay_messages_) {
std::vector<uint8_t> data_compressed = g_utils->huffman()->compress(i); std::vector<uint8_t> data_compressed = g_utils->huffman()->compress(i);
@ -194,10 +195,10 @@ void MediaServer::WriteReplayMessages() {
} }
} }
void MediaServer::Process() { void AssetsServer::Process() {
// make sure we don't do any loading until we know what kind/quality of // make sure we don't do any loading until we know what kind/quality of
// textures we'll be loading // textures we'll be loading
if (!g_media || !g_graphics_server if (!g_assets || !g_graphics_server
|| !g_graphics_server->texture_compression_types_are_set() // NOLINT || !g_graphics_server->texture_compression_types_are_set() // NOLINT
|| !g_graphics_server->texture_quality_set()) { || !g_graphics_server->texture_quality_set()) {
return; return;
@ -209,12 +210,12 @@ void MediaServer::Process() {
if (!pending_preloads_.empty()) { if (!pending_preloads_.empty()) {
(**pending_preloads_.back()).Preload(); (**pending_preloads_.back()).Preload();
// pass the ref-pointer along to the load queue // pass the ref-pointer along to the load queue
g_media->AddPendingLoad(pending_preloads_.back()); g_assets->AddPendingLoad(pending_preloads_.back());
pending_preloads_.pop_back(); pending_preloads_.pop_back();
} else if (!pending_preloads_audio_.empty()) { } else if (!pending_preloads_audio_.empty()) {
(**pending_preloads_audio_.back()).Preload(); (**pending_preloads_audio_.back()).Preload();
// pass the ref-pointer along to the load queue // pass the ref-pointer along to the load queue
g_media->AddPendingLoad(pending_preloads_audio_.back()); g_assets->AddPendingLoad(pending_preloads_audio_.back());
pending_preloads_audio_.pop_back(); pending_preloads_audio_.pop_back();
} }

View File

@ -1,7 +1,7 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_MEDIA_SERVER_H_ #ifndef BALLISTICA_ASSETS_ASSETS_SERVER_H_
#define BALLISTICA_MEDIA_MEDIA_SERVER_H_ #define BALLISTICA_ASSETS_ASSETS_SERVER_H_
#include <list> #include <list>
#include <vector> #include <vector>
@ -10,10 +10,10 @@
namespace ballistica { namespace ballistica {
class MediaServer { class AssetsServer {
public: public:
explicit MediaServer(Thread* thread); explicit AssetsServer(Thread* thread);
~MediaServer(); ~AssetsServer();
void PushBeginWriteReplayCall(); void PushBeginWriteReplayCall();
void PushEndWriteReplayCall(); void PushEndWriteReplayCall();
void PushAddMessageToReplayCall(const std::vector<uint8_t>& data); void PushAddMessageToReplayCall(const std::vector<uint8_t>& data);
@ -30,12 +30,12 @@ class MediaServer {
std::list<std::vector<uint8_t> > replay_messages_; std::list<std::vector<uint8_t> > replay_messages_;
size_t replay_message_bytes_{}; size_t replay_message_bytes_{};
Timer* process_timer_{}; Timer* process_timer_{};
std::vector<Object::Ref<MediaComponentData>*> pending_preloads_; std::vector<Object::Ref<AssetComponentData>*> pending_preloads_;
std::vector<Object::Ref<MediaComponentData>*> pending_preloads_audio_; std::vector<Object::Ref<AssetComponentData>*> pending_preloads_audio_;
friend struct PreloadRunnable; friend struct PreloadRunnable;
friend class Media; friend class Assets;
}; };
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_MEDIA_SERVER_H_ #endif // BALLISTICA_ASSETS_ASSETS_SERVER_H_

View File

@ -1,16 +1,16 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/component/media_component.h" #include "ballistica/assets/component/asset_component.h"
#include "ballistica/python/python_sys.h" #include "ballistica/python/python_sys.h"
#include "ballistica/scene/scene.h" #include "ballistica/scene/scene.h"
namespace ballistica { namespace ballistica {
MediaComponent::MediaComponent(std::string name, Scene* scene) AssetComponent::AssetComponent(std::string name, Scene* scene)
: name_(std::move(name)), scene_(scene) {} : name_(std::move(name)), scene_(scene) {}
auto MediaComponent::GetPyRef(bool new_ref) -> PyObject* { auto AssetComponent::GetPyRef(bool new_ref) -> PyObject* {
if (!py_object_) { if (!py_object_) {
// if we have no python object, create it // if we have no python object, create it
py_object_ = CreatePyObject(); py_object_ = CreatePyObject();
@ -22,11 +22,11 @@ auto MediaComponent::GetPyRef(bool new_ref) -> PyObject* {
return py_object_; return py_object_;
} }
auto MediaComponent::GetObjectDescription() const -> std::string { auto AssetComponent::GetObjectDescription() const -> std::string {
return "<ballistica::" + GetMediaComponentTypeName() + " \"" + name() + "\">"; return "<ballistica::" + GetAssetComponentTypeName() + " \"" + name() + "\">";
} }
void MediaComponent::ClearPyObject() { void AssetComponent::ClearPyObject() {
assert(py_object_ != nullptr); assert(py_object_ != nullptr);
py_object_ = nullptr; py_object_ = nullptr;
} }

View File

@ -1,7 +1,7 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_COMPONENT_MEDIA_COMPONENT_H_ #ifndef BALLISTICA_ASSETS_COMPONENT_ASSET_COMPONENT_H_
#define BALLISTICA_MEDIA_COMPONENT_MEDIA_COMPONENT_H_ #define BALLISTICA_ASSETS_COMPONENT_ASSET_COMPONENT_H_
#include <string> #include <string>
@ -10,9 +10,9 @@
namespace ballistica { namespace ballistica {
class MediaComponent : public Object { class AssetComponent : public Object {
public: public:
MediaComponent(std::string name, Scene* scene); AssetComponent(std::string name, Scene* scene);
auto name() const -> std::string { return name_; } auto name() const -> std::string { return name_; }
// Returns true if this texture was created in the UI context. // Returns true if this texture was created in the UI context.
@ -41,7 +41,7 @@ class MediaComponent : public Object {
} }
protected: protected:
virtual auto GetMediaComponentTypeName() const -> std::string = 0; virtual auto GetAssetComponentTypeName() const -> std::string = 0;
// Create a python representation of this object. // Create a python representation of this object.
virtual auto CreatePyObject() -> PyObject* = 0; virtual auto CreatePyObject() -> PyObject* = 0;
@ -60,4 +60,4 @@ class MediaComponent : public Object {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_COMPONENT_MEDIA_COMPONENT_H_ #endif // BALLISTICA_ASSETS_COMPONENT_ASSET_COMPONENT_H_

View File

@ -1,6 +1,6 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/component/collide_model.h" #include "ballistica/assets/component/collide_model.h"
#include "ballistica/game/game_stream.h" #include "ballistica/game/game_stream.h"
#include "ballistica/python/class/python_class_collide_model.h" #include "ballistica/python/class/python_class_collide_model.h"
@ -9,7 +9,7 @@
namespace ballistica { namespace ballistica {
CollideModel::CollideModel(const std::string& name, Scene* scene) CollideModel::CollideModel(const std::string& name, Scene* scene)
: MediaComponent(name, scene), dead_(false) { : AssetComponent(name, scene), dead_(false) {
assert(InLogicThread()); assert(InLogicThread());
if (scene) { if (scene) {
if (GameStream* os = scene->GetGameStream()) { if (GameStream* os = scene->GetGameStream()) {
@ -17,8 +17,8 @@ CollideModel::CollideModel(const std::string& name, Scene* scene)
} }
} }
{ {
Media::MediaListsLock lock; Assets::AssetListLock lock;
collide_model_data_ = g_media->GetCollideModelData(name); collide_model_data_ = g_assets->GetCollideModelData(name);
} }
assert(collide_model_data_.exists()); assert(collide_model_data_.exists());
} }

View File

@ -1,18 +1,18 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_COMPONENT_COLLIDE_MODEL_H_ #ifndef BALLISTICA_ASSETS_COMPONENT_COLLIDE_MODEL_H_
#define BALLISTICA_MEDIA_COMPONENT_COLLIDE_MODEL_H_ #define BALLISTICA_ASSETS_COMPONENT_COLLIDE_MODEL_H_
#include <string> #include <string>
#include "ballistica/media/component/media_component.h" #include "ballistica/assets/assets.h"
#include "ballistica/media/data/collide_model_data.h" #include "ballistica/assets/component/asset_component.h"
#include "ballistica/media/media.h" #include "ballistica/assets/data/collide_model_data.h"
namespace ballistica { namespace ballistica {
// user-facing collide_model class // user-facing collide_model class
class CollideModel : public MediaComponent { class CollideModel : public AssetComponent {
public: public:
CollideModel(const std::string& name, Scene* scene); CollideModel(const std::string& name, Scene* scene);
~CollideModel() override; ~CollideModel() override;
@ -23,7 +23,7 @@ class CollideModel : public MediaComponent {
auto collide_model_data() const -> CollideModelData* { auto collide_model_data() const -> CollideModelData* {
return collide_model_data_.get(); return collide_model_data_.get();
} }
auto GetMediaComponentTypeName() const -> std::string override { auto GetAssetComponentTypeName() const -> std::string override {
return "CollideModel"; return "CollideModel";
} }
void MarkDead(); void MarkDead();
@ -38,4 +38,4 @@ class CollideModel : public MediaComponent {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_COMPONENT_COLLIDE_MODEL_H_ #endif // BALLISTICA_ASSETS_COMPONENT_COLLIDE_MODEL_H_

View File

@ -1,19 +1,19 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/component/cube_map_texture.h" #include "ballistica/assets/component/cube_map_texture.h"
#include "ballistica/media/media.h" #include "ballistica/assets/assets.h"
namespace ballistica { namespace ballistica {
CubeMapTexture::CubeMapTexture(const std::string& name, Scene* scene) CubeMapTexture::CubeMapTexture(const std::string& name, Scene* scene)
: MediaComponent(name, scene) { : AssetComponent(name, scene) {
assert(InLogicThread()); assert(InLogicThread());
// cant currently add these to scenes so nothing to do here.. // cant currently add these to scenes so nothing to do here..
{ {
Media::MediaListsLock lock; Assets::AssetListLock lock;
texture_data_ = g_media->GetCubeMapTextureData(name); texture_data_ = g_assets->GetCubeMapTextureData(name);
} }
assert(texture_data_.exists()); assert(texture_data_.exists());
} }

View File

@ -1,17 +1,17 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_COMPONENT_CUBE_MAP_TEXTURE_H_ #ifndef BALLISTICA_ASSETS_COMPONENT_CUBE_MAP_TEXTURE_H_
#define BALLISTICA_MEDIA_COMPONENT_CUBE_MAP_TEXTURE_H_ #define BALLISTICA_ASSETS_COMPONENT_CUBE_MAP_TEXTURE_H_
#include <string> #include <string>
#include "ballistica/media/component/media_component.h" #include "ballistica/assets/component/asset_component.h"
#include "ballistica/media/data/texture_data.h" #include "ballistica/assets/data/texture_data.h"
namespace ballistica { namespace ballistica {
// user-facing texture class // user-facing texture class
class CubeMapTexture : public MediaComponent { class CubeMapTexture : public AssetComponent {
public: public:
CubeMapTexture(const std::string& name, Scene* s); CubeMapTexture(const std::string& name, Scene* s);
@ -19,7 +19,7 @@ class CubeMapTexture : public MediaComponent {
// note that a texture's data can change over time as different // note that a texture's data can change over time as different
// versions are spooled in/out/etc // versions are spooled in/out/etc
auto GetTextureData() const -> TextureData* { return texture_data_.get(); } auto GetTextureData() const -> TextureData* { return texture_data_.get(); }
auto GetMediaComponentTypeName() const -> std::string override { auto GetAssetComponentTypeName() const -> std::string override {
return "CubeMapTexture"; return "CubeMapTexture";
} }
@ -29,4 +29,4 @@ class CubeMapTexture : public MediaComponent {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_COMPONENT_CUBE_MAP_TEXTURE_H_ #endif // BALLISTICA_ASSETS_COMPONENT_CUBE_MAP_TEXTURE_H_

View File

@ -1,6 +1,6 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/component/data.h" #include "ballistica/assets/component/data.h"
#include "ballistica/game/game_stream.h" #include "ballistica/game/game_stream.h"
#include "ballistica/python/class/python_class_data.h" #include "ballistica/python/class/python_class_data.h"
@ -9,7 +9,7 @@
namespace ballistica { namespace ballistica {
Data::Data(const std::string& name, Scene* scene) Data::Data(const std::string& name, Scene* scene)
: MediaComponent(name, scene), dead_(false) { : AssetComponent(name, scene), dead_(false) {
assert(InLogicThread()); assert(InLogicThread());
if (scene) { if (scene) {
@ -18,8 +18,8 @@ Data::Data(const std::string& name, Scene* scene)
} }
} }
{ {
Media::MediaListsLock lock; Assets::AssetListLock lock;
data_data_ = g_media->GetDataData(name); data_data_ = g_assets->GetDataData(name);
} }
assert(data_data_.exists()); assert(data_data_.exists());
} }

View File

@ -1,22 +1,22 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_COMPONENT_DATA_H_ #ifndef BALLISTICA_ASSETS_COMPONENT_DATA_H_
#define BALLISTICA_MEDIA_COMPONENT_DATA_H_ #define BALLISTICA_ASSETS_COMPONENT_DATA_H_
#include <string> #include <string>
#include <vector> #include <vector>
#include "ballistica/assets/assets.h"
#include "ballistica/assets/component/asset_component.h"
#include "ballistica/assets/data/asset_component_data.h"
#include "ballistica/assets/data/data_data.h"
#include "ballistica/ballistica.h" #include "ballistica/ballistica.h"
#include "ballistica/core/object.h" #include "ballistica/core/object.h"
#include "ballistica/media/component/media_component.h"
#include "ballistica/media/data/data_data.h"
#include "ballistica/media/data/media_component_data.h"
#include "ballistica/media/media.h"
namespace ballistica { namespace ballistica {
// user-facing data class // user-facing data class
class Data : public MediaComponent { class Data : public AssetComponent {
public: public:
Data(const std::string& name, Scene* scene); Data(const std::string& name, Scene* scene);
~Data() override; ~Data() override;
@ -25,7 +25,7 @@ class Data : public MediaComponent {
// note that a data's data can change over time as different // note that a data's data can change over time as different
// versions are spooled in/out/etc. // versions are spooled in/out/etc.
auto data_data() const -> DataData* { return data_data_.get(); } auto data_data() const -> DataData* { return data_data_.get(); }
auto GetMediaComponentTypeName() const -> std::string override { auto GetAssetComponentTypeName() const -> std::string override {
return "Data"; return "Data";
} }
void MarkDead(); void MarkDead();
@ -40,4 +40,4 @@ class Data : public MediaComponent {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_COMPONENT_DATA_H_ #endif // BALLISTICA_ASSETS_COMPONENT_DATA_H_

View File

@ -1,6 +1,6 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/component/model.h" #include "ballistica/assets/component/model.h"
#include "ballistica/game/game_stream.h" #include "ballistica/game/game_stream.h"
#include "ballistica/python/class/python_class_model.h" #include "ballistica/python/class/python_class_model.h"
@ -9,7 +9,7 @@
namespace ballistica { namespace ballistica {
Model::Model(const std::string& name, Scene* scene) Model::Model(const std::string& name, Scene* scene)
: MediaComponent(name, scene), dead_(false) { : AssetComponent(name, scene), dead_(false) {
assert(InLogicThread()); assert(InLogicThread());
if (scene) { if (scene) {
@ -18,8 +18,8 @@ Model::Model(const std::string& name, Scene* scene)
} }
} }
{ {
Media::MediaListsLock lock; Assets::AssetListLock lock;
model_data_ = g_media->GetModelData(name); model_data_ = g_assets->GetModelData(name);
} }
assert(model_data_.exists()); assert(model_data_.exists());
} }

View File

@ -1,23 +1,23 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_COMPONENT_MODEL_H_ #ifndef BALLISTICA_ASSETS_COMPONENT_MODEL_H_
#define BALLISTICA_MEDIA_COMPONENT_MODEL_H_ #define BALLISTICA_ASSETS_COMPONENT_MODEL_H_
#include <string> #include <string>
#include <vector> #include <vector>
#include "ballistica/assets/assets.h"
#include "ballistica/assets/component/asset_component.h"
#include "ballistica/assets/data/asset_component_data.h"
#include "ballistica/assets/data/model_data.h"
#include "ballistica/assets/data/model_renderer_data.h"
#include "ballistica/ballistica.h" #include "ballistica/ballistica.h"
#include "ballistica/core/object.h" #include "ballistica/core/object.h"
#include "ballistica/media/component/media_component.h"
#include "ballistica/media/data/media_component_data.h"
#include "ballistica/media/data/model_data.h"
#include "ballistica/media/data/model_renderer_data.h"
#include "ballistica/media/media.h"
namespace ballistica { namespace ballistica {
// user-facing model class // user-facing model class
class Model : public MediaComponent { class Model : public AssetComponent {
public: public:
Model(const std::string& name, Scene* scene); Model(const std::string& name, Scene* scene);
~Model() override; ~Model() override;
@ -26,7 +26,7 @@ class Model : public MediaComponent {
// note that a model's data can change over time as different // note that a model's data can change over time as different
// versions are spooled in/out/etc // versions are spooled in/out/etc
auto model_data() const -> ModelData* { return model_data_.get(); } auto model_data() const -> ModelData* { return model_data_.get(); }
auto GetMediaComponentTypeName() const -> std::string override { auto GetAssetComponentTypeName() const -> std::string override {
return "Model"; return "Model";
} }
void MarkDead(); void MarkDead();
@ -41,4 +41,4 @@ class Model : public MediaComponent {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_COMPONENT_MODEL_H_ #endif // BALLISTICA_ASSETS_COMPONENT_MODEL_H_

View File

@ -1,17 +1,17 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/component/sound.h" #include "ballistica/assets/component/sound.h"
#include "ballistica/assets/assets.h"
#include "ballistica/assets/data/sound_data.h"
#include "ballistica/game/game_stream.h" #include "ballistica/game/game_stream.h"
#include "ballistica/media/data/sound_data.h"
#include "ballistica/media/media.h"
#include "ballistica/python/class/python_class_sound.h" #include "ballistica/python/class/python_class_sound.h"
#include "ballistica/scene/scene.h" #include "ballistica/scene/scene.h"
namespace ballistica { namespace ballistica {
Sound::Sound(const std::string& name, Scene* scene) Sound::Sound(const std::string& name, Scene* scene)
: MediaComponent(name, scene) { : AssetComponent(name, scene) {
assert(InLogicThread()); assert(InLogicThread());
if (scene) { if (scene) {
if (GameStream* os = scene->GetGameStream()) { if (GameStream* os = scene->GetGameStream()) {
@ -19,8 +19,8 @@ Sound::Sound(const std::string& name, Scene* scene)
} }
} }
{ {
Media::MediaListsLock lock; Assets::AssetListLock lock;
sound_data_ = g_media->GetSoundData(name); sound_data_ = g_assets->GetSoundData(name);
} }
assert(sound_data_.exists()); assert(sound_data_.exists());
} }

View File

@ -1,16 +1,16 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_COMPONENT_SOUND_H_ #ifndef BALLISTICA_ASSETS_COMPONENT_SOUND_H_
#define BALLISTICA_MEDIA_COMPONENT_SOUND_H_ #define BALLISTICA_ASSETS_COMPONENT_SOUND_H_
#include <string> #include <string>
#include <vector> #include <vector>
#include "ballistica/media/component/media_component.h" #include "ballistica/assets/component/asset_component.h"
namespace ballistica { namespace ballistica {
class Sound : public MediaComponent { class Sound : public AssetComponent {
public: public:
Sound(const std::string& name, Scene* scene); Sound(const std::string& name, Scene* scene);
~Sound() override; ~Sound() override;
@ -19,7 +19,7 @@ class Sound : public MediaComponent {
// Note that a sound's data can change over time as different // Note that a sound's data can change over time as different
// versions are spooled in/out/etc. // versions are spooled in/out/etc.
auto GetSoundData() const -> SoundData* { return sound_data_.get(); } auto GetSoundData() const -> SoundData* { return sound_data_.get(); }
auto GetMediaComponentTypeName() const -> std::string override { auto GetAssetComponentTypeName() const -> std::string override {
return "Sound"; return "Sound";
} }
void MarkDead(); void MarkDead();
@ -34,4 +34,4 @@ class Sound : public MediaComponent {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_COMPONENT_SOUND_H_ #endif // BALLISTICA_ASSETS_COMPONENT_SOUND_H_

View File

@ -1,6 +1,6 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/component/texture.h" #include "ballistica/assets/component/texture.h"
#include "ballistica/game/game_stream.h" #include "ballistica/game/game_stream.h"
#include "ballistica/graphics/renderer.h" #include "ballistica/graphics/renderer.h"
@ -10,7 +10,7 @@
namespace ballistica { namespace ballistica {
Texture::Texture(const std::string& name, Scene* scene) Texture::Texture(const std::string& name, Scene* scene)
: MediaComponent(name, scene), dead_(false) { : AssetComponent(name, scene), dead_(false) {
assert(InLogicThread()); assert(InLogicThread());
// Add to the provided scene to get a numeric ID. // Add to the provided scene to get a numeric ID.
@ -20,18 +20,18 @@ Texture::Texture(const std::string& name, Scene* scene)
} }
} }
{ {
Media::MediaListsLock lock; Assets::AssetListLock lock;
texture_data_ = g_media->GetTextureData(name); texture_data_ = g_assets->GetTextureData(name);
} }
assert(texture_data_.exists()); assert(texture_data_.exists());
} }
// qrcode version // qrcode version
Texture::Texture(const std::string& qr_url) : MediaComponent(qr_url, nullptr) { Texture::Texture(const std::string& qr_url) : AssetComponent(qr_url, nullptr) {
assert(InLogicThread()); assert(InLogicThread());
{ {
Media::MediaListsLock lock; Assets::AssetListLock lock;
texture_data_ = g_media->GetTextureDataQRCode(qr_url); texture_data_ = g_assets->GetTextureDataQRCode(qr_url);
} }
assert(texture_data_.exists()); assert(texture_data_.exists());
} }

View File

@ -1,17 +1,17 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_COMPONENT_TEXTURE_H_ #ifndef BALLISTICA_ASSETS_COMPONENT_TEXTURE_H_
#define BALLISTICA_MEDIA_COMPONENT_TEXTURE_H_ #define BALLISTICA_ASSETS_COMPONENT_TEXTURE_H_
#include <string> #include <string>
#include "ballistica/media/component/media_component.h" #include "ballistica/assets/component/asset_component.h"
#include "ballistica/media/data/texture_data.h" #include "ballistica/assets/data/texture_data.h"
namespace ballistica { namespace ballistica {
// User-facing texture class. // User-facing texture class.
class Texture : public MediaComponent { class Texture : public AssetComponent {
public: public:
Texture(const std::string& name, Scene* scene); Texture(const std::string& name, Scene* scene);
explicit Texture(const std::string& qr_url); explicit Texture(const std::string& qr_url);
@ -21,7 +21,7 @@ class Texture : public MediaComponent {
// Note that a texture's data can change over time as different // Note that a texture's data can change over time as different
// versions are spooled in/out/etc. // versions are spooled in/out/etc.
auto texture_data() const -> TextureData* { return texture_data_.get(); } auto texture_data() const -> TextureData* { return texture_data_.get(); }
auto GetMediaComponentTypeName() const -> std::string override { auto GetAssetComponentTypeName() const -> std::string override {
return "Texture"; return "Texture";
} }
void MarkDead(); void MarkDead();
@ -36,4 +36,4 @@ class Texture : public MediaComponent {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_COMPONENT_TEXTURE_H_ #endif // BALLISTICA_ASSETS_COMPONENT_TEXTURE_H_

View File

@ -1,25 +1,25 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/data/media_component_data.h" #include "ballistica/assets/data/asset_component_data.h"
namespace ballistica { namespace ballistica {
MediaComponentData::MediaComponentData() { AssetComponentData::AssetComponentData() {
assert(InLogicThread()); assert(InLogicThread());
assert(g_media); assert(g_assets);
last_used_time_ = GetRealTime(); last_used_time_ = GetRealTime();
} }
MediaComponentData::~MediaComponentData() { AssetComponentData::~AssetComponentData() {
// at the moment whoever owns the last reference to us // at the moment whoever owns the last reference to us
// needs to make sure to unload us before we die.. // needs to make sure to unload us before we die..
// I feel like there should be a more elegant solution to that. // I feel like there should be a more elegant solution to that.
assert(g_media); assert(g_assets);
assert(!locked()); assert(!locked());
assert(!loaded()); assert(!loaded());
} }
void MediaComponentData::Preload(bool already_locked) { void AssetComponentData::Preload(bool already_locked) {
LockGuard lock(this, already_locked ? LockGuard::Type::kDontLock LockGuard lock(this, already_locked ? LockGuard::Type::kDontLock
: LockGuard::Type::kLock); : LockGuard::Type::kLock);
if (!preloaded_) { if (!preloaded_) {
@ -35,7 +35,7 @@ void MediaComponentData::Preload(bool already_locked) {
} }
} }
void MediaComponentData::Load(bool already_locked) { void AssetComponentData::Load(bool already_locked) {
LockGuard lock(this, already_locked ? LockGuard::Type::kDontLock LockGuard lock(this, already_locked ? LockGuard::Type::kDontLock
: LockGuard::Type::kLock); : LockGuard::Type::kLock);
if (!preloaded_) { if (!preloaded_) {
@ -57,7 +57,7 @@ void MediaComponentData::Load(bool already_locked) {
} }
} }
void MediaComponentData::Unload(bool already_locked) { void AssetComponentData::Unload(bool already_locked) {
LockGuard lock(this, already_locked ? LockGuard::Type::kDontLock LockGuard lock(this, already_locked ? LockGuard::Type::kDontLock
: LockGuard::Type::kLock); : LockGuard::Type::kLock);
@ -80,7 +80,7 @@ void MediaComponentData::Unload(bool already_locked) {
} }
} }
MediaComponentData::LockGuard::LockGuard(MediaComponentData* data, Type type) AssetComponentData::LockGuard::LockGuard(AssetComponentData* data, Type type)
: data_(data) { : data_(data) {
switch (type) { switch (type) {
case kLock: { case kLock: {
@ -100,7 +100,7 @@ MediaComponentData::LockGuard::LockGuard(MediaComponentData* data, Type type)
} }
} }
MediaComponentData::LockGuard::~LockGuard() { AssetComponentData::LockGuard::~LockGuard() {
if (holds_lock_) { if (holds_lock_) {
data_->Unlock(); data_->Unlock();
} }

View File

@ -1,7 +1,7 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_DATA_MEDIA_COMPONENT_DATA_H_ #ifndef BALLISTICA_ASSETS_DATA_ASSET_COMPONENT_DATA_H_
#define BALLISTICA_MEDIA_DATA_MEDIA_COMPONENT_DATA_H_ #define BALLISTICA_ASSETS_DATA_ASSET_COMPONENT_DATA_H_
#include <mutex> #include <mutex>
#include <string> #include <string>
@ -11,17 +11,17 @@
namespace ballistica { namespace ballistica {
/// Base class for loadable media components. /// Base class for loadable asset components.
class MediaComponentData : public Object { class AssetComponentData : public Object {
public: public:
MediaComponentData(); AssetComponentData();
~MediaComponentData() override; ~AssetComponentData() override;
void Preload(bool already_locked = false); void Preload(bool already_locked = false);
void Load(bool already_locked = false); void Load(bool already_locked = false);
void Unload(bool already_locked = false); void Unload(bool already_locked = false);
auto preloaded() const -> bool { return preloaded_; } auto preloaded() const -> bool { return preloaded_; }
auto loaded() const -> bool { return preloaded_ && loaded_; } auto loaded() const -> bool { return preloaded_ && loaded_; }
virtual auto GetMediaType() const -> MediaType = 0; virtual auto GetAssetType() const -> AssetType = 0;
// Return name or another identifier. For debugging purposes. // Return name or another identifier. For debugging purposes.
virtual auto GetName() const -> std::string { return "invalid"; } virtual auto GetName() const -> std::string { return "invalid"; }
@ -35,14 +35,14 @@ class MediaComponentData : public Object {
class LockGuard { class LockGuard {
public: public:
enum Type { kLock, kInheritLock, kDontLock }; enum Type { kLock, kInheritLock, kDontLock };
explicit LockGuard(MediaComponentData* data, Type type = kLock); explicit LockGuard(AssetComponentData* data, Type type = kLock);
~LockGuard(); ~LockGuard();
// Does this guard hold a lock? // Does this guard hold a lock?
auto holds_lock() const -> bool { return holds_lock_; } auto holds_lock() const -> bool { return holds_lock_; }
private: private:
MediaComponentData* data_ = nullptr; AssetComponentData* data_ = nullptr;
bool holds_lock_ = false; bool holds_lock_ = false;
}; };
@ -128,9 +128,9 @@ class MediaComponentData : public Object {
bool preloaded_ = false; bool preloaded_ = false;
bool loaded_ = false; bool loaded_ = false;
std::mutex mutex_; std::mutex mutex_;
BA_DISALLOW_CLASS_COPIES(MediaComponentData); BA_DISALLOW_CLASS_COPIES(AssetComponentData);
}; };
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_DATA_MEDIA_COMPONENT_DATA_H_ #endif // BALLISTICA_ASSETS_DATA_ASSET_COMPONENT_DATA_H_

View File

@ -1,15 +1,15 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/data/collide_model_data.h" #include "ballistica/assets/data/collide_model_data.h"
#include "ballistica/media/media.h" #include "ballistica/assets/assets.h"
namespace ballistica { namespace ballistica {
CollideModelData::CollideModelData(const std::string& file_name_in) CollideModelData::CollideModelData(const std::string& file_name_in)
: file_name_(file_name_in) { : file_name_(file_name_in) {
file_name_full_ = file_name_full_ =
g_media->FindMediaFile(Media::FileType::kCollisionModel, file_name_in); g_assets->FindAssetFile(Assets::FileType::kCollisionModel, file_name_in);
valid_ = true; valid_ = true;
} }

View File

@ -1,26 +1,26 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_DATA_COLLIDE_MODEL_DATA_H_ #ifndef BALLISTICA_ASSETS_DATA_COLLIDE_MODEL_DATA_H_
#define BALLISTICA_MEDIA_DATA_COLLIDE_MODEL_DATA_H_ #define BALLISTICA_ASSETS_DATA_COLLIDE_MODEL_DATA_H_
#include <string> #include <string>
#include <vector> #include <vector>
#include "ballistica/media/data/media_component_data.h" #include "ballistica/assets/data/asset_component_data.h"
#include "ode/ode.h" #include "ode/ode.h"
namespace ballistica { namespace ballistica {
// Loadable model for collision detection. // Loadable model for collision detection.
class CollideModelData : public MediaComponentData { class CollideModelData : public AssetComponentData {
public: public:
CollideModelData() = default; CollideModelData() = default;
explicit CollideModelData(const std::string& file_name_in); explicit CollideModelData(const std::string& file_name_in);
void DoPreload() override; void DoPreload() override;
void DoLoad() override; void DoLoad() override;
void DoUnload() override; void DoUnload() override;
auto GetMediaType() const -> MediaType override { auto GetAssetType() const -> AssetType override {
return MediaType::kCollideModel; return AssetType::kCollideModel;
} }
auto GetName() const -> std::string override { auto GetName() const -> std::string override {
if (!file_name_full_.empty()) { if (!file_name_full_.empty()) {
@ -44,4 +44,4 @@ class CollideModelData : public MediaComponentData {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_DATA_COLLIDE_MODEL_DATA_H_ #endif // BALLISTICA_ASSETS_DATA_COLLIDE_MODEL_DATA_H_

View File

@ -1,8 +1,8 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/data/data_data.h" #include "ballistica/assets/data/data_data.h"
#include "ballistica/media/media.h" #include "ballistica/assets/assets.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"
#include "ballistica/python/python_sys.h" #include "ballistica/python/python_sys.h"
@ -10,7 +10,7 @@ namespace ballistica {
DataData::DataData(const std::string& file_name_in) : file_name_(file_name_in) { DataData::DataData(const std::string& file_name_in) : file_name_(file_name_in) {
file_name_full_ = file_name_full_ =
g_media->FindMediaFile(Media::FileType::kData, file_name_in); g_assets->FindAssetFile(Assets::FileType::kData, file_name_in);
valid_ = true; valid_ = true;
} }

View File

@ -1,16 +1,16 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_DATA_DATA_DATA_H_ #ifndef BALLISTICA_ASSETS_DATA_DATA_DATA_H_
#define BALLISTICA_MEDIA_DATA_DATA_DATA_H_ #define BALLISTICA_ASSETS_DATA_DATA_DATA_H_
#include <string> #include <string>
#include "ballistica/media/data/media_component_data.h" #include "ballistica/assets/data/asset_component_data.h"
#include "ballistica/python/python_ref.h" #include "ballistica/python/python_ref.h"
namespace ballistica { namespace ballistica {
class DataData : public MediaComponentData { class DataData : public AssetComponentData {
public: public:
DataData() = default; DataData() = default;
explicit DataData(const std::string& file_name_in); explicit DataData(const std::string& file_name_in);
@ -19,7 +19,7 @@ class DataData : public MediaComponentData {
void DoLoad() override; void DoLoad() override;
void DoUnload() override; void DoUnload() override;
auto GetMediaType() const -> MediaType override { return MediaType::kData; } auto GetAssetType() const -> AssetType override { return AssetType::kData; }
auto GetName() const -> std::string override { auto GetName() const -> std::string override {
if (!file_name_full_.empty()) { if (!file_name_full_.empty()) {
return file_name_full_; return file_name_full_;
@ -44,4 +44,4 @@ class DataData : public MediaComponentData {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_DATA_DATA_DATA_H_ #endif // BALLISTICA_ASSETS_DATA_DATA_DATA_H_

View File

@ -1,6 +1,6 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/data/model_data.h" #include "ballistica/assets/data/model_data.h"
#include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/graphics_server.h"
#include "ballistica/graphics/renderer.h" #include "ballistica/graphics/renderer.h"
@ -10,7 +10,7 @@ namespace ballistica {
ModelData::ModelData(const std::string& file_name_in) ModelData::ModelData(const std::string& file_name_in)
: file_name_(file_name_in) { : file_name_(file_name_in) {
file_name_full_ = file_name_full_ =
g_media->FindMediaFile(Media::FileType::kModel, file_name_in); g_assets->FindAssetFile(Assets::FileType::kModel, file_name_in);
valid_ = true; valid_ = true;
} }

View File

@ -1,24 +1,24 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_DATA_MODEL_DATA_H_ #ifndef BALLISTICA_ASSETS_DATA_MODEL_DATA_H_
#define BALLISTICA_MEDIA_DATA_MODEL_DATA_H_ #define BALLISTICA_ASSETS_DATA_MODEL_DATA_H_
#include <string> #include <string>
#include <vector> #include <vector>
#include "ballistica/media/data/media_component_data.h" #include "ballistica/assets/data/asset_component_data.h"
#include "ballistica/media/data/model_renderer_data.h" #include "ballistica/assets/data/model_renderer_data.h"
namespace ballistica { namespace ballistica {
class ModelData : public MediaComponentData { class ModelData : public AssetComponentData {
public: public:
ModelData() = default; ModelData() = default;
explicit ModelData(const std::string& file_name_in); explicit ModelData(const std::string& file_name_in);
void DoPreload() override; void DoPreload() override;
void DoLoad() override; void DoLoad() override;
void DoUnload() override; void DoUnload() override;
auto GetMediaType() const -> MediaType override { return MediaType::kModel; } auto GetAssetType() const -> AssetType override { return AssetType::kModel; }
auto GetName() const -> std::string override { auto GetName() const -> std::string override {
if (!file_name_full_.empty()) { if (!file_name_full_.empty()) {
return file_name_full_; return file_name_full_;
@ -64,4 +64,4 @@ class ModelData : public MediaComponentData {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_DATA_MODEL_DATA_H_ #endif // BALLISTICA_ASSETS_DATA_MODEL_DATA_H_

View File

@ -1,7 +1,7 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_DATA_MODEL_RENDERER_DATA_H_ #ifndef BALLISTICA_ASSETS_DATA_MODEL_RENDERER_DATA_H_
#define BALLISTICA_MEDIA_DATA_MODEL_RENDERER_DATA_H_ #define BALLISTICA_ASSETS_DATA_MODEL_RENDERER_DATA_H_
#include "ballistica/core/object.h" #include "ballistica/core/object.h"
@ -18,4 +18,4 @@ class ModelRendererData : public Object {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_DATA_MODEL_RENDERER_DATA_H_ #endif // BALLISTICA_ASSETS_DATA_MODEL_RENDERER_DATA_H_

View File

@ -1,6 +1,6 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/data/sound_data.h" #include "ballistica/assets/data/sound_data.h"
#if BA_ENABLE_AUDIO #if BA_ENABLE_AUDIO
#if BA_USE_TREMOR_VORBIS #if BA_USE_TREMOR_VORBIS
@ -10,8 +10,8 @@
#endif #endif
#endif // BA_ENABLE_AUDIO #endif // BA_ENABLE_AUDIO
#include "ballistica/assets/assets.h"
#include "ballistica/audio/audio_server.h" #include "ballistica/audio/audio_server.h"
#include "ballistica/media/media.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"
// Need to move away from OpenAL on Apple stuff. // Need to move away from OpenAL on Apple stuff.
@ -248,7 +248,7 @@ SoundData::SoundData(const std::string& file_name_in)
#endif // BA_ENABLE_AUDIO #endif // BA_ENABLE_AUDIO
last_play_time_(0) { last_play_time_(0) {
file_name_full_ = file_name_full_ =
g_media->FindMediaFile(Media::FileType::kSound, file_name_in); g_assets->FindAssetFile(Assets::FileType::kSound, file_name_in);
valid_ = true; valid_ = true;
} }

View File

@ -1,17 +1,17 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_DATA_SOUND_DATA_H_ #ifndef BALLISTICA_ASSETS_DATA_SOUND_DATA_H_
#define BALLISTICA_MEDIA_DATA_SOUND_DATA_H_ #define BALLISTICA_ASSETS_DATA_SOUND_DATA_H_
#include <string> #include <string>
#include <vector> #include <vector>
#include "ballistica/assets/data/asset_component_data.h"
#include "ballistica/audio/al_sys.h" #include "ballistica/audio/al_sys.h"
#include "ballistica/media/data/media_component_data.h"
namespace ballistica { namespace ballistica {
class SoundData : public MediaComponentData { class SoundData : public AssetComponentData {
public: public:
SoundData() = default; SoundData() = default;
explicit SoundData(const std::string& file_name_in); explicit SoundData(const std::string& file_name_in);
@ -20,7 +20,7 @@ class SoundData : public MediaComponentData {
// FIXME: Should make sure the sound_data isn't in use before unloading it. // FIXME: Should make sure the sound_data isn't in use before unloading it.
void DoUnload() override; void DoUnload() override;
auto GetMediaType() const -> MediaType override { return MediaType::kSound; } auto GetAssetType() const -> AssetType override { return AssetType::kSound; }
auto GetName() const -> std::string override { auto GetName() const -> std::string override {
if (!file_name_full_.empty()) if (!file_name_full_.empty())
return file_name_full_; return file_name_full_;
@ -55,4 +55,4 @@ class SoundData : public MediaComponentData {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_DATA_SOUND_DATA_H_ #endif // BALLISTICA_ASSETS_DATA_SOUND_DATA_H_

View File

@ -1,7 +1,9 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/data/texture_data.h" #include "ballistica/assets/data/texture_data.h"
#include "ballistica/assets/data/texture_preload_data.h"
#include "ballistica/assets/data/texture_renderer_data.h"
#include "ballistica/graphics/graphics.h" #include "ballistica/graphics/graphics.h"
#include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/graphics_server.h"
#include "ballistica/graphics/renderer.h" #include "ballistica/graphics/renderer.h"
@ -9,8 +11,6 @@
#include "ballistica/graphics/texture/dds.h" #include "ballistica/graphics/texture/dds.h"
#include "ballistica/graphics/texture/ktx.h" #include "ballistica/graphics/texture/ktx.h"
#include "ballistica/graphics/texture/pvr.h" #include "ballistica/graphics/texture/pvr.h"
#include "ballistica/media/data/texture_preload_data.h"
#include "ballistica/media/data/texture_renderer_data.h"
#include "external/qr_code_generator/QrCode.hpp" #include "external/qr_code_generator/QrCode.hpp"
namespace ballistica { namespace ballistica {
@ -43,7 +43,8 @@ TextureData::TextureData() = default;
TextureData::TextureData(const std::string& file_in, TextureType type_in, TextureData::TextureData(const std::string& file_in, TextureType type_in,
TextureMinQuality min_quality_in) TextureMinQuality min_quality_in)
: file_name_(file_in), type_(type_in), min_quality_(min_quality_in) { : file_name_(file_in), type_(type_in), min_quality_(min_quality_in) {
file_name_full_ = g_media->FindMediaFile(Media::FileType::kTexture, file_in); file_name_full_ =
g_assets->FindAssetFile(Assets::FileType::kTexture, file_in);
valid_ = true; valid_ = true;
} }

View File

@ -1,17 +1,17 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_DATA_TEXTURE_DATA_H_ #ifndef BALLISTICA_ASSETS_DATA_TEXTURE_DATA_H_
#define BALLISTICA_MEDIA_DATA_TEXTURE_DATA_H_ #define BALLISTICA_ASSETS_DATA_TEXTURE_DATA_H_
#include <string> #include <string>
#include <vector> #include <vector>
#include "ballistica/media/data/media_component_data.h" #include "ballistica/assets/data/asset_component_data.h"
namespace ballistica { namespace ballistica {
// Loadable texture media component. // Loadable texture media component.
class TextureData : public MediaComponentData { class TextureData : public AssetComponentData {
public: public:
TextureData(); TextureData();
~TextureData() override; ~TextureData() override;
@ -28,8 +28,8 @@ class TextureData : public MediaComponentData {
auto GetNameFull() const -> std::string override { return file_name_full(); } auto GetNameFull() const -> std::string override { return file_name_full(); }
auto file_name() const -> const std::string& { return file_name_; } auto file_name() const -> const std::string& { return file_name_; }
auto file_name_full() const -> const std::string& { return file_name_full_; } auto file_name_full() const -> const std::string& { return file_name_full_; }
auto GetMediaType() const -> MediaType override { auto GetAssetType() const -> AssetType override {
return MediaType::kTexture; return AssetType::kTexture;
} }
void DoPreload() override; void DoPreload() override;
void DoLoad() override; void DoLoad() override;
@ -59,4 +59,4 @@ class TextureData : public MediaComponentData {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_DATA_TEXTURE_DATA_H_ #endif // BALLISTICA_ASSETS_DATA_TEXTURE_DATA_H_

View File

@ -1,13 +1,13 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/media/data/texture_preload_data.h" #include "ballistica/assets/data/texture_preload_data.h"
#if BA_OSTYPE_LINUX #if BA_OSTYPE_LINUX
#include <cstring> #include <cstring>
#endif #endif
#include "ballistica/assets/component/texture.h"
#include "ballistica/graphics/texture/ktx.h" #include "ballistica/graphics/texture/ktx.h"
#include "ballistica/media/component/texture.h"
namespace ballistica { namespace ballistica {

View File

@ -1,7 +1,7 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_DATA_TEXTURE_PRELOAD_DATA_H_ #ifndef BALLISTICA_ASSETS_DATA_TEXTURE_PRELOAD_DATA_H_
#define BALLISTICA_MEDIA_DATA_TEXTURE_PRELOAD_DATA_H_ #define BALLISTICA_ASSETS_DATA_TEXTURE_PRELOAD_DATA_H_
#include "ballistica/ballistica.h" #include "ballistica/ballistica.h"
@ -37,4 +37,4 @@ class TexturePreloadData {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_DATA_TEXTURE_PRELOAD_DATA_H_ #endif // BALLISTICA_ASSETS_DATA_TEXTURE_PRELOAD_DATA_H_

View File

@ -1,7 +1,7 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_MEDIA_DATA_TEXTURE_RENDERER_DATA_H_ #ifndef BALLISTICA_ASSETS_DATA_TEXTURE_RENDERER_DATA_H_
#define BALLISTICA_MEDIA_DATA_TEXTURE_RENDERER_DATA_H_ #define BALLISTICA_ASSETS_DATA_TEXTURE_RENDERER_DATA_H_
namespace ballistica { namespace ballistica {
@ -24,4 +24,4 @@ class TextureRendererData : public Object {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_MEDIA_DATA_TEXTURE_RENDERER_DATA_H_ #endif // BALLISTICA_ASSETS_DATA_TEXTURE_RENDERER_DATA_H_

View File

@ -2,10 +2,10 @@
#include "ballistica/audio/audio.h" #include "ballistica/audio/audio.h"
#include "ballistica/assets/data/sound_data.h"
#include "ballistica/audio/audio_server.h" #include "ballistica/audio/audio_server.h"
#include "ballistica/audio/audio_source.h" #include "ballistica/audio/audio_source.h"
#include "ballistica/core/thread.h" #include "ballistica/core/thread.h"
#include "ballistica/media/data/sound_data.h"
namespace ballistica { namespace ballistica {

View File

@ -3,6 +3,8 @@
#include "ballistica/audio/audio_server.h" #include "ballistica/audio/audio_server.h"
#include "ballistica/app/app.h" #include "ballistica/app/app.h"
#include "ballistica/assets/assets.h"
#include "ballistica/assets/data/sound_data.h"
#include "ballistica/audio/al_sys.h" #include "ballistica/audio/al_sys.h"
#include "ballistica/audio/audio.h" #include "ballistica/audio/audio.h"
#include "ballistica/audio/audio_source.h" #include "ballistica/audio/audio_source.h"
@ -12,8 +14,6 @@
#include "ballistica/game/game.h" #include "ballistica/game/game.h"
#include "ballistica/generic/timer.h" #include "ballistica/generic/timer.h"
#include "ballistica/math/vector3f.h" #include "ballistica/math/vector3f.h"
#include "ballistica/media/data/sound_data.h"
#include "ballistica/media/media.h"
// Need to move away from OpenAL on Apple stuff. // Need to move away from OpenAL on Apple stuff.
#if __clang__ #if __clang__
@ -601,7 +601,7 @@ void AudioServer::Process() {
// If we're paused we don't do nothin'. // If we're paused we don't do nothin'.
if (!paused_) { if (!paused_) {
// Do some loading... // Do some loading...
have_pending_loads_ = g_media->RunPendingAudioLoads(); have_pending_loads_ = g_assets->RunPendingAudioLoads();
// Keep that available-sources list filled. // Keep that available-sources list filled.
UpdateAvailableSources(); UpdateAvailableSources();
@ -666,7 +666,7 @@ void AudioServer::FadeSoundOut(uint32_t play_id, uint32_t time) {
std::make_pair(play_id, SoundFadeNode(play_id, time, true))); std::make_pair(play_id, SoundFadeNode(play_id, time, true)));
} }
void AudioServer::DeleteMediaComponent(MediaComponentData* c) { void AudioServer::DeleteAssetComponent(AssetComponentData* c) {
assert(InAudioThread()); assert(InAudioThread());
c->Unload(); c->Unload();
delete c; delete c;
@ -1033,7 +1033,7 @@ void AudioServer::ThreadSource::Stop() {
// to free up... // to free up...
// (we can't kill media-refs outside the main thread) // (we can't kill media-refs outside the main thread)
if (source_sound_) { if (source_sound_) {
assert(g_media); assert(g_assets);
g_audio_server->AddSoundRefDelete(source_sound_); g_audio_server->AddSoundRefDelete(source_sound_);
source_sound_ = nullptr; source_sound_ = nullptr;
} }
@ -1094,7 +1094,7 @@ void AudioServer::PushSetPausedCall(bool pause) {
} }
void AudioServer::PushComponentUnloadCall( void AudioServer::PushComponentUnloadCall(
const std::vector<Object::Ref<MediaComponentData>*>& components) { const std::vector<Object::Ref<AssetComponentData>*>& components) {
thread()->PushCall([this, components] { thread()->PushCall([this, components] {
// Unload all components we were passed... // Unload all components we were passed...
for (auto&& i : components) { for (auto&& i : components) {
@ -1102,7 +1102,7 @@ void AudioServer::PushComponentUnloadCall(
} }
// ...and then ship these pointers back to the game thread, so it can free // ...and then ship these pointers back to the game thread, so it can free
// the references. // the references.
g_game->PushFreeMediaComponentRefsCall(components); g_game->PushFreeAssetComponentRefsCall(components);
}); });
} }

View File

@ -37,7 +37,7 @@ class AudioServer {
void PushResetCall(); void PushResetCall();
void PushHavePendingLoadsCall(); void PushHavePendingLoadsCall();
void PushComponentUnloadCall( void PushComponentUnloadCall(
const std::vector<Object::Ref<MediaComponentData>*>& components); const std::vector<Object::Ref<AssetComponentData>*>& components);
/// For use by g_game_module(). /// For use by g_game_module().
void ClearSoundRefDeleteList(); void ClearSoundRefDeleteList();
@ -89,7 +89,7 @@ class AudioServer {
void Process(); void Process();
/// Send a component to the audio thread to delete. /// Send a component to the audio thread to delete.
void DeleteMediaComponent(MediaComponentData* c); void DeleteAssetComponent(AssetComponentData* c);
void UpdateTimerInterval(); void UpdateTimerInterval();
void UpdateAvailableSources(); void UpdateAvailableSources();

View File

@ -2,10 +2,10 @@
#include "ballistica/audio/audio_source.h" #include "ballistica/audio/audio_source.h"
#include "ballistica/assets/data/sound_data.h"
#include "ballistica/audio/audio.h" #include "ballistica/audio/audio.h"
#include "ballistica/audio/audio_server.h" #include "ballistica/audio/audio_server.h"
#include "ballistica/math/vector3f.h" #include "ballistica/math/vector3f.h"
#include "ballistica/media/data/sound_data.h"
namespace ballistica { namespace ballistica {

View File

@ -5,6 +5,8 @@
#include <map> #include <map>
#include "ballistica/app/app_flavor.h" #include "ballistica/app/app_flavor.h"
#include "ballistica/assets/assets.h"
#include "ballistica/assets/assets_server.h"
#include "ballistica/audio/audio_server.h" #include "ballistica/audio/audio_server.h"
#include "ballistica/core/fatal_error.h" #include "ballistica/core/fatal_error.h"
#include "ballistica/core/logging.h" #include "ballistica/core/logging.h"
@ -13,8 +15,6 @@
#include "ballistica/game/v1_account.h" #include "ballistica/game/v1_account.h"
#include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/graphics_server.h"
#include "ballistica/internal/app_internal.h" #include "ballistica/internal/app_internal.h"
#include "ballistica/media/media.h"
#include "ballistica/media/media_server.h"
#include "ballistica/networking/network_writer.h" #include "ballistica/networking/network_writer.h"
#include "ballistica/platform/platform.h" #include "ballistica/platform/platform.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"
@ -23,7 +23,7 @@
namespace ballistica { namespace ballistica {
// These are set automatically via script; don't modify them here. // These are set automatically via script; don't modify them here.
const int kAppBuildNumber = 20803; const int kAppBuildNumber = 20806;
const char* kAppVersion = "1.7.7"; const char* kAppVersion = "1.7.7";
// Our standalone globals. // Our standalone globals.
@ -45,8 +45,8 @@ Graphics* g_graphics{};
GraphicsServer* g_graphics_server{}; GraphicsServer* g_graphics_server{};
Input* g_input{}; Input* g_input{};
Thread* g_main_thread{}; Thread* g_main_thread{};
Media* g_media{}; Assets* g_assets{};
MediaServer* g_media_server{}; AssetsServer* g_assets_server{};
NetworkReader* g_network_reader{}; NetworkReader* g_network_reader{};
Networking* g_networking{}; Networking* g_networking{};
NetworkWriteModule* g_network_writer{}; NetworkWriteModule* g_network_writer{};
@ -65,12 +65,12 @@ Utils* g_utils{};
// This event kicks off an initial-screen-creation message sent to the // This event kicks off an initial-screen-creation message sent to the
// graphics-server thread. Other systems are informed that bootstrapping // graphics-server thread. Other systems are informed that bootstrapping
// is complete and that they are free to talk to each other. Initial // is complete and that they are free to talk to each other. Initial
// input-devices are added, media loads can begin (at least ones not // input-devices are added, asset loads can begin (at least ones not
// dependent on the screen/renderer), etc. // dependent on the screen/renderer), etc.
// 3: The initial screen is created on the graphics-server thread in response // 3: The initial screen is created on the graphics-server thread in response
// to the message sent from the game thread. A completion notice is sent // to the message sent from the game thread. A completion notice is sent
// back to the game thread when done. // back to the game thread when done.
// 4: Back on the game thread, any renderer-dependent media-loads/etc. can begin // 4: Back on the game thread, any renderer-dependent asset-loads/etc. can begin
// and lastly the initial game session is kicked off. // and lastly the initial game session is kicked off.
auto BallisticaMain(int argc, char** argv) -> int { auto BallisticaMain(int argc, char** argv) -> int {
@ -107,12 +107,12 @@ auto BallisticaMain(int argc, char** argv) -> int {
// Various other subsystems. // Various other subsystems.
g_v1_account = new V1Account(); g_v1_account = new V1Account();
g_utils = new Utils(); g_utils = new Utils();
g_media = new Media(); g_assets = new Assets();
Scene::Init(); Scene::Init();
// Spin up our other standard threads. // Spin up our other standard threads.
auto* media_thread{new Thread(ThreadIdentifier::kMedia)}; auto* assets_thread{new Thread(ThreadIdentifier::kAssets)};
g_app->pausable_threads.push_back(media_thread); g_app->pausable_threads.push_back(assets_thread);
auto* audio_thread{new Thread(ThreadIdentifier::kAudio)}; auto* audio_thread{new Thread(ThreadIdentifier::kAudio)};
g_app->pausable_threads.push_back(audio_thread); g_app->pausable_threads.push_back(audio_thread);
auto* logic_thread{new Thread(ThreadIdentifier::kLogic)}; auto* logic_thread{new Thread(ThreadIdentifier::kLogic)};
@ -126,8 +126,8 @@ auto BallisticaMain(int argc, char** argv) -> int {
network_write_thread->PushCallSynchronous([network_write_thread] { network_write_thread->PushCallSynchronous([network_write_thread] {
new NetworkWriteModule(network_write_thread); new NetworkWriteModule(network_write_thread);
}); });
media_thread->PushCallSynchronous( assets_thread->PushCallSynchronous(
[media_thread] { new MediaServer(media_thread); }); [assets_thread] { new AssetsServer(assets_thread); });
new GraphicsServer(g_main_thread); new GraphicsServer(g_main_thread);
audio_thread->PushCallSynchronous( audio_thread->PushCallSynchronous(
[audio_thread] { new AudioServer(audio_thread); }); [audio_thread] { new AudioServer(audio_thread); });
@ -277,8 +277,8 @@ auto InBGDynamicsThread() -> bool {
return (g_bg_dynamics_server && g_bg_dynamics_server->thread()->IsCurrent()); return (g_bg_dynamics_server && g_bg_dynamics_server->thread()->IsCurrent());
} }
auto InMediaThread() -> bool { auto InAssetsThread() -> bool {
return (g_media_server && g_media_server->thread()->IsCurrent()); return (g_assets_server && g_assets_server->thread()->IsCurrent());
} }
auto InNetworkWriteThread() -> bool { auto InNetworkWriteThread() -> bool {

View File

@ -118,8 +118,8 @@ extern Graphics* g_graphics;
extern GraphicsServer* g_graphics_server; extern GraphicsServer* g_graphics_server;
extern Input* g_input; extern Input* g_input;
extern Thread* g_main_thread; extern Thread* g_main_thread;
extern Media* g_media; extern Assets* g_assets;
extern MediaServer* g_media_server; extern AssetsServer* g_assets_server;
extern Networking* g_networking; extern Networking* g_networking;
extern NetworkReader* g_network_reader; extern NetworkReader* g_network_reader;
extern NetworkWriteModule* g_network_writer; extern NetworkWriteModule* g_network_writer;
@ -158,7 +158,7 @@ auto InGraphicsThread() -> bool; // (main and graphics are same currently)
auto InLogicThread() -> bool; auto InLogicThread() -> bool;
auto InAudioThread() -> bool; auto InAudioThread() -> bool;
auto InBGDynamicsThread() -> bool; auto InBGDynamicsThread() -> bool;
auto InMediaThread() -> bool; auto InAssetsThread() -> bool;
auto InNetworkWriteThread() -> bool; auto InNetworkWriteThread() -> bool;
/// Return a human-readable name for the current thread. /// Return a human-readable name for the current thread.

View File

@ -150,8 +150,8 @@ static auto GetCurrentThreadIdentifier() -> ThreadIdentifier {
return ThreadIdentifier::kAudio; return ThreadIdentifier::kAudio;
} else if (InNetworkWriteThread()) { } else if (InNetworkWriteThread()) {
return ThreadIdentifier::kNetworkWrite; return ThreadIdentifier::kNetworkWrite;
} else if (InMediaThread()) { } else if (InAssetsThread()) {
return ThreadIdentifier::kMedia; return ThreadIdentifier::kAssets;
} else if (InBGDynamicsThread()) { } else if (InBGDynamicsThread()) {
return ThreadIdentifier::kBGDynamics; return ThreadIdentifier::kBGDynamics;
} else { } else {
@ -209,9 +209,9 @@ auto Object::ObjectThreadCheck() -> void {
DO_FAIL("NetworkWrite"); DO_FAIL("NetworkWrite");
} }
break; break;
case ThreadIdentifier::kMedia: case ThreadIdentifier::kAssets:
if (!InMediaThread()) { if (!InAssetsThread()) {
DO_FAIL("Media"); DO_FAIL("Assets");
} }
break; break;
case ThreadIdentifier::kBGDynamics: case ThreadIdentifier::kBGDynamics:

View File

@ -59,7 +59,7 @@ auto Thread::RunStdInputThread(void* data) -> int {
return static_cast<Thread*>(data)->ThreadMain(); return static_cast<Thread*>(data)->ThreadMain();
} }
auto Thread::RunMediaThread(void* data) -> int { auto Thread::RunAssetsThread(void* data) -> int {
return static_cast<Thread*>(data)->ThreadMain(); return static_cast<Thread*>(data)->ThreadMain();
} }
@ -221,8 +221,8 @@ Thread::Thread(ThreadIdentifier identifier_in, ThreadType type_in)
case ThreadIdentifier::kLogic: case ThreadIdentifier::kLogic:
func = RunLogicThread; func = RunLogicThread;
break; break;
case ThreadIdentifier::kMedia: case ThreadIdentifier::kAssets:
func = RunMediaThread; func = RunAssetsThread;
break; break;
case ThreadIdentifier::kMain: case ThreadIdentifier::kMain:
// Shouldn't happen; this thread gets wrapped; not launched. // Shouldn't happen; this thread gets wrapped; not launched.
@ -288,9 +288,9 @@ auto Thread::ThreadMain() -> int {
name = "stdin"; name = "stdin";
id_string = "ballistica stdin"; id_string = "ballistica stdin";
break; break;
case ThreadIdentifier::kMedia: case ThreadIdentifier::kAssets:
name = "media"; name = "assets";
id_string = "ballistica media"; id_string = "ballistica assets";
break; break;
case ThreadIdentifier::kFileOut: case ThreadIdentifier::kFileOut:
name = "fileout"; name = "fileout";

View File

@ -152,7 +152,7 @@ class Thread {
static auto RunBGDynamicThread(void* data) -> int; static auto RunBGDynamicThread(void* data) -> int;
static auto RunNetworkWriteThread(void* data) -> int; static auto RunNetworkWriteThread(void* data) -> int;
static auto RunStdInputThread(void* data) -> int; static auto RunStdInputThread(void* data) -> int;
static auto RunMediaThread(void* data) -> int; static auto RunAssetsThread(void* data) -> int;
auto ThreadMain() -> int; auto ThreadMain() -> int;
auto GetThreadMessages(std::list<ThreadMessage>* messages) -> void; auto GetThreadMessages(std::list<ThreadMessage>* messages) -> void;

View File

@ -39,6 +39,7 @@ class AppConfig;
class App; class App;
class AppInternal; class AppInternal;
class AreaOfInterest; class AreaOfInterest;
class Assets;
class Audio; class Audio;
class AudioServer; class AudioServer;
class AudioStreamer; class AudioStreamer;
@ -102,9 +103,8 @@ class MaterialComponent;
class MaterialConditionNode; class MaterialConditionNode;
class MaterialContext; class MaterialContext;
class Matrix44f; class Matrix44f;
class Media; class AssetComponentData;
class MediaComponentData; class AssetsServer;
class MediaServer;
class MeshBufferBase; class MeshBufferBase;
class MeshBufferVertexSprite; class MeshBufferVertexSprite;
class MeshBufferVertexSimpleFull; class MeshBufferVertexSimpleFull;
@ -403,7 +403,7 @@ enum class SpecialChar {
kLast // Sentinel kLast // Sentinel
}; };
enum class MediaType { kTexture, kCollideModel, kModel, kSound, kData, kLast }; enum class AssetType { kTexture, kCollideModel, kModel, kSound, kData, kLast };
/// Python exception types we can raise from our own exceptions. /// Python exception types we can raise from our own exceptions.
enum class PyExcType { enum class PyExcType {
@ -999,7 +999,7 @@ enum class ThreadType {
enum class ThreadIdentifier { enum class ThreadIdentifier {
kInvalid, kInvalid,
kLogic, kLogic,
kMedia, kAssets,
kFileOut, kFileOut,
kMain, kMain,
kAudio, kAudio,

View File

@ -2,6 +2,7 @@
#include "ballistica/dynamics/bg/bg_dynamics.h" #include "ballistica/dynamics/bg/bg_dynamics.h"
#include "ballistica/assets/component/collide_model.h"
#include "ballistica/core/thread.h" #include "ballistica/core/thread.h"
#include "ballistica/dynamics/bg/bg_dynamics_draw_snapshot.h" #include "ballistica/dynamics/bg/bg_dynamics_draw_snapshot.h"
#include "ballistica/dynamics/bg/bg_dynamics_fuse_data.h" #include "ballistica/dynamics/bg/bg_dynamics_fuse_data.h"
@ -10,7 +11,6 @@
#include "ballistica/graphics/component/object_component.h" #include "ballistica/graphics/component/object_component.h"
#include "ballistica/graphics/component/smoke_component.h" #include "ballistica/graphics/component/smoke_component.h"
#include "ballistica/graphics/component/sprite_component.h" #include "ballistica/graphics/component/sprite_component.h"
#include "ballistica/media/component/collide_model.h"
namespace ballistica { namespace ballistica {
@ -188,7 +188,7 @@ void BGDynamics::Draw(FrameDef* frame_def) {
c.SetCameraAligned(true); c.SetCameraAligned(true);
c.SetColor(2.0f, 2.0f, 2.0f, 1.0f); c.SetColor(2.0f, 2.0f, 2.0f, 1.0f);
c.SetOverlay(draw_in_overlay); c.SetOverlay(draw_in_overlay);
c.SetTexture(g_media->GetTexture(SystemTextureID::kSparks)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kSparks));
c.DrawMesh(sparks_mesh_.get(), kModelDrawFlagNoReflection); c.DrawMesh(sparks_mesh_.get(), kModelDrawFlagNoReflection);
c.Submit(); c.Submit();
} }
@ -203,7 +203,7 @@ void BGDynamics::Draw(FrameDef* frame_def) {
lights_mesh_->SetData( lights_mesh_->SetData(
Object::Ref<MeshBuffer<VertexSprite>>(ds->light_vertices)); Object::Ref<MeshBuffer<VertexSprite>>(ds->light_vertices));
SpriteComponent c(frame_def->light_shadow_pass()); SpriteComponent c(frame_def->light_shadow_pass());
c.SetTexture(g_media->GetTexture(SystemTextureID::kLightSoft)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kLightSoft));
c.DrawMesh(lights_mesh_.get()); c.DrawMesh(lights_mesh_.get());
c.Submit(); c.Submit();
} }
@ -216,7 +216,7 @@ void BGDynamics::Draw(FrameDef* frame_def) {
shadows_mesh_->SetData( shadows_mesh_->SetData(
Object::Ref<MeshBuffer<VertexSprite>>(ds->shadow_vertices)); Object::Ref<MeshBuffer<VertexSprite>>(ds->shadow_vertices));
SpriteComponent c(frame_def->light_shadow_pass()); SpriteComponent c(frame_def->light_shadow_pass());
c.SetTexture(g_media->GetTexture(SystemTextureID::kLight)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kLight));
c.DrawMesh(shadows_mesh_.get()); c.DrawMesh(shadows_mesh_.get());
c.Submit(); c.Submit();
} }
@ -268,7 +268,7 @@ void BGDynamics::Draw(FrameDef* frame_def) {
Object::Ref<MeshBuffer<VertexSimpleFull>>(ds->fuse_vertices)); Object::Ref<MeshBuffer<VertexSimpleFull>>(ds->fuse_vertices));
{ // Draw! { // Draw!
ObjectComponent c(frame_def->beauty_pass()); ObjectComponent c(frame_def->beauty_pass());
c.SetTexture(g_media->GetTexture(SystemTextureID::kFuse)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kFuse));
c.DrawMesh(fuses_mesh_.get(), kModelDrawFlagNoReflection); c.DrawMesh(fuses_mesh_.get(), kModelDrawFlagNoReflection);
c.Submit(); c.Submit();
} }
@ -286,16 +286,16 @@ void BGDynamics::DrawChunks(FrameDef* frame_def,
ModelData* model; ModelData* model;
switch (chunk_type) { switch (chunk_type) {
case BGDynamicsChunkType::kFlagStand: case BGDynamicsChunkType::kFlagStand:
model = g_media->GetModel(SystemModelID::kFlagStand); model = g_assets->GetModel(SystemModelID::kFlagStand);
break; break;
case BGDynamicsChunkType::kSplinter: case BGDynamicsChunkType::kSplinter:
model = g_media->GetModel(SystemModelID::kShrapnelBoard); model = g_assets->GetModel(SystemModelID::kShrapnelBoard);
break; break;
case BGDynamicsChunkType::kSlime: case BGDynamicsChunkType::kSlime:
model = g_media->GetModel(SystemModelID::kShrapnelSlime); model = g_assets->GetModel(SystemModelID::kShrapnelSlime);
break; break;
default: default:
model = g_media->GetModel(SystemModelID::kShrapnel1); model = g_assets->GetModel(SystemModelID::kShrapnel1);
break; break;
} }
ObjectComponent c(frame_def->beauty_pass()); ObjectComponent c(frame_def->beauty_pass());
@ -303,20 +303,20 @@ void BGDynamics::DrawChunks(FrameDef* frame_def,
// Set up shading. // Set up shading.
switch (chunk_type) { switch (chunk_type) {
case BGDynamicsChunkType::kRock: { case BGDynamicsChunkType::kRock: {
c.SetTexture(g_media->GetTexture(SystemTextureID::kShrapnel1)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kShrapnel1));
c.SetReflection(ReflectionType::kSoft); c.SetReflection(ReflectionType::kSoft);
c.SetReflectionScale(0.2f, 0.2f, 0.2f); c.SetReflectionScale(0.2f, 0.2f, 0.2f);
c.SetColor(0.6f, 0.6f, 0.5f); c.SetColor(0.6f, 0.6f, 0.5f);
break; break;
} }
case BGDynamicsChunkType::kIce: { case BGDynamicsChunkType::kIce: {
c.SetTexture(g_media->GetTexture(SystemTextureID::kShrapnel1)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kShrapnel1));
c.SetReflection(ReflectionType::kSharp); c.SetReflection(ReflectionType::kSharp);
c.SetAddColor(0.5f, 0.5f, 0.9f); c.SetAddColor(0.5f, 0.5f, 0.9f);
break; break;
} }
case BGDynamicsChunkType::kSlime: { case BGDynamicsChunkType::kSlime: {
c.SetTexture(g_media->GetTexture(SystemTextureID::kShrapnel1)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kShrapnel1));
c.SetReflection(ReflectionType::kSharper); c.SetReflection(ReflectionType::kSharper);
c.SetReflectionScale(3.0f, 3.0f, 3.0f); c.SetReflectionScale(3.0f, 3.0f, 3.0f);
c.SetColor(0.0f, 0.0f, 0.0f); c.SetColor(0.0f, 0.0f, 0.0f);
@ -324,13 +324,13 @@ void BGDynamics::DrawChunks(FrameDef* frame_def,
break; break;
} }
case BGDynamicsChunkType::kMetal: { case BGDynamicsChunkType::kMetal: {
c.SetTexture(g_media->GetTexture(SystemTextureID::kShrapnel1)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kShrapnel1));
c.SetReflection(ReflectionType::kPowerup); c.SetReflection(ReflectionType::kPowerup);
c.SetColor(0.5f, 0.5f, 0.55f); c.SetColor(0.5f, 0.5f, 0.55f);
break; break;
} }
case BGDynamicsChunkType::kSpark: { case BGDynamicsChunkType::kSpark: {
c.SetTexture(g_media->GetTexture(SystemTextureID::kShrapnel1)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kShrapnel1));
c.SetReflection(ReflectionType::kSharp); c.SetReflection(ReflectionType::kSharp);
c.SetColor(0.0f, 0.0f, 0.0f, 1.0f); c.SetColor(0.0f, 0.0f, 0.0f, 1.0f);
c.SetReflectionScale(4.0f, 3.0f, 2.0f); c.SetReflectionScale(4.0f, 3.0f, 2.0f);
@ -338,7 +338,7 @@ void BGDynamics::DrawChunks(FrameDef* frame_def,
break; break;
} }
case BGDynamicsChunkType::kSplinter: { case BGDynamicsChunkType::kSplinter: {
c.SetTexture(g_media->GetTexture(SystemTextureID::kShrapnel1)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kShrapnel1));
c.SetReflection(ReflectionType::kSoft); c.SetReflection(ReflectionType::kSoft);
c.SetColor(1.0f, 0.8f, 0.5f); c.SetColor(1.0f, 0.8f, 0.5f);
break; break;
@ -347,7 +347,7 @@ void BGDynamics::DrawChunks(FrameDef* frame_def,
c.SetTransparent(true); c.SetTransparent(true);
c.SetPremultiplied(true); c.SetPremultiplied(true);
c.SetLightShadow(LightShadowType::kNone); c.SetLightShadow(LightShadowType::kNone);
c.SetTexture(g_media->GetTexture(SystemTextureID::kShrapnel1)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kShrapnel1));
c.SetReflection(ReflectionType::kSharp); c.SetReflection(ReflectionType::kSharp);
c.SetReflectionScale(0.5f, 0.4f, 0.3f); c.SetReflectionScale(0.5f, 0.4f, 0.3f);
c.SetColor(0.2f, 0.15f, 0.15f, 0.07f); c.SetColor(0.2f, 0.15f, 0.15f, 0.07f);
@ -355,7 +355,7 @@ void BGDynamics::DrawChunks(FrameDef* frame_def,
break; break;
} }
case BGDynamicsChunkType::kFlagStand: { case BGDynamicsChunkType::kFlagStand: {
c.SetTexture(g_media->GetTexture(SystemTextureID::kFlagPole)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kFlagPole));
c.SetReflection(ReflectionType::kSharp); c.SetReflection(ReflectionType::kSharp);
c.SetColor(0.9f, 0.6f, 0.3f, 1.0f); c.SetColor(0.9f, 0.6f, 0.3f, 1.0f);
break; break;

View File

@ -2,6 +2,7 @@
#include "ballistica/dynamics/bg/bg_dynamics_server.h" #include "ballistica/dynamics/bg/bg_dynamics_server.h"
#include "ballistica/assets/component/collide_model.h"
#include "ballistica/core/thread.h" #include "ballistica/core/thread.h"
#include "ballistica/dynamics/bg/bg_dynamics_draw_snapshot.h" #include "ballistica/dynamics/bg/bg_dynamics_draw_snapshot.h"
#include "ballistica/dynamics/bg/bg_dynamics_fuse_data.h" #include "ballistica/dynamics/bg/bg_dynamics_fuse_data.h"
@ -12,7 +13,6 @@
#include "ballistica/game/game.h" #include "ballistica/game/game.h"
#include "ballistica/generic/utils.h" #include "ballistica/generic/utils.h"
#include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/graphics_server.h"
#include "ballistica/media/component/collide_model.h"
namespace ballistica { namespace ballistica {

View File

@ -36,7 +36,7 @@ void CollisionCache::Draw(FrameDef* frame_def) {
c.Scale(x_max_ - x_min_, 1, z_max_ - z_min_); c.Scale(x_max_ - x_min_, 1, z_max_ - z_min_);
c.PushTransform(); c.PushTransform();
c.Scale(1, 0.01f, 1); c.Scale(1, 0.01f, 1);
c.DrawModel(g_media->GetModel(SystemModelID::kBox)); c.DrawModel(g_assets->GetModel(SystemModelID::kBox));
c.PopTransform(); c.PopTransform();
c.Translate(-0.5f + 0.5f * cell_width, 0, -0.5f + 0.5f * cell_height); c.Translate(-0.5f + 0.5f * cell_width, 0, -0.5f + 0.5f * cell_height);
for (int x = 0; x < grid_width_; x++) { for (int x = 0; x < grid_width_; x++) {
@ -53,7 +53,7 @@ void CollisionCache::Draw(FrameDef* frame_def) {
cells_[cell_index].height_confirmed_collide_, cells_[cell_index].height_confirmed_collide_,
static_cast<float>(z) / static_cast<float>(grid_height_)); static_cast<float>(z) / static_cast<float>(grid_height_));
c.Scale(0.95f * cell_width, 0.01f, 0.95f * cell_height); c.Scale(0.95f * cell_width, 0.01f, 0.95f * cell_height);
c.DrawModel(g_media->GetModel(SystemModelID::kBox)); c.DrawModel(g_assets->GetModel(SystemModelID::kBox));
c.PopTransform(); c.PopTransform();
if (glow_[cell_index]) { if (glow_[cell_index]) {
c.SetColor(1, 1, 1, 0.2f); c.SetColor(1, 1, 1, 0.2f);
@ -65,7 +65,7 @@ void CollisionCache::Draw(FrameDef* frame_def) {
cells_[cell_index].height_confirmed_empty_, cells_[cell_index].height_confirmed_empty_,
static_cast<float>(z) / static_cast<float>(grid_height_)); static_cast<float>(z) / static_cast<float>(grid_height_));
c.Scale(0.95f * cell_width, 0.01f, 0.95f * cell_height); c.Scale(0.95f * cell_width, 0.01f, 0.95f * cell_height);
c.DrawModel(g_media->GetModel(SystemModelID::kBox)); c.DrawModel(g_assets->GetModel(SystemModelID::kBox));
c.PopTransform(); c.PopTransform();
glow_[cell_index] = 0; glow_[cell_index] = 0;
} }
@ -84,7 +84,7 @@ void CollisionCache::Draw(FrameDef* frame_def) {
c2.Scale(x_max_ - x_min_, 1, z_max_ - z_min_); c2.Scale(x_max_ - x_min_, 1, z_max_ - z_min_);
c2.PushTransform(); c2.PushTransform();
c2.Scale(1, 0.01f, 1); c2.Scale(1, 0.01f, 1);
c2.DrawModel(g_media->GetModel(SystemModelID::kBox)); c2.DrawModel(g_assets->GetModel(SystemModelID::kBox));
c2.PopTransform(); c2.PopTransform();
c2.Translate(-0.5f + 0.5f * cell_width2, 0, -0.5f + 0.5f * cell_height2); c2.Translate(-0.5f + 0.5f * cell_width2, 0, -0.5f + 0.5f * cell_height2);
for (int x = 0; x < grid_width_; x++) { for (int x = 0; x < grid_width_; x++) {
@ -101,7 +101,7 @@ void CollisionCache::Draw(FrameDef* frame_def) {
cells_[cell_index].height_confirmed_empty_, cells_[cell_index].height_confirmed_empty_,
static_cast<float>(z) / static_cast<float>(grid_height_)); static_cast<float>(z) / static_cast<float>(grid_height_));
c2.Scale(0.95f * cell_width2, 0.01f, 0.95f * cell_height2); c2.Scale(0.95f * cell_width2, 0.01f, 0.95f * cell_height2);
c2.DrawModel(g_media->GetModel(SystemModelID::kBox)); c2.DrawModel(g_assets->GetModel(SystemModelID::kBox));
c2.PopTransform(); c2.PopTransform();
if (glow_[cell_index]) { if (glow_[cell_index]) {
c2.SetColor(1, 1, 1, 0.2f); c2.SetColor(1, 1, 1, 0.2f);
@ -113,7 +113,7 @@ void CollisionCache::Draw(FrameDef* frame_def) {
cells_[cell_index].height_confirmed_collide_, cells_[cell_index].height_confirmed_collide_,
static_cast<float>(z) / static_cast<float>(grid_height_)); static_cast<float>(z) / static_cast<float>(grid_height_));
c2.Scale(0.95f * cell_width2, 0.01f, 0.95f * cell_height2); c2.Scale(0.95f * cell_width2, 0.01f, 0.95f * cell_height2);
c2.DrawModel(g_media->GetModel(SystemModelID::kBox)); c2.DrawModel(g_assets->GetModel(SystemModelID::kBox));
c2.PopTransform(); c2.PopTransform();
glow_[cell_index] = 0; glow_[cell_index] = 0;

View File

@ -2,6 +2,7 @@
#include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/dynamics.h"
#include "ballistica/assets/component/sound.h"
#include "ballistica/audio/audio.h" #include "ballistica/audio/audio.h"
#include "ballistica/audio/audio_source.h" #include "ballistica/audio/audio_source.h"
#include "ballistica/dynamics/collision.h" #include "ballistica/dynamics/collision.h"
@ -9,7 +10,6 @@
#include "ballistica/dynamics/material/material_action.h" #include "ballistica/dynamics/material/material_action.h"
#include "ballistica/dynamics/part.h" #include "ballistica/dynamics/part.h"
#include "ballistica/graphics/renderer.h" #include "ballistica/graphics/renderer.h"
#include "ballistica/media/component/sound.h"
#include "ballistica/scene/scene.h" #include "ballistica/scene/scene.h"
#include "ode/ode_collision_kernel.h" #include "ode/ode_collision_kernel.h"
#include "ode/ode_collision_util.h" #include "ode/ode_collision_util.h"
@ -157,7 +157,7 @@ void Dynamics::Draw(FrameDef* frame_def) {
c.PushTransform(); c.PushTransform();
c.Translate(i.x(), i.y(), i.z()); c.Translate(i.x(), i.y(), i.z());
c.scaleUniform(0.05f); c.scaleUniform(0.05f);
c.DrawModel(g_media->GetModel(Media::BOX_MODEL)); c.DrawModel(g_assets->GetModel(Assets::BOX_MODEL));
c.PopTransform(); c.PopTransform();
} }
c.Submit(); c.Submit();

View File

@ -5,9 +5,9 @@
#include <vector> #include <vector>
#include "ballistica/assets/component/sound.h"
#include "ballistica/ballistica.h" #include "ballistica/ballistica.h"
#include "ballistica/dynamics/material/material_action.h" #include "ballistica/dynamics/material/material_action.h"
#include "ballistica/media/component/sound.h"
namespace ballistica { namespace ballistica {

View File

@ -2,10 +2,10 @@
#include "ballistica/dynamics/material/material_context.h" #include "ballistica/dynamics/material/material_context.h"
#include "ballistica/assets/component/sound.h"
#include "ballistica/audio/audio.h" #include "ballistica/audio/audio.h"
#include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/dynamics.h"
#include "ballistica/dynamics/material/material_action.h" #include "ballistica/dynamics/material/material_action.h"
#include "ballistica/media/component/sound.h"
#include "ballistica/scene/scene.h" #include "ballistica/scene/scene.h"
namespace ballistica { namespace ballistica {

View File

@ -2,13 +2,13 @@
#include "ballistica/dynamics/material/roll_sound_material_action.h" #include "ballistica/dynamics/material/roll_sound_material_action.h"
#include "ballistica/assets/component/sound.h"
#include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/dynamics.h"
#include "ballistica/dynamics/material/material_context.h" #include "ballistica/dynamics/material/material_context.h"
#include "ballistica/game/game_stream.h" #include "ballistica/game/game_stream.h"
#include "ballistica/game/session/client_session.h" #include "ballistica/game/session/client_session.h"
#include "ballistica/generic/utils.h" #include "ballistica/generic/utils.h"
#include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/graphics_server.h"
#include "ballistica/media/component/sound.h"
namespace ballistica { namespace ballistica {

View File

@ -3,9 +3,9 @@
#ifndef BALLISTICA_DYNAMICS_MATERIAL_ROLL_SOUND_MATERIAL_ACTION_H_ #ifndef BALLISTICA_DYNAMICS_MATERIAL_ROLL_SOUND_MATERIAL_ACTION_H_
#define BALLISTICA_DYNAMICS_MATERIAL_ROLL_SOUND_MATERIAL_ACTION_H_ #define BALLISTICA_DYNAMICS_MATERIAL_ROLL_SOUND_MATERIAL_ACTION_H_
#include "ballistica/assets/component/sound.h"
#include "ballistica/ballistica.h" #include "ballistica/ballistica.h"
#include "ballistica/dynamics/material/material_action.h" #include "ballistica/dynamics/material/material_action.h"
#include "ballistica/media/component/sound.h"
namespace ballistica { namespace ballistica {

View File

@ -3,9 +3,9 @@
#ifndef BALLISTICA_DYNAMICS_MATERIAL_SKID_SOUND_MATERIAL_ACTION_H_ #ifndef BALLISTICA_DYNAMICS_MATERIAL_SKID_SOUND_MATERIAL_ACTION_H_
#define BALLISTICA_DYNAMICS_MATERIAL_SKID_SOUND_MATERIAL_ACTION_H_ #define BALLISTICA_DYNAMICS_MATERIAL_SKID_SOUND_MATERIAL_ACTION_H_
#include "ballistica/assets/component/sound.h"
#include "ballistica/ballistica.h" #include "ballistica/ballistica.h"
#include "ballistica/dynamics/material/material_action.h" #include "ballistica/dynamics/material/material_action.h"
#include "ballistica/media/component/sound.h"
namespace ballistica { namespace ballistica {

View File

@ -3,9 +3,9 @@
#ifndef BALLISTICA_DYNAMICS_MATERIAL_SOUND_MATERIAL_ACTION_H_ #ifndef BALLISTICA_DYNAMICS_MATERIAL_SOUND_MATERIAL_ACTION_H_
#define BALLISTICA_DYNAMICS_MATERIAL_SOUND_MATERIAL_ACTION_H_ #define BALLISTICA_DYNAMICS_MATERIAL_SOUND_MATERIAL_ACTION_H_
#include "ballistica/assets/component/sound.h"
#include "ballistica/ballistica.h" #include "ballistica/ballistica.h"
#include "ballistica/dynamics/material/material_action.h" #include "ballistica/dynamics/material/material_action.h"
#include "ballistica/media/component/sound.h"
namespace ballistica { namespace ballistica {

View File

@ -2,11 +2,11 @@
#include "ballistica/dynamics/rigid_body.h" #include "ballistica/dynamics/rigid_body.h"
#include "ballistica/assets/component/collide_model.h"
#include "ballistica/dynamics/dynamics.h" #include "ballistica/dynamics/dynamics.h"
#include "ballistica/dynamics/part.h" #include "ballistica/dynamics/part.h"
#include "ballistica/generic/utils.h" #include "ballistica/generic/utils.h"
#include "ballistica/graphics/renderer.h" #include "ballistica/graphics/renderer.h"
#include "ballistica/media/component/collide_model.h"
#include "ballistica/scene/scene.h" #include "ballistica/scene/scene.h"
#include "ode/ode_collision_util.h" #include "ode/ode_collision_util.h"

View File

@ -2,6 +2,7 @@
#include "ballistica/game/connection/connection_to_client.h" #include "ballistica/game/connection/connection_to_client.h"
#include "ballistica/assets/assets.h"
#include "ballistica/audio/audio.h" #include "ballistica/audio/audio.h"
#include "ballistica/game/client_controller_interface.h" #include "ballistica/game/client_controller_interface.h"
#include "ballistica/game/connection/connection_set.h" #include "ballistica/game/connection/connection_set.h"
@ -11,7 +12,6 @@
#include "ballistica/generic/json.h" #include "ballistica/generic/json.h"
#include "ballistica/input/device/client_input_device.h" #include "ballistica/input/device/client_input_device.h"
#include "ballistica/internal/app_internal.h" #include "ballistica/internal/app_internal.h"
#include "ballistica/media/media.h"
#include "ballistica/networking/networking.h" #include "ballistica/networking/networking.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"
#include "ballistica/python/python_sys.h" #include "ballistica/python/python_sys.h"
@ -73,7 +73,7 @@ ConnectionToClient::~ConnectionToClient() {
std::string s = g_game->GetResourceString("playerLeftPartyText"); std::string s = g_game->GetResourceString("playerLeftPartyText");
Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString()); Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString());
ScreenMessage(s, {1, 0.5f, 0.0f}); ScreenMessage(s, {1, 0.5f, 0.0f});
g_audio->PlaySound(g_media->GetSound(SystemSoundID::kCorkPop)); g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kCorkPop));
} }
} }
@ -215,7 +215,7 @@ void ConnectionToClient::HandleGamePacket(const std::vector<uint8_t>& data) {
Utils::StringReplaceOne(&s, "${NAME}", Utils::StringReplaceOne(&s, "${NAME}",
peer_spec().GetDisplayString()); peer_spec().GetDisplayString());
ScreenMessage(s, {0.5f, 1, 0.5f}); ScreenMessage(s, {0.5f, 1, 0.5f});
g_audio->PlaySound(g_media->GetSound(SystemSoundID::kGunCock)); g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kGunCock));
} }
// Also mark the time for flashing the 'someone just joined your // Also mark the time for flashing the 'someone just joined your

View File

@ -2,6 +2,7 @@
#include "ballistica/game/connection/connection_to_host.h" #include "ballistica/game/connection/connection_to_host.h"
#include "ballistica/assets/assets.h"
#include "ballistica/audio/audio.h" #include "ballistica/audio/audio.h"
#include "ballistica/game/game.h" #include "ballistica/game/game.h"
#include "ballistica/game/session/net_client_session.h" #include "ballistica/game/session/net_client_session.h"
@ -10,7 +11,6 @@
#include "ballistica/input/input.h" #include "ballistica/input/input.h"
#include "ballistica/internal/app_internal.h" #include "ballistica/internal/app_internal.h"
#include "ballistica/math/vector3f.h" #include "ballistica/math/vector3f.h"
#include "ballistica/media/media.h"
#include "ballistica/networking/networking.h" #include "ballistica/networking/networking.h"
#include "ballistica/platform/platform.h" #include "ballistica/platform/platform.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"
@ -39,7 +39,7 @@ ConnectionToHost::~ConnectionToHost() {
Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString()); Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString());
} }
ScreenMessage(s, {1, 0.5f, 0.0f}); ScreenMessage(s, {1, 0.5f, 0.0f});
g_audio->PlaySound(g_media->GetSound(SystemSoundID::kCorkPop)); g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kCorkPop));
} else { } else {
ScreenMessage(g_game->GetResourceString("connectionRejectedText"), ScreenMessage(g_game->GetResourceString("connectionRejectedText"),
{1, 0, 0}); {1, 0, 0});
@ -376,7 +376,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector<uint8_t>& buffer) {
Utils::StringReplaceOne( Utils::StringReplaceOne(
&s, "${NAME}", PlayerSpec(str_buffer.data()).GetDisplayString()); &s, "${NAME}", PlayerSpec(str_buffer.data()).GetDisplayString());
ScreenMessage(s, {0.5f, 1.0f, 0.5f}); ScreenMessage(s, {0.5f, 1.0f, 0.5f});
g_audio->PlaySound(g_media->GetSound(SystemSoundID::kGunCock)); g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kGunCock));
} }
break; break;
} }
@ -391,7 +391,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector<uint8_t>& buffer) {
Utils::StringReplaceOne( Utils::StringReplaceOne(
&s, "${NAME}", PlayerSpec(&(str_buffer[0])).GetDisplayString()); &s, "${NAME}", PlayerSpec(&(str_buffer[0])).GetDisplayString());
ScreenMessage(s, {1, 0.5f, 0.0f}); ScreenMessage(s, {1, 0.5f, 0.0f});
g_audio->PlaySound(g_media->GetSound(SystemSoundID::kCorkPop)); g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kCorkPop));
} }
break; break;
} }
@ -486,7 +486,7 @@ void ConnectionToHost::HandleMessagePacket(const std::vector<uint8_t>& buffer) {
Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString()); Utils::StringReplaceOne(&s, "${NAME}", peer_spec().GetDisplayString());
} }
ScreenMessage(s, {0.5f, 1, 0.5f}); ScreenMessage(s, {0.5f, 1, 0.5f});
g_audio->PlaySound(g_media->GetSound(SystemSoundID::kGunCock)); g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kGunCock));
printed_connect_message_ = true; printed_connect_message_ = true;
} }

View File

@ -262,7 +262,7 @@ void Game::PushVRHandsState(const VRHandsState& state) {
void Game::PushMediaPruneCall(int level) { void Game::PushMediaPruneCall(int level) {
thread()->PushCall([level] { thread()->PushCall([level] {
assert(InLogicThread()); assert(InLogicThread());
g_media->Prune(level); g_assets->Prune(level);
}); });
} }
@ -288,7 +288,7 @@ void Game::InitialScreenCreated() {
// We can now let the media thread go to town pre-loading system media // We can now let the media thread go to town pre-loading system media
// while we wait. // while we wait.
g_media->LoadSystemMedia(); g_assets->LoadSystemAssets();
// FIXME: ideally we should create this as part of bootstrapping, but // FIXME: ideally we should create this as part of bootstrapping, but
// we need it to be possible to load textures/etc. before the renderer // we need it to be possible to load textures/etc. before the renderer
@ -315,7 +315,7 @@ void Game::InitialScreenCreated() {
RunAppLaunchCommands(); RunAppLaunchCommands();
} }
void Game::PruneMedia() { g_media->Prune(); } void Game::PruneMedia() { g_assets->Prune(); }
// Launch into main menu or whatever else. // Launch into main menu or whatever else.
void Game::RunAppLaunchCommands() { void Game::RunAppLaunchCommands() {
@ -1188,7 +1188,8 @@ void Game::ScoresToBeatResponse(bool success,
} }
void Game::PushPlaySoundCall(SystemSoundID sound) { void Game::PushPlaySoundCall(SystemSoundID sound) {
thread()->PushCall([sound] { g_audio->PlaySound(g_media->GetSound(sound)); }); thread()->PushCall(
[sound] { g_audio->PlaySound(g_assets->GetSound(sound)); });
} }
void Game::PushFriendScoreSetCall(const FriendScoreSet& score_set) { void Game::PushFriendScoreSetCall(const FriendScoreSet& score_set) {
@ -1214,7 +1215,7 @@ void Game::PushConfirmQuitCall() {
// this needs to be run in the UI context // this needs to be run in the UI context
ScopedSetContext cp(GetUIContextTarget()); ScopedSetContext cp(GetUIContextTarget());
g_audio->PlaySound(g_media->GetSound(SystemSoundID::kSwish)); g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kSwish));
g_python->obj(Python::ObjID::kQuitWindowCall).Call(); g_python->obj(Python::ObjID::kQuitWindowCall).Call();
// if we have a keyboard, give it UI ownership // if we have a keyboard, give it UI ownership
@ -1443,8 +1444,8 @@ void Game::PushRemoveGraphicsServerRenderHoldCall() {
}); });
} }
void Game::PushFreeMediaComponentRefsCall( void Game::PushFreeAssetComponentRefsCall(
const std::vector<Object::Ref<MediaComponentData>*>& components) { const std::vector<Object::Ref<AssetComponentData>*>& components) {
thread()->PushCall([components] { thread()->PushCall([components] {
for (auto&& i : components) { for (auto&& i : components) {
delete i; delete i;
@ -1453,7 +1454,7 @@ void Game::PushFreeMediaComponentRefsCall(
} }
void Game::PushHavePendingLoadsDoneCall() { void Game::PushHavePendingLoadsDoneCall() {
thread()->PushCall([] { g_media->ClearPendingLoadsDoneList(); }); thread()->PushCall([] { g_assets->ClearPendingLoadsDoneList(); });
} }
void Game::ToggleConsole() { void Game::ToggleConsole() {
@ -1548,7 +1549,7 @@ void Game::SetRealTimerLength(int timer_id, millisecs_t length) {
} }
void Game::Process() { void Game::Process() {
have_pending_loads_ = g_media->RunPendingLoadsLogicThread(); have_pending_loads_ = g_assets->RunPendingLoadsLogicThread();
UpdateProcessTimer(); UpdateProcessTimer();
} }
@ -1886,7 +1887,7 @@ void Game::LocalDisplayChatMessage(const std::vector<uint8_t>& buffer) {
g_python->HandleLocalChatMessage(final_message); g_python->HandleLocalChatMessage(final_message);
} }
if (!chat_muted_) { if (!chat_muted_) {
g_audio->PlaySound(g_media->GetSound(SystemSoundID::kTap)); g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kTap));
} }
} }
} }

View File

@ -61,8 +61,8 @@ class Game {
auto PushToggleDebugInfoDisplayCall() -> void; auto PushToggleDebugInfoDisplayCall() -> void;
auto PushToggleManualCameraCall() -> void; auto PushToggleManualCameraCall() -> void;
auto PushHavePendingLoadsDoneCall() -> void; auto PushHavePendingLoadsDoneCall() -> void;
auto PushFreeMediaComponentRefsCall( auto PushFreeAssetComponentRefsCall(
const std::vector<Object::Ref<MediaComponentData>*>& components) -> void; const std::vector<Object::Ref<AssetComponentData>*>& components) -> void;
auto PushHavePendingLoadsCall() -> void; auto PushHavePendingLoadsCall() -> void;
auto PushShutdownCall(bool soft) -> void; auto PushShutdownCall(bool soft) -> void;

View File

@ -3,6 +3,12 @@
#include "ballistica/game/game_stream.h" #include "ballistica/game/game_stream.h"
#include "ballistica/app/app.h" #include "ballistica/app/app.h"
#include "ballistica/assets/assets_server.h"
#include "ballistica/assets/component/collide_model.h"
#include "ballistica/assets/component/data.h"
#include "ballistica/assets/component/model.h"
#include "ballistica/assets/component/sound.h"
#include "ballistica/assets/component/texture.h"
#include "ballistica/dynamics/bg/bg_dynamics.h" #include "ballistica/dynamics/bg/bg_dynamics.h"
#include "ballistica/dynamics/material/material.h" #include "ballistica/dynamics/material/material.h"
#include "ballistica/dynamics/material/material_action.h" #include "ballistica/dynamics/material/material_action.h"
@ -12,12 +18,6 @@
#include "ballistica/game/connection/connection_set.h" #include "ballistica/game/connection/connection_set.h"
#include "ballistica/game/connection/connection_to_client.h" #include "ballistica/game/connection/connection_to_client.h"
#include "ballistica/game/session/host_session.h" #include "ballistica/game/session/host_session.h"
#include "ballistica/media/component/collide_model.h"
#include "ballistica/media/component/data.h"
#include "ballistica/media/component/model.h"
#include "ballistica/media/component/sound.h"
#include "ballistica/media/component/texture.h"
#include "ballistica/media/media_server.h"
#include "ballistica/networking/networking.h" #include "ballistica/networking/networking.h"
#include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_attribute.h"
#include "ballistica/scene/node/node_type.h" #include "ballistica/scene/node/node_type.h"
@ -37,8 +37,8 @@ GameStream::GameStream(HostSession* host_session, bool save_replay)
if (g_app->replay_open) { if (g_app->replay_open) {
Log("ERROR: g_replay_open true at replay start; shouldn't happen."); Log("ERROR: g_replay_open true at replay start; shouldn't happen.");
} }
assert(g_media_server); assert(g_assets_server);
g_media_server->PushBeginWriteReplayCall(); g_assets_server->PushBeginWriteReplayCall();
writing_replay_ = true; writing_replay_ = true;
g_app->replay_open = true; g_app->replay_open = true;
} }
@ -60,8 +60,8 @@ GameStream::~GameStream() {
Log("ERROR: g_replay_open false at replay close; shouldn't happen."); Log("ERROR: g_replay_open false at replay close; shouldn't happen.");
} }
g_app->replay_open = false; g_app->replay_open = false;
assert(g_media_server); assert(g_assets_server);
g_media_server->PushEndWriteReplayCall(); g_assets_server->PushEndWriteReplayCall();
writing_replay_ = false; writing_replay_ = false;
} }
@ -192,8 +192,8 @@ void GameStream::Fail() {
if (!g_app->replay_open) { if (!g_app->replay_open) {
Log("ERROR: g_replay_open false at replay close; shouldn't happen."); Log("ERROR: g_replay_open false at replay close; shouldn't happen.");
} }
assert(g_media_server); assert(g_assets_server);
g_media_server->PushEndWriteReplayCall(); g_assets_server->PushEndWriteReplayCall();
writing_replay_ = false; writing_replay_ = false;
g_app->replay_open = false; g_app->replay_open = false;
} }
@ -374,7 +374,7 @@ void GameStream::ShipSessionCommandsMessage() {
void GameStream::AddMessageToReplay(const std::vector<uint8_t>& message) { void GameStream::AddMessageToReplay(const std::vector<uint8_t>& message) {
assert(writing_replay_); assert(writing_replay_);
assert(g_media_server); assert(g_assets_server);
assert(!message.empty()); assert(!message.empty());
if (g_buildconfig.debug_build()) { if (g_buildconfig.debug_build()) {
@ -389,7 +389,7 @@ void GameStream::AddMessageToReplay(const std::vector<uint8_t>& message) {
} }
} }
g_media_server->PushAddMessageToReplayCall(message); g_assets_server->PushAddMessageToReplayCall(message);
} }
void GameStream::SendPhysicsCorrection(bool blend) { void GameStream::SendPhysicsCorrection(bool blend) {

View File

@ -2,6 +2,11 @@
#include "ballistica/game/host_activity.h" #include "ballistica/game/host_activity.h"
#include "ballistica/assets/component/collide_model.h"
#include "ballistica/assets/component/data.h"
#include "ballistica/assets/component/model.h"
#include "ballistica/assets/component/sound.h"
#include "ballistica/assets/component/texture.h"
#include "ballistica/dynamics/material/material.h" #include "ballistica/dynamics/material/material.h"
#include "ballistica/game/game_stream.h" #include "ballistica/game/game_stream.h"
#include "ballistica/game/player.h" #include "ballistica/game/player.h"
@ -9,11 +14,6 @@
#include "ballistica/generic/lambda_runnable.h" #include "ballistica/generic/lambda_runnable.h"
#include "ballistica/generic/timer.h" #include "ballistica/generic/timer.h"
#include "ballistica/input/device/input_device.h" #include "ballistica/input/device/input_device.h"
#include "ballistica/media/component/collide_model.h"
#include "ballistica/media/component/data.h"
#include "ballistica/media/component/model.h"
#include "ballistica/media/component/sound.h"
#include "ballistica/media/component/texture.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"
#include "ballistica/python/python_context_call.h" #include "ballistica/python/python_context_call.h"
#include "ballistica/python/python_sys.h" #include "ballistica/python/python_sys.h"
@ -183,28 +183,28 @@ auto HostActivity::GetTexture(const std::string& name) -> Object::Ref<Texture> {
if (shutting_down_) { if (shutting_down_) {
throw Exception("can't load assets during activity shutdown"); throw Exception("can't load assets during activity shutdown");
} }
return Media::GetMedia(&textures_, name, scene()); return Assets::GetAsset(&textures_, name, scene());
} }
auto HostActivity::GetSound(const std::string& name) -> Object::Ref<Sound> { auto HostActivity::GetSound(const std::string& name) -> Object::Ref<Sound> {
if (shutting_down_) { if (shutting_down_) {
throw Exception("can't load assets during activity shutdown"); throw Exception("can't load assets during activity shutdown");
} }
return Media::GetMedia(&sounds_, name, scene()); return Assets::GetAsset(&sounds_, name, scene());
} }
auto HostActivity::GetData(const std::string& name) -> Object::Ref<Data> { auto HostActivity::GetData(const std::string& name) -> Object::Ref<Data> {
if (shutting_down_) { if (shutting_down_) {
throw Exception("can't load assets during activity shutdown"); throw Exception("can't load assets during activity shutdown");
} }
return Media::GetMedia(&datas_, name, scene()); return Assets::GetAsset(&datas_, name, scene());
} }
auto HostActivity::GetModel(const std::string& name) -> Object::Ref<Model> { auto HostActivity::GetModel(const std::string& name) -> Object::Ref<Model> {
if (shutting_down_) { if (shutting_down_) {
throw Exception("can't load assets during activity shutdown"); throw Exception("can't load assets during activity shutdown");
} }
return Media::GetMedia(&models_, name, scene()); return Assets::GetAsset(&models_, name, scene());
} }
auto HostActivity::GetCollideModel(const std::string& name) auto HostActivity::GetCollideModel(const std::string& name)
@ -212,7 +212,7 @@ auto HostActivity::GetCollideModel(const std::string& name)
if (shutting_down_) { if (shutting_down_) {
throw Exception("can't load assets during activity shutdown"); throw Exception("can't load assets during activity shutdown");
} }
return Media::GetMedia(&collide_models_, name, scene()); return Assets::GetAsset(&collide_models_, name, scene());
} }
void HostActivity::SetPaused(bool val) { void HostActivity::SetPaused(bool val) {

View File

@ -3,6 +3,10 @@
#include "ballistica/game/session/client_session.h" #include "ballistica/game/session/client_session.h"
#include "ballistica/app/app.h" #include "ballistica/app/app.h"
#include "ballistica/assets/component/collide_model.h"
#include "ballistica/assets/component/model.h"
#include "ballistica/assets/component/sound.h"
#include "ballistica/assets/component/texture.h"
#include "ballistica/audio/audio.h" #include "ballistica/audio/audio.h"
#include "ballistica/dynamics/bg/bg_dynamics.h" #include "ballistica/dynamics/bg/bg_dynamics.h"
#include "ballistica/dynamics/material/material.h" #include "ballistica/dynamics/material/material.h"
@ -12,10 +16,6 @@
#include "ballistica/dynamics/rigid_body.h" #include "ballistica/dynamics/rigid_body.h"
#include "ballistica/game/game_stream.h" #include "ballistica/game/game_stream.h"
#include "ballistica/graphics/graphics.h" #include "ballistica/graphics/graphics.h"
#include "ballistica/media/component/collide_model.h"
#include "ballistica/media/component/model.h"
#include "ballistica/media/component/sound.h"
#include "ballistica/media/component/texture.h"
#include "ballistica/networking/networking.h" #include "ballistica/networking/networking.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"
#include "ballistica/scene/node/node_attribute.h" #include "ballistica/scene/node/node_attribute.h"

View File

@ -2,6 +2,10 @@
#include "ballistica/game/session/host_session.h" #include "ballistica/game/session/host_session.h"
#include "ballistica/assets/component/data.h"
#include "ballistica/assets/component/model.h"
#include "ballistica/assets/component/sound.h"
#include "ballistica/assets/component/texture.h"
#include "ballistica/game/game_stream.h" #include "ballistica/game/game_stream.h"
#include "ballistica/game/host_activity.h" #include "ballistica/game/host_activity.h"
#include "ballistica/game/player.h" #include "ballistica/game/player.h"
@ -9,10 +13,6 @@
#include "ballistica/generic/timer.h" #include "ballistica/generic/timer.h"
#include "ballistica/graphics/graphics.h" #include "ballistica/graphics/graphics.h"
#include "ballistica/input/device/input_device.h" #include "ballistica/input/device/input_device.h"
#include "ballistica/media/component/data.h"
#include "ballistica/media/component/model.h"
#include "ballistica/media/component/sound.h"
#include "ballistica/media/component/texture.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"
#include "ballistica/python/python_command.h" #include "ballistica/python/python_command.h"
#include "ballistica/python/python_context_call.h" #include "ballistica/python/python_context_call.h"
@ -206,27 +206,27 @@ auto HostSession::GetSound(const std::string& name) -> Object::Ref<Sound> {
if (shutting_down_) { if (shutting_down_) {
throw Exception("can't load assets during session shutdown"); throw Exception("can't load assets during session shutdown");
} }
return Media::GetMedia(&sounds_, name, scene()); return Assets::GetAsset(&sounds_, name, scene());
} }
auto HostSession::GetData(const std::string& name) -> Object::Ref<Data> { auto HostSession::GetData(const std::string& name) -> Object::Ref<Data> {
if (shutting_down_) { if (shutting_down_) {
throw Exception("can't load assets during session shutdown"); throw Exception("can't load assets during session shutdown");
} }
return Media::GetMedia(&datas_, name, scene()); return Assets::GetAsset(&datas_, name, scene());
} }
auto HostSession::GetTexture(const std::string& name) -> Object::Ref<Texture> { auto HostSession::GetTexture(const std::string& name) -> Object::Ref<Texture> {
if (shutting_down_) { if (shutting_down_) {
throw Exception("can't load assets during session shutdown"); throw Exception("can't load assets during session shutdown");
} }
return Media::GetMedia(&textures_, name, scene()); return Assets::GetAsset(&textures_, name, scene());
} }
auto HostSession::GetModel(const std::string& name) -> Object::Ref<Model> { auto HostSession::GetModel(const std::string& name) -> Object::Ref<Model> {
if (shutting_down_) { if (shutting_down_) {
throw Exception("can't load media during session shutdown"); throw Exception("can't load media during session shutdown");
} }
return Media::GetMedia(&models_, name, scene()); return Assets::GetAsset(&models_, name, scene());
} }
auto HostSession::GetForegroundContext() -> Context { auto HostSession::GetForegroundContext() -> Context {

View File

@ -3,10 +3,10 @@
#include "ballistica/game/session/net_client_session.h" #include "ballistica/game/session/net_client_session.h"
#include "ballistica/app/app.h" #include "ballistica/app/app.h"
#include "ballistica/assets/assets_server.h"
#include "ballistica/game/connection/connection_to_host.h" #include "ballistica/game/connection/connection_to_host.h"
#include "ballistica/graphics/graphics.h" #include "ballistica/graphics/graphics.h"
#include "ballistica/graphics/net_graph.h" #include "ballistica/graphics/net_graph.h"
#include "ballistica/media/media_server.h"
namespace ballistica { namespace ballistica {
@ -15,8 +15,8 @@ NetClientSession::NetClientSession() {
if (g_app->replay_open) { if (g_app->replay_open) {
Log("ERROR: g_replay_open true at netclient start; shouldn't happen."); Log("ERROR: g_replay_open true at netclient start; shouldn't happen.");
} }
assert(g_media_server); assert(g_assets_server);
g_media_server->PushBeginWriteReplayCall(); g_assets_server->PushBeginWriteReplayCall();
writing_replay_ = true; writing_replay_ = true;
g_app->replay_open = true; g_app->replay_open = true;
} }
@ -28,8 +28,8 @@ NetClientSession::~NetClientSession() {
Log("ERROR: g_replay_open false at net-client close; shouldn't happen."); Log("ERROR: g_replay_open false at net-client close; shouldn't happen.");
} }
g_app->replay_open = false; g_app->replay_open = false;
assert(g_media_server); assert(g_assets_server);
g_media_server->PushEndWriteReplayCall(); g_assets_server->PushEndWriteReplayCall();
writing_replay_ = false; writing_replay_ = false;
} }
} }
@ -192,8 +192,8 @@ void NetClientSession::HandleSessionMessage(
ClientSession::HandleSessionMessage(message); ClientSession::HandleSessionMessage(message);
if (writing_replay_) { if (writing_replay_) {
assert(g_media_server); assert(g_assets_server);
g_media_server->PushAddMessageToReplayCall(message); g_assets_server->PushAddMessageToReplayCall(message);
} }
} }

View File

@ -9,7 +9,7 @@ void ObjectComponent::WriteConfig() {
// This is not a common case and easier than forking all our shaders to // This is not a common case and easier than forking all our shaders to
// create non-textured versions. // create non-textured versions.
if (!texture_.exists()) { if (!texture_.exists()) {
texture_ = g_media->GetTexture(SystemTextureID::kWhite); texture_ = g_assets->GetTexture(SystemTextureID::kWhite);
} }
if (reflection_ == ReflectionType::kNone) { if (reflection_ == ReflectionType::kNone) {
assert(!double_sided_); // Unsupported combo. assert(!double_sided_); // Unsupported combo.
@ -58,7 +58,7 @@ void ObjectComponent::WriteConfig() {
cmd_buffer_->PutTexture(texture_); cmd_buffer_->PutTexture(texture_);
SystemCubeMapTextureID r = SystemCubeMapTextureID r =
Graphics::CubeMapFromReflectionType(reflection_); Graphics::CubeMapFromReflectionType(reflection_);
cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r));
} else { } else {
ConfigForShading(ShadingType::kObjectReflectTransparent); ConfigForShading(ShadingType::kObjectReflectTransparent);
cmd_buffer_->PutInt(premultiplied_); cmd_buffer_->PutInt(premultiplied_);
@ -68,7 +68,7 @@ void ObjectComponent::WriteConfig() {
cmd_buffer_->PutTexture(texture_); cmd_buffer_->PutTexture(texture_);
SystemCubeMapTextureID r = SystemCubeMapTextureID r =
Graphics::CubeMapFromReflectionType(reflection_); Graphics::CubeMapFromReflectionType(reflection_);
cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r));
} }
} else { } else {
ConfigForShading(ShadingType::kObjectReflect); ConfigForShading(ShadingType::kObjectReflect);
@ -79,7 +79,7 @@ void ObjectComponent::WriteConfig() {
cmd_buffer_->PutTexture(texture_); cmd_buffer_->PutTexture(texture_);
SystemCubeMapTextureID r = SystemCubeMapTextureID r =
Graphics::CubeMapFromReflectionType(reflection_); Graphics::CubeMapFromReflectionType(reflection_);
cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r));
} }
} else { } else {
// With add. // With add.
@ -100,7 +100,7 @@ void ObjectComponent::WriteConfig() {
cmd_buffer_->PutTexture(colorize_texture_); cmd_buffer_->PutTexture(colorize_texture_);
SystemCubeMapTextureID r = SystemCubeMapTextureID r =
Graphics::CubeMapFromReflectionType(reflection_); Graphics::CubeMapFromReflectionType(reflection_);
cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r));
} else { } else {
ConfigForShading(ShadingType::kObjectReflectLightShadowColorized); ConfigForShading(ShadingType::kObjectReflectLightShadowColorized);
cmd_buffer_->PutInt(static_cast<int>(light_shadow_)); cmd_buffer_->PutInt(static_cast<int>(light_shadow_));
@ -112,7 +112,7 @@ void ObjectComponent::WriteConfig() {
cmd_buffer_->PutTexture(colorize_texture_); cmd_buffer_->PutTexture(colorize_texture_);
SystemCubeMapTextureID r = SystemCubeMapTextureID r =
Graphics::CubeMapFromReflectionType(reflection_); Graphics::CubeMapFromReflectionType(reflection_);
cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r));
} }
} else { } else {
if (double_sided_) { if (double_sided_) {
@ -125,7 +125,7 @@ void ObjectComponent::WriteConfig() {
cmd_buffer_->PutTexture(texture_); cmd_buffer_->PutTexture(texture_);
SystemCubeMapTextureID r = SystemCubeMapTextureID r =
Graphics::CubeMapFromReflectionType(reflection_); Graphics::CubeMapFromReflectionType(reflection_);
cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r));
} else { } else {
ConfigForShading(ShadingType::kObjectReflectLightShadow); ConfigForShading(ShadingType::kObjectReflectLightShadow);
cmd_buffer_->PutInt(static_cast<int>(light_shadow_)); cmd_buffer_->PutInt(static_cast<int>(light_shadow_));
@ -136,7 +136,7 @@ void ObjectComponent::WriteConfig() {
cmd_buffer_->PutTexture(texture_); cmd_buffer_->PutTexture(texture_);
SystemCubeMapTextureID r = SystemCubeMapTextureID r =
Graphics::CubeMapFromReflectionType(reflection_); Graphics::CubeMapFromReflectionType(reflection_);
cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r));
} }
} }
} else { } else {
@ -157,7 +157,7 @@ void ObjectComponent::WriteConfig() {
cmd_buffer_->PutTexture(colorize_texture_); cmd_buffer_->PutTexture(colorize_texture_);
SystemCubeMapTextureID r = SystemCubeMapTextureID r =
Graphics::CubeMapFromReflectionType(reflection_); Graphics::CubeMapFromReflectionType(reflection_);
cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r));
} else { } else {
ConfigForShading( ConfigForShading(
ShadingType::kObjectReflectLightShadowAddColorized); ShadingType::kObjectReflectLightShadowAddColorized);
@ -171,7 +171,7 @@ void ObjectComponent::WriteConfig() {
cmd_buffer_->PutTexture(colorize_texture_); cmd_buffer_->PutTexture(colorize_texture_);
SystemCubeMapTextureID r = SystemCubeMapTextureID r =
Graphics::CubeMapFromReflectionType(reflection_); Graphics::CubeMapFromReflectionType(reflection_);
cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r));
} }
} else { } else {
ConfigForShading(ShadingType::kObjectReflectLightShadowAdd); ConfigForShading(ShadingType::kObjectReflectLightShadowAdd);
@ -183,7 +183,7 @@ void ObjectComponent::WriteConfig() {
cmd_buffer_->PutTexture(texture_); cmd_buffer_->PutTexture(texture_);
SystemCubeMapTextureID r = SystemCubeMapTextureID r =
Graphics::CubeMapFromReflectionType(reflection_); Graphics::CubeMapFromReflectionType(reflection_);
cmd_buffer_->PutCubeMapTexture(g_media->GetCubeMapTexture(r)); cmd_buffer_->PutCubeMapTexture(g_assets->GetCubeMapTexture(r));
} }
} }
} }

View File

@ -132,7 +132,7 @@ void SimpleComponent::WriteConfig() {
colorize_color2_g_, colorize_color2_b_); colorize_color2_g_, colorize_color2_b_);
cmd_buffer_->PutTexture(texture_); cmd_buffer_->PutTexture(texture_);
cmd_buffer_->PutTexture( cmd_buffer_->PutTexture(
g_media->GetTexture(SystemTextureID::kBlack)); g_assets->GetTexture(SystemTextureID::kBlack));
cmd_buffer_->PutTexture(mask_texture_); cmd_buffer_->PutTexture(mask_texture_);
} else { } else {
ConfigForShading( ConfigForShading(
@ -203,7 +203,8 @@ void SimpleComponent::WriteConfig() {
colorize_color_b_, colorize_color2_r_, colorize_color_b_, colorize_color2_r_,
colorize_color2_g_, colorize_color2_b_); colorize_color2_g_, colorize_color2_b_);
cmd_buffer_->PutTexture(texture_); cmd_buffer_->PutTexture(texture_);
cmd_buffer_->PutTexture(g_media->GetTexture(SystemTextureID::kBlack)); cmd_buffer_->PutTexture(
g_assets->GetTexture(SystemTextureID::kBlack));
cmd_buffer_->PutTexture(mask_texture_); cmd_buffer_->PutTexture(mask_texture_);
} else { } else {
// if no color was provided we can do a super-cheap version // if no color was provided we can do a super-cheap version

View File

@ -8,11 +8,11 @@ void SmokeComponent::WriteConfig() {
if (overlay_) { if (overlay_) {
ConfigForShading(ShadingType::kSmokeOverlay); ConfigForShading(ShadingType::kSmokeOverlay);
cmd_buffer_->PutFloats(color_r_, color_g_, color_b_, color_a_); cmd_buffer_->PutFloats(color_r_, color_g_, color_b_, color_a_);
cmd_buffer_->PutTexture(g_media->GetTexture(SystemTextureID::kSmoke)); cmd_buffer_->PutTexture(g_assets->GetTexture(SystemTextureID::kSmoke));
} else { } else {
ConfigForShading(ShadingType::kSmoke); ConfigForShading(ShadingType::kSmoke);
cmd_buffer_->PutFloats(color_r_, color_g_, color_b_, color_a_); cmd_buffer_->PutFloats(color_r_, color_g_, color_b_, color_a_);
cmd_buffer_->PutTexture(g_media->GetTexture(SystemTextureID::kSmoke)); cmd_buffer_->PutTexture(g_assets->GetTexture(SystemTextureID::kSmoke));
} }
} }

View File

@ -9,7 +9,7 @@ void SpriteComponent::WriteConfig() {
// this is not a common case and easier than forking all our shaders // this is not a common case and easier than forking all our shaders
// to create non-textured versions. // to create non-textured versions.
if (!texture_.exists()) { if (!texture_.exists()) {
texture_ = g_media->GetTexture(SystemTextureID::kWhite); texture_ = g_assets->GetTexture(SystemTextureID::kWhite);
} }
if (exponent_ == 1) { if (exponent_ == 1) {
ConfigForShading(ShadingType::kSprite); ConfigForShading(ShadingType::kSprite);

View File

@ -6,9 +6,9 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "ballistica/assets/data/asset_component_data.h"
#include "ballistica/math/matrix44f.h" #include "ballistica/math/matrix44f.h"
#include "ballistica/math/vector2f.h" #include "ballistica/math/vector2f.h"
#include "ballistica/media/data/media_component_data.h"
namespace ballistica { namespace ballistica {
@ -101,7 +101,7 @@ class FrameDef {
auto has_depth_texture() const -> bool { auto has_depth_texture() const -> bool {
return (quality_ >= GraphicsQuality::kHigh); return (quality_ >= GraphicsQuality::kHigh);
} }
void AddComponent(const Object::Ref<MediaComponentData>& component) { void AddComponent(const Object::Ref<AssetComponentData>& component) {
// Add a reference to this component only if we havn't yet. // Add a reference to this component only if we havn't yet.
if (component->last_frame_def_num() != frame_number_) { if (component->last_frame_def_num() != frame_number_) {
component->set_last_frame_def_num(frame_number_); component->set_last_frame_def_num(frame_number_);
@ -156,7 +156,7 @@ class FrameDef {
return mesh_index_sizes_; return mesh_index_sizes_;
} }
auto media_components() const auto media_components() const
-> const std::vector<Object::Ref<MediaComponentData>>& { -> const std::vector<Object::Ref<AssetComponentData>>& {
return media_components_; return media_components_;
} }
@ -189,7 +189,7 @@ class FrameDef {
std::vector<Object::Ref<MeshDataClientHandle>> meshes_; std::vector<Object::Ref<MeshDataClientHandle>> meshes_;
std::vector<Object::Ref<MeshBufferBase>> mesh_buffers_; std::vector<Object::Ref<MeshBufferBase>> mesh_buffers_;
std::vector<int8_t> mesh_index_sizes_; std::vector<int8_t> mesh_index_sizes_;
std::vector<Object::Ref<MediaComponentData>> media_components_; std::vector<Object::Ref<AssetComponentData>> media_components_;
#if BA_DEBUG_BUILD #if BA_DEBUG_BUILD
// Sanity checking: make sure components are completely submitted // Sanity checking: make sure components are completely submitted

View File

@ -3,11 +3,11 @@
#if BA_ENABLE_OPENGL #if BA_ENABLE_OPENGL
#include "ballistica/graphics/gl/renderer_gl.h" #include "ballistica/graphics/gl/renderer_gl.h"
#include "ballistica/assets/data/texture_preload_data.h"
#include "ballistica/assets/data/texture_renderer_data.h"
#include "ballistica/graphics/component/special_component.h" #include "ballistica/graphics/component/special_component.h"
#include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/graphics_server.h"
#include "ballistica/graphics/mesh/mesh_renderer_data.h" #include "ballistica/graphics/mesh/mesh_renderer_data.h"
#include "ballistica/media/data/texture_preload_data.h"
#include "ballistica/media/data/texture_renderer_data.h"
#if BA_OSTYPE_IOS_TVOS #if BA_OSTYPE_IOS_TVOS
#include "ballistica/platform/apple/apple_utils.h" #include "ballistica/platform/apple/apple_utils.h"

View File

@ -449,7 +449,7 @@ void Graphics::DrawMiscOverlays(RenderPass* pass) {
{ {
SimpleComponent c(pass); SimpleComponent c(pass);
c.SetTransparent(true); c.SetTransparent(true);
c.SetTexture(g_media->GetTexture(SystemTextureID::kSoftRectVertical)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kSoftRectVertical));
float screen_width = g_graphics->screen_virtual_width(); float screen_width = g_graphics->screen_virtual_width();
@ -533,7 +533,7 @@ void Graphics::DrawMiscOverlays(RenderPass* pass) {
// Align our bottom with where we just scaled from. // Align our bottom with where we just scaled from.
c.Translate(0, 0.5f, 0); c.Translate(0, 0.5f, 0);
} }
c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1));
c.PopTransform(); c.PopTransform();
v += scale * (36 + str_height); v += scale * (36 + str_height);
@ -690,14 +690,14 @@ void Graphics::DrawMiscOverlays(RenderPass* pass) {
c2.SetColorizeColor(i->tint.x, i->tint.y, i->tint.z); c2.SetColorizeColor(i->tint.x, i->tint.y, i->tint.z);
c2.SetColorizeColor2(i->tint2.x, i->tint2.y, i->tint2.z); c2.SetColorizeColor2(i->tint2.x, i->tint2.y, i->tint2.z);
c2.SetMaskTexture( c2.SetMaskTexture(
g_media->GetTexture(SystemTextureID::kCharacterIconMask)); g_assets->GetTexture(SystemTextureID::kCharacterIconMask));
} }
c2.SetColor(1, 1, 1, a); c2.SetColor(1, 1, 1, a);
c2.PushTransform(); c2.PushTransform();
c2.Translate(h - 14, v_base + 10 + i->v_smoothed, c2.Translate(h - 14, v_base + 10 + i->v_smoothed,
kScreenMessageZDepth); kScreenMessageZDepth);
c2.Scale(22.0f * s_extra, 22.0f * s_extra); c2.Scale(22.0f * s_extra, 22.0f * s_extra);
c2.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); c2.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1));
c2.PopTransform(); c2.PopTransform();
c2.Submit(); c2.Submit();
} }
@ -898,7 +898,7 @@ void Graphics::DrawLoadDot(RenderPass* pass) {
// Draw red if we've got graphics stuff loading. Green if only other stuff // Draw red if we've got graphics stuff loading. Green if only other stuff
// left. // left.
if (g_media->GetGraphicalPendingLoadCount() > 0) { if (g_assets->GetGraphicalPendingLoadCount() > 0) {
c.SetColor(0.2f, 0, 0, 1); c.SetColor(0.2f, 0, 0, 1);
} else { } else {
c.SetColor(0, 0.2f, 0, 1); c.SetColor(0, 0.2f, 0, 1);
@ -1076,7 +1076,7 @@ void Graphics::BuildAndPushFrameDef() {
} }
} }
if (g_media->GetPendingLoadCount() > 0) { if (g_assets->GetPendingLoadCount() > 0) {
DrawLoadDot(overlay_pass); DrawLoadDot(overlay_pass);
} }
@ -1124,7 +1124,7 @@ void Graphics::DrawBoxingGlovesTest(FrameDef* frame_def) {
c.Translate(0, 7, -3.3f); c.Translate(0, 7, -3.3f);
c.Scale(10, 10, 10); c.Scale(10, 10, 10);
c.Rotate(a, 0, 0, 1); c.Rotate(a, 0, 0, 1);
c.DrawModel(g_media->GetModel(SystemModelID::kBoxingGlove)); c.DrawModel(g_assets->GetModel(SystemModelID::kBoxingGlove));
c.PopTransform(); c.PopTransform();
c.Submit(); c.Submit();
} }
@ -1132,14 +1132,14 @@ void Graphics::DrawBoxingGlovesTest(FrameDef* frame_def) {
// Beauty. // Beauty.
if (explicit_bool(false)) { if (explicit_bool(false)) {
ObjectComponent c(frame_def->beauty_pass()); ObjectComponent c(frame_def->beauty_pass());
c.SetTexture(g_media->GetTexture(SystemTextureID::kBoxingGlove)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kBoxingGlove));
c.SetReflection(ReflectionType::kSoft); c.SetReflection(ReflectionType::kSoft);
c.SetReflectionScale(0.4f, 0.4f, 0.4f); c.SetReflectionScale(0.4f, 0.4f, 0.4f);
c.PushTransform(); c.PushTransform();
c.Translate(0.0f, 3.7f, -3.3f); c.Translate(0.0f, 3.7f, -3.3f);
c.Scale(10.0f, 10.0f, 10.0f); c.Scale(10.0f, 10.0f, 10.0f);
c.Rotate(a, 0.0f, 0.0f, 1.0f); c.Rotate(a, 0.0f, 0.0f, 1.0f);
c.DrawModel(g_media->GetModel(SystemModelID::kBoxingGlove)); c.DrawModel(g_assets->GetModel(SystemModelID::kBoxingGlove));
c.PopTransform(); c.PopTransform();
c.Submit(); c.Submit();
} }
@ -1153,7 +1153,7 @@ void Graphics::DrawBoxingGlovesTest(FrameDef* frame_def) {
c.Translate(0.0f, 3.7f, -3.3f); c.Translate(0.0f, 3.7f, -3.3f);
c.Scale(10.0f, 10.0f, 10.0f); c.Scale(10.0f, 10.0f, 10.0f);
c.Rotate(a, 0.0f, 0.0f, 1.0f); c.Rotate(a, 0.0f, 0.0f, 1.0f);
c.DrawModel(g_media->GetModel(SystemModelID::kBoxingGlove)); c.DrawModel(g_assets->GetModel(SystemModelID::kBoxingGlove));
c.PopTransform(); c.PopTransform();
c.Submit(); c.Submit();
} }
@ -1168,7 +1168,7 @@ void Graphics::DrawDebugBuffers(RenderPass* pass) {
c.PushTransform(); c.PushTransform();
c.Translate(70, 400, kDebugImgZDepth); c.Translate(70, 400, kDebugImgZDepth);
c.Scale(csize, csize); c.Scale(csize, csize);
c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1));
c.PopTransform(); c.PopTransform();
c.Submit(); c.Submit();
} }
@ -1178,7 +1178,7 @@ void Graphics::DrawDebugBuffers(RenderPass* pass) {
c.PushTransform(); c.PushTransform();
c.Translate(70, 250, kDebugImgZDepth); c.Translate(70, 250, kDebugImgZDepth);
c.Scale(csize, csize); c.Scale(csize, csize);
c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1));
c.PopTransform(); c.PopTransform();
c.Submit(); c.Submit();
} }
@ -1190,18 +1190,18 @@ void Graphics::UpdateAndDrawProgressBar(FrameDef* frame_def,
RenderPass* pass = frame_def->overlay_pass(); RenderPass* pass = frame_def->overlay_pass();
UpdateProgressBarProgress( UpdateProgressBarProgress(
1.0f 1.0f
- static_cast<float>(g_media->GetGraphicalPendingLoadCount()) - static_cast<float>(g_assets->GetGraphicalPendingLoadCount())
/ static_cast<float>(progress_bar_loads_)); / static_cast<float>(progress_bar_loads_));
DrawProgressBar(pass, 1.0f); DrawProgressBar(pass, 1.0f);
// If we were drawing a progress bar, see if everything is now loaded.. if // If we were drawing a progress bar, see if everything is now loaded.. if
// so, start rendering normally next frame. // so, start rendering normally next frame.
int count = g_media->GetGraphicalPendingLoadCount(); int count = g_assets->GetGraphicalPendingLoadCount();
if (count <= 0) { if (count <= 0) {
progress_bar_ = false; progress_bar_ = false;
progress_bar_end_time_ = real_time; progress_bar_end_time_ = real_time;
} }
if (g_media->GetPendingLoadCount() > 0) { if (g_assets->GetPendingLoadCount() > 0) {
DrawLoadDot(pass); DrawLoadDot(pass);
} }
} }
@ -1294,7 +1294,7 @@ void Graphics::DrawFades(FrameDef* frame_def, millisecs_t real_time) {
float inv_a = 1.0f - a; float inv_a = 1.0f - a;
float s = 100.0f * inv_a + 5.0f * a; float s = 100.0f * inv_a + 5.0f * a;
c.Scale(s, s, s); c.Scale(s, s, s);
c.DrawModel(g_media->GetModel(SystemModelID::kVRFade)); c.DrawModel(g_assets->GetModel(SystemModelID::kVRFade));
c.PopTransform(); c.PopTransform();
c.Submit(); c.Submit();
#else // BA_VR_BUILD #else // BA_VR_BUILD
@ -1347,7 +1347,7 @@ void Graphics::DrawCursor(RenderPass* pass, millisecs_t real_time) {
SimpleComponent c(pass); SimpleComponent c(pass);
c.SetTransparent(true); c.SetTransparent(true);
float csize = 50.0f; float csize = 50.0f;
c.SetTexture(g_media->GetTexture(SystemTextureID::kCursor)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kCursor));
c.PushTransform(); c.PushTransform();
// Note: we don't plug in known cursor position values here; we tell the // Note: we don't plug in known cursor position values here; we tell the
@ -1356,7 +1356,7 @@ void Graphics::DrawCursor(RenderPass* pass, millisecs_t real_time) {
c.CursorTranslate(); c.CursorTranslate();
c.Translate(csize * 0.44f, csize * -0.44f, kCursorZDepth); c.Translate(csize * 0.44f, csize * -0.44f, kCursorZDepth);
c.Scale(csize, csize); c.Scale(csize, csize);
c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1));
c.PopTransform(); c.PopTransform();
c.Submit(); c.Submit();
} }
@ -1372,7 +1372,7 @@ void Graphics::DrawBlotches(FrameDef* frame_def) {
this->shadow_blotch_mesh_->SetData(Object::New<MeshBuffer<VertexSprite>>( this->shadow_blotch_mesh_->SetData(Object::New<MeshBuffer<VertexSprite>>(
this->blotch_verts_.size(), &this->blotch_verts_[0])); this->blotch_verts_.size(), &this->blotch_verts_[0]));
SpriteComponent c(frame_def->light_shadow_pass()); SpriteComponent c(frame_def->light_shadow_pass());
c.SetTexture(g_media->GetTexture(SystemTextureID::kLight)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kLight));
c.DrawMesh(this->shadow_blotch_mesh_.get()); c.DrawMesh(this->shadow_blotch_mesh_.get());
c.Submit(); c.Submit();
} }
@ -1385,7 +1385,7 @@ void Graphics::DrawBlotches(FrameDef* frame_def) {
Object::New<MeshBuffer<VertexSprite>>(this->blotch_soft_verts_.size(), Object::New<MeshBuffer<VertexSprite>>(this->blotch_soft_verts_.size(),
&this->blotch_soft_verts_[0])); &this->blotch_soft_verts_[0]));
SpriteComponent c(frame_def->light_shadow_pass()); SpriteComponent c(frame_def->light_shadow_pass());
c.SetTexture(g_media->GetTexture(SystemTextureID::kLightSoft)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kLightSoft));
c.DrawMesh(this->shadow_blotch_soft_mesh_.get()); c.DrawMesh(this->shadow_blotch_soft_mesh_.get());
c.Submit(); c.Submit();
} }
@ -1401,7 +1401,7 @@ void Graphics::DrawBlotches(FrameDef* frame_def) {
this->blotch_soft_obj_verts_.size(), this->blotch_soft_obj_verts_.size(),
&this->blotch_soft_obj_verts_[0])); &this->blotch_soft_obj_verts_[0]));
SpriteComponent c(frame_def->light_pass()); SpriteComponent c(frame_def->light_pass());
c.SetTexture(g_media->GetTexture(SystemTextureID::kLightSoft)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kLightSoft));
c.DrawMesh(this->shadow_blotch_soft_obj_mesh_.get()); c.DrawMesh(this->shadow_blotch_soft_obj_mesh_.get());
c.Submit(); c.Submit();
} }
@ -1448,7 +1448,7 @@ void Graphics::AddMeshDataDestroy(MeshData* d) {
void Graphics::EnableProgressBar(bool fade_in) { void Graphics::EnableProgressBar(bool fade_in) {
assert(InLogicThread()); assert(InLogicThread());
progress_bar_loads_ = g_media->GetGraphicalPendingLoadCount(); progress_bar_loads_ = g_assets->GetGraphicalPendingLoadCount();
assert(progress_bar_loads_ >= 0); assert(progress_bar_loads_ >= 0);
if (progress_bar_loads_ > 0) { if (progress_bar_loads_ > 0) {
progress_bar_ = true; progress_bar_ = true;

View File

@ -11,10 +11,10 @@
#include "ballistica/platform/sdl/sdl_app.h" #include "ballistica/platform/sdl/sdl_app.h"
#else #else
#include "ballistica/app/app_flavor.h" #include "ballistica/app/app_flavor.h"
#include "ballistica/assets/assets.h"
#include "ballistica/graphics/frame_def.h" #include "ballistica/graphics/frame_def.h"
#include "ballistica/graphics/mesh/mesh_data.h" #include "ballistica/graphics/mesh/mesh_data.h"
#include "ballistica/graphics/renderer.h" #include "ballistica/graphics/renderer.h"
#include "ballistica/media/media.h"
#include "ballistica/platform/platform.h" #include "ballistica/platform/platform.h"
#endif #endif
@ -75,7 +75,7 @@ auto GraphicsServer::GetRenderFrameDef() -> FrameDef* {
} }
// Do some incremental loading every time we try to render. // Do some incremental loading every time we try to render.
g_media->RunPendingGraphicsLoads(); g_assets->RunPendingGraphicsLoads();
// Spin and wait for a short bit for a frame_def to appear. If it does, we // Spin and wait for a short bit for a frame_def to appear. If it does, we
// grab it, render it, and also message the game thread to start generating // grab it, render it, and also message the game thread to start generating
@ -185,7 +185,7 @@ void GraphicsServer::ReloadMedia() {
// Immediately unload all renderer data here in this thread. // Immediately unload all renderer data here in this thread.
if (renderer_) { if (renderer_) {
g_media->UnloadRendererBits(true, true); g_assets->UnloadRendererBits(true, true);
} }
// Set a render-hold so we ignore all frame_defs up until the point at which // Set a render-hold so we ignore all frame_defs up until the point at which
@ -199,7 +199,7 @@ void GraphicsServer::ReloadMedia() {
// progress bar drawing, and then tell the graphics thread to stop ignoring // progress bar drawing, and then tell the graphics thread to stop ignoring
// frame-defs. // frame-defs.
g_game->thread()->PushCall([this] { g_game->thread()->PushCall([this] {
g_media->MarkAllMediaForLoad(); g_assets->MarkAllAssetsForLoad();
g_graphics->EnableProgressBar(false); g_graphics->EnableProgressBar(false);
PushRemoveRenderHoldCall(); PushRemoveRenderHoldCall();
}); });
@ -219,7 +219,7 @@ void GraphicsServer::RebuildLostContext() {
set_renderer_context_lost(true); set_renderer_context_lost(true);
// Unload all texture and model data here in the render thread. // Unload all texture and model data here in the render thread.
g_media->UnloadRendererBits(true, true); g_assets->UnloadRendererBits(true, true);
// Also unload dynamic meshes. // Also unload dynamic meshes.
for (auto&& i : mesh_datas_) { for (auto&& i : mesh_datas_) {
@ -250,7 +250,7 @@ void GraphicsServer::RebuildLostContext() {
// Now tell the game thread to kick off loads for everything, flip on progress // Now tell the game thread to kick off loads for everything, flip on progress
// bar drawing, and then tell the graphics thread to stop ignoring frame-defs. // bar drawing, and then tell the graphics thread to stop ignoring frame-defs.
g_game->thread()->PushCall([this] { g_game->thread()->PushCall([this] {
g_media->MarkAllMediaForLoad(); g_assets->MarkAllAssetsForLoad();
g_graphics->EnableProgressBar(false); g_graphics->EnableProgressBar(false);
PushRemoveRenderHoldCall(); PushRemoveRenderHoldCall();
}); });
@ -373,7 +373,7 @@ void GraphicsServer::HandleFullContextScreenRebuild(
if (renderer_) { if (renderer_) {
// Unload all textures and models.. these will be reloaded as-needed // Unload all textures and models.. these will be reloaded as-needed
// automatically for the new context.. // automatically for the new context..
g_media->UnloadRendererBits(true, true); g_assets->UnloadRendererBits(true, true);
// Also unload all dynamic meshes. // Also unload all dynamic meshes.
for (auto&& i : mesh_datas_) { for (auto&& i : mesh_datas_) {
@ -464,7 +464,7 @@ void GraphicsServer::HandleFullContextScreenRebuild(
// progress bar drawing, and then tell the graphics thread to stop ignoring // progress bar drawing, and then tell the graphics thread to stop ignoring
// frame-defs. // frame-defs.
g_game->thread()->PushCall([this] { g_game->thread()->PushCall([this] {
g_media->MarkAllMediaForLoad(); g_assets->MarkAllAssetsForLoad();
g_graphics->set_internal_components_inited(false); g_graphics->set_internal_components_inited(false);
g_graphics->EnableProgressBar(false); g_graphics->EnableProgressBar(false);
PushRemoveRenderHoldCall(); PushRemoveRenderHoldCall();
@ -768,7 +768,7 @@ void GraphicsServer::PushSetVSyncCall(bool sync, bool auto_sync) {
} }
void GraphicsServer::PushComponentUnloadCall( void GraphicsServer::PushComponentUnloadCall(
const std::vector<Object::Ref<MediaComponentData>*>& components) { const std::vector<Object::Ref<AssetComponentData>*>& components) {
thread()->PushCall([this, components] { thread()->PushCall([this, components] {
// Unload all components we were passed. // Unload all components we were passed.
for (auto&& i : components) { for (auto&& i : components) {
@ -776,7 +776,7 @@ void GraphicsServer::PushComponentUnloadCall(
} }
// ..and then ship these pointers back to the game thread so it can free the // ..and then ship these pointers back to the game thread so it can free the
// references. // references.
g_game->PushFreeMediaComponentRefsCall(components); g_game->PushFreeAssetComponentRefsCall(components);
}); });
} }

View File

@ -29,7 +29,7 @@ class GraphicsServer {
auto PushReloadMediaCall() -> void; auto PushReloadMediaCall() -> void;
auto PushRemoveRenderHoldCall() -> void; auto PushRemoveRenderHoldCall() -> void;
auto PushComponentUnloadCall( auto PushComponentUnloadCall(
const std::vector<Object::Ref<MediaComponentData>*>& components) -> void; const std::vector<Object::Ref<AssetComponentData>*>& components) -> void;
auto SetRenderHold() -> void; auto SetRenderHold() -> void;
// Used by the game thread to pass frame-defs to the graphics server // Used by the game thread to pass frame-defs to the graphics server

View File

@ -5,12 +5,12 @@
#include <vector> #include <vector>
#include "ballistica/assets/component/model.h"
#include "ballistica/assets/component/texture.h"
#include "ballistica/ballistica.h" #include "ballistica/ballistica.h"
#include "ballistica/graphics/frame_def.h" #include "ballistica/graphics/frame_def.h"
#include "ballistica/graphics/mesh/mesh.h" #include "ballistica/graphics/mesh/mesh.h"
#include "ballistica/math/matrix44f.h" #include "ballistica/math/matrix44f.h"
#include "ballistica/media/component/model.h"
#include "ballistica/media/component/texture.h"
namespace ballistica { namespace ballistica {
@ -258,14 +258,14 @@ class RenderCommandBuffer {
void PutModel(ModelData* model) { void PutModel(ModelData* model) {
assert(frame_def_); assert(frame_def_);
assert(!finalized_); assert(!finalized_);
frame_def_->AddComponent(Object::Ref<MediaComponentData>(model)); frame_def_->AddComponent(Object::Ref<AssetComponentData>(model));
models_.push_back(model); models_.push_back(model);
} }
void PutTexture(TextureData* texture) { void PutTexture(TextureData* texture) {
assert(frame_def_); assert(frame_def_);
assert(!finalized_); assert(!finalized_);
frame_def_->AddComponent(Object::Ref<MediaComponentData>(texture)); frame_def_->AddComponent(Object::Ref<AssetComponentData>(texture));
textures_.push_back(texture); textures_.push_back(texture);
} }
@ -277,7 +277,7 @@ class RenderCommandBuffer {
void PutCubeMapTexture(TextureData* texture) { void PutCubeMapTexture(TextureData* texture) {
assert(frame_def_); assert(frame_def_);
assert(!finalized_); assert(!finalized_);
frame_def_->AddComponent(Object::Ref<MediaComponentData>(texture)); frame_def_->AddComponent(Object::Ref<AssetComponentData>(texture));
textures_.push_back(texture); textures_.push_back(texture);
} }

View File

@ -650,7 +650,7 @@ void Renderer::UpdatePixelScaleAndBackingBuffer(FrameDef* frame_def) {
void Renderer::LoadMedia(FrameDef* frame_def) { void Renderer::LoadMedia(FrameDef* frame_def) {
millisecs_t t = GetRealTime(); millisecs_t t = GetRealTime();
for (auto&& i : frame_def->media_components()) { for (auto&& i : frame_def->media_components()) {
MediaComponentData* mc = i.get(); AssetComponentData* mc = i.get();
assert(mc); assert(mc);
mc->Load(); mc->Load();

View File

@ -7,6 +7,9 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "ballistica/assets/assets.h"
#include "ballistica/assets/component/texture.h"
#include "ballistica/assets/data/model_data.h"
#include "ballistica/core/object.h" #include "ballistica/core/object.h"
#include "ballistica/graphics/frame_def.h" #include "ballistica/graphics/frame_def.h"
#include "ballistica/graphics/framebuffer.h" #include "ballistica/graphics/framebuffer.h"
@ -38,9 +41,6 @@
#include "ballistica/graphics/text/text_group.h" #include "ballistica/graphics/text/text_group.h"
#include "ballistica/math/matrix44f.h" #include "ballistica/math/matrix44f.h"
#include "ballistica/math/vector3f.h" #include "ballistica/math/vector3f.h"
#include "ballistica/media/component/texture.h"
#include "ballistica/media/data/model_data.h"
#include "ballistica/media/media.h"
namespace ballistica { namespace ballistica {

View File

@ -33,7 +33,7 @@ void TextGroup::SetText(const std::string& text, TextMesh::HAlign alignment_h,
entry->max_flatness = 1.0f; entry->max_flatness = 1.0f;
entry->mesh.SetText(text, alignment_h, alignment_v, true, 0, 65535, entry->mesh.SetText(text, alignment_h, alignment_v, true, 0, 65535,
TextMeshEntryType::kRegular, nullptr); TextMeshEntryType::kRegular, nullptr);
entry->tex = g_media->GetTexture(SystemTextureID::kFontBig); entry->tex = g_assets->GetTexture(SystemTextureID::kFontBig);
entries_.push_back(std::move(entry)); entries_.push_back(std::move(entry));
} else { } else {
@ -109,8 +109,8 @@ void TextGroup::SetText(const std::string& text, TextMesh::HAlign alignment_h,
// There should only ever be one of these. // There should only ever be one of these.
assert(!os_texture_.exists()); assert(!os_texture_.exists());
{ {
Media::MediaListsLock lock; Assets::AssetListLock lock;
os_texture_ = g_media->GetTextureData(packer.get()); os_texture_ = g_assets->GetTextureData(packer.get());
} }
// We also need to know what uv-scales to use for shadows/etc. // We also need to know what uv-scales to use for shadows/etc.
@ -122,43 +122,43 @@ void TextGroup::SetText(const std::string& text, TextMesh::HAlign alignment_h,
} }
switch (*i) { switch (*i) {
case 0: case 0:
entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall0); entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall0);
break; break;
case 1: case 1:
entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall1); entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall1);
break; break;
case 2: case 2:
entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall2); entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall2);
break; break;
case 3: case 3:
entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall3); entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall3);
break; break;
case 4: case 4:
entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall4); entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall4);
break; break;
case 5: case 5:
entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall5); entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall5);
break; break;
case 6: case 6:
entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall6); entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall6);
break; break;
case 7: case 7:
entry->tex = g_media->GetTexture(SystemTextureID::kFontSmall7); entry->tex = g_assets->GetTexture(SystemTextureID::kFontSmall7);
break; break;
case static_cast<int>(TextGraphics::FontPage::kOSRendered): case static_cast<int>(TextGraphics::FontPage::kOSRendered):
entry->tex = os_texture_; entry->tex = os_texture_;
break; break;
case static_cast<int>(TextGraphics::FontPage::kExtras1): case static_cast<int>(TextGraphics::FontPage::kExtras1):
entry->tex = g_media->GetTexture(SystemTextureID::kFontExtras); entry->tex = g_assets->GetTexture(SystemTextureID::kFontExtras);
break; break;
case static_cast<int>(TextGraphics::FontPage::kExtras2): case static_cast<int>(TextGraphics::FontPage::kExtras2):
entry->tex = g_media->GetTexture(SystemTextureID::kFontExtras2); entry->tex = g_assets->GetTexture(SystemTextureID::kFontExtras2);
break; break;
case static_cast<int>(TextGraphics::FontPage::kExtras3): case static_cast<int>(TextGraphics::FontPage::kExtras3):
entry->tex = g_media->GetTexture(SystemTextureID::kFontExtras3); entry->tex = g_assets->GetTexture(SystemTextureID::kFontExtras3);
break; break;
case static_cast<int>(TextGraphics::FontPage::kExtras4): case static_cast<int>(TextGraphics::FontPage::kExtras4):
entry->tex = g_media->GetTexture(SystemTextureID::kFontExtras4); entry->tex = g_assets->GetTexture(SystemTextureID::kFontExtras4);
break; break;
default: default:
throw Exception(); throw Exception();

View File

@ -7,10 +7,10 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "ballistica/assets/assets.h"
#include "ballistica/assets/data/texture_data.h"
#include "ballistica/core/object.h" #include "ballistica/core/object.h"
#include "ballistica/graphics/mesh/text_mesh.h" #include "ballistica/graphics/mesh/text_mesh.h"
#include "ballistica/media/data/texture_data.h"
#include "ballistica/media/media.h"
namespace ballistica { namespace ballistica {
@ -50,10 +50,10 @@ class TextGroup : public Object {
} }
auto GetElementMaskUV2Texture(int index) const -> TextureData* { auto GetElementMaskUV2Texture(int index) const -> TextureData* {
assert(index < static_cast<int>(entries_.size())); assert(index < static_cast<int>(entries_.size()));
return g_media->GetTexture(entries_[index]->type return g_assets->GetTexture(entries_[index]->type
== TextMeshEntryType::kOSRendered == TextMeshEntryType::kOSRendered
? SystemTextureID::kSoftRect2 ? SystemTextureID::kSoftRect2
: SystemTextureID::kSoftRect); : SystemTextureID::kSoftRect);
} }
void SetText(const std::string& text, void SetText(const std::string& text,
TextMesh::HAlign alignment_h = TextMesh::HAlign::kLeft, TextMesh::HAlign alignment_h = TextMesh::HAlign::kLeft,

View File

@ -241,7 +241,7 @@ void VRGraphics::DrawVROverlay(FrameDef* frame_def) {
c.Scale(kBaseVirtualResX * (1.0f + kVRBorder), c.Scale(kBaseVirtualResX * (1.0f + kVRBorder),
kBaseVirtualResY * (1.0f + kVRBorder), kBaseVirtualResY * (1.0f + kVRBorder),
kBaseVirtualResX * (1.0f + kVRBorder)); kBaseVirtualResX * (1.0f + kVRBorder));
c.DrawModel(g_media->GetModel(SystemModelID::kVROverlay)); c.DrawModel(g_assets->GetModel(SystemModelID::kVROverlay));
c.PopTransform(); c.PopTransform();
c.Submit(); c.Submit();
} }
@ -258,7 +258,7 @@ void VRGraphics::DrawOverlayBounds(RenderPass* pass) {
// Slight offset in z to reduce z fighting. // Slight offset in z to reduce z fighting.
c.Translate(0.5f * width, 0.5f * height, 1.0f); c.Translate(0.5f * width, 0.5f * height, 1.0f);
c.Scale(width, height, 100.0f); c.Scale(width, height, 100.0f);
c.DrawModel(g_media->GetModel(SystemModelID::kOverlayGuide)); c.DrawModel(g_assets->GetModel(SystemModelID::kOverlayGuide));
c.PopTransform(); c.PopTransform();
c.Submit(); c.Submit();
} }
@ -277,14 +277,14 @@ void VRGraphics::DrawVRControllers(FrameDef* frame_def) {
if (false) { if (false) {
ObjectComponent c(frame_def->beauty_pass()); ObjectComponent c(frame_def->beauty_pass());
c.SetColor(1, 0, 0); c.SetColor(1, 0, 0);
c.SetTexture(g_media->GetTexture(SystemTextureID::kBoxingGlove)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kBoxingGlove));
c.SetReflection(ReflectionType::kSoft); c.SetReflection(ReflectionType::kSoft);
c.SetReflectionScale(0.4f, 0.4f, 0.4f); c.SetReflectionScale(0.4f, 0.4f, 0.4f);
c.PushTransform(); c.PushTransform();
c.VRTransformToHead(); c.VRTransformToHead();
c.Translate(0, 0, 5); c.Translate(0, 0, 5);
c.Scale(2, 2, 2); c.Scale(2, 2, 2);
c.DrawModel(g_media->GetModel(SystemModelID::kBoxingGlove)); c.DrawModel(g_assets->GetModel(SystemModelID::kBoxingGlove));
c.PopTransform(); c.PopTransform();
c.Submit(); c.Submit();
} }
@ -297,13 +297,13 @@ void VRGraphics::DrawVRControllers(FrameDef* frame_def) {
case VRHandType::kDaydreamRemote: { case VRHandType::kDaydreamRemote: {
ObjectComponent c(frame_def->beauty_pass()); ObjectComponent c(frame_def->beauty_pass());
c.SetColor(0, 1, 0); c.SetColor(0, 1, 0);
c.SetTexture(g_media->GetTexture(SystemTextureID::kBoxingGlove)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kBoxingGlove));
c.SetReflection(ReflectionType::kSoft); c.SetReflection(ReflectionType::kSoft);
c.SetReflectionScale(0.4f, 0.4f, 0.4f); c.SetReflectionScale(0.4f, 0.4f, 0.4f);
c.PushTransform(); c.PushTransform();
c.VRTransformToRightHand(); c.VRTransformToRightHand();
c.Scale(10, 10, 10); c.Scale(10, 10, 10);
c.DrawModel(g_media->GetModel(SystemModelID::kBoxingGlove)); c.DrawModel(g_assets->GetModel(SystemModelID::kBoxingGlove));
c.PopTransform(); c.PopTransform();
c.Submit(); c.Submit();
break; break;
@ -316,13 +316,13 @@ void VRGraphics::DrawVRControllers(FrameDef* frame_def) {
case VRHandType::kOculusTouchL: { case VRHandType::kOculusTouchL: {
ObjectComponent c(frame_def->beauty_pass()); ObjectComponent c(frame_def->beauty_pass());
c.SetColor(0, 0, 1); c.SetColor(0, 0, 1);
c.SetTexture(g_media->GetTexture(SystemTextureID::kBoxingGlove)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kBoxingGlove));
c.SetReflection(ReflectionType::kSoft); c.SetReflection(ReflectionType::kSoft);
c.SetReflectionScale(0.4f, 0.4f, 0.4f); c.SetReflectionScale(0.4f, 0.4f, 0.4f);
c.PushTransform(); c.PushTransform();
c.VRTransformToLeftHand(); c.VRTransformToLeftHand();
c.Scale(10, 10, 10); c.Scale(10, 10, 10);
c.DrawModel(g_media->GetModel(SystemModelID::kBoxingGlove)); c.DrawModel(g_assets->GetModel(SystemModelID::kBoxingGlove));
c.PopTransform(); c.PopTransform();
c.Submit(); c.Submit();
break; break;

View File

@ -429,7 +429,7 @@ void TouchInput::Draw(FrameDef* frame_def) {
if (movement_control_type_ == MovementControlType::kSwipe) sc2 *= 0.6f; if (movement_control_type_ == MovementControlType::kSwipe) sc2 *= 0.6f;
if (movement_control_type_ == MovementControlType::kSwipe) { if (movement_control_type_ == MovementControlType::kSwipe) {
c.SetTexture(g_media->GetTexture(SystemTextureID::kTouchArrows)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kTouchArrows));
if (editing_) { if (editing_) {
float val = 1.5f + sinf(static_cast<float>(real_time) * 0.02f); float val = 1.5f + sinf(static_cast<float>(real_time) * 0.02f);
c.SetColor(val, val, 1.0f, 1.0f); c.SetColor(val, val, 1.0f, 1.0f);
@ -442,7 +442,7 @@ void TouchInput::Draw(FrameDef* frame_def) {
val = 0.35f; val = 0.35f;
} }
c.SetColor(0.5f, 0.3f, 0.8f, val); c.SetColor(0.5f, 0.3f, 0.8f, val);
c.SetTexture(g_media->GetTexture(SystemTextureID::kCircle)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kCircle));
} }
float x_offs = float x_offs =
@ -453,7 +453,7 @@ void TouchInput::Draw(FrameDef* frame_def) {
c.PushTransform(); c.PushTransform();
c.Translate(d_pad_base_x_ + x_offs, d_pad_base_y_ + y_offs, kDrawDepth); c.Translate(d_pad_base_x_ + x_offs, d_pad_base_y_ + y_offs, kDrawDepth);
c.Scale(sc2, sc2); c.Scale(sc2, sc2);
c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1));
c.PopTransform(); c.PopTransform();
if (movement_control_type_ == MovementControlType::kJoystick) { if (movement_control_type_ == MovementControlType::kJoystick) {
@ -467,7 +467,7 @@ void TouchInput::Draw(FrameDef* frame_def) {
c.PushTransform(); c.PushTransform();
c.Translate(d_pad_x_ + x_offs, d_pad_y_ + y_offs, kDrawDepth); c.Translate(d_pad_x_ + x_offs, d_pad_y_ + y_offs, kDrawDepth);
c.Scale(sc_move * 0.5f, sc_move * 0.5f); c.Scale(sc_move * 0.5f, sc_move * 0.5f);
c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1));
c.PopTransform(); c.PopTransform();
} }
} }
@ -475,7 +475,7 @@ void TouchInput::Draw(FrameDef* frame_def) {
if (!buttons_touch_ && action_control_type_ == ActionControlType::kSwipe if (!buttons_touch_ && action_control_type_ == ActionControlType::kSwipe
&& !swipe_controls_hidden_) { && !swipe_controls_hidden_) {
float sc2{sc_actions * 0.6f}; float sc2{sc_actions * 0.6f};
c.SetTexture(g_media->GetTexture(SystemTextureID::kTouchArrowsActions)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kTouchArrowsActions));
if (editing_) { if (editing_) {
float val = 1.5f + sinf(static_cast<float>(real_time) * 0.02f); float val = 1.5f + sinf(static_cast<float>(real_time) * 0.02f);
c.SetColor(val, val, 1.0f, 1.0f); c.SetColor(val, val, 1.0f, 1.0f);
@ -489,7 +489,7 @@ void TouchInput::Draw(FrameDef* frame_def) {
height * (-0.1f - buttons_default_frac_y_) * (1.0f - presence_); height * (-0.1f - buttons_default_frac_y_) * (1.0f - presence_);
c.Translate(buttons_x_ + x_offs, buttons_y_ + y_offs, kDrawDepth); c.Translate(buttons_x_ + x_offs, buttons_y_ + y_offs, kDrawDepth);
c.Scale(sc2, sc2); c.Scale(sc2, sc2);
c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1));
c.PopTransform(); c.PopTransform();
} }
c.Submit(); c.Submit();
@ -539,7 +539,7 @@ void TouchInput::Draw(FrameDef* frame_def) {
base_fade = 0.25f; base_fade = 0.25f;
} else { } else {
base_fade = 0.8f; base_fade = 0.8f;
c.SetTexture(g_media->GetTexture(SystemTextureID::kActionButtons)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kActionButtons));
} }
float x_offs; float x_offs;
@ -632,7 +632,7 @@ void TouchInput::Draw(FrameDef* frame_def) {
} else { } else {
c.Scale(b_width, b_width); c.Scale(b_width, b_width);
} }
c.DrawModel(g_media->GetModel(SystemModelID::kActionButtonRight)); c.DrawModel(g_assets->GetModel(SystemModelID::kActionButtonRight));
c.PopTransform(); c.PopTransform();
} }
@ -659,7 +659,7 @@ void TouchInput::Draw(FrameDef* frame_def) {
} else { } else {
c.Scale(b_width, b_width); c.Scale(b_width, b_width);
} }
c.DrawModel(g_media->GetModel(SystemModelID::kActionButtonLeft)); c.DrawModel(g_assets->GetModel(SystemModelID::kActionButtonLeft));
c.PopTransform(); c.PopTransform();
} }
@ -685,7 +685,7 @@ void TouchInput::Draw(FrameDef* frame_def) {
} else { } else {
c.Scale(b_width, b_width); c.Scale(b_width, b_width);
} }
c.DrawModel(g_media->GetModel(SystemModelID::kActionButtonBottom)); c.DrawModel(g_assets->GetModel(SystemModelID::kActionButtonBottom));
c.PopTransform(); c.PopTransform();
} }
@ -713,13 +713,13 @@ void TouchInput::Draw(FrameDef* frame_def) {
} else { } else {
c.Scale(b_width, b_width); c.Scale(b_width, b_width);
} }
c.DrawModel(g_media->GetModel(SystemModelID::kActionButtonTop)); c.DrawModel(g_assets->GetModel(SystemModelID::kActionButtonTop));
c.PopTransform(); c.PopTransform();
} }
// Center point. // Center point.
if (buttons_touch_ && action_control_type_ == ActionControlType::kSwipe) { if (buttons_touch_ && action_control_type_ == ActionControlType::kSwipe) {
c.SetTexture(g_media->GetTexture(SystemTextureID::kCircle)); c.SetTexture(g_assets->GetTexture(SystemTextureID::kCircle));
c.SetColor(1.0f, 1.0f, 0.0f, 0.8f); c.SetColor(1.0f, 1.0f, 0.0f, 0.8f);
c.PushTransform(); c.PushTransform();
@ -744,7 +744,7 @@ void TouchInput::Draw(FrameDef* frame_def) {
kDrawDepth); kDrawDepth);
} }
c.Scale(b_width * 0.3f, b_width * 0.3f); c.Scale(b_width * 0.3f, b_width * 0.3f);
c.DrawModel(g_media->GetModel(SystemModelID::kImage1x1)); c.DrawModel(g_assets->GetModel(SystemModelID::kImage1x1));
c.PopTransform(); c.PopTransform();
} }
c.PopTransform(); c.PopTransform();
@ -784,7 +784,7 @@ void TouchInput::Draw(FrameDef* frame_def) {
dist = 0.05f; dist = 0.05f;
} }
c2.SetTexture(g_media->GetTexture(SystemTextureID::kArrow)); c2.SetTexture(g_assets->GetTexture(SystemTextureID::kArrow));
Matrix44f orient = Matrix44f orient =
Matrix44fOrient(d_pad_draw_dir_, Vector3f(0.0f, 1.0f, 0.0f)); Matrix44fOrient(d_pad_draw_dir_, Vector3f(0.0f, 1.0f, 0.0f));
c2.PushTransform(); c2.PushTransform();
@ -816,13 +816,13 @@ void TouchInput::Draw(FrameDef* frame_def) {
c2.PushTransform(); c2.PushTransform();
c2.Translate(0.0f, dist * -0.5f, 0.0f); c2.Translate(0.0f, dist * -0.5f, 0.0f);
c2.Scale(0.15f, dist, 0.2f); c2.Scale(0.15f, dist, 0.2f);
c2.DrawModel(g_media->GetModel(SystemModelID::kArrowBack)); c2.DrawModel(g_assets->GetModel(SystemModelID::kArrowBack));
c2.PopTransform(); c2.PopTransform();
c2.PushTransform(); c2.PushTransform();
c2.Translate(0.0f, dist * -1.0f - 0.15f, 0.0f); c2.Translate(0.0f, dist * -1.0f - 0.15f, 0.0f);
c2.Scale(0.45f, 0.3f, 0.3f); c2.Scale(0.45f, 0.3f, 0.3f);
c2.DrawModel(g_media->GetModel(SystemModelID::kArrowFront)); c2.DrawModel(g_assets->GetModel(SystemModelID::kArrowFront));
c2.PopTransform(); c2.PopTransform();
c2.PopTransform(); c2.PopTransform();

View File

@ -495,7 +495,7 @@ void Input::AnnounceConnects() {
newly_connected_controllers_.front()); newly_connected_controllers_.front());
ScreenMessage(s); ScreenMessage(s);
} }
g_audio->PlaySound(g_media->GetSound(SystemSoundID::kGunCock)); g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kGunCock));
} }
newly_connected_controllers_.clear(); newly_connected_controllers_.clear();
@ -515,7 +515,7 @@ void Input::AnnounceDisconnects() {
newly_disconnected_controllers_.front()); newly_disconnected_controllers_.front());
ScreenMessage(s); ScreenMessage(s);
} }
g_audio->PlaySound(g_media->GetSound(SystemSoundID::kCorkPop)); g_audio->PlaySound(g_assets->GetSound(SystemSoundID::kCorkPop));
newly_disconnected_controllers_.clear(); newly_disconnected_controllers_.clear();
} }

View File

@ -10,11 +10,11 @@
#endif #endif
#include "ballistica/app/app.h" #include "ballistica/app/app.h"
#include "ballistica/assets/assets.h"
#include "ballistica/game/game.h" #include "ballistica/game/game.h"
#include "ballistica/generic/utils.h" #include "ballistica/generic/utils.h"
#include "ballistica/input/input.h" #include "ballistica/input/input.h"
#include "ballistica/math/vector3f.h" #include "ballistica/math/vector3f.h"
#include "ballistica/media/media.h"
#include "ballistica/networking/network_reader.h" #include "ballistica/networking/network_reader.h"
#include "ballistica/platform/min_sdl.h" #include "ballistica/platform/min_sdl.h"
#include "ballistica/platform/platform.h" #include "ballistica/platform/platform.h"

View File

@ -2,9 +2,9 @@
#include "ballistica/python/class/python_class_collide_model.h" #include "ballistica/python/class/python_class_collide_model.h"
#include "ballistica/assets/component/collide_model.h"
#include "ballistica/core/thread.h" #include "ballistica/core/thread.h"
#include "ballistica/game/game.h" #include "ballistica/game/game.h"
#include "ballistica/media/component/collide_model.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"
namespace ballistica { namespace ballistica {

View File

@ -2,9 +2,9 @@
#include "ballistica/python/class/python_class_data.h" #include "ballistica/python/class/python_class_data.h"
#include "ballistica/assets/component/data.h"
#include "ballistica/core/thread.h" #include "ballistica/core/thread.h"
#include "ballistica/game/game.h" #include "ballistica/game/game.h"
#include "ballistica/media/component/data.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"
namespace ballistica { namespace ballistica {

View File

@ -2,9 +2,9 @@
#include "ballistica/python/class/python_class_model.h" #include "ballistica/python/class/python_class_model.h"
#include "ballistica/assets/component/model.h"
#include "ballistica/core/thread.h" #include "ballistica/core/thread.h"
#include "ballistica/game/game.h" #include "ballistica/game/game.h"
#include "ballistica/media/component/model.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"
namespace ballistica { namespace ballistica {

View File

@ -2,9 +2,9 @@
#include "ballistica/python/class/python_class_sound.h" #include "ballistica/python/class/python_class_sound.h"
#include "ballistica/assets/component/sound.h"
#include "ballistica/core/thread.h" #include "ballistica/core/thread.h"
#include "ballistica/game/game.h" #include "ballistica/game/game.h"
#include "ballistica/media/component/sound.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"
namespace ballistica { namespace ballistica {

View File

@ -2,9 +2,9 @@
#include "ballistica/python/class/python_class_texture.h" #include "ballistica/python/class/python_class_texture.h"
#include "ballistica/assets/component/texture.h"
#include "ballistica/core/thread.h" #include "ballistica/core/thread.h"
#include "ballistica/game/game.h" #include "ballistica/game/game.h"
#include "ballistica/media/component/texture.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"
namespace ballistica { namespace ballistica {

View File

@ -4,6 +4,7 @@
#include "ballistica/app/app.h" #include "ballistica/app/app.h"
#include "ballistica/app/app_flavor.h" #include "ballistica/app/app_flavor.h"
#include "ballistica/assets/component/texture.h"
#include "ballistica/core/logging.h" #include "ballistica/core/logging.h"
#include "ballistica/game/connection/connection_set.h" #include "ballistica/game/connection/connection_set.h"
#include "ballistica/game/game_stream.h" #include "ballistica/game/game_stream.h"
@ -11,7 +12,6 @@
#include "ballistica/game/session/host_session.h" #include "ballistica/game/session/host_session.h"
#include "ballistica/game/session/replay_client_session.h" #include "ballistica/game/session/replay_client_session.h"
#include "ballistica/graphics/graphics.h" #include "ballistica/graphics/graphics.h"
#include "ballistica/media/component/texture.h"
#include "ballistica/python/class/python_class_activity_data.h" #include "ballistica/python/class/python_class_activity_data.h"
#include "ballistica/python/class/python_class_session_data.h" #include "ballistica/python/class/python_class_session_data.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"

View File

@ -1,19 +1,19 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#include "ballistica/python/methods/python_methods_media.h" #include "ballistica/python/methods/python_methods_assets.h"
#include <list> #include <list>
#if 0 // Cpplint errs w/o this, CLion errs with it. Hard to please everybody. #if 0 // Cpplint errs w/o this, CLion errs with it. Hard to please everybody.
#include <string> #include <string>
#endif #endif
#include "ballistica/assets/component/collide_model.h"
#include "ballistica/assets/component/data.h"
#include "ballistica/assets/component/model.h"
#include "ballistica/assets/component/sound.h"
#include "ballistica/assets/component/texture.h"
#include "ballistica/game/host_activity.h" #include "ballistica/game/host_activity.h"
#include "ballistica/graphics/graphics_server.h" #include "ballistica/graphics/graphics_server.h"
#include "ballistica/media/component/collide_model.h"
#include "ballistica/media/component/data.h"
#include "ballistica/media/component/model.h"
#include "ballistica/media/component/sound.h"
#include "ballistica/media/component/texture.h"
#include "ballistica/python/python.h" #include "ballistica/python/python.h"
#include "ballistica/python/python_sys.h" #include "ballistica/python/python_sys.h"
#include "ballistica/ui/ui.h" #include "ballistica/ui/ui.h"

View File

@ -1,7 +1,7 @@
// Released under the MIT License. See LICENSE for details. // Released under the MIT License. See LICENSE for details.
#ifndef BALLISTICA_PYTHON_METHODS_PYTHON_METHODS_MEDIA_H_ #ifndef BALLISTICA_PYTHON_METHODS_PYTHON_METHODS_ASSETS_H_
#define BALLISTICA_PYTHON_METHODS_PYTHON_METHODS_MEDIA_H_ #define BALLISTICA_PYTHON_METHODS_PYTHON_METHODS_ASSETS_H_
#include <vector> #include <vector>
@ -17,4 +17,4 @@ class PythonMethodsMedia {
} // namespace ballistica } // namespace ballistica
#endif // BALLISTICA_PYTHON_METHODS_PYTHON_METHODS_MEDIA_H_ #endif // BALLISTICA_PYTHON_METHODS_PYTHON_METHODS_ASSETS_H_

Some files were not shown because too many files have changed in this diff Show More