Added public device id and various cleanup

This commit is contained in:
Eric Froemling 2022-03-02 06:03:11 -06:00
parent f220692398
commit 3baa77c18e
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
43 changed files with 870 additions and 4127 deletions

View File

@ -1159,6 +1159,7 @@
<w>ioprep</w>
<w>ioprepped</w>
<w>ioprepping</w>
<w>ioreg</w>
<w>ipaddress</w>
<w>ipos</w>
<w>iprof</w>
@ -1203,6 +1204,7 @@
<w>keepalives</w>
<w>keepaway</w>
<w>keeprefs</w>
<w>kerploople</w>
<w>keyanntype</w>
<w>keyfilt</w>
<w>keyint</w>

View File

@ -1,3 +1,8 @@
### 1.6.10 (20501, 2022-03-02)
- Added `_ba.get_client_public_device_uuid` function which returns a semi-permanent device id for a connected client running 1.6.10 or newer. Can be useful to combat spam attacks or other mischief.
- Fixed an issue with `make update` not properly rewriting Visual Studio project files to account for new/deleted source files.
- Removed various bits of code associated with the (no-longer-functional) Google Play Games multiplayer connections.
### 1.6.9 (20486, 2022-02-22)
- Upgraded Android Python to 3.9.10
- Fixed an issue with SSL in Android builds that was preventing communication with the master-server in 1.6.8

View File

@ -6,7 +6,7 @@
![](https://github.com/efroemling/ballistica/workflows/CI/badge.svg)
The Ballistica project is the foundation for the next generation of [BombSquad](http://bombsquadgame.com). It debuted with version 1.5 of the game and lays the foundation for some of the big changes coming in 2.0.
The Ballistica project is the foundation for the next generation of [BombSquad](https://www.froemling.net/apps/bombsquad). It debuted with version 1.5 of the game and lays the foundation for some of the big changes coming in 2.0.
[Head to the project wiki to get started](https://github.com/efroemling/ballistica/wiki), or learn more about the project below.

View File

@ -352,3 +352,13 @@ def get_player_icon(sessionplayer: ba.SessionPlayer) -> dict[str, Any]:
'tint_color': info['tint_color'],
'tint2_color': info['tint2_color']
}
def hash_strings(inputs: list[str]) -> str:
"""Hash provided strings into a short output string."""
import hashlib
sha = hashlib.sha1()
for inp in inputs:
sha.update(inp.encode())
return sha.hexdigest()

View File

@ -374,7 +374,7 @@ class Lstr:
currently-active language.
To see available resource keys, look at any of the bs_language_*.py files
in the game or the translations pages at bombsquadgame.com/translate.
in the game or the translations pages at legacy.ballistica.net/translate.
# EXAMPLE 1: specify a string from a resource path
mynode.text = ba.Lstr(resource='audioSettingsWindow.titleText')

View File

@ -118,15 +118,14 @@ class MasterServerCallThread(threading.Thread):
if self._request_type == 'get':
response = urllib.request.urlopen(
urllib.request.Request(
(_ba.get_master_server_address(internal=True) + '/' +
(_ba.get_master_server_address() + '/' +
self._request + '?' + parse.urlencode(self._data)),
None, {'User-Agent': _ba.app.user_agent_string}),
timeout=DEFAULT_REQUEST_TIMEOUT_SECONDS)
elif self._request_type == 'post':
response = urllib.request.urlopen(
urllib.request.Request(
_ba.get_master_server_address(internal=True) + '/' +
self._request,
_ba.get_master_server_address() + '/' + self._request,
parse.urlencode(self._data).encode(),
{'User-Agent': _ba.app.user_agent_string}),
timeout=DEFAULT_REQUEST_TIMEOUT_SECONDS)

View File

@ -5,7 +5,6 @@
from __future__ import annotations
import math
import weakref
from typing import TYPE_CHECKING, cast
import _ba
@ -413,53 +412,3 @@ class PartyWindow(ba.Window):
"""Close the window and make a lovely sound."""
ba.playsound(ba.getsound('swish'))
self.close()
def handle_party_invite(name: str, invite_id: str) -> None:
"""Handle an incoming party invitation."""
from bastd import mainmenu
from bastd.ui import confirm
ba.playsound(ba.getsound('fanfare'))
# if we're not in the main menu, just print the invite
# (don't want to screw up an in-progress game)
in_game = not isinstance(_ba.get_foreground_host_session(),
mainmenu.MainMenuSession)
if in_game:
ba.screenmessage(ba.Lstr(
value='${A}\n${B}',
subs=[('${A}',
ba.Lstr(resource='gatherWindow.partyInviteText',
subs=[('${NAME}', name)])),
('${B}',
ba.Lstr(
resource='gatherWindow.partyInviteGooglePlayExtraText'))
]),
color=(0.5, 1, 0))
else:
def do_accept(inv_id: str) -> None:
_ba.accept_party_invitation(inv_id)
conf = confirm.ConfirmWindow(
ba.Lstr(resource='gatherWindow.partyInviteText',
subs=[('${NAME}', name)]),
ba.Call(do_accept, invite_id),
width=500,
height=150,
color=(0.75, 1.0, 0.0),
ok_text=ba.Lstr(resource='gatherWindow.partyInviteAcceptText'),
cancel_text=ba.Lstr(resource='gatherWindow.partyInviteIgnoreText'))
# FIXME: Ugly.
# Let's store the invite-id away on the confirm window so we know if
# we need to kill it later.
conf.party_invite_id = invite_id # type: ignore
# store a weak-ref so we can get at this later
ba.app.invite_confirm_windows.append(weakref.ref(conf))
# go ahead and prune our weak refs while we're here.
ba.app.invite_confirm_windows = [
w for w in ba.app.invite_confirm_windows if w() is not None
]

View File

@ -322,8 +322,8 @@ class AdvancedSettingsWindow(ba.Window):
subs=[('${APP_NAME}', ba.Lstr(resource='titleText'))
]),
autoselect=True,
on_activate_call=ba.Call(ba.open_url,
'http://bombsquadgame.com/translate'))
on_activate_call=ba.Call(
ba.open_url, 'https://legacy.ballistica.net/translate'))
self._lang_status_text = ba.textwidget(parent=self._subcontainer,
position=(self._sub_width * 0.5,

View File

@ -167,16 +167,12 @@ def _run_diagnostics(weakwin: weakref.ref[NetTestingWindow]) -> None:
_print_test_results(_dummy_fail)
# V1 ping
baseaddr = _ba.get_master_server_address(internal=True,
source=0,
version=1)
baseaddr = _ba.get_master_server_address(source=0, version=1)
_print(f'\nContacting V1 master-server src0 ({baseaddr})...')
_print_test_results(lambda: _test_fetch(baseaddr))
# V1 alternate ping
baseaddr = _ba.get_master_server_address(internal=True,
source=1,
version=1)
baseaddr = _ba.get_master_server_address(source=1, version=1)
_print(f'\nContacting V1 master-server src1 ({baseaddr})...')
_print_test_results(lambda: _test_fetch(baseaddr))
@ -185,14 +181,14 @@ def _run_diagnostics(weakwin: weakref.ref[NetTestingWindow]) -> None:
for srcid, result in sorted(ba.app.net.v1_ctest_results.items()):
_print(f'\nV1 src{srcid} result: {result}')
curv1addr = _ba.get_master_server_address(internal=True, version=1)
curv1addr = _ba.get_master_server_address(version=1)
_print(f'\nUsing V1 address: {curv1addr}')
_print('\nRunning V1 transaction...')
_print_test_results(_test_v1_transaction)
# V2 ping
baseaddr = _ba.get_master_server_address(internal=True, version=2)
baseaddr = _ba.get_master_server_address(version=2)
_print(f'\nContacting V2 master-server ({baseaddr})...')
_print_test_results(lambda: _test_fetch(baseaddr))

View File

@ -560,6 +560,7 @@
<w>ioprep</w>
<w>ioprepped</w>
<w>ioprepping</w>
<w>ioreg</w>
<w>iserverget</w>
<w>iserverput</w>
<w>isinst</w>
@ -587,6 +588,7 @@
<w>jnames</w>
<w>json's</w>
<w>keepalives</w>
<w>kerploople</w>
<w>keyanntype</w>
<w>keycode</w>
<w>keyfilt</w>

View File

@ -189,453 +189,72 @@
<None Include="BallisticaCore.ico" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\ballistica\app\app.cc" />
<ClInclude Include="..\..\src\ballistica\app\app.h" />
<ClCompile Include="..\..\src\ballistica\app\app_config.cc" />
<ClInclude Include="..\..\src\ballistica\app\app_config.h" />
<ClCompile Include="..\..\src\ballistica\app\app_globals.cc" />
<ClInclude Include="..\..\src\ballistica\app\app_globals.h" />
<ClCompile Include="..\..\src\ballistica\app\headless_app.cc" />
<ClInclude Include="..\..\src\ballistica\app\headless_app.h" />
<ClCompile Include="..\..\src\ballistica\app\stress_test.cc" />
<ClInclude Include="..\..\src\ballistica\app\stress_test.h" />
<ClCompile Include="..\..\src\ballistica\app\vr_app.cc" />
<ClInclude Include="..\..\src\ballistica\app\vr_app.h" />
<ClCompile Include="..\..\src\ballistica\audio\al_sys.cc" />
<ClInclude Include="..\..\src\ballistica\audio\al_sys.h" />
<ClCompile Include="..\..\src\ballistica\audio\audio.cc" />
<ClInclude Include="..\..\src\ballistica\audio\audio.h" />
<ClCompile Include="..\..\src\ballistica\audio\audio_server.cc" />
<ClInclude Include="..\..\src\ballistica\audio\audio_server.h" />
<ClCompile Include="..\..\src\ballistica\audio\audio_source.cc" />
<ClInclude Include="..\..\src\ballistica\audio\audio_source.h" />
<ClCompile Include="..\..\src\ballistica\audio\audio_streamer.cc" />
<ClInclude Include="..\..\src\ballistica\audio\audio_streamer.h" />
<ClCompile Include="..\..\src\ballistica\audio\ogg_stream.cc" />
<ClInclude Include="..\..\src\ballistica\audio\ogg_stream.h" />
<ClCompile Include="..\..\src\ballistica\ballistica.cc" />
<ClInclude Include="..\..\src\ballistica\ballistica.h" />
<ClInclude Include="..\..\src\ballistica\config\config_cmake.h" />
<ClInclude Include="..\..\src\ballistica\config\config_common.h" />
<ClCompile Include="..\..\src\ballistica\core\context.cc" />
<ClInclude Include="..\..\src\ballistica\core\context.h" />
<ClCompile Include="..\..\src\ballistica\core\exception.cc" />
<ClInclude Include="..\..\src\ballistica\core\exception.h" />
<ClCompile Include="..\..\src\ballistica\core\fatal_error.cc" />
<ClInclude Include="..\..\src\ballistica\core\fatal_error.h" />
<ClCompile Include="..\..\src\ballistica\core\inline.cc" />
<ClInclude Include="..\..\src\ballistica\core\inline.h" />
<ClCompile Include="..\..\src\ballistica\core\logging.cc" />
<ClInclude Include="..\..\src\ballistica\core\logging.h" />
<ClCompile Include="..\..\src\ballistica\core\macros.cc" />
<ClInclude Include="..\..\src\ballistica\core\macros.h" />
<ClCompile Include="..\..\src\ballistica\core\module.cc" />
<ClInclude Include="..\..\src\ballistica\core\module.h" />
<ClCompile Include="..\..\src\ballistica\core\object.cc" />
<ClInclude Include="..\..\src\ballistica\core\object.h" />
<ClCompile Include="..\..\src\ballistica\core\thread.cc" />
<ClInclude Include="..\..\src\ballistica\core\thread.h" />
<ClInclude Include="..\..\src\ballistica\core\types.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\bg\bg_dynamics.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics.h" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_draw_snapshot.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_fuse.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_fuse.h" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_fuse_data.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_height_cache.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_height_cache.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_server.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_server.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_shadow.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_shadow.h" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_shadow_data.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_volume_light.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_volume_light.h" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_volume_light_data.h" />
<ClInclude Include="..\..\src\ballistica\dynamics\collision.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\collision_cache.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\collision_cache.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\dynamics.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\dynamics.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\impact_sound_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\impact_sound_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\material.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\material.h" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\material_component.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\material_component.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\material_condition_node.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\material_condition_node.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\material_context.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\material_context.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\node_message_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\node_message_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\node_mod_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\node_mod_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\node_user_message_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\node_user_message_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\part_mod_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\part_mod_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\python_call_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\python_call_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\roll_sound_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\roll_sound_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\skid_sound_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\skid_sound_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\sound_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\sound_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\part.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\part.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\rigid_body.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\rigid_body.h" />
<ClInclude Include="..\..\src\ballistica\game\account.h" />
<ClInclude Include="..\..\src\ballistica\game\client_controller_interface.h" />
<ClInclude Include="..\..\src\ballistica\game\connection\connection.h" />
<ClInclude Include="..\..\src\ballistica\game\connection\connection_set.h" />
<ClInclude Include="..\..\src\ballistica\game\connection\connection_to_client.h" />
<ClInclude Include="..\..\src\ballistica\game\connection\connection_to_client_udp.h" />
<ClInclude Include="..\..\src\ballistica\game\connection\connection_to_host.h" />
<ClInclude Include="..\..\src\ballistica\game\connection\connection_to_host_udp.h" />
<ClInclude Include="..\..\src\ballistica\game\friend_score_set.h" />
<ClCompile Include="..\..\src\ballistica\game\game.cc" />
<ClInclude Include="..\..\src\ballistica\game\game.h" />
<ClInclude Include="..\..\src\ballistica\game\game_stream.h" />
<ClInclude Include="..\..\src\ballistica\game\host_activity.h" />
<ClCompile Include="..\..\src\ballistica\game\player.cc" />
<ClInclude Include="..\..\src\ballistica\game\player.h" />
<ClCompile Include="..\..\src\ballistica\game\player_spec.cc" />
<ClInclude Include="..\..\src\ballistica\game\player_spec.h" />
<ClInclude Include="..\..\src\ballistica\game\score_to_beat.h" />
<ClInclude Include="..\..\src\ballistica\game\session\client_session.h" />
<ClInclude Include="..\..\src\ballistica\game\session\host_session.h" />
<ClInclude Include="..\..\src\ballistica\game\session\net_client_session.h" />
<ClInclude Include="..\..\src\ballistica\game\session\replay_client_session.h" />
<ClInclude Include="..\..\src\ballistica\game\session\session.h" />
<ClCompile Include="..\..\src\ballistica\generic\base64.cc" />
<ClInclude Include="..\..\src\ballistica\generic\base64.h" />
<ClInclude Include="..\..\src\ballistica\generic\buffer.h" />
<ClCompile Include="..\..\src\ballistica\generic\huffman.cc" />
<ClInclude Include="..\..\src\ballistica\generic\huffman.h" />
<ClCompile Include="..\..\src\ballistica\generic\json.cc" />
<ClInclude Include="..\..\src\ballistica\generic\json.h" />
<ClInclude Include="..\..\src\ballistica\generic\lambda_runnable.h" />
<ClInclude Include="..\..\src\ballistica\generic\real_timer.h" />
<ClCompile Include="..\..\src\ballistica\generic\runnable.cc" />
<ClInclude Include="..\..\src\ballistica\generic\runnable.h" />
<ClCompile Include="..\..\src\ballistica\generic\timer.cc" />
<ClInclude Include="..\..\src\ballistica\generic\timer.h" />
<ClCompile Include="..\..\src\ballistica\generic\timer_list.cc" />
<ClInclude Include="..\..\src\ballistica\generic\timer_list.h" />
<ClCompile Include="..\..\src\ballistica\generic\utf8.cc" />
<ClInclude Include="..\..\src\ballistica\generic\utf8.h" />
<ClCompile Include="..\..\src\ballistica\generic\utils.cc" />
<ClInclude Include="..\..\src\ballistica\generic\utils.h" />
<ClCompile Include="..\..\src\ballistica\graphics\area_of_interest.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\area_of_interest.h" />
<ClCompile Include="..\..\src\ballistica\graphics\camera.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\camera.h" />
<ClInclude Include="..\..\src\ballistica\graphics\component\empty_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\object_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\object_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\post_process_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\post_process_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\render_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\render_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\shield_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\shield_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\simple_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\simple_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\smoke_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\smoke_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\special_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\special_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\sprite_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\sprite_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\frame_def.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\frame_def.h" />
<ClInclude Include="..\..\src\ballistica\graphics\framebuffer.h" />
<ClCompile Include="..\..\src\ballistica\graphics\gl\gl_sys.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\gl\gl_sys.h" />
<ClCompile Include="..\..\src\ballistica\graphics\gl\renderer_gl.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\gl\renderer_gl.h" />
<ClCompile Include="..\..\src\ballistica\graphics\graphics.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\graphics.h" />
<ClCompile Include="..\..\src\ballistica\graphics\graphics_server.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\graphics_server.h" />
<ClCompile Include="..\..\src\ballistica\graphics\mesh\image_mesh.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\image_mesh.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_buffer.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_buffer_base.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_buffer_vertex_simple_full.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_buffer_vertex_smoke_full.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_buffer_vertex_sprite.h" />
<ClCompile Include="..\..\src\ballistica\graphics\mesh\mesh_data.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_data.h" />
<ClCompile Include="..\..\src\ballistica\graphics\mesh\mesh_data_client_handle.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_data_client_handle.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_index_buffer_16.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_index_buffer_32.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed_base.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed_dual_texture_full.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed_object_split.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed_simple_full.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed_simple_split.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed_smoke_full.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed_static_dynamic.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_non_indexed.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_renderer_data.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\sprite_mesh.h" />
<ClCompile Include="..\..\src\ballistica\graphics\mesh\text_mesh.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\text_mesh.h" />
<ClCompile Include="..\..\src\ballistica\graphics\net_graph.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\net_graph.h" />
<ClInclude Include="..\..\src\ballistica\graphics\render_command_buffer.h" />
<ClCompile Include="..\..\src\ballistica\graphics\render_pass.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\render_pass.h" />
<ClCompile Include="..\..\src\ballistica\graphics\render_target.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\render_target.h" />
<ClCompile Include="..\..\src\ballistica\graphics\renderer.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\renderer.h" />
<ClInclude Include="..\..\src\ballistica\graphics\text\font_page_map_data.h" />
<ClCompile Include="..\..\src\ballistica\graphics\text\text_graphics.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\text\text_graphics.h" />
<ClCompile Include="..\..\src\ballistica\graphics\text\text_group.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\text\text_group.h" />
<ClCompile Include="..\..\src\ballistica\graphics\text\text_packer.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\text\text_packer.h" />
<ClCompile Include="..\..\src\ballistica\graphics\texture\dds.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\texture\dds.h" />
<ClCompile Include="..\..\src\ballistica\graphics\texture\ktx.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\texture\ktx.h" />
<ClCompile Include="..\..\src\ballistica\graphics\texture\pvr.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\texture\pvr.h" />
<ClCompile Include="..\..\src\ballistica\graphics\vr_graphics.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\vr_graphics.h" />
<ClCompile Include="..\..\src\ballistica\input\device\client_input_device.cc" />
<ClInclude Include="..\..\src\ballistica\input\device\client_input_device.h" />
<ClCompile Include="..\..\src\ballistica\input\device\input_device.cc" />
<ClInclude Include="..\..\src\ballistica\input\device\input_device.h" />
<ClCompile Include="..\..\src\ballistica\input\device\joystick.cc" />
<ClInclude Include="..\..\src\ballistica\input\device\joystick.h" />
<ClCompile Include="..\..\src\ballistica\input\device\keyboard_input.cc" />
<ClInclude Include="..\..\src\ballistica\input\device\keyboard_input.h" />
<ClCompile Include="..\..\src\ballistica\input\device\test_input.cc" />
<ClInclude Include="..\..\src\ballistica\input\device\test_input.h" />
<ClCompile Include="..\..\src\ballistica\input\device\touch_input.cc" />
<ClInclude Include="..\..\src\ballistica\input\device\touch_input.h" />
<ClCompile Include="..\..\src\ballistica\input\input.cc" />
<ClInclude Include="..\..\src\ballistica\input\input.h" />
<ClCompile Include="..\..\src\ballistica\input\remote_app.cc" />
<ClInclude Include="..\..\src\ballistica\input\remote_app.h" />
<ClCompile Include="..\..\src\ballistica\input\std_input_module.cc" />
<ClInclude Include="..\..\src\ballistica\input\std_input_module.h" />
<ClCompile Include="..\..\src\ballistica\math\matrix44f.cc" />
<ClInclude Include="..\..\src\ballistica\math\matrix44f.h" />
<ClInclude Include="..\..\src\ballistica\math\point2d.h" />
<ClCompile Include="..\..\src\ballistica\math\random.cc" />
<ClInclude Include="..\..\src\ballistica\math\random.h" />
<ClInclude Include="..\..\src\ballistica\math\rect.h" />
<ClInclude Include="..\..\src\ballistica\math\vector2f.h" />
<ClCompile Include="..\..\src\ballistica\math\vector3f.cc" />
<ClInclude Include="..\..\src\ballistica\math\vector3f.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" />
<ClInclude Include="..\..\src\ballistica\networking\network_reader.h" />
<ClInclude Include="..\..\src\ballistica\networking\network_write_module.h" />
<ClInclude Include="..\..\src\ballistica\networking\networking.h" />
<ClInclude Include="..\..\src\ballistica\networking\networking_sys.h" />
<ClCompile Include="..\..\src\ballistica\networking\sockaddr.cc" />
<ClInclude Include="..\..\src\ballistica\networking\sockaddr.h" />
<ClCompile Include="..\..\src\ballistica\networking\telnet_server.cc" />
<ClInclude Include="..\..\src\ballistica\networking\telnet_server.h" />
<ClInclude Include="..\..\src\ballistica\platform\apple\platform_apple.h" />
<ClCompile Include="..\..\src\ballistica\platform\linux\platform_linux.cc" />
<ClInclude Include="..\..\src\ballistica\platform\linux\platform_linux.h" />
<ClInclude Include="..\..\src\ballistica\platform\min_sdl.h" />
<ClCompile Include="..\..\src\ballistica\platform\platform.cc" />
<ClInclude Include="..\..\src\ballistica\platform\platform.h" />
<ClCompile Include="..\..\src\ballistica\platform\sdl\sdl_app.cc" />
<ClInclude Include="..\..\src\ballistica\platform\sdl\sdl_app.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_activity_data.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_activity_data.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_collide_model.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_collide_model.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_context.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_context.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_context_call.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_context_call.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_data.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_data.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_input_device.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_input_device.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_material.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_material.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_model.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_model.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_node.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_node.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_session_data.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_session_data.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_session_player.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_session_player.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_sound.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_sound.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_texture.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_texture.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_timer.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_timer.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_vec3.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_vec3.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_widget.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_widget.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_app.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_app.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_gameplay.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_gameplay.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_graphics.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_graphics.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_input.cc" />
<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_system.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_system.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_ui.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_ui.h" />
<ClCompile Include="..\..\src\ballistica\python\python.cc" />
<ClInclude Include="..\..\src\ballistica\python\python.h" />
<ClCompile Include="..\..\src\ballistica\python\python_command.cc" />
<ClInclude Include="..\..\src\ballistica\python\python_command.h" />
<ClCompile Include="..\..\src\ballistica\python\python_context_call.cc" />
<ClInclude Include="..\..\src\ballistica\python\python_context_call.h" />
<ClInclude Include="..\..\src\ballistica\python\python_context_call_runnable.h" />
<ClCompile Include="..\..\src\ballistica\python\python_ref.cc" />
<ClInclude Include="..\..\src\ballistica\python\python_ref.h" />
<ClInclude Include="..\..\src\ballistica\python\python_sys.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\anim_curve_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\anim_curve_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\bomb_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\bomb_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\combine_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\combine_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\explosion_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\explosion_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\flag_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\flag_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\flash_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\flash_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\globals_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\globals_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\image_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\image_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\light_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\light_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\locator_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\locator_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\math_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\math_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\node_attribute.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\node_attribute.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\node_attribute_connection.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\node_attribute_connection.h" />
<ClInclude Include="..\..\src\ballistica\scene\node\node_type.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\null_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\null_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\player_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\player_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\prop_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\prop_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\region_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\region_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\scorch_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\scorch_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\session_globals_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\session_globals_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\shield_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\shield_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\sound_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\sound_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\spaz_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\spaz_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\terrain_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\terrain_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\text_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\text_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\texture_sequence_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\texture_sequence_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\time_display_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\time_display_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\scene.cc" />
<ClInclude Include="..\..\src\ballistica\scene\scene.h" />
<ClCompile Include="..\..\src\ballistica\ui\console.cc" />
<ClInclude Include="..\..\src\ballistica\ui\console.h" />
<ClCompile Include="..\..\src\ballistica\ui\root_ui.cc" />
<ClInclude Include="..\..\src\ballistica\ui\root_ui.h" />
<ClCompile Include="..\..\src\ballistica\ui\ui.cc" />
<ClInclude Include="..\..\src\ballistica\ui\ui.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\button_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\button_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\check_box_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\check_box_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\column_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\column_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\container_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\container_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\h_scroll_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\h_scroll_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\image_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\image_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\root_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\root_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\row_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\row_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\scroll_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\scroll_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\stack_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\stack_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\text_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\text_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\widget.h" />
<ClCompile Include="..\..\src\ballistica\app\app_internal.cc" />
<ClInclude Include="..\..\src\ballistica\app\app_internal.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_amazon.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_arcade.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_cardboard.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_common.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_demo.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_generic.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_google.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_iircade.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_oculus.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_template.h" />
<ClInclude Include="..\..\src\ballistica\config\config_windows_oculus.h" />
<ClInclude Include="..\..\src\ballistica\config\config_xcode_common.h" />
<ClInclude Include="..\..\src\ballistica\config\config_xcode_ios.h" />
<ClInclude Include="..\..\src\ballistica\config\config_xcode_ios_legacy.h" />
<ClInclude Include="..\..\src\ballistica\config\config_xcode_mac.h" />
<ClInclude Include="..\..\src\ballistica\config\config_xcode_mac_legacy.h" />
<ClInclude Include="..\..\src\ballistica\config\config_xcode_tvos.h" />
<ClCompile Include="..\..\src\ballistica\game\account.cc" />
<ClCompile Include="..\..\src\ballistica\game\connection\connection.cc" />
<ClCompile Include="..\..\src\ballistica\game\connection\connection_set.cc" />
<ClCompile Include="..\..\src\ballistica\game\connection\connection_to_client.cc" />
<ClCompile Include="..\..\src\ballistica\game\connection\connection_to_client_udp.cc" />
<ClCompile Include="..\..\src\ballistica\game\connection\connection_to_host.cc" />
<ClCompile Include="..\..\src\ballistica\game\connection\connection_to_host_udp.cc" />
<ClCompile Include="..\..\src\ballistica\game\game_stream.cc" />
<ClCompile Include="..\..\src\ballistica\game\session\client_session.cc" />
<ClCompile Include="..\..\src\ballistica\game\session\host_session.cc" />
<ClCompile Include="..\..\src\ballistica\game\session\net_client_session.cc" />
<ClCompile Include="..\..\src\ballistica\game\session\replay_client_session.cc" />
<ClCompile Include="..\..\src\ballistica\game\session\session.cc" />
<ClInclude Include="..\..\src\ballistica\networking\master_server_config.h" />
<ClCompile Include="..\..\src\ballistica\networking\network_reader.cc" />
<ClCompile Include="..\..\src\ballistica\networking\network_write_module.cc" />
<ClCompile Include="..\..\src\ballistica\networking\networking.cc" />
<ClCompile Include="..\..\src\ballistica\platform\android\amazon\platform_android_amazon.cc" />
<ClInclude Include="..\..\src\ballistica\platform\android\amazon\platform_android_amazon.h" />
<ClCompile Include="..\..\src\ballistica\platform\android\android_context.cc" />
<ClInclude Include="..\..\src\ballistica\platform\android\android_context.h" />
<ClInclude Include="..\..\src\ballistica\platform\android\android_gl3.h" />
<ClCompile Include="..\..\src\ballistica\platform\android\cardboard\platform_android_cardboard.cc" />
<ClInclude Include="..\..\src\ballistica\platform\android\cardboard\platform_android_cardboard.h" />
<ClCompile Include="..\..\src\ballistica\platform\android\google\platform_android_google.cc" />
<ClInclude Include="..\..\src\ballistica\platform\android\google\platform_android_google.h" />
<ClCompile Include="..\..\src\ballistica\platform\android\ifaddrs_android_ext.cc" />
<ClInclude Include="..\..\src\ballistica\platform\android\ifaddrs_android_ext.h" />
<ClCompile Include="..\..\src\ballistica\platform\android\platform_android.cc" />
<ClInclude Include="..\..\src\ballistica\platform\android\platform_android.h" />
<ClInclude Include="..\..\src\ballistica\platform\android\utf8\checked.h" />
<ClInclude Include="..\..\src\ballistica\platform\android\utf8\core.h" />
<ClInclude Include="..\..\src\ballistica\platform\android\utf8\unchecked.h" />
<ClInclude Include="..\..\src\ballistica\platform\apple\app_delegate.h" />
<ClInclude Include="..\..\src\ballistica\platform\apple\apple_utils.h" />
<ClCompile Include="..\..\src\ballistica\platform\apple\platform_apple.cc" />
<ClInclude Include="..\..\src\ballistica\platform\apple\scripting_bridge_music.h" />
<ClInclude Include="..\..\src\ballistica\platform\apple\sdl_main_mac.h" />
<ClCompile Include="..\..\src\ballistica\platform\oculus\main_rift.cc" />
<ClCompile Include="..\..\src\ballistica\platform\oculus\oculus_utils.cc" />
<ClInclude Include="..\..\src\ballistica\platform\oculus\oculus_utils.h" />
<ClCompile Include="..\..\src\ballistica\platform\windows\platform_windows_oculus.cc" />
<ClInclude Include="..\..\src\ballistica\platform\windows\platform_windows_oculus.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_internal.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_internal.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_networking.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_networking.h" />
<ClCompile Include="..\..\src\external\open_dynamics_engine-ef\ode\IceAABB.cpp" />
<ClCompile Include="..\..\src\external\open_dynamics_engine-ef\ode\IceContainer.cpp" />
<ClCompile Include="..\..\src\external\open_dynamics_engine-ef\ode\IceHPoint.cpp" />

View File

@ -184,453 +184,72 @@
<Library Include="..\..\build\prefab\lib\windows\$(Configuration)_$(Platform)\$(MSBuildProjectName)Internal.lib" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\ballistica\app\app.cc" />
<ClInclude Include="..\..\src\ballistica\app\app.h" />
<ClCompile Include="..\..\src\ballistica\app\app_config.cc" />
<ClInclude Include="..\..\src\ballistica\app\app_config.h" />
<ClCompile Include="..\..\src\ballistica\app\app_globals.cc" />
<ClInclude Include="..\..\src\ballistica\app\app_globals.h" />
<ClCompile Include="..\..\src\ballistica\app\headless_app.cc" />
<ClInclude Include="..\..\src\ballistica\app\headless_app.h" />
<ClCompile Include="..\..\src\ballistica\app\stress_test.cc" />
<ClInclude Include="..\..\src\ballistica\app\stress_test.h" />
<ClCompile Include="..\..\src\ballistica\app\vr_app.cc" />
<ClInclude Include="..\..\src\ballistica\app\vr_app.h" />
<ClCompile Include="..\..\src\ballistica\audio\al_sys.cc" />
<ClInclude Include="..\..\src\ballistica\audio\al_sys.h" />
<ClCompile Include="..\..\src\ballistica\audio\audio.cc" />
<ClInclude Include="..\..\src\ballistica\audio\audio.h" />
<ClCompile Include="..\..\src\ballistica\audio\audio_server.cc" />
<ClInclude Include="..\..\src\ballistica\audio\audio_server.h" />
<ClCompile Include="..\..\src\ballistica\audio\audio_source.cc" />
<ClInclude Include="..\..\src\ballistica\audio\audio_source.h" />
<ClCompile Include="..\..\src\ballistica\audio\audio_streamer.cc" />
<ClInclude Include="..\..\src\ballistica\audio\audio_streamer.h" />
<ClCompile Include="..\..\src\ballistica\audio\ogg_stream.cc" />
<ClInclude Include="..\..\src\ballistica\audio\ogg_stream.h" />
<ClCompile Include="..\..\src\ballistica\ballistica.cc" />
<ClInclude Include="..\..\src\ballistica\ballistica.h" />
<ClInclude Include="..\..\src\ballistica\config\config_cmake.h" />
<ClInclude Include="..\..\src\ballistica\config\config_common.h" />
<ClCompile Include="..\..\src\ballistica\core\context.cc" />
<ClInclude Include="..\..\src\ballistica\core\context.h" />
<ClCompile Include="..\..\src\ballistica\core\exception.cc" />
<ClInclude Include="..\..\src\ballistica\core\exception.h" />
<ClCompile Include="..\..\src\ballistica\core\fatal_error.cc" />
<ClInclude Include="..\..\src\ballistica\core\fatal_error.h" />
<ClCompile Include="..\..\src\ballistica\core\inline.cc" />
<ClInclude Include="..\..\src\ballistica\core\inline.h" />
<ClCompile Include="..\..\src\ballistica\core\logging.cc" />
<ClInclude Include="..\..\src\ballistica\core\logging.h" />
<ClCompile Include="..\..\src\ballistica\core\macros.cc" />
<ClInclude Include="..\..\src\ballistica\core\macros.h" />
<ClCompile Include="..\..\src\ballistica\core\module.cc" />
<ClInclude Include="..\..\src\ballistica\core\module.h" />
<ClCompile Include="..\..\src\ballistica\core\object.cc" />
<ClInclude Include="..\..\src\ballistica\core\object.h" />
<ClCompile Include="..\..\src\ballistica\core\thread.cc" />
<ClInclude Include="..\..\src\ballistica\core\thread.h" />
<ClInclude Include="..\..\src\ballistica\core\types.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\bg\bg_dynamics.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics.h" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_draw_snapshot.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_fuse.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_fuse.h" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_fuse_data.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_height_cache.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_height_cache.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_server.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_server.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_shadow.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_shadow.h" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_shadow_data.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_volume_light.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_volume_light.h" />
<ClInclude Include="..\..\src\ballistica\dynamics\bg\bg_dynamics_volume_light_data.h" />
<ClInclude Include="..\..\src\ballistica\dynamics\collision.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\collision_cache.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\collision_cache.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\dynamics.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\dynamics.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\impact_sound_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\impact_sound_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\material.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\material.h" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\material_component.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\material_component.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\material_condition_node.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\material_condition_node.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\material_context.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\material_context.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\node_message_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\node_message_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\node_mod_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\node_mod_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\node_user_message_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\node_user_message_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\part_mod_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\part_mod_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\python_call_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\python_call_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\roll_sound_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\roll_sound_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\skid_sound_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\skid_sound_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\material\sound_material_action.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\material\sound_material_action.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\part.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\part.h" />
<ClCompile Include="..\..\src\ballistica\dynamics\rigid_body.cc" />
<ClInclude Include="..\..\src\ballistica\dynamics\rigid_body.h" />
<ClInclude Include="..\..\src\ballistica\game\account.h" />
<ClInclude Include="..\..\src\ballistica\game\client_controller_interface.h" />
<ClInclude Include="..\..\src\ballistica\game\connection\connection.h" />
<ClInclude Include="..\..\src\ballistica\game\connection\connection_set.h" />
<ClInclude Include="..\..\src\ballistica\game\connection\connection_to_client.h" />
<ClInclude Include="..\..\src\ballistica\game\connection\connection_to_client_udp.h" />
<ClInclude Include="..\..\src\ballistica\game\connection\connection_to_host.h" />
<ClInclude Include="..\..\src\ballistica\game\connection\connection_to_host_udp.h" />
<ClInclude Include="..\..\src\ballistica\game\friend_score_set.h" />
<ClCompile Include="..\..\src\ballistica\game\game.cc" />
<ClInclude Include="..\..\src\ballistica\game\game.h" />
<ClInclude Include="..\..\src\ballistica\game\game_stream.h" />
<ClInclude Include="..\..\src\ballistica\game\host_activity.h" />
<ClCompile Include="..\..\src\ballistica\game\player.cc" />
<ClInclude Include="..\..\src\ballistica\game\player.h" />
<ClCompile Include="..\..\src\ballistica\game\player_spec.cc" />
<ClInclude Include="..\..\src\ballistica\game\player_spec.h" />
<ClInclude Include="..\..\src\ballistica\game\score_to_beat.h" />
<ClInclude Include="..\..\src\ballistica\game\session\client_session.h" />
<ClInclude Include="..\..\src\ballistica\game\session\host_session.h" />
<ClInclude Include="..\..\src\ballistica\game\session\net_client_session.h" />
<ClInclude Include="..\..\src\ballistica\game\session\replay_client_session.h" />
<ClInclude Include="..\..\src\ballistica\game\session\session.h" />
<ClCompile Include="..\..\src\ballistica\generic\base64.cc" />
<ClInclude Include="..\..\src\ballistica\generic\base64.h" />
<ClInclude Include="..\..\src\ballistica\generic\buffer.h" />
<ClCompile Include="..\..\src\ballistica\generic\huffman.cc" />
<ClInclude Include="..\..\src\ballistica\generic\huffman.h" />
<ClCompile Include="..\..\src\ballistica\generic\json.cc" />
<ClInclude Include="..\..\src\ballistica\generic\json.h" />
<ClInclude Include="..\..\src\ballistica\generic\lambda_runnable.h" />
<ClInclude Include="..\..\src\ballistica\generic\real_timer.h" />
<ClCompile Include="..\..\src\ballistica\generic\runnable.cc" />
<ClInclude Include="..\..\src\ballistica\generic\runnable.h" />
<ClCompile Include="..\..\src\ballistica\generic\timer.cc" />
<ClInclude Include="..\..\src\ballistica\generic\timer.h" />
<ClCompile Include="..\..\src\ballistica\generic\timer_list.cc" />
<ClInclude Include="..\..\src\ballistica\generic\timer_list.h" />
<ClCompile Include="..\..\src\ballistica\generic\utf8.cc" />
<ClInclude Include="..\..\src\ballistica\generic\utf8.h" />
<ClCompile Include="..\..\src\ballistica\generic\utils.cc" />
<ClInclude Include="..\..\src\ballistica\generic\utils.h" />
<ClCompile Include="..\..\src\ballistica\graphics\area_of_interest.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\area_of_interest.h" />
<ClCompile Include="..\..\src\ballistica\graphics\camera.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\camera.h" />
<ClInclude Include="..\..\src\ballistica\graphics\component\empty_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\object_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\object_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\post_process_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\post_process_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\render_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\render_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\shield_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\shield_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\simple_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\simple_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\smoke_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\smoke_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\special_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\special_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\component\sprite_component.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\component\sprite_component.h" />
<ClCompile Include="..\..\src\ballistica\graphics\frame_def.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\frame_def.h" />
<ClInclude Include="..\..\src\ballistica\graphics\framebuffer.h" />
<ClCompile Include="..\..\src\ballistica\graphics\gl\gl_sys.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\gl\gl_sys.h" />
<ClCompile Include="..\..\src\ballistica\graphics\gl\renderer_gl.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\gl\renderer_gl.h" />
<ClCompile Include="..\..\src\ballistica\graphics\graphics.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\graphics.h" />
<ClCompile Include="..\..\src\ballistica\graphics\graphics_server.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\graphics_server.h" />
<ClCompile Include="..\..\src\ballistica\graphics\mesh\image_mesh.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\image_mesh.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_buffer.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_buffer_base.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_buffer_vertex_simple_full.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_buffer_vertex_smoke_full.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_buffer_vertex_sprite.h" />
<ClCompile Include="..\..\src\ballistica\graphics\mesh\mesh_data.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_data.h" />
<ClCompile Include="..\..\src\ballistica\graphics\mesh\mesh_data_client_handle.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_data_client_handle.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_index_buffer_16.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_index_buffer_32.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed_base.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed_dual_texture_full.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed_object_split.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed_simple_full.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed_simple_split.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed_smoke_full.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_indexed_static_dynamic.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_non_indexed.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\mesh_renderer_data.h" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\sprite_mesh.h" />
<ClCompile Include="..\..\src\ballistica\graphics\mesh\text_mesh.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\mesh\text_mesh.h" />
<ClCompile Include="..\..\src\ballistica\graphics\net_graph.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\net_graph.h" />
<ClInclude Include="..\..\src\ballistica\graphics\render_command_buffer.h" />
<ClCompile Include="..\..\src\ballistica\graphics\render_pass.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\render_pass.h" />
<ClCompile Include="..\..\src\ballistica\graphics\render_target.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\render_target.h" />
<ClCompile Include="..\..\src\ballistica\graphics\renderer.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\renderer.h" />
<ClInclude Include="..\..\src\ballistica\graphics\text\font_page_map_data.h" />
<ClCompile Include="..\..\src\ballistica\graphics\text\text_graphics.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\text\text_graphics.h" />
<ClCompile Include="..\..\src\ballistica\graphics\text\text_group.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\text\text_group.h" />
<ClCompile Include="..\..\src\ballistica\graphics\text\text_packer.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\text\text_packer.h" />
<ClCompile Include="..\..\src\ballistica\graphics\texture\dds.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\texture\dds.h" />
<ClCompile Include="..\..\src\ballistica\graphics\texture\ktx.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\texture\ktx.h" />
<ClCompile Include="..\..\src\ballistica\graphics\texture\pvr.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\texture\pvr.h" />
<ClCompile Include="..\..\src\ballistica\graphics\vr_graphics.cc" />
<ClInclude Include="..\..\src\ballistica\graphics\vr_graphics.h" />
<ClCompile Include="..\..\src\ballistica\input\device\client_input_device.cc" />
<ClInclude Include="..\..\src\ballistica\input\device\client_input_device.h" />
<ClCompile Include="..\..\src\ballistica\input\device\input_device.cc" />
<ClInclude Include="..\..\src\ballistica\input\device\input_device.h" />
<ClCompile Include="..\..\src\ballistica\input\device\joystick.cc" />
<ClInclude Include="..\..\src\ballistica\input\device\joystick.h" />
<ClCompile Include="..\..\src\ballistica\input\device\keyboard_input.cc" />
<ClInclude Include="..\..\src\ballistica\input\device\keyboard_input.h" />
<ClCompile Include="..\..\src\ballistica\input\device\test_input.cc" />
<ClInclude Include="..\..\src\ballistica\input\device\test_input.h" />
<ClCompile Include="..\..\src\ballistica\input\device\touch_input.cc" />
<ClInclude Include="..\..\src\ballistica\input\device\touch_input.h" />
<ClCompile Include="..\..\src\ballistica\input\input.cc" />
<ClInclude Include="..\..\src\ballistica\input\input.h" />
<ClCompile Include="..\..\src\ballistica\input\remote_app.cc" />
<ClInclude Include="..\..\src\ballistica\input\remote_app.h" />
<ClCompile Include="..\..\src\ballistica\input\std_input_module.cc" />
<ClInclude Include="..\..\src\ballistica\input\std_input_module.h" />
<ClCompile Include="..\..\src\ballistica\math\matrix44f.cc" />
<ClInclude Include="..\..\src\ballistica\math\matrix44f.h" />
<ClInclude Include="..\..\src\ballistica\math\point2d.h" />
<ClCompile Include="..\..\src\ballistica\math\random.cc" />
<ClInclude Include="..\..\src\ballistica\math\random.h" />
<ClInclude Include="..\..\src\ballistica\math\rect.h" />
<ClInclude Include="..\..\src\ballistica\math\vector2f.h" />
<ClCompile Include="..\..\src\ballistica\math\vector3f.cc" />
<ClInclude Include="..\..\src\ballistica\math\vector3f.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" />
<ClInclude Include="..\..\src\ballistica\networking\network_reader.h" />
<ClInclude Include="..\..\src\ballistica\networking\network_write_module.h" />
<ClInclude Include="..\..\src\ballistica\networking\networking.h" />
<ClInclude Include="..\..\src\ballistica\networking\networking_sys.h" />
<ClCompile Include="..\..\src\ballistica\networking\sockaddr.cc" />
<ClInclude Include="..\..\src\ballistica\networking\sockaddr.h" />
<ClCompile Include="..\..\src\ballistica\networking\telnet_server.cc" />
<ClInclude Include="..\..\src\ballistica\networking\telnet_server.h" />
<ClInclude Include="..\..\src\ballistica\platform\apple\platform_apple.h" />
<ClCompile Include="..\..\src\ballistica\platform\linux\platform_linux.cc" />
<ClInclude Include="..\..\src\ballistica\platform\linux\platform_linux.h" />
<ClInclude Include="..\..\src\ballistica\platform\min_sdl.h" />
<ClCompile Include="..\..\src\ballistica\platform\platform.cc" />
<ClInclude Include="..\..\src\ballistica\platform\platform.h" />
<ClCompile Include="..\..\src\ballistica\platform\sdl\sdl_app.cc" />
<ClInclude Include="..\..\src\ballistica\platform\sdl\sdl_app.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_activity_data.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_activity_data.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_collide_model.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_collide_model.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_context.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_context.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_context_call.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_context_call.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_data.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_data.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_input_device.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_input_device.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_material.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_material.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_model.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_model.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_node.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_node.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_session_data.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_session_data.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_session_player.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_session_player.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_sound.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_sound.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_texture.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_texture.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_timer.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_timer.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_vec3.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_vec3.h" />
<ClCompile Include="..\..\src\ballistica\python\class\python_class_widget.cc" />
<ClInclude Include="..\..\src\ballistica\python\class\python_class_widget.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_app.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_app.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_gameplay.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_gameplay.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_graphics.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_graphics.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_input.cc" />
<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_system.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_system.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_ui.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_ui.h" />
<ClCompile Include="..\..\src\ballistica\python\python.cc" />
<ClInclude Include="..\..\src\ballistica\python\python.h" />
<ClCompile Include="..\..\src\ballistica\python\python_command.cc" />
<ClInclude Include="..\..\src\ballistica\python\python_command.h" />
<ClCompile Include="..\..\src\ballistica\python\python_context_call.cc" />
<ClInclude Include="..\..\src\ballistica\python\python_context_call.h" />
<ClInclude Include="..\..\src\ballistica\python\python_context_call_runnable.h" />
<ClCompile Include="..\..\src\ballistica\python\python_ref.cc" />
<ClInclude Include="..\..\src\ballistica\python\python_ref.h" />
<ClInclude Include="..\..\src\ballistica\python\python_sys.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\anim_curve_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\anim_curve_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\bomb_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\bomb_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\combine_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\combine_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\explosion_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\explosion_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\flag_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\flag_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\flash_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\flash_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\globals_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\globals_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\image_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\image_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\light_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\light_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\locator_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\locator_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\math_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\math_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\node_attribute.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\node_attribute.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\node_attribute_connection.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\node_attribute_connection.h" />
<ClInclude Include="..\..\src\ballistica\scene\node\node_type.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\null_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\null_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\player_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\player_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\prop_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\prop_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\region_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\region_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\scorch_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\scorch_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\session_globals_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\session_globals_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\shield_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\shield_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\sound_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\sound_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\spaz_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\spaz_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\terrain_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\terrain_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\text_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\text_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\texture_sequence_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\texture_sequence_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\node\time_display_node.cc" />
<ClInclude Include="..\..\src\ballistica\scene\node\time_display_node.h" />
<ClCompile Include="..\..\src\ballistica\scene\scene.cc" />
<ClInclude Include="..\..\src\ballistica\scene\scene.h" />
<ClCompile Include="..\..\src\ballistica\ui\console.cc" />
<ClInclude Include="..\..\src\ballistica\ui\console.h" />
<ClCompile Include="..\..\src\ballistica\ui\root_ui.cc" />
<ClInclude Include="..\..\src\ballistica\ui\root_ui.h" />
<ClCompile Include="..\..\src\ballistica\ui\ui.cc" />
<ClInclude Include="..\..\src\ballistica\ui\ui.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\button_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\button_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\check_box_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\check_box_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\column_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\column_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\container_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\container_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\h_scroll_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\h_scroll_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\image_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\image_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\root_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\root_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\row_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\row_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\scroll_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\scroll_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\stack_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\stack_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\text_widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\text_widget.h" />
<ClCompile Include="..\..\src\ballistica\ui\widget\widget.cc" />
<ClInclude Include="..\..\src\ballistica\ui\widget\widget.h" />
<ClCompile Include="..\..\src\ballistica\app\app_internal.cc" />
<ClInclude Include="..\..\src\ballistica\app\app_internal.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_amazon.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_arcade.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_cardboard.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_common.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_demo.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_generic.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_google.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_iircade.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_oculus.h" />
<ClInclude Include="..\..\src\ballistica\config\config_android_template.h" />
<ClInclude Include="..\..\src\ballistica\config\config_windows_oculus.h" />
<ClInclude Include="..\..\src\ballistica\config\config_xcode_common.h" />
<ClInclude Include="..\..\src\ballistica\config\config_xcode_ios.h" />
<ClInclude Include="..\..\src\ballistica\config\config_xcode_ios_legacy.h" />
<ClInclude Include="..\..\src\ballistica\config\config_xcode_mac.h" />
<ClInclude Include="..\..\src\ballistica\config\config_xcode_mac_legacy.h" />
<ClInclude Include="..\..\src\ballistica\config\config_xcode_tvos.h" />
<ClCompile Include="..\..\src\ballistica\game\account.cc" />
<ClCompile Include="..\..\src\ballistica\game\connection\connection.cc" />
<ClCompile Include="..\..\src\ballistica\game\connection\connection_set.cc" />
<ClCompile Include="..\..\src\ballistica\game\connection\connection_to_client.cc" />
<ClCompile Include="..\..\src\ballistica\game\connection\connection_to_client_udp.cc" />
<ClCompile Include="..\..\src\ballistica\game\connection\connection_to_host.cc" />
<ClCompile Include="..\..\src\ballistica\game\connection\connection_to_host_udp.cc" />
<ClCompile Include="..\..\src\ballistica\game\game_stream.cc" />
<ClCompile Include="..\..\src\ballistica\game\session\client_session.cc" />
<ClCompile Include="..\..\src\ballistica\game\session\host_session.cc" />
<ClCompile Include="..\..\src\ballistica\game\session\net_client_session.cc" />
<ClCompile Include="..\..\src\ballistica\game\session\replay_client_session.cc" />
<ClCompile Include="..\..\src\ballistica\game\session\session.cc" />
<ClInclude Include="..\..\src\ballistica\networking\master_server_config.h" />
<ClCompile Include="..\..\src\ballistica\networking\network_reader.cc" />
<ClCompile Include="..\..\src\ballistica\networking\network_write_module.cc" />
<ClCompile Include="..\..\src\ballistica\networking\networking.cc" />
<ClCompile Include="..\..\src\ballistica\platform\android\amazon\platform_android_amazon.cc" />
<ClInclude Include="..\..\src\ballistica\platform\android\amazon\platform_android_amazon.h" />
<ClCompile Include="..\..\src\ballistica\platform\android\android_context.cc" />
<ClInclude Include="..\..\src\ballistica\platform\android\android_context.h" />
<ClInclude Include="..\..\src\ballistica\platform\android\android_gl3.h" />
<ClCompile Include="..\..\src\ballistica\platform\android\cardboard\platform_android_cardboard.cc" />
<ClInclude Include="..\..\src\ballistica\platform\android\cardboard\platform_android_cardboard.h" />
<ClCompile Include="..\..\src\ballistica\platform\android\google\platform_android_google.cc" />
<ClInclude Include="..\..\src\ballistica\platform\android\google\platform_android_google.h" />
<ClCompile Include="..\..\src\ballistica\platform\android\ifaddrs_android_ext.cc" />
<ClInclude Include="..\..\src\ballistica\platform\android\ifaddrs_android_ext.h" />
<ClCompile Include="..\..\src\ballistica\platform\android\platform_android.cc" />
<ClInclude Include="..\..\src\ballistica\platform\android\platform_android.h" />
<ClInclude Include="..\..\src\ballistica\platform\android\utf8\checked.h" />
<ClInclude Include="..\..\src\ballistica\platform\android\utf8\core.h" />
<ClInclude Include="..\..\src\ballistica\platform\android\utf8\unchecked.h" />
<ClInclude Include="..\..\src\ballistica\platform\apple\app_delegate.h" />
<ClInclude Include="..\..\src\ballistica\platform\apple\apple_utils.h" />
<ClCompile Include="..\..\src\ballistica\platform\apple\platform_apple.cc" />
<ClInclude Include="..\..\src\ballistica\platform\apple\scripting_bridge_music.h" />
<ClInclude Include="..\..\src\ballistica\platform\apple\sdl_main_mac.h" />
<ClCompile Include="..\..\src\ballistica\platform\oculus\main_rift.cc" />
<ClCompile Include="..\..\src\ballistica\platform\oculus\oculus_utils.cc" />
<ClInclude Include="..\..\src\ballistica\platform\oculus\oculus_utils.h" />
<ClCompile Include="..\..\src\ballistica\platform\windows\platform_windows_oculus.cc" />
<ClInclude Include="..\..\src\ballistica\platform\windows\platform_windows_oculus.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_internal.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_internal.h" />
<ClCompile Include="..\..\src\ballistica\python\methods\python_methods_networking.cc" />
<ClInclude Include="..\..\src\ballistica\python\methods\python_methods_networking.h" />
<ClCompile Include="..\..\src\external\open_dynamics_engine-ef\ode\IceAABB.cpp" />
<ClCompile Include="..\..\src\external\open_dynamics_engine-ef\ode\IceContainer.cpp" />
<ClCompile Include="..\..\src\external\open_dynamics_engine-ef\ode\IceHPoint.cpp" />

View File

@ -39,7 +39,7 @@ void App::PostInit() {
App::~App() = default;
auto App::UsesEventLoop() const -> bool {
auto App::ManagesEventLoop() const -> bool {
// We have 2 redundant values for essentially the same thing;
// should get rid of IsEventPushMode() once we've created
// App subclasses for our various platforms.
@ -48,8 +48,8 @@ auto App::UsesEventLoop() const -> bool {
void App::RunRenderUpkeepCycle() {
// This should only be used in cases where the OS is handling the event loop.
assert(!UsesEventLoop());
if (UsesEventLoop()) {
assert(!ManagesEventLoop());
if (ManagesEventLoop()) {
return;
}
@ -111,13 +111,10 @@ void App::ShutdownComplete() {
assert(InMainThread());
assert(g_platform);
// Need to call our cleanup stuff that would otherwise get called in main.
g_platform->FinalCleanup();
done_ = true;
// Kill our own event loop (or tell the OS to kill its).
if (UsesEventLoop()) {
if (ManagesEventLoop()) {
thread()->Quit();
} else {
g_platform->QuitApp();
@ -249,7 +246,7 @@ void App::ResumeApp() {
void App::DidFinishRenderingFrame(FrameDef* frame) {}
void App::PrimeEventPump() {
assert(!UsesEventLoop());
assert(!ManagesEventLoop());
// Pump events manually until a screen gets created.
// At that point we use frame-draws to drive our event loop.

View File

@ -30,7 +30,7 @@ class App : public Module {
/// If false, BallisticaMain returns immediately and it is assumed
/// that the OS handles the app lifecycle and pushes events to the app
/// via callbacks/etc.
auto UsesEventLoop() const -> bool;
auto ManagesEventLoop() const -> bool;
/// Called for non-event-loop apps to give them an opportunity to
/// ensure they are self-sustaining. For instance, an app relying on

View File

@ -77,8 +77,6 @@ class AppGlobals {
int delay_bucket_samples{60};
bool vr_mode{g_buildconfig.vr_build()};
// Temp dirty way to do some shutdown stuff (FIXME: move to an App method).
void (*temp_cleanup_callback)() = nullptr;
millisecs_t real_time{};
millisecs_t last_real_time_ticks{};
std::mutex real_time_mutex;

View File

@ -21,8 +21,8 @@
namespace ballistica {
// These are set automatically via script; don't modify them here.
const int kAppBuildNumber = 20486;
const char* kAppVersion = "1.6.9";
const int kAppBuildNumber = 20501;
const char* kAppVersion = "1.6.10";
// Our standalone globals.
// These are separated out for easy access.
@ -138,9 +138,9 @@ auto BallisticaMain(int argc, char** argv) -> int {
// Phase 3/4: Create a screen and/or kick off game (in other threads).
// -------------------------------------------------------------------------
if (g_app->UsesEventLoop()) {
// On our event-loop using platforms we now simply sit in our event loop
// until the app is quit.
if (g_app->ManagesEventLoop()) {
// On our event-loop-managing platforms we now simply sit in our event
// loop until the app is quit.
g_main_thread->RunEventLoop(false);
} else {
// In this case we'll now simply return and let the OS feed us events
@ -156,8 +156,8 @@ auto BallisticaMain(int argc, char** argv) -> int {
std::string("Unhandled exception in BallisticaMain(): ") + exc.what();
// Exiting the app via an exception tends to trigger crash reports
// on various platforms. If it doesn't appear that we're an official live
// build then we'd rather just exit cleanly with an error code and avoid
// on various platforms. If it seems we're not on an official live
// build then we'd rather just exit cleanly with an error code and avoid
// polluting crash report logs from dev builds.
FatalError::ReportFatalError(error_msg, true);
bool exit_cleanly = !IsUnmodifiedBlessedBuild();
@ -210,7 +210,7 @@ auto FatalError(const std::string& message) -> void {
assert(handled);
}
auto GetUniqueSessionIdentifier() -> const std::string& {
auto GetAppInstanceUUID() -> const std::string& {
static std::string session_id;
static bool have_session_id = false;
@ -225,7 +225,7 @@ auto GetUniqueSessionIdentifier() -> const std::string& {
}
if (!have_session_id) {
// As an emergency fallback simply use a single random number.
Log("WARNING: GetUniqueSessionIdentifier() using rand fallback.");
Log("WARNING: GetSessionUUID() using rand fallback.");
srand(static_cast<unsigned int>(
Platform::GetCurrentMilliseconds())); // NOLINT
session_id = std::to_string(static_cast<uint32_t>(rand())); // NOLINT
@ -256,11 +256,7 @@ auto InAudioThread() -> bool {
}
auto InBGDynamicsThread() -> bool {
#if !BA_HEADLESS_BUILD
return (g_bg_dynamics_server && g_bg_dynamics_server->thread()->IsCurrent());
#else
return false;
#endif
}
auto InMediaThread() -> bool {

View File

@ -147,9 +147,9 @@ extern Utils* g_utils;
/// Main ballistica entry point.
auto BallisticaMain(int argc, char** argv) -> int;
/// Return a string that should be universally unique to this device and
/// Return a string that should be universally unique to this particular
/// running instance of the app.
auto GetUniqueSessionIdentifier() -> const std::string&;
auto GetAppInstanceUUID() -> const std::string&;
/// Have our main threads/modules all been inited yet?
auto IsBootstrapped() -> bool;
@ -242,7 +242,7 @@ inline auto HeadlessMode() -> bool {
/// by significant amounts (even if the app has been sleeping or whatnot).
auto GetRealTime() -> millisecs_t;
/// Return a random float value. Not guaranteed to be deterministic or
/// Return a random float value. Not guaranteed to be deterministic or
/// consistent across platforms.
inline auto RandomFloat() -> float {
// FIXME: should convert this to something thread-safe.

View File

@ -94,19 +94,6 @@ class ConnectionSet {
const std::vector<int>& clients)
-> void;
#if BA_GOOGLE_BUILD
auto PushClientDisconnectedGooglePlayCall(int id) -> void;
int GetGooglePlayClientCount() const;
auto PushHostConnectedGooglePlayCall() -> void;
auto PushClientConnectedGooglePlayCall(int id) -> void;
auto PushCompressedGamePacketFromHostGooglePlayCall(
const std::vector<uint8_t>& data) -> void;
auto PushCompressedGamePacketFromClientGooglePlayCall(
int google_client_id, const std::vector<uint8_t>& data) -> void;
auto ClientIDFromGooglePlayClientID(int google_id) -> int;
auto GooglePlayClientIDFromClientID(int client_id) -> int;
#endif
auto UDPConnectionPacket(const std::vector<uint8_t>& data,
const SockAddr& addr) -> void;
auto PushClientDisconnectedCall(int id) -> void;
@ -125,11 +112,6 @@ class ConnectionSet {
// Prevents us from printing multiple 'you got disconnected' messages.
bool printed_host_disconnect_{};
#if BA_GOOGLE_BUILD
std::unordered_map<int, int> google_play_id_to_client_id_map_;
std::unordered_map<int, int> client_id_to_google_play_id_map_;
#endif
};
} // namespace ballistica

View File

@ -41,34 +41,45 @@ class ConnectionToClient : public Connection {
/// account id has been verified by the master server.
auto IsAdmin() const -> bool;
private:
virtual auto ShouldPrintIncompatibleClientErrors() const -> bool;
auto kick_voted() const { return kick_voted_; }
auto set_kick_voted(bool val) { kick_voted_ = val; }
auto kick_vote_choice() const { return kick_vote_choice_; }
auto set_kick_vote_choice(bool val) { kick_vote_choice_ = val; }
auto set_next_kick_vote_allow_time(millisecs_t val) {
next_kick_vote_allow_time_ = val;
}
auto next_kick_vote_allow_time() const { return next_kick_vote_allow_time_; }
auto public_device_id() const { return public_device_id_; }
// Returns a spec for this client that incorporates their player names
// or their peer name if they have no players.
auto GetCombinedSpec() -> PlayerSpec;
private:
virtual auto ShouldPrintIncompatibleClientErrors() const -> bool;
auto GetClientInputDevice(int remote_id) -> ClientInputDevice*;
void Error(const std::string& error_msg) override;
std::string our_handshake_player_spec_str_;
std::string our_handshake_salt_;
std::string peer_public_account_id_;
ClientControllerInterface* controller_ = nullptr;
std::string public_device_id_;
ClientControllerInterface* controller_{};
std::unordered_map<int, ClientInputDevice*> client_input_devices_;
millisecs_t last_hand_shake_send_time_ = 0;
int id_ = -1;
int build_number_ = 0;
bool got_client_info_ = false;
bool kick_voted_ = false;
bool kick_vote_choice_ = false;
millisecs_t last_hand_shake_send_time_{};
int id_{-1};
int build_number_{};
bool got_client_info_{};
bool kick_voted_{};
bool kick_vote_choice_{};
std::string token_;
std::string peer_hash_;
PythonRef player_profiles_;
bool got_info_from_master_server_ = false;
bool got_info_from_master_server_{};
std::vector<millisecs_t> last_chat_times_;
millisecs_t next_kick_vote_allow_time_ = 0;
millisecs_t chat_block_time_ = 0;
millisecs_t last_remove_player_time_ = -99999;
int next_chat_block_seconds_ = 10;
friend class Game;
millisecs_t next_kick_vote_allow_time_{};
millisecs_t chat_block_time_{};
millisecs_t last_remove_player_time_{-99999};
int next_chat_block_seconds_{10};
};
} // namespace ballistica

View File

@ -20,19 +20,20 @@ class ConnectionToClientUDP : public ConnectionToClient {
~ConnectionToClientUDP() override;
void Update() override;
void HandleGamePacket(const std::vector<uint8_t>& buffer) override;
auto client_name() const -> const std::string& { return client_name_; }
auto client_instance_uuid() const { return client_instance_uuid_; }
auto GetAsUDP() -> ConnectionToClientUDP* override;
void RequestDisconnect() override;
protected:
uint8_t request_id_;
std::unique_ptr<SockAddr> addr_;
std::string client_name_;
bool did_die_;
void Die();
void SendDisconnectRequest();
auto SendGamePacketCompressed(const std::vector<uint8_t>& data)
-> void override;
private:
uint8_t request_id_;
std::unique_ptr<SockAddr> addr_;
std::string client_instance_uuid_;
bool did_die_;
millisecs_t last_client_response_time_;
void SendGamePacketCompressed(const std::vector<uint8_t>& data) override;
};
} // namespace ballistica

View File

@ -28,21 +28,20 @@ class ConnectionToHostUDP : public ConnectionToHost {
auto SwitchProtocol() -> bool;
void RequestDisconnect() override;
protected:
void SendGamePacketCompressed(const std::vector<uint8_t>& data) override;
void Error(const std::string& error_msg) override;
void Die();
void SendDisconnectRequest();
private:
void GetRequestID();
uint8_t request_id_{};
std::unique_ptr<SockAddr> addr_;
bool did_die_{};
void Die();
void SendDisconnectRequest();
millisecs_t last_client_id_request_time_{};
millisecs_t last_disconnect_request_time_{};
int client_id_{};
millisecs_t last_host_response_time_{};
void SendGamePacketCompressed(const std::vector<uint8_t>& data) override;
void Error(const std::string& error_msg) override;
private:
void GetRequestID();
};
} // namespace ballistica

View File

@ -396,7 +396,7 @@ void Game::UpdateKickVote() {
kick_vote_in_progress_ = false;
return;
}
millisecs_t current_time = GetRealTime();
millisecs_t current_time{GetRealTime()};
int total_client_count = 0;
int yes_votes = 0;
int no_votes = 0;
@ -405,8 +405,8 @@ void Game::UpdateKickVote() {
// the update and possibly perform the kick.
for (ConnectionToClient* client : connections()->GetConnectionsToClients()) {
++total_client_count;
if (client->kick_voted_) {
if (client->kick_vote_choice_) {
if (client->kick_voted()) {
if (client->kick_vote_choice()) {
++yes_votes;
} else {
++no_votes;
@ -437,8 +437,8 @@ void Game::UpdateKickVote() {
if (client == kick_vote_starter) {
delay += kKickVoteFailRetryDelayInitiatorExtra;
}
client->next_kick_vote_allow_time_ =
std::max(client->next_kick_vote_allow_time_, current_time + delay);
client->set_next_kick_vote_allow_time(
std::max(client->next_kick_vote_allow_time(), current_time + delay));
}
} else {
int votes_required;
@ -1826,26 +1826,6 @@ void Game::CleanUpBeforeConnectingToHost() {
SetPublicPartyEnabled(false);
}
void Game::PushV1PartyInviteCall(const std::string& name,
const std::string& invite_id) {
PushCall([this, name, invite_id] { V1PartyInvite(name, invite_id); });
}
void Game::V1PartyInvite(const std::string& name,
const std::string& invite_id) {
assert(InGameThread());
g_python->V1PartyInvite(name, invite_id);
}
void Game::PushV1PartyInviteRevokeCall(const std::string& invite_id) {
PushCall([this, invite_id] { V1PartyInviteRevoke(invite_id); });
}
void Game::V1PartyInviteRevoke(const std::string& invite_id) {
assert(InGameThread());
g_python->V1PartyInviteRevoke(invite_id);
}
auto Game::GetPartySize() const -> int {
assert(InGameThread());
assert(game_roster_ != nullptr);
@ -1897,7 +1877,6 @@ auto Game::GetGameRosterMessage() -> std::vector<uint8_t> {
// This message is simply a flattened json string of our roster (including
// terminating char).
char* s = cJSON_PrintUnformatted(game_roster_);
// printf("ROSTER MESSAGE %s\n", s);
auto s_len = strlen(s);
std::vector<uint8_t> msg(1 + s_len + 1);
msg[0] = BA_MESSAGE_PARTY_ROSTER;
@ -1965,13 +1944,13 @@ void Game::StartKickVote(ConnectionToClient* starter,
starter->SendScreenMessage(R"({"r":"kickVoteFailedNotEnoughVotersText",)"
R"("f":"kickVoteFailedText"})",
1, 0, 0);
} else if (current_time < starter->next_kick_vote_allow_time_) {
} else if (current_time < starter->next_kick_vote_allow_time()) {
// Not yet allowed error.
starter->SendScreenMessage(
R"({"r":"voteDelayText","s":[["${NUMBER}",")"
+ std::to_string(std::max(
millisecs_t{1},
(starter->next_kick_vote_allow_time_ - current_time) / 1000))
(starter->next_kick_vote_allow_time() - current_time) / 1000))
+ "\"]]}",
1, 0, 0);
} else {
@ -2014,10 +1993,10 @@ void Game::StartKickVote(ConnectionToClient* starter,
for (ConnectionToClient* client :
connections()->GetConnectionsToClients()) {
if (client == starter) {
client->kick_voted_ = true;
client->kick_vote_choice_ = true;
client->set_kick_voted(true);
client->set_kick_vote_choice(true);
} else {
client->kick_voted_ = false;
client->set_kick_voted(false);
}
}
}

View File

@ -36,9 +36,6 @@ class Game : public Module {
V1LoginState account_state,
const std::string& account_name,
const std::string& account_id) -> void;
auto PushV1PartyInviteCall(const std::string& name,
const std::string& invite_id) -> void;
auto PushV1PartyInviteRevokeCall(const std::string& invite_id) -> void;
auto PushInitialScreenCreatedCall() -> void;
auto PushApplyConfigCall() -> void;
auto PushRemoveGraphicsServerRenderHoldCall() -> void;
@ -252,9 +249,6 @@ class Game : public Module {
auto HandleQuitOnIdle() -> void;
auto InitSpecialChars() -> void;
auto Draw() -> void;
auto V1PartyInvite(const std::string& name, const std::string& invite_id)
-> void;
auto V1PartyInviteRevoke(const std::string& invite_id) -> void;
auto InitialScreenCreated() -> void;
auto MainMenuPress(InputDevice* device) -> void;
auto ScreenResize(float virtual_width, float virtual_height,

View File

@ -408,6 +408,7 @@ auto Utils::PtrToString(const void* val) -> std::string {
return buffer;
}
// FIXME: This should not live here.
static const char* g_default_random_names[] = {
"Flopsy", "Skippy", "Boomer", "Jolly", "Zeus", "Garth",
"Dizzy", "Mullet", "Ogre", "Ginger", "Nippy", "Murphy",

View File

@ -16,8 +16,8 @@ namespace ballistica {
class PlatformApple : public Platform {
public:
PlatformApple();
auto GetDeviceUUIDPrefix() -> std::string override;
auto GetRealDeviceUUID(std::string* uuid) -> bool override;
auto GetDeviceAccountUUIDPrefix() -> std::string override;
auto GetRealLegacyDeviceUUID(std::string* uuid) -> bool override;
auto GenerateUUID() -> std::string override;
auto GetDefaultConfigDir() -> std::string override;
auto GetLocale() -> std::string override;
@ -68,8 +68,6 @@ class PlatformApple : public Platform {
auto MacMusicAppStop() -> void override;
auto MacMusicAppPlayPlaylist(const std::string& playlist) -> bool override;
auto MacMusicAppGetPlaylists() -> std::list<std::string> override;
auto StartListeningForWiiRemotes() -> void override;
auto StopListeningForWiiRemotes() -> void override;
auto IsEventPushMode() -> bool override;
auto ContainsPythonDist() -> bool override;
auto GetPlatformName() -> std::string override;
@ -79,10 +77,9 @@ class PlatformApple : public Platform {
auto DoClipboardHasText() -> bool override;
auto DoClipboardSetText(const std::string& text) -> void override;
auto DoClipboardGetText() -> std::string override;
auto GetPublicDeviceUUIDInputs() -> std::list<std::string> override;
private:
// std::mutex log_mutex_;
// std::string log_line_;
};
} // namespace ballistica

View File

@ -29,6 +29,26 @@ std::string PlatformLinux::GenerateUUID() {
return val;
}
auto PlatformLinux::GetPublicDeviceUUIDInputs() -> std::list<std::string> {
std::list<std::string> out;
// For now let's just go with machine-id.
// Perhaps can add kernel version or something later.
char buffer[100];
if (FILE* infile = fopen("/etc/machine-id", "r")) {
int size = fread(buffer, 1, 99, infile);
fclose(infile);
if (size < 10) {
throw Exception("unexpected machine-id value");
}
buffer[size] = 0;
out.push_back(buffer);
} else {
throw Exception("/etc/machine-id not accessible");
}
return out;
};
bool PlatformLinux::DoHasTouchScreen() { return false; }
void PlatformLinux::DoOpenURL(const std::string& url) {

View File

@ -13,14 +13,15 @@ namespace ballistica {
class PlatformLinux : public Platform {
public:
PlatformLinux();
std::string GetDeviceUUIDPrefix() override { return "l"; }
std::string GenerateUUID() override;
bool DoHasTouchScreen() override;
void DoOpenURL(const std::string& url) override;
void OpenFileExternally(const std::string& path) override;
void OpenDirExternally(const std::string& path) override;
std::string GetPlatformName() override;
std::string GetSubplatformName() override;
auto GetDeviceAccountUUIDPrefix() -> std::string override { return "l"; }
auto GenerateUUID() -> std::string override;
auto DoHasTouchScreen() -> bool override;
auto DoOpenURL(const std::string& url) -> void override;
auto OpenFileExternally(const std::string& path) -> void override;
auto OpenDirExternally(const std::string& path) -> void override;
auto GetPlatformName() -> std::string override;
auto GetSubplatformName() -> std::string override;
auto GetPublicDeviceUUIDInputs() -> std::list<std::string> override;
};
} // namespace ballistica

View File

@ -110,33 +110,27 @@ auto Platform::Create() -> Platform* {
return platform;
}
void Platform::FinalCleanup() {
if (g_app_globals->temp_cleanup_callback) {
g_app_globals->temp_cleanup_callback();
}
}
Platform::Platform() : starttime_(GetCurrentMilliseconds()) {}
auto Platform::PostInit() -> void {}
Platform::~Platform() = default;
auto Platform::GetUniqueDeviceIdentifier() -> const std::string& {
auto Platform::GetLegacyDeviceUUID() -> const std::string& {
if (!have_device_uuid_) {
device_uuid_ = GetDeviceUUIDPrefix();
legacy_device_uuid_ = GetDeviceAccountUUIDPrefix();
std::string real_unique_uuid;
bool have_real_unique_uuid = GetRealDeviceUUID(&real_unique_uuid);
bool have_real_unique_uuid = GetRealLegacyDeviceUUID(&real_unique_uuid);
if (have_real_unique_uuid) {
device_uuid_ += real_unique_uuid;
legacy_device_uuid_ += real_unique_uuid;
}
// Keep demo/arcade uuids unique.
if (g_buildconfig.demo_build()) {
device_uuid_ += "_d";
legacy_device_uuid_ += "_d";
} else if (g_buildconfig.arcade_build()) {
device_uuid_ += "_a";
legacy_device_uuid_ += "_a";
}
// Ok, as a fallback on platforms where we don't yet have a way to get a
@ -153,13 +147,13 @@ auto Platform::GetUniqueDeviceIdentifier() -> const std::string& {
if (size >= 0) {
assert(size < 100);
buffer[size] = 0;
device_uuid_ += buffer;
legacy_device_uuid_ += buffer;
}
fclose(f);
} else {
// No existing one; generate it.
std::string val = GenerateUUID();
device_uuid_ += val;
legacy_device_uuid_ += val;
if (FILE* f2 = FOpen(path.c_str(), "wb")) {
size_t result = fwrite(val.c_str(), val.size(), 1, f2);
if (result != 1) Log("unable to write bsuuid file.");
@ -171,20 +165,50 @@ auto Platform::GetUniqueDeviceIdentifier() -> const std::string& {
}
have_device_uuid_ = true;
}
return device_uuid_;
return legacy_device_uuid_;
}
auto Platform::GetDeviceUUIDPrefix() -> std::string {
Log("GetDeviceUUIDPrefix() unimplemented");
auto Platform::GetDeviceAccountUUIDPrefix() -> std::string {
Log("GetDeviceAccountUUIDPrefix() unimplemented");
return "u";
}
auto Platform::GetRealDeviceUUID(std::string* uuid) -> bool { return false; }
auto Platform::GetRealLegacyDeviceUUID(std::string* uuid) -> bool {
return false;
}
auto Platform::GenerateUUID() -> std::string {
throw Exception("GenerateUUID() unimplemented");
}
auto Platform::GetPublicDeviceUUID() -> std::string {
assert(g_python);
if (public_device_uuid_.empty()) {
std::list<std::string> inputs{GetPublicDeviceUUIDInputs()};
// This UUID is supposed to change periodically, so let's plug in
// some stuff to enforce that.
inputs.emplace_back(GetOSVersionString());
inputs.emplace_back(kAppVersion);
inputs.emplace_back("kerploople");
// int i{};
// for (auto&& input : inputs) {
// printf("INPUT %d IS %s\n", i + 1, input.c_str());
// }
auto gil{Python::ScopedInterpreterLock()};
auto pylist{g_python->StringList(inputs)};
auto args{g_python->SingleMemberTuple(pylist)};
auto result = g_python->obj(Python::ObjID::kHashStringsCall).Call(args);
assert(result.UnicodeCheck());
public_device_uuid_ = result.Str();
}
return public_device_uuid_;
}
auto Platform::GetPublicDeviceUUIDInputs() -> std::list<std::string> {
throw Exception("GetPublicDeviceUUIDInputs unimplemented");
}
auto Platform::GetDefaultConfigDir() -> std::string {
std::string config_dir;
// As a default, look for a HOME env var and use that if present
@ -301,7 +325,7 @@ auto Platform::GetReplaysDir() -> std::string {
// rename() supporting UTF8 strings.
auto Platform::Rename(const char* oldname, const char* newname) -> int {
// this covers non-windows platforms
// This default implementation covers non-windows platforms.
#if BA_OSTYPE_WINDOWS
throw Exception();
#else
@ -310,7 +334,7 @@ auto Platform::Rename(const char* oldname, const char* newname) -> int {
}
auto Platform::Remove(const char* path) -> int {
// this covers non-windows platforms
// This default implementation covers non-windows platforms.
#if BA_OSTYPE_WINDOWS
throw Exception();
#else
@ -320,7 +344,7 @@ auto Platform::Remove(const char* path) -> int {
// stat() supporting UTF8 strings.
auto Platform::Stat(const char* path, struct BA_STAT* buffer) -> int {
// this covers non-windows platforms
// This default implementation covers non-windows platforms.
#if BA_OSTYPE_WINDOWS
throw Exception();
#else
@ -330,7 +354,7 @@ auto Platform::Stat(const char* path, struct BA_STAT* buffer) -> int {
// fopen() supporting UTF8 strings.
auto Platform::FOpen(const char* path, const char* mode) -> FILE* {
// this covers non-windows platforms
// This default implementation covers non-windows platforms.
#if BA_OSTYPE_WINDOWS
throw Exception();
#else
@ -349,12 +373,12 @@ auto Platform::GetSocketErrorString() -> std::string {
}
auto Platform::GetSocketError() -> int {
// by default this is simply errno
// By default this is simply errno.
return errno;
}
auto Platform::GetErrnoString() -> std::string {
// this covers non-windows platforms
// This default implementation covers non-windows platforms.
#if BA_OSTYPE_WINDOWS
throw Exception();
#elif BA_OSTYPE_LINUX
@ -419,7 +443,7 @@ auto Platform::DoGetUserPythonDirectory() -> std::string {
}
void Platform::DoMakeDir(const std::string& dir, bool quiet) {
// Default case here covers all non-windows platforms.
// This default implementation covers non-windows platforms.
#if BA_OSTYPE_WINDOWS
throw Exception();
#else
@ -740,7 +764,7 @@ auto Platform::BlockingFatalErrorDialog(const std::string& message) -> void {
}
void Platform::SetupDataDirectory() {
// This covers non-windows cases.
// This default implementation covers non-windows platforms.
#if BA_OSTYPE_WINDOWS
throw Exception();
#else
@ -763,7 +787,7 @@ void Platform::SetupDataDirectory() {
}
void Platform::SetEnv(const std::string& name, const std::string& value) {
// This covers non-windows cases.
// This default implementation covers non-windows platforms.
#if BA_OSTYPE_WINDOWS
throw Exception();
#else
@ -784,7 +808,7 @@ auto Platform::IsStdinATerminal() -> bool {
#endif
}
auto Platform::GetOSVersionString() -> std::string { return ""; }
auto Platform::GetOSVersionString() -> std::string { return "?"; }
auto Platform::GetUserAgentString() -> std::string {
std::string device = GetDeviceName();
@ -843,7 +867,7 @@ auto Platform::GetUserAgentString() -> std::string {
}
auto Platform::GetCWD() -> std::string {
// Covers non-windows cases.
// This default implementation covers non-windows platforms.
#if BA_OSTYPE_WINDOWS
throw Exception();
#else
@ -931,15 +955,15 @@ void Platform::AndroidQuitActivity() {
auto Platform::GetDeviceAccountID() -> std::string {
if (HeadlessMode()) {
return "S-" + GetUniqueDeviceIdentifier();
return "S-" + GetLegacyDeviceUUID();
}
// Everything else is just considered a 'local' account, though we may
// give unique ids for unique builds..
if (g_buildconfig.iircade_build()) {
return "L-iRc" + GetUniqueDeviceIdentifier();
return "L-iRc" + GetLegacyDeviceUUID();
}
return "L-" + GetUniqueDeviceIdentifier();
return "L-" + GetLegacyDeviceUUID();
}
auto Platform::DemangleCXXSymbol(const std::string& s) -> std::string {
@ -970,17 +994,6 @@ auto Platform::NewAutoReleasePool() -> void* { throw Exception(); }
void Platform::DrainAutoReleasePool(void* pool) { throw Exception(); }
auto Platform::AndroidGPGSNewConnectionToClient(int id) -> ConnectionToClient* {
throw Exception();
}
auto Platform::AndroidGPGSNewConnectionToHost() -> ConnectionToHost* {
throw Exception();
}
auto Platform::AndroidIsGPGSConnectionToClient(ConnectionToClient* c) -> bool {
throw Exception();
}
void Platform::OpenURL(const std::string& url) {
// Can't open URLs in VR - just tell the game thread to show the url.
if (IsVRMode()) {
@ -1064,18 +1077,6 @@ auto Platform::GetHasVideoAds() -> bool {
return GetHasAds();
}
void Platform::AndroidGPGSPartyInvitePlayers() {
Log("AndroidGPGSPartyInvitePlayers() unimplemented");
}
void Platform::AndroidGPGSPartyShowInvites() {
Log("AndroidGPGSPartyShowInvites() unimplemented");
}
void Platform::AndroidGPGSPartyInviteAccept(const std::string& invite_id) {
Log("AndroidGPGSPartyInviteAccept() unimplemented");
}
void Platform::SignIn(const std::string& account_type) {
Log("SignIn() unimplemented");
}
@ -1140,14 +1141,6 @@ auto Platform::MacMusicAppGetPlaylists() -> std::list<std::string> {
return {};
}
void Platform::StartListeningForWiiRemotes() {
Log("StartListeningForWiiRemotes() unimplemented");
}
void Platform::StopListeningForWiiRemotes() {
Log("StopListeningForWiiRemotes() unimplemented");
}
void Platform::SetCurrentThreadName(const std::string& name) {
// Currently we leave the main thread alone, otherwise we show up as
// "BallisticaMainThread" under "top" on linux (should check other platforms).
@ -1162,7 +1155,7 @@ void Platform::SetCurrentThreadName(const std::string& name) {
}
void Platform::Unlink(const char* path) {
// This covers all but windows.
// This default implementation covers non-windows platforms.
#if BA_OSTYPE_WINDOWS
throw Exception();
#else
@ -1199,7 +1192,7 @@ auto Platform::IsEventPushMode() -> bool { return false; }
auto Platform::GetDisplayResolution(int* x, int* y) -> bool { return false; }
void Platform::CloseSocket(int socket) {
// This covers all but windows.
// This default implementation covers non-windows platforms.
#if BA_OSTYPE_WINDOWS
throw Exception();
#else
@ -1207,18 +1200,8 @@ void Platform::CloseSocket(int socket) {
#endif
}
auto Platform::SocketPair(int domain, int type, int protocol, int socks[2])
-> int {
// This covers all but windows.
#if BA_OSTYPE_WINDOWS
throw Exception();
#else
return socketpair(domain, type, protocol, socks);
#endif
}
auto Platform::GetBroadcastAddrs() -> std::vector<uint32_t> {
// This covers all but windows.
// This default implementation covers non-windows platforms.
#if BA_OSTYPE_WINDOWS
throw Exception();
#else
@ -1252,7 +1235,7 @@ auto Platform::GetBroadcastAddrs() -> std::vector<uint32_t> {
}
auto Platform::SetSocketNonBlocking(int sd) -> bool {
// This covers all but windows.
// This default implementation covers non-windows platforms.
#if BA_OSTYPE_WINDOWS
throw Exception();
#else
@ -1363,7 +1346,7 @@ static void HandleSIGINT(int s) {
#endif
void Platform::SetupInterruptHandling() {
// For non-windows platforms, set up posix-y SIGINT handling.
// This default implementation covers non-windows platforms.
#if BA_OSTYPE_WINDOWS
throw Exception();
#else

View File

@ -15,12 +15,12 @@ namespace ballistica {
/// For capturing and printing stack-traces and related errors.
/// Platforms should subclass this and return instances in GetStackTrace().
/// Stack trace classes should capture the stack state immediately upon
/// construction but should do the bare minimum amount of work to store it.
/// Any expensive operations such as symbolification should be deferred until
/// GetDescription().
class PlatformStackTrace {
public:
// The stack trace should capture the stack state immediately upon
// construction but should do the bare minimum amount of work to store it. Any
// expensive operations such as symbolification should be deferred until
// GetDescription().
virtual ~PlatformStackTrace() = default;
// Return a human readable version of the trace (with symbolification if
@ -32,9 +32,9 @@ class PlatformStackTrace {
virtual auto copy() const noexcept -> PlatformStackTrace* = 0;
};
// This class attempts to abstract away most platform-specific functionality.
// Ideally we should need to pull in no platform-specific system headers outside
// of the platform*.cc files and can just go through this.
/// This class attempts to abstract away most platform-specific functionality.
/// Ideally we should need to pull in no platform-specific system headers
/// outside of the platform*.cc files and can just go through this.
class Platform {
public:
static auto Create() -> Platform*;
@ -49,60 +49,58 @@ class Platform {
virtual auto PostInit() -> void;
/// Create the proper App module and add it to the main_thread.
void CreateApp();
auto CreateApp() -> void;
/// Create the appropriate Graphics subclass for the app.
Graphics* CreateGraphics();
auto CreateGraphics() -> Graphics*;
virtual void CreateAuxiliaryModules();
virtual void WillExitMain(bool errored);
virtual auto CreateAuxiliaryModules() -> void;
virtual auto WillExitMain(bool errored) -> void;
// Inform the platform that all subsystems are up and running and it can
// start talking to them.
virtual void OnBootstrapComplete();
/// Inform the platform that all subsystems are up and running and it can
/// start talking to them.
virtual auto OnBootstrapComplete() -> void;
// Get/set values before standard game settings are available
// (for values needed before SDL init/etc).
// FIXME: We should have some sort of 'bootconfig.json' file for these.
// (or simply read the regular config in via c++ immediately)
// (or simply read the regular config in via c++ immediately)
auto GetLowLevelConfigValue(const char* key, int default_value) -> int;
void SetLowLevelConfigValue(const char* key, int value);
auto SetLowLevelConfigValue(const char* key, int value) -> void;
// Called when the app config is being read/applied.
virtual void ApplyConfig();
/// Called when the app config is being read/applied.
virtual auto ApplyConfig() -> void;
// Called when the app should set itself up to intercept ctrl-c presses.
virtual void SetupInterruptHandling();
void FinalCleanup();
/// Called when the app should set itself up to intercept ctrl-c presses.
virtual auto SetupInterruptHandling() -> void;
#pragma mark FILES -------------------------------------------------------------
// remove() support UTF8 strings.
/// remove() support UTF8 strings.
virtual auto Remove(const char* path) -> int;
// stat() supporting UTF8 strings.
/// stat() supporting UTF8 strings.
virtual auto Stat(const char* path, struct BA_STAT* buffer) -> int;
// fopen() supporting UTF8 strings.
/// fopen() supporting UTF8 strings.
virtual auto FOpen(const char* path, const char* mode) -> FILE*;
// rename() supporting UTF8 strings.
// For cross-platform consistency, this should also remove any file that
// exists at the target location first.
/// rename() supporting UTF8 strings.
/// For cross-platform consistency, this should also remove any file that
/// exists at the target location first.
virtual auto Rename(const char* oldname, const char* newname) -> int;
// Simple cross-platform check for existence of a file.
/// Simple cross-platform check for existence of a file.
auto FilePathExists(const std::string& name) -> bool;
/// Attempt to make a directory; raise an Exception if unable,
/// unless quiet is true.
void MakeDir(const std::string& dir, bool quiet = false);
auto MakeDir(const std::string& dir, bool quiet = false) -> void;
// Return the current working directory.
/// Return the current working directory.
virtual auto GetCWD() -> std::string;
// Unlink a file.
/// Unlink a file.
virtual auto Unlink(const char* path) -> void;
/// Return the absolute path for the provided path. Note that this requires
@ -132,7 +130,7 @@ class Platform {
// Send a message to the default platform handler.
// IMPORTANT: No Object::Refs should be created or destroyed within this call,
// or deadlock can occur.
virtual void HandleLog(const std::string& msg);
virtual auto HandleLog(const std::string& msg) -> void;
#pragma mark ENVIRONMENT -------------------------------------------------------
@ -150,15 +148,6 @@ class Platform {
// Return the interface type based on the environment (phone, tablet, etc).
virtual auto GetUIScale() -> UIScale;
// Return a string *reasonably* likely to be unique and consistent for this
// device. Do not assume this is globally unique and *do not* assume that it
// will never ever change (hardware upgrades may affect it, etc).
// IMPORTANT: This value should NEVER be sent over the wire to peers.
virtual auto GetUniqueDeviceIdentifier() -> const std::string&;
// Returns the ID to use for the device account
auto GetDeviceAccountID() -> std::string;
auto GetConfigDirectory() -> std::string;
auto GetConfigFilePath() -> std::string;
auto GetUserPythonDirectory() -> std::string;
@ -176,36 +165,62 @@ class Platform {
/// Raises an exception on errors.
virtual void SetEnv(const std::string& name, const std::string& value);
// Are we being run from a terminal? (should we show prompts, etc?).
/// Are we being run from a terminal? (should we show prompts, etc?).
virtual auto IsStdinATerminal() -> bool;
// Return hostname or other id suitable for network searches, etc.
/// Return hostname or other id suitable for displaying in network search
/// results, etc.
auto GetDeviceName() -> std::string;
// Are we running on a tv?
/// Get a UUID for use with things like device-accounts. This function
/// should not be used for other purposes, should not be modified, and
/// eventually should go away after device accounts are phased out.
/// Also, this value should never be shared beyond the local device.
auto GetLegacyDeviceUUID() -> const std::string&;
/// Get a UUID for the current device that is meant to be publicly shared.
/// This value will change occasionally due to OS updates, app updates, or
/// other factors, so it can not be used as a permanent identifier, but it
/// should remain constant over short periods and should not be easily
/// changeable by the user, making it useful for purposes such as temporary
/// server bans or spam prevention.
auto GetPublicDeviceUUID() -> std::string;
/// Return values which will be hashed to create a public device uuid.
/// These values may include things that may change periodically such
/// as minor os version numbers, but they should not include things
/// that change constantly or that can be changed easily by the user.
/// Only hashed versions of these values should ever be shared beyond
/// the local device.
virtual auto GetPublicDeviceUUIDInputs() -> std::list<std::string>;
/// Return whether there is an actual legacy-device-uuid value for
/// this platform, and also return it if so.
virtual auto GetRealLegacyDeviceUUID(std::string* uuid) -> bool;
/// Are we running on a tv?
virtual auto IsRunningOnTV() -> bool;
// Are we on a daydream enabled android device?
/// Are we on a daydream-enabled Android device?
virtual auto IsRunningOnDaydream() -> bool;
// Do we have touchscreen hardware?
/// Do we have touchscreen hardware?
auto HasTouchScreen() -> bool;
// Are we running on a desktop setup in general?
/// Are we running on a desktop setup in general?
virtual auto IsRunningOnDesktop() -> bool;
// Are we running on fireTV hardware?
/// Are we running on fireTV hardware?
virtual auto IsRunningOnFireTV() -> bool;
// Return the external storage path (currently only relevant on android).
/// Return the external storage path (currently only relevant on Android).
virtual auto GetExternalStoragePath() -> std::string;
// For enabling some special hardware optimizations for nvidia.
auto is_tegra_k1() const -> bool { return is_tegra_k1_; }
void set_is_tegra_k1(bool val) { is_tegra_k1_ = val; }
auto set_is_tegra_k1(bool val) -> void { is_tegra_k1_ = val; }
// Return true if this platform includes its own python distribution
// (defaults to false).
/// Return whether this platform includes its own Python distribution
virtual auto ContainsPythonDist() -> bool;
#pragma mark INPUT DEVICES -----------------------------------------------------
@ -215,32 +230,26 @@ class Platform {
#pragma mark IN APP PURCHASES --------------------------------------------------
virtual void Purchase(const std::string& item);
virtual auto Purchase(const std::string& item) -> void;
// Restore purchases (currently only relevant on apple platforms).
virtual void RestorePurchases();
// Restore purchases (currently only relevant on Apple platforms).
virtual auto RestorePurchases() -> void;
// purchase ack'ed by the master-server (so can consume)
virtual void PurchaseAck(const std::string& purchase,
const std::string& order_id);
// Purchase was ack'ed by the master-server (so can consume).
virtual auto PurchaseAck(const std::string& purchase,
const std::string& order_id) -> void;
#pragma mark ANDROID -----------------------------------------------------------
virtual auto GetAndroidExecArg() -> std::string;
virtual void AndroidSetResString(const std::string& res);
virtual auto AndroidIsGPGSConnectionToClient(ConnectionToClient* c) -> bool;
virtual auto AndroidGPGSNewConnectionToClient(int id) -> ConnectionToClient*;
virtual auto AndroidGPGSNewConnectionToHost() -> ConnectionToHost*;
virtual void AndroidSynthesizeBackPress();
virtual void AndroidQuitActivity();
virtual void AndroidShowAppInvite(const std::string& title,
virtual auto AndroidSetResString(const std::string& res) -> void;
virtual auto AndroidSynthesizeBackPress() -> void;
virtual auto AndroidQuitActivity() -> void;
virtual auto AndroidShowAppInvite(const std::string& title,
const std::string& message,
const std::string& code);
virtual void AndroidRefreshFile(const std::string& file);
virtual void AndroidGPGSPartyInvitePlayers();
virtual void AndroidGPGSPartyShowInvites();
virtual void AndroidGPGSPartyInviteAccept(const std::string& invite_id);
virtual void AndroidShowWifiSettings();
const std::string& code) -> void;
virtual auto AndroidRefreshFile(const std::string& file) -> void;
virtual auto AndroidShowWifiSettings() -> void;
#pragma mark PERMISSIONS -------------------------------------------------------
@ -249,7 +258,7 @@ class Platform {
/// then this may also present a message or pop-up instructing the user how
/// to manually grant the permission (up to individual platforms to
/// implement).
virtual void RequestPermission(Permission p);
virtual auto RequestPermission(Permission p) -> void;
/// Returns true if this permission has been granted (or if asking is not
/// required for it).
@ -257,24 +266,26 @@ class Platform {
#pragma mark ANALYTICS ---------------------------------------------------------
virtual void SetAnalyticsScreen(const std::string& screen);
virtual void IncrementAnalyticsCount(const std::string& name, int increment);
virtual void IncrementAnalyticsCountRaw(const std::string& name,
int increment);
virtual void IncrementAnalyticsCountRaw2(const std::string& name,
int uses_increment, int increment);
virtual void SubmitAnalyticsCounts();
virtual auto SetAnalyticsScreen(const std::string& screen) -> void;
virtual auto IncrementAnalyticsCount(const std::string& name, int increment)
-> void;
virtual auto IncrementAnalyticsCountRaw(const std::string& name,
int increment) -> void;
virtual auto IncrementAnalyticsCountRaw2(const std::string& name,
int uses_increment, int increment)
-> void;
virtual auto SubmitAnalyticsCounts() -> void;
#pragma mark APPLE -------------------------------------------------------------
virtual auto NewAutoReleasePool() -> void*;
virtual void DrainAutoReleasePool(void* pool);
virtual auto DrainAutoReleasePool(void* pool) -> void;
// FIXME: Can we consolidate these with the general music playback calls?
virtual void MacMusicAppInit();
virtual auto MacMusicAppInit() -> void;
virtual auto MacMusicAppGetVolume() -> int;
virtual void MacMusicAppSetVolume(int volume);
virtual void MacMusicAppGetLibrarySource();
virtual void MacMusicAppStop();
virtual auto MacMusicAppSetVolume(int volume) -> void;
virtual auto MacMusicAppGetLibrarySource() -> void;
virtual auto MacMusicAppStop() -> void;
virtual auto MacMusicAppPlayPlaylist(const std::string& playlist) -> bool;
virtual auto MacMusicAppGetPlaylists() -> std::list<std::string>;
@ -282,9 +293,9 @@ class Platform {
// Set bounds/width info for a bit of text.
// (will only be called in BA_ENABLE_OS_FONT_RENDERING is set)
virtual void GetTextBoundsAndWidth(const std::string& text, Rect* r,
float* width);
virtual void FreeTextTexture(void* tex);
virtual auto GetTextBoundsAndWidth(const std::string& text, Rect* r,
float* width) -> void;
virtual auto FreeTextTexture(void* tex) -> void;
virtual auto CreateTextTexture(int width, int height,
const std::vector<std::string>& strings,
const std::vector<float>& positions,
@ -296,21 +307,28 @@ class Platform {
virtual auto SignIn(const std::string& account_type) -> void;
virtual auto SignOut() -> void;
virtual auto GameCenterLogin() -> void;
virtual auto LoginDidChange() -> void;
/// Returns the ID to use for the device account.
auto GetDeviceAccountID() -> std::string;
/// Return the prefix to use for device-account ids on this platform.
virtual auto GetDeviceAccountUUIDPrefix() -> std::string;
#pragma mark MUSIC PLAYBACK ----------------------------------------------------
// FIXME: currently these are wired up on android; need to generalize
// FIXME: currently these are wired up on Android; need to generalize
// to support mac/itunes or other music player types.
virtual void MusicPlayerPlay(PyObject* target);
virtual void MusicPlayerStop();
virtual void MusicPlayerShutdown();
virtual void MusicPlayerSetVolume(float volume);
virtual auto MusicPlayerPlay(PyObject* target) -> void;
virtual auto MusicPlayerStop() -> void;
virtual auto MusicPlayerShutdown() -> void;
virtual auto MusicPlayerSetVolume(float volume) -> void;
#pragma mark ADS ---------------------------------------------------------------
virtual void ShowAd(const std::string& purpose);
virtual auto ShowAd(const std::string& purpose) -> void;
// Return whether we have the ability to show *any* ads.
virtual auto GetHasAds() -> bool;
@ -327,62 +345,60 @@ class Platform {
virtual auto ConvertIncomingLeaderboardScore(
const std::string& leaderboard_id, int score) -> int;
virtual void GetFriendScores(const std::string& game,
virtual auto GetFriendScores(const std::string& game,
const std::string& game_version,
void* py_callback);
virtual void SubmitScore(const std::string& game, const std::string& version,
int64_t score);
virtual void ReportAchievement(const std::string& achievement);
void* py_callback) -> void;
virtual auto SubmitScore(const std::string& game, const std::string& version,
int64_t score) -> void;
virtual auto ReportAchievement(const std::string& achievement) -> void;
virtual auto HaveLeaderboard(const std::string& game,
const std::string& config) -> bool;
virtual void ShowOnlineScoreUI(const std::string& show,
virtual auto ShowOnlineScoreUI(const std::string& show,
const std::string& game,
const std::string& game_version);
virtual void ResetAchievements();
const std::string& game_version) -> void;
virtual auto ResetAchievements() -> void;
#pragma mark NETWORKING --------------------------------------------------------
virtual void CloseSocket(int socket);
virtual auto SocketPair(int domain, int type, int protocol, int socks[2])
-> int;
virtual auto CloseSocket(int socket) -> void;
virtual auto GetBroadcastAddrs() -> std::vector<uint32_t>;
virtual auto SetSocketNonBlocking(int sd) -> bool;
#pragma mark ERRORS & DEBUGGING ------------------------------------------------
// Should return a subclass of PlatformStackTrace allocated via new.
// Platforms with no meaningful stack trace functionality can return nullptr.
/// Should return a subclass of PlatformStackTrace allocated via new.
/// Platforms with no meaningful stack trace functionality can return nullptr.
virtual auto GetStackTrace() -> PlatformStackTrace*;
// Called during stress testing.
virtual auto GetMemUsageInfo() -> std::string;
// Optionally override fatal error reporting. If true is returned, default
// fatal error reporting will not run.
/// Optionally override fatal error reporting. If true is returned, default
/// fatal error reporting will not run.
virtual auto ReportFatalError(const std::string& message,
bool in_top_level_exception_handler) -> bool;
// Optionally override fatal error handling. If true is returned, default
// fatal error handling will not run.
/// Optionally override fatal error handling. If true is returned, default
/// fatal error handling will not run.
virtual auto HandleFatalError(bool exit_cleanly,
bool in_top_level_exception_handler) -> bool;
// If this platform has the ability to show a blocking dialog on the main
// thread for fatal errors, return true here.
/// If this platform has the ability to show a blocking dialog on the main
/// thread for fatal errors, return true here.
virtual auto CanShowBlockingFatalErrorDialog() -> bool;
// Called on the main thread when a fatal error occurs.
// Will only be called if CanShowBlockingFatalErrorDialog() is true.
/// Called on the main thread when a fatal error occurs.
/// Will only be called if CanShowBlockingFatalErrorDialog() is true.
virtual auto BlockingFatalErrorDialog(const std::string& message) -> void;
// Use this instead of looking at errno (translates winsock errors to errno).
/// Use this instead of looking at errno (translates winsock errors to errno).
virtual auto GetSocketError() -> int;
// Return a string for the current value of errno.
/// Return a string for the current value of errno.
virtual auto GetErrnoString() -> std::string;
// Return a description of errno (unix) or WSAGetLastError() (windows).
/// Return a description of errno (unix) or WSAGetLastError() (windows).
virtual auto GetSocketErrorString() -> std::string;
/// Set a key to be included in crash logs or other debug cases.
@ -426,60 +442,58 @@ class Platform {
static auto GetCurrentMilliseconds() -> millisecs_t;
static auto GetCurrentSeconds() -> int64_t;
static void SleepMS(millisecs_t ms);
static auto SleepMS(millisecs_t ms) -> void;
// Pop up a text edit dialog.
virtual void EditText(const std::string& title, const std::string& value,
int max_chars);
/// Pop up a text edit dialog.
virtual auto EditText(const std::string& title, const std::string& value,
int max_chars) -> void;
// Open the provided URL in a browser or whatnot.
void OpenURL(const std::string& url);
/// Open the provided URL in a browser or whatnot.
auto OpenURL(const std::string& url) -> void;
/// Given a C++ symbol, attempt to return a pretty one.
virtual auto DemangleCXXSymbol(const std::string& s) -> std::string;
// Called each time through the main event loop; for custom pumping/handling.
virtual void RunEvents();
/// Called each time through the main event loop;
/// for custom pumping/handling.
virtual auto RunEvents() -> void;
// Called when the app module is pausing.
// Note: only app-thread (main thread) stuff should happen here.
// (don't push calls to other threads/etc).
virtual void OnAppPause();
/// Called when the app module is pausing.
/// Note: only app-thread (main thread) stuff should happen here.
/// (don't push calls to other threads/etc).
virtual auto OnAppPause() -> void;
// Called when the app module is resuming.
virtual void OnAppResume();
/// Called when the app module is resuming.
virtual auto OnAppResume() -> void;
// Is the OS currently playing music? (so we can avoid doing so).
/// Is the OS currently playing music? (so we can avoid doing so).
virtual auto IsOSPlayingMusic() -> bool;
// Pass platform-specific misc-read-vals along to the OS (as a json string).
virtual void SetPlatformMiscReadVals(const std::string& vals);
/// Pass platform-specific misc-read-vals along to the OS (as a json string).
virtual auto SetPlatformMiscReadVals(const std::string& vals) -> void;
// Show/hide the hardware cursor.
virtual void SetHardwareCursorVisible(bool visible);
/// Show/hide the hardware cursor.
virtual auto SetHardwareCursorVisible(bool visible) -> void;
// Get the most up-to-date cursor position.
virtual void GetCursorPosition(float* x, float* y);
/// Get the most up-to-date cursor position.
virtual auto GetCursorPosition(float* x, float* y) -> void;
// Quit the app (can be immediate or via posting some high level event).
virtual void QuitApp();
/// Quit the app (can be immediate or via posting some high level event).
virtual auto QuitApp() -> void;
// Do we want to deprecate this?...
virtual void GetScoresToBeat(const std::string& level,
const std::string& config, void* py_callback);
// Note to self: do we want to deprecate this?...
virtual auto GetScoresToBeat(const std::string& level,
const std::string& config, void* py_callback)
-> void;
// Open a file using the system default method (in another app, etc.)
virtual void OpenFileExternally(const std::string& path);
/// Open a file using the system default method (in another app, etc.)
virtual auto OpenFileExternally(const std::string& path) -> void;
// Open a directory using the system default method (Finder, etc.)
virtual void OpenDirExternally(const std::string& path);
/// Open a directory using the system default method (Finder, etc.)
virtual auto OpenDirExternally(const std::string& path) -> void;
// Currently mac-only (could be generalized though).
virtual void StartListeningForWiiRemotes();
// Currently mac-only (could be generalized though).
virtual void StopListeningForWiiRemotes();
// Set the name of the current thread (for debugging).
virtual void SetCurrentThreadName(const std::string& name);
/// Set the name of the current thread (for debugging).
virtual auto SetCurrentThreadName(const std::string& name) -> void;
// If display-resolution can be directly set on this platform,
// return true and set the native full res here. Otherwise return false;
@ -490,36 +504,32 @@ class Platform {
}
protected:
// Open the provided URL in a browser or whatnot.
virtual void DoOpenURL(const std::string& url);
/// Open the provided URL in a browser or whatnot.
virtual auto DoOpenURL(const std::string& url) -> void;
// Called once per platform to determine touchscreen presence.
/// Called once per platform to determine touchscreen presence.
virtual auto DoHasTouchScreen() -> bool;
/// Platforms should override this to provide device name.
virtual auto DoGetDeviceName() -> std::string;
// Attempt to actually create a directory.
// Should not except if it already exists or if quiet is true.
virtual void DoMakeDir(const std::string& dir, bool quiet);
/// Attempt to actually create a directory.
/// Should not raise Exceptions if it already exists or
/// if quiet is true.
virtual auto DoMakeDir(const std::string& dir, bool quiet) -> void;
// Attempt to actually get an abs path. This will only be called if
// the path is valid and exists.
/// Attempt to actually get an abs path. This will only be called if
/// the path is valid and exists.
virtual auto DoAbsPath(const std::string& path, std::string* outpath) -> bool;
// Calc the user scripts dir path for this platform.
// This will be called once and the path cached.
/// Calc the user scripts dir path for this platform.
/// This will be called once and the path cached.
virtual auto DoGetUserPythonDirectory() -> std::string;
// Return the default config directory for this platform.
/// Return the default config directory for this platform.
virtual auto GetDefaultConfigDir() -> std::string;
// Return the prefix to use for device UUIDs on this platform.
virtual auto GetDeviceUUIDPrefix() -> std::string;
// Return whether there is an actual unique UUID available for this platform,
// and also return it if so.
virtual auto GetRealDeviceUUID(std::string* uuid) -> bool;
// Generate a random UUID string.
/// Generate a random UUID string.
virtual auto GenerateUUID() -> std::string;
virtual auto DoClipboardIsSupported() -> bool;
@ -537,13 +547,14 @@ class Platform {
bool have_clipboard_is_supported_{};
bool clipboard_is_supported_{};
millisecs_t starttime_{};
std::string device_uuid_;
std::string legacy_device_uuid_;
bool have_device_uuid_{};
std::string config_dir_;
std::string user_scripts_dir_;
std::string app_python_dir_;
std::string site_python_dir_;
std::string replays_dir_;
std::string public_device_uuid_;
};
} // namespace ballistica

View File

@ -325,7 +325,7 @@ SDLApp::SDLApp(Thread* thread) : App(thread) {
// SDL events the moment they're generated and we process them immediately.
// This way we don't have to poll for events and can be purely callback-based,
// which fits in nicely with most modern event models.
if (!UsesEventLoop()) {
if (!ManagesEventLoop()) {
#if BA_SDL2_BUILD
SDL_SetEventFilter(FilterSDL2Event, nullptr);
#else

View File

@ -127,6 +127,28 @@ void PlatformWindows::SetupInterruptHandling() {
}
}
auto PlatformWindows::GetPublicDeviceUUIDInputs() -> std::list<std::string> {
std::list<std::string> out;
std::string ret;
char value[64];
DWORD size = _countof(value);
DWORD type = REG_SZ;
HKEY key;
LONG retKey =
::RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Cryptography",
0, KEY_READ | KEY_WOW64_64KEY, &key);
LONG retVal = ::RegQueryValueExA(key, "MachineGuid", nullptr, &type,
(LPBYTE)value, &size);
if (retKey == ERROR_SUCCESS && retVal == ERROR_SUCCESS) {
ret = value;
}
::RegCloseKey(key);
out.push_back(ret);
return out;
}
std::string PlatformWindows::GenerateUUID() {
std::string val;
UUID uuid;
@ -828,87 +850,6 @@ void PlatformWindows::Unlink(const char* path) { _unlink(path); }
void PlatformWindows::CloseSocket(int socket) { closesocket(socket); }
int PlatformWindows::SocketPair(int domain, int type, int protocol,
int socks_out[2]) {
assert(type == SOCK_STREAM);
int make_overlapped = false;
union {
struct sockaddr_in inaddr;
struct sockaddr addr;
} a;
SOCKET listener;
int e;
socklen_t addrlen = sizeof(a.inaddr);
DWORD flags = 0;
int reuse = 1;
int nodelay = 1;
listener = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listener < 0) {
return SOCKET_ERROR;
}
memset(&a, 0, sizeof(a));
a.inaddr.sin_family = AF_INET;
a.inaddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
a.inaddr.sin_port = 0;
SOCKET socks[2];
socks[0] = socks[1] = INVALID_SOCKET;
do {
if (setsockopt(listener, SOL_SOCKET, SO_REUSEADDR,
reinterpret_cast<char*>(&reuse), (socklen_t)sizeof(reuse))
== -1) {
break;
}
if (bind(listener, &a.addr, sizeof(a.inaddr)) == SOCKET_ERROR) {
break;
}
if (getsockname(listener, &a.addr, &addrlen) == SOCKET_ERROR) {
break;
}
if (listen(listener, 1) == SOCKET_ERROR) {
break;
}
socks[0] = socket(AF_INET, SOCK_STREAM, 0);
if (socks[0] < 0) {
break;
}
if (connect(socks[0], &a.addr, sizeof(a.inaddr)) == SOCKET_ERROR) {
break;
}
socks[1] = accept(listener, nullptr, nullptr);
// not sure if this helps but what the hey...
if (setsockopt(socks[0], IPPROTO_TCP, TCP_NODELAY,
reinterpret_cast<char*>(&nodelay),
(socklen_t)sizeof(nodelay))
== -1)
break;
if (setsockopt(socks[1], IPPROTO_TCP, TCP_NODELAY,
reinterpret_cast<char*>(&nodelay),
(socklen_t)sizeof(nodelay))
== -1) {
break;
}
if (socks[1] < 0) break;
closesocket(listener);
socks_out[0] = static_cast_check_fit<int>(socks[0]);
socks_out[1] = static_cast_check_fit<int>(socks[1]);
return 0;
} while (0);
e = WSAGetLastError();
closesocket(listener);
closesocket(socks[0]);
closesocket(socks[1]);
WSASetLastError(e);
return SOCKET_ERROR;
}
std::vector<uint32_t> PlatformWindows::GetBroadcastAddrs() {
#define MALLOC(x) HeapAlloc(GetProcessHeap(), 0, (x))
#define FREE(x) HeapFree(GetProcessHeap(), 0, (x))

View File

@ -15,7 +15,8 @@ class PlatformWindows : public Platform {
public:
PlatformWindows();
void SetupInterruptHandling() override;
auto GetDeviceUUIDPrefix() -> std::string override { return "w"; }
auto GetDeviceAccountUUIDPrefix() -> std::string override { return "w"; }
auto GetPublicDeviceUUIDInputs() -> std::list<std::string> override;
auto GenerateUUID() -> std::string override;
auto GetDefaultConfigDir() -> std::string override;
auto Remove(const char* path) -> int;
@ -42,8 +43,6 @@ class PlatformWindows : public Platform {
void OpenDirExternally(const std::string& path) override;
void Unlink(const char* path) override;
void CloseSocket(int socket) override;
auto SocketPair(int domain, int type, int protocol, int socks[2])
-> int override;
auto GetBroadcastAddrs() -> std::vector<uint32_t> override;
auto SetSocketNonBlocking(int sd) -> bool override;
auto GetPlatformName() -> std::string override;

View File

@ -43,23 +43,6 @@ auto PyHaveTouchScreenInput(PyObject* self, PyObject* args) -> PyObject* {
BA_PYTHON_CATCH;
}
auto PyStartListeningForWiiRemotes(PyObject* self, PyObject* args)
-> PyObject* {
BA_PYTHON_TRY;
Platform::SetLastPyCall("start_listening_for_wii_remotes");
g_platform->StartListeningForWiiRemotes();
Py_RETURN_NONE;
BA_PYTHON_CATCH;
}
auto PyStopListeningForWiiRemotes(PyObject* self, PyObject* args) -> PyObject* {
BA_PYTHON_TRY;
Platform::SetLastPyCall("stop_listening_for_wii_remotes");
g_platform->StopListeningForWiiRemotes();
Py_RETURN_NONE;
BA_PYTHON_CATCH;
}
auto PySetTouchscreenEditing(PyObject* self, PyObject* args) -> PyObject* {
BA_PYTHON_TRY;
Platform::SetLastPyCall("set_touchscreen_editing");
@ -314,22 +297,6 @@ auto PythonMethodsInput::GetMethods() -> std::vector<PyMethodDef> {
"\n"
"(internal)"},
{"stop_listening_for_wii_remotes", PyStopListeningForWiiRemotes,
METH_VARARGS,
"stop_listening_for_wii_remotes() -> None\n"
"\n"
"(internal)\n"
"\n"
"Stop listening for connections from wii remotes."},
{"start_listening_for_wii_remotes", PyStartListeningForWiiRemotes,
METH_VARARGS,
"start_listening_for_wii_remotes() -> None\n"
"\n"
"(internal)\n"
"\n"
"Start listening for connections from wii remotes."},
{"have_touchscreen_input", PyHaveTouchScreenInput, METH_VARARGS,
"have_touchscreen_input() -> bool\n"
"\n"

View File

@ -22,7 +22,7 @@
#include "ballistica/ui/widget/scroll_widget.h"
#if !BA_HEADLESS_BUILD
extern "C" void SDL_ericf_focus();
extern "C" void SDL_ericf_focus(void);
#endif
namespace ballistica {
@ -2010,20 +2010,6 @@ auto PyShowProgressBar(PyObject* self, PyObject* args, PyObject* keywds)
BA_PYTHON_CATCH;
}
auto PyShowInvitesUI(PyObject* self, PyObject* args, PyObject* keywds)
-> PyObject* {
BA_PYTHON_TRY;
Platform::SetLastPyCall("show_invites_ui");
static const char* kwlist[] = {nullptr};
if (!PyArg_ParseTupleAndKeywords(args, keywds, "",
const_cast<char**>(kwlist))) {
return nullptr;
}
g_platform->AndroidGPGSPartyShowInvites();
Py_RETURN_NONE;
BA_PYTHON_CATCH;
}
auto PySetPartyIconAlwaysVisible(PyObject* self, PyObject* args,
PyObject* keywds) -> PyObject* {
BA_PYTHON_TRY;
@ -2389,14 +2375,6 @@ auto PythonMethodsUI::GetMethods() -> std::vector<PyMethodDef> {
"\n"
"(internal)"},
{"show_invites_ui", (PyCFunction)PyShowInvitesUI,
METH_VARARGS | METH_KEYWORDS,
"show_invites_ui() -> None\n"
"\n"
"(internal)\n"
"\n"
"Category: General Utility Functions"},
{"show_progress_bar", (PyCFunction)PyShowProgressBar,
METH_VARARGS | METH_KEYWORDS,
"show_progress_bar() -> None\n"

View File

@ -1182,6 +1182,24 @@ void Python::ShowURL(const std::string& url) {
}
}
auto Python::StringList(const std::list<std::string>& values) -> PythonRef {
assert(HaveGIL());
PythonRef pylist{PyList_New(values.size()), PythonRef::kSteal};
int i{};
for (auto&& value : values) {
PyObject* item{PyUnicode_FromString(value.c_str())};
assert(item);
PyList_SET_ITEM(pylist.get(), i, item);
++i;
}
return pylist;
}
auto Python::SingleMemberTuple(const PythonRef& member) -> PythonRef {
assert(HaveGIL());
return PythonRef(Py_BuildValue("(O)", member.NewRef()), PythonRef::kSteal);
}
auto Python::FilterChatMessage(std::string* message, int client_id) -> bool {
assert(message);
ScopedSetContext cp(g_game->GetUIContext());
@ -2322,30 +2340,6 @@ auto Python::ObjToString(PyObject* obj) -> std::string {
}
}
void Python::V1PartyInvite(const std::string& player,
const std::string& invite_id) {
ScopedSetContext cp(g_game->GetUIContext());
PythonRef args(
Py_BuildValue(
"(OO)",
PythonRef(PyUnicode_FromString(player.c_str()), PythonRef::kSteal)
.get(),
PythonRef(PyUnicode_FromString(invite_id.c_str()), PythonRef::kSteal)
.get()),
PythonRef::kSteal);
obj(ObjID::kHandlePartyInviteCall).Call(args);
}
void Python::V1PartyInviteRevoke(const std::string& invite_id) {
ScopedSetContext cp(g_game->GetUIContext());
PythonRef args(
Py_BuildValue("(O)", PythonRef(PyUnicode_FromString(invite_id.c_str()),
PythonRef::kSteal)
.get()),
PythonRef::kSteal);
obj(ObjID::kHandlePartyInviteRevokeCall).Call(args);
}
void Python::StoreObj(ObjID id, PyObject* pyobj, bool incref) {
assert(id < ObjID::kLast);
assert(pyobj);

View File

@ -142,8 +142,6 @@ class Python {
/// is useful as an object identifier/etc.
static auto GetPythonFileLocation(bool pretty = true) -> std::string;
void V1PartyInvite(const std::string& player, const std::string& invite_id);
void V1PartyInviteRevoke(const std::string& invite_id);
void set_env_obj(PyObject* obj) { env_ = obj; }
auto env_obj() const -> PyObject* {
assert(env_);
@ -270,7 +268,6 @@ class Python {
kOnScreenKeyboardClass,
kFilterChatMessageCall,
kHandleLocalChatMessageCall,
kHandlePartyInviteCall,
kHandlePartyInviteRevokeCall,
kDoPlayMusicCall,
kDeepLinkCall,
@ -352,6 +349,7 @@ class Python {
kGetPlayerIconCall,
kLstrFromJsonCall,
kUUIDStrCall,
kHashStringsCall,
kLast // Sentinel; must be at end.
};
@ -373,6 +371,12 @@ class Python {
return objs_[static_cast<int>(id)].exists();
}
/// Create a Python list of strings.
auto StringList(const std::list<std::string>& values) -> PythonRef;
/// Create a Python single-member tuple.
auto SingleMemberTuple(const PythonRef& member) -> PythonRef;
/// Push a call to a preset obj to the game thread
/// (will be run in the UI context).
void PushObjCall(ObjID obj);

View File

@ -140,6 +140,12 @@ auto PythonRef::CallableCheck() const -> bool {
return static_cast<bool>(PyCallable_Check(obj_));
}
auto PythonRef::UnicodeCheck() const -> bool {
BA_PRECONDITION(obj_);
assert(Python::HaveGIL());
return static_cast<bool>(PyUnicode_Check(obj_));
}
auto PythonRef::Call(PyObject* args, PyObject* keywds, bool print_errors) const
-> PythonRef {
assert(obj_);

View File

@ -107,6 +107,9 @@ class PythonRef {
/// Returns whether the underlying PyObject is callable.
auto CallableCheck() const -> bool;
/// Return whether the underlying PyObject is unicode.
auto UnicodeCheck() const -> bool;
/// Call the PyObject. On error, (optionally) prints errors and returns empty
/// ref.
auto Call(PyObject* args, PyObject* keywds = nullptr,

View File

@ -24,7 +24,6 @@ import _ba
# FIXME: There should be no bastd in here;
# should pull in bases from ba which get overridden by bastd (or other).
from bastd.ui.onscreenkeyboard import OnScreenKeyboardWindow
from bastd.ui import party
if TYPE_CHECKING:
from typing import Any
@ -107,7 +106,6 @@ def get_binding_values() -> tuple[Any, ...]:
json.dumps, # kJsonDumpsCall
json.loads, # kJsonLoadsCall
OnScreenKeyboardWindow, # kOnScreenKeyboardClass
party.handle_party_invite, # kHandlePartyInviteCall
_music.do_play_music, # kDoPlayMusicCall
ba.app.handle_deep_link, # kDeepLinkCall
ba.app.lang.get_resource, # kGetResourceCall
@ -135,4 +133,5 @@ def get_binding_values() -> tuple[Any, ...]:
_hooks.get_player_icon, # kGetPlayerIconCall
_language.Lstr.from_json, # kLstrFromJsonCall
_hooks.uuid_str, # kUUIDStrCall
_hooks.hash_strings, # kHashStringsCall
) # yapf: disable

View File

@ -104,7 +104,7 @@ class ServerConfig:
# if ${ACCOUNT} is present in the string, it will be replaced by the
# currently-signed-in account's id. To fetch info about an account,
# your back-end server can use the following url:
# http://bombsquadgame.com/accountquery?id=ACCOUNT_ID_HERE
# https://legacy.ballistica.net/accountquery?id=ACCOUNT_ID_HERE
stats_url: Optional[str] = None
# If present, the server subprocess will attempt to gracefully exit after

View File

@ -448,23 +448,24 @@ class Updater:
def _update_visual_studio_project(self, basename: str) -> None:
fname = f'ballisticacore-windows/{basename}/{basename}.vcxproj'
fname = (f'ballisticacore-windows/{basename}/'
f'BallisticaCore{basename}.vcxproj')
# Currently just silently skipping if not found (for public repo).
if not os.path.exists(fname):
return
raise CleanError(f'Visual Studio project not found: {fname}')
with open(fname, encoding='utf-8') as infile:
lines = infile.read().splitlines()
src_root = '..\\..\\src'
public = 'Internal' not in basename
public_project = 'Internal' in basename
all_files = sorted([
f for f in (self._source_files + self._header_files)
if not f.endswith('.m') and not f.endswith('.mm') and
not f.endswith('.c') and self._is_public_source_file(f) == public
if not f.endswith('.m') and not f.endswith('.mm') and not f.
endswith('.c') and self._is_public_source_file(f) == public_project
])
# Find the ItemGroup containing stdafx.cpp. This is where we'll dump
@ -491,6 +492,7 @@ class Updater:
+ src_root + '\\ballistica' + src.replace('/', '\\') + '" />'
for src in all_files
] + group_lines
filtered = lines[:begin_index + 1] + group_lines + lines[end_index:]
self._file_changes[fname] = '\r\n'.join(filtered) + '\r\n'
@ -537,12 +539,13 @@ class Updater:
'.filters'] = '\r\n'.join(filterlines) + '\r\n'
def _update_visual_studio_projects(self) -> None:
self._update_visual_studio_project('BallisticaCoreGeneric')
self._update_visual_studio_project('BallisticaCoreGenericInternal')
self._update_visual_studio_project('BallisticaCoreHeadless')
self._update_visual_studio_project('BallisticaCoreHeadlessInternal')
self._update_visual_studio_project('BallisticaCoreOculus')
self._update_visual_studio_project('BallisticaCoreOculusInternal')
self._update_visual_studio_project('Generic')
self._update_visual_studio_project('Headless')
if not self._public:
self._update_visual_studio_project('GenericInternal')
self._update_visual_studio_project('HeadlessInternal')
self._update_visual_studio_project('Oculus')
self._update_visual_studio_project('OculusInternal')
def _is_public_source_file(self, filename: str) -> bool:
assert filename.startswith('/')