├── .editorconfig ├── .gitattributes ├── .gitignore ├── Blake Stone source code license.doc ├── CHANGELOG.md ├── CMakeLists.txt ├── LICENSE.txt ├── README.md ├── TODO.md ├── build └── .gitignore ├── cmake ├── FindSDL2W.cmake └── GetGitHeadHash.cmake ├── src ├── CMakeLists.txt ├── bstone │ ├── CMakeLists.txt │ └── src │ │ ├── 3d_act1.cpp │ │ ├── 3d_act2.cpp │ │ ├── 3d_agent.cpp │ │ ├── 3d_debug.cpp │ │ ├── 3d_def.h │ │ ├── 3d_draw.cpp │ │ ├── 3d_draw2.cpp │ │ ├── 3d_game.cpp │ │ ├── 3d_inter.cpp │ │ ├── 3d_main.cpp │ │ ├── 3d_menu.cpp │ │ ├── 3d_menu.h │ │ ├── 3d_msgs.cpp │ │ ├── 3d_play.cpp │ │ ├── 3d_scale.cpp │ │ ├── 3d_state.cpp │ │ ├── an_codes.h │ │ ├── audio.h │ │ ├── bstone_adlib_decoder.cpp │ │ ├── bstone_adlib_decoder.h │ │ ├── bstone_adlib_music_decoder.cpp │ │ ├── bstone_adlib_music_decoder.h │ │ ├── bstone_adlib_sfx_decoder.cpp │ │ ├── bstone_adlib_sfx_decoder.h │ │ ├── bstone_algorithm.cpp │ │ ├── bstone_algorithm.h │ │ ├── bstone_api_string.cpp │ │ ├── bstone_api_string.h │ │ ├── bstone_archiver.cpp │ │ ├── bstone_archiver.h │ │ ├── bstone_array.cpp │ │ ├── bstone_array.h │ │ ├── bstone_ascii.cpp │ │ ├── bstone_ascii.h │ │ ├── bstone_assert.cpp │ │ ├── bstone_assert.h │ │ ├── bstone_atomic_flag.cpp │ │ ├── bstone_atomic_flag.h │ │ ├── bstone_audio_content_mgr.cpp │ │ ├── bstone_audio_content_mgr.h │ │ ├── bstone_audio_decoder.cpp │ │ ├── bstone_audio_decoder.h │ │ ├── bstone_audio_extractor.cpp │ │ ├── bstone_audio_extractor.h │ │ ├── bstone_audio_mixer.cpp │ │ ├── bstone_audio_mixer.h │ │ ├── bstone_audio_mixer_output_gains.h │ │ ├── bstone_audio_mixer_utils.cpp │ │ ├── bstone_audio_mixer_utils.h │ │ ├── bstone_audio_mixer_validator.cpp │ │ ├── bstone_audio_mixer_validator.h │ │ ├── bstone_audio_mixer_voice_handle.cpp │ │ ├── bstone_audio_mixer_voice_handle.h │ │ ├── bstone_audio_mixer_voice_handle_mgr.cpp │ │ ├── bstone_audio_mixer_voice_handle_mgr.h │ │ ├── bstone_audio_sample_converter.cpp │ │ ├── bstone_audio_sample_converter.h │ │ ├── bstone_auto_arena_resource.cpp │ │ ├── bstone_auto_arena_resource.h │ │ ├── bstone_binary_reader.cpp │ │ ├── bstone_binary_reader.h │ │ ├── bstone_binary_writer.cpp │ │ ├── bstone_binary_writer.h │ │ ├── bstone_bmp_image_common.h │ │ ├── bstone_bmp_image_decoder.cpp │ │ ├── bstone_bmp_image_decoder.h │ │ ├── bstone_ccmd.cpp │ │ ├── bstone_ccmd.h │ │ ├── bstone_ccmd_action.cpp │ │ ├── bstone_ccmd_action.h │ │ ├── bstone_ccmd_mgr.cpp │ │ ├── bstone_ccmd_mgr.h │ │ ├── bstone_cgm_clip_space.cpp │ │ ├── bstone_cgm_clip_space.h │ │ ├── bstone_cgm_mat.cpp │ │ ├── bstone_cgm_mat.h │ │ ├── bstone_cgm_transform.cpp │ │ ├── bstone_cgm_transform.h │ │ ├── bstone_cgm_vec.cpp │ │ ├── bstone_cgm_vec.h │ │ ├── bstone_char_conv.cpp │ │ ├── bstone_char_conv.h │ │ ├── bstone_char_hasher.cpp │ │ ├── bstone_char_hasher.h │ │ ├── bstone_char_traits.cpp │ │ ├── bstone_char_traits.h │ │ ├── bstone_cl.cpp │ │ ├── bstone_cl.h │ │ ├── bstone_configurations.cpp │ │ ├── bstone_configurations.h │ │ ├── bstone_content_path.cpp │ │ ├── bstone_content_path.h │ │ ├── bstone_crc32.cpp │ │ ├── bstone_crc32.h │ │ ├── bstone_cvalidator.cpp │ │ ├── bstone_cvalidator.h │ │ ├── bstone_cvar.cpp │ │ ├── bstone_cvar.h │ │ ├── bstone_cvar_mgr.cpp │ │ ├── bstone_cvar_mgr.h │ │ ├── bstone_cvar_string.cpp │ │ ├── bstone_cvar_string.h │ │ ├── bstone_cxx.cpp │ │ ├── bstone_cxx.h │ │ ├── bstone_door.h │ │ ├── bstone_dosbox_dbopl.cpp │ │ ├── bstone_dosbox_dbopl.h │ │ ├── bstone_encoding.cpp │ │ ├── bstone_encoding.h │ │ ├── bstone_endian.cpp │ │ ├── bstone_endian.h │ │ ├── bstone_entry_point.cpp │ │ ├── bstone_entry_point.h │ │ ├── bstone_enum_flags.h │ │ ├── bstone_exception.cpp │ │ ├── bstone_exception.h │ │ ├── bstone_exception_utils.cpp │ │ ├── bstone_exception_utils.h │ │ ├── bstone_extent_2d.cpp │ │ ├── bstone_extent_2d.h │ │ ├── bstone_file.cpp │ │ ├── bstone_file.h │ │ ├── bstone_file_posix.cpp │ │ ├── bstone_file_stream.cpp │ │ ├── bstone_file_stream.h │ │ ├── bstone_file_win32.cpp │ │ ├── bstone_fixed_pool_resource.cpp │ │ ├── bstone_fixed_pool_resource.h │ │ ├── bstone_fizzle_fx.cpp │ │ ├── bstone_fizzle_fx.h │ │ ├── bstone_format_string.cpp │ │ ├── bstone_format_string.h │ │ ├── bstone_four_cc.cpp │ │ ├── bstone_four_cc.h │ │ ├── bstone_fs.cpp │ │ ├── bstone_fs.h │ │ ├── bstone_fs_posix.cpp │ │ ├── bstone_fs_utils.cpp │ │ ├── bstone_fs_utils.h │ │ ├── bstone_fs_win32.cpp │ │ ├── bstone_game_timer.cpp │ │ ├── bstone_game_timer.h │ │ ├── bstone_generic_fizzle_fx.cpp │ │ ├── bstone_generic_fizzle_fx.h │ │ ├── bstone_generic_pool_resource.cpp │ │ ├── bstone_generic_pool_resource.h │ │ ├── bstone_gl_r3r.cpp │ │ ├── bstone_gl_r3r.h │ │ ├── bstone_gl_r3r_api.cpp │ │ ├── bstone_gl_r3r_api.h │ │ ├── bstone_gl_r3r_buffer.cpp │ │ ├── bstone_gl_r3r_buffer.h │ │ ├── bstone_gl_r3r_context.cpp │ │ ├── bstone_gl_r3r_context.h │ │ ├── bstone_gl_r3r_device_features.h │ │ ├── bstone_gl_r3r_error.cpp │ │ ├── bstone_gl_r3r_error.h │ │ ├── bstone_gl_r3r_extension_mgr.cpp │ │ ├── bstone_gl_r3r_extension_mgr.h │ │ ├── bstone_gl_r3r_r2_texture.cpp │ │ ├── bstone_gl_r3r_r2_texture.h │ │ ├── bstone_gl_r3r_sampler.cpp │ │ ├── bstone_gl_r3r_sampler.h │ │ ├── bstone_gl_r3r_sampler_mgr.cpp │ │ ├── bstone_gl_r3r_sampler_mgr.h │ │ ├── bstone_gl_r3r_shader.cpp │ │ ├── bstone_gl_r3r_shader.h │ │ ├── bstone_gl_r3r_shader_stage.cpp │ │ ├── bstone_gl_r3r_shader_stage.h │ │ ├── bstone_gl_r3r_shader_var.cpp │ │ ├── bstone_gl_r3r_shader_var.h │ │ ├── bstone_gl_r3r_utils.cpp │ │ ├── bstone_gl_r3r_utils.h │ │ ├── bstone_gl_r3r_version.h │ │ ├── bstone_gl_r3r_vertex_input.cpp │ │ ├── bstone_gl_r3r_vertex_input.h │ │ ├── bstone_gl_r3r_vertex_input_mgr.cpp │ │ ├── bstone_gl_r3r_vertex_input_mgr.h │ │ ├── bstone_globals.cpp │ │ ├── bstone_globals.h │ │ ├── bstone_gog_content_path.cpp │ │ ├── bstone_hw_shader_registry.cpp │ │ ├── bstone_hw_shader_registry.h │ │ ├── bstone_hw_texture_mgr.cpp │ │ ├── bstone_hw_texture_mgr.h │ │ ├── bstone_hw_video.cpp │ │ ├── bstone_hw_video.h │ │ ├── bstone_image_decoder.cpp │ │ ├── bstone_image_decoder.h │ │ ├── bstone_image_encoder.cpp │ │ ├── bstone_image_encoder.h │ │ ├── bstone_image_extractor.cpp │ │ ├── bstone_image_extractor.h │ │ ├── bstone_level_extractor.cpp │ │ ├── bstone_level_extractor.h │ │ ├── bstone_logger.cpp │ │ ├── bstone_logger.h │ │ ├── bstone_math.h │ │ ├── bstone_memory.cpp │ │ ├── bstone_memory.h │ │ ├── bstone_memory_binary_reader.cpp │ │ ├── bstone_memory_binary_reader.h │ │ ├── bstone_memory_pool_bitmap.cpp │ │ ├── bstone_memory_pool_bitmap.h │ │ ├── bstone_memory_resource.cpp │ │ ├── bstone_memory_resource.h │ │ ├── bstone_memory_stream.cpp │ │ ├── bstone_memory_stream.h │ │ ├── bstone_missing_sprite_64x64_image.cpp │ │ ├── bstone_missing_sprite_64x64_image.h │ │ ├── bstone_missing_wall_64x64_image.cpp │ │ ├── bstone_missing_wall_64x64_image.h │ │ ├── bstone_mod_value.h │ │ ├── bstone_mt_task_mgr.cpp │ │ ├── bstone_mt_task_mgr.h │ │ ├── bstone_nuked_opl3.cpp │ │ ├── bstone_nuked_opl3.h │ │ ├── bstone_oal_audio_mixer.cpp │ │ ├── bstone_oal_audio_mixer.h │ │ ├── bstone_oal_loader.cpp │ │ ├── bstone_oal_loader.h │ │ ├── bstone_oal_resource.cpp │ │ ├── bstone_oal_resource.h │ │ ├── bstone_oal_source.cpp │ │ ├── bstone_oal_source.h │ │ ├── bstone_oal_symbols.cpp │ │ ├── bstone_oal_symbols.h │ │ ├── bstone_offset_2d.cpp │ │ ├── bstone_offset_2d.h │ │ ├── bstone_opl3.cpp │ │ ├── bstone_opl3.h │ │ ├── bstone_page_mgr.cpp │ │ ├── bstone_page_mgr.h │ │ ├── bstone_pc_speaker_audio_decoder.cpp │ │ ├── bstone_pc_speaker_audio_decoder.h │ │ ├── bstone_pcm_audio_decoder.cpp │ │ ├── bstone_pcm_audio_decoder.h │ │ ├── bstone_platform.h │ │ ├── bstone_posix_string.cpp │ │ ├── bstone_posix_string.h │ │ ├── bstone_precompiled.h │ │ ├── bstone_process.cpp │ │ ├── bstone_process.h │ │ ├── bstone_process_posix.cpp │ │ ├── bstone_process_win32.cpp │ │ ├── bstone_ps_fizzle_fx.cpp │ │ ├── bstone_ps_fizzle_fx.h │ │ ├── bstone_r2_extent.h │ │ ├── bstone_r2_offset.h │ │ ├── bstone_r3r.cpp │ │ ├── bstone_r3r.h │ │ ├── bstone_r3r_buffer.cpp │ │ ├── bstone_r3r_buffer.h │ │ ├── bstone_r3r_cmd_buffer.cpp │ │ ├── bstone_r3r_cmd_buffer.h │ │ ├── bstone_r3r_limits.cpp │ │ ├── bstone_r3r_limits.h │ │ ├── bstone_r3r_mgr.cpp │ │ ├── bstone_r3r_mgr.h │ │ ├── bstone_r3r_r2_texture.cpp │ │ ├── bstone_r3r_r2_texture.h │ │ ├── bstone_r3r_sampler.cpp │ │ ├── bstone_r3r_sampler.h │ │ ├── bstone_r3r_shader.cpp │ │ ├── bstone_r3r_shader.h │ │ ├── bstone_r3r_shader_stage.cpp │ │ ├── bstone_r3r_shader_stage.h │ │ ├── bstone_r3r_shader_var.cpp │ │ ├── bstone_r3r_shader_var.h │ │ ├── bstone_r3r_tests.h │ │ ├── bstone_r3r_types.h │ │ ├── bstone_r3r_utils.cpp │ │ ├── bstone_r3r_utils.h │ │ ├── bstone_r3r_vertex_input.cpp │ │ ├── bstone_r3r_vertex_input.h │ │ ├── bstone_ref_values.h │ │ ├── bstone_renderer_type.h │ │ ├── bstone_rgb8.cpp │ │ ├── bstone_rgb8.h │ │ ├── bstone_rgb_palette.h │ │ ├── bstone_rlew_decoder.cpp │ │ ├── bstone_rlew_decoder.h │ │ ├── bstone_saved_game.cpp │ │ ├── bstone_saved_game.h │ │ ├── bstone_scope_exit.cpp │ │ ├── bstone_scope_exit.h │ │ ├── bstone_sha1.cpp │ │ ├── bstone_sha1.h │ │ ├── bstone_shared_library.cpp │ │ ├── bstone_shared_library.h │ │ ├── bstone_shared_library_posix.cpp │ │ ├── bstone_shared_library_win32.cpp │ │ ├── bstone_single_pool_resource.cpp │ │ ├── bstone_single_pool_resource.h │ │ ├── bstone_source_location.cpp │ │ ├── bstone_source_location.h │ │ ├── bstone_span.cpp │ │ ├── bstone_span.h │ │ ├── bstone_sprite.cpp │ │ ├── bstone_sprite.h │ │ ├── bstone_sprite_cache.cpp │ │ ├── bstone_sprite_cache.h │ │ ├── bstone_static_memory_stream.cpp │ │ ├── bstone_static_memory_stream.h │ │ ├── bstone_static_ro_memory_stream.cpp │ │ ├── bstone_static_ro_memory_stream.h │ │ ├── bstone_stb_image_decoder.cpp │ │ ├── bstone_stb_image_decoder.h │ │ ├── bstone_stb_image_encoder.cpp │ │ ├── bstone_stb_image_encoder.h │ │ ├── bstone_stb_image_utils.cpp │ │ ├── bstone_stb_image_utils.h │ │ ├── bstone_steam_content_path.cpp │ │ ├── bstone_stream.cpp │ │ ├── bstone_stream.h │ │ ├── bstone_string.cpp │ │ ├── bstone_string.h │ │ ├── bstone_string_helper.cpp │ │ ├── bstone_string_helper.h │ │ ├── bstone_string_view.cpp │ │ ├── bstone_string_view.h │ │ ├── bstone_string_view_hasher.h │ │ ├── bstone_sw_video.cpp │ │ ├── bstone_sw_video.h │ │ ├── bstone_sys_audio_mgr.cpp │ │ ├── bstone_sys_audio_mgr.h │ │ ├── bstone_sys_audio_mgr_null.cpp │ │ ├── bstone_sys_audio_mgr_null.h │ │ ├── bstone_sys_audio_mgr_sdl2.cpp │ │ ├── bstone_sys_audio_mgr_sdl2.h │ │ ├── bstone_sys_color.cpp │ │ ├── bstone_sys_color.h │ │ ├── bstone_sys_detail_sdl2.cpp │ │ ├── bstone_sys_detail_sdl2.h │ │ ├── bstone_sys_display_mode.cpp │ │ ├── bstone_sys_display_mode.h │ │ ├── bstone_sys_event.cpp │ │ ├── bstone_sys_event.h │ │ ├── bstone_sys_event_mgr.cpp │ │ ├── bstone_sys_event_mgr.h │ │ ├── bstone_sys_event_mgr_null.cpp │ │ ├── bstone_sys_event_mgr_null.h │ │ ├── bstone_sys_event_mgr_sdl2.cpp │ │ ├── bstone_sys_event_mgr_sdl2.h │ │ ├── bstone_sys_exception_sdl2.cpp │ │ ├── bstone_sys_exception_sdl2.h │ │ ├── bstone_sys_gl_context.cpp │ │ ├── bstone_sys_gl_context.h │ │ ├── bstone_sys_gl_context_attributes.cpp │ │ ├── bstone_sys_gl_context_attributes.h │ │ ├── bstone_sys_gl_context_profile.cpp │ │ ├── bstone_sys_gl_context_profile.h │ │ ├── bstone_sys_gl_context_sdl2.cpp │ │ ├── bstone_sys_gl_context_sdl2.h │ │ ├── bstone_sys_gl_current_context.cpp │ │ ├── bstone_sys_gl_current_context.h │ │ ├── bstone_sys_gl_current_context_sdl2.cpp │ │ ├── bstone_sys_gl_current_context_sdl2.h │ │ ├── bstone_sys_gl_symbol_resolver.cpp │ │ ├── bstone_sys_gl_symbol_resolver.h │ │ ├── bstone_sys_gl_symbol_resolver_sdl2.cpp │ │ ├── bstone_sys_gl_symbol_resolver_sdl2.h │ │ ├── bstone_sys_keyboard_key.cpp │ │ ├── bstone_sys_keyboard_key.h │ │ ├── bstone_sys_limits_sdl2.h │ │ ├── bstone_sys_logger.cpp │ │ ├── bstone_sys_logger.h │ │ ├── bstone_sys_message_box.cpp │ │ ├── bstone_sys_message_box.h │ │ ├── bstone_sys_message_box_sdl2.cpp │ │ ├── bstone_sys_mouse.cpp │ │ ├── bstone_sys_mouse.h │ │ ├── bstone_sys_mouse_mgr.cpp │ │ ├── bstone_sys_mouse_mgr.h │ │ ├── bstone_sys_mouse_mgr_sdl2.cpp │ │ ├── bstone_sys_mouse_mgr_sdl2.h │ │ ├── bstone_sys_pixel_format.cpp │ │ ├── bstone_sys_pixel_format.h │ │ ├── bstone_sys_polling_audio_device.cpp │ │ ├── bstone_sys_polling_audio_device.h │ │ ├── bstone_sys_polling_audio_device_sdl2.cpp │ │ ├── bstone_sys_polling_audio_device_sdl2.h │ │ ├── bstone_sys_rectangle.cpp │ │ ├── bstone_sys_rectangle.h │ │ ├── bstone_sys_renderer.cpp │ │ ├── bstone_sys_renderer.h │ │ ├── bstone_sys_renderer_sdl2.cpp │ │ ├── bstone_sys_renderer_sdl2.h │ │ ├── bstone_sys_sdl2_subsystem.cpp │ │ ├── bstone_sys_sdl2_subsystem.h │ │ ├── bstone_sys_special_path.cpp │ │ ├── bstone_sys_special_path.h │ │ ├── bstone_sys_special_path_sdl2.cpp │ │ ├── bstone_sys_swap_interval_type.cpp │ │ ├── bstone_sys_swap_interval_type.h │ │ ├── bstone_sys_system_mgr.cpp │ │ ├── bstone_sys_system_mgr.h │ │ ├── bstone_sys_system_mgr_sdl2.cpp │ │ ├── bstone_sys_texture.cpp │ │ ├── bstone_sys_texture.h │ │ ├── bstone_sys_texture_lock.cpp │ │ ├── bstone_sys_texture_lock.h │ │ ├── bstone_sys_texture_lock_sdl2.cpp │ │ ├── bstone_sys_texture_lock_sdl2.h │ │ ├── bstone_sys_texture_sdl2.cpp │ │ ├── bstone_sys_texture_sdl2.h │ │ ├── bstone_sys_video_mgr.cpp │ │ ├── bstone_sys_video_mgr.h │ │ ├── bstone_sys_video_mgr_null.cpp │ │ ├── bstone_sys_video_mgr_null.h │ │ ├── bstone_sys_video_mgr_sdl2.cpp │ │ ├── bstone_sys_video_mgr_sdl2.h │ │ ├── bstone_sys_window.cpp │ │ ├── bstone_sys_window.h │ │ ├── bstone_sys_window_mgr.cpp │ │ ├── bstone_sys_window_mgr.h │ │ ├── bstone_sys_window_mgr_sdl2.cpp │ │ ├── bstone_sys_window_mgr_sdl2.h │ │ ├── bstone_sys_window_rounded_corner_mgr.cpp │ │ ├── bstone_sys_window_rounded_corner_mgr.h │ │ ├── bstone_sys_window_rounded_corner_mgr_null.cpp │ │ ├── bstone_sys_window_rounded_corner_mgr_sdl2.cpp │ │ ├── bstone_sys_window_sdl2.cpp │ │ ├── bstone_sys_window_sdl2.h │ │ ├── bstone_sys_window_size.h │ │ ├── bstone_sys_window_utils_sdl2.cpp │ │ ├── bstone_sys_window_utils_sdl2.h │ │ ├── bstone_system_audio_mixer.cpp │ │ ├── bstone_system_audio_mixer.h │ │ ├── bstone_text_extractor.cpp │ │ ├── bstone_text_extractor.h │ │ ├── bstone_text_reader.cpp │ │ ├── bstone_text_reader.h │ │ ├── bstone_text_writer.cpp │ │ ├── bstone_text_writer.h │ │ ├── bstone_time.cpp │ │ ├── bstone_time.h │ │ ├── bstone_ts_auto_arena_resource.cpp │ │ ├── bstone_ts_auto_arena_resource.h │ │ ├── bstone_type_traits.h │ │ ├── bstone_unicode.cpp │ │ ├── bstone_unicode.h │ │ ├── bstone_unique_resource.cpp │ │ ├── bstone_unique_resource.h │ │ ├── bstone_utf.cpp │ │ ├── bstone_utf.h │ │ ├── bstone_utf16.cpp │ │ ├── bstone_utf16.h │ │ ├── bstone_utf8.cpp │ │ ├── bstone_utf8.h │ │ ├── bstone_utility.cpp │ │ ├── bstone_utility.h │ │ ├── bstone_uuid.cpp │ │ ├── bstone_uuid.h │ │ ├── bstone_uuid_unix.cpp │ │ ├── bstone_uuid_win32.cpp │ │ ├── bstone_version.cpp │ │ ├── bstone_version.h │ │ ├── bstone_version_.h.in │ │ ├── bstone_video.cpp │ │ ├── bstone_video.h │ │ ├── bstone_video_cvars.cpp │ │ ├── bstone_video_cvars.h │ │ ├── bstone_voice.h │ │ ├── bstone_voice_group.cpp │ │ ├── bstone_voice_group.h │ │ ├── bstone_win32_advapi32_symbols.cpp │ │ ├── bstone_win32_advapi32_symbols.h │ │ ├── bstone_win32_com.cpp │ │ ├── bstone_win32_com.h │ │ ├── bstone_win32_os_version.cpp │ │ ├── bstone_win32_os_version.h │ │ ├── bstone_win32_registry_key.cpp │ │ ├── bstone_win32_registry_key.h │ │ ├── bstone_win32_unique_resources.cpp │ │ ├── bstone_win32_unique_resources.h │ │ ├── bstone_win32_wstring.cpp │ │ ├── bstone_win32_wstring.h │ │ ├── bstone_zstring_view.cpp │ │ ├── bstone_zstring_view.h │ │ ├── bstone_zstring_view_hasher.h │ │ ├── colormap.cpp │ │ ├── d3_d2.cpp │ │ ├── d3_d2.h │ │ ├── d3_dr2.cpp │ │ ├── dosbox │ │ ├── COPYING │ │ ├── adlib.h │ │ ├── dbopl.cpp │ │ ├── dbopl.h │ │ ├── dosbox.h │ │ ├── hardware.h │ │ ├── inout.h │ │ ├── mixer.cpp │ │ ├── mixer.h │ │ ├── pic.h │ │ └── setup.h │ │ ├── gfxv.h │ │ ├── id_ca.cpp │ │ ├── id_ca.h │ │ ├── id_heads.h │ │ ├── id_in.cpp │ │ ├── id_in.h │ │ ├── id_sd.cpp │ │ ├── id_sd.h │ │ ├── id_us.cpp │ │ ├── id_us.h │ │ ├── id_us_1.cpp │ │ ├── id_vh.cpp │ │ ├── id_vh.h │ │ ├── id_vl.cpp │ │ ├── id_vl.h │ │ ├── jm_cio.h │ │ ├── jm_free.cpp │ │ ├── jm_io.cpp │ │ ├── jm_io.h │ │ ├── jm_lzh.cpp │ │ ├── jm_lzh.h │ │ ├── jm_tp.cpp │ │ ├── jm_tp.h │ │ ├── jm_vl.h │ │ ├── markhack.cpp │ │ ├── movie.cpp │ │ ├── movie.h │ │ ├── resources │ │ ├── src │ │ │ ├── LICENSE.txt │ │ │ ├── bstone_missing_sprite_64x64.xcf │ │ │ └── bstone_missing_wall_64x64.xcf │ │ └── win32 │ │ │ ├── bstone_icon.ico │ │ │ ├── bstone_win32.rc.in │ │ │ ├── bstone_win32_mingw.manifest │ │ │ ├── bstone_win32_msvc.manifest │ │ │ └── bstone_win32_rc.h │ │ ├── scale.cpp │ │ ├── stub.cpp │ │ └── vgapal.cpp ├── lib │ ├── khronos │ │ ├── CMakeLists.txt │ │ └── include │ │ │ └── KHR │ │ │ └── khrplatform.h │ ├── nuked_opl3 │ │ ├── CMakeLists.txt │ │ ├── LICENSE │ │ ├── bstone_changelog.txt │ │ ├── include │ │ │ └── opl3.h │ │ └── src │ │ │ ├── opl3.c │ │ │ └── opl3.cpp │ ├── openal_soft │ │ ├── CMakeLists.txt │ │ ├── COPYING │ │ ├── include │ │ │ └── AL │ │ │ │ ├── al.h │ │ │ │ ├── alc.h │ │ │ │ ├── alext.h │ │ │ │ ├── efx-creative.h │ │ │ │ ├── efx-presets.h │ │ │ │ └── efx.h │ │ └── readme.txt │ ├── sdl2 │ │ ├── CMakeLists.txt │ │ ├── bstone_sdl2_changelog.md │ │ └── src │ │ │ ├── .clang-format │ │ │ ├── .editorconfig │ │ │ ├── .git-hash │ │ │ ├── .wikiheaders-options │ │ │ ├── Android.mk │ │ │ ├── BUGS.txt │ │ │ ├── CMakeLists.txt │ │ │ ├── CREDITS.txt │ │ │ ├── INSTALL.txt │ │ │ ├── LICENSE.txt │ │ │ ├── Makefile.in │ │ │ ├── Makefile.minimal │ │ │ ├── Makefile.os2 │ │ │ ├── Makefile.pandora │ │ │ ├── Makefile.w32 │ │ │ ├── README-SDL.txt │ │ │ ├── README.md │ │ │ ├── REVISION.txt │ │ │ ├── SDL2.spec.in │ │ │ ├── SDL2Config.cmake.in │ │ │ ├── TODO.txt │ │ │ ├── VisualC-GDK │ │ │ ├── SDL.sln │ │ │ ├── SDL │ │ │ │ ├── SDL.vcxproj │ │ │ │ └── SDL.vcxproj.filters │ │ │ ├── SDLmain │ │ │ │ └── SDLmain.vcxproj │ │ │ ├── SDLtest │ │ │ │ └── SDLtest.vcxproj │ │ │ ├── clean.sh │ │ │ ├── logos │ │ │ │ ├── Logo100x100.png │ │ │ │ ├── Logo150x150.png │ │ │ │ ├── Logo44x44.png │ │ │ │ ├── Logo480x480.png │ │ │ │ └── SplashScreenImage.png │ │ │ ├── shaders │ │ │ │ ├── D3D12_PixelShader_Colors.hlsl │ │ │ │ ├── D3D12_PixelShader_NV12_BT601.hlsl │ │ │ │ ├── D3D12_PixelShader_NV12_BT709.hlsl │ │ │ │ ├── D3D12_PixelShader_NV12_JPEG.hlsl │ │ │ │ ├── D3D12_PixelShader_NV21_BT601.hlsl │ │ │ │ ├── D3D12_PixelShader_NV21_BT709.hlsl │ │ │ │ ├── D3D12_PixelShader_NV21_JPEG.hlsl │ │ │ │ ├── D3D12_PixelShader_Textures.hlsl │ │ │ │ ├── D3D12_PixelShader_YUV_BT601.hlsl │ │ │ │ ├── D3D12_PixelShader_YUV_BT709.hlsl │ │ │ │ ├── D3D12_PixelShader_YUV_JPEG.hlsl │ │ │ │ ├── D3D12_VertexShader.hlsl │ │ │ │ └── buildshaders.bat │ │ │ └── tests │ │ │ │ ├── testgamecontroller │ │ │ │ ├── PackageLayout.xml │ │ │ │ ├── testgamecontroller.vcxproj │ │ │ │ ├── testgamecontroller.vcxproj.filters │ │ │ │ ├── wingdk │ │ │ │ │ └── MicrosoftGame.config │ │ │ │ ├── xboxone │ │ │ │ │ └── MicrosoftGame.config │ │ │ │ └── xboxseries │ │ │ │ │ └── MicrosoftGame.config │ │ │ │ ├── testgdk │ │ │ │ ├── PackageLayout.xml │ │ │ │ ├── src │ │ │ │ │ └── testgdk.cpp │ │ │ │ ├── testgdk.vcxproj │ │ │ │ ├── testgdk.vcxproj.filters │ │ │ │ ├── wingdk │ │ │ │ │ └── MicrosoftGame.config │ │ │ │ ├── xboxone │ │ │ │ │ └── MicrosoftGame.config │ │ │ │ └── xboxseries │ │ │ │ │ └── MicrosoftGame.config │ │ │ │ └── testsprite2 │ │ │ │ ├── PackageLayout.xml │ │ │ │ ├── testsprite2.vcxproj │ │ │ │ ├── testsprite2.vcxproj.filters │ │ │ │ ├── wingdk │ │ │ │ └── MicrosoftGame.config │ │ │ │ ├── xboxone │ │ │ │ └── MicrosoftGame.config │ │ │ │ └── xboxseries │ │ │ │ └── MicrosoftGame.config │ │ │ ├── VisualC-WinRT │ │ │ ├── SDL-UWP.sln │ │ │ ├── SDL-UWP.vcxproj │ │ │ └── SDL-UWP.vcxproj.filters │ │ │ ├── VisualC │ │ │ ├── SDL.sln │ │ │ ├── SDL │ │ │ │ ├── SDL.vcxproj │ │ │ │ └── SDL.vcxproj.filters │ │ │ ├── SDLmain │ │ │ │ └── SDLmain.vcxproj │ │ │ ├── SDLtest │ │ │ │ └── SDLtest.vcxproj │ │ │ ├── clean.sh │ │ │ ├── pkg-support │ │ │ │ └── cmake │ │ │ │ │ ├── sdl2-config-version.cmake │ │ │ │ │ └── sdl2-config.cmake │ │ │ ├── tests │ │ │ │ ├── checkkeys │ │ │ │ │ └── checkkeys.vcxproj │ │ │ │ ├── controllermap │ │ │ │ │ └── controllermap.vcxproj │ │ │ │ ├── loopwave │ │ │ │ │ └── loopwave.vcxproj │ │ │ │ ├── testatomic │ │ │ │ │ └── testatomic.vcxproj │ │ │ │ ├── testautomation │ │ │ │ │ └── testautomation.vcxproj │ │ │ │ ├── testdraw2 │ │ │ │ │ └── testdraw2.vcxproj │ │ │ │ ├── testfile │ │ │ │ │ └── testfile.vcxproj │ │ │ │ ├── testgamecontroller │ │ │ │ │ └── testgamecontroller.vcxproj │ │ │ │ ├── testgesture │ │ │ │ │ └── testgesture.vcxproj │ │ │ │ ├── testgl2 │ │ │ │ │ └── testgl2.vcxproj │ │ │ │ ├── testgles2 │ │ │ │ │ └── testgles2.vcxproj │ │ │ │ ├── testjoystick │ │ │ │ │ └── testjoystick.vcxproj │ │ │ │ ├── testoverlay2 │ │ │ │ │ └── testoverlay2.vcxproj │ │ │ │ ├── testplatform │ │ │ │ │ └── testplatform.vcxproj │ │ │ │ ├── testpower │ │ │ │ │ └── testpower.vcxproj │ │ │ │ ├── testrendertarget │ │ │ │ │ └── testrendertarget.vcxproj │ │ │ │ ├── testrumble │ │ │ │ │ └── testrumble.vcxproj │ │ │ │ ├── testscale │ │ │ │ │ └── testscale.vcxproj │ │ │ │ ├── testsensor │ │ │ │ │ └── testsensor.vcxproj │ │ │ │ ├── testshape │ │ │ │ │ └── testshape.vcxproj │ │ │ │ ├── testsprite2 │ │ │ │ │ └── testsprite2.vcxproj │ │ │ │ ├── testsurround │ │ │ │ │ └── testsurround.vcxproj │ │ │ │ ├── testvulkan │ │ │ │ │ └── testvulkan.vcxproj │ │ │ │ ├── testwm2 │ │ │ │ │ └── testwm2.vcxproj │ │ │ │ └── testyuv │ │ │ │ │ └── testyuv.vcxproj │ │ │ └── visualtest │ │ │ │ ├── unittest │ │ │ │ └── testquit │ │ │ │ │ └── testquit_VS2012.vcxproj │ │ │ │ └── visualtest_VS2012.vcxproj │ │ │ ├── WhatsNew.txt │ │ │ ├── Xcode-iOS │ │ │ └── Demos │ │ │ │ ├── Default.png │ │ │ │ ├── Demos.xcodeproj │ │ │ │ └── project.pbxproj │ │ │ │ ├── Icon.png │ │ │ │ ├── README │ │ │ │ ├── config.xcconfig │ │ │ │ ├── data │ │ │ │ ├── bitmapfont │ │ │ │ │ ├── kromasky_16x16.bmp │ │ │ │ │ └── license.txt │ │ │ │ ├── drums │ │ │ │ │ ├── ds_brush_snare.wav │ │ │ │ │ ├── ds_china.wav │ │ │ │ │ ├── ds_kick_big_amb.wav │ │ │ │ │ └── ds_loose_skin_mute.wav │ │ │ │ ├── icon.bmp │ │ │ │ ├── ship.bmp │ │ │ │ ├── space.bmp │ │ │ │ └── stroke.bmp │ │ │ │ ├── iOS Launch Screen.storyboard │ │ │ │ └── src │ │ │ │ ├── accelerometer.c │ │ │ │ ├── common.c │ │ │ │ ├── common.h │ │ │ │ ├── fireworks.c │ │ │ │ ├── happy.c │ │ │ │ ├── keyboard.c │ │ │ │ ├── mixer.c │ │ │ │ ├── rectangles.c │ │ │ │ └── touch.c │ │ │ ├── Xcode │ │ │ ├── SDL │ │ │ │ ├── Info-Framework.plist │ │ │ │ ├── SDL.xcodeproj │ │ │ │ │ ├── project.pbxproj │ │ │ │ │ └── xcshareddata │ │ │ │ │ │ └── xcschemes │ │ │ │ │ │ ├── Framework-iOS.xcscheme │ │ │ │ │ │ └── xcFramework-iOS.xcscheme │ │ │ │ ├── SDL2 │ │ │ │ │ └── Info.plist │ │ │ │ └── pkg-support │ │ │ │ │ ├── SDL.info │ │ │ │ │ ├── resources │ │ │ │ │ ├── CMake │ │ │ │ │ │ ├── sdl2-config-version.cmake │ │ │ │ │ │ └── sdl2-config.cmake │ │ │ │ │ ├── License.txt │ │ │ │ │ ├── ReadMe.txt │ │ │ │ │ └── SDL_DS_Store │ │ │ │ │ └── sdl_logo.pdf │ │ │ ├── SDLTest │ │ │ │ ├── SDLTest.xcodeproj │ │ │ │ │ └── project.pbxproj │ │ │ │ ├── TestDropFile-Info.plist │ │ │ │ └── config.xcconfig │ │ │ └── XcodeDocSet │ │ │ │ └── Doxyfile │ │ │ ├── acinclude │ │ │ ├── ac_check_define.m4 │ │ │ ├── alsa.m4 │ │ │ ├── ax_check_compiler_flags.m4 │ │ │ ├── ax_compute_relative_paths.m4 │ │ │ ├── ax_gcc_archflag.m4 │ │ │ ├── ax_gcc_x86_cpuid.m4 │ │ │ ├── ax_normalize_path.m4 │ │ │ ├── ax_recursive_eval.m4 │ │ │ ├── esd.m4 │ │ │ ├── libtool.m4 │ │ │ ├── ltoptions.m4 │ │ │ ├── ltsugar.m4 │ │ │ ├── ltversion.m4 │ │ │ ├── lt~obsolete.m4 │ │ │ └── pkg.m4 │ │ │ ├── android-project-ant │ │ │ ├── AndroidManifest.xml │ │ │ ├── ant.properties │ │ │ ├── build.properties │ │ │ ├── build.xml │ │ │ ├── default.properties │ │ │ ├── jni │ │ │ │ ├── Android.mk │ │ │ │ ├── Application.mk │ │ │ │ └── src │ │ │ │ │ ├── Android.mk │ │ │ │ │ └── Android_static.mk │ │ │ ├── proguard-project.txt │ │ │ ├── project.properties │ │ │ ├── res │ │ │ │ ├── drawable-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── layout │ │ │ │ │ └── main.xml │ │ │ │ └── values │ │ │ │ │ └── strings.xml │ │ │ └── src │ │ │ │ └── org │ │ │ │ └── libsdl │ │ │ │ └── app │ │ │ │ ├── HIDDevice.java │ │ │ │ ├── HIDDeviceBLESteamController.java │ │ │ │ ├── HIDDeviceManager.java │ │ │ │ ├── HIDDeviceUSB.java │ │ │ │ ├── SDL.java │ │ │ │ ├── SDLActivity.java │ │ │ │ ├── SDLAudioManager.java │ │ │ │ ├── SDLControllerManager.java │ │ │ │ └── SDLSurface.java │ │ │ ├── android-project │ │ │ ├── app │ │ │ │ ├── build.gradle │ │ │ │ ├── jni │ │ │ │ │ ├── Android.mk │ │ │ │ │ ├── Application.mk │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── src │ │ │ │ │ │ ├── Android.mk │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ ├── proguard-rules.pro │ │ │ │ └── src │ │ │ │ │ └── main │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ ├── java │ │ │ │ │ └── org │ │ │ │ │ │ └── libsdl │ │ │ │ │ │ └── app │ │ │ │ │ │ ├── HIDDevice.java │ │ │ │ │ │ ├── HIDDeviceBLESteamController.java │ │ │ │ │ │ ├── HIDDeviceManager.java │ │ │ │ │ │ ├── HIDDeviceUSB.java │ │ │ │ │ │ ├── SDL.java │ │ │ │ │ │ ├── SDLActivity.java │ │ │ │ │ │ ├── SDLAudioManager.java │ │ │ │ │ │ ├── SDLControllerManager.java │ │ │ │ │ │ └── SDLSurface.java │ │ │ │ │ └── res │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ └── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ ├── build.gradle │ │ │ ├── gradle.properties │ │ │ ├── gradle │ │ │ │ └── wrapper │ │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ │ └── gradle-wrapper.properties │ │ │ ├── gradlew │ │ │ ├── gradlew.bat │ │ │ └── settings.gradle │ │ │ ├── autogen.sh │ │ │ ├── build-scripts │ │ │ ├── android-prefab.sh │ │ │ ├── androidbuild.sh │ │ │ ├── androidbuildlibs.sh │ │ │ ├── build-release.py │ │ │ ├── checker-buildbot.sh │ │ │ ├── clang++-fat.sh │ │ │ ├── clang-fat.sh │ │ │ ├── clang-format-src.sh │ │ │ ├── cmake-toolchain-mingw64-i686.cmake │ │ │ ├── cmake-toolchain-mingw64-x86_64.cmake │ │ │ ├── codechecker-buildbot.sh │ │ │ ├── config.guess │ │ │ ├── config.sub │ │ │ ├── create-release.py │ │ │ ├── emscripten-buildbot.sh │ │ │ ├── fnsince.pl │ │ │ ├── gen_audio_channel_conversion.c │ │ │ ├── gen_audio_resampler_filter.c │ │ │ ├── git-pre-push-hook.pl │ │ │ ├── install-sh │ │ │ ├── ltmain.sh │ │ │ ├── mkinstalldirs │ │ │ ├── nacl-buildbot.sh │ │ │ ├── naclbuild.sh │ │ │ ├── raspberrypi-buildbot.sh │ │ │ ├── release-info.json │ │ │ ├── setup-gdk-desktop.py │ │ │ ├── showrev.sh │ │ │ ├── strip_fPIC.sh │ │ │ ├── test-versioning.sh │ │ │ ├── update-copyright.sh │ │ │ ├── update-version.sh │ │ │ ├── updaterev.sh │ │ │ ├── wikiheaders.pl │ │ │ └── windows-buildbot-zipper.bat │ │ │ ├── cmake │ │ │ ├── CheckCPUArchitecture.cmake │ │ │ ├── macros.cmake │ │ │ ├── sdlchecks.cmake │ │ │ ├── sdlfind.cmake │ │ │ ├── sdlplatform.cmake │ │ │ └── test │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── jni │ │ │ │ └── Android.mk │ │ │ │ ├── main.swift │ │ │ │ ├── main_cli.c │ │ │ │ ├── main_gui.c │ │ │ │ ├── main_lib.c │ │ │ │ ├── sdltest.c │ │ │ │ ├── swift │ │ │ │ ├── module.modulemap │ │ │ │ └── shim.h │ │ │ │ ├── test_pkgconfig.sh │ │ │ │ └── test_sdlconfig.sh │ │ │ ├── cmake_uninstall.cmake.in │ │ │ ├── configure │ │ │ ├── configure.ac │ │ │ ├── docs │ │ │ ├── CONTRIBUTING.md │ │ │ ├── README-android.md │ │ │ ├── README-cmake.md │ │ │ ├── README-directfb.md │ │ │ ├── README-dynapi.md │ │ │ ├── README-emscripten.md │ │ │ ├── README-gdk.md │ │ │ ├── README-gesture.md │ │ │ ├── README-git.md │ │ │ ├── README-hg.md │ │ │ ├── README-ios.md │ │ │ ├── README-kmsbsd.md │ │ │ ├── README-linux.md │ │ │ ├── README-macos.md │ │ │ ├── README-n3ds.md │ │ │ ├── README-nacl.md │ │ │ ├── README-ngage.md │ │ │ ├── README-os2.md │ │ │ ├── README-pandora.md │ │ │ ├── README-platforms.md │ │ │ ├── README-porting.md │ │ │ ├── README-ps2.md │ │ │ ├── README-psp.md │ │ │ ├── README-raspberrypi.md │ │ │ ├── README-riscos.md │ │ │ ├── README-touch.md │ │ │ ├── README-versions.md │ │ │ ├── README-visualc.md │ │ │ ├── README-vita.md │ │ │ ├── README-wince.md │ │ │ ├── README-windows.md │ │ │ ├── README-winrt.md │ │ │ ├── README.md │ │ │ ├── doxyfile │ │ │ └── release_checklist.md │ │ │ ├── include │ │ │ ├── SDL.h │ │ │ ├── SDL_assert.h │ │ │ ├── SDL_atomic.h │ │ │ ├── SDL_audio.h │ │ │ ├── SDL_bits.h │ │ │ ├── SDL_blendmode.h │ │ │ ├── SDL_clipboard.h │ │ │ ├── SDL_config.h │ │ │ ├── SDL_config.h.cmake │ │ │ ├── SDL_config.h.in │ │ │ ├── SDL_config_android.h │ │ │ ├── SDL_config_emscripten.h │ │ │ ├── SDL_config_iphoneos.h │ │ │ ├── SDL_config_macosx.h │ │ │ ├── SDL_config_minimal.h │ │ │ ├── SDL_config_ngage.h │ │ │ ├── SDL_config_os2.h │ │ │ ├── SDL_config_pandora.h │ │ │ ├── SDL_config_windows.h │ │ │ ├── SDL_config_wingdk.h │ │ │ ├── SDL_config_winrt.h │ │ │ ├── SDL_config_xbox.h │ │ │ ├── SDL_copying.h │ │ │ ├── SDL_cpuinfo.h │ │ │ ├── SDL_egl.h │ │ │ ├── SDL_endian.h │ │ │ ├── SDL_error.h │ │ │ ├── SDL_events.h │ │ │ ├── SDL_filesystem.h │ │ │ ├── SDL_gamecontroller.h │ │ │ ├── SDL_gesture.h │ │ │ ├── SDL_guid.h │ │ │ ├── SDL_haptic.h │ │ │ ├── SDL_hidapi.h │ │ │ ├── SDL_hints.h │ │ │ ├── SDL_joystick.h │ │ │ ├── SDL_keyboard.h │ │ │ ├── SDL_keycode.h │ │ │ ├── SDL_loadso.h │ │ │ ├── SDL_locale.h │ │ │ ├── SDL_log.h │ │ │ ├── SDL_main.h │ │ │ ├── SDL_messagebox.h │ │ │ ├── SDL_metal.h │ │ │ ├── SDL_misc.h │ │ │ ├── SDL_mouse.h │ │ │ ├── SDL_mutex.h │ │ │ ├── SDL_name.h │ │ │ ├── SDL_opengl.h │ │ │ ├── SDL_opengl_glext.h │ │ │ ├── SDL_opengles.h │ │ │ ├── SDL_opengles2.h │ │ │ ├── SDL_opengles2_gl2.h │ │ │ ├── SDL_opengles2_gl2ext.h │ │ │ ├── SDL_opengles2_gl2platform.h │ │ │ ├── SDL_opengles2_khrplatform.h │ │ │ ├── SDL_pixels.h │ │ │ ├── SDL_platform.h │ │ │ ├── SDL_power.h │ │ │ ├── SDL_quit.h │ │ │ ├── SDL_rect.h │ │ │ ├── SDL_render.h │ │ │ ├── SDL_revision.h │ │ │ ├── SDL_revision.h.cmake │ │ │ ├── SDL_rwops.h │ │ │ ├── SDL_scancode.h │ │ │ ├── SDL_sensor.h │ │ │ ├── SDL_shape.h │ │ │ ├── SDL_stdinc.h │ │ │ ├── SDL_surface.h │ │ │ ├── SDL_system.h │ │ │ ├── SDL_syswm.h │ │ │ ├── SDL_test.h │ │ │ ├── SDL_test_assert.h │ │ │ ├── SDL_test_common.h │ │ │ ├── SDL_test_compare.h │ │ │ ├── SDL_test_crc32.h │ │ │ ├── SDL_test_font.h │ │ │ ├── SDL_test_fuzzer.h │ │ │ ├── SDL_test_harness.h │ │ │ ├── SDL_test_images.h │ │ │ ├── SDL_test_log.h │ │ │ ├── SDL_test_md5.h │ │ │ ├── SDL_test_memory.h │ │ │ ├── SDL_test_random.h │ │ │ ├── SDL_thread.h │ │ │ ├── SDL_timer.h │ │ │ ├── SDL_touch.h │ │ │ ├── SDL_types.h │ │ │ ├── SDL_version.h │ │ │ ├── SDL_video.h │ │ │ ├── SDL_vulkan.h │ │ │ ├── begin_code.h │ │ │ └── close_code.h │ │ │ ├── mingw │ │ │ └── pkg-support │ │ │ │ ├── INSTALL.txt │ │ │ │ ├── Makefile │ │ │ │ └── cmake │ │ │ │ ├── sdl2-config-version.cmake │ │ │ │ └── sdl2-config.cmake │ │ │ ├── sdl2-config-version.cmake.in │ │ │ ├── sdl2-config.cmake.in │ │ │ ├── sdl2-config.in │ │ │ ├── sdl2.m4 │ │ │ ├── sdl2.pc.in │ │ │ ├── src │ │ │ ├── SDL.c │ │ │ ├── SDL_assert.c │ │ │ ├── SDL_assert_c.h │ │ │ ├── SDL_dataqueue.c │ │ │ ├── SDL_dataqueue.h │ │ │ ├── SDL_error.c │ │ │ ├── SDL_error_c.h │ │ │ ├── SDL_guid.c │ │ │ ├── SDL_hints.c │ │ │ ├── SDL_hints_c.h │ │ │ ├── SDL_internal.h │ │ │ ├── SDL_list.c │ │ │ ├── SDL_list.h │ │ │ ├── SDL_log.c │ │ │ ├── SDL_log_c.h │ │ │ ├── SDL_utils.c │ │ │ ├── SDL_utils_c.h │ │ │ ├── atomic │ │ │ │ ├── SDL_atomic.c │ │ │ │ └── SDL_spinlock.c │ │ │ ├── audio │ │ │ │ ├── SDL_audio.c │ │ │ │ ├── SDL_audio_c.h │ │ │ │ ├── SDL_audio_channel_converters.h │ │ │ │ ├── SDL_audio_resampler_filter.h │ │ │ │ ├── SDL_audiocvt.c │ │ │ │ ├── SDL_audiodev.c │ │ │ │ ├── SDL_audiodev_c.h │ │ │ │ ├── SDL_audiotypecvt.c │ │ │ │ ├── SDL_mixer.c │ │ │ │ ├── SDL_sysaudio.h │ │ │ │ ├── SDL_wave.c │ │ │ │ ├── SDL_wave.h │ │ │ │ ├── aaudio │ │ │ │ │ ├── SDL_aaudio.c │ │ │ │ │ ├── SDL_aaudio.h │ │ │ │ │ └── SDL_aaudiofuncs.h │ │ │ │ ├── alsa │ │ │ │ │ ├── SDL_alsa_audio.c │ │ │ │ │ └── SDL_alsa_audio.h │ │ │ │ ├── android │ │ │ │ │ ├── SDL_androidaudio.c │ │ │ │ │ └── SDL_androidaudio.h │ │ │ │ ├── arts │ │ │ │ │ ├── SDL_artsaudio.c │ │ │ │ │ └── SDL_artsaudio.h │ │ │ │ ├── coreaudio │ │ │ │ │ ├── SDL_coreaudio.h │ │ │ │ │ └── SDL_coreaudio.m │ │ │ │ ├── directsound │ │ │ │ │ ├── SDL_directsound.c │ │ │ │ │ └── SDL_directsound.h │ │ │ │ ├── disk │ │ │ │ │ ├── SDL_diskaudio.c │ │ │ │ │ └── SDL_diskaudio.h │ │ │ │ ├── dsp │ │ │ │ │ ├── SDL_dspaudio.c │ │ │ │ │ └── SDL_dspaudio.h │ │ │ │ ├── dummy │ │ │ │ │ ├── SDL_dummyaudio.c │ │ │ │ │ └── SDL_dummyaudio.h │ │ │ │ ├── emscripten │ │ │ │ │ ├── SDL_emscriptenaudio.c │ │ │ │ │ └── SDL_emscriptenaudio.h │ │ │ │ ├── esd │ │ │ │ │ ├── SDL_esdaudio.c │ │ │ │ │ └── SDL_esdaudio.h │ │ │ │ ├── fusionsound │ │ │ │ │ ├── SDL_fsaudio.c │ │ │ │ │ └── SDL_fsaudio.h │ │ │ │ ├── haiku │ │ │ │ │ ├── SDL_haikuaudio.cc │ │ │ │ │ └── SDL_haikuaudio.h │ │ │ │ ├── jack │ │ │ │ │ ├── SDL_jackaudio.c │ │ │ │ │ └── SDL_jackaudio.h │ │ │ │ ├── n3ds │ │ │ │ │ ├── SDL_n3dsaudio.c │ │ │ │ │ └── SDL_n3dsaudio.h │ │ │ │ ├── nacl │ │ │ │ │ ├── SDL_naclaudio.c │ │ │ │ │ └── SDL_naclaudio.h │ │ │ │ ├── nas │ │ │ │ │ ├── SDL_nasaudio.c │ │ │ │ │ └── SDL_nasaudio.h │ │ │ │ ├── netbsd │ │ │ │ │ ├── SDL_netbsdaudio.c │ │ │ │ │ └── SDL_netbsdaudio.h │ │ │ │ ├── openslES │ │ │ │ │ ├── SDL_openslES.c │ │ │ │ │ └── SDL_openslES.h │ │ │ │ ├── os2 │ │ │ │ │ ├── SDL_os2audio.c │ │ │ │ │ └── SDL_os2audio.h │ │ │ │ ├── paudio │ │ │ │ │ ├── SDL_paudio.c │ │ │ │ │ └── SDL_paudio.h │ │ │ │ ├── pipewire │ │ │ │ │ ├── SDL_pipewire.c │ │ │ │ │ └── SDL_pipewire.h │ │ │ │ ├── ps2 │ │ │ │ │ ├── SDL_ps2audio.c │ │ │ │ │ └── SDL_ps2audio.h │ │ │ │ ├── psp │ │ │ │ │ ├── SDL_pspaudio.c │ │ │ │ │ └── SDL_pspaudio.h │ │ │ │ ├── pulseaudio │ │ │ │ │ ├── SDL_pulseaudio.c │ │ │ │ │ └── SDL_pulseaudio.h │ │ │ │ ├── qsa │ │ │ │ │ ├── SDL_qsa_audio.c │ │ │ │ │ └── SDL_qsa_audio.h │ │ │ │ ├── sndio │ │ │ │ │ ├── SDL_sndioaudio.c │ │ │ │ │ └── SDL_sndioaudio.h │ │ │ │ ├── sun │ │ │ │ │ ├── SDL_sunaudio.c │ │ │ │ │ └── SDL_sunaudio.h │ │ │ │ ├── vita │ │ │ │ │ ├── SDL_vitaaudio.c │ │ │ │ │ └── SDL_vitaaudio.h │ │ │ │ ├── wasapi │ │ │ │ │ ├── SDL_wasapi.c │ │ │ │ │ ├── SDL_wasapi.h │ │ │ │ │ ├── SDL_wasapi_win32.c │ │ │ │ │ └── SDL_wasapi_winrt.cpp │ │ │ │ └── winmm │ │ │ │ │ ├── SDL_winmm.c │ │ │ │ │ └── SDL_winmm.h │ │ │ ├── core │ │ │ │ ├── android │ │ │ │ │ ├── SDL_android.c │ │ │ │ │ └── SDL_android.h │ │ │ │ ├── freebsd │ │ │ │ │ ├── SDL_evdev_kbd_default_keyaccmap.h │ │ │ │ │ └── SDL_evdev_kbd_freebsd.c │ │ │ │ ├── gdk │ │ │ │ │ ├── SDL_gdk.cpp │ │ │ │ │ └── SDL_gdk.h │ │ │ │ ├── linux │ │ │ │ │ ├── SDL_dbus.c │ │ │ │ │ ├── SDL_dbus.h │ │ │ │ │ ├── SDL_evdev.c │ │ │ │ │ ├── SDL_evdev.h │ │ │ │ │ ├── SDL_evdev_capabilities.c │ │ │ │ │ ├── SDL_evdev_capabilities.h │ │ │ │ │ ├── SDL_evdev_kbd.c │ │ │ │ │ ├── SDL_evdev_kbd.h │ │ │ │ │ ├── SDL_evdev_kbd_default_accents.h │ │ │ │ │ ├── SDL_evdev_kbd_default_keymap.h │ │ │ │ │ ├── SDL_fcitx.c │ │ │ │ │ ├── SDL_fcitx.h │ │ │ │ │ ├── SDL_ibus.c │ │ │ │ │ ├── SDL_ibus.h │ │ │ │ │ ├── SDL_ime.c │ │ │ │ │ ├── SDL_ime.h │ │ │ │ │ ├── SDL_sandbox.c │ │ │ │ │ ├── SDL_sandbox.h │ │ │ │ │ ├── SDL_threadprio.c │ │ │ │ │ ├── SDL_udev.c │ │ │ │ │ └── SDL_udev.h │ │ │ │ ├── openbsd │ │ │ │ │ ├── SDL_wscons.h │ │ │ │ │ ├── SDL_wscons_kbd.c │ │ │ │ │ └── SDL_wscons_mouse.c │ │ │ │ ├── os2 │ │ │ │ │ ├── SDL_os2.c │ │ │ │ │ ├── SDL_os2.h │ │ │ │ │ ├── geniconv │ │ │ │ │ │ ├── geniconv.c │ │ │ │ │ │ ├── geniconv.h │ │ │ │ │ │ ├── iconv.h │ │ │ │ │ │ ├── makefile │ │ │ │ │ │ ├── os2cp.c │ │ │ │ │ │ ├── os2cp.h │ │ │ │ │ │ ├── os2iconv.c │ │ │ │ │ │ ├── sys2utf8.c │ │ │ │ │ │ └── test.c │ │ │ │ │ └── iconv2.lbc │ │ │ │ ├── unix │ │ │ │ │ ├── SDL_poll.c │ │ │ │ │ └── SDL_poll.h │ │ │ │ ├── windows │ │ │ │ │ ├── SDL_directx.h │ │ │ │ │ ├── SDL_hid.c │ │ │ │ │ ├── SDL_hid.h │ │ │ │ │ ├── SDL_immdevice.c │ │ │ │ │ ├── SDL_immdevice.h │ │ │ │ │ ├── SDL_windows.c │ │ │ │ │ ├── SDL_windows.h │ │ │ │ │ ├── SDL_xinput.c │ │ │ │ │ └── SDL_xinput.h │ │ │ │ └── winrt │ │ │ │ │ ├── SDL_winrtapp_common.cpp │ │ │ │ │ ├── SDL_winrtapp_common.h │ │ │ │ │ ├── SDL_winrtapp_direct3d.cpp │ │ │ │ │ ├── SDL_winrtapp_direct3d.h │ │ │ │ │ ├── SDL_winrtapp_xaml.cpp │ │ │ │ │ └── SDL_winrtapp_xaml.h │ │ │ ├── cpuinfo │ │ │ │ └── SDL_cpuinfo.c │ │ │ ├── dynapi │ │ │ │ ├── SDL2.exports │ │ │ │ ├── SDL_dynapi.c │ │ │ │ ├── SDL_dynapi.h │ │ │ │ ├── SDL_dynapi_overrides.h │ │ │ │ ├── SDL_dynapi_procs.h │ │ │ │ └── gendynapi.pl │ │ │ ├── events │ │ │ │ ├── SDL_clipboardevents.c │ │ │ │ ├── SDL_clipboardevents_c.h │ │ │ │ ├── SDL_displayevents.c │ │ │ │ ├── SDL_displayevents_c.h │ │ │ │ ├── SDL_dropevents.c │ │ │ │ ├── SDL_dropevents_c.h │ │ │ │ ├── SDL_events.c │ │ │ │ ├── SDL_events_c.h │ │ │ │ ├── SDL_gesture.c │ │ │ │ ├── SDL_gesture_c.h │ │ │ │ ├── SDL_keyboard.c │ │ │ │ ├── SDL_keyboard_c.h │ │ │ │ ├── SDL_keysym_to_scancode.c │ │ │ │ ├── SDL_keysym_to_scancode_c.h │ │ │ │ ├── SDL_mouse.c │ │ │ │ ├── SDL_mouse_c.h │ │ │ │ ├── SDL_quit.c │ │ │ │ ├── SDL_scancode_tables.c │ │ │ │ ├── SDL_scancode_tables_c.h │ │ │ │ ├── SDL_touch.c │ │ │ │ ├── SDL_touch_c.h │ │ │ │ ├── SDL_windowevents.c │ │ │ │ ├── SDL_windowevents_c.h │ │ │ │ ├── blank_cursor.h │ │ │ │ ├── default_cursor.h │ │ │ │ ├── imKStoUCS.c │ │ │ │ ├── imKStoUCS.h │ │ │ │ ├── scancodes_ascii.h │ │ │ │ ├── scancodes_darwin.h │ │ │ │ ├── scancodes_linux.h │ │ │ │ ├── scancodes_windows.h │ │ │ │ └── scancodes_xfree86.h │ │ │ ├── file │ │ │ │ ├── SDL_rwops.c │ │ │ │ ├── cocoa │ │ │ │ │ ├── SDL_rwopsbundlesupport.h │ │ │ │ │ └── SDL_rwopsbundlesupport.m │ │ │ │ └── n3ds │ │ │ │ │ ├── SDL_rwopsromfs.c │ │ │ │ │ └── SDL_rwopsromfs.h │ │ │ ├── filesystem │ │ │ │ ├── android │ │ │ │ │ └── SDL_sysfilesystem.c │ │ │ │ ├── cocoa │ │ │ │ │ └── SDL_sysfilesystem.m │ │ │ │ ├── dummy │ │ │ │ │ └── SDL_sysfilesystem.c │ │ │ │ ├── emscripten │ │ │ │ │ └── SDL_sysfilesystem.c │ │ │ │ ├── gdk │ │ │ │ │ └── SDL_sysfilesystem.cpp │ │ │ │ ├── haiku │ │ │ │ │ └── SDL_sysfilesystem.cc │ │ │ │ ├── n3ds │ │ │ │ │ └── SDL_sysfilesystem.c │ │ │ │ ├── nacl │ │ │ │ │ └── SDL_sysfilesystem.c │ │ │ │ ├── os2 │ │ │ │ │ └── SDL_sysfilesystem.c │ │ │ │ ├── ps2 │ │ │ │ │ └── SDL_sysfilesystem.c │ │ │ │ ├── psp │ │ │ │ │ └── SDL_sysfilesystem.c │ │ │ │ ├── riscos │ │ │ │ │ └── SDL_sysfilesystem.c │ │ │ │ ├── unix │ │ │ │ │ └── SDL_sysfilesystem.c │ │ │ │ ├── vita │ │ │ │ │ └── SDL_sysfilesystem.c │ │ │ │ ├── windows │ │ │ │ │ └── SDL_sysfilesystem.c │ │ │ │ └── winrt │ │ │ │ │ └── SDL_sysfilesystem.cpp │ │ │ ├── haptic │ │ │ │ ├── SDL_haptic.c │ │ │ │ ├── SDL_haptic_c.h │ │ │ │ ├── SDL_syshaptic.h │ │ │ │ ├── android │ │ │ │ │ ├── SDL_syshaptic.c │ │ │ │ │ └── SDL_syshaptic_c.h │ │ │ │ ├── darwin │ │ │ │ │ ├── SDL_syshaptic.c │ │ │ │ │ └── SDL_syshaptic_c.h │ │ │ │ ├── dummy │ │ │ │ │ └── SDL_syshaptic.c │ │ │ │ ├── linux │ │ │ │ │ └── SDL_syshaptic.c │ │ │ │ └── windows │ │ │ │ │ ├── SDL_dinputhaptic.c │ │ │ │ │ ├── SDL_dinputhaptic_c.h │ │ │ │ │ ├── SDL_windowshaptic.c │ │ │ │ │ ├── SDL_windowshaptic_c.h │ │ │ │ │ ├── SDL_xinputhaptic.c │ │ │ │ │ └── SDL_xinputhaptic_c.h │ │ │ ├── hidapi │ │ │ │ ├── AUTHORS.txt │ │ │ │ ├── HACKING.txt │ │ │ │ ├── LICENSE-bsd.txt │ │ │ │ ├── LICENSE-gpl3.txt │ │ │ │ ├── LICENSE-orig.txt │ │ │ │ ├── LICENSE.txt │ │ │ │ ├── Makefile.am │ │ │ │ ├── README.txt │ │ │ │ ├── SDL_hidapi.c │ │ │ │ ├── SDL_hidapi_c.h │ │ │ │ ├── android │ │ │ │ │ ├── hid.cpp │ │ │ │ │ ├── jni │ │ │ │ │ │ ├── Android.mk │ │ │ │ │ │ └── Application.mk │ │ │ │ │ └── project.properties │ │ │ │ ├── bootstrap │ │ │ │ ├── configure.ac │ │ │ │ ├── doxygen │ │ │ │ │ └── Doxyfile │ │ │ │ ├── hidapi │ │ │ │ │ └── hidapi.h │ │ │ │ ├── hidtest │ │ │ │ │ ├── Makefile.am │ │ │ │ │ └── hidtest.cpp │ │ │ │ ├── ios │ │ │ │ │ ├── Makefile-manual │ │ │ │ │ ├── Makefile.am │ │ │ │ │ └── hid.m │ │ │ │ ├── libusb │ │ │ │ │ ├── Makefile-manual │ │ │ │ │ ├── Makefile.am │ │ │ │ │ ├── Makefile.freebsd │ │ │ │ │ ├── Makefile.linux │ │ │ │ │ ├── hid.c │ │ │ │ │ └── hidusb.cpp │ │ │ │ ├── linux │ │ │ │ │ ├── Makefile-manual │ │ │ │ │ ├── Makefile.am │ │ │ │ │ ├── README.txt │ │ │ │ │ ├── hid.c │ │ │ │ │ └── hidraw.cpp │ │ │ │ ├── m4 │ │ │ │ │ ├── ax_pthread.m4 │ │ │ │ │ └── pkg.m4 │ │ │ │ ├── mac │ │ │ │ │ ├── Makefile-manual │ │ │ │ │ ├── Makefile.am │ │ │ │ │ └── hid.c │ │ │ │ ├── pc │ │ │ │ │ ├── hidapi-hidraw.pc.in │ │ │ │ │ ├── hidapi-libusb.pc.in │ │ │ │ │ └── hidapi.pc.in │ │ │ │ ├── testgui │ │ │ │ │ ├── Makefile-manual │ │ │ │ │ ├── Makefile.am │ │ │ │ │ ├── Makefile.freebsd │ │ │ │ │ ├── Makefile.linux │ │ │ │ │ ├── Makefile.mac │ │ │ │ │ ├── Makefile.mingw │ │ │ │ │ ├── TestGUI.app.in │ │ │ │ │ │ └── Contents │ │ │ │ │ │ │ ├── Info.plist │ │ │ │ │ │ │ ├── PkgInfo │ │ │ │ │ │ │ └── Resources │ │ │ │ │ │ │ ├── English.lproj │ │ │ │ │ │ │ └── InfoPlist.strings │ │ │ │ │ │ │ └── Signal11.icns │ │ │ │ │ ├── copy_to_bundle.sh │ │ │ │ │ ├── mac_support.cpp │ │ │ │ │ ├── mac_support.h │ │ │ │ │ ├── mac_support_cocoa.m │ │ │ │ │ ├── start.sh │ │ │ │ │ ├── test.cpp │ │ │ │ │ ├── testgui.sln │ │ │ │ │ └── testgui.vcproj │ │ │ │ ├── udev │ │ │ │ │ └── 99-hid.rules │ │ │ │ └── windows │ │ │ │ │ ├── Makefile-manual │ │ │ │ │ ├── Makefile.am │ │ │ │ │ ├── Makefile.mingw │ │ │ │ │ ├── ddk_build │ │ │ │ │ ├── hidapi.def │ │ │ │ │ ├── makefile │ │ │ │ │ └── sources │ │ │ │ │ ├── hid.c │ │ │ │ │ ├── hidapi.sln │ │ │ │ │ ├── hidapi.vcproj │ │ │ │ │ └── hidtest.vcproj │ │ │ ├── joystick │ │ │ │ ├── SDL_gamecontroller.c │ │ │ │ ├── SDL_gamecontrollerdb.h │ │ │ │ ├── SDL_joystick.c │ │ │ │ ├── SDL_joystick_c.h │ │ │ │ ├── SDL_steam_virtual_gamepad.c │ │ │ │ ├── SDL_steam_virtual_gamepad.h │ │ │ │ ├── SDL_sysjoystick.h │ │ │ │ ├── android │ │ │ │ │ ├── SDL_sysjoystick.c │ │ │ │ │ └── SDL_sysjoystick_c.h │ │ │ │ ├── bsd │ │ │ │ │ └── SDL_bsdjoystick.c │ │ │ │ ├── check_8bitdo.sh │ │ │ │ ├── controller_list.h │ │ │ │ ├── controller_type.c │ │ │ │ ├── controller_type.h │ │ │ │ ├── darwin │ │ │ │ │ ├── SDL_iokitjoystick.c │ │ │ │ │ └── SDL_iokitjoystick_c.h │ │ │ │ ├── dummy │ │ │ │ │ └── SDL_sysjoystick.c │ │ │ │ ├── emscripten │ │ │ │ │ ├── SDL_sysjoystick.c │ │ │ │ │ └── SDL_sysjoystick_c.h │ │ │ │ ├── haiku │ │ │ │ │ └── SDL_haikujoystick.cc │ │ │ │ ├── hidapi │ │ │ │ │ ├── SDL_hidapi_combined.c │ │ │ │ │ ├── SDL_hidapi_gamecube.c │ │ │ │ │ ├── SDL_hidapi_luna.c │ │ │ │ │ ├── SDL_hidapi_nintendo.h │ │ │ │ │ ├── SDL_hidapi_ps3.c │ │ │ │ │ ├── SDL_hidapi_ps4.c │ │ │ │ │ ├── SDL_hidapi_ps5.c │ │ │ │ │ ├── SDL_hidapi_rumble.c │ │ │ │ │ ├── SDL_hidapi_rumble.h │ │ │ │ │ ├── SDL_hidapi_shield.c │ │ │ │ │ ├── SDL_hidapi_stadia.c │ │ │ │ │ ├── SDL_hidapi_steam.c │ │ │ │ │ ├── SDL_hidapi_steamdeck.c │ │ │ │ │ ├── SDL_hidapi_switch.c │ │ │ │ │ ├── SDL_hidapi_wii.c │ │ │ │ │ ├── SDL_hidapi_xbox360.c │ │ │ │ │ ├── SDL_hidapi_xbox360w.c │ │ │ │ │ ├── SDL_hidapi_xboxone.c │ │ │ │ │ ├── SDL_hidapijoystick.c │ │ │ │ │ ├── SDL_hidapijoystick_c.h │ │ │ │ │ └── steam │ │ │ │ │ │ ├── controller_constants.h │ │ │ │ │ │ └── controller_structs.h │ │ │ │ ├── iphoneos │ │ │ │ │ ├── SDL_mfijoystick.m │ │ │ │ │ └── SDL_mfijoystick_c.h │ │ │ │ ├── linux │ │ │ │ │ ├── SDL_sysjoystick.c │ │ │ │ │ └── SDL_sysjoystick_c.h │ │ │ │ ├── n3ds │ │ │ │ │ └── SDL_sysjoystick.c │ │ │ │ ├── os2 │ │ │ │ │ └── SDL_os2joystick.c │ │ │ │ ├── ps2 │ │ │ │ │ └── SDL_sysjoystick.c │ │ │ │ ├── psp │ │ │ │ │ └── SDL_sysjoystick.c │ │ │ │ ├── sort_controllers.py │ │ │ │ ├── steam │ │ │ │ │ ├── SDL_steamcontroller.c │ │ │ │ │ └── SDL_steamcontroller.h │ │ │ │ ├── usb_ids.h │ │ │ │ ├── virtual │ │ │ │ │ ├── SDL_virtualjoystick.c │ │ │ │ │ └── SDL_virtualjoystick_c.h │ │ │ │ ├── vita │ │ │ │ │ └── SDL_sysjoystick.c │ │ │ │ └── windows │ │ │ │ │ ├── SDL_dinputjoystick.c │ │ │ │ │ ├── SDL_dinputjoystick_c.h │ │ │ │ │ ├── SDL_rawinputjoystick.c │ │ │ │ │ ├── SDL_rawinputjoystick_c.h │ │ │ │ │ ├── SDL_windows_gaming_input.c │ │ │ │ │ ├── SDL_windowsjoystick.c │ │ │ │ │ ├── SDL_windowsjoystick_c.h │ │ │ │ │ ├── SDL_xinputjoystick.c │ │ │ │ │ └── SDL_xinputjoystick_c.h │ │ │ ├── libm │ │ │ │ ├── e_atan2.c │ │ │ │ ├── e_exp.c │ │ │ │ ├── e_fmod.c │ │ │ │ ├── e_log.c │ │ │ │ ├── e_log10.c │ │ │ │ ├── e_pow.c │ │ │ │ ├── e_rem_pio2.c │ │ │ │ ├── e_sqrt.c │ │ │ │ ├── k_cos.c │ │ │ │ ├── k_rem_pio2.c │ │ │ │ ├── k_sin.c │ │ │ │ ├── k_tan.c │ │ │ │ ├── math_libm.h │ │ │ │ ├── math_private.h │ │ │ │ ├── s_atan.c │ │ │ │ ├── s_copysign.c │ │ │ │ ├── s_cos.c │ │ │ │ ├── s_fabs.c │ │ │ │ ├── s_floor.c │ │ │ │ ├── s_scalbn.c │ │ │ │ ├── s_sin.c │ │ │ │ └── s_tan.c │ │ │ ├── loadso │ │ │ │ ├── dlopen │ │ │ │ │ └── SDL_sysloadso.c │ │ │ │ ├── dummy │ │ │ │ │ └── SDL_sysloadso.c │ │ │ │ ├── os2 │ │ │ │ │ └── SDL_sysloadso.c │ │ │ │ └── windows │ │ │ │ │ └── SDL_sysloadso.c │ │ │ ├── locale │ │ │ │ ├── SDL_locale.c │ │ │ │ ├── SDL_syslocale.h │ │ │ │ ├── android │ │ │ │ │ └── SDL_syslocale.c │ │ │ │ ├── dummy │ │ │ │ │ └── SDL_syslocale.c │ │ │ │ ├── emscripten │ │ │ │ │ └── SDL_syslocale.c │ │ │ │ ├── haiku │ │ │ │ │ └── SDL_syslocale.cc │ │ │ │ ├── macosx │ │ │ │ │ └── SDL_syslocale.m │ │ │ │ ├── n3ds │ │ │ │ │ └── SDL_syslocale.c │ │ │ │ ├── psp │ │ │ │ │ └── SDL_syslocale.c │ │ │ │ ├── unix │ │ │ │ │ └── SDL_syslocale.c │ │ │ │ ├── vita │ │ │ │ │ └── SDL_syslocale.c │ │ │ │ ├── windows │ │ │ │ │ └── SDL_syslocale.c │ │ │ │ └── winrt │ │ │ │ │ └── SDL_syslocale.c │ │ │ ├── main │ │ │ │ ├── android │ │ │ │ │ └── SDL_android_main.c │ │ │ │ ├── dummy │ │ │ │ │ └── SDL_dummy_main.c │ │ │ │ ├── gdk │ │ │ │ │ └── SDL_gdk_main.c │ │ │ │ ├── haiku │ │ │ │ │ ├── SDL_BApp.h │ │ │ │ │ ├── SDL_BeApp.cc │ │ │ │ │ └── SDL_BeApp.h │ │ │ │ ├── n3ds │ │ │ │ │ └── SDL_n3ds_main.c │ │ │ │ ├── nacl │ │ │ │ │ └── SDL_nacl_main.c │ │ │ │ ├── ngage │ │ │ │ │ └── SDL_ngage_main.cpp │ │ │ │ ├── ps2 │ │ │ │ │ └── SDL_ps2_main.c │ │ │ │ ├── psp │ │ │ │ │ └── SDL_psp_main.c │ │ │ │ ├── uikit │ │ │ │ │ └── SDL_uikit_main.c │ │ │ │ ├── windows │ │ │ │ │ ├── SDL_windows_main.c │ │ │ │ │ └── version.rc │ │ │ │ └── winrt │ │ │ │ │ ├── SDL2-WinRTResource_BlankCursor.cur │ │ │ │ │ ├── SDL2-WinRTResources.rc │ │ │ │ │ └── SDL_winrt_main_NonXAML.cpp │ │ │ ├── misc │ │ │ │ ├── SDL_sysurl.h │ │ │ │ ├── SDL_url.c │ │ │ │ ├── android │ │ │ │ │ └── SDL_sysurl.c │ │ │ │ ├── dummy │ │ │ │ │ └── SDL_sysurl.c │ │ │ │ ├── emscripten │ │ │ │ │ └── SDL_sysurl.c │ │ │ │ ├── haiku │ │ │ │ │ └── SDL_sysurl.cc │ │ │ │ ├── ios │ │ │ │ │ └── SDL_sysurl.m │ │ │ │ ├── macosx │ │ │ │ │ └── SDL_sysurl.m │ │ │ │ ├── riscos │ │ │ │ │ └── SDL_sysurl.c │ │ │ │ ├── unix │ │ │ │ │ └── SDL_sysurl.c │ │ │ │ ├── vita │ │ │ │ │ └── SDL_sysurl.c │ │ │ │ ├── windows │ │ │ │ │ └── SDL_sysurl.c │ │ │ │ └── winrt │ │ │ │ │ └── SDL_sysurl.cpp │ │ │ ├── power │ │ │ │ ├── SDL_power.c │ │ │ │ ├── SDL_syspower.h │ │ │ │ ├── android │ │ │ │ │ └── SDL_syspower.c │ │ │ │ ├── emscripten │ │ │ │ │ └── SDL_syspower.c │ │ │ │ ├── haiku │ │ │ │ │ └── SDL_syspower.c │ │ │ │ ├── linux │ │ │ │ │ └── SDL_syspower.c │ │ │ │ ├── macosx │ │ │ │ │ └── SDL_syspower.c │ │ │ │ ├── n3ds │ │ │ │ │ └── SDL_syspower.c │ │ │ │ ├── psp │ │ │ │ │ └── SDL_syspower.c │ │ │ │ ├── uikit │ │ │ │ │ ├── SDL_syspower.h │ │ │ │ │ └── SDL_syspower.m │ │ │ │ ├── vita │ │ │ │ │ └── SDL_syspower.c │ │ │ │ ├── windows │ │ │ │ │ └── SDL_syspower.c │ │ │ │ └── winrt │ │ │ │ │ └── SDL_syspower.cpp │ │ │ ├── render │ │ │ │ ├── SDL_d3dmath.c │ │ │ │ ├── SDL_d3dmath.h │ │ │ │ ├── SDL_render.c │ │ │ │ ├── SDL_sysrender.h │ │ │ │ ├── SDL_yuv_sw.c │ │ │ │ ├── SDL_yuv_sw_c.h │ │ │ │ ├── direct3d │ │ │ │ │ ├── SDL_render_d3d.c │ │ │ │ │ ├── SDL_shaders_d3d.c │ │ │ │ │ └── SDL_shaders_d3d.h │ │ │ │ ├── direct3d11 │ │ │ │ │ ├── SDL_render_d3d11.c │ │ │ │ │ ├── SDL_render_winrt.cpp │ │ │ │ │ ├── SDL_render_winrt.h │ │ │ │ │ ├── SDL_shaders_d3d11.c │ │ │ │ │ └── SDL_shaders_d3d11.h │ │ │ │ ├── direct3d12 │ │ │ │ │ ├── SDL_render_d3d12.c │ │ │ │ │ ├── SDL_render_d3d12_xbox.cpp │ │ │ │ │ ├── SDL_render_d3d12_xbox.h │ │ │ │ │ ├── SDL_shaders_d3d12.c │ │ │ │ │ ├── SDL_shaders_d3d12.h │ │ │ │ │ ├── SDL_shaders_d3d12_xboxone.cpp │ │ │ │ │ └── SDL_shaders_d3d12_xboxseries.cpp │ │ │ │ ├── metal │ │ │ │ │ ├── SDL_render_metal.m │ │ │ │ │ ├── SDL_shaders_metal.metal │ │ │ │ │ ├── SDL_shaders_metal_ios.h │ │ │ │ │ ├── SDL_shaders_metal_iphonesimulator.h │ │ │ │ │ ├── SDL_shaders_metal_osx.h │ │ │ │ │ ├── SDL_shaders_metal_tvos.h │ │ │ │ │ ├── SDL_shaders_metal_tvsimulator.h │ │ │ │ │ └── build-metal-shaders.sh │ │ │ │ ├── opengl │ │ │ │ │ ├── SDL_glfuncs.h │ │ │ │ │ ├── SDL_render_gl.c │ │ │ │ │ ├── SDL_shaders_gl.c │ │ │ │ │ └── SDL_shaders_gl.h │ │ │ │ ├── opengles │ │ │ │ │ ├── SDL_glesfuncs.h │ │ │ │ │ └── SDL_render_gles.c │ │ │ │ ├── opengles2 │ │ │ │ │ ├── SDL_gles2funcs.h │ │ │ │ │ ├── SDL_render_gles2.c │ │ │ │ │ ├── SDL_shaders_gles2.c │ │ │ │ │ └── SDL_shaders_gles2.h │ │ │ │ ├── ps2 │ │ │ │ │ └── SDL_render_ps2.c │ │ │ │ ├── psp │ │ │ │ │ ├── SDL_render_psp.c │ │ │ │ │ └── SDL_render_psp.h │ │ │ │ ├── software │ │ │ │ │ ├── SDL_blendfillrect.c │ │ │ │ │ ├── SDL_blendfillrect.h │ │ │ │ │ ├── SDL_blendline.c │ │ │ │ │ ├── SDL_blendline.h │ │ │ │ │ ├── SDL_blendpoint.c │ │ │ │ │ ├── SDL_blendpoint.h │ │ │ │ │ ├── SDL_draw.h │ │ │ │ │ ├── SDL_drawline.c │ │ │ │ │ ├── SDL_drawline.h │ │ │ │ │ ├── SDL_drawpoint.c │ │ │ │ │ ├── SDL_drawpoint.h │ │ │ │ │ ├── SDL_render_sw.c │ │ │ │ │ ├── SDL_render_sw_c.h │ │ │ │ │ ├── SDL_rotate.c │ │ │ │ │ ├── SDL_rotate.h │ │ │ │ │ ├── SDL_triangle.c │ │ │ │ │ └── SDL_triangle.h │ │ │ │ └── vitagxm │ │ │ │ │ ├── SDL_render_vita_gxm.c │ │ │ │ │ ├── SDL_render_vita_gxm_memory.c │ │ │ │ │ ├── SDL_render_vita_gxm_memory.h │ │ │ │ │ ├── SDL_render_vita_gxm_shaders.h │ │ │ │ │ ├── SDL_render_vita_gxm_tools.c │ │ │ │ │ ├── SDL_render_vita_gxm_tools.h │ │ │ │ │ ├── SDL_render_vita_gxm_types.h │ │ │ │ │ └── shader_src │ │ │ │ │ ├── clear_f.cg │ │ │ │ │ ├── clear_v.cg │ │ │ │ │ ├── color_f.cg │ │ │ │ │ ├── color_v.cg │ │ │ │ │ ├── texture_f.cg │ │ │ │ │ └── texture_v.cg │ │ │ ├── sensor │ │ │ │ ├── SDL_sensor.c │ │ │ │ ├── SDL_sensor_c.h │ │ │ │ ├── SDL_syssensor.h │ │ │ │ ├── android │ │ │ │ │ ├── SDL_androidsensor.c │ │ │ │ │ └── SDL_androidsensor.h │ │ │ │ ├── coremotion │ │ │ │ │ ├── SDL_coremotionsensor.h │ │ │ │ │ └── SDL_coremotionsensor.m │ │ │ │ ├── dummy │ │ │ │ │ ├── SDL_dummysensor.c │ │ │ │ │ └── SDL_dummysensor.h │ │ │ │ ├── n3ds │ │ │ │ │ └── SDL_n3dssensor.c │ │ │ │ ├── vita │ │ │ │ │ ├── SDL_vitasensor.c │ │ │ │ │ └── SDL_vitasensor.h │ │ │ │ └── windows │ │ │ │ │ ├── SDL_windowssensor.c │ │ │ │ │ └── SDL_windowssensor.h │ │ │ ├── stdlib │ │ │ │ ├── SDL_crc16.c │ │ │ │ ├── SDL_crc32.c │ │ │ │ ├── SDL_getenv.c │ │ │ │ ├── SDL_iconv.c │ │ │ │ ├── SDL_malloc.c │ │ │ │ ├── SDL_mslibc.c │ │ │ │ ├── SDL_qsort.c │ │ │ │ ├── SDL_stdlib.c │ │ │ │ ├── SDL_string.c │ │ │ │ ├── SDL_strtokr.c │ │ │ │ └── SDL_vacopy.h │ │ │ ├── test │ │ │ │ ├── SDL_test_assert.c │ │ │ │ ├── SDL_test_common.c │ │ │ │ ├── SDL_test_compare.c │ │ │ │ ├── SDL_test_crc32.c │ │ │ │ ├── SDL_test_font.c │ │ │ │ ├── SDL_test_fuzzer.c │ │ │ │ ├── SDL_test_harness.c │ │ │ │ ├── SDL_test_imageBlit.c │ │ │ │ ├── SDL_test_imageBlitBlend.c │ │ │ │ ├── SDL_test_imageFace.c │ │ │ │ ├── SDL_test_imagePrimitives.c │ │ │ │ ├── SDL_test_imagePrimitivesBlend.c │ │ │ │ ├── SDL_test_log.c │ │ │ │ ├── SDL_test_md5.c │ │ │ │ ├── SDL_test_memory.c │ │ │ │ └── SDL_test_random.c │ │ │ ├── thread │ │ │ │ ├── SDL_systhread.h │ │ │ │ ├── SDL_thread.c │ │ │ │ ├── SDL_thread_c.h │ │ │ │ ├── generic │ │ │ │ │ ├── SDL_syscond.c │ │ │ │ │ ├── SDL_syscond_c.h │ │ │ │ │ ├── SDL_sysmutex.c │ │ │ │ │ ├── SDL_sysmutex_c.h │ │ │ │ │ ├── SDL_syssem.c │ │ │ │ │ ├── SDL_systhread.c │ │ │ │ │ ├── SDL_systhread_c.h │ │ │ │ │ └── SDL_systls.c │ │ │ │ ├── n3ds │ │ │ │ │ ├── SDL_sysmutex.c │ │ │ │ │ ├── SDL_sysmutex_c.h │ │ │ │ │ ├── SDL_syssem.c │ │ │ │ │ ├── SDL_systhread.c │ │ │ │ │ └── SDL_systhread_c.h │ │ │ │ ├── ngage │ │ │ │ │ ├── SDL_sysmutex.cpp │ │ │ │ │ ├── SDL_syssem.cpp │ │ │ │ │ ├── SDL_systhread.cpp │ │ │ │ │ └── SDL_systhread_c.h │ │ │ │ ├── os2 │ │ │ │ │ ├── SDL_sysmutex.c │ │ │ │ │ ├── SDL_syssem.c │ │ │ │ │ ├── SDL_systhread.c │ │ │ │ │ ├── SDL_systhread_c.h │ │ │ │ │ ├── SDL_systls.c │ │ │ │ │ └── SDL_systls_c.h │ │ │ │ ├── ps2 │ │ │ │ │ ├── SDL_syssem.c │ │ │ │ │ ├── SDL_systhread.c │ │ │ │ │ └── SDL_systhread_c.h │ │ │ │ ├── psp │ │ │ │ │ ├── SDL_sysmutex.c │ │ │ │ │ ├── SDL_sysmutex_c.h │ │ │ │ │ ├── SDL_syssem.c │ │ │ │ │ ├── SDL_systhread.c │ │ │ │ │ └── SDL_systhread_c.h │ │ │ │ ├── pthread │ │ │ │ │ ├── SDL_syscond.c │ │ │ │ │ ├── SDL_sysmutex.c │ │ │ │ │ ├── SDL_sysmutex_c.h │ │ │ │ │ ├── SDL_syssem.c │ │ │ │ │ ├── SDL_systhread.c │ │ │ │ │ ├── SDL_systhread_c.h │ │ │ │ │ └── SDL_systls.c │ │ │ │ ├── stdcpp │ │ │ │ │ ├── SDL_syscond.cpp │ │ │ │ │ ├── SDL_sysmutex.cpp │ │ │ │ │ ├── SDL_sysmutex_c.h │ │ │ │ │ ├── SDL_systhread.cpp │ │ │ │ │ └── SDL_systhread_c.h │ │ │ │ ├── vita │ │ │ │ │ ├── SDL_sysmutex.c │ │ │ │ │ ├── SDL_sysmutex_c.h │ │ │ │ │ ├── SDL_syssem.c │ │ │ │ │ ├── SDL_systhread.c │ │ │ │ │ └── SDL_systhread_c.h │ │ │ │ └── windows │ │ │ │ │ ├── SDL_syscond_cv.c │ │ │ │ │ ├── SDL_sysmutex.c │ │ │ │ │ ├── SDL_sysmutex_c.h │ │ │ │ │ ├── SDL_syssem.c │ │ │ │ │ ├── SDL_systhread.c │ │ │ │ │ ├── SDL_systhread_c.h │ │ │ │ │ └── SDL_systls.c │ │ │ ├── timer │ │ │ │ ├── SDL_timer.c │ │ │ │ ├── SDL_timer_c.h │ │ │ │ ├── dummy │ │ │ │ │ └── SDL_systimer.c │ │ │ │ ├── haiku │ │ │ │ │ └── SDL_systimer.c │ │ │ │ ├── n3ds │ │ │ │ │ └── SDL_systimer.c │ │ │ │ ├── ngage │ │ │ │ │ └── SDL_systimer.cpp │ │ │ │ ├── os2 │ │ │ │ │ └── SDL_systimer.c │ │ │ │ ├── ps2 │ │ │ │ │ └── SDL_systimer.c │ │ │ │ ├── psp │ │ │ │ │ └── SDL_systimer.c │ │ │ │ ├── unix │ │ │ │ │ └── SDL_systimer.c │ │ │ │ ├── vita │ │ │ │ │ └── SDL_systimer.c │ │ │ │ └── windows │ │ │ │ │ └── SDL_systimer.c │ │ │ └── video │ │ │ │ ├── SDL_RLEaccel.c │ │ │ │ ├── SDL_RLEaccel_c.h │ │ │ │ ├── SDL_blit.c │ │ │ │ ├── SDL_blit.h │ │ │ │ ├── SDL_blit_0.c │ │ │ │ ├── SDL_blit_1.c │ │ │ │ ├── SDL_blit_A.c │ │ │ │ ├── SDL_blit_N.c │ │ │ │ ├── SDL_blit_auto.c │ │ │ │ ├── SDL_blit_auto.h │ │ │ │ ├── SDL_blit_copy.c │ │ │ │ ├── SDL_blit_copy.h │ │ │ │ ├── SDL_blit_slow.c │ │ │ │ ├── SDL_blit_slow.h │ │ │ │ ├── SDL_bmp.c │ │ │ │ ├── SDL_clipboard.c │ │ │ │ ├── SDL_egl.c │ │ │ │ ├── SDL_egl_c.h │ │ │ │ ├── SDL_fillrect.c │ │ │ │ ├── SDL_pixels.c │ │ │ │ ├── SDL_pixels_c.h │ │ │ │ ├── SDL_rect.c │ │ │ │ ├── SDL_rect_c.h │ │ │ │ ├── SDL_rect_impl.h │ │ │ │ ├── SDL_shape.c │ │ │ │ ├── SDL_shape_internals.h │ │ │ │ ├── SDL_stretch.c │ │ │ │ ├── SDL_surface.c │ │ │ │ ├── SDL_sysvideo.h │ │ │ │ ├── SDL_video.c │ │ │ │ ├── SDL_vulkan_internal.h │ │ │ │ ├── SDL_vulkan_utils.c │ │ │ │ ├── SDL_yuv.c │ │ │ │ ├── SDL_yuv_c.h │ │ │ │ ├── android │ │ │ │ ├── SDL_androidclipboard.c │ │ │ │ ├── SDL_androidclipboard.h │ │ │ │ ├── SDL_androidevents.c │ │ │ │ ├── SDL_androidevents.h │ │ │ │ ├── SDL_androidgl.c │ │ │ │ ├── SDL_androidgl.h │ │ │ │ ├── SDL_androidkeyboard.c │ │ │ │ ├── SDL_androidkeyboard.h │ │ │ │ ├── SDL_androidmessagebox.c │ │ │ │ ├── SDL_androidmessagebox.h │ │ │ │ ├── SDL_androidmouse.c │ │ │ │ ├── SDL_androidmouse.h │ │ │ │ ├── SDL_androidtouch.c │ │ │ │ ├── SDL_androidtouch.h │ │ │ │ ├── SDL_androidvideo.c │ │ │ │ ├── SDL_androidvideo.h │ │ │ │ ├── SDL_androidvulkan.c │ │ │ │ ├── SDL_androidvulkan.h │ │ │ │ ├── SDL_androidwindow.c │ │ │ │ └── SDL_androidwindow.h │ │ │ │ ├── arm │ │ │ │ ├── pixman-arm-asm.h │ │ │ │ ├── pixman-arm-neon-asm.S │ │ │ │ ├── pixman-arm-neon-asm.h │ │ │ │ ├── pixman-arm-simd-asm.S │ │ │ │ └── pixman-arm-simd-asm.h │ │ │ │ ├── cocoa │ │ │ │ ├── SDL_cocoaclipboard.h │ │ │ │ ├── SDL_cocoaclipboard.m │ │ │ │ ├── SDL_cocoaevents.h │ │ │ │ ├── SDL_cocoaevents.m │ │ │ │ ├── SDL_cocoakeyboard.h │ │ │ │ ├── SDL_cocoakeyboard.m │ │ │ │ ├── SDL_cocoamessagebox.h │ │ │ │ ├── SDL_cocoamessagebox.m │ │ │ │ ├── SDL_cocoametalview.h │ │ │ │ ├── SDL_cocoametalview.m │ │ │ │ ├── SDL_cocoamodes.h │ │ │ │ ├── SDL_cocoamodes.m │ │ │ │ ├── SDL_cocoamouse.h │ │ │ │ ├── SDL_cocoamouse.m │ │ │ │ ├── SDL_cocoaopengl.h │ │ │ │ ├── SDL_cocoaopengl.m │ │ │ │ ├── SDL_cocoaopengles.h │ │ │ │ ├── SDL_cocoaopengles.m │ │ │ │ ├── SDL_cocoashape.h │ │ │ │ ├── SDL_cocoashape.m │ │ │ │ ├── SDL_cocoavideo.h │ │ │ │ ├── SDL_cocoavideo.m │ │ │ │ ├── SDL_cocoavulkan.h │ │ │ │ ├── SDL_cocoavulkan.m │ │ │ │ ├── SDL_cocoawindow.h │ │ │ │ └── SDL_cocoawindow.m │ │ │ │ ├── directfb │ │ │ │ ├── SDL_DirectFB_WM.c │ │ │ │ ├── SDL_DirectFB_WM.h │ │ │ │ ├── SDL_DirectFB_dyn.c │ │ │ │ ├── SDL_DirectFB_dyn.h │ │ │ │ ├── SDL_DirectFB_events.c │ │ │ │ ├── SDL_DirectFB_events.h │ │ │ │ ├── SDL_DirectFB_modes.c │ │ │ │ ├── SDL_DirectFB_modes.h │ │ │ │ ├── SDL_DirectFB_mouse.c │ │ │ │ ├── SDL_DirectFB_mouse.h │ │ │ │ ├── SDL_DirectFB_opengl.c │ │ │ │ ├── SDL_DirectFB_opengl.h │ │ │ │ ├── SDL_DirectFB_render.c │ │ │ │ ├── SDL_DirectFB_render.h │ │ │ │ ├── SDL_DirectFB_shape.c │ │ │ │ ├── SDL_DirectFB_shape.h │ │ │ │ ├── SDL_DirectFB_video.c │ │ │ │ ├── SDL_DirectFB_video.h │ │ │ │ ├── SDL_DirectFB_vulkan.c │ │ │ │ ├── SDL_DirectFB_vulkan.h │ │ │ │ ├── SDL_DirectFB_window.c │ │ │ │ └── SDL_DirectFB_window.h │ │ │ │ ├── dummy │ │ │ │ ├── SDL_nullevents.c │ │ │ │ ├── SDL_nullevents_c.h │ │ │ │ ├── SDL_nullframebuffer.c │ │ │ │ ├── SDL_nullframebuffer_c.h │ │ │ │ ├── SDL_nullvideo.c │ │ │ │ └── SDL_nullvideo.h │ │ │ │ ├── emscripten │ │ │ │ ├── SDL_emscriptenevents.c │ │ │ │ ├── SDL_emscriptenevents.h │ │ │ │ ├── SDL_emscriptenframebuffer.c │ │ │ │ ├── SDL_emscriptenframebuffer.h │ │ │ │ ├── SDL_emscriptenmouse.c │ │ │ │ ├── SDL_emscriptenmouse.h │ │ │ │ ├── SDL_emscriptenopengles.c │ │ │ │ ├── SDL_emscriptenopengles.h │ │ │ │ ├── SDL_emscriptenvideo.c │ │ │ │ └── SDL_emscriptenvideo.h │ │ │ │ ├── haiku │ │ │ │ ├── SDL_BApp.h │ │ │ │ ├── SDL_BWin.h │ │ │ │ ├── SDL_bclipboard.cc │ │ │ │ ├── SDL_bclipboard.h │ │ │ │ ├── SDL_bevents.cc │ │ │ │ ├── SDL_bevents.h │ │ │ │ ├── SDL_bframebuffer.cc │ │ │ │ ├── SDL_bframebuffer.h │ │ │ │ ├── SDL_bkeyboard.cc │ │ │ │ ├── SDL_bkeyboard.h │ │ │ │ ├── SDL_bmessagebox.cc │ │ │ │ ├── SDL_bmessagebox.h │ │ │ │ ├── SDL_bmodes.cc │ │ │ │ ├── SDL_bmodes.h │ │ │ │ ├── SDL_bopengl.cc │ │ │ │ ├── SDL_bopengl.h │ │ │ │ ├── SDL_bvideo.cc │ │ │ │ ├── SDL_bvideo.h │ │ │ │ ├── SDL_bwindow.cc │ │ │ │ └── SDL_bwindow.h │ │ │ │ ├── khronos │ │ │ │ ├── EGL │ │ │ │ │ ├── egl.h │ │ │ │ │ ├── eglext.h │ │ │ │ │ └── eglplatform.h │ │ │ │ ├── GLES2 │ │ │ │ │ ├── gl2.h │ │ │ │ │ ├── gl2ext.h │ │ │ │ │ └── gl2platform.h │ │ │ │ ├── KHR │ │ │ │ │ └── khrplatform.h │ │ │ │ ├── vk_video │ │ │ │ │ ├── vulkan_video_codec_h264std.h │ │ │ │ │ ├── vulkan_video_codec_h264std_decode.h │ │ │ │ │ ├── vulkan_video_codec_h264std_encode.h │ │ │ │ │ ├── vulkan_video_codec_h265std.h │ │ │ │ │ ├── vulkan_video_codec_h265std_decode.h │ │ │ │ │ ├── vulkan_video_codec_h265std_encode.h │ │ │ │ │ └── vulkan_video_codecs_common.h │ │ │ │ └── vulkan │ │ │ │ │ ├── vk_icd.h │ │ │ │ │ ├── vk_layer.h │ │ │ │ │ ├── vk_platform.h │ │ │ │ │ ├── vk_sdk_platform.h │ │ │ │ │ ├── vulkan.h │ │ │ │ │ ├── vulkan_android.h │ │ │ │ │ ├── vulkan_beta.h │ │ │ │ │ ├── vulkan_core.h │ │ │ │ │ ├── vulkan_directfb.h │ │ │ │ │ ├── vulkan_fuchsia.h │ │ │ │ │ ├── vulkan_ggp.h │ │ │ │ │ ├── vulkan_ios.h │ │ │ │ │ ├── vulkan_macos.h │ │ │ │ │ ├── vulkan_metal.h │ │ │ │ │ ├── vulkan_screen.h │ │ │ │ │ ├── vulkan_vi.h │ │ │ │ │ ├── vulkan_wayland.h │ │ │ │ │ ├── vulkan_win32.h │ │ │ │ │ ├── vulkan_xcb.h │ │ │ │ │ ├── vulkan_xlib.h │ │ │ │ │ └── vulkan_xlib_xrandr.h │ │ │ │ ├── kmsdrm │ │ │ │ ├── SDL_kmsdrmdyn.c │ │ │ │ ├── SDL_kmsdrmdyn.h │ │ │ │ ├── SDL_kmsdrmevents.c │ │ │ │ ├── SDL_kmsdrmevents.h │ │ │ │ ├── SDL_kmsdrmmouse.c │ │ │ │ ├── SDL_kmsdrmmouse.h │ │ │ │ ├── SDL_kmsdrmopengles.c │ │ │ │ ├── SDL_kmsdrmopengles.h │ │ │ │ ├── SDL_kmsdrmsym.h │ │ │ │ ├── SDL_kmsdrmvideo.c │ │ │ │ ├── SDL_kmsdrmvideo.h │ │ │ │ ├── SDL_kmsdrmvulkan.c │ │ │ │ └── SDL_kmsdrmvulkan.h │ │ │ │ ├── n3ds │ │ │ │ ├── SDL_n3dsevents.c │ │ │ │ ├── SDL_n3dsevents_c.h │ │ │ │ ├── SDL_n3dsframebuffer.c │ │ │ │ ├── SDL_n3dsframebuffer_c.h │ │ │ │ ├── SDL_n3dsswkb.c │ │ │ │ ├── SDL_n3dsswkb.h │ │ │ │ ├── SDL_n3dstouch.c │ │ │ │ ├── SDL_n3dstouch.h │ │ │ │ ├── SDL_n3dsvideo.c │ │ │ │ └── SDL_n3dsvideo.h │ │ │ │ ├── nacl │ │ │ │ ├── SDL_naclevents.c │ │ │ │ ├── SDL_naclevents_c.h │ │ │ │ ├── SDL_naclglue.c │ │ │ │ ├── SDL_naclopengles.c │ │ │ │ ├── SDL_naclopengles.h │ │ │ │ ├── SDL_naclvideo.c │ │ │ │ ├── SDL_naclvideo.h │ │ │ │ ├── SDL_naclwindow.c │ │ │ │ └── SDL_naclwindow.h │ │ │ │ ├── ngage │ │ │ │ ├── SDL_ngageevents.cpp │ │ │ │ ├── SDL_ngageevents_c.h │ │ │ │ ├── SDL_ngageframebuffer.cpp │ │ │ │ ├── SDL_ngageframebuffer_c.h │ │ │ │ ├── SDL_ngagevideo.cpp │ │ │ │ ├── SDL_ngagevideo.h │ │ │ │ ├── SDL_ngagewindow.cpp │ │ │ │ └── SDL_ngagewindow.h │ │ │ │ ├── offscreen │ │ │ │ ├── SDL_offscreenevents.c │ │ │ │ ├── SDL_offscreenevents_c.h │ │ │ │ ├── SDL_offscreenframebuffer.c │ │ │ │ ├── SDL_offscreenframebuffer_c.h │ │ │ │ ├── SDL_offscreenopengles.c │ │ │ │ ├── SDL_offscreenopengles.h │ │ │ │ ├── SDL_offscreenvideo.c │ │ │ │ ├── SDL_offscreenvideo.h │ │ │ │ ├── SDL_offscreenwindow.c │ │ │ │ └── SDL_offscreenwindow.h │ │ │ │ ├── os2 │ │ │ │ ├── SDL_gradd.h │ │ │ │ ├── SDL_os2dive.c │ │ │ │ ├── SDL_os2messagebox.c │ │ │ │ ├── SDL_os2messagebox.h │ │ │ │ ├── SDL_os2mouse.c │ │ │ │ ├── SDL_os2mouse.h │ │ │ │ ├── SDL_os2output.h │ │ │ │ ├── SDL_os2util.c │ │ │ │ ├── SDL_os2util.h │ │ │ │ ├── SDL_os2video.c │ │ │ │ ├── SDL_os2video.h │ │ │ │ └── SDL_os2vman.c │ │ │ │ ├── pandora │ │ │ │ ├── SDL_pandora.c │ │ │ │ ├── SDL_pandora.h │ │ │ │ ├── SDL_pandora_events.c │ │ │ │ └── SDL_pandora_events.h │ │ │ │ ├── ps2 │ │ │ │ ├── SDL_ps2video.c │ │ │ │ └── SDL_ps2video.h │ │ │ │ ├── psp │ │ │ │ ├── SDL_pspevents.c │ │ │ │ ├── SDL_pspevents_c.h │ │ │ │ ├── SDL_pspgl.c │ │ │ │ ├── SDL_pspgl_c.h │ │ │ │ ├── SDL_pspmouse.c │ │ │ │ ├── SDL_pspmouse_c.h │ │ │ │ ├── SDL_pspvideo.c │ │ │ │ └── SDL_pspvideo.h │ │ │ │ ├── qnx │ │ │ │ ├── gl.c │ │ │ │ ├── keyboard.c │ │ │ │ ├── sdl_qnx.h │ │ │ │ └── video.c │ │ │ │ ├── raspberry │ │ │ │ ├── SDL_rpievents.c │ │ │ │ ├── SDL_rpievents_c.h │ │ │ │ ├── SDL_rpimouse.c │ │ │ │ ├── SDL_rpimouse.h │ │ │ │ ├── SDL_rpiopengles.c │ │ │ │ ├── SDL_rpiopengles.h │ │ │ │ ├── SDL_rpivideo.c │ │ │ │ └── SDL_rpivideo.h │ │ │ │ ├── riscos │ │ │ │ ├── SDL_riscosdefs.h │ │ │ │ ├── SDL_riscosevents.c │ │ │ │ ├── SDL_riscosevents_c.h │ │ │ │ ├── SDL_riscosframebuffer.c │ │ │ │ ├── SDL_riscosframebuffer_c.h │ │ │ │ ├── SDL_riscosmessagebox.c │ │ │ │ ├── SDL_riscosmessagebox.h │ │ │ │ ├── SDL_riscosmodes.c │ │ │ │ ├── SDL_riscosmodes.h │ │ │ │ ├── SDL_riscosmouse.c │ │ │ │ ├── SDL_riscosmouse.h │ │ │ │ ├── SDL_riscosvideo.c │ │ │ │ ├── SDL_riscosvideo.h │ │ │ │ ├── SDL_riscoswindow.c │ │ │ │ ├── SDL_riscoswindow.h │ │ │ │ └── scancodes_riscos.h │ │ │ │ ├── sdlgenblit.pl │ │ │ │ ├── uikit │ │ │ │ ├── SDL_uikitappdelegate.h │ │ │ │ ├── SDL_uikitappdelegate.m │ │ │ │ ├── SDL_uikitclipboard.h │ │ │ │ ├── SDL_uikitclipboard.m │ │ │ │ ├── SDL_uikitevents.h │ │ │ │ ├── SDL_uikitevents.m │ │ │ │ ├── SDL_uikitmessagebox.h │ │ │ │ ├── SDL_uikitmessagebox.m │ │ │ │ ├── SDL_uikitmetalview.h │ │ │ │ ├── SDL_uikitmetalview.m │ │ │ │ ├── SDL_uikitmodes.h │ │ │ │ ├── SDL_uikitmodes.m │ │ │ │ ├── SDL_uikitopengles.h │ │ │ │ ├── SDL_uikitopengles.m │ │ │ │ ├── SDL_uikitopenglview.h │ │ │ │ ├── SDL_uikitopenglview.m │ │ │ │ ├── SDL_uikitvideo.h │ │ │ │ ├── SDL_uikitvideo.m │ │ │ │ ├── SDL_uikitview.h │ │ │ │ ├── SDL_uikitview.m │ │ │ │ ├── SDL_uikitviewcontroller.h │ │ │ │ ├── SDL_uikitviewcontroller.m │ │ │ │ ├── SDL_uikitvulkan.h │ │ │ │ ├── SDL_uikitvulkan.m │ │ │ │ ├── SDL_uikitwindow.h │ │ │ │ └── SDL_uikitwindow.m │ │ │ │ ├── vita │ │ │ │ ├── SDL_vitaframebuffer.c │ │ │ │ ├── SDL_vitaframebuffer.h │ │ │ │ ├── SDL_vitagl_pvr.c │ │ │ │ ├── SDL_vitagl_pvr_c.h │ │ │ │ ├── SDL_vitagles.c │ │ │ │ ├── SDL_vitagles_c.h │ │ │ │ ├── SDL_vitagles_pvr.c │ │ │ │ ├── SDL_vitagles_pvr_c.h │ │ │ │ ├── SDL_vitakeyboard.c │ │ │ │ ├── SDL_vitakeyboard.h │ │ │ │ ├── SDL_vitamessagebox.c │ │ │ │ ├── SDL_vitamessagebox.h │ │ │ │ ├── SDL_vitamouse.c │ │ │ │ ├── SDL_vitamouse_c.h │ │ │ │ ├── SDL_vitatouch.c │ │ │ │ ├── SDL_vitatouch.h │ │ │ │ ├── SDL_vitavideo.c │ │ │ │ └── SDL_vitavideo.h │ │ │ │ ├── vivante │ │ │ │ ├── SDL_vivanteopengles.c │ │ │ │ ├── SDL_vivanteopengles.h │ │ │ │ ├── SDL_vivanteplatform.c │ │ │ │ ├── SDL_vivanteplatform.h │ │ │ │ ├── SDL_vivantevideo.c │ │ │ │ ├── SDL_vivantevideo.h │ │ │ │ ├── SDL_vivantevulkan.c │ │ │ │ └── SDL_vivantevulkan.h │ │ │ │ ├── wayland │ │ │ │ ├── SDL_waylandclipboard.c │ │ │ │ ├── SDL_waylandclipboard.h │ │ │ │ ├── SDL_waylanddatamanager.c │ │ │ │ ├── SDL_waylanddatamanager.h │ │ │ │ ├── SDL_waylanddyn.c │ │ │ │ ├── SDL_waylanddyn.h │ │ │ │ ├── SDL_waylandevents.c │ │ │ │ ├── SDL_waylandevents_c.h │ │ │ │ ├── SDL_waylandkeyboard.c │ │ │ │ ├── SDL_waylandkeyboard.h │ │ │ │ ├── SDL_waylandmessagebox.c │ │ │ │ ├── SDL_waylandmessagebox.h │ │ │ │ ├── SDL_waylandmouse.c │ │ │ │ ├── SDL_waylandmouse.h │ │ │ │ ├── SDL_waylandopengles.c │ │ │ │ ├── SDL_waylandopengles.h │ │ │ │ ├── SDL_waylandshmbuffer.c │ │ │ │ ├── SDL_waylandshmbuffer.h │ │ │ │ ├── SDL_waylandsym.h │ │ │ │ ├── SDL_waylandtouch.c │ │ │ │ ├── SDL_waylandtouch.h │ │ │ │ ├── SDL_waylandvideo.c │ │ │ │ ├── SDL_waylandvideo.h │ │ │ │ ├── SDL_waylandvulkan.c │ │ │ │ ├── SDL_waylandvulkan.h │ │ │ │ ├── SDL_waylandwindow.c │ │ │ │ └── SDL_waylandwindow.h │ │ │ │ ├── windows │ │ │ │ ├── SDL_msctf.h │ │ │ │ ├── SDL_vkeys.h │ │ │ │ ├── SDL_windowsclipboard.c │ │ │ │ ├── SDL_windowsclipboard.h │ │ │ │ ├── SDL_windowsevents.c │ │ │ │ ├── SDL_windowsevents.h │ │ │ │ ├── SDL_windowsframebuffer.c │ │ │ │ ├── SDL_windowsframebuffer.h │ │ │ │ ├── SDL_windowskeyboard.c │ │ │ │ ├── SDL_windowskeyboard.h │ │ │ │ ├── SDL_windowsmessagebox.c │ │ │ │ ├── SDL_windowsmessagebox.h │ │ │ │ ├── SDL_windowsmodes.c │ │ │ │ ├── SDL_windowsmodes.h │ │ │ │ ├── SDL_windowsmouse.c │ │ │ │ ├── SDL_windowsmouse.h │ │ │ │ ├── SDL_windowsopengl.c │ │ │ │ ├── SDL_windowsopengl.h │ │ │ │ ├── SDL_windowsopengles.c │ │ │ │ ├── SDL_windowsopengles.h │ │ │ │ ├── SDL_windowsshape.c │ │ │ │ ├── SDL_windowsshape.h │ │ │ │ ├── SDL_windowsvideo.c │ │ │ │ ├── SDL_windowsvideo.h │ │ │ │ ├── SDL_windowsvulkan.c │ │ │ │ ├── SDL_windowsvulkan.h │ │ │ │ ├── SDL_windowswindow.c │ │ │ │ ├── SDL_windowswindow.h │ │ │ │ └── wmmsg.h │ │ │ │ ├── winrt │ │ │ │ ├── SDL_winrtevents.cpp │ │ │ │ ├── SDL_winrtevents_c.h │ │ │ │ ├── SDL_winrtgamebar.cpp │ │ │ │ ├── SDL_winrtgamebar_cpp.h │ │ │ │ ├── SDL_winrtkeyboard.cpp │ │ │ │ ├── SDL_winrtmessagebox.cpp │ │ │ │ ├── SDL_winrtmessagebox.h │ │ │ │ ├── SDL_winrtmouse.cpp │ │ │ │ ├── SDL_winrtmouse_c.h │ │ │ │ ├── SDL_winrtopengles.cpp │ │ │ │ ├── SDL_winrtopengles.h │ │ │ │ ├── SDL_winrtpointerinput.cpp │ │ │ │ ├── SDL_winrtvideo.cpp │ │ │ │ └── SDL_winrtvideo_cpp.h │ │ │ │ ├── x11 │ │ │ │ ├── SDL_x11clipboard.c │ │ │ │ ├── SDL_x11clipboard.h │ │ │ │ ├── SDL_x11dyn.c │ │ │ │ ├── SDL_x11dyn.h │ │ │ │ ├── SDL_x11events.c │ │ │ │ ├── SDL_x11events.h │ │ │ │ ├── SDL_x11framebuffer.c │ │ │ │ ├── SDL_x11framebuffer.h │ │ │ │ ├── SDL_x11keyboard.c │ │ │ │ ├── SDL_x11keyboard.h │ │ │ │ ├── SDL_x11messagebox.c │ │ │ │ ├── SDL_x11messagebox.h │ │ │ │ ├── SDL_x11modes.c │ │ │ │ ├── SDL_x11modes.h │ │ │ │ ├── SDL_x11mouse.c │ │ │ │ ├── SDL_x11mouse.h │ │ │ │ ├── SDL_x11opengl.c │ │ │ │ ├── SDL_x11opengl.h │ │ │ │ ├── SDL_x11opengles.c │ │ │ │ ├── SDL_x11opengles.h │ │ │ │ ├── SDL_x11shape.c │ │ │ │ ├── SDL_x11shape.h │ │ │ │ ├── SDL_x11sym.h │ │ │ │ ├── SDL_x11touch.c │ │ │ │ ├── SDL_x11touch.h │ │ │ │ ├── SDL_x11video.c │ │ │ │ ├── SDL_x11video.h │ │ │ │ ├── SDL_x11vulkan.c │ │ │ │ ├── SDL_x11vulkan.h │ │ │ │ ├── SDL_x11window.c │ │ │ │ ├── SDL_x11window.h │ │ │ │ ├── SDL_x11xfixes.c │ │ │ │ ├── SDL_x11xfixes.h │ │ │ │ ├── SDL_x11xinput2.c │ │ │ │ ├── SDL_x11xinput2.h │ │ │ │ ├── edid-parse.c │ │ │ │ └── edid.h │ │ │ │ └── yuv2rgb │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── yuv_rgb.h │ │ │ │ ├── yuv_rgb_common.h │ │ │ │ ├── yuv_rgb_internal.h │ │ │ │ ├── yuv_rgb_lsx.c │ │ │ │ ├── yuv_rgb_lsx.h │ │ │ │ ├── yuv_rgb_lsx_func.h │ │ │ │ ├── yuv_rgb_sse.c │ │ │ │ ├── yuv_rgb_sse.h │ │ │ │ ├── yuv_rgb_sse_func.h │ │ │ │ ├── yuv_rgb_std.c │ │ │ │ ├── yuv_rgb_std.h │ │ │ │ └── yuv_rgb_std_func.h │ │ │ ├── visualtest │ │ │ ├── COPYING.txt │ │ │ ├── Makefile.in │ │ │ ├── README.txt │ │ │ ├── acinclude.m4 │ │ │ ├── autogen.sh │ │ │ ├── configs │ │ │ │ ├── testsprite2_blendmodes │ │ │ │ │ ├── testsprite2_blendmodes.actions │ │ │ │ │ ├── testsprite2_blendmodes.config │ │ │ │ │ └── testsprite2_blendmodes.parameters │ │ │ │ ├── testsprite2_crashtest │ │ │ │ │ ├── testsprite2_crashtest.actions │ │ │ │ │ ├── testsprite2_crashtest.config │ │ │ │ │ └── testsprite2_crashtest.parameters │ │ │ │ ├── testsprite2_fullscreen │ │ │ │ │ ├── testsprite2_fullscreen.actions │ │ │ │ │ ├── testsprite2_fullscreen.config │ │ │ │ │ └── testsprite2_fullscreen.parameters │ │ │ │ └── testsprite2_geometry │ │ │ │ │ ├── testsprite2_geometry.actions │ │ │ │ │ ├── testsprite2_geometry.config │ │ │ │ │ └── testsprite2_geometry.parameters │ │ │ ├── configure │ │ │ ├── configure.ac │ │ │ ├── docs │ │ │ │ └── Doxyfile │ │ │ ├── include │ │ │ │ ├── SDL_visualtest_action_configparser.h │ │ │ │ ├── SDL_visualtest_exhaustive_variator.h │ │ │ │ ├── SDL_visualtest_harness_argparser.h │ │ │ │ ├── SDL_visualtest_mischelper.h │ │ │ │ ├── SDL_visualtest_parsehelper.h │ │ │ │ ├── SDL_visualtest_process.h │ │ │ │ ├── SDL_visualtest_random_variator.h │ │ │ │ ├── SDL_visualtest_rwhelper.h │ │ │ │ ├── SDL_visualtest_screenshot.h │ │ │ │ ├── SDL_visualtest_sut_configparser.h │ │ │ │ ├── SDL_visualtest_variator_common.h │ │ │ │ └── SDL_visualtest_variators.h │ │ │ ├── launch_harness.cmd │ │ │ ├── launch_harness.sh │ │ │ ├── src │ │ │ │ ├── action_configparser.c │ │ │ │ ├── harness_argparser.c │ │ │ │ ├── linux │ │ │ │ │ └── linux_process.c │ │ │ │ ├── mischelper.c │ │ │ │ ├── parsehelper.c │ │ │ │ ├── rwhelper.c │ │ │ │ ├── screenshot.c │ │ │ │ ├── sut_configparser.c │ │ │ │ ├── testharness.c │ │ │ │ ├── variator_common.c │ │ │ │ ├── variator_exhaustive.c │ │ │ │ ├── variator_random.c │ │ │ │ ├── variators.c │ │ │ │ └── windows │ │ │ │ │ ├── windows_process.c │ │ │ │ │ └── windows_screenshot.c │ │ │ ├── testsprite2_sample.actions │ │ │ ├── testsprite2_sample.config │ │ │ ├── testsprite2_sample.parameters │ │ │ └── unittest │ │ │ │ ├── testquit.actions │ │ │ │ ├── testquit.c │ │ │ │ ├── testquit.config │ │ │ │ └── testquit.parameters │ │ │ └── wayland-protocols │ │ │ ├── cursor-shape-v1.xml │ │ │ ├── fractional-scale-v1.xml │ │ │ ├── idle-inhibit-unstable-v1.xml │ │ │ ├── keyboard-shortcuts-inhibit-unstable-v1.xml │ │ │ ├── pointer-constraints-unstable-v1.xml │ │ │ ├── primary-selection-unstable-v1.xml │ │ │ ├── relative-pointer-unstable-v1.xml │ │ │ ├── tablet-unstable-v2.xml │ │ │ ├── text-input-unstable-v3.xml │ │ │ ├── viewporter.xml │ │ │ ├── wayland.xml │ │ │ ├── xdg-activation-v1.xml │ │ │ ├── xdg-decoration-unstable-v1.xml │ │ │ ├── xdg-output-unstable-v1.xml │ │ │ ├── xdg-shell.xml │ │ │ └── xdg-toplevel-icon-v1.xml │ ├── stb │ │ ├── CMakeLists.txt │ │ ├── LICENSE │ │ ├── README.md │ │ └── include │ │ │ ├── stb_image.h │ │ │ └── stb_image_write.h │ └── xbrz │ │ ├── CMakeLists.txt │ │ ├── Changelog.txt │ │ ├── License.txt │ │ ├── bstone_changelog.txt │ │ ├── include │ │ ├── xbrz.h │ │ ├── xbrz_config.h │ │ └── xbrz_tools.h │ │ └── src │ │ └── xbrz.cpp ├── tests │ ├── CMakeLists.txt │ └── src │ │ ├── process │ │ ├── CMakeLists.txt │ │ └── src │ │ │ └── bstone_tests_process.cpp │ │ ├── shared_library │ │ ├── CMakeLists.txt │ │ ├── include │ │ │ └── bstone_tests_shared_library.h │ │ └── src │ │ │ └── bstone_tests_shared_library.cpp │ │ └── tests │ │ ├── CMakeLists.txt │ │ ├── data │ │ └── bstone_tests_tag.txt │ │ └── src │ │ ├── bstone_tester.cpp │ │ ├── bstone_tester.h │ │ ├── bstone_tests.cpp │ │ ├── bstone_tests_algorithm.cpp │ │ ├── bstone_tests_api_string.cpp │ │ ├── bstone_tests_array.cpp │ │ ├── bstone_tests_ascii.cpp │ │ ├── bstone_tests_auto_arena_resource.cpp │ │ ├── bstone_tests_binary_reader.cpp │ │ ├── bstone_tests_binary_writer.cpp │ │ ├── bstone_tests_cgm_clip_space.cpp │ │ ├── bstone_tests_cgm_mat.cpp │ │ ├── bstone_tests_cgm_transform.cpp │ │ ├── bstone_tests_cgm_vec.cpp │ │ ├── bstone_tests_char_conv.cpp │ │ ├── bstone_tests_char_traits.cpp │ │ ├── bstone_tests_configurations.cpp │ │ ├── bstone_tests_crc32.cpp │ │ ├── bstone_tests_endian.cpp │ │ ├── bstone_tests_exception.cpp │ │ ├── bstone_tests_file.cpp │ │ ├── bstone_tests_file_stream.cpp │ │ ├── bstone_tests_fixed_pool_resource.cpp │ │ ├── bstone_tests_four_cc.cpp │ │ ├── bstone_tests_fs.cpp │ │ ├── bstone_tests_generic_pool_resource.cpp │ │ ├── bstone_tests_memory.cpp │ │ ├── bstone_tests_memory_pool_bitmap.cpp │ │ ├── bstone_tests_memory_resource.cpp │ │ ├── bstone_tests_memory_stream.cpp │ │ ├── bstone_tests_process.cpp │ │ ├── bstone_tests_scope_exit.cpp │ │ ├── bstone_tests_sha1.cpp │ │ ├── bstone_tests_shared_library.cpp │ │ ├── bstone_tests_single_pool_resource.cpp │ │ ├── bstone_tests_source_location.cpp │ │ ├── bstone_tests_span.cpp │ │ ├── bstone_tests_static_memory_stream.cpp │ │ ├── bstone_tests_static_ro_memory_stream.cpp │ │ ├── bstone_tests_string.cpp │ │ ├── bstone_tests_string_view.cpp │ │ ├── bstone_tests_ts_auto_arena_resource.cpp │ │ ├── bstone_tests_unique_resource.cpp │ │ ├── bstone_tests_utf.cpp │ │ ├── bstone_tests_utility.cpp │ │ ├── bstone_tests_uuid.cpp │ │ ├── bstone_tests_win32_registry_key.cpp │ │ ├── bstone_tests_win32_wstring.cpp │ │ └── bstone_tests_zstring_view.cpp └── tools │ ├── CMakeLists.txt │ ├── glapigen │ ├── CMakeLists.txt │ └── src │ │ └── bstone_glapigen.cpp │ └── ltrimcs │ ├── CMakeLists.txt │ └── src │ └── bstone_ltrimcs.cpp └── unsupported └── psvita ├── README-PSVITA.md └── src └── vita ├── CMakeLists.txt ├── Issues.md ├── sce_sys ├── icon0.png └── livearea │ └── contents │ ├── bg.png │ ├── ps.png │ ├── startup.png │ └── template.xml └── vita_input.cpp /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [{CMakeLists.txt,*.cmake}] 4 | indent_size = 4 5 | indent_style = tab 6 | 7 | [*.{c,h,cpp}] 8 | insert_final_newline = true 9 | indent_size = 4 10 | indent_style = tab 11 | 12 | [*.manifest] 13 | indent_size = 4 14 | indent_style = tab 15 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .vscode/ 3 | .vs/ 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /Blake Stone source code license.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/Blake Stone source code license.doc -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | - [HWR] Fix Z-fighting. 2 | - Revise AOG compatibility. 3 | - If possible don't define destructor with all initialized fields at declaration. 4 | - Remove `const` before non-pointer or non-reference function parameter. 5 | - Namespace `detail` to anonymous one. 6 | - Remove underscore suffix for public fields. 7 | - Make some player's sounds positional (interacting with switches, .etc). 8 | - Play `got weapon` sound on separate voice? 9 | -------------------------------------------------------------------------------- /build/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/build/.gitignore -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR) 2 | 3 | add_subdirectory(lib/khronos) 4 | add_subdirectory(lib/nuked_opl3) 5 | add_subdirectory(lib/openal_soft) 6 | add_subdirectory(lib/stb) 7 | add_subdirectory(lib/xbrz) 8 | 9 | if (BSTONE_INTERNAL_SDL2) 10 | add_subdirectory(lib/sdl2) 11 | endif () 12 | 13 | add_subdirectory(tools) 14 | add_subdirectory(bstone) 15 | 16 | if (BSTONE_TESTS) 17 | add_subdirectory(tests) 18 | endif () 19 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_adlib_music_decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | // 9 | // AdLib music decoder. 10 | // 11 | 12 | #ifndef BSTONE_ADLIB_MUSIC_DECODER_INCLUDED 13 | #define BSTONE_ADLIB_MUSIC_DECODER_INCLUDED 14 | 15 | #include "bstone_audio_decoder.h" 16 | 17 | namespace bstone 18 | { 19 | 20 | AudioDecoderUPtr make_adlib_music_audio_decoder(Opl3Type opl3_type); 21 | 22 | } // bstone 23 | 24 | #endif // !BSTONE_ADLIB_MUSIC_DECODER_INCLUDED 25 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_adlib_sfx_decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | // 9 | // AdLib sound effects decoder. 10 | // 11 | 12 | #ifndef BSTONE_ADLIB_SFX_DECODER_INCLUDED 13 | #define BSTONE_ADLIB_SFX_DECODER_INCLUDED 14 | 15 | #include "bstone_audio_decoder.h" 16 | 17 | namespace bstone 18 | { 19 | 20 | AudioDecoderUPtr make_adlib_sfx_audio_decoder(Opl3Type opl3_type); 21 | 22 | } // bstone 23 | 24 | #endif // !BSTONE_ADLIB_SFX_DECODER_INCLUDED 25 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_algorithm.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Functions for a variety of purposes that operate on ranges of elements. 8 | 9 | #include "bstone_algorithm.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_algorithm.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Functions for a variety of purposes that operate on ranges of elements. 8 | 9 | #ifndef BSTONE_ALGORITHM_INCLUDED 10 | #define BSTONE_ALGORITHM_INCLUDED 11 | 12 | namespace bstone { 13 | 14 | template 15 | inline constexpr const T& clamp(const T& x, const T& x_min, const T& x_max, TPredicate predicate) 16 | { 17 | return predicate(x, x_min) ? x_min : (predicate(x_max, x) ? x_max : x); 18 | } 19 | 20 | template 21 | inline constexpr const T& clamp(const T& x, const T& x_min, const T& x_max) 22 | { 23 | return x < x_min ? x_min : (x > x_max ? x_max : x); 24 | } 25 | 26 | } // namespace bstone 27 | 28 | #endif // BSTONE_ALGORITHM_INCLUDED 29 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_api_string.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Null-terminated API string primitive. 8 | 9 | #include "bstone_api_string.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_array.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // A container that encapsulates fixed size array. 8 | 9 | #include "bstone_array.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_ascii.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // ASCII utils. 8 | 9 | #include "bstone_ascii.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_assert.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Assertion facility. 8 | 9 | #include "bstone_assert.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Assertion facility. 8 | 9 | /* 10 | Macros: 11 | - BSTONE_NO_ASSERT 12 | Skips assertion if defined. 13 | 14 | - BSTONE_ASSERT 15 | Asserts if macros `NDEBUG` and `BSTONE_NO_ASSERT` are not defined or do nothing otherwise. 16 | */ 17 | 18 | #ifndef BSTONE_ASSERT_INCLUDED 19 | #define BSTONE_ASSERT_INCLUDED 20 | 21 | #if !defined(NDEBUG) && !defined(BSTONE_NO_ASSERT) 22 | #include 23 | 24 | #ifndef BSTONE_ASSERT 25 | #define BSTONE_ASSERT(x) assert(x) 26 | #endif 27 | #else 28 | #ifndef BSTONE_ASSERT 29 | #define BSTONE_ASSERT(x) 30 | #endif 31 | #endif 32 | 33 | #endif // BSTONE_ASSERT_INCLUDED 34 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_atomic_flag.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_ATOMIC_FLAG_INCLUDED 8 | #define BSTONE_ATOMIC_FLAG_INCLUDED 9 | 10 | #include 11 | 12 | namespace bstone { 13 | 14 | class AtomicFlag 15 | { 16 | public: 17 | explicit AtomicFlag(bool value = false) noexcept; 18 | AtomicFlag(const AtomicFlag& rhs) noexcept; 19 | AtomicFlag& operator=(bool value) noexcept; 20 | AtomicFlag& operator=(const AtomicFlag& rhs) noexcept; 21 | 22 | bool get() const noexcept; 23 | void set(bool value) noexcept; 24 | 25 | explicit operator bool() const noexcept; 26 | 27 | private: 28 | using Flag = std::atomic_bool; 29 | 30 | private: 31 | Flag flag_{}; 32 | }; 33 | 34 | } // namespace bstone 35 | 36 | #endif // BSTONE_ATOMIC_FLAG_INCLUDED 37 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_audio_mixer_output_gains.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_AUDIO_MIXER_OUTPUT_GAINS_INCLUDED 8 | #define BSTONE_AUDIO_MIXER_OUTPUT_GAINS_INCLUDED 9 | 10 | #include 11 | 12 | namespace bstone { 13 | 14 | constexpr auto audio_mixer_max_channels = 2; 15 | 16 | using AudioMixerOutputGains = std::array; 17 | 18 | } // bstone 19 | 20 | #endif // !BSTONE_AUDIO_MIXER_OUTPUT_GAINS_INCLUDED 21 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_audio_mixer_validator.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_AUDIO_MIXER_VALIDATOR_INCLUDED 8 | #define BSTONE_AUDIO_MIXER_VALIDATOR_INCLUDED 9 | 10 | #include "bstone_audio_mixer.h" 11 | 12 | namespace bstone 13 | { 14 | 15 | class AudioMixerValidator 16 | { 17 | public: 18 | static void validate_gain(double gain); 19 | static void validate_output_gains(const AudioMixerOutputGains& output_gains); 20 | }; // AudioMixerValidator 21 | 22 | } // bstone 23 | 24 | #endif // !BSTONE_AUDIO_MIXER_VALIDATOR_INCLUDED 25 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_audio_mixer_voice_handle_mgr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "bstone_audio_mixer_voice_handle_mgr.h" 8 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_bmp_image_decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_BMP_IMAGE_DECODER_INCLUDED 8 | #define BSTONE_BMP_IMAGE_DECODER_INCLUDED 9 | 10 | #include "bstone_image_decoder.h" 11 | 12 | namespace bstone { 13 | 14 | class BmpImageDecoder : public ImageDecoder 15 | { 16 | public: 17 | ~BmpImageDecoder() override; 18 | 19 | void decode( 20 | const void* src_data, 21 | int src_data_size, 22 | int& dst_width, 23 | int& dst_height, 24 | Rgba8Buffer& dst_buffer) override; 25 | }; 26 | 27 | } // namespace bstone 28 | 29 | #endif // BSTONE_BMP_IMAGE_DECODER_INCLUDED 30 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_ccmd.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "bstone_ccmd.h" 8 | #include "bstone_cvalidator.h" 9 | #include "bstone_exception.h" 10 | 11 | namespace bstone { 12 | 13 | CCmd::CCmd(StringView name, CCmdAction& action) 14 | try 15 | : 16 | name_{name}, 17 | action_{&action} 18 | { 19 | CValidator::validate_name(name_); 20 | } BSTONE_END_FUNC_CATCH_ALL_THROW_NESTED 21 | 22 | StringView CCmd::get_name() const noexcept 23 | { 24 | return name_; 25 | } 26 | 27 | CCmdAction& CCmd::get_action() const noexcept 28 | { 29 | return *action_; 30 | } 31 | 32 | } // namespace bstone 33 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_ccmd.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_CCMD_INCLUDED 8 | #define BSTONE_CCMD_INCLUDED 9 | 10 | #include "bstone_ccmd_action.h" 11 | #include "bstone_string_view.h" 12 | 13 | namespace bstone { 14 | 15 | class CCmd 16 | { 17 | public: 18 | CCmd(StringView name, CCmdAction& action); 19 | 20 | StringView get_name() const noexcept; 21 | CCmdAction& get_action() const noexcept; 22 | 23 | private: 24 | StringView name_{}; 25 | CCmdAction* action_{}; 26 | }; 27 | 28 | } // namespace bstone 29 | 30 | #endif // !BSTONE_CCMD_INCLUDED 31 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_ccmd_action.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "bstone_ccmd_action.h" 8 | 9 | namespace bstone { 10 | 11 | CCmdAction::CCmdAction() noexcept = default; 12 | CCmdAction::~CCmdAction() = default; 13 | 14 | void CCmdAction::invoke(CCmdActionArgs args) 15 | try { 16 | do_invoke(args); 17 | } BSTONE_END_FUNC_CATCH_ALL_THROW_NESTED 18 | 19 | void CCmdAction::operator()(CCmdActionArgs args) 20 | try { 21 | invoke(args); 22 | } BSTONE_END_FUNC_CATCH_ALL_THROW_NESTED 23 | 24 | } // namespace bstone 25 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_cgm_clip_space.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Computer Graphics Math - Clip space transformations. 8 | 9 | #include "bstone_cgm_clip_space.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_cgm_mat.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Computer Graphics Math - Column-major matrix. 8 | 9 | #include "bstone_cgm_mat.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_cgm_transform.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Computer Graphics Math - Common transformations. 8 | 9 | #include "bstone_cgm_transform.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_cgm_vec.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Computer Graphics Math - Vector. 8 | 9 | #include "bstone_cgm_vec.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_char_hasher.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "bstone_char_hasher.h" 8 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_char_traits.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Character traits. 8 | 9 | #include "bstone_char_traits.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_configurations.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "bstone_configurations.h" 8 | 9 | namespace bstone { 10 | 11 | extern const std::intptr_t posix_string_capacity = 16 * 1024; 12 | extern const std::intptr_t win32_wstring_capacity = 16 * 1024; 13 | 14 | const std::intptr_t sys_max_gl_contexts = 1; 15 | const std::intptr_t sys_max_gl_shared_libraries = 1; 16 | const std::intptr_t sys_max_textures = 2; 17 | const std::intptr_t sys_max_texture_locks = 1; 18 | 19 | } // namespace bstone 20 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_configurations.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_CONFIGURATIONS_INCLUDED 8 | #define BSTONE_CONFIGURATIONS_INCLUDED 9 | 10 | #include 11 | 12 | namespace bstone { 13 | 14 | extern const std::intptr_t posix_string_capacity; 15 | extern const std::intptr_t win32_wstring_capacity; 16 | 17 | extern const std::intptr_t sys_max_gl_contexts; 18 | extern const std::intptr_t sys_max_gl_shared_libraries; 19 | extern const std::intptr_t sys_max_textures; 20 | extern const std::intptr_t sys_max_texture_locks; 21 | 22 | } // namespace bstone 23 | 24 | #endif // BSTONE_CONFIGURATIONS_INCLUDED 25 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_crc32.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // CRC-32/ISO-HDLC 8 | 9 | #ifndef BSTONE_CRC32_INCLUDED 10 | #define BSTONE_CRC32_INCLUDED 11 | 12 | #include 13 | 14 | namespace bstone { 15 | 16 | class Crc32 17 | { 18 | public: 19 | std::uint32_t get_value() const noexcept; 20 | 21 | void reset() noexcept; 22 | void update(const void* data, std::intptr_t size); 23 | 24 | private: 25 | std::uint32_t value_{}; 26 | }; 27 | 28 | } // namespace bstone 29 | 30 | #endif // BSTONE_CRC32_INCLUDED 31 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_cvalidator.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_CVALIDATOR_INCLUDED 8 | #define BSTONE_CVALIDATOR_INCLUDED 9 | 10 | #include "bstone_string_view.h" 11 | 12 | namespace bstone { 13 | 14 | class CValidator 15 | { 16 | public: 17 | static void validate_name(StringView name); 18 | }; 19 | 20 | } // namespace bstone 21 | 22 | #endif // !BSTONE_CVALIDATOR_INCLUDED 23 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_cxx.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // C++ standard features. 8 | 9 | #include "bstone_cxx.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_cxx.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // C++ standard features. 8 | 9 | #ifndef BSTONE_CXX_INCLUDED 10 | #define BSTONE_CXX_INCLUDED 11 | 12 | #ifndef BSTONE_CXX_NODISCARD 13 | #if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) 14 | #define BSTONE_CXX_NODISCARD [[nodiscard]] 15 | #else 16 | #define BSTONE_CXX_NODISCARD 17 | #endif 18 | #endif // BSTONE_CXX_NODISCARD 19 | 20 | #endif // BSTONE_CXX_INCLUDED 21 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_dosbox_dbopl.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // 8 | // DOSBox DBOPL wrapper. 9 | // 10 | 11 | #ifndef BSTONE_DOSBOX_DBOPL_INCLUDED 12 | #define BSTONE_DOSBOX_DBOPL_INCLUDED 13 | 14 | #include "bstone_opl3.h" 15 | 16 | namespace bstone 17 | { 18 | 19 | Opl3UPtr make_dbopl_opl3(); 20 | 21 | } // bstone 22 | 23 | #endif // !BSTONE_DOSBOX_DBOPL_INCLUDED 24 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_encoding.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Encoding utils. 8 | 9 | #ifndef BSTONE_ENCODING_INCLUDED 10 | #define BSTONE_ENCODING_INCLUDED 11 | 12 | #include 13 | 14 | namespace bstone { 15 | 16 | std::u16string u8_to_u16(const std::string& u8_string); 17 | std::string u16_to_u8(const std::u16string& u16_string); 18 | 19 | } // namespace bstone 20 | 21 | #endif // BSTONE_ENCODING_INCLUDED 22 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_endian.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Endianness. 8 | 9 | #include "bstone_endian.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_entry_point.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_ENTRY_POINT_INCLUDED 8 | #define BSTONE_ENTRY_POINT_INCLUDED 9 | 10 | #if defined(_WIN32) 11 | #ifndef BSTONE_ENTRY_POINT_IMPLEMENTATION 12 | #undef main 13 | #define main bstone_entry_point 14 | #endif 15 | 16 | extern int bstone_entry_point(int argc, char** argv); 17 | #endif 18 | 19 | #endif // BSTONE_ENTRY_POINT_INCLUDED 20 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_exception_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Exception utils. 8 | 9 | #ifndef BSTONE_EXCEPTION_UTILS_INCLUDED 10 | #define BSTONE_EXCEPTION_UTILS_INCLUDED 11 | 12 | #include 13 | #include 14 | 15 | namespace bstone { 16 | 17 | using ExceptionMessages = std::deque; 18 | 19 | ExceptionMessages extract_exception_messages(); 20 | 21 | std::string get_nested_message(); 22 | 23 | } // namespace bstone 24 | 25 | 26 | #endif // BSTONE_EXCEPTION_UTILS_INCLUDED 27 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_fixed_pool_resource.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Memory pool with known size of an object and maximum objects. 8 | 9 | #include "bstone_fixed_pool_resource.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_format_string.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | 8 | // 9 | // A wrapper for std::ostringstream to produce a formatted string. 10 | // 11 | 12 | 13 | #include "bstone_format_string.h" 14 | 15 | 16 | namespace bstone 17 | { 18 | 19 | 20 | FormatString::FormatString() 21 | : 22 | stream_{} 23 | { 24 | } 25 | 26 | FormatString::operator std::string() 27 | { 28 | return stream_.str(); 29 | } 30 | 31 | std::string FormatString::to_string() const 32 | { 33 | return stream_.str(); 34 | } 35 | 36 | 37 | } // bstone 38 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_four_cc.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // FourCC stored as integer in little-endian order (i.e. '0123' => 0x33323130). 8 | 9 | #include "bstone_four_cc.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_fs.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // File system primitives. 8 | 9 | #include "bstone_fs.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_fs_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // File system utils. 8 | 9 | #ifndef BSTONE_FS_UTILS_INCLUDED 10 | #define BSTONE_FS_UTILS_INCLUDED 11 | 12 | #include 13 | 14 | namespace bstone { 15 | namespace fs_utils { 16 | 17 | std::string normalize_path(const std::string& path); 18 | std::string append_path_separator(const std::string& path); 19 | std::string append_path(const std::string& path, const std::string& sub_path); 20 | void replace_extension(std::string& path_name, const std::string& new_extension); 21 | std::string get_working_dir(); 22 | void rename_with_overwrite(const std::string& old_path, const std::string& new_path); 23 | 24 | } // fs_utils 25 | } // bstone 26 | 27 | #endif // BSTONE_FS_UTILS_INCLUDED 28 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_gl_r3r.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // OpenGL 3D Renderer 8 | 9 | #ifndef BSTONE_GL_R3R_INCLUDED 10 | #define BSTONE_GL_R3R_INCLUDED 11 | 12 | #include "bstone_r3r.h" 13 | 14 | namespace bstone { 15 | 16 | R3rUPtr make_gl_r3r(sys::VideoMgr& video_mgr, sys::WindowMgr& window_mgr, const R3rInitParam& param); 17 | 18 | } // namespace bstone 19 | 20 | #endif // BSTONE_GL_R3R_INCLUDED 21 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_gl_r3r_device_features.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // OpenGL 3D Renderer: Device Features 8 | 9 | #ifndef BSTONE_GL_R3R_DEVICE_FEATURES_INCLUDED 10 | #define BSTONE_GL_R3R_DEVICE_FEATURES_INCLUDED 11 | 12 | #include "bstone_sys_gl_context_profile.h" 13 | 14 | namespace bstone { 15 | 16 | struct GlR3rDeviceFeatures 17 | { 18 | sys::GlContextProfile context_profile; 19 | 20 | bool is_mipmap_ext; 21 | bool is_framebuffer_available; 22 | bool is_framebuffer_ext; 23 | bool is_vao_available; 24 | bool is_buffer_storage_available; 25 | bool is_dsa_available; 26 | bool is_sso_available; 27 | }; 28 | 29 | } // namespace bstone 30 | 31 | #endif // BSTONE_GL_R3R_DEVICE_FEATURES_INCLUDED 32 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_gl_r3r_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // OpenGL 3D Renderer: Version 8 | 9 | #ifndef BSTONE_GL_R3R_VERSION_INCLUDED 10 | #define BSTONE_GL_R3R_VERSION_INCLUDED 11 | 12 | #include 13 | 14 | namespace bstone { 15 | 16 | struct GlR3rVersion 17 | { 18 | bool is_es; 19 | 20 | int major; 21 | int minor; 22 | int release; 23 | std::string vendor; 24 | }; 25 | 26 | } // namespace bstone 27 | 28 | #endif // BSTONE_GL_R3R_VERSION_INCLUDED 29 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_globals.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | #include "bstone_globals.h" 9 | 10 | namespace bstone { 11 | namespace globals { 12 | 13 | CVarMgrUPtr cvar_mgr{}; 14 | CCmdMgrUPtr ccmd_mgr{}; 15 | PageMgrUPtr page_mgr{}; 16 | 17 | sys::SystemMgrUPtr sys_system_mgr{}; 18 | sys::EventMgr* sys_event_mgr{}; 19 | sys::VideoMgr* sys_video_mgr{}; 20 | sys::MouseMgr* sys_mouse_mgr{}; 21 | sys::WindowMgr* sys_window_mgr{}; 22 | 23 | LoggerUPtr logger{}; 24 | 25 | } // globals 26 | } // bstone 27 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_hw_video.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | // Hardware accelerated video (HW). 9 | 10 | #ifndef BSTONE_HW_VIDEO_INCLUDED 11 | #define BSTONE_HW_VIDEO_INCLUDED 12 | 13 | #include "bstone_video.h" 14 | 15 | namespace bstone { 16 | 17 | VideoUPtr make_hw_video(); 18 | 19 | } // bstone 20 | 21 | #endif // BSTONE_HW_VIDEO_INCLUDED 22 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_level_extractor.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | #include 9 | 10 | namespace bstone { 11 | 12 | class LevelExtractor 13 | { 14 | public: 15 | void extract_levels(const std::string& destination_dir); 16 | 17 | private: 18 | }; 19 | 20 | } // namespace bstone 21 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_memory.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Dynamic memory management. 8 | 9 | #include "bstone_memory.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_memory.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Dynamic memory management. 8 | 9 | #ifndef BSTONE_MEMORY_INCLUDED 10 | #define BSTONE_MEMORY_INCLUDED 11 | 12 | #include 13 | #include 14 | 15 | #include "bstone_assert.h" 16 | 17 | namespace bstone { 18 | 19 | template 20 | inline T* construct_at(T* ptr, TArgs&& ...args) 21 | { 22 | BSTONE_ASSERT(ptr != nullptr); 23 | return ::new (static_cast(ptr)) T(std::forward(args)...); 24 | } 25 | 26 | template 27 | inline void destroy_at(T* ptr) noexcept 28 | { 29 | BSTONE_ASSERT(ptr != nullptr); 30 | ptr->~T(); 31 | } 32 | 33 | } // namespace bstone 34 | 35 | #endif // BSTONE_MEMORY_INCLUDED 36 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_memory_pool_bitmap.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Tracks allocated blocks in memory pool. 8 | 9 | #include "bstone_memory_pool_bitmap.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_missing_sprite_64x64_image.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | 8 | // 9 | // Missing sprite image (64x64). 10 | // 11 | 12 | 13 | #ifndef BSTONE_MISSING_SPRITE_64X64_IMAGE_INCLUDED 14 | #define BSTONE_MISSING_SPRITE_64X64_IMAGE_INCLUDED 15 | 16 | 17 | #include 18 | 19 | 20 | namespace bstone 21 | { 22 | 23 | 24 | using MissingSpriteImage = std::array; 25 | 26 | 27 | const MissingSpriteImage& get_missing_sprite_image(); 28 | 29 | 30 | } // bstone 31 | 32 | 33 | #endif // !BSTONE_MISSING_SPRITE_64X64_IMAGE_INCLUDED 34 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_missing_wall_64x64_image.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | 8 | // 9 | // Missing wall image (64x64). 10 | // 11 | 12 | 13 | #ifndef BSTONE_MISSING_WALL_64X64_IMAGE_INCLUDED 14 | #define BSTONE_MISSING_WALL_64X64_IMAGE_INCLUDED 15 | 16 | 17 | #include 18 | 19 | 20 | namespace bstone 21 | { 22 | 23 | 24 | using MissingWallImage = std::array; 25 | 26 | 27 | const MissingWallImage& get_missing_wall_image(); 28 | 29 | 30 | } // bstone 31 | 32 | 33 | #endif // !BSTONE_MISSING_WALL_64X64_IMAGE_INCLUDED 34 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_nuked_opl3.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | 8 | // 9 | // Nuked OPL3 wrapper. 10 | // 11 | 12 | #ifndef BSTONE_NUKED_OPL3_INCLUDED 13 | #define BSTONE_NUKED_OPL3_INCLUDED 14 | 15 | #include "bstone_opl3.h" 16 | 17 | namespace bstone 18 | { 19 | 20 | Opl3UPtr make_nuked_opl3(); 21 | 22 | } // bstone 23 | 24 | #endif // !BSTONE_NUKED_OPL3_INCLUDED 25 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_oal_symbols.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "bstone_oal_symbols.h" 8 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_offset_2d.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | 8 | // 9 | // The location of a rectangular region. 10 | // 11 | 12 | 13 | #include "bstone_offset_2d.h" 14 | 15 | 16 | namespace bstone 17 | { 18 | 19 | 20 | bool operator==( 21 | const Offset2d& lhs, 22 | const Offset2d& rhs) noexcept 23 | { 24 | return lhs.x == rhs.x && lhs.y == rhs.y; 25 | } 26 | 27 | bool operator!=( 28 | const Offset2d& lhs, 29 | const Offset2d& rhs) noexcept 30 | { 31 | return !(lhs == rhs); 32 | } 33 | 34 | 35 | } // bstone 36 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_opl3.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // 8 | // OPL3 emulator interface. 9 | // 10 | 11 | #include "bstone_opl3.h" 12 | #include "bstone_dosbox_dbopl.h" 13 | #include "bstone_nuked_opl3.h" 14 | 15 | namespace bstone 16 | { 17 | 18 | Opl3::Opl3() noexcept = default; 19 | 20 | Opl3::~Opl3() = default; 21 | 22 | // ========================================================================== 23 | 24 | Opl3UPtr make_opl3(Opl3Type opl3_type) 25 | { 26 | switch (opl3_type) 27 | { 28 | case Opl3Type::dbopl: 29 | return make_dbopl_opl3(); 30 | 31 | case Opl3Type::nuked: 32 | return make_nuked_opl3(); 33 | 34 | default: 35 | return nullptr; 36 | } 37 | } 38 | 39 | } // bstone 40 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_pc_speaker_audio_decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | // 9 | // PC Speaker audio decoder. 10 | // 11 | 12 | #ifndef BSTONE_PC_SPEAKER_AUDIO_DECODER_INCLUDED 13 | #define BSTONE_PC_SPEAKER_AUDIO_DECODER_INCLUDED 14 | 15 | #include 16 | #include "bstone_audio_decoder.h" 17 | 18 | namespace bstone 19 | { 20 | 21 | AudioDecoderUPtr make_pc_speaker_audio_decoder(); 22 | 23 | } // bstone 24 | 25 | #endif // !BSTONE_PC_SPEAKER_AUDIO_DECODER_INCLUDED 26 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_pcm_audio_decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | // 9 | // PCM audio decoder. 10 | // 11 | 12 | #ifndef BSTONE_PCM_AUDIO_DECODER_INCLUDED 13 | #define BSTONE_PCM_AUDIO_DECODER_INCLUDED 14 | 15 | #include "bstone_audio_decoder.h" 16 | 17 | namespace bstone 18 | { 19 | 20 | AudioDecoderUPtr make_pcm_audio_decoder(); 21 | 22 | } // bstone 23 | 24 | #endif // !BSTONE_PCM_AUDIO_DECODER_INCLUDED 25 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_posix_string.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // POSIX API string. 8 | 9 | #ifndef _WIN32 10 | 11 | #include 12 | 13 | #include "bstone_api_string.h" 14 | 15 | namespace bstone { 16 | 17 | class PosixString final : public ApiString 18 | { 19 | public: 20 | using Base = ApiString; 21 | 22 | public: 23 | PosixString(); 24 | explicit PosixString(MemoryResource& memory_resource); 25 | explicit PosixString(std::intptr_t capacity); 26 | PosixString(std::intptr_t capacity, MemoryResource& memory_resource); 27 | PosixString(const char* string); 28 | PosixString(const char* string, MemoryResource& memory_resource); 29 | }; 30 | 31 | } // namespace bstone 32 | 33 | #endif // _WIN32 34 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_process.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Process utils. 8 | 9 | #include "bstone_process.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_r2_extent.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_R2_EXTENT_T_INCLUDED 8 | #define BSTONE_R2_EXTENT_T_INCLUDED 9 | 10 | namespace bstone { 11 | 12 | template 13 | struct R2ExtentT 14 | { 15 | using Value = T; 16 | 17 | Value width{}; 18 | Value height{}; 19 | 20 | R2ExtentT() = default; 21 | 22 | constexpr R2ExtentT(Value width, Value height) noexcept 23 | : 24 | width{width}, 25 | height{height} 26 | {} 27 | }; 28 | 29 | // ========================================================================== 30 | 31 | using R2ExtentI = R2ExtentT; 32 | 33 | } // namespace bstone 34 | 35 | #endif // BSTONE_R2_EXTENT_T_INCLUDED 36 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_r2_offset.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_R2_OFFSET_T_INCLUDED 8 | #define BSTONE_R2_OFFSET_T_INCLUDED 9 | 10 | namespace bstone { 11 | 12 | template 13 | struct R2OffsetT 14 | { 15 | using Value = T; 16 | 17 | Value x{}; 18 | Value y{}; 19 | 20 | R2OffsetT() = default; 21 | 22 | constexpr R2OffsetT(Value x, Value y) noexcept 23 | : 24 | x{x}, 25 | y{y} 26 | {} 27 | }; 28 | 29 | // ========================================================================== 30 | 31 | using R2OffsetI = R2OffsetT; 32 | 33 | } // namespace bstone 34 | 35 | #endif // BSTONE_R2_OFFSET_T_INCLUDED 36 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_r3r_limits.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // 3D Renderer: Limits 8 | 9 | #include "bstone_r3r_limits.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_r3r_r2_texture.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // 3D Renderer: 2D Texture 8 | 9 | #include "bstone_exception.h" 10 | #include "bstone_r3r_r2_texture.h" 11 | 12 | namespace bstone { 13 | 14 | R3rR2Texture::R3rR2Texture() noexcept = default; 15 | 16 | R3rR2Texture::~R3rR2Texture() = default; 17 | 18 | void R3rR2Texture::update(const R3rR2TextureUpdateParam& param) 19 | try { 20 | do_update(param); 21 | } BSTONE_END_FUNC_CATCH_ALL_THROW_NESTED 22 | 23 | void R3rR2Texture::generate_mipmaps() 24 | try { 25 | do_generate_mipmaps(); 26 | } BSTONE_END_FUNC_CATCH_ALL_THROW_NESTED 27 | 28 | } // namespace bstone 29 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_r3r_sampler.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // 3D Renderer: Sampler 8 | 9 | #include "bstone_exception.h" 10 | #include "bstone_r3r_sampler.h" 11 | 12 | namespace bstone { 13 | 14 | R3rSampler::R3rSampler() noexcept = default; 15 | 16 | R3rSampler::~R3rSampler() = default; 17 | 18 | void R3rSampler::update(const R3rSamplerUpdateParam& param) 19 | try { 20 | do_update(param); 21 | } BSTONE_END_FUNC_CATCH_ALL_THROW_NESTED 22 | 23 | const R3rSamplerState& R3rSampler::get_state() const noexcept 24 | try { 25 | return do_get_state(); 26 | } BSTONE_END_FUNC_CATCH_ALL_THROW_NESTED 27 | 28 | } // namespace bstone 29 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_r3r_shader.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // 3D Renderer: Shader 8 | 9 | #include "bstone_r3r_shader.h" 10 | 11 | namespace bstone { 12 | 13 | R3rShader::R3rShader() noexcept = default; 14 | 15 | R3rShader::~R3rShader() = default; 16 | 17 | R3rShaderType R3rShader::get_type() const noexcept 18 | { 19 | return do_get_type(); 20 | } 21 | 22 | } // namespace bstone 23 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_r3r_vertex_input.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // 3D Renderer: Vertex Input 8 | 9 | #include "bstone_r3r_vertex_input.h" 10 | 11 | namespace bstone { 12 | 13 | R3rVertexInput::R3rVertexInput() noexcept = default; 14 | 15 | R3rVertexInput::~R3rVertexInput() = default; 16 | 17 | } // namespace bstone 18 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_renderer_type.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | 9 | // 10 | // Common renderer stuff. 11 | // 12 | 13 | 14 | #ifndef BSTONE_RENDERER_INCLUDED 15 | #define BSTONE_RENDERER_INCLUDED 16 | 17 | 18 | namespace bstone 19 | { 20 | 21 | 22 | enum class RendererType 23 | { 24 | auto_detect, 25 | 26 | software, 27 | 28 | gl_2_0, 29 | gl_3_2_core, 30 | 31 | gles_2_0, 32 | }; // RendererType 33 | 34 | 35 | } // bstone 36 | 37 | 38 | #endif // !BSTONE_RENDERER_INCLUDED 39 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_rlew_decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_RLEW_DECODER_INCLUDED 8 | #define BSTONE_RLEW_DECODER_INCLUDED 9 | 10 | #include 11 | 12 | namespace bstone { 13 | 14 | class RlewDecoder 15 | { 16 | public: 17 | static std::intptr_t decode( 18 | std::uint16_t tag, 19 | const std::uint8_t* src_bytes, 20 | std::intptr_t src_count, 21 | std::uint16_t* dst_words, 22 | std::intptr_t dst_count); 23 | }; 24 | 25 | } // namespace bstone 26 | 27 | #endif // BSTONE_RLEW_DECODER_INCLUDED 28 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_scope_exit.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // A general-purpose scope guard intended to call its exit function when a scope is exited. 8 | 9 | #include "bstone_scope_exit.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_single_pool_resource.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Memory pool for single object. 8 | 9 | #include "bstone_single_pool_resource.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_source_location.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Information about the source code: file name, line number, function name. 8 | 9 | #include "bstone_source_location.h" 10 | 11 | #include "bstone_assert.h" 12 | 13 | namespace bstone { 14 | 15 | SourceLocation::SourceLocation(const char* file_name, int line, const char* function_name) 16 | : 17 | line_{line >= 0 ? line : 0}, 18 | file_name_{file_name != nullptr ? file_name : ""}, 19 | function_name_{function_name != nullptr ? function_name : ""} 20 | { 21 | BSTONE_ASSERT(file_name != nullptr); 22 | BSTONE_ASSERT(line >= 0); 23 | BSTONE_ASSERT(function_name != nullptr); 24 | } 25 | 26 | } // namespace bstone 27 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_span.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // A contiguous sequence of objects. 8 | 9 | #include "bstone_span.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_stb_image_decoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | #ifndef BSTONE_STB_IMAGE_DECODER_INCLUDED 9 | #define BSTONE_STB_IMAGE_DECODER_INCLUDED 10 | 11 | #include "bstone_image_decoder.h" 12 | 13 | namespace bstone { 14 | 15 | class StbImageDecoder : public ImageDecoder 16 | { 17 | public: 18 | ~StbImageDecoder() override; 19 | 20 | void decode( 21 | const void* src_data, 22 | int src_data_size, 23 | int& dst_width, 24 | int& dst_height, 25 | Rgba8Buffer& dst_buffer) override; 26 | }; 27 | 28 | } // namespace bstone 29 | 30 | #endif // BSTONE_STB_IMAGE_DECODER_INCLUDED 31 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_stb_image_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_STB_IMAGE_UTILS_INCLUDED 8 | #define BSTONE_STB_IMAGE_UTILS_INCLUDED 9 | 10 | #include 11 | 12 | namespace bstone { 13 | 14 | void* stb_cxx_malloc(std::size_t size) noexcept; 15 | void stb_cxx_free(void* ptr) noexcept; 16 | void* stb_cxx_realloc_sized(void* ptr, std::size_t old_size, std::size_t new_size) noexcept; 17 | 18 | } // namespace bstone 19 | 20 | #endif // BSTONE_STB_IMAGE_UTILS_INCLUDED 21 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_string.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Null-terminated string. 8 | 9 | #include "bstone_string.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_string_view.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Read-only contiguous sequence of characters. 8 | 9 | #include "bstone_string_view.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_string_view_hasher.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_STRING_VIEW_HASHER_INCLUDED 8 | #define BSTONE_STRING_VIEW_HASHER_INCLUDED 9 | 10 | #include "bstone_char_hasher.h" 11 | #include "bstone_string_view.h" 12 | 13 | namespace bstone { 14 | 15 | struct StringViewHasher 16 | { 17 | template 18 | constexpr std::size_t operator()(BasicStringView string_view) const 19 | { 20 | return CharHasher{}(string_view.cbegin(), string_view.cend()); 21 | } 22 | }; 23 | 24 | } // namespace bstone 25 | 26 | #endif // !BSTONE_STRING_VIEW_HASHER_INCLUDED 27 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sw_video.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | // Software accelerated video (SW). 9 | 10 | #ifndef BSTONE_SW_VIDEO_INCLUDED 11 | #define BSTONE_SW_VIDEO_INCLUDED 12 | 13 | #include "bstone_sys_video_mgr.h" 14 | #include "bstone_sys_window_mgr.h" 15 | #include "bstone_video.h" 16 | 17 | namespace bstone { 18 | 19 | VideoUPtr make_sw_video(sys::VideoMgr& video_mgr, sys::WindowMgr& window_mgr); 20 | 21 | } // namespace bstone 22 | 23 | #endif // BSTONE_SW_VIDEO_INCLUDED 24 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_audio_mgr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Audio manager. 8 | 9 | #include "bstone_sys_audio_mgr.h" 10 | 11 | namespace bstone { 12 | namespace sys { 13 | 14 | AudioMgr::AudioMgr() = default; 15 | 16 | AudioMgr::~AudioMgr() = default; 17 | 18 | bool AudioMgr::is_initialized() const noexcept 19 | { 20 | return do_is_initialized(); 21 | } 22 | 23 | PollingAudioDeviceUPtr AudioMgr::make_polling_audio_device(const PollingAudioDeviceOpenParam& param) 24 | { 25 | return do_make_polling_audio_device(param); 26 | } 27 | 28 | } // namespace sys 29 | } // namespace bstone 30 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_audio_mgr_null.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_AUDIO_MGR_NULL_INCLUDED 8 | #define BSTONE_SYS_AUDIO_MGR_NULL_INCLUDED 9 | 10 | #include "bstone_sys_audio_mgr.h" 11 | #include "bstone_sys_logger.h" 12 | 13 | namespace bstone { 14 | namespace sys { 15 | 16 | AudioMgrUPtr make_null_audio_mgr(Logger& logger); 17 | 18 | } // namespace sys 19 | } // namespace bstone 20 | 21 | #endif // BSTONE_SYS_AUDIO_MGR_NULL_INCLUDED 22 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_audio_mgr_sdl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_AUDIO_MGR_SDL2_INCLUDED 8 | #define BSTONE_SYS_AUDIO_MGR_SDL2_INCLUDED 9 | 10 | #include "bstone_sys_audio_mgr.h" 11 | #include "bstone_sys_logger.h" 12 | 13 | namespace bstone { 14 | namespace sys { 15 | 16 | AudioMgrUPtr make_sdl2_audio_mgr(Logger& logger); 17 | 18 | } // namespace sys 19 | } // namespace bstone 20 | 21 | #endif // BSTONE_SYS_AUDIO_MGR_SDL2_INCLUDED 22 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_color.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // RGBA color, 8-bit per component. 8 | 9 | #include "bstone_sys_color.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_display_mode.cpp: -------------------------------------------------------------------------------- 1 | #include "bstone_sys_display_mode.h" 2 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_display_mode.h: -------------------------------------------------------------------------------- 1 | #ifndef BSTONE_SYS_DISPLAY_MODE_INCLUDED 2 | #define BSTONE_SYS_DISPLAY_MODE_INCLUDED 3 | 4 | namespace bstone { 5 | namespace sys { 6 | 7 | struct DisplayMode 8 | { 9 | int width; 10 | int height; 11 | int refresh_rate; 12 | }; 13 | 14 | } // namespace sys 15 | } // namespace bstone 16 | 17 | #endif // BSTONE_SYS_DISPLAY_MODE_INCLUDED 18 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_event.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "bstone_sys_event.h" 8 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_event_mgr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Event manager. 8 | 9 | #include "bstone_sys_event_mgr.h" 10 | 11 | namespace bstone { 12 | namespace sys { 13 | 14 | EventMgr::EventMgr() = default; 15 | 16 | EventMgr::~EventMgr() = default; 17 | 18 | bool EventMgr::is_initialized() const noexcept 19 | { 20 | return do_is_initialized(); 21 | } 22 | 23 | bool EventMgr::poll_event(Event& e) 24 | { 25 | return do_poll_event(e); 26 | } 27 | 28 | } // namespace sys 29 | } // namespace bstone 30 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_event_mgr_null.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_EVENT_MGR_NULL_INCLUDED 8 | #define BSTONE_SYS_EVENT_MGR_NULL_INCLUDED 9 | 10 | #include "bstone_sys_event_mgr.h" 11 | #include "bstone_sys_logger.h" 12 | 13 | namespace bstone { 14 | namespace sys { 15 | 16 | EventMgrUPtr make_null_event_mgr(Logger& logger); 17 | 18 | } // namespace sys 19 | } // namespace bstone 20 | 21 | #endif // BSTONE_SYS_EVENT_MGR_NULL_INCLUDED 22 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_event_mgr_sdl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_EVENT_MGR_SDL2_INCLUDED 8 | #define BSTONE_SYS_EVENT_MGR_SDL2_INCLUDED 9 | 10 | #include "bstone_sys_event_mgr.h" 11 | #include "bstone_sys_logger.h" 12 | 13 | namespace bstone { 14 | namespace sys { 15 | 16 | EventMgrUPtr make_sdl2_event_mgr(Logger& logger); 17 | 18 | } // namespace sys 19 | } // namespace bstone 20 | 21 | #endif // BSTONE_SYS_EVENT_MGR_SDL2_INCLUDED 22 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_exception_sdl2.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "SDL_error.h" 8 | #include "bstone_sys_exception_sdl2.h" 9 | 10 | namespace bstone { 11 | namespace sys { 12 | 13 | [[noreturn]] void sdl2_fail() 14 | { 15 | BSTONE_THROW_DYNAMIC_SOURCE(SDL_GetError()); 16 | } 17 | 18 | int sdl2_ensure_result(int sdl_result) 19 | try { 20 | if (sdl_result != 0) 21 | { 22 | sdl2_fail(); 23 | } 24 | 25 | return sdl_result; 26 | } BSTONE_END_FUNC_CATCH_ALL_THROW_NESTED 27 | 28 | } // namespace sys 29 | } // namespace bstone 30 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_exception_sdl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_EXCEPTION_SDL2_INCLUDED 8 | #define BSTONE_SYS_EXCEPTION_SDL2_INCLUDED 9 | 10 | #include "bstone_exception.h" 11 | 12 | namespace bstone { 13 | namespace sys { 14 | 15 | [[noreturn]] void sdl2_fail(); 16 | 17 | // ========================================================================== 18 | 19 | int sdl2_ensure_result(int sdl_result); 20 | 21 | template 22 | T* sdl2_ensure_result(T* sdl_result) 23 | try { 24 | if (sdl_result == nullptr) 25 | { 26 | sdl2_fail(); 27 | } 28 | 29 | return sdl_result; 30 | } BSTONE_END_FUNC_CATCH_ALL_THROW_NESTED 31 | 32 | } // namespace sys 33 | } // namespace bstone 34 | 35 | #endif // BSTONE_SYS_EXCEPTION_SDL2_INCLUDED 36 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_gl_context.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // OpenGL context. 8 | 9 | #include "bstone_sys_gl_context.h" 10 | 11 | namespace bstone { 12 | namespace sys { 13 | 14 | GlContext::GlContext() = default; 15 | 16 | GlContext::~GlContext() = default; 17 | 18 | const GlContextAttributes& GlContext::get_attributes() const noexcept 19 | { 20 | return do_get_attributes(); 21 | } 22 | 23 | } // namespace sys 24 | } // namespace bstone 25 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_gl_context_attributes.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // OpenGL context attributes. 8 | 9 | #include "bstone_sys_gl_context_attributes.h" 10 | 11 | namespace bstone { 12 | namespace sys { 13 | 14 | GlContextAttributes GlContextAttributes::make_default() noexcept 15 | { 16 | auto gl_attributes = GlContextAttributes{}; 17 | gl_attributes.is_accelerated = true; 18 | gl_attributes.profile = GlContextProfile::compatibility; 19 | gl_attributes.major_version = 1; 20 | gl_attributes.minor_version = 1; 21 | return gl_attributes; 22 | } 23 | 24 | } // namespace sys 25 | } // namespace bstone 26 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_gl_context_profile.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // OpenGL context profile. 8 | 9 | #include "bstone_sys_gl_context_profile.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_gl_context_profile.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // OpenGL context profile. 8 | 9 | #ifndef BSTONE_SYS_GL_CONTEXT_PROFILE_INCLUDED 10 | #define BSTONE_SYS_GL_CONTEXT_PROFILE_INCLUDED 11 | 12 | namespace bstone { 13 | namespace sys { 14 | 15 | enum class GlContextProfile 16 | { 17 | none, 18 | compatibility, 19 | core, 20 | es, 21 | }; 22 | 23 | } // namespace sys 24 | } // namespace bstone 25 | 26 | #endif // BSTONE_SYS_GL_CONTEXT_PROFILE_INCLUDED 27 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_gl_context_sdl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_GL_CONTEXT_SDL2_INCLUDED 8 | #define BSTONE_SYS_GL_CONTEXT_SDL2_INCLUDED 9 | 10 | #include "SDL_video.h" 11 | #include "bstone_sys_logger.h" 12 | #include "bstone_sys_gl_context.h" 13 | 14 | namespace bstone { 15 | namespace sys { 16 | 17 | GlContextUPtr make_sdl2_gl_context(Logger& logger, SDL_Window& sdl_window); 18 | 19 | } // namespace sys 20 | } // namespace bstone 21 | 22 | #endif // BSTONE_SYS_GL_CONTEXT_SDL2_INCLUDED 23 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_gl_current_context_sdl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // OpenGL current context (SDL). 8 | 9 | #ifndef BSTONE_SYS_GL_CURRENT_CONTEXT_SDL2_INCLUDED 10 | #define BSTONE_SYS_GL_CURRENT_CONTEXT_SDL2_INCLUDED 11 | 12 | #include "bstone_sys_gl_current_context.h" 13 | #include "bstone_sys_logger.h" 14 | 15 | namespace bstone { 16 | namespace sys { 17 | 18 | GlCurrentContextUPtr make_sdl2_gl_current_context(Logger& logger); 19 | 20 | } // namespace sys 21 | } // namespace bstone 22 | 23 | #endif // BSTONE_SYS_GL_CURRENT_CONTEXT_SDL2_INCLUDED 24 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_gl_symbol_resolver.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // OpenGL symbol resolver. 8 | 9 | #include "bstone_sys_gl_symbol_resolver.h" 10 | 11 | namespace bstone { 12 | namespace sys { 13 | 14 | GlSymbolResolver::GlSymbolResolver() = default; 15 | 16 | GlSymbolResolver::~GlSymbolResolver() = default; 17 | 18 | void* GlSymbolResolver::find_symbol(const char* symbol_name) const noexcept 19 | { 20 | return do_find_symbol(symbol_name); 21 | } 22 | 23 | } // namespace sys 24 | } // namespace bstone 25 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_gl_symbol_resolver_sdl2.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // OpenGL symbol resolver (SDL). 8 | 9 | #include 10 | 11 | #include "bstone_sys_gl_symbol_resolver_sdl2.h" 12 | 13 | namespace bstone { 14 | namespace sys { 15 | 16 | Sdl2GlSymbolResolver::Sdl2GlSymbolResolver() = default; 17 | 18 | Sdl2GlSymbolResolver::~Sdl2GlSymbolResolver() = default; 19 | 20 | void* Sdl2GlSymbolResolver::do_find_symbol(const char* symbol_name) const noexcept 21 | { 22 | return SDL_GL_GetProcAddress(symbol_name); 23 | } 24 | 25 | } // namespace sys 26 | } // namespace bstone 27 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_gl_symbol_resolver_sdl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // OpenGL symbol resolver (SDL). 8 | 9 | #ifndef BSTONE_SYS_GL_SYMBOL_RESOLVER_SDL2_INCLUDED 10 | #define BSTONE_SYS_GL_SYMBOL_RESOLVER_SDL2_INCLUDED 11 | 12 | #include "bstone_sys_gl_symbol_resolver.h" 13 | 14 | namespace bstone { 15 | namespace sys { 16 | 17 | class Sdl2GlSymbolResolver final : public GlSymbolResolver 18 | { 19 | public: 20 | Sdl2GlSymbolResolver(); 21 | ~Sdl2GlSymbolResolver() override; 22 | 23 | private: 24 | void* do_find_symbol(const char* symbol_name) const noexcept override; 25 | }; 26 | 27 | } // namespace sys 28 | } // namespace bstone 29 | 30 | #endif // BSTONE_SYS_GL_SYMBOL_RESOLVER_SDL2_INCLUDED 31 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_keyboard_key.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Keyboard keys. 8 | 9 | #include "bstone_sys_keyboard_key.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_limits_sdl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // FIXME Move to the configuration? 8 | 9 | #ifndef BSTONE_SYS_LIMITS_SDL2_INCLUDED 10 | #define BSTONE_SYS_LIMITS_SDL2_INCLUDED 11 | 12 | namespace bstone { 13 | namespace sys { 14 | namespace limits { 15 | 16 | constexpr auto max_textures = 2; 17 | constexpr auto max_display_modes = 256; 18 | 19 | } // namespace limits 20 | } // namespace sys 21 | } // namespace bstone 22 | 23 | #endif // BSTONE_SYS_LIMITS_SDL2_INCLUDED 24 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_message_box.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Message box. 8 | 9 | #include "bstone_sys_message_box.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_mouse.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Mouse. 8 | 9 | #include "bstone_sys_mouse.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_mouse_mgr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Mouse manager. 8 | 9 | #include "bstone_sys_mouse_mgr.h" 10 | 11 | namespace bstone { 12 | namespace sys { 13 | 14 | MouseMgr::MouseMgr() = default; 15 | 16 | MouseMgr::~MouseMgr() = default; 17 | 18 | void MouseMgr::set_relative_mode(bool is_relative) 19 | { 20 | do_set_relative_mode(is_relative); 21 | } 22 | 23 | } // namespace sys 24 | } // namespace bstone 25 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_mouse_mgr.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Mouse manager. 8 | 9 | #ifndef BSTONE_SYS_MOUSE_MGR_INCLUDED 10 | #define BSTONE_SYS_MOUSE_MGR_INCLUDED 11 | 12 | #include 13 | 14 | namespace bstone { 15 | namespace sys { 16 | 17 | class MouseMgr 18 | { 19 | public: 20 | MouseMgr(); 21 | virtual ~MouseMgr(); 22 | 23 | void set_relative_mode(bool is_relative); 24 | 25 | private: 26 | virtual void do_set_relative_mode(bool is_relative) = 0; 27 | }; 28 | 29 | // ========================================================================== 30 | 31 | using MouseMgrUPtr = std::unique_ptr; 32 | 33 | } // namespace sys 34 | } // namespace bstone 35 | 36 | #endif // BSTONE_SYS_MOUSE_MGR_INCLUDED 37 | 38 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_mouse_mgr_sdl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_MOUSE_MGR_SDL2_INCLUDED 8 | #define BSTONE_SYS_MOUSE_MGR_SDL2_INCLUDED 9 | 10 | #include "bstone_sys_logger.h" 11 | #include "bstone_sys_mouse_mgr.h" 12 | 13 | namespace bstone { 14 | namespace sys { 15 | 16 | MouseMgrUPtr make_sdl2_mouse_mgr(Logger& logger); 17 | 18 | } // namespace sys 19 | } // namespace bstone 20 | 21 | #endif // BSTONE_SYS_MOUSE_MGR_SDL2_INCLUDED 22 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_pixel_format.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Pixel format. 8 | 9 | #include "bstone_sys_pixel_format.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_pixel_format.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Pixel format. 8 | 9 | #ifndef BSTONE_SYS_PIXEL_FORMAT_INCLUDED 10 | #define BSTONE_SYS_PIXEL_FORMAT_INCLUDED 11 | 12 | namespace bstone { 13 | namespace sys { 14 | 15 | enum class PixelFormat 16 | { 17 | none, 18 | b8g8r8a8, // non-packed 19 | r8g8b8, 20 | }; 21 | 22 | } // namespace sys 23 | } // namespace bstone 24 | 25 | #endif // BSTONE_SYS_PIXEL_FORMAT_INCLUDED 26 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_polling_audio_device_sdl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_POLLING_AUDIO_DEVICE_SDL2_INCLUDED 8 | #define BSTONE_SYS_POLLING_AUDIO_DEVICE_SDL2_INCLUDED 9 | 10 | #include "bstone_sys_polling_audio_device.h" 11 | #include "bstone_sys_logger.h" 12 | 13 | namespace bstone { 14 | namespace sys { 15 | 16 | PollingAudioDeviceUPtr make_sdl2_polling_audio_device(Logger& logger, const PollingAudioDeviceOpenParam& param); 17 | 18 | } // namespace sys 19 | } // namespace bstone 20 | 21 | #endif // BSTONE_SYS_POLLING_AUDIO_DEVICE_SDL2_INCLUDED 22 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_rectangle.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // A rectangle with the origin at the upper-left. 8 | 9 | #include "bstone_sys_rectangle.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_rectangle.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // A rectangle with the origin at the upper-left. 8 | 9 | #ifndef BSTONE_RECTANGLE_INCLUDED 10 | #define BSTONE_RECTANGLE_INCLUDED 11 | 12 | namespace bstone { 13 | namespace sys { 14 | 15 | struct Rectangle 16 | { 17 | int x; 18 | int y; 19 | 20 | int width; 21 | int height; 22 | }; 23 | 24 | } // namespace sys 25 | } // namespace bstone 26 | 27 | #endif // BSTONE_RECTANGLE_INCLUDED 28 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_renderer_sdl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_RENDERER_SDL2_INCLUDED 8 | #define BSTONE_SYS_RENDERER_SDL2_INCLUDED 9 | 10 | #include "bstone_sys_logger.h" 11 | #include "bstone_sys_renderer.h" 12 | #include "bstone_sys_window_sdl2.h" 13 | 14 | struct SDL_Window; 15 | 16 | namespace bstone { 17 | namespace sys { 18 | 19 | RendererUPtr make_sdl2_renderer(Logger& logger, SDL_Window& sdl_window, const RendererInitParam& param); 20 | 21 | } // namespace sys 22 | } // namespace bstone 23 | 24 | #endif // BSTONE_SYS_RENDERER_SDL2_INCLUDED 25 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_sdl2_subsystem.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_SDL2_SUBSYSTEM_INCLUDED 8 | #define BSTONE_SYS_SDL2_SUBSYSTEM_INCLUDED 9 | 10 | #include "SDL.h" 11 | 12 | namespace bstone { 13 | namespace sys { 14 | 15 | class Sdl2Subsystem 16 | { 17 | public: 18 | Sdl2Subsystem() noexcept; 19 | explicit Sdl2Subsystem(Uint32 sdl_flags); 20 | Sdl2Subsystem(Sdl2Subsystem&& rhs) noexcept; 21 | ~Sdl2Subsystem(); 22 | 23 | void swap(Sdl2Subsystem& rhs) noexcept; 24 | 25 | private: 26 | Uint32 sdl_flags_{}; 27 | }; 28 | 29 | } // namespace sys 30 | } // namespace bstone 31 | 32 | #endif // BSTONE_SYS_SDL2_SUBSYSTEM_INCLUDED 33 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_special_path.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Special path primitives. 8 | 9 | #include "bstone_sys_special_path.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_swap_interval_type.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Renderer's swap interval type. 8 | 9 | #include "bstone_sys_swap_interval_type.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_swap_interval_type.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Renderer's swap interval type. 8 | 9 | #ifndef BSTONE_SYS_R3R_SWAP_INTERVAL_TYPE_INCLUDED 10 | #define BSTONE_SYS_R3R_SWAP_INTERVAL_TYPE_INCLUDED 11 | 12 | namespace bstone { 13 | namespace sys { 14 | 15 | enum class SwapIntervalType 16 | { 17 | none, 18 | standard, 19 | adaptive, 20 | }; 21 | 22 | } // namespace sys 23 | } // namespace bstone 24 | 25 | #endif // BSTONE_SYS_R3R_SWAP_INTERVAL_TYPE_INCLUDED 26 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_system_mgr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // System manager. 8 | 9 | #include "bstone_sys_system_mgr.h" 10 | 11 | namespace bstone { 12 | namespace sys { 13 | 14 | SystemMgr::SystemMgr() = default; 15 | 16 | SystemMgr::~SystemMgr() = default; 17 | 18 | AudioMgr& SystemMgr::get_audio_mgr() 19 | { 20 | return do_get_audio_mgr(); 21 | } 22 | 23 | EventMgr& SystemMgr::get_event_mgr() 24 | { 25 | return do_get_event_mgr(); 26 | } 27 | 28 | VideoMgr& SystemMgr::get_video_mgr() 29 | { 30 | return do_get_video_mgr(); 31 | } 32 | 33 | } // namespace sys 34 | } // namespace bstone 35 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_texture.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Renderer's texture. 8 | 9 | #include "bstone_sys_texture.h" 10 | 11 | namespace bstone { 12 | namespace sys { 13 | 14 | Texture::Texture() = default; 15 | 16 | Texture::~Texture() = default; 17 | 18 | void Texture::set_blend_mode(TextureBlendMode mode) 19 | { 20 | do_set_blend_mode(mode); 21 | } 22 | 23 | void Texture::copy(const Rectangle* texture_rectangle, const Rectangle* target_rectangle) 24 | { 25 | return do_copy(texture_rectangle, target_rectangle); 26 | } 27 | 28 | TextureLockUPtr Texture::make_lock() 29 | { 30 | return do_make_lock(nullptr); 31 | } 32 | 33 | } // namespace sys 34 | } // namespace bstone 35 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_texture_lock.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "bstone_sys_texture_lock.h" 8 | 9 | namespace bstone { 10 | namespace sys { 11 | 12 | TextureLock::TextureLock() = default; 13 | 14 | TextureLock::~TextureLock() = default; 15 | 16 | void* TextureLock::get_pixels() const noexcept 17 | { 18 | return do_get_pixels(); 19 | } 20 | 21 | int TextureLock::get_pitch() const noexcept 22 | { 23 | return do_get_pitch(); 24 | } 25 | 26 | } // namespace sys 27 | } // namespace bstone 28 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_texture_lock_sdl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_TEXTURE_LOCK_SDL2_INCLUDED 8 | #define BSTONE_SYS_TEXTURE_LOCK_SDL2_INCLUDED 9 | 10 | #include "bstone_sys_rectangle.h" 11 | #include "bstone_sys_texture_sdl2.h" 12 | #include "bstone_sys_texture_lock_sdl2.h" 13 | 14 | struct SDL_Texture; 15 | 16 | namespace bstone { 17 | namespace sys { 18 | 19 | TextureLockUPtr make_sdl2_texture_lock(SDL_Texture& sdl_texture, const Rectangle* rect); 20 | 21 | } // namespace sys 22 | } // namespace bstone 23 | 24 | #endif // BSTONE_SYS_TEXTURE_LOCK_SDL2_INCLUDED 25 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_texture_sdl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_TEXTURE_SDL2_INCLUDED 8 | #define BSTONE_SYS_TEXTURE_SDL2_INCLUDED 9 | 10 | #include "bstone_sys_logger.h" 11 | #include "bstone_sys_texture.h" 12 | 13 | struct SDL_Renderer; 14 | 15 | namespace bstone { 16 | namespace sys { 17 | 18 | TextureUPtr make_sdl2_texture(Logger& logger, SDL_Renderer& sdl_renderer, const TextureInitParam& param); 19 | 20 | } // namespace sys 21 | } // namespace bstone 22 | 23 | #endif // BSTONE_SYS_TEXTURE_SDL2_INCLUDED 24 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_video_mgr_null.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_VIDEO_MGR_NULL_INCLUDED 8 | #define BSTONE_SYS_VIDEO_MGR_NULL_INCLUDED 9 | 10 | #include "bstone_sys_logger.h" 11 | #include "bstone_sys_video_mgr.h" 12 | 13 | namespace bstone { 14 | namespace sys { 15 | 16 | VideoMgrUPtr make_null_video_mgr(Logger& logger); 17 | 18 | } // namespace sys 19 | } // namespace bstone 20 | 21 | #endif // BSTONE_SYS_VIDEO_MGR_NULL_INCLUDED 22 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_video_mgr_sdl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_VIDEO_MGR_SDL2_INCLUDED 8 | #define BSTONE_SYS_VIDEO_MGR_SDL2_INCLUDED 9 | 10 | #include "bstone_sys_logger.h" 11 | #include "bstone_sys_video_mgr.h" 12 | 13 | namespace bstone { 14 | namespace sys { 15 | 16 | VideoMgrUPtr make_sdl2_video_mgr(Logger& logger); 17 | 18 | } // namespace sys 19 | } // namespace bstone 20 | 21 | #endif // BSTONE_SYS_VIDEO_MGR_SDL2_INCLUDED 22 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_window_mgr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Window manager. 8 | 9 | #include "bstone_sys_window_mgr.h" 10 | 11 | namespace bstone { 12 | namespace sys { 13 | 14 | WindowMgr::WindowMgr() = default; 15 | 16 | WindowMgr::~WindowMgr() = default; 17 | 18 | WindowUPtr WindowMgr::make_window(const WindowInitParam& param) 19 | { 20 | return do_make_window(param); 21 | } 22 | 23 | } // namespace sys 24 | } // namespace bstone 25 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_window_mgr_sdl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_SYS_WINDOW_MGR_SDL2_INCLUDED 8 | #define BSTONE_SYS_WINDOW_MGR_SDL2_INCLUDED 9 | 10 | #include "bstone_sys_logger.h" 11 | #include "bstone_sys_window_mgr.h" 12 | 13 | namespace bstone { 14 | namespace sys { 15 | 16 | WindowMgrUPtr make_sdl2_window_mgr(Logger& logger); 17 | 18 | } // namespace sys 19 | } // namespace bstone 20 | 21 | #endif // BSTONE_SYS_WINDOW_MGR_SDL2_INCLUDED 22 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_window_rounded_corner_mgr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Window rounded corner manager. 8 | 9 | #include "bstone_sys_window_rounded_corner_mgr.h" 10 | 11 | namespace bstone { 12 | namespace sys { 13 | 14 | WindowRoundedCornerMgr::WindowRoundedCornerMgr() = default; 15 | 16 | WindowRoundedCornerMgr::~WindowRoundedCornerMgr() = default; 17 | 18 | void WindowRoundedCornerMgr::set_round_corner_type(Window& window, WindowRoundedCornerType round_corner_type) 19 | { 20 | do_set_round_corner_type(window, round_corner_type); 21 | } 22 | 23 | } // namespace sys 24 | } // namespace bstone 25 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_sys_window_size.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "bstone_sys_r2_extent.h" 8 | 9 | #if !defined(BSTONE_SYS_WINDOW_SIZE_INCLUDED) 10 | #define BSTONE_SYS_WINDOW_SIZE_INCLUDED 11 | 12 | namespace bstone { 13 | namespace sys { 14 | 15 | struct WindowSize : R2Extent 16 | { 17 | using R2Extent::R2Extent; 18 | }; 19 | 20 | } // namespace sys 21 | } // namespace bstone 22 | 23 | #endif // BSTONE_SYS_WINDOW_SIZE_INCLUDED 24 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_type_traits.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_TYPE_TRAITS_INCLUDED 8 | #define BSTONE_TYPE_TRAITS_INCLUDED 9 | 10 | #include 11 | 12 | namespace bstone { 13 | namespace type_traits { 14 | 15 | } // namespace type_traits 16 | } // namespace bstone 17 | 18 | #endif // !BSTONE_TYPE_TRAITS_INCLUDED 19 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_unicode.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Unicode primitives. 8 | 9 | #include "bstone_unicode.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_unique_resource.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Universal RAII wrapper for resource handles. 8 | 9 | #include "bstone_unique_resource.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_utf.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Unicode transformation primitives. 8 | 9 | #include "bstone_utf.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_utf16.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // UTF-16 primitives. 8 | 9 | #include "bstone_utf16.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_utf8.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // UTF-8 primitives. 8 | 9 | #include "bstone_utf8.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_utility.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // General-purpose functionality. 8 | 9 | #include "bstone_utility.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_uuid.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Universally unique identifier (UUID). 8 | // 9 | // Supported formats: 10 | // - "AAAAAAAABBBBCCCCDDDDEEEEEEEEEEEE" 11 | // - "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE" 12 | // - "{AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE}" 13 | 14 | #include "bstone_uuid.h" 15 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_version.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Project's version. 8 | 9 | #include "bstone_version.h" 10 | 11 | namespace bstone { 12 | 13 | namespace { 14 | 15 | static Version version_impl 16 | { 17 | #include "bstone_version_.h" 18 | }; 19 | 20 | } // namespace 21 | 22 | const Version& get_version() noexcept 23 | { 24 | return version_impl; 25 | } 26 | 27 | } // namespace bstone 28 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_version.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Project's version. 8 | 9 | #ifndef BSTONE_VERSION_INCLUDED 10 | #define BSTONE_VERSION_INCLUDED 11 | 12 | namespace bstone { 13 | 14 | struct Version 15 | { 16 | int major{}; 17 | int minor{}; 18 | int patch{}; 19 | const char* pre_release{}; 20 | const char* git_hash{}; 21 | const char* string{}; 22 | const char* string_short{}; 23 | }; 24 | 25 | // ========================================================================== 26 | 27 | const Version& get_version() noexcept; 28 | 29 | } // namespace bstone 30 | 31 | #endif // BSTONE_VERSION_INCLUDED 32 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_version_.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | ${PROJECT_VERSION_MAJOR}, 9 | ${PROJECT_VERSION_MINOR}, 10 | ${PROJECT_VERSION_PATCH}, 11 | "${BSTONE_VERSION_PRE_RELEASE}", 12 | "${BSTONE_GIT_HASH}", 13 | "${BSTONE_VERSION}", 14 | "${BSTONE_VERSION_SHORT}", 15 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_video.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | 9 | // 10 | // Accelerated video (interface). 11 | // 12 | 13 | 14 | #include "bstone_video.h" 15 | 16 | namespace bstone { 17 | 18 | Video::Video() noexcept = default; 19 | 20 | Video::~Video() = default; 21 | 22 | } // namespace bstone 23 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_voice.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | #ifndef BSTONE_VOICE_INCLUDED 9 | #define BSTONE_VOICE_INCLUDED 10 | 11 | #include "bstone_audio_mixer_output_gains.h" 12 | #include "bstone_audio_mixer_voice_handle.h" 13 | 14 | namespace bstone 15 | { 16 | 17 | struct Voice 18 | { 19 | bool use_output_gains{}; 20 | bstone::AudioMixerVoiceHandle handle; 21 | double gain{}; 22 | AudioMixerOutputGains output_gains{}; 23 | }; 24 | 25 | } // bstone 26 | 27 | #endif // !BSTONE_VOICE_INCLUDED 28 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_win32_advapi32_symbols.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // advapi32.dll dynamic symbols. 8 | 9 | #ifndef BSTONE_BSTONE_WIN32_ADVAPI32_SYMBOLS_INCLUDED 10 | #define BSTONE_BSTONE_WIN32_ADVAPI32_SYMBOLS_INCLUDED 11 | 12 | #ifdef _WIN32 13 | 14 | #include 15 | 16 | namespace bstone { 17 | namespace win32 { 18 | 19 | using RegDeleteKeyExWFunc = LSTATUS (APIENTRY *)( 20 | HKEY hKey, 21 | LPCWSTR lpSubKey, 22 | REGSAM samDesired, 23 | DWORD Reserved); 24 | 25 | struct AdvApi32Symbols 26 | { 27 | static RegDeleteKeyExWFunc get_reg_delete_key_ex_w() noexcept; 28 | }; 29 | 30 | } // namespace win32 31 | } // namespace bstone 32 | 33 | #endif // _WIN32 34 | 35 | #endif // BSTONE_BSTONE_WIN32_ADVAPI32_SYMBOLS_INCLUDED 36 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_win32_unique_resources.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Windows API unique resources. 8 | 9 | #ifdef _WIN32 10 | 11 | #include "bstone_win32_unique_resources.h" 12 | 13 | #include "bstone_assert.h" 14 | 15 | namespace bstone { 16 | 17 | void Win32HandleDeleter::operator()(HANDLE handle) const noexcept 18 | { 19 | const auto win32_result = CloseHandle(handle); 20 | BSTONE_ASSERT(win32_result == TRUE); 21 | static_cast(win32_result); 22 | } 23 | 24 | // TODO constexpr method fails to compile in mingw-w64 v8.1.0 25 | HANDLE Win32HandleEmptyValue::operator()() const noexcept 26 | { 27 | return INVALID_HANDLE_VALUE; 28 | } 29 | 30 | } // namespace bstone 31 | 32 | #endif // _WIN32 33 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_win32_wstring.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Windows API wide string. 8 | 9 | #if defined(_WIN32) 10 | 11 | #include 12 | 13 | #include "bstone_api_string.h" 14 | 15 | namespace bstone { 16 | 17 | class Win32WString final : public ApiString 18 | { 19 | public: 20 | using Base = ApiString; 21 | 22 | public: 23 | Win32WString(); 24 | explicit Win32WString(MemoryResource& memory_resource); 25 | explicit Win32WString(std::intptr_t capacity); 26 | Win32WString(std::intptr_t capacity, MemoryResource& memory_resource); 27 | Win32WString(const char* u8_string); 28 | Win32WString(const char* u8_string, MemoryResource& memory_resource); 29 | }; 30 | 31 | } // namespace bstone 32 | 33 | #endif // _WIN32 34 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_zstring_view.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // Null-terminated string view. 8 | 9 | #include "bstone_zstring_view.h" 10 | -------------------------------------------------------------------------------- /src/bstone/src/bstone_zstring_view_hasher.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #ifndef BSTONE_ZSTRING_VIEW_HASHER_INCLUDED 8 | #define BSTONE_ZSTRING_VIEW_HASHER_INCLUDED 9 | 10 | #include "bstone_char_hasher.h" 11 | #include "bstone_zstring_view.h" 12 | 13 | namespace bstone { 14 | 15 | struct ZStringViewHasher 16 | { 17 | template 18 | constexpr std::size_t operator()(BasicZStringView zstring_view) const 19 | { 20 | return CharHasher{}(zstring_view.cbegin(), zstring_view.cend()); 21 | } 22 | }; 23 | 24 | } // namespace bstone 25 | 26 | #endif // BSTONE_ZSTRING_VIEW_HASHER_INCLUDED 27 | -------------------------------------------------------------------------------- /src/bstone/src/d3_d2.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | // Former "D3_DASM2.ASM". 9 | 10 | #include 11 | 12 | constexpr auto planepics_size = 8192; 13 | 14 | extern std::uint8_t planepics[planepics_size]; // 4k of ceiling, 4k of floor 15 | -------------------------------------------------------------------------------- /src/bstone/src/dosbox/dosbox.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // A stub for DOSBox OPL2 emulator. 8 | 9 | #ifndef BSTONE_DOSBOX_INCLUDED 10 | #define BSTONE_DOSBOX_INCLUDED 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #define INLINE 17 | #define GCC_UNLIKELY(x) (x) 18 | 19 | using Bit32u = std::uint32_t; 20 | using Bit32s = std::int32_t; 21 | using Bit16u = std::uint16_t; 22 | using Bit16s = std::int16_t; 23 | using Bit8u = std::uint8_t; 24 | using Bit8s = std::int8_t; 25 | 26 | using Bitu = std::uintptr_t; 27 | using Bits = std::intptr_t; 28 | 29 | #endif // BSTONE_DOSBOX_INCLUDED 30 | -------------------------------------------------------------------------------- /src/bstone/src/dosbox/hardware.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // A stub for DOSBox OPL2 emulator. 8 | 9 | #ifndef BSTONE_DOSBOX_HARDWARE_INCLUDED 10 | #define BSTONE_DOSBOX_HARDWARE_INCLUDED 11 | 12 | enum OPL_Mode 13 | { 14 | OPL_none, 15 | OPL_cms, 16 | OPL_opl2, 17 | OPL_dualopl2, 18 | OPL_opl3 19 | }; 20 | 21 | #endif // BSTONE_DOSBOX_HARDWARE_INCLUDED 22 | -------------------------------------------------------------------------------- /src/bstone/src/dosbox/inout.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // A stub for DOSBox OPL2 emulator. 8 | 9 | #ifndef BSTONE_DOSBOX_INOUT_INCLUDED 10 | #define BSTONE_DOSBOX_INOUT_INCLUDED 11 | 12 | #include "dosbox.h" 13 | 14 | using IO_ReadHandler = Bitu (*)(Bitu port, Bitu iolen); 15 | using IO_WriteHandler = void (*)(Bitu port, Bitu val, Bitu iolen); 16 | 17 | struct IO_ReadHandleObject {}; 18 | struct IO_WriteHandleObject {}; 19 | 20 | #endif // BSTONE_DOSBOX_INOUT_INCLUDED 21 | -------------------------------------------------------------------------------- /src/bstone/src/dosbox/mixer.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // A stub for DOSBox OPL2 emulator. 8 | 9 | #ifndef BSTONE_DOSBOX_MIXER_INCLUDED 10 | #define BSTONE_DOSBOX_MIXER_INCLUDED 11 | 12 | #include "dosbox.h" 13 | 14 | class MixerChannel 15 | { 16 | public: 17 | void AddSamples_m32(Bitu len, const Bit32s* data); 18 | void AddSamples_s32(Bitu len, const Bit32s* data); 19 | 20 | // Sets a buffer to write data to. 21 | void set_buffer(Bit16s* buffer); 22 | 23 | static Bit32s get_min_sample_value(); 24 | static Bit32s get_max_sample_value(); 25 | 26 | private: 27 | Bit16s* buffer_{}; 28 | }; 29 | 30 | struct MixerObject {}; 31 | 32 | #endif // BSTONE_DOSBOX_MIXER_INCLUDED 33 | -------------------------------------------------------------------------------- /src/bstone/src/dosbox/pic.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // A stub for DOSBox OPL2 emulator. 8 | -------------------------------------------------------------------------------- /src/bstone/src/dosbox/setup.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | // A stub for DOSBox OPL2 emulator. 8 | 9 | #ifndef BSTONE_DOSBOX_SETUP_INCLUDED 10 | #define BSTONE_DOSBOX_SETUP_INCLUDED 11 | 12 | struct Section {}; 13 | struct Module_base {}; 14 | 15 | #endif // BSTONE_DOSBOX_SETUP_INCLUDED 16 | -------------------------------------------------------------------------------- /src/bstone/src/jm_io.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | 9 | #ifndef BSTONE_JM_IO_INCLUDED 10 | #define BSTONE_JM_IO_INCLUDED 11 | 12 | 13 | int IO_LoadFile( 14 | const char* filename, 15 | void** dst); 16 | 17 | 18 | #endif // BSTONE_JM_IO_INCLUDED 19 | -------------------------------------------------------------------------------- /src/bstone/src/jm_lzh.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | 9 | #ifndef BSTONE_JM_LZH_INCLUDED 10 | #define BSTONE_JM_LZH_INCLUDED 11 | 12 | 13 | #include 14 | 15 | 16 | int LZH_Compress( 17 | const std::uint8_t* in_buffer, 18 | std::uint8_t* out_buffer, 19 | int in_length); 20 | 21 | int LZH_Decompress( 22 | const std::uint8_t* in_buffer, 23 | std::uint8_t* out_buffer, 24 | int uncompressed_length, 25 | int compressed_length); 26 | 27 | 28 | #endif // BSTONE_JM_LZH_INCLUDED 29 | -------------------------------------------------------------------------------- /src/bstone/src/movie.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | 9 | #ifndef BSTONE_MOVIE_INCLUDED 10 | #define BSTONE_MOVIE_INCLUDED 11 | 12 | 13 | #include 14 | 15 | 16 | // NOTE - This enum list is ORDERED! 17 | enum MovieId 18 | { 19 | intro, 20 | final, 21 | final_2, // AOG Episode 3 / 5 22 | final_3, // AOG Episode 6 23 | }; // MovieId 24 | 25 | 26 | bool movie_play( 27 | const MovieId movie_id, 28 | const std::uint8_t* const palette); 29 | 30 | 31 | #endif // BSTONE_MOVIE_INCLUDED 32 | -------------------------------------------------------------------------------- /src/bstone/src/resources/src/bstone_missing_sprite_64x64.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/bstone/src/resources/src/bstone_missing_sprite_64x64.xcf -------------------------------------------------------------------------------- /src/bstone/src/resources/src/bstone_missing_wall_64x64.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/bstone/src/resources/src/bstone_missing_wall_64x64.xcf -------------------------------------------------------------------------------- /src/bstone/src/resources/win32/bstone_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/bstone/src/resources/win32/bstone_icon.ico -------------------------------------------------------------------------------- /src/bstone/src/resources/win32/bstone_win32_msvc.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | true 6 | PerMonitorV2 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/bstone/src/resources/win32/bstone_win32_rc.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #define VS_VERSION_INFO 1 8 | 9 | #ifndef VS_FFI_FILEFLAGSMASK 10 | #define VS_FFI_FILEFLAGSMASK 0x0000003FL 11 | #endif // !VS_FFI_FILEFLAGSMASK 12 | 13 | #ifdef NDEBUG 14 | #define VER_DBG 0 15 | #else // NDEBUG 16 | #define VER_DBG 1 17 | #endif // NDEBUG 18 | 19 | #ifndef VOS_NT 20 | #define VOS_NT 0x00040000L 21 | #endif // !VOS_NT 22 | 23 | #ifndef VFT_DRV 24 | #define VFT_DRV 0x00000003L 25 | #endif // !VFT_DRV 26 | 27 | #ifndef VFT2_DRV_SYSTEM 28 | #define VFT2_DRV_SYSTEM 0x00000007L 29 | #endif // !VFT2_DRV_SYSTEM 30 | 31 | #ifndef RT_MANIFEST 32 | #define RT_MANIFEST 24 33 | #endif // !RT_MANIFEST 34 | -------------------------------------------------------------------------------- /src/bstone/src/scale.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 1992-2013 Apogee Entertainment, LLC 4 | Copyright (c) 2013-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | 9 | // 10 | // Former SCALE.ASM 11 | // 12 | -------------------------------------------------------------------------------- /src/lib/khronos/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR) 2 | project(bstone_lib_khronos VERSION 1.0.0 LANGUAGES NONE) 3 | 4 | message(STATUS "[bstone_lib_khronos] v${PROJECT_VERSION}") 5 | 6 | add_library(bstone_lib_khronos INTERFACE) 7 | add_library(bstone::lib::khronos ALIAS bstone_lib_khronos) 8 | 9 | target_include_directories(bstone_lib_khronos INTERFACE include) 10 | -------------------------------------------------------------------------------- /src/lib/nuked_opl3/bstone_changelog.txt: -------------------------------------------------------------------------------- 1 | BStone changes for Nuked OPL3 2 | - Wrap .c into .cpp file. 3 | - Add CMake project. 4 | -------------------------------------------------------------------------------- /src/lib/nuked_opl3/src/opl3.cpp: -------------------------------------------------------------------------------- 1 | #include "opl3.c" 2 | -------------------------------------------------------------------------------- /src/lib/openal_soft/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR) 2 | project(bstone_lib_openal_soft VERSION 1.0.0 LANGUAGES NONE) 3 | 4 | message(STATUS "[bstone_lib_openal_soft] v${PROJECT_VERSION}") 5 | 6 | add_library(bstone_lib_openal_soft INTERFACE) 7 | add_library(bstone::lib::openal_soft ALIAS bstone_lib_openal_soft) 8 | 9 | target_include_directories(bstone_lib_openal_soft INTERFACE include/AL) 10 | -------------------------------------------------------------------------------- /src/lib/openal_soft/include/AL/efx-creative.h: -------------------------------------------------------------------------------- 1 | /* The tokens that would be defined here are already defined in efx.h. This 2 | * empty file is here to provide compatibility with Windows-based projects 3 | * that would include it. */ 4 | -------------------------------------------------------------------------------- /src/lib/sdl2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR) 2 | 3 | message(STATUS "[bstone_sdl2] v${PROJECT_VERSION}") 4 | 5 | set(SDL2_DISABLE_INSTALL ON CACHE BOOL "Disable installation of SDL2" FORCE) 6 | set(SDL2_DISABLE_UNINSTALL ON CACHE BOOL "Disable uninstallation of SDL2" FORCE) 7 | set(SDL2_DISABLE_SDL2MAIN ON CACHE BOOL "Disable building/installation of SDL2main" FORCE) 8 | set(SDL_SHARED OFF CACHE BOOL "Build a shared version of the library" FORCE) 9 | set(SDL_STATIC ON CACHE BOOL "Build a static version of the library" FORCE) 10 | set(SDL_TEST OFF CACHE BOOL "Build the SDL2_test library" FORCE) 11 | set(SDL_TESTS OFF CACHE BOOL "Build the test directory" FORCE) 12 | 13 | if (BSTONE_USE_STATIC_LINKING) 14 | set(SDL_FORCE_STATIC_VCRT ON CACHE BOOL "Force /MT for static VC runtimes" FORCE) 15 | endif () 16 | 17 | add_subdirectory(src) 18 | -------------------------------------------------------------------------------- /src/lib/sdl2/bstone_sdl2_changelog.md: -------------------------------------------------------------------------------- 1 | # BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 2 | # SDL2 changelog 3 | 4 | ### Removed 5 | - Directory *test*. 6 | 7 | ### Changed 8 | - Disable dynamic API in *src/dynapi/SDL_dynapi.h*. 9 | - Minimum CMake version to v3.5.0. 10 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/.git-hash: -------------------------------------------------------------------------------- 1 | e11183ea6caa3ae4895f4bc54cad2bbb0e365417 2 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/BUGS.txt: -------------------------------------------------------------------------------- 1 | 2 | Bugs are now managed in the SDL issue tracker, here: 3 | 4 | https://github.com/libsdl-org/SDL/issues 5 | 6 | You may report bugs there, and search to see if a given issue has already 7 | been reported, discussed, and maybe even fixed. 8 | 9 | 10 | You may also find help at the SDL forums/mailing list: 11 | 12 | https://discourse.libsdl.org/ 13 | 14 | Bug reports are welcome here, but we really appreciate if you use the issue 15 | tracker, as bugs discussed on the mailing list may be forgotten or missed. 16 | 17 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 1997-2025 Sam Lantinga 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | 19 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/README-SDL.txt: -------------------------------------------------------------------------------- 1 | 2 | Please distribute this file with the SDL runtime environment: 3 | 4 | The Simple DirectMedia Layer (SDL for short) is a cross-platform library 5 | designed to make it easy to write multi-media software, such as games 6 | and emulators. 7 | 8 | The Simple DirectMedia Layer library source code is available from: 9 | https://www.libsdl.org/ 10 | 11 | This library is distributed under the terms of the zlib license: 12 | http://www.zlib.net/zlib_license.html 13 | 14 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Simple DirectMedia Layer (SDL) Version 2.0 3 | 4 | https://www.libsdl.org/ 5 | 6 | Simple DirectMedia Layer is a cross-platform development library designed 7 | to provide low level access to audio, keyboard, mouse, joystick, and graphics 8 | hardware via OpenGL and Direct3D. It is used by video playback software, 9 | emulators, and popular games including Valve's award winning catalog 10 | and many Humble Bundle games. 11 | 12 | More extensive documentation is available in the docs directory, starting 13 | with README.md 14 | 15 | Enjoy! 16 | 17 | Sam Lantinga (slouken@libsdl.org) 18 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/REVISION.txt: -------------------------------------------------------------------------------- 1 | release-2.32.2-0-ge11183ea6 2 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/TODO.txt: -------------------------------------------------------------------------------- 1 | Future work roadmap: 2 | * http://wiki.libsdl.org/Roadmap 3 | 4 | * Check 1.2 revisions: 5 | 3554 - Need to resolve semantics for locking keys on different platforms 6 | 4874 - Do we want screen rotation? At what level? 7 | 4974 - Windows file code needs to convert UTF-8 to Unicode, but we don't need to tap dance for Windows 95/98 8 | 4865 - See if this is still needed (mouse coordinate clamping) 9 | 4866 - See if this is still needed (blocking window repositioning) 10 | 11 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/VisualC-GDK/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | find . -type f \( -name '*.user' -o -name '*.sdf' -o -name '*.ncb' -o -name '*.suo' \) -print -delete 3 | find . -type f \( -name '*.bmp' -o -name '*.wav' -o -name '*.dat' \) -print -delete 4 | find . -depth -type d \( -name Gaming.Desktop.x64 \) -exec rm -rv {} \; 5 | find . -depth -type d \( -name Gaming.Xbox.Scarlett.x64 \) -exec rm -rv {} \; 6 | find . -depth -type d \( -name Gaming.Xbox.XboxOne.x64 \) -exec rm -rv {} \; 7 | rm shaders/*.h 8 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/VisualC-GDK/logos/Logo100x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/VisualC-GDK/logos/Logo100x100.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/VisualC-GDK/logos/Logo150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/VisualC-GDK/logos/Logo150x150.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/VisualC-GDK/logos/Logo44x44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/VisualC-GDK/logos/Logo44x44.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/VisualC-GDK/logos/Logo480x480.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/VisualC-GDK/logos/Logo480x480.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/VisualC-GDK/logos/SplashScreenImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/VisualC-GDK/logos/SplashScreenImage.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/VisualC-GDK/shaders/D3D12_PixelShader_Colors.hlsl: -------------------------------------------------------------------------------- 1 | struct PixelShaderInput 2 | { 3 | float4 pos : SV_POSITION; 4 | float2 tex : TEXCOORD0; 5 | float4 color : COLOR0; 6 | }; 7 | 8 | #define ColorRS \ 9 | "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ 10 | "DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ 11 | "DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ 12 | "DENY_HULL_SHADER_ROOT_ACCESS )," \ 13 | "RootConstants(num32BitConstants=32, b0)" 14 | 15 | [RootSignature(ColorRS)] 16 | float4 main(PixelShaderInput input) : SV_TARGET0 17 | { 18 | return input.color; 19 | } -------------------------------------------------------------------------------- /src/lib/sdl2/src/VisualC-GDK/shaders/D3D12_PixelShader_Textures.hlsl: -------------------------------------------------------------------------------- 1 | Texture2D theTexture : register(t0); 2 | SamplerState theSampler : register(s0); 3 | 4 | struct PixelShaderInput 5 | { 6 | float4 pos : SV_POSITION; 7 | float2 tex : TEXCOORD0; 8 | float4 color : COLOR0; 9 | }; 10 | 11 | #define TextureRS \ 12 | "RootFlags ( ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |" \ 13 | " DENY_DOMAIN_SHADER_ROOT_ACCESS |" \ 14 | " DENY_GEOMETRY_SHADER_ROOT_ACCESS |" \ 15 | " DENY_HULL_SHADER_ROOT_ACCESS )," \ 16 | "RootConstants(num32BitConstants=32, b0),"\ 17 | "DescriptorTable ( SRV(t0), visibility = SHADER_VISIBILITY_PIXEL ),"\ 18 | "DescriptorTable ( Sampler(s0), visibility = SHADER_VISIBILITY_PIXEL )" 19 | 20 | [RootSignature(TextureRS)] 21 | float4 main(PixelShaderInput input) : SV_TARGET 22 | { 23 | return theTexture.Sample(theSampler, input.tex) * input.color; 24 | } -------------------------------------------------------------------------------- /src/lib/sdl2/src/VisualC-GDK/tests/testgamecontroller/PackageLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/VisualC-GDK/tests/testgdk/PackageLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/VisualC-GDK/tests/testsprite2/PackageLayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/VisualC/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | find . -type f \( -name '*.user' -o -name '*.sdf' -o -name '*.ncb' -o -name '*.suo' \) -print -delete 3 | find . -type f \( -name '*.bmp' -o -name '*.wav' -o -name '*.dat' \) -print -delete 4 | find . -depth -type d \( -name Win32 -o -name x64 \) -exec rm -rv {} \; 5 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode-iOS/Demos/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/Xcode-iOS/Demos/Default.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode-iOS/Demos/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/Xcode-iOS/Demos/Icon.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode-iOS/Demos/data/bitmapfont/kromasky_16x16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/Xcode-iOS/Demos/data/bitmapfont/kromasky_16x16.bmp -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode-iOS/Demos/data/drums/ds_brush_snare.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/Xcode-iOS/Demos/data/drums/ds_brush_snare.wav -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode-iOS/Demos/data/drums/ds_china.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/Xcode-iOS/Demos/data/drums/ds_china.wav -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode-iOS/Demos/data/drums/ds_kick_big_amb.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/Xcode-iOS/Demos/data/drums/ds_kick_big_amb.wav -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode-iOS/Demos/data/drums/ds_loose_skin_mute.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/Xcode-iOS/Demos/data/drums/ds_loose_skin_mute.wav -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode-iOS/Demos/data/icon.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/Xcode-iOS/Demos/data/icon.bmp -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode-iOS/Demos/data/ship.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/Xcode-iOS/Demos/data/ship.bmp -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode-iOS/Demos/data/space.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/Xcode-iOS/Demos/data/space.bmp -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode-iOS/Demos/data/stroke.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/Xcode-iOS/Demos/data/stroke.bmp -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode-iOS/Demos/src/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * common.h 3 | * written by Holmes Futrell 4 | * use however you want 5 | */ 6 | 7 | extern int randomInt(int min, int max); 8 | extern float randomFloat(float min, float max); 9 | extern void fatalError(const char *string); 10 | extern double updateDeltaTime(void); 11 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode/SDL/SDL2/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode/SDL/pkg-support/SDL.info: -------------------------------------------------------------------------------- 1 | Title SDL 2.32.2 2 | Version 1 3 | Description SDL Library for Mac OS X (http://www.libsdl.org) 4 | DefaultLocation /Library/Frameworks 5 | Diskname (null) 6 | DeleteWarning 7 | NeedsAuthorization NO 8 | DisableStop NO 9 | UseUserMask NO 10 | Application NO 11 | Relocatable YES 12 | Required NO 13 | InstallOnly NO 14 | RequiresReboot NO 15 | InstallFat NO 16 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode/SDL/pkg-support/resources/SDL_DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/Xcode/SDL/pkg-support/resources/SDL_DS_Store -------------------------------------------------------------------------------- /src/lib/sdl2/src/Xcode/SDL/pkg-support/sdl_logo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/Xcode/SDL/pkg-support/sdl_logo.pdf -------------------------------------------------------------------------------- /src/lib/sdl2/src/acinclude/ac_check_define.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AC_CHECK_DEFINE],[AC_REQUIRE([AC_PROG_CPP])dnl 2 | AC_CACHE_CHECK(for $1 in $2, ac_cv_define_$1, 3 | AC_EGREP_CPP([YES_IS_DEFINED], [ 4 | #include <$2> 5 | #ifdef $1 6 | YES_IS_DEFINED 7 | #endif 8 | ], ac_cv_define_$1=yes, ac_cv_define_$1=no) 9 | ) 10 | if test "$ac_cv_define_$1" = "yes" ; then 11 | AC_DEFINE([HAVE_$1],[],[Added by AC_CHECK_DEFINE]) 12 | fi 13 | ])dnl 14 | 15 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/acinclude/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 4179 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.6]) 16 | m4_define([LT_PACKAGE_REVISION], [2.4.6]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.6' 20 | macro_revision='2.4.6' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/ant.properties: -------------------------------------------------------------------------------- 1 | # This file is used to override default values used by the Ant build system. 2 | # 3 | # This file must be checked into Version Control Systems, as it is 4 | # integral to the build system of your project. 5 | 6 | # This file is only used by the Ant script. 7 | 8 | # You can use this to override default values such as 9 | # 'source.dir' for the location of your java source folder and 10 | # 'out.dir' for the location of your output folder. 11 | 12 | # You can also use it define how the release builds are signed by declaring 13 | # the following properties: 14 | # 'key.store' for the location of your keystore and 15 | # 'key.alias' for the name of the key to use. 16 | # The password will be asked during the build when you use the 'release' target. 17 | 18 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/build.properties: -------------------------------------------------------------------------------- 1 | # This file is used to override default values used by the Ant build system. 2 | # 3 | # This file must be checked in Version Control Systems, as it is 4 | # integral to the build system of your project. 5 | 6 | # This file is only used by the Ant script. 7 | 8 | # You can use this to override default values such as 9 | # 'source.dir' for the location of your java source folder and 10 | # 'out.dir' for the location of your output folder. 11 | 12 | # You can also use it define how the release builds are signed by declaring 13 | # the following properties: 14 | # 'key.store' for the location of your keystore and 15 | # 'key.alias' for the name of the key to use. 16 | # The password will be asked during the build when you use the 'release' target. 17 | 18 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/default.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system use, 7 | # "build.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | # Project target. 11 | target=android-16 12 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/jni/Android.mk: -------------------------------------------------------------------------------- 1 | include $(call all-subdir-makefiles) 2 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/jni/Application.mk: -------------------------------------------------------------------------------- 1 | 2 | # Uncomment this if you're using STL in your project 3 | # See CPLUSPLUS-SUPPORT.html in the NDK documentation for more information 4 | # APP_STL := stlport_static 5 | 6 | APP_ABI := armeabi armeabi-v7a x86 7 | 8 | # Min SDK level 9 | APP_PLATFORM=android-10 10 | 11 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/jni/src/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := main 6 | 7 | SDL_PATH := ../SDL 8 | 9 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include 10 | 11 | # Add your application source files here... 12 | LOCAL_SRC_FILES := YourSourceHere.c 13 | 14 | LOCAL_SHARED_LIBRARIES := SDL2 15 | 16 | LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog 17 | 18 | include $(BUILD_SHARED_LIBRARY) 19 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/jni/src/Android_static.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := main 6 | 7 | LOCAL_SRC_FILES := YourSourceHere.c 8 | 9 | LOCAL_STATIC_LIBRARIES := SDL2_static 10 | 11 | include $(BUILD_SHARED_LIBRARY) 12 | $(call import-module,SDL)LOCAL_PATH := $(call my-dir) 13 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-16 15 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/android-project-ant/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/android-project-ant/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/android-project-ant/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/android-project-ant/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | SDL App 4 | 5 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project-ant/src/org/libsdl/app/HIDDevice.java: -------------------------------------------------------------------------------- 1 | package org.libsdl.app; 2 | 3 | import android.hardware.usb.UsbDevice; 4 | 5 | interface HIDDevice 6 | { 7 | public int getId(); 8 | public int getVendorId(); 9 | public int getProductId(); 10 | public String getSerialNumber(); 11 | public int getVersion(); 12 | public String getManufacturerName(); 13 | public String getProductName(); 14 | public UsbDevice getDevice(); 15 | public boolean open(); 16 | public int sendFeatureReport(byte[] report); 17 | public int sendOutputReport(byte[] report); 18 | public boolean getFeatureReport(byte[] report); 19 | public void setFrozen(boolean frozen); 20 | public void close(); 21 | public void shutdown(); 22 | } 23 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/app/jni/Android.mk: -------------------------------------------------------------------------------- 1 | include $(call all-subdir-makefiles) 2 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/app/jni/Application.mk: -------------------------------------------------------------------------------- 1 | 2 | # Uncomment this if you're using STL in your project 3 | # You can find more information here: 4 | # https://developer.android.com/ndk/guides/cpp-support 5 | # APP_STL := c++_shared 6 | 7 | APP_ABI := armeabi-v7a arm64-v8a x86 x86_64 8 | 9 | # Min runtime API level 10 | APP_PLATFORM=android-16 11 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/app/jni/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.6) 2 | 3 | project(GAME) 4 | 5 | # armeabi-v7a requires cpufeatures library 6 | # include(AndroidNdkModules) 7 | # android_ndk_import_module_cpufeatures() 8 | 9 | 10 | # SDL sources are in a subfolder named "SDL" 11 | add_subdirectory(SDL) 12 | 13 | # Compilation of companion libraries 14 | #add_subdirectory(SDL_image) 15 | #add_subdirectory(SDL_mixer) 16 | #add_subdirectory(SDL_ttf) 17 | 18 | # Your game and its CMakeLists.txt are in a subfolder named "src" 19 | add_subdirectory(src) 20 | 21 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/app/jni/src/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := main 6 | 7 | SDL_PATH := ../SDL 8 | 9 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include 10 | 11 | # Add your application source files here... 12 | LOCAL_SRC_FILES := YourSourceHere.c 13 | 14 | LOCAL_SHARED_LIBRARIES := SDL2 15 | 16 | LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid 17 | 18 | include $(BUILD_SHARED_LIBRARY) 19 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/app/jni/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.6) 2 | 3 | project(MY_APP) 4 | 5 | find_library(SDL2 SDL2) 6 | 7 | add_library(main SHARED) 8 | 9 | target_sources(main PRIVATE YourSourceHere.c) 10 | 11 | target_link_libraries(main SDL2) 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/app/src/main/java/org/libsdl/app/HIDDevice.java: -------------------------------------------------------------------------------- 1 | package org.libsdl.app; 2 | 3 | import android.hardware.usb.UsbDevice; 4 | 5 | interface HIDDevice 6 | { 7 | public int getId(); 8 | public int getVendorId(); 9 | public int getProductId(); 10 | public String getSerialNumber(); 11 | public int getVersion(); 12 | public String getManufacturerName(); 13 | public String getProductName(); 14 | public UsbDevice getDevice(); 15 | public boolean open(); 16 | public int sendFeatureReport(byte[] report); 17 | public int sendOutputReport(byte[] report); 18 | public boolean getFeatureReport(byte[] report); 19 | public void setFrozen(boolean frozen); 20 | public void close(); 21 | public void shutdown(); 22 | } 23 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/android-project/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/android-project/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/android-project/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/android-project/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/android-project/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Game 3 | 4 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | mavenCentral() 6 | google() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:8.1.1' 10 | 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | mavenCentral() 19 | google() 20 | } 21 | } 22 | 23 | task clean(type: Delete) { 24 | delete rootProject.buildDir 25 | } 26 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/android-project/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Nov 11 18:20:34 PST 2021 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/android-project/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "Generating build information using autoconf" 6 | echo "This may take a while ..." 7 | 8 | srcdir=`dirname $0` 9 | test -z "$srcdir" && srcdir=. 10 | cd "$srcdir" 11 | 12 | # Regenerate configuration files 13 | cat acinclude/* >aclocal.m4 14 | 15 | "${AUTOCONF:-autoconf}" 16 | rm aclocal.m4 17 | rm -rf autom4te.cache 18 | 19 | (cd test; sh autogen.sh) 20 | 21 | echo "Now you are ready to run ./configure" 22 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/build-scripts/clang-format-src.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd "$(dirname $0)/../src" 4 | 5 | echo "Running clang-format in $(pwd)" 6 | 7 | find . -regex '.*\.[chm]p*' -exec clang-format -i {} \; 8 | 9 | # Revert third-party code 10 | git checkout \ 11 | events/imKStoUCS.* \ 12 | hidapi \ 13 | joystick/controller_type.c \ 14 | joystick/controller_type.h \ 15 | joystick/hidapi/steam/controller_constants.h \ 16 | joystick/hidapi/steam/controller_structs.h \ 17 | libm \ 18 | stdlib/SDL_malloc.c \ 19 | stdlib/SDL_qsort.c \ 20 | stdlib/SDL_strtokr.c \ 21 | video/arm \ 22 | video/khronos \ 23 | video/x11/edid-parse.c \ 24 | video/yuv2rgb 25 | clang-format -i hidapi/SDL_hidapi.c 26 | 27 | # Revert generated code 28 | git checkout dynapi/SDL_dynapi_overrides.h 29 | git checkout dynapi/SDL_dynapi_procs.h 30 | git checkout render/metal/SDL_shaders_metal_*.h 31 | 32 | echo "clang-format complete!" 33 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/build-scripts/cmake-toolchain-mingw64-i686.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_NAME Windows) 2 | set(CMAKE_SYSTEM_PROCESSOR x86) 3 | 4 | find_program(CMAKE_C_COMPILER NAMES i686-w64-mingw32-gcc) 5 | find_program(CMAKE_CXX_COMPILER NAMES i686-w64-mingw32-g++) 6 | find_program(CMAKE_RC_COMPILER NAMES i686-w64-mingw32-windres windres) 7 | 8 | if(NOT CMAKE_C_COMPILER) 9 | message(FATAL_ERROR "Failed to find CMAKE_C_COMPILER.") 10 | endif() 11 | 12 | if(NOT CMAKE_CXX_COMPILER) 13 | message(FATAL_ERROR "Failed to find CMAKE_CXX_COMPILER.") 14 | endif() 15 | 16 | if(NOT CMAKE_RC_COMPILER) 17 | message(FATAL_ERROR "Failed to find CMAKE_RC_COMPILER.") 18 | endif() 19 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/build-scripts/cmake-toolchain-mingw64-x86_64.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_NAME Windows) 2 | set(CMAKE_SYSTEM_PROCESSOR x86_64) 3 | 4 | find_program(CMAKE_C_COMPILER NAMES x86_64-w64-mingw32-gcc) 5 | find_program(CMAKE_CXX_COMPILER NAMES x86_64-w64-mingw32-g++) 6 | find_program(CMAKE_RC_COMPILER NAMES x86_64-w64-mingw32-windres windres) 7 | 8 | if(NOT CMAKE_C_COMPILER) 9 | message(FATAL_ERROR "Failed to find CMAKE_C_COMPILER.") 10 | endif() 11 | 12 | if(NOT CMAKE_CXX_COMPILER) 13 | message(FATAL_ERROR "Failed to find CMAKE_CXX_COMPILER.") 14 | endif() 15 | 16 | if(NOT CMAKE_RC_COMPILER) 17 | message(FATAL_ERROR "Failed to find CMAKE_RC_COMPILER.") 18 | endif() 19 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/build-scripts/strip_fPIC.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # libtool assumes that the compiler can handle the -fPIC flag 4 | # This isn't always true (for example, nasm can't handle it) 5 | command="" 6 | while [ $# -gt 0 ]; do 7 | case "$1" in 8 | -?PIC) 9 | # Ignore -fPIC and -DPIC options 10 | ;; 11 | -fno-common) 12 | # Ignore -fPIC and -DPIC options 13 | ;; 14 | *) 15 | command="$command $1" 16 | ;; 17 | esac 18 | shift 19 | done 20 | echo $command 21 | exec $command 22 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/build-scripts/update-copyright.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$SED" = "" ]; then 4 | if type gsed >/dev/null; then 5 | SED=gsed 6 | else 7 | SED=sed 8 | fi 9 | fi 10 | 11 | find . -type f \ 12 | | grep -v \.git \ 13 | | while read file; do \ 14 | LC_ALL=C $SED -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \ 15 | done 16 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/build-scripts/windows-buildbot-zipper.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem just a helper batch file for collecting up files and zipping them. 3 | rem usage: windows-buildbot-zipper.bat 4 | rem must be run from root of SDL source tree. 5 | 6 | IF EXIST %2\%1\Release GOTO okaydir 7 | echo Please run from root of source tree after doing a Release build. 8 | GOTO done 9 | 10 | :okaydir 11 | erase /q /f /s zipper 12 | IF EXIST zipper GOTO zippermade 13 | mkdir zipper 14 | :zippermade 15 | mkdir zipper\SDL 16 | mkdir zipper\SDL\include 17 | mkdir zipper\SDL\lib 18 | copy include\*.h include\ 19 | copy %2\%1\Release\SDL2.dll zipper\SDL\lib\ 20 | copy %2\%1\Release\SDL2.lib zipper\SDL\lib\ 21 | copy %2\%1\Release\SDL2main.lib zipper\SDL\lib\ 22 | cd zipper 23 | zip -9r ..\%3 SDL 24 | cd .. 25 | erase /q /f /s zipper 26 | 27 | :done 28 | 29 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/cmake/sdlfind.cmake: -------------------------------------------------------------------------------- 1 | 2 | macro(sdlFindALSA) 3 | find_package(ALSA MODULE) 4 | if(ALSA_FOUND AND (NOT TARGET ALSA::ALSA) ) 5 | add_Library(ALSA::ALSA UNKNOWN IMPORTED) 6 | set_property(TARGET ALSA::ALSA PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ALSA_INCLUDE_DIRS}) 7 | set_property(TARGET ALSA::ALSA APPEND PROPERTY IMPORTED_LOCATION ${ALSA_LIBRARY}) 8 | endif() 9 | endmacro() 10 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/cmake/test/jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := main_gui_androidmk 6 | LOCAL_SRC_FILES := ../main_gui.c 7 | LOCAL_SHARED_LIBRARIES += SDL2 8 | include $(BUILD_SHARED_LIBRARY) 9 | 10 | $(call import-module,SDL2main) 11 | $(call import-module,SDL2) 12 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/cmake/test/main.swift: -------------------------------------------------------------------------------- 1 | /* Contributed by Piotr Usewicz (https://github.com/pusewicz) */ 2 | 3 | import SDL2 4 | 5 | guard SDL_Init(Uint32(SDL_INIT_VIDEO)) == 0 else { 6 | fatalError("SDL_Init error: \(String(cString: SDL_GetError()))") 7 | } 8 | 9 | var sdlVersion = SDL_version() 10 | SDL_GetVersion(&sdlVersion) 11 | 12 | print("SDL version: \(sdlVersion.major).\(sdlVersion.minor).\(sdlVersion.patch)") 13 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/cmake/test/main_cli.c: -------------------------------------------------------------------------------- 1 | #define SDL_MAIN_HANDLED 2 | #include "SDL.h" 3 | #include 4 | 5 | int main(int argc, char *argv[]) { 6 | SDL_SetMainReady(); 7 | if (SDL_Init(0) < 0) { 8 | fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError()); 9 | return 1; 10 | } 11 | SDL_Delay(100); 12 | SDL_Quit(); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/cmake/test/main_lib.c: -------------------------------------------------------------------------------- 1 | #include "SDL.h" 2 | #include 3 | 4 | #include EXPORT_HEADER 5 | 6 | #if defined(_WIN32) 7 | #include 8 | BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { 9 | return TRUE; 10 | } 11 | #endif 12 | 13 | int MYLIBRARY_EXPORT mylibrary_init(void); 14 | void MYLIBRARY_EXPORT mylibrary_quit(void); 15 | int MYLIBRARY_EXPORT mylibrary_work(void); 16 | 17 | int mylibrary_init(void) { 18 | SDL_SetMainReady(); 19 | if (SDL_Init(0) < 0) { 20 | fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError()); 21 | return 1; 22 | } 23 | return 0; 24 | } 25 | 26 | void mylibrary_quit(void) { 27 | SDL_Quit(); 28 | } 29 | 30 | int mylibrary_work(void) { 31 | SDL_Delay(100); 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/cmake/test/sdltest.c: -------------------------------------------------------------------------------- 1 | #include "SDL.h" 2 | #include "SDL_test.h" 3 | 4 | 5 | int main(int argc, char *argv[]) { 6 | SDLTest_CommonState state; 7 | SDLTest_CommonDefaultArgs(&state, argc, argv); 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/cmake/test/swift/module.modulemap: -------------------------------------------------------------------------------- 1 | module SDL2 [extern_c] { 2 | header "shim.h" 3 | export * 4 | } 5 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/cmake/test/swift/shim.h: -------------------------------------------------------------------------------- 1 | /* Contributed by Piotr Usewicz (https://github.com/pusewicz) */ 2 | 3 | #include "SDL.h" 4 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | if (NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") 2 | message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_BINARY_DIR@/install_manifest.txt\"") 3 | endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") 4 | 5 | file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) 6 | string(REGEX REPLACE "\n" ";" files "${files}") 7 | foreach (file ${files}) 8 | message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") 9 | execute_process( 10 | COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}" 11 | OUTPUT_VARIABLE rm_out 12 | RESULT_VARIABLE rm_retval 13 | ) 14 | if(NOT ${rm_retval} EQUAL 0) 15 | message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") 16 | endif (NOT ${rm_retval} EQUAL 0) 17 | endforeach(file) 18 | 19 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/docs/README-git.md: -------------------------------------------------------------------------------- 1 | git 2 | ========= 3 | 4 | The latest development version of SDL is available via git. 5 | Git allows you to get up-to-the-minute fixes and enhancements; 6 | as a developer works on a source tree, you can use "git" to mirror that 7 | source tree instead of waiting for an official release. Please look 8 | at the Git website ( https://git-scm.com/ ) for more 9 | information on using git, where you can also download software for 10 | macOS, Windows, and Unix systems. 11 | 12 | git clone https://github.com/libsdl-org/SDL 13 | 14 | If you are building SDL via configure, you will need to run autogen.sh 15 | before running configure. 16 | 17 | There is a web interface to the Git repository at: 18 | http://github.com/libsdl-org/SDL/ 19 | 20 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/docs/README-hg.md: -------------------------------------------------------------------------------- 1 | We are no longer hosted in Mercurial. Please see README-git.md for details. 2 | 3 | Thanks! 4 | 5 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/docs/README-pandora.md: -------------------------------------------------------------------------------- 1 | Pandora 2 | ===================================================================== 3 | 4 | ( http://openpandora.org/ ) 5 | - A pandora specific video driver was written to allow SDL 2.0 with OpenGL ES 6 | support to work on the pandora under the framebuffer. This driver do not have 7 | input support for now, so if you use it you will have to add your own control code. 8 | The video driver name is "pandora" so if you have problem running it from 9 | the framebuffer, try to set the following variable before starting your application : 10 | "export SDL_VIDEODRIVER=pandora" 11 | 12 | - OpenGL ES support was added to the x11 driver, so it's working like the normal 13 | x11 driver one with OpenGLX support, with SDL input event's etc.. 14 | 15 | 16 | David Carré (Cpasjuste) 17 | cpasjuste@gmail.com 18 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/docs/README-platforms.md: -------------------------------------------------------------------------------- 1 | Platforms 2 | ========= 3 | 4 | We maintain the list of supported platforms on our wiki now, and how to 5 | build and install SDL for those platforms: 6 | 7 | https://wiki.libsdl.org/Installation 8 | 9 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/docs/README-wince.md: -------------------------------------------------------------------------------- 1 | WinCE 2 | ===== 3 | 4 | Windows CE is no longer supported by SDL. 5 | 6 | We have left the CE support in SDL 1.2 for those that must have it, and we 7 | have support for Windows Phone 8 and WinRT in SDL2, as of SDL 2.0.3. 8 | 9 | --ryan. 10 | 11 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/include/SDL_opengles2_gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* 5 | ** Copyright 2017-2020 The Khronos Group Inc. 6 | ** SPDX-License-Identifier: Apache-2.0 7 | */ 8 | 9 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 10 | * 11 | * Adopters may modify khrplatform.h and this file to suit their platform. 12 | * Please contribute modifications back to Khronos as pull requests on the 13 | * public github repository: 14 | * https://github.com/KhronosGroup/OpenGL-Registry 15 | */ 16 | 17 | /*#include */ 18 | 19 | #ifndef GL_APICALL 20 | #define GL_APICALL KHRONOS_APICALL 21 | #endif 22 | 23 | #ifndef GL_APIENTRY 24 | #define GL_APIENTRY KHRONOS_APIENTRY 25 | #endif 26 | 27 | #endif /* __gl2platform_h_ */ 28 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/include/SDL_revision.h: -------------------------------------------------------------------------------- 1 | #ifdef SDL_VENDOR_INFO 2 | #define SDL_REVISION SDL_VENDOR_INFO 3 | #else 4 | #define SDL_REVISION "" 5 | #endif 6 | #define SDL_REVISION_NUMBER 0 7 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/include/SDL_revision.h.cmake: -------------------------------------------------------------------------------- 1 | #cmakedefine SDL_VENDOR_INFO "@SDL_VENDOR_INFO@" 2 | #define SDL_REVISION_NUMBER 0 3 | 4 | #ifdef SDL_VENDOR_INFO 5 | #define SDL_REVISION "@SDL_REVISION@ (" SDL_VENDOR_INFO ")" 6 | #else 7 | #define SDL_REVISION "@SDL_REVISION@" 8 | #endif 9 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/mingw/pkg-support/INSTALL.txt: -------------------------------------------------------------------------------- 1 | 2 | The 32-bit files are in i686-w64-mingw32 3 | The 64-bit files are in x86_64-w64-mingw32 4 | 5 | To install SDL for native development: 6 | make native 7 | 8 | To install SDL for cross-compiling development: 9 | make cross 10 | 11 | Look at the example programs in ./test, and check out online documentation: 12 | http://wiki.libsdl.org/ 13 | 14 | Join the SDL developer mailing list if you want to join the community: 15 | http://www.libsdl.org/mailing-list.php 16 | 17 | That's it! 18 | Sam Lantinga 19 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/mingw/pkg-support/cmake/sdl2-config-version.cmake: -------------------------------------------------------------------------------- 1 | # SDL2 CMake version configuration file: 2 | # This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-mingw 3 | 4 | if(CMAKE_SIZEOF_VOID_P EQUAL 4) 5 | set(sdl2_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL2/sdl2-config-version.cmake") 6 | elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) 7 | set(sdl2_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL2/sdl2-config-version.cmake") 8 | else() 9 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 10 | return() 11 | endif() 12 | 13 | if(NOT EXISTS "${sdl2_config_path}") 14 | message(WARNING "${sdl2_config_path} does not exist: MinGW development package is corrupted") 15 | set(PACKAGE_VERSION_UNSUITABLE TRUE) 16 | return() 17 | endif() 18 | 19 | include("${sdl2_config_path}") 20 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/mingw/pkg-support/cmake/sdl2-config.cmake: -------------------------------------------------------------------------------- 1 | # SDL2 CMake configuration file: 2 | # This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-mingw 3 | 4 | if(CMAKE_SIZEOF_VOID_P EQUAL 4) 5 | set(sdl2_config_path "${CMAKE_CURRENT_LIST_DIR}/../i686-w64-mingw32/lib/cmake/SDL2/sdl2-config.cmake") 6 | elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) 7 | set(sdl2_config_path "${CMAKE_CURRENT_LIST_DIR}/../x86_64-w64-mingw32/lib/cmake/SDL2/sdl2-config.cmake") 8 | else() 9 | set(SDL2_FOUND FALSE) 10 | return() 11 | endif() 12 | 13 | if(NOT EXISTS "${sdl2_config_path}") 14 | message(WARNING "${sdl2_config_path} does not exist: MinGW development package is corrupted") 15 | set(SDL2_FOUND FALSE) 16 | return() 17 | endif() 18 | 19 | include("${sdl2_config_path}") 20 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/sdl2-config-version.cmake.in: -------------------------------------------------------------------------------- 1 | # sdl2 cmake project-config-version input for ./configure scripts 2 | 3 | set(PACKAGE_VERSION "@SDL_VERSION@") 4 | 5 | if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) 6 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 7 | else() 8 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 9 | if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) 10 | set(PACKAGE_VERSION_EXACT TRUE) 11 | endif() 12 | endif() 13 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/sdl2.pc.in: -------------------------------------------------------------------------------- 1 | # sdl pkg-config source file 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: sdl2 9 | Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. 10 | Version: @SDL_VERSION@ 11 | Requires.private: @PKGCONFIG_DEPENDS@ 12 | Conflicts: 13 | Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ @PKGCONFIG_LIBS_PRIV@ @SDL_STATIC_LIBS@ 14 | Cflags: -I${includedir} -I${includedir}/SDL2 @SDL_CFLAGS@ 15 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/core/os2/geniconv/iconv.h: -------------------------------------------------------------------------------- 1 | #ifndef ICONV_H_ /* minimal iconv.h header based on public knowledge */ 2 | #define ICONV_H_ 3 | 4 | #include /* size_t */ 5 | #include 6 | 7 | typedef void *iconv_t; 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | extern iconv_t iconv_open(const char *, const char *); 14 | extern size_t iconv(iconv_t, char **, size_t *, char **, size_t *); 15 | extern int iconv_close(iconv_t); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | #endif /* ICONV_H_ */ 22 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/core/os2/iconv2.lbc: -------------------------------------------------------------------------------- 1 | # OpenWatcom exports file for libiconv 2 | ++'libiconv'.'ICONV2'..'_libiconv' 3 | ++'libiconv_close'.'ICONV2'..'_libiconv_close' 4 | ++'libiconv_open'.'ICONV2'..'_libiconv_open' 5 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/haptic/android/SDL_syshaptic_c.h: -------------------------------------------------------------------------------- 1 | #include "SDL_config.h" 2 | 3 | #ifdef SDL_HAPTIC_ANDROID 4 | 5 | 6 | extern int Android_AddHaptic(int device_id, const char *name); 7 | extern int Android_RemoveHaptic(int device_id); 8 | 9 | 10 | #endif /* SDL_HAPTIC_ANDROID */ 11 | 12 | /* vi: set ts=4 sw=4 expandtab: */ 13 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/AUTHORS.txt: -------------------------------------------------------------------------------- 1 | 2 | HIDAPI Authors: 3 | 4 | Alan Ott : 5 | Original Author and Maintainer 6 | Linux, Windows, and Mac implementations 7 | 8 | Ludovic Rousseau : 9 | Formatting for Doxygen documentation 10 | Bug fixes 11 | Correctness fixes 12 | 13 | 14 | For a comprehensive list of contributions, see the commit list at github: 15 | https://github.com/libusb/hidapi/commits/master 16 | 17 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/HACKING.txt: -------------------------------------------------------------------------------- 1 | This file is mostly for the maintainer. 2 | 3 | 1. Build hidapi.dll 4 | 2. Build hidtest.exe in DEBUG and RELEASE 5 | 3. Commit all 6 | 7 | 4. Run the Following 8 | export VERSION=0.1.0 9 | export TAG_NAME=hidapi-$VERSION 10 | git tag $TAG_NAME 11 | git archive --format zip --prefix $TAG_NAME/ $TAG_NAME >../$TAG_NAME.zip 12 | 5. Test the zip file. 13 | 6. Run the following: 14 | git push origin $TAG_NAME 15 | 16 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/LICENSE-orig.txt: -------------------------------------------------------------------------------- 1 | HIDAPI - Multi-Platform library for 2 | communication with HID devices. 3 | 4 | Copyright 2009, Alan Ott, Signal 11 Software. 5 | All Rights Reserved. 6 | 7 | This software may be used by anyone for any reason so 8 | long as the copyright notice in the source files 9 | remains intact. 10 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/LICENSE.txt: -------------------------------------------------------------------------------- 1 | HIDAPI can be used under one of three licenses. 2 | 3 | 1. The GNU General Public License, version 3.0, in LICENSE-gpl3.txt 4 | 2. A BSD-Style License, in LICENSE-bsd.txt. 5 | 3. The more liberal original HIDAPI license. LICENSE-orig.txt 6 | 7 | The license chosen is at the discretion of the user of HIDAPI. For example: 8 | 1. An author of GPL software would likely use HIDAPI under the terms of the 9 | GPL. 10 | 11 | 2. An author of commercial closed-source software would likely use HIDAPI 12 | under the terms of the BSD-style license or the original HIDAPI license. 13 | 14 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/android/jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | 3 | HIDAPI_ROOT_REL:= ../.. 4 | HIDAPI_ROOT_ABS:= $(LOCAL_PATH)/../.. 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_CPPFLAGS += -std=c++11 9 | 10 | LOCAL_SRC_FILES := \ 11 | $(HIDAPI_ROOT_REL)/android/hid.cpp 12 | 13 | LOCAL_MODULE := libhidapi 14 | LOCAL_LDLIBS := -llog 15 | 16 | include $(BUILD_SHARED_LIBRARY) 17 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/android/jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_STL := gnustl_static 2 | APP_ABI := armeabi-v7a 3 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/android/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-21 15 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh -x 2 | autoreconf --install --verbose --force 3 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/hidtest/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/hidapi/ 2 | 3 | ## Linux 4 | if OS_LINUX 5 | noinst_PROGRAMS = hidtest-libusb hidtest-hidraw 6 | 7 | hidtest_hidraw_SOURCES = hidtest.cpp 8 | hidtest_hidraw_LDADD = $(top_builddir)/linux/libhidapi-hidraw.la 9 | 10 | hidtest_libusb_SOURCES = hidtest.cpp 11 | hidtest_libusb_LDADD = $(top_builddir)/libusb/libhidapi-libusb.la 12 | else 13 | 14 | # Other OS's 15 | noinst_PROGRAMS = hidtest 16 | 17 | hidtest_SOURCES = hidtest.cpp 18 | hidtest_LDADD = $(top_builddir)/$(backend)/libhidapi.la 19 | 20 | endif 21 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/ios/Makefile-manual: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-07-03 7 | ########################################### 8 | 9 | all: hidtest 10 | 11 | CC=gcc 12 | CXX=g++ 13 | COBJS=hid.o 14 | CPPOBJS=../hidtest/hidtest.o 15 | OBJS=$(COBJS) $(CPPOBJS) 16 | CFLAGS+=-I../hidapi -Wall -g -c 17 | LIBS=-framework CoreBluetooth -framework CoreFoundation 18 | 19 | 20 | hidtest: $(OBJS) 21 | g++ -Wall -g $^ $(LIBS) -o hidtest 22 | 23 | $(COBJS): %.o: %.c 24 | $(CC) $(CFLAGS) $< -o $@ 25 | 26 | $(CPPOBJS): %.o: %.cpp 27 | $(CXX) $(CFLAGS) $< -o $@ 28 | 29 | clean: 30 | rm -f *.o hidtest $(CPPOBJS) 31 | 32 | .PHONY: clean 33 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/ios/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libhidapi.la 2 | libhidapi_la_SOURCES = hid.m 3 | libhidapi_la_LDFLAGS = $(LTLDFLAGS) 4 | AM_CPPFLAGS = -I$(top_srcdir)/hidapi/ 5 | 6 | hdrdir = $(includedir)/hidapi 7 | hdr_HEADERS = $(top_srcdir)/hidapi/hidapi.h 8 | 9 | EXTRA_DIST = Makefile-manual 10 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/libusb/Makefile-manual: -------------------------------------------------------------------------------- 1 | 2 | 3 | OS=$(shell uname) 4 | 5 | ifeq ($(OS), Linux) 6 | FILE=Makefile.linux 7 | endif 8 | 9 | ifeq ($(OS), FreeBSD) 10 | FILE=Makefile.freebsd 11 | endif 12 | 13 | ifeq ($(FILE), ) 14 | all: 15 | $(error Your platform ${OS} is not supported by hidapi/libusb at this time.) 16 | endif 17 | 18 | include $(FILE) 19 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/libusb/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/hidapi $(CFLAGS_LIBUSB) 2 | 3 | if OS_LINUX 4 | lib_LTLIBRARIES = libhidapi-libusb.la 5 | libhidapi_libusb_la_SOURCES = hid.c 6 | libhidapi_libusb_la_LDFLAGS = $(LTLDFLAGS) $(PTHREAD_CFLAGS) 7 | libhidapi_libusb_la_LIBADD = $(LIBS_LIBUSB) 8 | endif 9 | 10 | if OS_FREEBSD 11 | lib_LTLIBRARIES = libhidapi.la 12 | libhidapi_la_SOURCES = hid.c 13 | libhidapi_la_LDFLAGS = $(LTLDFLAGS) 14 | libhidapi_la_LIBADD = $(LIBS_LIBUSB) 15 | endif 16 | 17 | if OS_KFREEBSD 18 | lib_LTLIBRARIES = libhidapi.la 19 | libhidapi_la_SOURCES = hid.c 20 | libhidapi_la_LDFLAGS = $(LTLDFLAGS) 21 | libhidapi_la_LIBADD = $(LIBS_LIBUSB) 22 | endif 23 | 24 | hdrdir = $(includedir)/hidapi 25 | hdr_HEADERS = $(top_srcdir)/hidapi/hidapi.h 26 | 27 | EXTRA_DIST = Makefile-manual 28 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/libusb/hidusb.cpp: -------------------------------------------------------------------------------- 1 | 2 | #define NAMESPACE HIDUSB 3 | #include "hid.c" 4 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/linux/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libhidapi-hidraw.la 2 | libhidapi_hidraw_la_SOURCES = hid.c 3 | libhidapi_hidraw_la_LDFLAGS = $(LTLDFLAGS) 4 | AM_CPPFLAGS = -I$(top_srcdir)/hidapi/ $(CFLAGS_HIDRAW) 5 | libhidapi_hidraw_la_LIBADD = $(LIBS_HIDRAW) 6 | 7 | hdrdir = $(includedir)/hidapi 8 | hdr_HEADERS = $(top_srcdir)/hidapi/hidapi.h 9 | 10 | EXTRA_DIST = Makefile-manual 11 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/linux/hidraw.cpp: -------------------------------------------------------------------------------- 1 | 2 | #define NAMESPACE HIDRAW 3 | #include "hid.c" 4 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/mac/Makefile-manual: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-07-03 7 | ########################################### 8 | 9 | all: hidtest 10 | 11 | CC=gcc 12 | CXX=g++ 13 | COBJS=hid.o 14 | CPPOBJS=../hidtest/hidtest.o 15 | OBJS=$(COBJS) $(CPPOBJS) 16 | CFLAGS+=-I../hidapi -Wall -g -c 17 | LIBS=-framework IOKit -framework CoreFoundation -framework AppKit 18 | 19 | 20 | hidtest: $(OBJS) 21 | g++ -Wall -g $^ $(LIBS) -o hidtest 22 | 23 | $(COBJS): %.o: %.c 24 | $(CC) $(CFLAGS) $< -o $@ 25 | 26 | $(CPPOBJS): %.o: %.cpp 27 | $(CXX) $(CFLAGS) $< -o $@ 28 | 29 | clean: 30 | rm -f *.o hidtest $(CPPOBJS) 31 | 32 | .PHONY: clean 33 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/mac/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libhidapi.la 2 | libhidapi_la_SOURCES = hid.c 3 | libhidapi_la_LDFLAGS = $(LTLDFLAGS) 4 | AM_CPPFLAGS = -I$(top_srcdir)/hidapi/ 5 | 6 | hdrdir = $(includedir)/hidapi 7 | hdr_HEADERS = $(top_srcdir)/hidapi/hidapi.h 8 | 9 | EXTRA_DIST = Makefile-manual 10 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/pc/hidapi-hidraw.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: hidapi-hidraw 7 | Description: C Library for USB/Bluetooth HID device access from Linux, Mac OS X, FreeBSD, and Windows. This is the hidraw implementation. 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lhidapi-hidraw 10 | Cflags: -I${includedir}/hidapi 11 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/pc/hidapi-libusb.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: hidapi-libusb 7 | Description: C Library for USB HID device access from Linux, Mac OS X, FreeBSD, and Windows. This is the libusb implementation. 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lhidapi-libusb 10 | Cflags: -I${includedir}/hidapi 11 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/pc/hidapi.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: hidapi 7 | Description: C Library for USB/Bluetooth HID device access from Linux, Mac OS X, FreeBSD, and Windows. 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lhidapi 10 | Cflags: -I${includedir}/hidapi 11 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/testgui/Makefile-manual: -------------------------------------------------------------------------------- 1 | 2 | 3 | OS=$(shell uname) 4 | 5 | ifeq ($(OS), Darwin) 6 | FILE=Makefile.mac 7 | endif 8 | 9 | ifneq (,$(findstring MINGW,$(OS))) 10 | FILE=Makefile.mingw 11 | endif 12 | 13 | ifeq ($(OS), Linux) 14 | FILE=Makefile.linux 15 | endif 16 | 17 | ifeq ($(OS), FreeBSD) 18 | FILE=Makefile.freebsd 19 | endif 20 | 21 | ifeq ($(FILE), ) 22 | all: 23 | $(error Your platform ${OS} is not supported at this time.) 24 | endif 25 | 26 | include $(FILE) 27 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/testgui/Makefile.freebsd: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-06-01 7 | ########################################### 8 | 9 | all: testgui 10 | 11 | CC=cc 12 | CXX=c++ 13 | COBJS=../libusb/hid.o 14 | CPPOBJS=test.o 15 | OBJS=$(COBJS) $(CPPOBJS) 16 | CFLAGS=-I../hidapi -I/usr/local/include `fox-config --cflags` -Wall -g -c 17 | LDFLAGS= -L/usr/local/lib 18 | LIBS= -lusb -liconv `fox-config --libs` -pthread 19 | 20 | 21 | testgui: $(OBJS) 22 | $(CXX) -Wall -g $^ $(LDFLAGS) -o $@ $(LIBS) 23 | 24 | $(COBJS): %.o: %.c 25 | $(CC) $(CFLAGS) $< -o $@ 26 | 27 | $(CPPOBJS): %.o: %.cpp 28 | $(CXX) $(CFLAGS) $< -o $@ 29 | 30 | clean: 31 | rm *.o testgui 32 | 33 | .PHONY: clean 34 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/testgui/Makefile.linux: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-06-01 7 | ########################################### 8 | 9 | all: testgui 10 | 11 | CC=gcc 12 | CXX=g++ 13 | COBJS=../libusb/hid.o 14 | CPPOBJS=test.o 15 | OBJS=$(COBJS) $(CPPOBJS) 16 | CFLAGS=-I../hidapi -Wall -g -c `fox-config --cflags` `pkg-config libusb-1.0 --cflags` 17 | LIBS=-ludev -lrt -lpthread `fox-config --libs` `pkg-config libusb-1.0 --libs` 18 | 19 | 20 | testgui: $(OBJS) 21 | g++ -Wall -g $^ $(LIBS) -o testgui 22 | 23 | $(COBJS): %.o: %.c 24 | $(CC) $(CFLAGS) $< -o $@ 25 | 26 | $(CPPOBJS): %.o: %.cpp 27 | $(CXX) $(CFLAGS) $< -o $@ 28 | 29 | clean: 30 | rm *.o testgui 31 | 32 | .PHONY: clean 33 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/testgui/Makefile.mingw: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-06-01 7 | ########################################### 8 | 9 | all: hidapi-testgui 10 | 11 | CC=gcc 12 | CXX=g++ 13 | COBJS=../windows/hid.o 14 | CPPOBJS=test.o 15 | OBJS=$(COBJS) $(CPPOBJS) 16 | CFLAGS=-I../hidapi -I../../hidapi-externals/fox/include -g -c 17 | LIBS= -mwindows -lsetupapi -L../../hidapi-externals/fox/lib -Wl,-Bstatic -lFOX-1.6 -Wl,-Bdynamic -lgdi32 -Wl,--enable-auto-import -static-libgcc -static-libstdc++ -lkernel32 18 | 19 | 20 | hidapi-testgui: $(OBJS) 21 | g++ -g $^ $(LIBS) -o hidapi-testgui 22 | 23 | $(COBJS): %.o: %.c 24 | $(CC) $(CFLAGS) $< -o $@ 25 | 26 | $(CPPOBJS): %.o: %.cpp 27 | $(CXX) $(CFLAGS) $< -o $@ 28 | 29 | clean: 30 | rm -f *.o hidapi-testgui.exe 31 | 32 | .PHONY: clean 33 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/testgui/TestGUI.app.in/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/testgui/TestGUI.app.in/Contents/Resources/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/src/hidapi/testgui/TestGUI.app.in/Contents/Resources/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/testgui/TestGUI.app.in/Contents/Resources/Signal11.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/src/hidapi/testgui/TestGUI.app.in/Contents/Resources/Signal11.icns -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/testgui/mac_support.h: -------------------------------------------------------------------------------- 1 | /******************************* 2 | Mac support for HID Test GUI 3 | 4 | Alan Ott 5 | Signal 11 Software 6 | 7 | *******************************/ 8 | 9 | #ifndef MAC_SUPPORT_H__ 10 | #define MAC_SUPPORT_H__ 11 | 12 | extern "C" { 13 | void init_apple_message_system(); 14 | void check_apple_events(); 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/testgui/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | xterm -e /Users/alan/work/hidapi/testgui/TestGUI.app/Contents/MacOS/tg 3 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/windows/Makefile-manual: -------------------------------------------------------------------------------- 1 | 2 | 3 | OS=$(shell uname) 4 | 5 | ifneq (,$(findstring MINGW,$(OS))) 6 | FILE=Makefile.mingw 7 | endif 8 | 9 | ifeq ($(FILE), ) 10 | all: 11 | $(error Your platform ${OS} is not supported at this time.) 12 | endif 13 | 14 | include $(FILE) 15 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/windows/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libhidapi.la 2 | libhidapi_la_SOURCES = hid.c 3 | libhidapi_la_LDFLAGS = $(LTLDFLAGS) 4 | AM_CPPFLAGS = -I$(top_srcdir)/hidapi/ 5 | libhidapi_la_LIBADD = $(LIBS) 6 | 7 | hdrdir = $(includedir)/hidapi 8 | hdr_HEADERS = $(top_srcdir)/hidapi/hidapi.h 9 | 10 | EXTRA_DIST = \ 11 | ddk_build \ 12 | hidapi.vcproj \ 13 | hidtest.vcproj \ 14 | Makefile-manual \ 15 | Makefile.mingw \ 16 | hidapi.sln 17 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/windows/Makefile.mingw: -------------------------------------------------------------------------------- 1 | ########################################### 2 | # Simple Makefile for HIDAPI test program 3 | # 4 | # Alan Ott 5 | # Signal 11 Software 6 | # 2010-06-01 7 | ########################################### 8 | 9 | all: hidtest libhidapi.dll 10 | 11 | CC=gcc 12 | CXX=g++ 13 | COBJS=hid.o 14 | CPPOBJS=../hidtest/hidtest.o 15 | OBJS=$(COBJS) $(CPPOBJS) 16 | CFLAGS=-I../hidapi -g -c 17 | LIBS= -lsetupapi 18 | DLL_LDFLAGS = -mwindows -lsetupapi 19 | 20 | hidtest: $(OBJS) 21 | g++ -g $^ $(LIBS) -o hidtest 22 | 23 | libhidapi.dll: $(OBJS) 24 | $(CC) -g $^ $(DLL_LDFLAGS) -o libhidapi.dll 25 | 26 | $(COBJS): %.o: %.c 27 | $(CC) $(CFLAGS) $< -o $@ 28 | 29 | $(CPPOBJS): %.o: %.cpp 30 | $(CXX) $(CFLAGS) $< -o $@ 31 | 32 | clean: 33 | rm *.o ../hidtest/*.o hidtest.exe 34 | 35 | .PHONY: clean 36 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/windows/ddk_build/hidapi.def: -------------------------------------------------------------------------------- 1 | LIBRARY hidapi 2 | EXPORTS 3 | hid_open @1 4 | hid_write @2 5 | hid_read @3 6 | hid_close @4 7 | hid_get_product_string @5 8 | hid_get_manufacturer_string @6 9 | hid_get_serial_number_string @7 10 | hid_get_indexed_string @8 11 | hid_error @9 12 | hid_set_nonblocking @10 13 | hid_enumerate @11 14 | hid_open_path @12 15 | hid_send_feature_report @13 16 | hid_get_feature_report @14 17 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/hidapi/windows/ddk_build/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=hidapi 2 | TARGETTYPE=DYNLINK 3 | UMTYPE=console 4 | UMENTRY=main 5 | 6 | MSC_WARNING_LEVEL=/W3 /WX 7 | 8 | TARGETLIBS=$(SDK_LIB_PATH)\hid.lib \ 9 | $(SDK_LIB_PATH)\setupapi.lib \ 10 | $(SDK_LIB_PATH)\kernel32.lib \ 11 | $(SDK_LIB_PATH)\comdlg32.lib 12 | 13 | USE_MSVCRT=1 14 | 15 | INCLUDES= ..\..\hidapi 16 | SOURCES= ..\hid.c \ 17 | 18 | 19 | TARGET_DESTINATION=retail 20 | 21 | MUI=0 22 | MUI_COMMENT="HID Interface DLL" 23 | 24 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/libm/s_copysign.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ==================================================== 3 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 4 | * 5 | * Developed at SunPro, a Sun Microsystems, Inc. business. 6 | * Permission to use, copy, modify, and distribute this 7 | * software is freely granted, provided that this notice 8 | * is preserved. 9 | * ==================================================== 10 | */ 11 | 12 | /* 13 | * copysign(double x, double y) 14 | * copysign(x,y) returns a value with the magnitude of x and 15 | * with the sign bit of y. 16 | */ 17 | 18 | #include "math_libm.h" 19 | #include "math_private.h" 20 | 21 | double copysign(double x, double y) 22 | { 23 | u_int32_t hx,hy; 24 | GET_HIGH_WORD(hx,x); 25 | GET_HIGH_WORD(hy,y); 26 | SET_HIGH_WORD(x,(hx&0x7fffffff)|(hy&0x80000000)); 27 | return x; 28 | } 29 | libm_hidden_def(copysign) 30 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/libm/s_fabs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * ==================================================== 3 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. 4 | * 5 | * Developed at SunPro, a Sun Microsystems, Inc. business. 6 | * Permission to use, copy, modify, and distribute this 7 | * software is freely granted, provided that this notice 8 | * is preserved. 9 | * ==================================================== 10 | */ 11 | 12 | /* 13 | * fabs(x) returns the absolute value of x. 14 | */ 15 | 16 | /*#include */ 17 | /* Prevent math.h from defining a colliding inline */ 18 | #undef __USE_EXTERN_INLINES 19 | #include "math_libm.h" 20 | #include "math_private.h" 21 | 22 | double fabs(double x) 23 | { 24 | u_int32_t high; 25 | GET_HIGH_WORD(high,x); 26 | SET_HIGH_WORD(x,high&0x7fffffff); 27 | return x; 28 | } 29 | libm_hidden_def(fabs) 30 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/main/android/SDL_android_main.c: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_android_main.c, placed in the public domain by Sam Lantinga 3/13/14 3 | 4 | As of SDL 2.0.6 this file is no longer necessary. 5 | */ 6 | 7 | /* vi: set ts=4 sw=4 expandtab: */ 8 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/main/dummy/SDL_dummy_main.c: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_dummy_main.c, placed in the public domain by Sam Lantinga 3/13/14 3 | */ 4 | #include "../../SDL_internal.h" 5 | 6 | /* Include the SDL main definition header */ 7 | #include "SDL_main.h" 8 | 9 | #ifdef main 10 | #undef main 11 | int main(int argc, char *argv[]) 12 | { 13 | return SDL_main(argc, argv); 14 | } 15 | #else 16 | /* Nothing to do on this platform */ 17 | int SDL_main_stub_symbol(void) 18 | { 19 | return 0; 20 | } 21 | #endif 22 | 23 | /* vi: set ts=4 sw=4 expandtab: */ 24 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/main/uikit/SDL_uikit_main.c: -------------------------------------------------------------------------------- 1 | /* 2 | SDL_uikit_main.c, placed in the public domain by Sam Lantinga 3/18/2019 3 | */ 4 | 5 | /* Include the SDL main definition header */ 6 | #include "SDL_main.h" 7 | 8 | #if defined(__IPHONEOS__) || defined(__TVOS__) 9 | 10 | #ifndef SDL_MAIN_HANDLED 11 | #ifdef main 12 | #undef main 13 | #endif 14 | 15 | int main(int argc, char *argv[]) 16 | { 17 | return SDL_UIKitRunApp(argc, argv, SDL_main); 18 | } 19 | #endif /* !SDL_MAIN_HANDLED */ 20 | 21 | #endif /* __IPHONEOS__ || __TVOS__ */ 22 | 23 | /* vi: set ts=4 sw=4 expandtab: */ 24 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/main/winrt/SDL2-WinRTResource_BlankCursor.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/lib/sdl2/src/src/main/winrt/SDL2-WinRTResource_BlankCursor.cur -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/main/winrt/SDL2-WinRTResources.rc: -------------------------------------------------------------------------------- 1 | #include "winres.h" 2 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 3 | 5000 CURSOR "SDL2-WinRTResource_BlankCursor.cur" 4 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/render/vitagxm/shader_src/clear_f.cg: -------------------------------------------------------------------------------- 1 | float4 main( uniform float4 uClearColor) : COLOR 2 | { 3 | return uClearColor; 4 | } 5 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/render/vitagxm/shader_src/clear_v.cg: -------------------------------------------------------------------------------- 1 | float4 main(float2 aPosition) : POSITION 2 | { 3 | return float4(aPosition, 1.f, 1.f); 4 | } 5 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/render/vitagxm/shader_src/color_f.cg: -------------------------------------------------------------------------------- 1 | float4 main(float4 vColor : COLOR) 2 | { 3 | return vColor; 4 | } 5 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/render/vitagxm/shader_src/color_v.cg: -------------------------------------------------------------------------------- 1 | void main( 2 | float2 aPosition, 3 | float4 aColor, 4 | uniform float4x4 wvp, 5 | out float4 vPosition : POSITION, 6 | out float4 vColor : COLOR, 7 | out float pSize : PSIZE 8 | ) 9 | { 10 | vPosition = mul(float4(aPosition, 1.f, 0.5f), wvp); 11 | vColor = aColor; 12 | pSize = 1.f; 13 | } 14 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/render/vitagxm/shader_src/texture_f.cg: -------------------------------------------------------------------------------- 1 | float4 main(float2 vTexcoord : TEXCOORD0, float4 vColor : COLOR, uniform sampler2D tex) 2 | { 3 | return tex2D(tex, vTexcoord) * vColor; 4 | } 5 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/render/vitagxm/shader_src/texture_v.cg: -------------------------------------------------------------------------------- 1 | void main( 2 | float2 aPosition, 3 | float2 aTexcoord, 4 | float4 aColor, 5 | uniform float4x4 wvp, 6 | out float4 vPosition : POSITION, 7 | out float4 vColor : COLOR, 8 | out float2 vTexcoord : TEXCOORD0 9 | ) 10 | { 11 | vPosition = mul(float4(aPosition, 1.f, 0.5f), wvp); 12 | vTexcoord = aTexcoord; 13 | vColor = aColor; 14 | } 15 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/video/khronos/GLES2/gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* 5 | ** Copyright 2017-2020 The Khronos Group Inc. 6 | ** SPDX-License-Identifier: Apache-2.0 7 | */ 8 | 9 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 10 | * 11 | * Adopters may modify khrplatform.h and this file to suit their platform. 12 | * Please contribute modifications back to Khronos as pull requests on the 13 | * public github repository: 14 | * https://github.com/KhronosGroup/OpenGL-Registry 15 | */ 16 | 17 | #include 18 | 19 | #ifndef GL_APICALL 20 | #define GL_APICALL KHRONOS_APICALL 21 | #endif 22 | 23 | #ifndef GL_APIENTRY 24 | #define GL_APIENTRY KHRONOS_APIENTRY 25 | #endif 26 | 27 | #endif /* __gl2platform_h_ */ 28 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/video/khronos/vk_video/vulkan_video_codecs_common.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_VIDEO_CODECS_COMMON_H_ 2 | #define VULKAN_VIDEO_CODECS_COMMON_H_ 1 3 | 4 | /* 5 | ** Copyright 2015-2024 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | // vulkan_video_codecs_common is a preprocessor guard. Do not pass it to API calls. 23 | #define vulkan_video_codecs_common 1 24 | #if !defined(VK_NO_STDINT_H) 25 | #include 26 | #endif 27 | 28 | #define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \ 29 | ((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch))) 30 | 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/src/video/yuv2rgb/yuv_rgb_common.h: -------------------------------------------------------------------------------- 1 | #ifndef YUV_RGB_COMMON_H_ 2 | #define YUV_RGB_COMMON_H_ 3 | // Copyright 2016 Adrien Descamps 4 | // Distributed under BSD 3-Clause License 5 | 6 | typedef enum 7 | { 8 | YCBCR_JPEG, 9 | YCBCR_601, 10 | YCBCR_709 11 | } YCbCrType; 12 | 13 | #endif /* YUV_RGB_COMMON_H_ */ 14 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cp acinclude.m4 aclocal.m4 4 | 5 | if test "$AUTOCONF"x = x; then 6 | AUTOCONF=autoconf 7 | fi 8 | 9 | $AUTOCONF || exit 1 10 | rm aclocal.m4 11 | rm -rf autom4te.cache 12 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/configs/testsprite2_blendmodes/testsprite2_blendmodes.actions: -------------------------------------------------------------------------------- 1 | 00:00:03 SCREENSHOT 2 | 00:00:06 VERIFY 3 | 00:00:09 QUIT -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/configs/testsprite2_blendmodes/testsprite2_blendmodes.config: -------------------------------------------------------------------------------- 1 | parameter-config=testsprite2_blendmodes.parameters 2 | variator=exhaustive 3 | sutapp=testsprite2 4 | timeout=00:00:15 5 | action-config=testsprite2_blendmodes.actions -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/configs/testsprite2_blendmodes/testsprite2_blendmodes.parameters: -------------------------------------------------------------------------------- 1 | # parameter name, type, value range, required, categories 2 | --blend, enum, [none blend add mod], false, [] 3 | --cyclecolor, boolean, [], false, [] 4 | --cyclealpha, boolean, [], false, [] 5 | --iterations, integer, [1000 1000], true, [] -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/configs/testsprite2_crashtest/testsprite2_crashtest.actions: -------------------------------------------------------------------------------- 1 | 00:00:02 QUIT -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/configs/testsprite2_crashtest/testsprite2_crashtest.config: -------------------------------------------------------------------------------- 1 | parameter-config=testsprite2_crashtest.parameters 2 | variator=exhaustive 3 | sutapp=testsprite2 4 | timeout=00:00:10 5 | action-config=testsprite2_crashtest.actions -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/configs/testsprite2_fullscreen/testsprite2_fullscreen.actions: -------------------------------------------------------------------------------- 1 | 00:00:03 SCREENSHOT 2 | 00:00:06 VERIFY 3 | 00:00:09 QUIT -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/configs/testsprite2_fullscreen/testsprite2_fullscreen.config: -------------------------------------------------------------------------------- 1 | parameter-config=testsprite2_fullscreen.parameters 2 | variator=exhaustive 3 | sutapp=testsprite2 4 | timeout=00:00:15 5 | action-config=testsprite2_fullscreen.actions -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/configs/testsprite2_fullscreen/testsprite2_fullscreen.parameters: -------------------------------------------------------------------------------- 1 | # parameter name, type, value range, required, categories 2 | --blend, enum, [none blend add mod], false, [] 3 | --fullscreen, boolean, [], false, [] 4 | --fullscreen-desktop, boolean, [], false, [] 5 | --iterations, integer, [1000 1000], true, [] -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/configs/testsprite2_geometry/testsprite2_geometry.actions: -------------------------------------------------------------------------------- 1 | 00:00:03 SCREENSHOT 2 | 00:00:06 VERIFY 3 | 00:00:09 QUIT -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/configs/testsprite2_geometry/testsprite2_geometry.config: -------------------------------------------------------------------------------- 1 | parameter-config=testsprite2_geometry.parameters 2 | variator=exhaustive 3 | sutapp=testsprite2 4 | timeout=00:00:15 5 | action-config=testsprite2_geometry.actions -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/configs/testsprite2_geometry/testsprite2_geometry.parameters: -------------------------------------------------------------------------------- 1 | # parameter name, type, value range, required, categories 2 | --geometry, enum, [500x500 600x600], false, [] 3 | --logical, enum, [300x500 550x450], false, [] 4 | --scale, integer, [1 5], false, [] 5 | --iterations, integer, [1000 1000], true, [] -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/include/SDL_visualtest_mischelper.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file mischelper.c 3 | * 4 | * Header with miscellaneous helper functions. 5 | */ 6 | 7 | #ifndef SDL_visualtest_mischelper_h_ 8 | #define SDL_visualtest_mischelper_h_ 9 | 10 | /* Set up for C function definitions, even when using C++ */ 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /** 16 | * Stores a 32 digit hexadecimal string representing the MD5 hash of the 17 | * string \c str in \c hash. 18 | */ 19 | void SDLVisualTest_HashString(char* str, char hash[33]); 20 | 21 | /* Ends C function definitions when using C++ */ 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif /* SDL_visualtest_mischelper_h_ */ 27 | 28 | /* vi: set ts=4 sw=4 expandtab: */ 29 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/launch_harness.cmd: -------------------------------------------------------------------------------- 1 | start /wait testharness.exe --config testsprite2_crashtest.config > testrun.log 2>&1 2 | if %ERRORLEVEL% NEQ 0 echo TEST RUN FAILED (see testrun.log) -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/launch_harness.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./testharness.exe --config testsprite2_crashtest.config > testrun.log 2>&1 3 | if [ "$?" != "0" ]; then 4 | echo TEST RUN FAILED (see testrun.log) 5 | # report error code to CI 6 | fi -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/src/mischelper.c: -------------------------------------------------------------------------------- 1 | /** 2 | * \file mischelper.c 3 | * 4 | * Source file with miscellaneous helper functions. 5 | */ 6 | 7 | #include 8 | 9 | void 10 | SDLVisualTest_HashString(char* str, char hash[33]) 11 | { 12 | SDLTest_Md5Context md5c; 13 | int i; 14 | 15 | if(!str) 16 | { 17 | SDLTest_LogError("str argument cannot be NULL"); 18 | return; 19 | } 20 | 21 | SDLTest_Md5Init(&md5c); 22 | SDLTest_Md5Update(&md5c, (unsigned char*)str, SDL_strlen(str)); 23 | SDLTest_Md5Final(&md5c); 24 | 25 | /* convert the md5 hash to an array of hexadecimal digits */ 26 | for(i = 0; i < 16; i++) 27 | SDL_snprintf(hash + 2 * i, 33 - 2 * i, "%02x", (int)md5c.digest[i]); 28 | } 29 | -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/testsprite2_sample.actions: -------------------------------------------------------------------------------- 1 | 00:00:02 SCREENSHOT # Take a screenshot of each window owned by the SUT process 2 | 00:00:05 VERIFY # Verify each screenshot taken with verification images 3 | 00:00:10 QUIT # Gracefully quit the SUT process -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/testsprite2_sample.config: -------------------------------------------------------------------------------- 1 | parameter-config=testsprite2_sample.parameters 2 | num-variations=10 3 | variator=random 4 | sutapp=testsprite2 5 | timeout=00:00:20 6 | action-config=testsprite2_sample.actions -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/unittest/testquit.actions: -------------------------------------------------------------------------------- 1 | 00:00:05 QUIT -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/unittest/testquit.config: -------------------------------------------------------------------------------- 1 | sutconfig=testquit.parameters 2 | action-config=testquit.actions 3 | variator=exhaustive 4 | sutapp=testquit 5 | timeout=00:00:10 -------------------------------------------------------------------------------- /src/lib/sdl2/src/visualtest/unittest/testquit.parameters: -------------------------------------------------------------------------------- 1 | --exit-code, integer, [-1 1], false, [] # The exit code returned by the executable 2 | --crash, boolean, [], false, [] # Crashes the SUT executable 3 | --hang, boolean, [], false, [] # Runs the SUT in the infinite loop and ignores all events -------------------------------------------------------------------------------- /src/lib/stb/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR) 2 | project(bstone_lib_stb VERSION 1.0.0 LANGUAGES NONE) 3 | 4 | message(STATUS "[bstone_lib_stb] v${PROJECT_VERSION}") 5 | 6 | add_library(bstone_lib_stb INTERFACE) 7 | add_library(bstone::lib::stb ALIAS bstone_lib_stb) 8 | 9 | target_include_directories(bstone_lib_stb INTERFACE include) 10 | -------------------------------------------------------------------------------- /src/lib/xbrz/bstone_changelog.txt: -------------------------------------------------------------------------------- 1 | Changes made to compile with BStone. 2 | 3 | - Changed text encoding of `xbrz.cpp` from Windows-1250 (?) to UTF-8. 4 | - Made the code compatible with C++14. Look up `BStone` for changes. 5 | - Add CMake project. 6 | -------------------------------------------------------------------------------- /src/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR) 2 | 3 | add_subdirectory(src/process) 4 | add_subdirectory(src/shared_library) 5 | add_subdirectory(src/tests) 6 | -------------------------------------------------------------------------------- /src/tests/src/shared_library/include/bstone_tests_shared_library.h: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "bstone_platform.h" 8 | 9 | extern "C" BSTONE_EXPORT int api_function(); 10 | -------------------------------------------------------------------------------- /src/tests/src/shared_library/src/bstone_tests_shared_library.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include "bstone_tests_shared_library.h" 8 | 9 | BSTONE_EXPORT int api_function() 10 | { 11 | return 42; 12 | } 13 | -------------------------------------------------------------------------------- /src/tests/src/tests/data/bstone_tests_tag.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/src/tests/src/tests/data/bstone_tests_tag.txt -------------------------------------------------------------------------------- /src/tests/src/tests/src/bstone_tests.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | BStone: Unofficial source port of Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 3 | Copyright (c) 2023-2024 Boris I. Bendovsky (bibendovsky@hotmail.com) and Contributors 4 | SPDX-License-Identifier: MIT 5 | */ 6 | 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | #include "bstone_tester.h" 13 | 14 | int main(int, char*[]) 15 | try 16 | { 17 | auto tester = bstone::Tester{}; 18 | const auto is_succeeded = tester.test(); 19 | return is_succeeded ? EXIT_SUCCESS : EXIT_FAILURE; 20 | } 21 | catch (const std::exception& exception) 22 | { 23 | std::cerr << "[ERROR] " << exception.what() << std::endl; 24 | return EXIT_FAILURE; 25 | } 26 | catch (...) 27 | { 28 | std::cerr << "[ERROR] Generic failure." << std::endl; 29 | return EXIT_FAILURE; 30 | } 31 | -------------------------------------------------------------------------------- /src/tests/src/tests/src/bstone_tests_configurations.cpp: -------------------------------------------------------------------------------- 1 | #include "bstone_configurations.h" 2 | 3 | namespace bstone { 4 | 5 | extern const std::intptr_t posix_string_capacity = 256 * 1024; 6 | extern const std::intptr_t win32_wstring_capacity = 256 * 1024; 7 | 8 | } // namespace bstone 9 | -------------------------------------------------------------------------------- /src/tools/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR) 2 | 3 | add_subdirectory(ltrimcs) 4 | add_subdirectory(glapigen) 5 | -------------------------------------------------------------------------------- /src/tools/glapigen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR) 2 | project(bstone_glapigen VERSION 1.0.0 LANGUAGES CXX) 3 | 4 | message(STATUS "[bstone_glapigen] v${PROJECT_VERSION}") 5 | 6 | add_executable(bstone_glapigen src/bstone_glapigen.cpp) 7 | 8 | set_target_properties(bstone_glapigen PROPERTIES 9 | CXX_STANDARD 14 10 | CXX_STANDARD_REQUIRED ON 11 | CXX_EXTENSIONS OFF 12 | ) 13 | 14 | target_compile_definitions(bstone_glapigen 15 | PRIVATE 16 | "CMAKE_PROJECT_NAME=\"${PROJECT_NAME}\"" 17 | "CMAKE_PROJECT_VERSION=\"${PROJECT_VERSION}\"" 18 | ) 19 | 20 | target_compile_options(bstone_glapigen 21 | PRIVATE 22 | $<$:/W4> 23 | $<$>:-Wall -Wextra -pedantic> 24 | ) 25 | -------------------------------------------------------------------------------- /src/tools/ltrimcs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5.0 FATAL_ERROR) 2 | project(bstone_ltrimcs VERSION 1.0.0 LANGUAGES CXX) 3 | 4 | message(STATUS "[bstone_ltrimcs] v${PROJECT_VERSION}") 5 | 6 | add_executable(bstone_ltrimcs src/bstone_ltrimcs.cpp) 7 | 8 | set_target_properties(bstone_ltrimcs PROPERTIES 9 | CXX_STANDARD 14 10 | CXX_STANDARD_REQUIRED ON 11 | CXX_EXTENSIONS OFF 12 | ) 13 | 14 | target_compile_options(bstone_ltrimcs 15 | PRIVATE 16 | $<$:/W4> 17 | $<$>:-Wall -Wextra -pedantic> 18 | ) 19 | -------------------------------------------------------------------------------- /unsupported/psvita/src/vita/sce_sys/icon0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/unsupported/psvita/src/vita/sce_sys/icon0.png -------------------------------------------------------------------------------- /unsupported/psvita/src/vita/sce_sys/livearea/contents/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/unsupported/psvita/src/vita/sce_sys/livearea/contents/bg.png -------------------------------------------------------------------------------- /unsupported/psvita/src/vita/sce_sys/livearea/contents/ps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/unsupported/psvita/src/vita/sce_sys/livearea/contents/ps.png -------------------------------------------------------------------------------- /unsupported/psvita/src/vita/sce_sys/livearea/contents/startup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bibendovsky/bstone/83cd4c3f0123c23aa1f629c61697923fa956964c/unsupported/psvita/src/vita/sce_sys/livearea/contents/startup.png -------------------------------------------------------------------------------- /unsupported/psvita/src/vita/sce_sys/livearea/contents/template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | bg.png 6 | 7 | 8 | 9 | startup.png 10 | 11 | 12 | 13 | 14 | psla:--ps 15 | ps.png 16 | 17 | 0.3 18 | 19 | 20 | 21 | 22 | --------------------------------------------------------------------------------