├── .gitattributes ├── .gitignore ├── .travis.yml ├── 3rdParty ├── PKWare │ ├── Makefile │ ├── PKWare.vcxproj │ ├── PKWare.vcxproj.filters │ ├── Pkware.dsp │ ├── explode.cpp │ ├── implode.cpp │ └── pkware.h ├── Radon │ ├── LICENSE │ └── Radon │ │ ├── include │ │ ├── File.hpp │ │ ├── Key.hpp │ │ ├── Named.hpp │ │ ├── Radon.hpp │ │ └── Section.hpp │ │ └── source │ │ ├── File.cpp │ │ ├── Key.cpp │ │ ├── Named.cpp │ │ └── Section.cpp ├── Storm │ ├── Makefile │ └── Source │ │ ├── Storm.dsp │ │ ├── Storm.vcxproj │ │ ├── storm.cpp │ │ ├── storm.def │ │ ├── storm.h │ │ └── storm_gcc.def ├── StormLib │ ├── LICENSE │ ├── README │ └── src │ │ ├── FileStream.cpp │ │ ├── FileStream.h │ │ ├── SBaseCommon.cpp │ │ ├── SBaseFileTable.cpp │ │ ├── SBaseSubTypes.cpp │ │ ├── SCompression.cpp │ │ ├── SFileExtractFile.cpp │ │ ├── SFileFindFile.cpp │ │ ├── SFileGetFileInfo.cpp │ │ ├── SFileOpenArchive.cpp │ │ ├── SFileOpenFileEx.cpp │ │ ├── SFileReadFile.cpp │ │ ├── StormCommon.h │ │ ├── StormLib.h │ │ └── StormPort.h ├── asio │ ├── LICENSE_1_0.txt │ ├── README │ └── include │ │ ├── asio.hpp │ │ └── asio │ │ ├── associated_allocator.hpp │ │ ├── associated_executor.hpp │ │ ├── async_result.hpp │ │ ├── basic_datagram_socket.hpp │ │ ├── basic_deadline_timer.hpp │ │ ├── basic_io_object.hpp │ │ ├── basic_raw_socket.hpp │ │ ├── basic_seq_packet_socket.hpp │ │ ├── basic_serial_port.hpp │ │ ├── basic_signal_set.hpp │ │ ├── basic_socket.hpp │ │ ├── basic_socket_acceptor.hpp │ │ ├── basic_socket_iostream.hpp │ │ ├── basic_socket_streambuf.hpp │ │ ├── basic_stream_socket.hpp │ │ ├── basic_streambuf.hpp │ │ ├── basic_streambuf_fwd.hpp │ │ ├── basic_waitable_timer.hpp │ │ ├── bind_executor.hpp │ │ ├── buffer.hpp │ │ ├── buffered_read_stream.hpp │ │ ├── buffered_read_stream_fwd.hpp │ │ ├── buffered_stream.hpp │ │ ├── buffered_stream_fwd.hpp │ │ ├── buffered_write_stream.hpp │ │ ├── buffered_write_stream_fwd.hpp │ │ ├── buffers_iterator.hpp │ │ ├── completion_condition.hpp │ │ ├── connect.hpp │ │ ├── coroutine.hpp │ │ ├── datagram_socket_service.hpp │ │ ├── deadline_timer.hpp │ │ ├── deadline_timer_service.hpp │ │ ├── defer.hpp │ │ ├── detail │ │ ├── array.hpp │ │ ├── array_fwd.hpp │ │ ├── assert.hpp │ │ ├── atomic_count.hpp │ │ ├── base_from_completion_cond.hpp │ │ ├── bind_handler.hpp │ │ ├── buffer_resize_guard.hpp │ │ ├── buffer_sequence_adapter.hpp │ │ ├── buffered_stream_storage.hpp │ │ ├── call_stack.hpp │ │ ├── chrono.hpp │ │ ├── chrono_time_traits.hpp │ │ ├── completion_handler.hpp │ │ ├── concurrency_hint.hpp │ │ ├── conditionally_enabled_event.hpp │ │ ├── conditionally_enabled_mutex.hpp │ │ ├── config.hpp │ │ ├── consuming_buffers.hpp │ │ ├── cstddef.hpp │ │ ├── cstdint.hpp │ │ ├── date_time_fwd.hpp │ │ ├── deadline_timer_service.hpp │ │ ├── dependent_type.hpp │ │ ├── descriptor_ops.hpp │ │ ├── descriptor_read_op.hpp │ │ ├── descriptor_write_op.hpp │ │ ├── dev_poll_reactor.hpp │ │ ├── epoll_reactor.hpp │ │ ├── event.hpp │ │ ├── eventfd_select_interrupter.hpp │ │ ├── executor_op.hpp │ │ ├── fd_set_adapter.hpp │ │ ├── fenced_block.hpp │ │ ├── functional.hpp │ │ ├── future.hpp │ │ ├── gcc_arm_fenced_block.hpp │ │ ├── gcc_hppa_fenced_block.hpp │ │ ├── gcc_sync_fenced_block.hpp │ │ ├── gcc_x86_fenced_block.hpp │ │ ├── global.hpp │ │ ├── handler_alloc_helpers.hpp │ │ ├── handler_cont_helpers.hpp │ │ ├── handler_invoke_helpers.hpp │ │ ├── handler_tracking.hpp │ │ ├── handler_type_requirements.hpp │ │ ├── handler_work.hpp │ │ ├── hash_map.hpp │ │ ├── impl │ │ │ ├── buffer_sequence_adapter.ipp │ │ │ ├── descriptor_ops.ipp │ │ │ ├── dev_poll_reactor.hpp │ │ │ ├── dev_poll_reactor.ipp │ │ │ ├── epoll_reactor.hpp │ │ │ ├── epoll_reactor.ipp │ │ │ ├── eventfd_select_interrupter.ipp │ │ │ ├── handler_tracking.ipp │ │ │ ├── kqueue_reactor.hpp │ │ │ ├── kqueue_reactor.ipp │ │ │ ├── null_event.ipp │ │ │ ├── pipe_select_interrupter.ipp │ │ │ ├── posix_event.ipp │ │ │ ├── posix_mutex.ipp │ │ │ ├── posix_thread.ipp │ │ │ ├── posix_tss_ptr.ipp │ │ │ ├── reactive_descriptor_service.ipp │ │ │ ├── reactive_serial_port_service.ipp │ │ │ ├── reactive_socket_service_base.ipp │ │ │ ├── resolver_service_base.ipp │ │ │ ├── scheduler.ipp │ │ │ ├── select_reactor.hpp │ │ │ ├── select_reactor.ipp │ │ │ ├── service_registry.hpp │ │ │ ├── service_registry.ipp │ │ │ ├── signal_set_service.ipp │ │ │ ├── socket_ops.ipp │ │ │ ├── socket_select_interrupter.ipp │ │ │ ├── strand_executor_service.hpp │ │ │ ├── strand_executor_service.ipp │ │ │ ├── strand_service.hpp │ │ │ ├── strand_service.ipp │ │ │ ├── throw_error.ipp │ │ │ ├── timer_queue_ptime.ipp │ │ │ ├── timer_queue_set.ipp │ │ │ ├── win_event.ipp │ │ │ ├── win_iocp_handle_service.ipp │ │ │ ├── win_iocp_io_context.hpp │ │ │ ├── win_iocp_io_context.ipp │ │ │ ├── win_iocp_serial_port_service.ipp │ │ │ ├── win_iocp_socket_service_base.ipp │ │ │ ├── win_mutex.ipp │ │ │ ├── win_object_handle_service.ipp │ │ │ ├── win_static_mutex.ipp │ │ │ ├── win_thread.ipp │ │ │ ├── win_tss_ptr.ipp │ │ │ ├── winrt_ssocket_service_base.ipp │ │ │ ├── winrt_timer_scheduler.hpp │ │ │ ├── winrt_timer_scheduler.ipp │ │ │ └── winsock_init.ipp │ │ ├── io_control.hpp │ │ ├── is_buffer_sequence.hpp │ │ ├── is_executor.hpp │ │ ├── keyword_tss_ptr.hpp │ │ ├── kqueue_reactor.hpp │ │ ├── limits.hpp │ │ ├── local_free_on_block_exit.hpp │ │ ├── macos_fenced_block.hpp │ │ ├── memory.hpp │ │ ├── mutex.hpp │ │ ├── noncopyable.hpp │ │ ├── null_event.hpp │ │ ├── null_fenced_block.hpp │ │ ├── null_global.hpp │ │ ├── null_mutex.hpp │ │ ├── null_reactor.hpp │ │ ├── null_signal_blocker.hpp │ │ ├── null_socket_service.hpp │ │ ├── null_static_mutex.hpp │ │ ├── null_thread.hpp │ │ ├── null_tss_ptr.hpp │ │ ├── object_pool.hpp │ │ ├── old_win_sdk_compat.hpp │ │ ├── op_queue.hpp │ │ ├── operation.hpp │ │ ├── pipe_select_interrupter.hpp │ │ ├── pop_options.hpp │ │ ├── posix_event.hpp │ │ ├── posix_fd_set_adapter.hpp │ │ ├── posix_global.hpp │ │ ├── posix_mutex.hpp │ │ ├── posix_signal_blocker.hpp │ │ ├── posix_static_mutex.hpp │ │ ├── posix_thread.hpp │ │ ├── posix_tss_ptr.hpp │ │ ├── push_options.hpp │ │ ├── reactive_descriptor_service.hpp │ │ ├── reactive_null_buffers_op.hpp │ │ ├── reactive_serial_port_service.hpp │ │ ├── reactive_socket_accept_op.hpp │ │ ├── reactive_socket_connect_op.hpp │ │ ├── reactive_socket_recv_op.hpp │ │ ├── reactive_socket_recvfrom_op.hpp │ │ ├── reactive_socket_recvmsg_op.hpp │ │ ├── reactive_socket_send_op.hpp │ │ ├── reactive_socket_sendto_op.hpp │ │ ├── reactive_socket_service.hpp │ │ ├── reactive_socket_service_base.hpp │ │ ├── reactive_wait_op.hpp │ │ ├── reactor.hpp │ │ ├── reactor_fwd.hpp │ │ ├── reactor_op.hpp │ │ ├── reactor_op_queue.hpp │ │ ├── recycling_allocator.hpp │ │ ├── regex_fwd.hpp │ │ ├── resolve_endpoint_op.hpp │ │ ├── resolve_op.hpp │ │ ├── resolve_query_op.hpp │ │ ├── resolver_service.hpp │ │ ├── resolver_service_base.hpp │ │ ├── scheduler.hpp │ │ ├── scheduler_operation.hpp │ │ ├── scheduler_thread_info.hpp │ │ ├── scoped_lock.hpp │ │ ├── scoped_ptr.hpp │ │ ├── select_interrupter.hpp │ │ ├── select_reactor.hpp │ │ ├── service_registry.hpp │ │ ├── signal_blocker.hpp │ │ ├── signal_handler.hpp │ │ ├── signal_init.hpp │ │ ├── signal_op.hpp │ │ ├── signal_set_service.hpp │ │ ├── socket_holder.hpp │ │ ├── socket_ops.hpp │ │ ├── socket_option.hpp │ │ ├── socket_select_interrupter.hpp │ │ ├── socket_types.hpp │ │ ├── solaris_fenced_block.hpp │ │ ├── static_mutex.hpp │ │ ├── std_event.hpp │ │ ├── std_fenced_block.hpp │ │ ├── std_global.hpp │ │ ├── std_mutex.hpp │ │ ├── std_static_mutex.hpp │ │ ├── std_thread.hpp │ │ ├── strand_executor_service.hpp │ │ ├── strand_service.hpp │ │ ├── string_view.hpp │ │ ├── thread.hpp │ │ ├── thread_context.hpp │ │ ├── thread_group.hpp │ │ ├── thread_info_base.hpp │ │ ├── throw_error.hpp │ │ ├── throw_exception.hpp │ │ ├── timer_queue.hpp │ │ ├── timer_queue_base.hpp │ │ ├── timer_queue_ptime.hpp │ │ ├── timer_queue_set.hpp │ │ ├── timer_scheduler.hpp │ │ ├── timer_scheduler_fwd.hpp │ │ ├── tss_ptr.hpp │ │ ├── type_traits.hpp │ │ ├── variadic_templates.hpp │ │ ├── wait_handler.hpp │ │ ├── wait_op.hpp │ │ ├── win_event.hpp │ │ ├── win_fd_set_adapter.hpp │ │ ├── win_fenced_block.hpp │ │ ├── win_global.hpp │ │ ├── win_iocp_handle_read_op.hpp │ │ ├── win_iocp_handle_service.hpp │ │ ├── win_iocp_handle_write_op.hpp │ │ ├── win_iocp_io_context.hpp │ │ ├── win_iocp_null_buffers_op.hpp │ │ ├── win_iocp_operation.hpp │ │ ├── win_iocp_overlapped_op.hpp │ │ ├── win_iocp_overlapped_ptr.hpp │ │ ├── win_iocp_serial_port_service.hpp │ │ ├── win_iocp_socket_accept_op.hpp │ │ ├── win_iocp_socket_connect_op.hpp │ │ ├── win_iocp_socket_recv_op.hpp │ │ ├── win_iocp_socket_recvfrom_op.hpp │ │ ├── win_iocp_socket_recvmsg_op.hpp │ │ ├── win_iocp_socket_send_op.hpp │ │ ├── win_iocp_socket_service.hpp │ │ ├── win_iocp_socket_service_base.hpp │ │ ├── win_iocp_thread_info.hpp │ │ ├── win_iocp_wait_op.hpp │ │ ├── win_mutex.hpp │ │ ├── win_object_handle_service.hpp │ │ ├── win_static_mutex.hpp │ │ ├── win_thread.hpp │ │ ├── win_tss_ptr.hpp │ │ ├── winapp_thread.hpp │ │ ├── wince_thread.hpp │ │ ├── winrt_async_manager.hpp │ │ ├── winrt_async_op.hpp │ │ ├── winrt_resolve_op.hpp │ │ ├── winrt_resolver_service.hpp │ │ ├── winrt_socket_connect_op.hpp │ │ ├── winrt_socket_recv_op.hpp │ │ ├── winrt_socket_send_op.hpp │ │ ├── winrt_ssocket_service.hpp │ │ ├── winrt_ssocket_service_base.hpp │ │ ├── winrt_timer_scheduler.hpp │ │ ├── winrt_utils.hpp │ │ ├── winsock_init.hpp │ │ ├── work_dispatcher.hpp │ │ └── wrapped_handler.hpp │ │ ├── dispatch.hpp │ │ ├── error.hpp │ │ ├── error_code.hpp │ │ ├── execution_context.hpp │ │ ├── executor.hpp │ │ ├── executor_work_guard.hpp │ │ ├── experimental.hpp │ │ ├── experimental │ │ ├── co_spawn.hpp │ │ ├── detached.hpp │ │ ├── impl │ │ │ ├── co_spawn.hpp │ │ │ ├── detached.hpp │ │ │ └── redirect_error.hpp │ │ └── redirect_error.hpp │ │ ├── generic │ │ ├── basic_endpoint.hpp │ │ ├── datagram_protocol.hpp │ │ ├── detail │ │ │ ├── endpoint.hpp │ │ │ └── impl │ │ │ │ └── endpoint.ipp │ │ ├── raw_protocol.hpp │ │ ├── seq_packet_protocol.hpp │ │ └── stream_protocol.hpp │ │ ├── handler_alloc_hook.hpp │ │ ├── handler_continuation_hook.hpp │ │ ├── handler_invoke_hook.hpp │ │ ├── handler_type.hpp │ │ ├── high_resolution_timer.hpp │ │ ├── impl │ │ ├── buffered_read_stream.hpp │ │ ├── buffered_write_stream.hpp │ │ ├── connect.hpp │ │ ├── defer.hpp │ │ ├── dispatch.hpp │ │ ├── error.ipp │ │ ├── error_code.ipp │ │ ├── execution_context.hpp │ │ ├── execution_context.ipp │ │ ├── executor.hpp │ │ ├── executor.ipp │ │ ├── handler_alloc_hook.ipp │ │ ├── io_context.hpp │ │ ├── io_context.ipp │ │ ├── post.hpp │ │ ├── read.hpp │ │ ├── read_at.hpp │ │ ├── read_until.hpp │ │ ├── serial_port_base.hpp │ │ ├── serial_port_base.ipp │ │ ├── spawn.hpp │ │ ├── src.cpp │ │ ├── src.hpp │ │ ├── system_context.hpp │ │ ├── system_context.ipp │ │ ├── system_executor.hpp │ │ ├── thread_pool.hpp │ │ ├── thread_pool.ipp │ │ ├── use_future.hpp │ │ ├── write.hpp │ │ └── write_at.hpp │ │ ├── io_context.hpp │ │ ├── io_context_strand.hpp │ │ ├── io_service.hpp │ │ ├── io_service_strand.hpp │ │ ├── ip │ │ ├── address.hpp │ │ ├── address_v4.hpp │ │ ├── address_v4_iterator.hpp │ │ ├── address_v4_range.hpp │ │ ├── address_v6.hpp │ │ ├── address_v6_iterator.hpp │ │ ├── address_v6_range.hpp │ │ ├── bad_address_cast.hpp │ │ ├── basic_endpoint.hpp │ │ ├── basic_resolver.hpp │ │ ├── basic_resolver_entry.hpp │ │ ├── basic_resolver_iterator.hpp │ │ ├── basic_resolver_query.hpp │ │ ├── basic_resolver_results.hpp │ │ ├── detail │ │ │ ├── endpoint.hpp │ │ │ ├── impl │ │ │ │ └── endpoint.ipp │ │ │ └── socket_option.hpp │ │ ├── host_name.hpp │ │ ├── icmp.hpp │ │ ├── impl │ │ │ ├── address.hpp │ │ │ ├── address.ipp │ │ │ ├── address_v4.hpp │ │ │ ├── address_v4.ipp │ │ │ ├── address_v6.hpp │ │ │ ├── address_v6.ipp │ │ │ ├── basic_endpoint.hpp │ │ │ ├── host_name.ipp │ │ │ ├── network_v4.hpp │ │ │ ├── network_v4.ipp │ │ │ ├── network_v6.hpp │ │ │ └── network_v6.ipp │ │ ├── multicast.hpp │ │ ├── network_v4.hpp │ │ ├── network_v6.hpp │ │ ├── resolver_base.hpp │ │ ├── resolver_query_base.hpp │ │ ├── resolver_service.hpp │ │ ├── tcp.hpp │ │ ├── udp.hpp │ │ ├── unicast.hpp │ │ └── v6_only.hpp │ │ ├── is_executor.hpp │ │ ├── is_read_buffered.hpp │ │ ├── is_write_buffered.hpp │ │ ├── local │ │ ├── basic_endpoint.hpp │ │ ├── connect_pair.hpp │ │ ├── datagram_protocol.hpp │ │ ├── detail │ │ │ ├── endpoint.hpp │ │ │ └── impl │ │ │ │ └── endpoint.ipp │ │ └── stream_protocol.hpp │ │ ├── packaged_task.hpp │ │ ├── placeholders.hpp │ │ ├── posix │ │ ├── basic_descriptor.hpp │ │ ├── basic_stream_descriptor.hpp │ │ ├── descriptor.hpp │ │ ├── descriptor_base.hpp │ │ ├── stream_descriptor.hpp │ │ └── stream_descriptor_service.hpp │ │ ├── post.hpp │ │ ├── raw_socket_service.hpp │ │ ├── read.hpp │ │ ├── read_at.hpp │ │ ├── read_until.hpp │ │ ├── seq_packet_socket_service.hpp │ │ ├── serial_port.hpp │ │ ├── serial_port_base.hpp │ │ ├── serial_port_service.hpp │ │ ├── signal_set.hpp │ │ ├── signal_set_service.hpp │ │ ├── socket_acceptor_service.hpp │ │ ├── socket_base.hpp │ │ ├── spawn.hpp │ │ ├── ssl.hpp │ │ ├── ssl │ │ ├── context.hpp │ │ ├── context_base.hpp │ │ ├── detail │ │ │ ├── buffered_handshake_op.hpp │ │ │ ├── engine.hpp │ │ │ ├── handshake_op.hpp │ │ │ ├── impl │ │ │ │ ├── engine.ipp │ │ │ │ └── openssl_init.ipp │ │ │ ├── io.hpp │ │ │ ├── openssl_init.hpp │ │ │ ├── openssl_types.hpp │ │ │ ├── password_callback.hpp │ │ │ ├── read_op.hpp │ │ │ ├── shutdown_op.hpp │ │ │ ├── stream_core.hpp │ │ │ ├── verify_callback.hpp │ │ │ └── write_op.hpp │ │ ├── error.hpp │ │ ├── impl │ │ │ ├── context.hpp │ │ │ ├── context.ipp │ │ │ ├── error.ipp │ │ │ ├── rfc2818_verification.ipp │ │ │ └── src.hpp │ │ ├── rfc2818_verification.hpp │ │ ├── stream.hpp │ │ ├── stream_base.hpp │ │ ├── verify_context.hpp │ │ └── verify_mode.hpp │ │ ├── steady_timer.hpp │ │ ├── strand.hpp │ │ ├── stream_socket_service.hpp │ │ ├── streambuf.hpp │ │ ├── system_context.hpp │ │ ├── system_error.hpp │ │ ├── system_executor.hpp │ │ ├── system_timer.hpp │ │ ├── thread.hpp │ │ ├── thread_pool.hpp │ │ ├── time_traits.hpp │ │ ├── ts │ │ ├── buffer.hpp │ │ ├── executor.hpp │ │ ├── internet.hpp │ │ ├── io_context.hpp │ │ ├── net.hpp │ │ ├── netfwd.hpp │ │ ├── socket.hpp │ │ └── timer.hpp │ │ ├── unyield.hpp │ │ ├── use_future.hpp │ │ ├── uses_executor.hpp │ │ ├── version.hpp │ │ ├── wait_traits.hpp │ │ ├── waitable_timer_service.hpp │ │ ├── windows │ │ ├── basic_handle.hpp │ │ ├── basic_object_handle.hpp │ │ ├── basic_random_access_handle.hpp │ │ ├── basic_stream_handle.hpp │ │ ├── object_handle.hpp │ │ ├── object_handle_service.hpp │ │ ├── overlapped_handle.hpp │ │ ├── overlapped_ptr.hpp │ │ ├── random_access_handle.hpp │ │ ├── random_access_handle_service.hpp │ │ ├── stream_handle.hpp │ │ └── stream_handle_service.hpp │ │ ├── write.hpp │ │ ├── write_at.hpp │ │ └── yield.hpp ├── libsmacker │ ├── COPYING │ ├── README │ ├── smacker.c │ ├── smacker.h │ ├── smk_bitstream.c │ ├── smk_bitstream.h │ ├── smk_hufftree.c │ ├── smk_hufftree.h │ └── smk_malloc.h └── libsodium │ └── osxi386.sh ├── Brewfile ├── Brewfile-32bit.rb ├── CMake ├── 32bit.cmake ├── FindSDL2.cmake ├── FindSDL2_mixer.cmake ├── FindSDL2_ttf.cmake ├── Findsodium.cmake ├── mingwcc.cmake └── out_of_tree.cmake ├── CMakeLists.txt ├── Diablo.ico ├── Diablo.rc ├── DiabloUI ├── DiabloUI.dsp ├── DiabloUI.vcxproj ├── Makefile ├── _temp_data.cpp ├── _temp_funcs.h ├── artfont.2.cpp ├── artfont.cpp ├── bn_prof.cpp ├── bnetgw.cpp ├── connect.cpp ├── copyprot.cpp ├── cr8game.cpp ├── creadung.cpp ├── creastat.cpp ├── credits.cpp ├── diabedit.cpp ├── diabloui.cpp ├── diabloui.def ├── diabloui.h ├── diabloui_gcc.def ├── dirlink.cpp ├── disclaim.cpp ├── doom.cpp ├── entdial.cpp ├── entname.cpp ├── fade.cpp ├── focus.cpp ├── local.cpp ├── mainmenu.cpp ├── modem.cpp ├── modmstat.cpp ├── okcancel.cpp ├── progress.cpp ├── sbar.cpp ├── selclass.cpp ├── selconn.cpp ├── seldial.cpp ├── selgame.cpp ├── selhero.cpp ├── selipx.cpp ├── sellist.cpp ├── selload.cpp ├── selmodem.cpp ├── selregn.cpp ├── selyesno.cpp ├── title.cpp └── titlesnd.cpp ├── LICENSE ├── Packaging └── fedora │ ├── devilutionx.desktop │ └── devilutionx.spec ├── README.md ├── Source ├── .clang-format ├── _asm.cpp ├── _render.cpp ├── appfat.cpp ├── appfat.h ├── asm_trans_rect.inc ├── automap.cpp ├── automap.h ├── capture.cpp ├── capture.h ├── codec.cpp ├── codec.h ├── control.cpp ├── control.h ├── cursor.cpp ├── cursor.h ├── dead.cpp ├── dead.h ├── debug.cpp ├── debug.h ├── diablo.cpp ├── diablo.h ├── doom.cpp ├── doom.h ├── drlg_l1.cpp ├── drlg_l1.h ├── drlg_l2.cpp ├── drlg_l2.h ├── drlg_l3.cpp ├── drlg_l3.h ├── drlg_l4.cpp ├── drlg_l4.h ├── dthread.cpp ├── dthread.h ├── dx.cpp ├── dx.h ├── effects.cpp ├── effects.h ├── encrypt.cpp ├── encrypt.h ├── engine.cpp ├── engine.h ├── error.cpp ├── error.h ├── fault.cpp ├── fault.h ├── gamemenu.cpp ├── gamemenu.h ├── gendung.cpp ├── gendung.h ├── gmenu.cpp ├── gmenu.h ├── help.cpp ├── help.h ├── init.cpp ├── init.h ├── interfac.cpp ├── interfac.h ├── inv.cpp ├── inv.h ├── itemdat.cpp ├── itemdat.h ├── items.cpp ├── items.h ├── lighting.cpp ├── lighting.h ├── list.h ├── loadsave.cpp ├── loadsave.h ├── logging.cpp ├── logging.h ├── mainmenu.cpp ├── mainmenu.h ├── minitext.cpp ├── minitext.h ├── misdat.cpp ├── misdat.h ├── missiles.cpp ├── missiles.h ├── monstdat.cpp ├── monstdat.h ├── monster.cpp ├── monster.h ├── movie.cpp ├── movie.h ├── mpqapi.cpp ├── mpqapi.h ├── msg.cpp ├── msg.h ├── msgcmd.cpp ├── msgcmd.h ├── multi.cpp ├── multi.h ├── nthread.cpp ├── nthread.h ├── objdat.cpp ├── objdat.h ├── objects.cpp ├── objects.h ├── pack.cpp ├── pack.h ├── palette.cpp ├── palette.h ├── path.cpp ├── path.h ├── pfile.cpp ├── pfile.h ├── player.cpp ├── player.h ├── plrctrls.cpp ├── plrctrls.h ├── plrmsg.cpp ├── plrmsg.h ├── portal.cpp ├── portal.h ├── quests.cpp ├── quests.h ├── render.cpp ├── render.h ├── restrict.cpp ├── restrict.h ├── scrollrt.cpp ├── scrollrt.h ├── setmaps.cpp ├── setmaps.h ├── sha.cpp ├── sha.h ├── sound.cpp ├── sound.h ├── spelldat.cpp ├── spelldat.h ├── spells.cpp ├── spells.h ├── stores.cpp ├── stores.h ├── sync.cpp ├── sync.h ├── textdat.cpp ├── textdat.h ├── themes.cpp ├── themes.h ├── tmsg.cpp ├── tmsg.h ├── town.cpp ├── town.h ├── towners.cpp ├── towners.h ├── track.cpp ├── track.h ├── trigs.cpp ├── trigs.h ├── wave.cpp └── wave.h ├── SourceS ├── devilution.h ├── macos_stdarg.h ├── miniwin.h ├── miniwin │ ├── com.h │ ├── com │ │ ├── ddraw.inc │ │ ├── ddraw_macro.inc │ │ ├── dsound.inc │ │ └── dsound_macro.inc │ ├── com_macro.h │ ├── misc.h │ ├── misc_macro.h │ ├── popdecl.inc │ ├── pushdecl.inc │ ├── rand.h │ ├── thread.h │ └── ui.h └── storm_full.h ├── SourceX ├── .clang-format ├── DiabloUI │ ├── credits.cpp │ ├── diabloui.cpp │ ├── diabloui.h │ ├── dialogs.cpp │ ├── mainmenu.cpp │ ├── progress.cpp │ ├── selconn.cpp │ ├── selconn.h │ ├── selgame.cpp │ ├── selgame.h │ ├── selhero.cpp │ ├── selhero.h │ └── title.cpp ├── dvlnet │ ├── abstract_net.cpp │ ├── abstract_net.h │ ├── base.cpp │ ├── base.h │ ├── frame_queue.cpp │ ├── frame_queue.h │ ├── loopback.cpp │ ├── loopback.h │ ├── packet.cpp │ ├── packet.h │ ├── tcp_client.cpp │ ├── tcp_client.h │ ├── tcp_server.cpp │ ├── tcp_server.h │ ├── udp_p2p.cpp │ └── udp_p2p.h ├── dx.cpp ├── main.cpp ├── miniwin │ ├── ddraw.cpp │ ├── ddraw.h │ ├── dsound.cpp │ ├── dsound.h │ ├── misc.cpp │ ├── misc_dx.cpp │ ├── misc_io.cpp │ ├── misc_msg.cpp │ ├── rand.cpp │ └── thread.cpp ├── sound.cpp ├── storm │ ├── storm.cpp │ ├── storm_dx.cpp │ └── storm_net.cpp ├── stubs.h └── utf8.h ├── Xcode ├── AppIcon.xcassets │ ├── AppIcon.appiconset │ │ ├── 1024.png │ │ ├── 128.png │ │ ├── 16.png │ │ ├── 256-1.png │ │ ├── 256.png │ │ ├── 512-1.png │ │ ├── 512.png │ │ ├── 64.png │ │ ├── Contents.json │ │ ├── appicon-1.png │ │ └── appicon-3.png │ └── Contents.json ├── Info.plist └── devilutionX.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ └── xcschemes │ ├── PKWare.xcscheme │ ├── Radon.xcscheme │ ├── StormLib.xcscheme │ ├── devilution.xcscheme │ ├── devilutionX.xcscheme │ └── smacker.xcscheme ├── appveyor.yml ├── defs.h ├── docker ├── arch │ └── Dockerfile ├── build.sh └── ubuntu │ └── Dockerfile ├── docs ├── CHANGELOG.md ├── CONTRIBUTING.md ├── TODO.md └── debug.md ├── enums.h ├── exefs ├── .stub └── main ├── icon.jpg ├── macos-build.sh ├── makefile ├── resource.h ├── resources └── haiku │ └── devilutionX.rdef.in ├── structs.h ├── switch ├── mman.h ├── switch_keyboard.cpp └── switch_keyboard.h ├── touch ├── touch.cpp └── touch.h └── types.h /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: bash 2 | 3 | os: 4 | - osx 5 | 6 | osx_image: xcode9.4 7 | 8 | matrix: 9 | include: 10 | - env: ARCH=--build-all-x86 11 | - env: ARCH=--build-all-x64 12 | 13 | script: 14 | - bash ./macos-build.sh $ARCH 15 | 16 | deploy: 17 | provider: releases 18 | api_key: "$GITHUB_TOKEN" 19 | file: "build/devilutionX.dmg" 20 | skip_cleanup: true 21 | on: 22 | tags: true 23 | -------------------------------------------------------------------------------- /3rdParty/PKWare/PKWare.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | -------------------------------------------------------------------------------- /3rdParty/Radon/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Dmitro Szewczuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /3rdParty/Radon/Radon/include/File.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Dmitro bjornus Szewczuk 2017 under zlib license 2 | 3 | #pragma once 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | namespace radon 10 | { 11 | class Section; 12 | 13 | class File 14 | { 15 | public: 16 | 17 | File(const std::string & path, bool reading = true); 18 | 19 | Section* getSection(const std::string & name); 20 | 21 | void addSection(const std::string & name); 22 | 23 | void saveToFile(); 24 | 25 | private: 26 | std::vector
sections; 27 | std::string path; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /3rdParty/Radon/Radon/include/Key.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Dmitro bjornus Szewczuk 2017 under zlib license 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | #include "Named.hpp" 8 | 9 | namespace radon 10 | { 11 | class Key 12 | : public Named 13 | { 14 | public: 15 | 16 | Key(); 17 | 18 | Key(const std::string & name, const std::string & value); 19 | 20 | Key(const std::string & name, const float & value); 21 | 22 | std::string getStringValue(); 23 | 24 | float getFloatValue(); 25 | 26 | void setValue(float & value); 27 | 28 | void setValue(std::string & value); 29 | 30 | private: 31 | std::string value; 32 | 33 | friend class File; 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /3rdParty/Radon/Radon/include/Named.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Dmitro bjornus Szewczuk 2017 under zlib license 2 | 3 | #pragma once 4 | 5 | #include 6 | 7 | namespace radon 8 | { 9 | class Named 10 | { 11 | public: 12 | 13 | Named(); 14 | 15 | Named(const std::string & name); 16 | 17 | void setName(const std::string & name); 18 | 19 | std::string getName(); 20 | 21 | protected: 22 | std::string name; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /3rdParty/Radon/Radon/include/Radon.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Dmitro bjornus Szewczuk 2017 under zlib license 2 | 3 | #pragma once 4 | 5 | #include "File.hpp" 6 | #include "Key.hpp" 7 | #include "Named.hpp" 8 | #include "Radon.hpp" 9 | #include "Section.hpp" 10 | -------------------------------------------------------------------------------- /3rdParty/Radon/Radon/include/Section.hpp: -------------------------------------------------------------------------------- 1 | // Copyright Dmitro bjornus Szewczuk 2017 under zlib license 2 | 3 | #pragma once 4 | 5 | #include 6 | #include 7 | 8 | #include "Named.hpp" 9 | 10 | namespace radon 11 | { 12 | class Key; 13 | 14 | class Section 15 | : public Named 16 | { 17 | public: 18 | 19 | Section(); 20 | 21 | Section(const std::string & name); 22 | 23 | Key *getKey(const std::string & name); 24 | 25 | void addKey(Key variable); 26 | 27 | private: 28 | std::vector keys; 29 | 30 | friend class File; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /3rdParty/Radon/Radon/source/Key.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Dmitro bjornus Szewczuk 2017 2 | 3 | #include "../include/Radon.hpp" 4 | 5 | namespace radon 6 | { 7 | Key::Key() 8 | : Named() 9 | { 10 | } 11 | 12 | 13 | Key::Key(const std::string & name, const std::string & value) 14 | : Named(name), value(value) 15 | { 16 | } 17 | 18 | 19 | Key::Key(const std::string & name, const float & value) 20 | : Named(name), value(std::to_string(value)) 21 | { 22 | } 23 | 24 | 25 | std::string Key::getStringValue() 26 | { 27 | return value; 28 | } 29 | 30 | 31 | float Key::getFloatValue() 32 | { 33 | return (float)(atof(value.data())); 34 | } 35 | 36 | 37 | void Key::setValue(float & value) 38 | { 39 | this->value = std::to_string(value); 40 | } 41 | 42 | 43 | void Key::setValue(std::string & value) 44 | { 45 | this->value = value; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /3rdParty/Radon/Radon/source/Named.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Dmitro bjornus Szewczuk 2017 2 | 3 | #include "../include/Radon.hpp" 4 | 5 | namespace radon 6 | { 7 | Named::Named() 8 | { 9 | setName("You need to set name!"); 10 | } 11 | 12 | 13 | Named::Named(const std::string & name) 14 | { 15 | setName(name); 16 | } 17 | 18 | 19 | void Named::setName(const std::string & name) 20 | { 21 | this->name = name; 22 | } 23 | 24 | 25 | std::string Named::getName() 26 | { 27 | return name; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /3rdParty/Radon/Radon/source/Section.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Dmitro bjornus Szewczuk 2017 2 | 3 | #include "../include/Radon.hpp" 4 | 5 | #include 6 | 7 | namespace radon 8 | { 9 | Section::Section() 10 | : Named() 11 | { 12 | } 13 | 14 | 15 | Section::Section(const std::string & name) 16 | : Named(name) 17 | { 18 | } 19 | 20 | Key *Section::getKey(const std::string & name) 21 | { 22 | for (auto & key : keys) 23 | { 24 | if (key.getName() == name) 25 | return &key; 26 | } 27 | 28 | return nullptr; 29 | } 30 | 31 | void Section::addKey(Key key) 32 | { 33 | keys.push_back(key); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /3rdParty/StormLib/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 1999-2013 Ladislav Zezula 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /3rdParty/StormLib/README: -------------------------------------------------------------------------------- 1 | This is a slightly modified version of ladislav-zezula/StormLib@4ad0bff21da0163917e1552960e6a43679586b89 2 | 3 | Cosmetic changes: 4 | * Remove all unused files. 5 | * Comment out unnecessary bits with `#ifndef FULL`. 6 | 7 | Implementation changes: 8 | * Redefine `bool` to `BOOL`. 9 | * Use STORMAPI instead of WINAPI for calling convention (and define it as nothing). 10 | * Use external Storm error handling (`SErrGetLastError()` etc.) 11 | * Convert pathnames to Unix-style slashes. 12 | * Bugfixes, with comment: // BUGFIX (devilutionX) 13 | * Fix missing header includes on macOS (devilutionX) 14 | -------------------------------------------------------------------------------- /3rdParty/asio/LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /3rdParty/asio/README: -------------------------------------------------------------------------------- 1 | asio version 1.12.2 2 | Released Sunday, 09 December 2018. 3 | 4 | See doc/index.html for API documentation and a tutorial. 5 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/basic_streambuf_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // basic_streambuf_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BASIC_STREAMBUF_FWD_HPP 12 | #define ASIO_BASIC_STREAMBUF_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_NO_IOSTREAM) 21 | 22 | #include 23 | 24 | namespace asio { 25 | 26 | template > 27 | class basic_streambuf; 28 | 29 | template > 30 | class basic_streambuf_ref; 31 | 32 | } // namespace asio 33 | 34 | #endif // !defined(ASIO_NO_IOSTREAM) 35 | 36 | #endif // ASIO_BASIC_STREAMBUF_FWD_HPP 37 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/buffered_read_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_read_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_READ_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_READ_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_read_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_READ_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/buffered_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/buffered_write_stream_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // buffered_write_stream_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 12 | #define ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | namespace asio { 19 | 20 | template 21 | class buffered_write_stream; 22 | 23 | } // namespace asio 24 | 25 | #endif // ASIO_BUFFERED_WRITE_STREAM_FWD_HPP 26 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/deadline_timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // deadline_timer.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DEADLINE_TIMER_HPP 12 | #define ASIO_DEADLINE_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_DATE_TIME) \ 21 | || defined(GENERATING_DOCUMENTATION) 22 | 23 | #include "asio/detail/socket_types.hpp" // Must come before posix_time. 24 | #include "asio/basic_deadline_timer.hpp" 25 | 26 | #include 27 | 28 | namespace asio { 29 | 30 | /// Typedef for the typical usage of timer. Uses a UTC clock. 31 | typedef basic_deadline_timer deadline_timer; 32 | 33 | } // namespace asio 34 | 35 | #endif // defined(ASIO_HAS_BOOST_DATE_TIME) 36 | // || defined(GENERATING_DOCUMENTATION) 37 | 38 | #endif // ASIO_DEADLINE_TIMER_HPP 39 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/array.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/array.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ARRAY_HPP 12 | #define ASIO_DETAIL_ARRAY_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_ARRAY) 21 | # include 22 | #else // defined(ASIO_HAS_STD_ARRAY) 23 | # include 24 | #endif // defined(ASIO_HAS_STD_ARRAY) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_ARRAY) 30 | using std::array; 31 | #else // defined(ASIO_HAS_STD_ARRAY) 32 | using boost::array; 33 | #endif // defined(ASIO_HAS_STD_ARRAY) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_ARRAY_HPP 39 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/array_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/array_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ARRAY_FWD_HPP 12 | #define ASIO_DETAIL_ARRAY_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace boost { 21 | 22 | template 23 | class array; 24 | 25 | } // namespace boost 26 | 27 | // Standard library components can't be forward declared, so we'll have to 28 | // include the array header. Fortunately, it's fairly lightweight and doesn't 29 | // add significantly to the compile time. 30 | #if defined(ASIO_HAS_STD_ARRAY) 31 | # include 32 | #endif // defined(ASIO_HAS_STD_ARRAY) 33 | 34 | #endif // ASIO_DETAIL_ARRAY_FWD_HPP 35 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/assert.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/assert.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ASSERT_HPP 12 | #define ASIO_DETAIL_ASSERT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_ASSERT) 21 | # include 22 | #else // defined(ASIO_HAS_BOOST_ASSERT) 23 | # include 24 | #endif // defined(ASIO_HAS_BOOST_ASSERT) 25 | 26 | #if defined(ASIO_HAS_BOOST_ASSERT) 27 | # define ASIO_ASSERT(expr) BOOST_ASSERT(expr) 28 | #else // defined(ASIO_HAS_BOOST_ASSERT) 29 | # define ASIO_ASSERT(expr) assert(expr) 30 | #endif // defined(ASIO_HAS_BOOST_ASSERT) 31 | 32 | #endif // ASIO_DETAIL_ASSERT_HPP 33 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/atomic_count.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/atomic_count.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_ATOMIC_COUNT_HPP 12 | #define ASIO_DETAIL_ATOMIC_COUNT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | // Nothing to include. 22 | #elif defined(ASIO_HAS_STD_ATOMIC) 23 | # include 24 | #else // defined(ASIO_HAS_STD_ATOMIC) 25 | # include 26 | #endif // defined(ASIO_HAS_STD_ATOMIC) 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | #if !defined(ASIO_HAS_THREADS) 32 | typedef long atomic_count; 33 | inline void increment(atomic_count& a, long b) { a += b; } 34 | #elif defined(ASIO_HAS_STD_ATOMIC) 35 | typedef std::atomic atomic_count; 36 | inline void increment(atomic_count& a, long b) { a += b; } 37 | #else // defined(ASIO_HAS_STD_ATOMIC) 38 | typedef boost::detail::atomic_count atomic_count; 39 | inline void increment(atomic_count& a, long b) { while (b > 0) ++a, --b; } 40 | #endif // defined(ASIO_HAS_STD_ATOMIC) 41 | 42 | } // namespace detail 43 | } // namespace asio 44 | 45 | #endif // ASIO_DETAIL_ATOMIC_COUNT_HPP 46 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/cstddef.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/cstddef.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_CSTDDEF_HPP 12 | #define ASIO_DETAIL_CSTDDEF_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | 21 | namespace asio { 22 | 23 | #if defined(ASIO_HAS_NULLPTR) 24 | using std::nullptr_t; 25 | #else // defined(ASIO_HAS_NULLPTR) 26 | struct nullptr_t {}; 27 | #endif // defined(ASIO_HAS_NULLPTR) 28 | 29 | } // namespace asio 30 | 31 | #endif // ASIO_DETAIL_CSTDDEF_HPP 32 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/date_time_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/date_time_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_DATE_TIME_FWD_HPP 12 | #define ASIO_DETAIL_DATE_TIME_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace boost { 21 | namespace date_time { 22 | 23 | template 24 | class base_time; 25 | 26 | } // namespace date_time 27 | namespace posix_time { 28 | 29 | class ptime; 30 | 31 | } // namespace posix_time 32 | } // namespace boost 33 | 34 | #endif // ASIO_DETAIL_DATE_TIME_FWD_HPP 35 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/dependent_type.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/dependent_type.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_DEPENDENT_TYPE_HPP 12 | #define ASIO_DETAIL_DEPENDENT_TYPE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | template 26 | struct dependent_type 27 | { 28 | typedef T type; 29 | }; 30 | 31 | } // namespace detail 32 | } // namespace asio 33 | 34 | #include "asio/detail/pop_options.hpp" 35 | 36 | #endif // ASIO_DETAIL_DEPENDENT_TYPE_HPP 37 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/event.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/event.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_EVENT_HPP 12 | #define ASIO_DETAIL_EVENT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_event.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_event.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_event.hpp" 26 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 27 | # include "asio/detail/std_event.hpp" 28 | #else 29 | # error Only Windows, POSIX and std::condition_variable are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | #if !defined(ASIO_HAS_THREADS) 36 | typedef null_event event; 37 | #elif defined(ASIO_WINDOWS) 38 | typedef win_event event; 39 | #elif defined(ASIO_HAS_PTHREADS) 40 | typedef posix_event event; 41 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 42 | typedef std_event event; 43 | #endif 44 | 45 | } // namespace detail 46 | } // namespace asio 47 | 48 | #endif // ASIO_DETAIL_EVENT_HPP 49 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/fd_set_adapter.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/fd_set_adapter.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_FD_SET_ADAPTER_HPP 12 | #define ASIO_DETAIL_FD_SET_ADAPTER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_WINDOWS_RUNTIME) 21 | 22 | #include "asio/detail/posix_fd_set_adapter.hpp" 23 | #include "asio/detail/win_fd_set_adapter.hpp" 24 | 25 | namespace asio { 26 | namespace detail { 27 | 28 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) 29 | typedef win_fd_set_adapter fd_set_adapter; 30 | #else 31 | typedef posix_fd_set_adapter fd_set_adapter; 32 | #endif 33 | 34 | } // namespace detail 35 | } // namespace asio 36 | 37 | #endif // !defined(ASIO_WINDOWS_RUNTIME) 38 | 39 | #endif // ASIO_DETAIL_FD_SET_ADAPTER_HPP 40 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/functional.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/functional.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_FUNCTIONAL_HPP 12 | #define ASIO_DETAIL_FUNCTIONAL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include 21 | 22 | #if !defined(ASIO_HAS_STD_FUNCTION) 23 | # include 24 | #endif // !defined(ASIO_HAS_STD_FUNCTION) 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_STD_FUNCTION) 30 | using std::function; 31 | #else // defined(ASIO_HAS_STD_FUNCTION) 32 | using boost::function; 33 | #endif // defined(ASIO_HAS_STD_FUNCTION) 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_FUNCTIONAL_HPP 39 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/future.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/future.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_FUTURE_HPP 12 | #define ASIO_DETAIL_FUTURE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #if defined(ASIO_HAS_STD_FUTURE) 20 | # include 21 | // Even though the future header is available, libstdc++ may not implement the 22 | // std::future class itself. However, we need to have already included the 23 | // future header to reliably test for _GLIBCXX_HAS_GTHREADS. 24 | # if defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX) 25 | # if defined(_GLIBCXX_HAS_GTHREADS) 26 | # define ASIO_HAS_STD_FUTURE_CLASS 1 27 | # endif // defined(_GLIBCXX_HAS_GTHREADS) 28 | # else // defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX) 29 | # define ASIO_HAS_STD_FUTURE_CLASS 1 30 | # endif // defined(__GNUC__) && !defined(ASIO_HAS_CLANG_LIBCXX) 31 | #endif // defined(ASIO_HAS_STD_FUTURE) 32 | 33 | #endif // ASIO_DETAIL_FUTURE_HPP 34 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/global.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/global.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_GLOBAL_HPP 12 | #define ASIO_DETAIL_GLOBAL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_global.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_global.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_global.hpp" 26 | #elif defined(ASIO_HAS_STD_CALL_ONCE) 27 | # include "asio/detail/std_global.hpp" 28 | #else 29 | # error Only Windows, POSIX and std::call_once are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | template 36 | inline T& global() 37 | { 38 | #if !defined(ASIO_HAS_THREADS) 39 | return null_global(); 40 | #elif defined(ASIO_WINDOWS) 41 | return win_global(); 42 | #elif defined(ASIO_HAS_PTHREADS) 43 | return posix_global(); 44 | #elif defined(ASIO_HAS_STD_CALL_ONCE) 45 | return std_global(); 46 | #endif 47 | } 48 | 49 | } // namespace detail 50 | } // namespace asio 51 | 52 | #endif // ASIO_DETAIL_GLOBAL_HPP 53 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/handler_cont_helpers.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/handler_cont_helpers.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP 12 | #define ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/memory.hpp" 20 | #include "asio/handler_continuation_hook.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | // Calls to asio_handler_is_continuation must be made from a namespace that 25 | // does not contain overloads of this function. This namespace is defined here 26 | // for that purpose. 27 | namespace asio_handler_cont_helpers { 28 | 29 | template 30 | inline bool is_continuation(Context& context) 31 | { 32 | #if !defined(ASIO_HAS_HANDLER_HOOKS) 33 | return false; 34 | #else 35 | using asio::asio_handler_is_continuation; 36 | return asio_handler_is_continuation( 37 | asio::detail::addressof(context)); 38 | #endif 39 | } 40 | 41 | } // namespace asio_handler_cont_helpers 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // ASIO_DETAIL_HANDLER_CONT_HELPERS_HPP 46 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/impl/posix_mutex.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/posix_mutex.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP 12 | #define ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include "asio/detail/posix_mutex.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | posix_mutex::posix_mutex() 32 | { 33 | int error = ::pthread_mutex_init(&mutex_, 0); 34 | asio::error_code ec(error, 35 | asio::error::get_system_category()); 36 | asio::detail::throw_error(ec, "mutex"); 37 | } 38 | 39 | } // namespace detail 40 | } // namespace asio 41 | 42 | #include "asio/detail/pop_options.hpp" 43 | 44 | #endif // defined(ASIO_HAS_PTHREADS) 45 | 46 | #endif // ASIO_DETAIL_IMPL_POSIX_MUTEX_IPP 47 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/impl/posix_tss_ptr.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/posix_tss_ptr.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP 12 | #define ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_PTHREADS) 21 | 22 | #include "asio/detail/posix_tss_ptr.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | void posix_tss_ptr_create(pthread_key_t& key) 32 | { 33 | int error = ::pthread_key_create(&key, 0); 34 | asio::error_code ec(error, 35 | asio::error::get_system_category()); 36 | asio::detail::throw_error(ec, "tss"); 37 | } 38 | 39 | } // namespace detail 40 | } // namespace asio 41 | 42 | #include "asio/detail/pop_options.hpp" 43 | 44 | #endif // defined(ASIO_HAS_PTHREADS) 45 | 46 | #endif // ASIO_DETAIL_IMPL_POSIX_TSS_PTR_IPP 47 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/impl/win_tss_ptr.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/impl/win_tss_ptr.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP 12 | #define ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_WINDOWS) 21 | 22 | #include "asio/detail/throw_error.hpp" 23 | #include "asio/detail/win_tss_ptr.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | DWORD win_tss_ptr_create() 32 | { 33 | #if defined(UNDER_CE) 34 | const DWORD out_of_indexes = 0xFFFFFFFF; 35 | #else 36 | const DWORD out_of_indexes = TLS_OUT_OF_INDEXES; 37 | #endif 38 | 39 | DWORD tss_key = ::TlsAlloc(); 40 | if (tss_key == out_of_indexes) 41 | { 42 | DWORD last_error = ::GetLastError(); 43 | asio::error_code ec(last_error, 44 | asio::error::get_system_category()); 45 | asio::detail::throw_error(ec, "tss"); 46 | } 47 | return tss_key; 48 | } 49 | 50 | } // namespace detail 51 | } // namespace asio 52 | 53 | #include "asio/detail/pop_options.hpp" 54 | 55 | #endif // defined(ASIO_WINDOWS) 56 | 57 | #endif // ASIO_DETAIL_IMPL_WIN_TSS_PTR_IPP 58 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/keyword_tss_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/keyword_tss_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_KEYWORD_TSS_PTR_HPP 12 | #define ASIO_DETAIL_KEYWORD_TSS_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class keyword_tss_ptr 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor. 35 | keyword_tss_ptr() 36 | { 37 | } 38 | 39 | // Destructor. 40 | ~keyword_tss_ptr() 41 | { 42 | } 43 | 44 | // Get the value. 45 | operator T*() const 46 | { 47 | return value_; 48 | } 49 | 50 | // Set the value. 51 | void operator=(T* value) 52 | { 53 | value_ = value; 54 | } 55 | 56 | private: 57 | static ASIO_THREAD_KEYWORD T* value_; 58 | }; 59 | 60 | template 61 | ASIO_THREAD_KEYWORD T* keyword_tss_ptr::value_; 62 | 63 | } // namespace detail 64 | } // namespace asio 65 | 66 | #include "asio/detail/pop_options.hpp" 67 | 68 | #endif // defined(ASIO_HAS_THREAD_KEYWORD_EXTENSION) 69 | 70 | #endif // ASIO_DETAIL_KEYWORD_TSS_PTR_HPP 71 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/limits.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/limits.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_LIMITS_HPP 12 | #define ASIO_DETAIL_LIMITS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_LIMITS) 21 | # include 22 | #else // defined(ASIO_HAS_BOOST_LIMITS) 23 | # include 24 | #endif // defined(ASIO_HAS_BOOST_LIMITS) 25 | 26 | #endif // ASIO_DETAIL_LIMITS_HPP 27 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/local_free_on_block_exit.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/local_free_on_block_exit.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP 12 | #define ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) 21 | #if !defined(ASIO_WINDOWS_APP) 22 | 23 | #include "asio/detail/noncopyable.hpp" 24 | #include "asio/detail/socket_types.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class local_free_on_block_exit 32 | : private noncopyable 33 | { 34 | public: 35 | // Constructor blocks all signals for the calling thread. 36 | explicit local_free_on_block_exit(void* p) 37 | : p_(p) 38 | { 39 | } 40 | 41 | // Destructor restores the previous signal mask. 42 | ~local_free_on_block_exit() 43 | { 44 | ::LocalFree(p_); 45 | } 46 | 47 | private: 48 | void* p_; 49 | }; 50 | 51 | } // namespace detail 52 | } // namespace asio 53 | 54 | #include "asio/detail/pop_options.hpp" 55 | 56 | #endif // !defined(ASIO_WINDOWS_APP) 57 | #endif // defined(ASIO_WINDOWS) || defined(__CYGWIN__) 58 | 59 | #endif // ASIO_DETAIL_LOCAL_FREE_ON_BLOCK_EXIT_HPP 60 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/macos_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/macos_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(__MACH__) && defined(__APPLE__) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class macos_fenced_block 31 | : private noncopyable 32 | { 33 | public: 34 | enum half_t { half }; 35 | enum full_t { full }; 36 | 37 | // Constructor for a half fenced block. 38 | explicit macos_fenced_block(half_t) 39 | { 40 | } 41 | 42 | // Constructor for a full fenced block. 43 | explicit macos_fenced_block(full_t) 44 | { 45 | OSMemoryBarrier(); 46 | } 47 | 48 | // Destructor. 49 | ~macos_fenced_block() 50 | { 51 | OSMemoryBarrier(); 52 | } 53 | }; 54 | 55 | } // namespace detail 56 | } // namespace asio 57 | 58 | #include "asio/detail/pop_options.hpp" 59 | 60 | #endif // defined(__MACH__) && defined(__APPLE__) 61 | 62 | #endif // ASIO_DETAIL_MACOS_FENCED_BLOCK_HPP 63 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/mutex.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_MUTEX_HPP 12 | #define ASIO_DETAIL_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | # include "asio/detail/null_mutex.hpp" 22 | #elif defined(ASIO_WINDOWS) 23 | # include "asio/detail/win_mutex.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_mutex.hpp" 26 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 27 | # include "asio/detail/std_mutex.hpp" 28 | #else 29 | # error Only Windows, POSIX and std::mutex are supported! 30 | #endif 31 | 32 | namespace asio { 33 | namespace detail { 34 | 35 | #if !defined(ASIO_HAS_THREADS) 36 | typedef null_mutex mutex; 37 | #elif defined(ASIO_WINDOWS) 38 | typedef win_mutex mutex; 39 | #elif defined(ASIO_HAS_PTHREADS) 40 | typedef posix_mutex mutex; 41 | #elif defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 42 | typedef std_mutex mutex; 43 | #endif 44 | 45 | } // namespace detail 46 | } // namespace asio 47 | 48 | #endif // ASIO_DETAIL_MUTEX_HPP 49 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/noncopyable.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/noncopyable.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NONCOPYABLE_HPP 12 | #define ASIO_DETAIL_NONCOPYABLE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | class noncopyable 26 | { 27 | protected: 28 | noncopyable() {} 29 | ~noncopyable() {} 30 | private: 31 | noncopyable(const noncopyable&); 32 | const noncopyable& operator=(const noncopyable&); 33 | }; 34 | 35 | } // namespace detail 36 | 37 | using asio::detail::noncopyable; 38 | 39 | } // namespace asio 40 | 41 | #include "asio/detail/pop_options.hpp" 42 | 43 | #endif // ASIO_DETAIL_NONCOPYABLE_HPP 44 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/null_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_NULL_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/noncopyable.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | class null_fenced_block 26 | : private noncopyable 27 | { 28 | public: 29 | enum half_or_full_t { half, full }; 30 | 31 | // Constructor. 32 | explicit null_fenced_block(half_or_full_t) 33 | { 34 | } 35 | 36 | // Destructor. 37 | ~null_fenced_block() 38 | { 39 | } 40 | }; 41 | 42 | } // namespace detail 43 | } // namespace asio 44 | 45 | #include "asio/detail/pop_options.hpp" 46 | 47 | #endif // ASIO_DETAIL_NULL_FENCED_BLOCK_HPP 48 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/null_global.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_global.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_GLOBAL_HPP 12 | #define ASIO_DETAIL_NULL_GLOBAL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | template 26 | struct null_global_impl 27 | { 28 | null_global_impl() 29 | : ptr_(0) 30 | { 31 | } 32 | 33 | // Destructor automatically cleans up the global. 34 | ~null_global_impl() 35 | { 36 | delete ptr_; 37 | } 38 | 39 | static null_global_impl instance_; 40 | T* ptr_; 41 | }; 42 | 43 | template 44 | null_global_impl null_global_impl::instance_; 45 | 46 | template 47 | T& null_global() 48 | { 49 | if (null_global_impl::instance_.ptr_ == 0) 50 | null_global_impl::instance_.ptr_ = new T; 51 | return *null_global_impl::instance_.ptr_; 52 | } 53 | 54 | } // namespace detail 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // ASIO_DETAIL_NULL_GLOBAL_HPP 60 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/null_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_MUTEX_HPP 12 | #define ASIO_DETAIL_NULL_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | #include "asio/detail/scoped_lock.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class null_mutex 31 | : private noncopyable 32 | { 33 | public: 34 | typedef asio::detail::scoped_lock scoped_lock; 35 | 36 | // Constructor. 37 | null_mutex() 38 | { 39 | } 40 | 41 | // Destructor. 42 | ~null_mutex() 43 | { 44 | } 45 | 46 | // Lock the mutex. 47 | void lock() 48 | { 49 | } 50 | 51 | // Unlock the mutex. 52 | void unlock() 53 | { 54 | } 55 | }; 56 | 57 | } // namespace detail 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // !defined(ASIO_HAS_THREADS) 63 | 64 | #endif // ASIO_DETAIL_NULL_MUTEX_HPP 65 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/null_static_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_static_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_STATIC_MUTEX_HPP 12 | #define ASIO_DETAIL_NULL_STATIC_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/scoped_lock.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | struct null_static_mutex 30 | { 31 | typedef asio::detail::scoped_lock scoped_lock; 32 | 33 | // Initialise the mutex. 34 | void init() 35 | { 36 | } 37 | 38 | // Lock the mutex. 39 | void lock() 40 | { 41 | } 42 | 43 | // Unlock the mutex. 44 | void unlock() 45 | { 46 | } 47 | 48 | int unused_; 49 | }; 50 | 51 | #define ASIO_NULL_STATIC_MUTEX_INIT { 0 } 52 | 53 | } // namespace detail 54 | } // namespace asio 55 | 56 | #include "asio/detail/pop_options.hpp" 57 | 58 | #endif // !defined(ASIO_HAS_THREADS) 59 | 60 | #endif // ASIO_DETAIL_NULL_STATIC_MUTEX_HPP 61 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/null_thread.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_thread.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_THREAD_HPP 12 | #define ASIO_DETAIL_NULL_THREAD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | #include "asio/detail/throw_error.hpp" 24 | #include "asio/error.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class null_thread 32 | : private noncopyable 33 | { 34 | public: 35 | // Constructor. 36 | template 37 | null_thread(Function, unsigned int = 0) 38 | { 39 | asio::detail::throw_error( 40 | asio::error::operation_not_supported, "thread"); 41 | } 42 | 43 | // Destructor. 44 | ~null_thread() 45 | { 46 | } 47 | 48 | // Wait for the thread to exit. 49 | void join() 50 | { 51 | } 52 | 53 | // Get number of CPUs. 54 | static std::size_t hardware_concurrency() 55 | { 56 | return 1; 57 | } 58 | }; 59 | 60 | } // namespace detail 61 | } // namespace asio 62 | 63 | #include "asio/detail/pop_options.hpp" 64 | 65 | #endif // !defined(ASIO_HAS_THREADS) 66 | 67 | #endif // ASIO_DETAIL_NULL_THREAD_HPP 68 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/null_tss_ptr.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/null_tss_ptr.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_NULL_TSS_PTR_HPP 12 | #define ASIO_DETAIL_NULL_TSS_PTR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) 21 | 22 | #include "asio/detail/noncopyable.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class null_tss_ptr 31 | : private noncopyable 32 | { 33 | public: 34 | // Constructor. 35 | null_tss_ptr() 36 | : value_(0) 37 | { 38 | } 39 | 40 | // Destructor. 41 | ~null_tss_ptr() 42 | { 43 | } 44 | 45 | // Get the value. 46 | operator T*() const 47 | { 48 | return value_; 49 | } 50 | 51 | // Set the value. 52 | void operator=(T* value) 53 | { 54 | value_ = value; 55 | } 56 | 57 | private: 58 | T* value_; 59 | }; 60 | 61 | } // namespace detail 62 | } // namespace asio 63 | 64 | #include "asio/detail/pop_options.hpp" 65 | 66 | #endif // !defined(ASIO_HAS_THREADS) 67 | 68 | #endif // ASIO_DETAIL_NULL_TSS_PTR_HPP 69 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/operation.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/operation.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_OPERATION_HPP 12 | #define ASIO_DETAIL_OPERATION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_IOCP) 21 | # include "asio/detail/win_iocp_operation.hpp" 22 | #else 23 | # include "asio/detail/scheduler_operation.hpp" 24 | #endif 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | #if defined(ASIO_HAS_IOCP) 30 | typedef win_iocp_operation operation; 31 | #else 32 | typedef scheduler_operation operation; 33 | #endif 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #endif // ASIO_DETAIL_OPERATION_HPP 39 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/reactor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/reactor.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REACTOR_HPP 12 | #define ASIO_DETAIL_REACTOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/reactor_fwd.hpp" 19 | 20 | #if defined(ASIO_HAS_EPOLL) 21 | # include "asio/detail/epoll_reactor.hpp" 22 | #elif defined(ASIO_HAS_KQUEUE) 23 | # include "asio/detail/kqueue_reactor.hpp" 24 | #elif defined(ASIO_HAS_DEV_POLL) 25 | # include "asio/detail/dev_poll_reactor.hpp" 26 | #elif defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME) 27 | # include "asio/detail/null_reactor.hpp" 28 | #else 29 | # include "asio/detail/select_reactor.hpp" 30 | #endif 31 | 32 | #endif // ASIO_DETAIL_REACTOR_HPP 33 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/reactor_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/reactor_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REACTOR_FWD_HPP 12 | #define ASIO_DETAIL_REACTOR_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace asio { 21 | namespace detail { 22 | 23 | #if defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME) 24 | typedef class null_reactor reactor; 25 | #elif defined(ASIO_HAS_IOCP) 26 | typedef class select_reactor reactor; 27 | #elif defined(ASIO_HAS_EPOLL) 28 | typedef class epoll_reactor reactor; 29 | #elif defined(ASIO_HAS_KQUEUE) 30 | typedef class kqueue_reactor reactor; 31 | #elif defined(ASIO_HAS_DEV_POLL) 32 | typedef class dev_poll_reactor reactor; 33 | #else 34 | typedef class select_reactor reactor; 35 | #endif 36 | 37 | } // namespace detail 38 | } // namespace asio 39 | 40 | #endif // ASIO_DETAIL_REACTOR_FWD_HPP 41 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/regex_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/regex_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_REGEX_FWD_HPP 12 | #define ASIO_DETAIL_REGEX_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if defined(ASIO_HAS_BOOST_REGEX) 19 | 20 | #include 21 | #include 22 | 23 | namespace boost { 24 | 25 | template 26 | struct sub_match; 27 | 28 | template 29 | class match_results; 30 | 31 | } // namespace boost 32 | 33 | #endif // defined(ASIO_HAS_BOOST_REGEX) 34 | 35 | #endif // ASIO_DETAIL_REGEX_FWD_HPP 36 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/resolve_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/resolve_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_RESOLVE_OP_HPP 12 | #define ASIO_DETAIL_RESOLVE_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/error.hpp" 20 | #include "asio/detail/operation.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace detail { 26 | 27 | class resolve_op : public operation 28 | { 29 | public: 30 | // The error code to be passed to the completion handler. 31 | asio::error_code ec_; 32 | 33 | protected: 34 | resolve_op(func_type complete_func) 35 | : operation(complete_func) 36 | { 37 | } 38 | }; 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // ASIO_DETAIL_RESOLVE_OP_HPP 46 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/scheduler_thread_info.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/scheduler_thread_info.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SCHEDULER_THREAD_INFO_HPP 12 | #define ASIO_DETAIL_SCHEDULER_THREAD_INFO_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/op_queue.hpp" 19 | #include "asio/detail/thread_info_base.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class scheduler; 27 | class scheduler_operation; 28 | 29 | struct scheduler_thread_info : public thread_info_base 30 | { 31 | op_queue private_op_queue; 32 | long private_outstanding_work; 33 | }; 34 | 35 | } // namespace detail 36 | } // namespace asio 37 | 38 | #include "asio/detail/pop_options.hpp" 39 | 40 | #endif // ASIO_DETAIL_SCHEDULER_THREAD_INFO_HPP 41 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/select_interrupter.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/select_interrupter.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SELECT_INTERRUPTER_HPP 12 | #define ASIO_DETAIL_SELECT_INTERRUPTER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_WINDOWS_RUNTIME) 21 | 22 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__) 23 | # include "asio/detail/socket_select_interrupter.hpp" 24 | #elif defined(ASIO_HAS_EVENTFD) 25 | # include "asio/detail/eventfd_select_interrupter.hpp" 26 | #else 27 | # include "asio/detail/pipe_select_interrupter.hpp" 28 | #endif 29 | 30 | namespace asio { 31 | namespace detail { 32 | 33 | #if defined(ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__) 34 | typedef socket_select_interrupter select_interrupter; 35 | #elif defined(ASIO_HAS_EVENTFD) 36 | typedef eventfd_select_interrupter select_interrupter; 37 | #else 38 | typedef pipe_select_interrupter select_interrupter; 39 | #endif 40 | 41 | } // namespace detail 42 | } // namespace asio 43 | 44 | #endif // !defined(ASIO_WINDOWS_RUNTIME) 45 | 46 | #endif // ASIO_DETAIL_SELECT_INTERRUPTER_HPP 47 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/signal_blocker.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_blocker.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SIGNAL_BLOCKER_HPP 12 | #define ASIO_DETAIL_SIGNAL_BLOCKER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_HAS_THREADS) || defined(ASIO_WINDOWS) \ 21 | || defined(ASIO_WINDOWS_RUNTIME) \ 22 | || defined(__CYGWIN__) || defined(__SYMBIAN32__) 23 | # include "asio/detail/null_signal_blocker.hpp" 24 | #elif defined(ASIO_HAS_PTHREADS) 25 | # include "asio/detail/posix_signal_blocker.hpp" 26 | #else 27 | # error Only Windows and POSIX are supported! 28 | #endif 29 | 30 | namespace asio { 31 | namespace detail { 32 | 33 | #if !defined(ASIO_HAS_THREADS) || defined(ASIO_WINDOWS) \ 34 | || defined(ASIO_WINDOWS_RUNTIME) \ 35 | || defined(__CYGWIN__) || defined(__SYMBIAN32__) 36 | typedef null_signal_blocker signal_blocker; 37 | #elif defined(ASIO_HAS_PTHREADS) 38 | typedef posix_signal_blocker signal_blocker; 39 | #endif 40 | 41 | } // namespace detail 42 | } // namespace asio 43 | 44 | #endif // ASIO_DETAIL_SIGNAL_BLOCKER_HPP 45 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/signal_init.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_init.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SIGNAL_INIT_HPP 12 | #define ASIO_DETAIL_SIGNAL_INIT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_WINDOWS) && !defined(__CYGWIN__) 21 | 22 | #include 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace detail { 28 | 29 | template 30 | class signal_init 31 | { 32 | public: 33 | // Constructor. 34 | signal_init() 35 | { 36 | std::signal(Signal, SIG_IGN); 37 | } 38 | }; 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // !defined(ASIO_WINDOWS) && !defined(__CYGWIN__) 46 | 47 | #endif // ASIO_DETAIL_SIGNAL_INIT_HPP 48 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/signal_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/signal_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SIGNAL_OP_HPP 12 | #define ASIO_DETAIL_SIGNAL_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class signal_op 27 | : public operation 28 | { 29 | public: 30 | // The error code to be passed to the completion handler. 31 | asio::error_code ec_; 32 | 33 | // The signal number to be passed to the completion handler. 34 | int signal_number_; 35 | 36 | protected: 37 | signal_op(func_type func) 38 | : operation(func), 39 | signal_number_(0) 40 | { 41 | } 42 | }; 43 | 44 | } // namespace detail 45 | } // namespace asio 46 | 47 | #include "asio/detail/pop_options.hpp" 48 | 49 | #endif // ASIO_DETAIL_SIGNAL_OP_HPP 50 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/solaris_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/solaris_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(__sun) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class solaris_fenced_block 31 | : private noncopyable 32 | { 33 | public: 34 | enum half_t { half }; 35 | enum full_t { full }; 36 | 37 | // Constructor for a half fenced block. 38 | explicit solaris_fenced_block(half_t) 39 | { 40 | } 41 | 42 | // Constructor for a full fenced block. 43 | explicit solaris_fenced_block(full_t) 44 | { 45 | membar_consumer(); 46 | } 47 | 48 | // Destructor. 49 | ~solaris_fenced_block() 50 | { 51 | membar_producer(); 52 | } 53 | }; 54 | 55 | } // namespace detail 56 | } // namespace asio 57 | 58 | #include "asio/detail/pop_options.hpp" 59 | 60 | #endif // defined(__sun) 61 | 62 | #endif // ASIO_DETAIL_SOLARIS_FENCED_BLOCK_HPP 63 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/std_fenced_block.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_fenced_block.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STD_FENCED_BLOCK_HPP 12 | #define ASIO_DETAIL_STD_FENCED_BLOCK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_ATOMIC) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | 25 | #include "asio/detail/push_options.hpp" 26 | 27 | namespace asio { 28 | namespace detail { 29 | 30 | class std_fenced_block 31 | : private noncopyable 32 | { 33 | public: 34 | enum half_t { half }; 35 | enum full_t { full }; 36 | 37 | // Constructor for a half fenced block. 38 | explicit std_fenced_block(half_t) 39 | { 40 | } 41 | 42 | // Constructor for a full fenced block. 43 | explicit std_fenced_block(full_t) 44 | { 45 | std::atomic_thread_fence(std::memory_order_acquire); 46 | } 47 | 48 | // Destructor. 49 | ~std_fenced_block() 50 | { 51 | std::atomic_thread_fence(std::memory_order_release); 52 | } 53 | }; 54 | 55 | } // namespace detail 56 | } // namespace asio 57 | 58 | #include "asio/detail/pop_options.hpp" 59 | 60 | #endif // defined(ASIO_HAS_STD_ATOMIC) 61 | 62 | #endif // ASIO_DETAIL_STD_FENCED_BLOCK_HPP 63 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/std_mutex.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/std_mutex.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STD_MUTEX_HPP 12 | #define ASIO_DETAIL_STD_MUTEX_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 21 | 22 | #include 23 | #include "asio/detail/noncopyable.hpp" 24 | #include "asio/detail/scoped_lock.hpp" 25 | 26 | #include "asio/detail/push_options.hpp" 27 | 28 | namespace asio { 29 | namespace detail { 30 | 31 | class std_event; 32 | 33 | class std_mutex 34 | : private noncopyable 35 | { 36 | public: 37 | typedef asio::detail::scoped_lock scoped_lock; 38 | 39 | // Constructor. 40 | std_mutex() 41 | { 42 | } 43 | 44 | // Destructor. 45 | ~std_mutex() 46 | { 47 | } 48 | 49 | // Lock the mutex. 50 | void lock() 51 | { 52 | mutex_.lock(); 53 | } 54 | 55 | // Unlock the mutex. 56 | void unlock() 57 | { 58 | mutex_.unlock(); 59 | } 60 | 61 | private: 62 | friend class std_event; 63 | std::mutex mutex_; 64 | }; 65 | 66 | } // namespace detail 67 | } // namespace asio 68 | 69 | #include "asio/detail/pop_options.hpp" 70 | 71 | #endif // defined(ASIO_HAS_STD_MUTEX_AND_CONDVAR) 72 | 73 | #endif // ASIO_DETAIL_STD_MUTEX_HPP 74 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/string_view.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/string_view.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_STRING_VIEW_HPP 12 | #define ASIO_DETAIL_STRING_VIEW_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_STRING_VIEW) 21 | 22 | #if defined(ASIO_HAS_STD_STRING_VIEW) 23 | # include 24 | #elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) 25 | # include 26 | #else // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) 27 | # error ASIO_HAS_STRING_VIEW is set but no string_view is available 28 | #endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) 29 | 30 | namespace asio { 31 | 32 | #if defined(ASIO_HAS_STD_STRING_VIEW) 33 | using std::basic_string_view; 34 | using std::string_view; 35 | #elif defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) 36 | using std::experimental::basic_string_view; 37 | using std::experimental::string_view; 38 | #endif // defined(ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW) 39 | 40 | } // namespace asio 41 | 42 | # define ASIO_STRING_VIEW_PARAM asio::string_view 43 | #else // defined(ASIO_HAS_STRING_VIEW) 44 | # define ASIO_STRING_VIEW_PARAM const std::string& 45 | #endif // defined(ASIO_HAS_STRING_VIEW) 46 | 47 | #endif // ASIO_DETAIL_STRING_VIEW_HPP 48 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/thread_context.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/thread_context.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_THREAD_CONTEXT_HPP 12 | #define ASIO_DETAIL_THREAD_CONTEXT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include 19 | #include 20 | #include "asio/detail/call_stack.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace detail { 26 | 27 | class thread_info_base; 28 | 29 | // Base class for things that manage threads (scheduler, win_iocp_io_context). 30 | class thread_context 31 | { 32 | public: 33 | // Per-thread call stack to track the state of each thread in the context. 34 | typedef call_stack thread_call_stack; 35 | }; 36 | 37 | } // namespace detail 38 | } // namespace asio 39 | 40 | #include "asio/detail/pop_options.hpp" 41 | 42 | #endif // ASIO_DETAIL_THREAD_CONTEXT_HPP 43 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/throw_error.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/throw_error.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_THROW_ERROR_HPP 12 | #define ASIO_DETAIL_THROW_ERROR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/error_code.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | ASIO_DECL void do_throw_error(const asio::error_code& err); 27 | 28 | ASIO_DECL void do_throw_error(const asio::error_code& err, 29 | const char* location); 30 | 31 | inline void throw_error(const asio::error_code& err) 32 | { 33 | if (err) 34 | do_throw_error(err); 35 | } 36 | 37 | inline void throw_error(const asio::error_code& err, 38 | const char* location) 39 | { 40 | if (err) 41 | do_throw_error(err, location); 42 | } 43 | 44 | } // namespace detail 45 | } // namespace asio 46 | 47 | #include "asio/detail/pop_options.hpp" 48 | 49 | #if defined(ASIO_HEADER_ONLY) 50 | # include "asio/detail/impl/throw_error.ipp" 51 | #endif // defined(ASIO_HEADER_ONLY) 52 | 53 | #endif // ASIO_DETAIL_THROW_ERROR_HPP 54 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/throw_exception.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/throw_exception.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_THROW_EXCEPTION_HPP 12 | #define ASIO_DETAIL_THROW_EXCEPTION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 21 | # include 22 | #endif // defined(ASIO_BOOST_THROW_EXCEPTION) 23 | 24 | namespace asio { 25 | namespace detail { 26 | 27 | #if defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 28 | using boost::throw_exception; 29 | #else // defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 30 | 31 | // Declare the throw_exception function for all targets. 32 | template 33 | void throw_exception(const Exception& e); 34 | 35 | // Only define the throw_exception function when exceptions are enabled. 36 | // Otherwise, it is up to the application to provide a definition of this 37 | // function. 38 | # if !defined(ASIO_NO_EXCEPTIONS) 39 | template 40 | void throw_exception(const Exception& e) 41 | { 42 | throw e; 43 | } 44 | # endif // !defined(ASIO_NO_EXCEPTIONS) 45 | 46 | #endif // defined(ASIO_HAS_BOOST_THROW_EXCEPTION) 47 | 48 | } // namespace detail 49 | } // namespace asio 50 | 51 | #endif // ASIO_DETAIL_THROW_EXCEPTION_HPP 52 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/timer_scheduler.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/timer_scheduler.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_TIMER_SCHEDULER_HPP 12 | #define ASIO_DETAIL_TIMER_SCHEDULER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/timer_scheduler_fwd.hpp" 20 | 21 | #if defined(ASIO_WINDOWS_RUNTIME) 22 | # include "asio/detail/winrt_timer_scheduler.hpp" 23 | #elif defined(ASIO_HAS_IOCP) 24 | # include "asio/detail/win_iocp_io_context.hpp" 25 | #elif defined(ASIO_HAS_EPOLL) 26 | # include "asio/detail/epoll_reactor.hpp" 27 | #elif defined(ASIO_HAS_KQUEUE) 28 | # include "asio/detail/kqueue_reactor.hpp" 29 | #elif defined(ASIO_HAS_DEV_POLL) 30 | # include "asio/detail/dev_poll_reactor.hpp" 31 | #else 32 | # include "asio/detail/select_reactor.hpp" 33 | #endif 34 | 35 | #endif // ASIO_DETAIL_TIMER_SCHEDULER_HPP 36 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/timer_scheduler_fwd.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/timer_scheduler_fwd.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP 12 | #define ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | namespace asio { 21 | namespace detail { 22 | 23 | #if defined(ASIO_WINDOWS_RUNTIME) 24 | typedef class winrt_timer_scheduler timer_scheduler; 25 | #elif defined(ASIO_HAS_IOCP) 26 | typedef class win_iocp_io_context timer_scheduler; 27 | #elif defined(ASIO_HAS_EPOLL) 28 | typedef class epoll_reactor timer_scheduler; 29 | #elif defined(ASIO_HAS_KQUEUE) 30 | typedef class kqueue_reactor timer_scheduler; 31 | #elif defined(ASIO_HAS_DEV_POLL) 32 | typedef class dev_poll_reactor timer_scheduler; 33 | #else 34 | typedef class select_reactor timer_scheduler; 35 | #endif 36 | 37 | } // namespace detail 38 | } // namespace asio 39 | 40 | #endif // ASIO_DETAIL_TIMER_SCHEDULER_FWD_HPP 41 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/wait_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/wait_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_WAIT_OP_HPP 12 | #define ASIO_DETAIL_WAIT_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/operation.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace detail { 25 | 26 | class wait_op 27 | : public operation 28 | { 29 | public: 30 | // The error code to be passed to the completion handler. 31 | asio::error_code ec_; 32 | 33 | protected: 34 | wait_op(func_type func) 35 | : operation(func) 36 | { 37 | } 38 | }; 39 | 40 | } // namespace detail 41 | } // namespace asio 42 | 43 | #include "asio/detail/pop_options.hpp" 44 | 45 | #endif // ASIO_DETAIL_WAIT_OP_HPP 46 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/detail/win_iocp_thread_info.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // detail/win_iocp_thread_info.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP 12 | #define ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/thread_info_base.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace detail { 24 | 25 | struct win_iocp_thread_info : public thread_info_base 26 | { 27 | }; 28 | 29 | } // namespace detail 30 | } // namespace asio 31 | 32 | #include "asio/detail/pop_options.hpp" 33 | 34 | #endif // ASIO_DETAIL_WIN_IOCP_THREAD_INFO_HPP 35 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/experimental.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // experimental.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2017 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_EXPERIMENTAL_HPP 12 | #define ASIO_EXPERIMENTAL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/experimental/co_spawn.hpp" 19 | #include "asio/experimental/detached.hpp" 20 | #include "asio/experimental/redirect_error.hpp" 21 | 22 | #endif // ASIO_EXPERIMENTAL_HPP 23 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/high_resolution_timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // high_resolution_timer.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_HIGH_RESOLUTION_TIMER_HPP 12 | #define ASIO_HIGH_RESOLUTION_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) 21 | 22 | #include "asio/basic_waitable_timer.hpp" 23 | #include "asio/detail/chrono.hpp" 24 | 25 | namespace asio { 26 | 27 | /// Typedef for a timer based on the high resolution clock. 28 | /** 29 | * This typedef uses the C++11 @c <chrono> standard library facility, if 30 | * available. Otherwise, it may use the Boost.Chrono library. To explicitly 31 | * utilise Boost.Chrono, use the basic_waitable_timer template directly: 32 | * @code 33 | * typedef basic_waitable_timer timer; 34 | * @endcode 35 | */ 36 | typedef basic_waitable_timer< 37 | chrono::high_resolution_clock> 38 | high_resolution_timer; 39 | 40 | } // namespace asio 41 | 42 | #endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) 43 | 44 | #endif // ASIO_HIGH_RESOLUTION_TIMER_HPP 45 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/impl/executor.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/executor.ipp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IMPL_EXECUTOR_IPP 12 | #define ASIO_IMPL_EXECUTOR_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/executor.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | 25 | bad_executor::bad_executor() ASIO_NOEXCEPT 26 | { 27 | } 28 | 29 | const char* bad_executor::what() const ASIO_NOEXCEPT_OR_NOTHROW 30 | { 31 | return "bad executor"; 32 | } 33 | 34 | } // namespace asio 35 | 36 | #include "asio/detail/pop_options.hpp" 37 | 38 | #endif // ASIO_IMPL_EXECUTOR_IPP 39 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/impl/serial_port_base.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/serial_port_base.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) 7 | // 8 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 9 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 10 | // 11 | 12 | #ifndef ASIO_IMPL_SERIAL_PORT_BASE_HPP 13 | #define ASIO_IMPL_SERIAL_PORT_BASE_HPP 14 | 15 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 | # pragma once 17 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 | 19 | #include "asio/detail/push_options.hpp" 20 | 21 | namespace asio { 22 | 23 | inline serial_port_base::baud_rate::baud_rate(unsigned int rate) 24 | : value_(rate) 25 | { 26 | } 27 | 28 | inline unsigned int serial_port_base::baud_rate::value() const 29 | { 30 | return value_; 31 | } 32 | 33 | inline serial_port_base::flow_control::type 34 | serial_port_base::flow_control::value() const 35 | { 36 | return value_; 37 | } 38 | 39 | inline serial_port_base::parity::type serial_port_base::parity::value() const 40 | { 41 | return value_; 42 | } 43 | 44 | inline serial_port_base::stop_bits::type 45 | serial_port_base::stop_bits::value() const 46 | { 47 | return value_; 48 | } 49 | 50 | inline unsigned int serial_port_base::character_size::value() const 51 | { 52 | return value_; 53 | } 54 | 55 | } // namespace asio 56 | 57 | #include "asio/detail/pop_options.hpp" 58 | 59 | #endif // ASIO_IMPL_SERIAL_PORT_BASE_HPP 60 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/impl/src.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/src.cpp 3 | // ~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #if defined(_MSC_VER) \ 12 | || defined(__BORLANDC__) \ 13 | || defined(__DMC__) 14 | # pragma message ( \ 15 | "This file is deprecated. " \ 16 | "Please #include instead.") 17 | #elif defined(__GNUC__) \ 18 | || defined(__HP_aCC) \ 19 | || defined(__SUNPRO_CC) \ 20 | || defined(__IBMCPP__) 21 | # warning "This file is deprecated." 22 | # warning "Please #include instead." 23 | #endif 24 | 25 | #include "asio/impl/src.hpp" 26 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/impl/system_context.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/system_context.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IMPL_SYSTEM_CONTEXT_HPP 12 | #define ASIO_IMPL_SYSTEM_CONTEXT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/system_executor.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | 24 | inline system_context::executor_type 25 | system_context::get_executor() ASIO_NOEXCEPT 26 | { 27 | return system_executor(); 28 | } 29 | 30 | } // namespace asio 31 | 32 | #include "asio/detail/pop_options.hpp" 33 | 34 | #endif // ASIO_IMPL_SYSTEM_CONTEXT_HPP 35 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/io_service.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // io_service.hpp 3 | // ~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IO_SERVICE_HPP 12 | #define ASIO_IO_SERVICE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/io_context.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | 24 | #if !defined(ASIO_NO_DEPRECATED) 25 | /// Typedef for backwards compatibility. 26 | typedef io_context io_service; 27 | #endif // !defined(ASIO_NO_DEPRECATED) 28 | 29 | } // namespace asio 30 | 31 | #include "asio/detail/pop_options.hpp" 32 | 33 | #endif // ASIO_IO_SERVICE_HPP 34 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/io_service_strand.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // io_service_strand.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IO_SERVICE_STRAND_HPP 12 | #define ASIO_IO_SERVICE_STRAND_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/io_context_strand.hpp" 19 | 20 | #endif // ASIO_IO_SERVICE_STRAND_HPP 21 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ip/bad_address_cast.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/bad_address_cast.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_BAD_ADDRESS_CAST_HPP 12 | #define ASIO_IP_BAD_ADDRESS_CAST_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace ip { 25 | 26 | /// Thrown to indicate a failed address conversion. 27 | class bad_address_cast : 28 | #if defined(ASIO_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS 29 | public std::exception 30 | #else 31 | public std::bad_cast 32 | #endif 33 | { 34 | public: 35 | /// Default constructor. 36 | bad_address_cast() {} 37 | 38 | /// Destructor. 39 | virtual ~bad_address_cast() ASIO_NOEXCEPT_OR_NOTHROW {} 40 | 41 | /// Get the message associated with the exception. 42 | virtual const char* what() const ASIO_NOEXCEPT_OR_NOTHROW 43 | { 44 | return "bad address cast"; 45 | } 46 | }; 47 | 48 | } // namespace ip 49 | } // namespace asio 50 | 51 | #include "asio/detail/pop_options.hpp" 52 | 53 | #endif // ASIO_IP_ADDRESS_HPP 54 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ip/host_name.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/host_name.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_HOST_NAME_HPP 12 | #define ASIO_IP_HOST_NAME_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include 20 | #include "asio/error_code.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | /// Get the current host name. 28 | ASIO_DECL std::string host_name(); 29 | 30 | /// Get the current host name. 31 | ASIO_DECL std::string host_name(asio::error_code& ec); 32 | 33 | } // namespace ip 34 | } // namespace asio 35 | 36 | #include "asio/detail/pop_options.hpp" 37 | 38 | #if defined(ASIO_HEADER_ONLY) 39 | # include "asio/ip/impl/host_name.ipp" 40 | #endif // defined(ASIO_HEADER_ONLY) 41 | 42 | #endif // ASIO_IP_HOST_NAME_HPP 43 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ip/impl/basic_endpoint.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/basic_endpoint.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 12 | #define ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | template 28 | std::basic_ostream& operator<<( 29 | std::basic_ostream& os, 30 | const basic_endpoint& endpoint) 31 | { 32 | asio::ip::detail::endpoint tmp_ep(endpoint.address(), endpoint.port()); 33 | return os << tmp_ep.to_string().c_str(); 34 | } 35 | 36 | } // namespace ip 37 | } // namespace asio 38 | 39 | #include "asio/detail/pop_options.hpp" 40 | 41 | #endif // !defined(ASIO_NO_IOSTREAM) 42 | 43 | #endif // ASIO_IP_IMPL_BASIC_ENDPOINT_HPP 44 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ip/impl/host_name.ipp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/host_name.ipp 3 | // ~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_HOST_NAME_IPP 12 | #define ASIO_IP_IMPL_HOST_NAME_IPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/socket_ops.hpp" 20 | #include "asio/detail/throw_error.hpp" 21 | #include "asio/detail/winsock_init.hpp" 22 | #include "asio/ip/host_name.hpp" 23 | 24 | #include "asio/detail/push_options.hpp" 25 | 26 | namespace asio { 27 | namespace ip { 28 | 29 | std::string host_name() 30 | { 31 | char name[1024]; 32 | asio::error_code ec; 33 | if (asio::detail::socket_ops::gethostname(name, sizeof(name), ec) != 0) 34 | { 35 | asio::detail::throw_error(ec); 36 | return std::string(); 37 | } 38 | return std::string(name); 39 | } 40 | 41 | std::string host_name(asio::error_code& ec) 42 | { 43 | char name[1024]; 44 | if (asio::detail::socket_ops::gethostname(name, sizeof(name), ec) != 0) 45 | return std::string(); 46 | return std::string(name); 47 | } 48 | 49 | } // namespace ip 50 | } // namespace asio 51 | 52 | #include "asio/detail/pop_options.hpp" 53 | 54 | #endif // ASIO_IP_IMPL_HOST_NAME_IPP 55 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ip/impl/network_v4.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/network_v4.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com) 7 | // 8 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 9 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 10 | // 11 | 12 | #ifndef ASIO_IP_IMPL_NETWORK_V4_HPP 13 | #define ASIO_IP_IMPL_NETWORK_V4_HPP 14 | 15 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 | # pragma once 17 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 | 19 | #if !defined(ASIO_NO_IOSTREAM) 20 | 21 | #include "asio/detail/throw_error.hpp" 22 | 23 | #include "asio/detail/push_options.hpp" 24 | 25 | namespace asio { 26 | namespace ip { 27 | 28 | template 29 | std::basic_ostream& operator<<( 30 | std::basic_ostream& os, const network_v4& addr) 31 | { 32 | asio::error_code ec; 33 | std::string s = addr.to_string(ec); 34 | if (ec) 35 | { 36 | if (os.exceptions() & std::basic_ostream::failbit) 37 | asio::detail::throw_error(ec); 38 | else 39 | os.setstate(std::basic_ostream::failbit); 40 | } 41 | else 42 | for (std::string::iterator i = s.begin(); i != s.end(); ++i) 43 | os << os.widen(*i); 44 | return os; 45 | } 46 | 47 | } // namespace ip 48 | } // namespace asio 49 | 50 | #include "asio/detail/pop_options.hpp" 51 | 52 | #endif // !defined(ASIO_NO_IOSTREAM) 53 | 54 | #endif // ASIO_IP_IMPL_NETWORK_V4_HPP 55 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ip/impl/network_v6.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/impl/network_v6.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_IMPL_NETWORK_V6_HPP 12 | #define ASIO_IP_IMPL_NETWORK_V6_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #if !defined(ASIO_NO_IOSTREAM) 19 | 20 | #include "asio/detail/throw_error.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ip { 26 | 27 | template 28 | std::basic_ostream& operator<<( 29 | std::basic_ostream& os, const network_v6& addr) 30 | { 31 | asio::error_code ec; 32 | std::string s = addr.to_string(ec); 33 | if (ec) 34 | { 35 | if (os.exceptions() & std::basic_ostream::failbit) 36 | asio::detail::throw_error(ec); 37 | else 38 | os.setstate(std::basic_ostream::failbit); 39 | } 40 | else 41 | for (std::string::iterator i = s.begin(); i != s.end(); ++i) 42 | os << os.widen(*i); 43 | return os; 44 | } 45 | 46 | } // namespace ip 47 | } // namespace asio 48 | 49 | #include "asio/detail/pop_options.hpp" 50 | 51 | #endif // !defined(ASIO_NO_IOSTREAM) 52 | 53 | #endif // ASIO_IP_IMPL_NETWORK_V6_HPP 54 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ip/resolver_query_base.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ip/resolver_query_base.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IP_RESOLVER_QUERY_BASE_HPP 12 | #define ASIO_IP_RESOLVER_QUERY_BASE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/ip/resolver_base.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | namespace ip { 25 | 26 | /// The resolver_query_base class is used as a base for the 27 | /// basic_resolver_query class templates to provide a common place to define 28 | /// the flag constants. 29 | class resolver_query_base : public resolver_base 30 | { 31 | protected: 32 | /// Protected destructor to prevent deletion through this type. 33 | ~resolver_query_base() 34 | { 35 | } 36 | }; 37 | 38 | } // namespace ip 39 | } // namespace asio 40 | 41 | #include "asio/detail/pop_options.hpp" 42 | 43 | #endif // ASIO_IP_RESOLVER_QUERY_BASE_HPP 44 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/is_executor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // is_executor.hpp 3 | // ~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_IS_EXECUTOR_HPP 12 | #define ASIO_IS_EXECUTOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/is_executor.hpp" 20 | 21 | #include "asio/detail/push_options.hpp" 22 | 23 | namespace asio { 24 | 25 | /// The is_executor trait detects whether a type T meets the Executor type 26 | /// requirements. 27 | /** 28 | * Class template @c is_executor is a UnaryTypeTrait that is derived from @c 29 | * true_type if the type @c T meets the syntactic requirements for Executor, 30 | * otherwise @c false_type. 31 | */ 32 | template 33 | struct is_executor 34 | #if defined(GENERATING_DOCUMENTATION) 35 | : integral_constant 36 | #else // defined(GENERATING_DOCUMENTATION) 37 | : asio::detail::is_executor 38 | #endif // defined(GENERATING_DOCUMENTATION) 39 | { 40 | }; 41 | 42 | } // namespace asio 43 | 44 | #include "asio/detail/pop_options.hpp" 45 | 46 | #endif // ASIO_IS_EXECUTOR_HPP 47 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ssl.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl.hpp 3 | // ~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_HPP 12 | #define ASIO_SSL_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/ssl/context.hpp" 19 | #include "asio/ssl/context_base.hpp" 20 | #include "asio/ssl/error.hpp" 21 | #include "asio/ssl/rfc2818_verification.hpp" 22 | #include "asio/ssl/stream.hpp" 23 | #include "asio/ssl/stream_base.hpp" 24 | #include "asio/ssl/verify_context.hpp" 25 | #include "asio/ssl/verify_mode.hpp" 26 | 27 | #endif // ASIO_SSL_HPP 28 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ssl/detail/handshake_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/handshake_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP 12 | #define ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/ssl/detail/engine.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ssl { 26 | namespace detail { 27 | 28 | class handshake_op 29 | { 30 | public: 31 | handshake_op(stream_base::handshake_type type) 32 | : type_(type) 33 | { 34 | } 35 | 36 | engine::want operator()(engine& eng, 37 | asio::error_code& ec, 38 | std::size_t& bytes_transferred) const 39 | { 40 | bytes_transferred = 0; 41 | return eng.handshake(type_, ec); 42 | } 43 | 44 | template 45 | void call_handler(Handler& handler, 46 | const asio::error_code& ec, 47 | const std::size_t&) const 48 | { 49 | handler(ec); 50 | } 51 | 52 | private: 53 | stream_base::handshake_type type_; 54 | }; 55 | 56 | } // namespace detail 57 | } // namespace ssl 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP 63 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ssl/detail/openssl_types.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/openssl_types.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP 12 | #define ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | #include "asio/detail/socket_types.hpp" 20 | #include 21 | #include 22 | #if !defined(OPENSSL_NO_ENGINE) 23 | # include 24 | #endif // !defined(OPENSSL_NO_ENGINE) 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | #endif // ASIO_SSL_DETAIL_OPENSSL_TYPES_HPP 31 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ssl/detail/shutdown_op.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/shutdown_op.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP 12 | #define ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/ssl/detail/engine.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ssl { 26 | namespace detail { 27 | 28 | class shutdown_op 29 | { 30 | public: 31 | engine::want operator()(engine& eng, 32 | asio::error_code& ec, 33 | std::size_t& bytes_transferred) const 34 | { 35 | bytes_transferred = 0; 36 | return eng.shutdown(ec); 37 | } 38 | 39 | template 40 | void call_handler(Handler& handler, 41 | const asio::error_code& ec, 42 | const std::size_t&) const 43 | { 44 | handler(ec); 45 | } 46 | }; 47 | 48 | } // namespace detail 49 | } // namespace ssl 50 | } // namespace asio 51 | 52 | #include "asio/detail/pop_options.hpp" 53 | 54 | #endif // ASIO_SSL_DETAIL_SHUTDOWN_OP_HPP 55 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ssl/detail/verify_callback.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/detail/verify_callback.hpp 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP 12 | #define ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/ssl/verify_context.hpp" 21 | 22 | #include "asio/detail/push_options.hpp" 23 | 24 | namespace asio { 25 | namespace ssl { 26 | namespace detail { 27 | 28 | class verify_callback_base 29 | { 30 | public: 31 | virtual ~verify_callback_base() 32 | { 33 | } 34 | 35 | virtual bool call(bool preverified, verify_context& ctx) = 0; 36 | }; 37 | 38 | template 39 | class verify_callback : public verify_callback_base 40 | { 41 | public: 42 | explicit verify_callback(VerifyCallback callback) 43 | : callback_(callback) 44 | { 45 | } 46 | 47 | virtual bool call(bool preverified, verify_context& ctx) 48 | { 49 | return callback_(preverified, ctx); 50 | } 51 | 52 | private: 53 | VerifyCallback callback_; 54 | }; 55 | 56 | } // namespace detail 57 | } // namespace ssl 58 | } // namespace asio 59 | 60 | #include "asio/detail/pop_options.hpp" 61 | 62 | #endif // ASIO_SSL_DETAIL_VERIFY_CALLBACK_HPP 63 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ssl/impl/src.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // impl/ssl/src.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_IMPL_SRC_HPP 12 | #define ASIO_SSL_IMPL_SRC_HPP 13 | 14 | #define ASIO_SOURCE 15 | 16 | #include "asio/detail/config.hpp" 17 | 18 | #if defined(ASIO_HEADER_ONLY) 19 | # error Do not compile Asio library source with ASIO_HEADER_ONLY defined 20 | #endif 21 | 22 | #include "asio/ssl/impl/context.ipp" 23 | #include "asio/ssl/impl/error.ipp" 24 | #include "asio/ssl/detail/impl/engine.ipp" 25 | #include "asio/ssl/detail/impl/openssl_init.ipp" 26 | #include "asio/ssl/impl/rfc2818_verification.ipp" 27 | 28 | #endif // ASIO_SSL_IMPL_SRC_HPP 29 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ssl/stream_base.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ssl/stream_base.hpp 3 | // ~~~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SSL_STREAM_BASE_HPP 12 | #define ASIO_SSL_STREAM_BASE_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #include "asio/detail/push_options.hpp" 21 | 22 | namespace asio { 23 | namespace ssl { 24 | 25 | /// The stream_base class is used as a base for the asio::ssl::stream 26 | /// class template so that we have a common place to define various enums. 27 | class stream_base 28 | { 29 | public: 30 | /// Different handshake types. 31 | enum handshake_type 32 | { 33 | /// Perform handshaking as a client. 34 | client, 35 | 36 | /// Perform handshaking as a server. 37 | server 38 | }; 39 | 40 | protected: 41 | /// Protected destructor to prevent deletion through this type. 42 | ~stream_base() 43 | { 44 | } 45 | }; 46 | 47 | } // namespace ssl 48 | } // namespace asio 49 | 50 | #include "asio/detail/pop_options.hpp" 51 | 52 | #endif // ASIO_SSL_STREAM_BASE_HPP 53 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/steady_timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // steady_timer.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_STEADY_TIMER_HPP 12 | #define ASIO_STEADY_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) 21 | 22 | #include "asio/basic_waitable_timer.hpp" 23 | #include "asio/detail/chrono.hpp" 24 | 25 | namespace asio { 26 | 27 | /// Typedef for a timer based on the steady clock. 28 | /** 29 | * This typedef uses the C++11 @c <chrono> standard library facility, if 30 | * available. Otherwise, it may use the Boost.Chrono library. To explicitly 31 | * utilise Boost.Chrono, use the basic_waitable_timer template directly: 32 | * @code 33 | * typedef basic_waitable_timer timer; 34 | * @endcode 35 | */ 36 | typedef basic_waitable_timer steady_timer; 37 | 38 | } // namespace asio 39 | 40 | #endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) 41 | 42 | #endif // ASIO_STEADY_TIMER_HPP 43 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/streambuf.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // streambuf.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_STREAMBUF_HPP 12 | #define ASIO_STREAMBUF_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if !defined(ASIO_NO_IOSTREAM) 21 | 22 | #include "asio/basic_streambuf.hpp" 23 | 24 | namespace asio { 25 | 26 | /// Typedef for the typical usage of basic_streambuf. 27 | typedef basic_streambuf<> streambuf; 28 | 29 | } // namespace asio 30 | 31 | #endif // !defined(ASIO_NO_IOSTREAM) 32 | 33 | #endif // ASIO_STREAMBUF_HPP 34 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/system_timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // system_timer.hpp 3 | // ~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_SYSTEM_TIMER_HPP 12 | #define ASIO_SYSTEM_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/config.hpp" 19 | 20 | #if defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) 21 | 22 | #include "asio/basic_waitable_timer.hpp" 23 | #include "asio/detail/chrono.hpp" 24 | 25 | namespace asio { 26 | 27 | /// Typedef for a timer based on the system clock. 28 | /** 29 | * This typedef uses the C++11 @c <chrono> standard library facility, if 30 | * available. Otherwise, it may use the Boost.Chrono library. To explicitly 31 | * utilise Boost.Chrono, use the basic_waitable_timer template directly: 32 | * @code 33 | * typedef basic_waitable_timer timer; 34 | * @endcode 35 | */ 36 | typedef basic_waitable_timer system_timer; 37 | 38 | } // namespace asio 39 | 40 | #endif // defined(ASIO_HAS_CHRONO) || defined(GENERATING_DOCUMENTATION) 41 | 42 | #endif // ASIO_SYSTEM_TIMER_HPP 43 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ts/buffer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/buffer.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_BUFFER_HPP 12 | #define ASIO_TS_BUFFER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/buffer.hpp" 19 | #include "asio/completion_condition.hpp" 20 | #include "asio/read.hpp" 21 | #include "asio/write.hpp" 22 | #include "asio/read_until.hpp" 23 | 24 | #endif // ASIO_TS_BUFFER_HPP 25 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ts/executor.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/executor.hpp 3 | // ~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_EXECUTOR_HPP 12 | #define ASIO_TS_EXECUTOR_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/handler_type.hpp" 19 | #include "asio/async_result.hpp" 20 | #include "asio/associated_allocator.hpp" 21 | #include "asio/execution_context.hpp" 22 | #include "asio/is_executor.hpp" 23 | #include "asio/associated_executor.hpp" 24 | #include "asio/bind_executor.hpp" 25 | #include "asio/executor_work_guard.hpp" 26 | #include "asio/system_executor.hpp" 27 | #include "asio/executor.hpp" 28 | #include "asio/dispatch.hpp" 29 | #include "asio/post.hpp" 30 | #include "asio/defer.hpp" 31 | #include "asio/strand.hpp" 32 | #include "asio/packaged_task.hpp" 33 | #include "asio/use_future.hpp" 34 | 35 | #endif // ASIO_TS_EXECUTOR_HPP 36 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ts/internet.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/internet.hpp 3 | // ~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_INTERNET_HPP 12 | #define ASIO_TS_INTERNET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/ip/address.hpp" 19 | #include "asio/ip/address_v4.hpp" 20 | #include "asio/ip/address_v4_iterator.hpp" 21 | #include "asio/ip/address_v4_range.hpp" 22 | #include "asio/ip/address_v6.hpp" 23 | #include "asio/ip/address_v6_iterator.hpp" 24 | #include "asio/ip/address_v6_range.hpp" 25 | #include "asio/ip/bad_address_cast.hpp" 26 | #include "asio/ip/basic_endpoint.hpp" 27 | #include "asio/ip/basic_resolver_query.hpp" 28 | #include "asio/ip/basic_resolver_entry.hpp" 29 | #include "asio/ip/basic_resolver_iterator.hpp" 30 | #include "asio/ip/basic_resolver.hpp" 31 | #include "asio/ip/host_name.hpp" 32 | #include "asio/ip/network_v4.hpp" 33 | #include "asio/ip/network_v6.hpp" 34 | #include "asio/ip/tcp.hpp" 35 | #include "asio/ip/udp.hpp" 36 | #include "asio/ip/v6_only.hpp" 37 | #include "asio/ip/unicast.hpp" 38 | #include "asio/ip/multicast.hpp" 39 | 40 | #endif // ASIO_TS_INTERNET_HPP 41 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ts/io_context.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/io_context.hpp 3 | // ~~~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_IO_CONTEXT_HPP 12 | #define ASIO_TS_IO_CONTEXT_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/io_context.hpp" 19 | 20 | #endif // ASIO_TS_IO_CONTEXT_HPP 21 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ts/net.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/net.hpp 3 | // ~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_NET_HPP 12 | #define ASIO_TS_NET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/ts/netfwd.hpp" 19 | #include "asio/ts/executor.hpp" 20 | #include "asio/ts/io_context.hpp" 21 | #include "asio/ts/timer.hpp" 22 | #include "asio/ts/buffer.hpp" 23 | #include "asio/ts/socket.hpp" 24 | #include "asio/ts/internet.hpp" 25 | 26 | #endif // ASIO_TS_NET_HPP 27 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ts/socket.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/socket.hpp 3 | // ~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_SOCKET_HPP 12 | #define ASIO_TS_SOCKET_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/socket_base.hpp" 19 | #include "asio/basic_socket.hpp" 20 | #include "asio/basic_datagram_socket.hpp" 21 | #include "asio/basic_stream_socket.hpp" 22 | #include "asio/basic_socket_acceptor.hpp" 23 | #include "asio/basic_socket_streambuf.hpp" 24 | #include "asio/basic_socket_iostream.hpp" 25 | #include "asio/connect.hpp" 26 | 27 | #endif // ASIO_TS_SOCKET_HPP 28 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/ts/timer.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // ts/timer.hpp 3 | // ~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_TS_TIMER_HPP 12 | #define ASIO_TS_TIMER_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/chrono.hpp" 19 | 20 | #include "asio/wait_traits.hpp" 21 | #include "asio/basic_waitable_timer.hpp" 22 | #include "asio/system_timer.hpp" 23 | #include "asio/steady_timer.hpp" 24 | #include "asio/high_resolution_timer.hpp" 25 | 26 | #endif // ASIO_TS_TIMER_HPP 27 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/unyield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // unyield.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifdef reenter 12 | # undef reenter 13 | #endif 14 | 15 | #ifdef yield 16 | # undef yield 17 | #endif 18 | 19 | #ifdef fork 20 | # undef fork 21 | #endif 22 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/version.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // version.hpp 3 | // ~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_VERSION_HPP 12 | #define ASIO_VERSION_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | // ASIO_VERSION % 100 is the sub-minor version 19 | // ASIO_VERSION / 100 % 1000 is the minor version 20 | // ASIO_VERSION / 100000 is the major version 21 | #define ASIO_VERSION 101202 // 1.12.2 22 | 23 | #endif // ASIO_VERSION_HPP 24 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/wait_traits.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // wait_traits.hpp 3 | // ~~~~~~~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #ifndef ASIO_WAIT_TRAITS_HPP 12 | #define ASIO_WAIT_TRAITS_HPP 13 | 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 15 | # pragma once 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 17 | 18 | #include "asio/detail/push_options.hpp" 19 | 20 | namespace asio { 21 | 22 | /// Wait traits suitable for use with the basic_waitable_timer class template. 23 | template 24 | struct wait_traits 25 | { 26 | /// Convert a clock duration into a duration used for waiting. 27 | /** 28 | * @returns @c d. 29 | */ 30 | static typename Clock::duration to_wait_duration( 31 | const typename Clock::duration& d) 32 | { 33 | return d; 34 | } 35 | 36 | /// Convert a clock duration into a duration used for waiting. 37 | /** 38 | * @returns @c d. 39 | */ 40 | static typename Clock::duration to_wait_duration( 41 | const typename Clock::time_point& t) 42 | { 43 | typename Clock::time_point now = Clock::now(); 44 | if (now + (Clock::duration::max)() < t) 45 | return (Clock::duration::max)(); 46 | if (now + (Clock::duration::min)() > t) 47 | return (Clock::duration::min)(); 48 | return t - now; 49 | } 50 | }; 51 | 52 | } // namespace asio 53 | 54 | #include "asio/detail/pop_options.hpp" 55 | 56 | #endif // ASIO_WAIT_TRAITS_HPP 57 | -------------------------------------------------------------------------------- /3rdParty/asio/include/asio/yield.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // yield.hpp 3 | // ~~~~~~~~~ 4 | // 5 | // Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) 6 | // 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 9 | // 10 | 11 | #include "coroutine.hpp" 12 | 13 | #ifndef reenter 14 | # define reenter(c) ASIO_CORO_REENTER(c) 15 | #endif 16 | 17 | #ifndef yield 18 | # define yield ASIO_CORO_YIELD 19 | #endif 20 | 21 | #ifndef fork 22 | # define fork ASIO_CORO_FORK 23 | #endif 24 | -------------------------------------------------------------------------------- /3rdParty/libsodium/osxi386.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | export PREFIX="$(pwd)/libsodium-osx" 4 | export OSX_VERSION_MIN=${OSX_VERSION_MIN-"10.8"} 5 | export OSX_CPU_ARCH=${OSX_CPU_ARCH-"core2"} 6 | 7 | mkdir -p $PREFIX || exit 1 8 | 9 | export CFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=${OSX_VERSION_MIN} -march=${OSX_CPU_ARCH} -O2 -g" 10 | export LDFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=${OSX_VERSION_MIN} -march=${OSX_CPU_ARCH}" 11 | 12 | make distclean > /dev/null 13 | 14 | if [ -z "$LIBSODIUM_FULL_BUILD" ]; then 15 | export LIBSODIUM_ENABLE_MINIMAL_FLAG="--enable-minimal" 16 | else 17 | export LIBSODIUM_ENABLE_MINIMAL_FLAG="" 18 | fi 19 | 20 | ./configure ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \ 21 | --prefix="$PREFIX" || exit 1 22 | 23 | 24 | NPROCESSORS=$(getconf NPROCESSORS_ONLN 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null) 25 | PROCESSORS=${NPROCESSORS:-3} 26 | 27 | make -j${PROCESSORS} check && make -j${PROCESSORS} install || exit 1 28 | 29 | # Cleanup 30 | make distclean > /dev/null 31 | -------------------------------------------------------------------------------- /Brewfile: -------------------------------------------------------------------------------- 1 | brew "cmake" 2 | brew "sdl2_mixer" 3 | brew "sdl2_ttf" 4 | brew "libsodium" 5 | brew "pkg-config" 6 | -------------------------------------------------------------------------------- /Brewfile-32bit.rb: -------------------------------------------------------------------------------- 1 | brew "automake" 2 | brew "autoconf" 3 | brew "libtool" 4 | -------------------------------------------------------------------------------- /CMake/32bit.cmake: -------------------------------------------------------------------------------- 1 | message(STATUS "Using 32-bit toolchain") 2 | 3 | option(BUILD_SWITCH "Build with Nintendo Switch support" ON) 4 | 5 | ##################### 6 | # pplay executable 7 | ##################### 8 | add_executable(${CMAKE_PROJECT_NAME}.elf ${PPLAY_SRC}) 9 | target_include_directories(${CMAKE_PROJECT_NAME}.elf PRIVATE ${PPLAY_INC}) 10 | target_compile_options(${CMAKE_PROJECT_NAME}.elf PRIVATE ${PPLAY_CFLAGS}) 11 | target_compile_options(${CMAKE_PROJECT_NAME}.elf PRIVATE $<$:-fno-rtti>) 12 | target_link_libraries(${CMAKE_PROJECT_NAME}.elf cross2d mpv ${PPLAY_LDFLAGS}) -------------------------------------------------------------------------------- /CMake/mingwcc.cmake: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | 3 | SET(CROSS_PREFIX "/usr" CACHE STRING "crosstool-NG prefix") 4 | 5 | SET(CMAKE_SYSTEM_NAME Windows) 6 | 7 | # workaround 8 | list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "${CROSS_PREFIX}/i686-w64-mingw32/include") 9 | 10 | SET(CMAKE_C_COMPILER "i686-w64-mingw32-gcc") 11 | SET(CMAKE_CXX_COMPILER "i686-w64-mingw32-g++") 12 | 13 | SET(CMAKE_FIND_ROOT_PATH "${CROSS_PREFIX}/i686-w64-mingw32" "${CROSS_PREFIX}/i686-w64-mingw32/i686-w64-mingw32") 14 | 15 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 16 | 17 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 18 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 19 | -------------------------------------------------------------------------------- /CMake/out_of_tree.cmake: -------------------------------------------------------------------------------- 1 | if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) 2 | message(WARNING [[In-source build detected, please eg. create a new directory and use `cmake ..`]]) 3 | endif() 4 | -------------------------------------------------------------------------------- /Diablo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/Diablo.ico -------------------------------------------------------------------------------- /Diablo.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/Diablo.rc -------------------------------------------------------------------------------- /DiabloUI/creastat.cpp: -------------------------------------------------------------------------------- 1 | // ref: 0x1000523E 2 | BOOL __stdcall UiGetDefaultStats(int pclass, _uidefaultstats *pStats) 3 | { 4 | if (!pStats) 5 | return 0; 6 | pStats->strength = defstats[pclass][0]; 7 | pStats->magic = defstats[pclass][1]; 8 | pStats->dexterity = defstats[pclass][2]; 9 | pStats->vitality = defstats[pclass][3]; 10 | return 1; 11 | } 12 | 13 | // ref: 0x10005287 14 | void __cdecl CreaStat_cpp_init() 15 | { 16 | CreaStat_cpp_float = CreaStat_cpp_float_value; 17 | } 18 | // 1001F404: using guessed type int CreaStat_cpp_float_value; 19 | // 100296E0: using guessed type int CreaStat_cpp_float; 20 | -------------------------------------------------------------------------------- /DiabloUI/diabloui.def: -------------------------------------------------------------------------------- 1 | LIBRARY "DiabloUI" 2 | 3 | EXPORTS 4 | UiValidPlayerName 5 | UiAppActivate 6 | UiArtCallback 7 | UiAuthCallback 8 | UiBetaDisclaimer 9 | UiCategoryCallback 10 | UiCopyProtError 11 | UiCreateGameCallback 12 | UiCreateGameCriteria 13 | UiCreatePlayerDescription 14 | UiCreditsDialog 15 | UiDestroy 16 | UiDrawDescCallback 17 | UiGetDataCallback 18 | UiGetDefaultStats 19 | UiInitialize 20 | UiMainMenuDialog 21 | UiMessageBoxCallback 22 | UiOnPaint 23 | UiProfileCallback 24 | UiProfileDraw 25 | UiProfileGetString 26 | UiProgressDialog 27 | UiSelHeroMultDialog 28 | UiSelHeroSingDialog 29 | UiSelectGame 30 | UiSelectProvider 31 | UiSelectRegion 32 | UiSetBackgroundBitmap 33 | UiSetSpawned 34 | UiSetupPlayerInfo 35 | UiSoundCallback 36 | UiTitleDialog -------------------------------------------------------------------------------- /DiabloUI/titlesnd.cpp: -------------------------------------------------------------------------------- 1 | // ref: 0x10010306 2 | void __fastcall TitleSnd_SetSoundFunction(void(__stdcall *func)(char *file)) 3 | { 4 | gfnSoundFunction = func; 5 | } 6 | 7 | // ref: 0x1001030D 8 | void __cdecl TitleSnd_InitSoundFunc() 9 | { 10 | gfnSoundFunction = 0; 11 | } 12 | 13 | // ref: 0x10010315 14 | void __cdecl TitleSnd_PlayMoveSound() 15 | { 16 | if (gfnSoundFunction) 17 | gfnSoundFunction("sfx\\items\\titlemov.wav"); 18 | } 19 | 20 | // ref: 0x1001031F 21 | void __cdecl TitleSnd_PlaySelectSound() 22 | { 23 | if (gfnSoundFunction) 24 | gfnSoundFunction("sfx\\items\\titlslct.wav"); 25 | } 26 | 27 | // ref: 0x1001032E 28 | void __cdecl TitleSnd_cpp_init() 29 | { 30 | titlesnd_cpp_float = titlesnd_cpp_float_value; 31 | } 32 | // 1001F480: using guessed type int titlesnd_cpp_float_value; 33 | // 1002A590: using guessed type int titlesnd_cpp_float; 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /Packaging/fedora/devilutionx.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=devilutionX 3 | GenericName=DevilutionX 4 | Comment=Play Diablo I on Linux 5 | Exec=devilutionx 6 | Icon=/usr/share/pixmaps/devilutionx.ico 7 | Terminal=false 8 | Type=Application 9 | X-DCOP-ServiceType=Multi 10 | X-KDE-StartupNotify=true 11 | Categories=Qt;Game;RolePlaying; 12 | -------------------------------------------------------------------------------- /Source/.clang-format: -------------------------------------------------------------------------------- 1 | { 2 | BasedOnStyle: webkit, 3 | AlignTrailingComments: true, 4 | AllowShortBlocksOnASingleLine: true, 5 | AllowShortFunctionsOnASingleLine: None, 6 | PointerAlignment: Right, 7 | TabWidth: 4, 8 | UseTab: ForIndentation, 9 | } 10 | -------------------------------------------------------------------------------- /Source/appfat.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __APPFAT_H__ 3 | #define __APPFAT_H__ 4 | 5 | extern char sz_error_buf[256]; 6 | extern int terminating; // weak 7 | extern int cleanup_thread_id; // weak 8 | 9 | void TriggerBreak(); 10 | #ifdef _DEBUG 11 | LONG __stdcall BreakFilter(PEXCEPTION_POINTERS pExc); 12 | #endif 13 | char *GetErrorStr(DWORD error_code); 14 | void TraceErrorDD(HRESULT hError, char *pszBuffer, DWORD dwMaxChars); 15 | void TraceErrorDS(HRESULT hError, char *pszBuffer, DWORD dwMaxChars); 16 | char *TraceLastError(); 17 | void __cdecl app_fatal(const char *pszFmt, ...); 18 | void MsgBox(const char *pszFmt, va_list va); 19 | void FreeDlg(); 20 | void __cdecl DrawDlg(char *pszFmt, ...); 21 | #ifdef _DEBUG 22 | void assert_fail(int nLineNo, const char *pszFile, const char *pszFail); 23 | #endif 24 | void DDErrMsg(DWORD error_code, int log_line_nr, char *log_file_path); 25 | void DSErrMsg(DWORD error_code, int log_line_nr, char *log_file_path); 26 | void center_window(HWND hDlg); 27 | void ErrDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr); 28 | BOOL __stdcall FuncDlg(HWND hDlg, UINT uMsg, WPARAM wParam, char *text); 29 | void TextDlg(HWND hDlg, char *text); 30 | void ErrOkDlg(int template_id, DWORD error_code, char *log_file_path, int log_line_nr); 31 | void FileErrDlg(const char *error); 32 | void DiskFreeDlg(char *error); 33 | BOOL InsertCDDlg(); 34 | void DirErrorDlg(char *error); 35 | 36 | #endif /* __APPFAT_H__ */ 37 | -------------------------------------------------------------------------------- /Source/automap.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __AUTOMAP_H__ 3 | #define __AUTOMAP_H__ 4 | 5 | extern WORD automaptype[512]; 6 | extern BOOL automapflag; 7 | extern char AmShiftTab[32]; 8 | extern unsigned char automapview[DMAXX][DMAXY]; 9 | extern int AutoMapScale; 10 | extern int AutoMapXOfs; 11 | extern int AutoMapYOfs; 12 | extern int AutoMapPosBits; 13 | extern int AutoMapXPos; 14 | extern int AutoMapYPos; 15 | extern int AMPlayerX; 16 | extern int AMPlayerY; 17 | 18 | void InitAutomapOnce(); 19 | void InitAutomap(); 20 | void StartAutomap(); 21 | void AutomapUp(); 22 | void AutomapDown(); 23 | void AutomapLeft(); 24 | void AutomapRight(); 25 | void AutomapZoomIn(); 26 | void AutomapZoomOut(); 27 | void DrawAutomap(); 28 | void DrawAutomapType(int screen_x, int screen_y, WORD automap_type); 29 | void DrawAutomapPlr(); 30 | WORD GetAutomapType(int x, int y, BOOL view); 31 | void DrawAutomapGame(); 32 | void SetAutomapView(int x, int y); 33 | void AutomapZoomReset(); 34 | 35 | #endif /* __AUTOMAP_H__ */ 36 | -------------------------------------------------------------------------------- /Source/capture.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __CAPTURE_H__ 3 | #define __CAPTURE_H__ 4 | 5 | void CaptureScreen(); 6 | BOOL CaptureHdr(HANDLE hFile, short width, short height); 7 | BOOL CapturePal(HANDLE hFile, PALETTEENTRY *palette); 8 | BOOL CapturePix(HANDLE hFile, WORD width, WORD height, WORD stride, BYTE *pixels); 9 | BYTE *CaptureEnc(BYTE *src, BYTE *dst, int width); 10 | HANDLE CaptureFile(char *dst_path); 11 | void RedPalette(PALETTEENTRY *pal); 12 | 13 | #endif /* __CAPTURE_H__ */ 14 | -------------------------------------------------------------------------------- /Source/codec.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __CODEC_H__ 3 | #define __CODEC_H__ 4 | 5 | int codec_decode(BYTE *pbSrcDst, DWORD size, char *pszPassword); 6 | void codec_init_key(int unused, char *pszPassword); 7 | DWORD codec_get_encoded_len(DWORD dwSrcBytes); 8 | void codec_encode(BYTE* pbSrcDst, DWORD size, int size_64, char *pszPassword); 9 | 10 | #endif /* __CODEC_H__ */ 11 | -------------------------------------------------------------------------------- /Source/cursor.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __CURSOR_H__ 3 | #define __CURSOR_H__ 4 | 5 | extern int cursH; // weak 6 | extern int icursH28; // idb 7 | extern int cursW; // idb 8 | extern int pcursmonst; // idb 9 | extern int icursW28; // idb 10 | extern void *pCursCels; 11 | extern int icursH; // weak 12 | extern char pcursinvitem; // weak 13 | extern int icursW; // weak 14 | extern char pcursitem; // weak 15 | extern char pcursobj; // weak 16 | extern char pcursplr; // weak 17 | extern int cursmx; 18 | extern int cursmy; 19 | extern int pcurstemp; // weak 20 | extern int pcurs; // idb 21 | 22 | void InitCursor(); 23 | void FreeCursor(); 24 | void SetICursor(int i); 25 | void SetCursor_(int i); 26 | void NewCursor(int i); 27 | void InitLevelCursor(); 28 | void CheckTown(); 29 | void CheckRportal(); 30 | void CheckCursMove(); 31 | 32 | /* rdata */ 33 | extern const int InvItemWidth[180]; 34 | extern const int InvItemHeight[180]; 35 | 36 | #endif /* __CURSOR_H__ */ 37 | -------------------------------------------------------------------------------- /Source/dead.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __DEAD_H__ 3 | #define __DEAD_H__ 4 | 5 | extern int spurtndx; // weak 6 | extern DeadStruct dead[MAXDEAD]; 7 | extern int stonendx; 8 | 9 | void InitDead(); 10 | void AddDead(int dx, int dy, char dv, int ddir); 11 | void SetDead(); 12 | 13 | #endif /* __DEAD_H__ */ 14 | -------------------------------------------------------------------------------- /Source/debug.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __DEBUG_H__ 3 | #define __DEBUG_H__ 4 | 5 | extern void *pSquareCel; 6 | extern char dMonsDbg[NUMLEVELS][MAXDUNX][MAXDUNY]; 7 | extern char dFlagDbg[NUMLEVELS][MAXDUNX][MAXDUNY]; 8 | 9 | void LoadDebugGFX(); 10 | void FreeDebugGFX(); 11 | #ifdef _DEBUG 12 | void init_seed_desync(); 13 | void seed_desync_index_get(); 14 | void seed_desync_index_set(); 15 | void seed_desync_check(int seed); 16 | #endif 17 | void CheckDungeonClear(); 18 | #ifdef _DEBUG 19 | void GiveGoldCheat(); 20 | void StoresCheat(); 21 | void TakeGoldCheat(); 22 | void MaxSpellsCheat(); 23 | void SetSpellLevelCheat(char spl, int spllvl); 24 | void SetAllSpellsCheat(); 25 | void PrintDebugPlayer(BOOL bNextPlayer); 26 | void PrintDebugQuest(); 27 | void PrintDebugMonster(int m); 28 | void GetDebugMonster(); 29 | void NextDebugMonster(); 30 | #endif 31 | 32 | #endif /* __DEBUG_H__ */ 33 | -------------------------------------------------------------------------------- /Source/doom.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __DOOM_H__ 3 | #define __DOOM_H__ 4 | 5 | extern int doom_quest_time; // weak 6 | extern int doom_stars_drawn; // weak 7 | extern void *pDoomCel; 8 | extern int doomflag; // weak 9 | extern int DoomQuestState; // idb 10 | 11 | /* 12 | void doom_reset_state(); 13 | void doom_play_movie(); 14 | */ 15 | int doom_get_frame_from_time(); 16 | void doom_alloc_cel(); 17 | void doom_cleanup(); 18 | void doom_load_graphics(); 19 | void doom_init(); 20 | void doom_close(); 21 | void doom_draw(); 22 | 23 | #endif /* __DOOM_H__ */ 24 | -------------------------------------------------------------------------------- /Source/dthread.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __DTHREAD_H__ 3 | #define __DTHREAD_H__ 4 | 5 | extern unsigned int glpDThreadId; 6 | extern BOOLEAN dthread_running; 7 | 8 | void dthread_remove_player(int pnum); 9 | void dthread_send_delta(int pnum, char cmd, void *pbSrc, int dwLen); 10 | void dthread_start(); 11 | unsigned int __stdcall dthread_handler(void *unused); 12 | void dthread_cleanup(); 13 | 14 | /* data */ 15 | extern int dthread_inf; // weak 16 | 17 | #endif /* __DTHREAD_H__ */ 18 | -------------------------------------------------------------------------------- /Source/dx.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __DX_H__ 3 | #define __DX_H__ 4 | 5 | extern IDirectDraw *lpDDInterface; 6 | extern IDirectDrawPalette *lpDDPalette; // idb 7 | extern BYTE *gpBuffer; 8 | extern IDirectDrawSurface *lpDDSBackBuf; 9 | extern IDirectDrawSurface *lpDDSPrimary; 10 | extern char gbBackBuf; // weak 11 | extern char gbEmulate; // weak 12 | extern HMODULE ghDiabMod; // idb 13 | 14 | void dx_init(HWND hWnd); 15 | void dx_create_back_buffer(); 16 | void dx_create_primary_surface(); 17 | HRESULT dx_DirectDrawCreate(LPGUID guid, LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter); 18 | void lock_buf(BYTE idx); 19 | void lock_buf_priv(); 20 | void unlock_buf(BYTE idx); 21 | void unlock_buf_priv(); 22 | void dx_cleanup(); 23 | void dx_reinit(); 24 | void j_dx_reinit(); 25 | 26 | /* data */ 27 | 28 | extern int dx_inf; // weak 29 | 30 | #endif /* __DX_H__ */ 31 | -------------------------------------------------------------------------------- /Source/effects.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __EFFECTS_H__ 3 | #define __EFFECTS_H__ 4 | 5 | extern int sfxdelay; 6 | extern int sfxdnum; 7 | extern HANDLE sfx_stream; 8 | extern TSFX *sfx_data_cur; 9 | 10 | BOOL effect_is_playing(int nSFX); 11 | void sfx_stop(); 12 | void InitMonsterSND(int monst); 13 | void FreeEffects(); 14 | void PlayEffect(int i, int mode); 15 | BOOL calc_snd_position(int x, int y, int *plVolume, int *plPan); 16 | void PlaySFX(int psfx); 17 | void PlaySFX_priv(TSFX *pSFX, BOOL loc, int x, int y); 18 | void stream_play(TSFX *pSFX, int lVolume, int lPan); 19 | int RndSFX(int psfx); 20 | void PlaySfxLoc(int psfx, int x, int y); 21 | void FreeMonsterSnd(); 22 | void sound_stop(); 23 | void sound_update(); 24 | void effects_update(); 25 | void effects_cleanup_sfx(); 26 | void stream_update(); 27 | void priv_sound_init(UCHAR bLoadMask); 28 | void sound_init(); 29 | void __stdcall effects_play_sound(char *snd_file); 30 | 31 | /* rdata */ 32 | 33 | extern const int effects_inf; // weak 34 | extern const char monster_action_sounds[]; 35 | 36 | /* data */ 37 | 38 | #endif /* __EFFECTS_H__ */ 39 | -------------------------------------------------------------------------------- /Source/encrypt.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __ENCRYPT_H__ 3 | #define __ENCRYPT_H__ 4 | 5 | extern DWORD hashtable[1280]; 6 | 7 | void Decrypt(void *block, DWORD size, DWORD key); 8 | void Encrypt(void *block, DWORD size, DWORD key); 9 | DWORD Hash(const char *s, int type); 10 | void InitHash(); 11 | int PkwareCompress(void *buf, int size); 12 | unsigned int __cdecl PkwareBufferRead(char *buf, unsigned int *size, void *param); 13 | void __cdecl PkwareBufferWrite(char *buf, unsigned int *size, void *param); 14 | void PkwareDecompress(void *param, int recv_size, int dwMaxBytes); 15 | 16 | #endif /* __ENCRYPT_H__ */ 17 | -------------------------------------------------------------------------------- /Source/error.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __ERROR_H__ 3 | #define __ERROR_H__ 4 | 5 | extern char msgtable[MAX_SEND_STR_LEN]; 6 | extern char msgdelay; 7 | extern char msgflag; 8 | extern char msgcnt; 9 | 10 | void InitDiabloMsg(char e); 11 | void ClrDiabloMsg(); 12 | void DrawDiabloMsg(); 13 | 14 | /* data */ 15 | extern char *MsgStrings[44]; 16 | 17 | #endif /* __ERROR_H__ */ 18 | -------------------------------------------------------------------------------- /Source/fault.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __FAULT_H__ 3 | #define __FAULT_H__ 4 | 5 | typedef struct STACK_FRAME { 6 | struct STACK_FRAME *pNext; 7 | void *pCallRet; 8 | } STACK_FRAME; 9 | 10 | extern int fault_unused; 11 | extern LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter; 12 | 13 | void fault_init_filter(); 14 | void fault_cleanup_filter_atexit(); 15 | LPTOP_LEVEL_EXCEPTION_FILTER __cdecl fault_cleanup_filter(); 16 | LONG __stdcall TopLevelExceptionFilter(PEXCEPTION_POINTERS ExceptionInfo); 17 | void fault_hex_format(BYTE *ptr, unsigned int numBytes); 18 | void fault_unknown_module(LPCVOID lpAddress, LPSTR lpModuleName, int iMaxLength, int *sectionNum, int *sectionOffset); 19 | void fault_call_stack(void *instr, STACK_FRAME *stackAddr); 20 | char *fault_get_error_type(DWORD dwMessageId, LPSTR lpString1, DWORD nSize); 21 | void * fault_set_filter(void *unused); 22 | LPTOP_LEVEL_EXCEPTION_FILTER fault_reset_filter(void *unused); 23 | LPTOP_LEVEL_EXCEPTION_FILTER fault_get_filter(); 24 | 25 | #endif /* __FAULT_H__ */ 26 | -------------------------------------------------------------------------------- /Source/gamemenu.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __GAMEMENU_H__ 3 | #define __GAMEMENU_H__ 4 | 5 | void gamemenu_previous(); 6 | void gamemenu_enable_single(TMenuItem *a1); 7 | void gamemenu_enable_multi(TMenuItem *a1); 8 | void gamemenu_off(); 9 | void gamemenu_handle_previous(); 10 | void j_gamemenu_previous(BOOL a1); 11 | void gamemenu_new_game(BOOL a1); 12 | void gamemenu_quit_game(BOOL a1); 13 | void gamemenu_load_game(BOOL a1); 14 | void gamemenu_save_game(BOOL a1); 15 | void gamemenu_restart_town(BOOL a1); 16 | void gamemenu_options(BOOL a1); 17 | void gamemenu_get_music(); 18 | void gamemenu_sound_music_toggle(char **names, TMenuItem *menu_item, int gamma); 19 | void gamemenu_get_sound(); 20 | void gamemenu_get_color_cycling(); 21 | void gamemenu_get_gamma(); 22 | void gamemenu_music_volume(BOOL a1); 23 | int gamemenu_slider_music_sound(TMenuItem *menu_item); 24 | void gamemenu_sound_volume(BOOL a1); 25 | void gamemenu_gamma(BOOL a1); 26 | int gamemenu_slider_gamma(); 27 | void gamemenu_color_cycling(BOOL a1); 28 | 29 | /* rdata */ 30 | extern char *music_toggle_names[]; 31 | extern char *sound_toggle_names[]; 32 | extern char *color_cycling_toggle_names[]; 33 | 34 | #endif /* __GAMEMENU_H__ */ 35 | -------------------------------------------------------------------------------- /Source/gmenu.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __GMENU_H__ 3 | #define __GMENU_H__ 4 | 5 | extern void *optbar_cel; 6 | extern BOOLEAN mouseNavigation; // weak 7 | extern void *PentSpin_cel; 8 | extern void *BigTGold_cel; 9 | extern int dword_634474; // weak 10 | extern char byte_634478; // weak 11 | extern void(*dword_63447C)(TMenuItem *); 12 | extern TMenuItem *sgpCurrentMenu; // idb 13 | extern void *option_cel; 14 | extern int sgCurrentMenuIdx; // weak 15 | 16 | void gmenu_draw_pause(); 17 | void gmenu_print_text(int x, int y, char *pszStr); 18 | void FreeGMenu(); 19 | void gmenu_init_menu(); 20 | BOOL gmenu_exception(); 21 | void gmenu_call_proc(TMenuItem *pItem, void(*gmFunc)(TMenuItem *)); 22 | void gmenu_up_down(BOOL isDown); 23 | void gmenu_draw(); 24 | void gmenu_draw_menu_item(TMenuItem *pItem, int a2); 25 | void gmenu_clear_buffer(int x, int y, int width, int height); 26 | int gmenu_get_lfont(TMenuItem *pItem); 27 | BOOL gmenu_presskeys(int a1); 28 | void gmenu_left_right(BOOL isRight); 29 | BOOL gmenu_on_mouse_move(); 30 | BOOLEAN gmenu_valid_mouse_pos(int *plOffset); 31 | BOOL gmenu_left_mouse(BOOL isDown); 32 | void gmenu_enable(TMenuItem *pMenuItem, BOOL enable); 33 | void gmenu_slider_set(TMenuItem *pItem, int min, int max, int gamma); 34 | int gmenu_slider_get(TMenuItem *pItem, int min, int max); 35 | void gmenu_slider_steps(TMenuItem *pItem, int dwTicks); 36 | 37 | /* rdata */ 38 | 39 | extern const unsigned char lfontframe[127]; 40 | extern const unsigned char lfontkern[56]; 41 | 42 | #endif /* __GMENU_H__ */ 43 | -------------------------------------------------------------------------------- /Source/help.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __HELP_H__ 3 | #define __HELP_H__ 4 | 5 | extern int help_select_line; // weak 6 | extern int dword_634494; // weak 7 | extern int helpflag; 8 | extern int displayinghelp[22]; 9 | extern int HelpTop; // weak 10 | 11 | void InitHelp(); 12 | void DrawHelp(); 13 | void DrawHelpLine(int always_0, int help_line_nr, char *text, char color); 14 | void DisplayHelp(); 15 | void HelpScrollUp(); 16 | void HelpScrollDown(); 17 | 18 | /* rdata */ 19 | extern const char gszHelpText[]; 20 | 21 | #endif /* __HELP_H__ */ 22 | -------------------------------------------------------------------------------- /Source/init.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __INIT_H__ 3 | #define __INIT_H__ 4 | 5 | extern _SNETVERSIONDATA fileinfo; 6 | extern int gbActive; // weak 7 | extern char diablo_exe_path[MAX_PATH]; 8 | extern HANDLE unused_mpq; 9 | extern char patch_rt_mpq_path[MAX_PATH]; 10 | extern WNDPROC CurrentProc; 11 | extern HANDLE diabdat_mpq; 12 | extern char diabdat_mpq_path[MAX_PATH]; 13 | extern HANDLE patch_rt_mpq; 14 | extern BOOL killed_mom_parent; // weak 15 | extern BOOLEAN screensaver_enabled_prev; 16 | 17 | void init_cleanup(BOOL show_cursor); 18 | void init_run_office_from_start_menu(); 19 | void init_run_office(char *dir); 20 | void init_disable_screensaver(BOOLEAN disable); 21 | void init_create_window(int nCmdShow); 22 | void init_kill_mom_parent(); 23 | HWND init_find_mom_parent(); 24 | void init_await_mom_parent_exit(); 25 | void init_archives(); 26 | HANDLE init_test_access(char *mpq_path, char *mpq_name, char *reg_loc, int flags, int fs); 27 | char *init_strip_trailing_slash(char *path); 28 | BOOL init_read_test_file(char *pszPath, char *pszArchive, int flags, HANDLE *phArchive); 29 | void init_get_file_info(); 30 | LRESULT __stdcall MainWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 31 | void init_activate_window(HWND hWnd, BOOL bActive); 32 | LRESULT __stdcall WindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 33 | WNDPROC SetWindowProc(WNDPROC NewProc); 34 | 35 | /* rdata */ 36 | extern const int init_inf; // weak 37 | 38 | /* data */ 39 | 40 | extern char gszVersionNumber[MAX_PATH]; 41 | extern char gszProductName[MAX_PATH]; 42 | 43 | #endif /* __INIT_H__ */ 44 | -------------------------------------------------------------------------------- /Source/interfac.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __INTERFAC_H__ 3 | #define __INTERFAC_H__ 4 | 5 | extern int progress_id; 6 | 7 | void interface_msg_pump(); 8 | BOOL IncProgress(); 9 | void DrawCutscene(); 10 | void DrawProgress(int screen_x, int screen_y, int progress_id); 11 | void ShowProgress(unsigned int uMsg); 12 | void FreeInterface(); 13 | void InitCutscene(unsigned int uMsg); 14 | 15 | /* rdata */ 16 | 17 | extern const int interfac_inf; // weak 18 | extern const unsigned char progress_bar_colours[3]; 19 | extern const int progress_bar_screen_pos[3][2]; 20 | 21 | #endif /* __INTERFAC_H__ */ 22 | -------------------------------------------------------------------------------- /Source/itemdat.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __ITEMDAT_H__ 3 | #define __ITEMDAT_H__ 4 | 5 | extern ItemDataStruct AllItemsList[157]; 6 | extern const PLStruct PL_Prefix[84]; 7 | extern const PLStruct PL_Suffix[96]; 8 | extern const UItemStruct UniqueItemList[91]; 9 | 10 | #endif /* __ITEMDAT_H__ */ 11 | -------------------------------------------------------------------------------- /Source/loadsave.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __LOADSAVE_H__ 3 | #define __LOADSAVE_H__ 4 | 5 | extern BYTE *tbuff; 6 | 7 | void LoadGame(BOOL firstflag); 8 | char BLoad(); 9 | int WLoad(); 10 | int ILoad(); 11 | BOOL OLoad(); 12 | void LoadPlayer(int i); 13 | void LoadMonster(int i); 14 | void LoadMissile(int i); 15 | void LoadObject(int i); 16 | void LoadItem(int i); 17 | void LoadPremium(int i); 18 | void LoadQuest(int i); 19 | void LoadLighting(int i); 20 | void LoadVision(int i); 21 | void LoadPortal(int i); 22 | void SaveGame(); 23 | void BSave(char v); 24 | void WSave(int v); 25 | void ISave(int v); 26 | void OSave(BOOL v); 27 | void SavePlayer(int i); 28 | void SaveMonster(int i); 29 | void SaveMissile(int i); 30 | void SaveObject(int i); 31 | void SaveItem(int i); 32 | void SavePremium(int i); 33 | void SaveQuest(int i); 34 | void SaveLighting(int i); 35 | void SaveVision(int i); 36 | void SavePortal(int i); 37 | void SaveLevel(); 38 | void LoadLevel(); 39 | 40 | #endif /* __LOADSAVE_H__ */ 41 | -------------------------------------------------------------------------------- /Source/logging.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __LOGGING_H__ 3 | #define __LOGGING_H__ 4 | 5 | extern CHAR FileName[MAX_PATH]; // idb 6 | extern char log_buffer[388]; 7 | extern LPCVOID lpAddress; // idb 8 | extern DWORD nNumberOfBytesToWrite; // idb 9 | 10 | void __cdecl log_flush(BOOL force_close); 11 | HANDLE log_create(); // should be HANDLE 12 | void log_get_version(VS_FIXEDFILEINFO *file_info); 13 | void __cdecl log_printf(const char *pszFmt, ...); // LogMessage 14 | void log_dump_computer_info(); 15 | 16 | /* rdata */ 17 | 18 | extern const int log_inf; // weak 19 | 20 | /* data */ 21 | 22 | extern int log_not_created; // weak 23 | extern HANDLE log_file; // idb 24 | 25 | #endif /* __LOGGING_H__ */ 26 | -------------------------------------------------------------------------------- /Source/mainmenu.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __MAINMENU_H__ 3 | #define __MAINMENU_H__ 4 | 5 | extern char gszHero[16]; 6 | 7 | void mainmenu_refresh_music(); 8 | void __stdcall mainmenu_create_hero(int arg1, int arg2, int arg3, int arg4, char *name_1, char *name_2); 9 | int __stdcall mainmenu_select_hero_dialog( 10 | const _SNETPROGRAMDATA *client_info, 11 | const _SNETPLAYERDATA *user_info, 12 | const _SNETUIDATA *ui_info, 13 | const _SNETVERSIONDATA *fileinfo, 14 | DWORD mode, // 4 chars, e.g. 'IPXN', 'BNET' etc. */ 15 | char *cname, DWORD clen, // character name will be copied here 16 | char *cdesc, DWORD cdlen, // character "description" will be copied here (used to advertise games) 17 | BOOL *multi); // new character? - unsure about this 18 | void mainmenu_loop(); 19 | BOOL mainmenu_single_player(); 20 | BOOL mainmenu_init_menu(int a1); 21 | BOOL mainmenu_multi_player(); 22 | void mainmenu_play_intro(); 23 | 24 | /* rdata */ 25 | 26 | extern const int mainmenu_inf; // weak 27 | 28 | /* data */ 29 | 30 | extern int menu_music_track_id; // idb 31 | 32 | #endif /* __MAINMENU_H__ */ 33 | -------------------------------------------------------------------------------- /Source/minitext.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __MINITEXT_H__ 3 | #define __MINITEXT_H__ 4 | 5 | extern int qtexty; // weak 6 | extern char *qtextptr; 7 | extern int qtextSpd; // weak 8 | extern char qtextflag; // weak 9 | extern int scrolltexty; // weak 10 | extern void *pMedTextCels; 11 | extern void *pTextBoxCels; 12 | 13 | void FreeQuestText(); 14 | void InitQuestText(); 15 | void InitQTextMsg(int m); 16 | void DrawQTextBack(); 17 | void PrintQTextChr(int sx, int sy, BYTE *pCelBuff, int nCel); 18 | void DrawQText(); 19 | 20 | /* rdata */ 21 | 22 | extern const unsigned char mfontframe[127]; 23 | extern const unsigned char mfontkern[56]; 24 | 25 | /* data */ 26 | 27 | extern int qscroll_spd_tbl[9]; 28 | 29 | #endif /* __MINITEXT_H__ */ 30 | -------------------------------------------------------------------------------- /Source/misdat.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __MISDAT_H__ 3 | #define __MISDAT_H__ 4 | 5 | extern MissileData missiledata[68]; 6 | extern MisFileData misfiledata[47]; 7 | 8 | #endif /* __MISDAT_H__ */ 9 | -------------------------------------------------------------------------------- /Source/monstdat.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __MONSTDAT_H__ 3 | #define __MONSTDAT_H__ 4 | 5 | extern MonsterData monsterdata[112]; 6 | extern char MonstConvTbl[128]; 7 | extern unsigned char MonstAvailTbl[112]; 8 | extern UniqMonstStruct UniqMonst[98]; 9 | 10 | #endif /* __MONSTDAT_H__ */ 11 | -------------------------------------------------------------------------------- /Source/movie.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __MOVIE_H__ 3 | #define __MOVIE_H__ 4 | 5 | extern BYTE movie_playing; 6 | extern BOOL loop_movie; 7 | 8 | void play_movie(char *pszMovie, BOOL user_can_close); 9 | LRESULT __stdcall MovieWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 10 | 11 | /* rdata */ 12 | 13 | #endif /* __MOVIE_H__ */ 14 | -------------------------------------------------------------------------------- /Source/msgcmd.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __MSGCMD_H__ 3 | #define __MSGCMD_H__ 4 | 5 | void msgcmd_cmd_cleanup(); 6 | void msgcmd_send_chat(); 7 | BOOL msgcmd_add_server_cmd_W(const char *chat_message); 8 | void msgcmd_add_server_cmd(const char *command); 9 | 10 | #endif /* __MSGCMD_H__ */ 11 | -------------------------------------------------------------------------------- /Source/nthread.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __NTHREAD_H__ 3 | #define __NTHREAD_H__ 4 | 5 | extern BYTE sgbNetUpdateRate; 6 | extern DWORD gdwMsgLenTbl[MAX_PLRS]; 7 | extern DWORD gdwDeltaBytesSec; 8 | extern BOOLEAN nthread_should_run; 9 | extern DWORD gdwTurnsInTransit; 10 | extern int glpMsgTbl[MAX_PLRS]; 11 | extern unsigned int glpNThreadId; 12 | extern int turn_upper_bit; 13 | extern BOOLEAN sgbThreadIsRunning; 14 | extern DWORD gdwLargestMsgSize; 15 | extern DWORD gdwNormalMsgSize; 16 | extern int last_tick; 17 | 18 | void nthread_terminate_game(const char *pszFcn); 19 | DWORD nthread_send_and_recv_turn(DWORD cur_turn, int turn_delta); 20 | BOOL nthread_recv_turns(BOOL *pfSendAsync); 21 | void nthread_set_turn_upper_bit(); 22 | void nthread_start(BOOL set_turn_upper_bit); 23 | unsigned int __stdcall nthread_handler(void *a1); 24 | void nthread_cleanup(); 25 | void nthread_ignore_mutex(BOOL bStart); 26 | BOOL nthread_has_500ms_passed(BOOL unused); 27 | 28 | /* rdata */ 29 | 30 | #endif /* __NTHREAD_H__ */ 31 | -------------------------------------------------------------------------------- /Source/objdat.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __OBJDAT_H__ 3 | #define __OBJDAT_H__ 4 | 5 | extern int ObjTypeConv[113]; 6 | extern ObjDataStruct AllObjects[99]; 7 | extern char *ObjMasterLoadList[56]; 8 | 9 | #endif /* __OBJDAT_H__ */ 10 | -------------------------------------------------------------------------------- /Source/pack.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __PACK_H__ 3 | #define __PACK_H__ 4 | 5 | void PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield); 6 | void PackItem(PkItemStruct *id, ItemStruct *is); 7 | void VerifyGoldSeeds(PlayerStruct *pPlayer); 8 | void UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok); 9 | void UnPackItem(PkItemStruct *is, ItemStruct *id); 10 | 11 | /* rdata */ 12 | 13 | #endif /* __PACK_H__ */ 14 | -------------------------------------------------------------------------------- /Source/palette.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __PALETTE_H__ 3 | #define __PALETTE_H__ 4 | 5 | extern PALETTEENTRY logical_palette[256]; 6 | extern PALETTEENTRY system_palette[256]; 7 | extern PALETTEENTRY orig_palette[256]; 8 | extern int gdwPalEntries; 9 | 10 | void SaveGamma(); 11 | void palette_init(); 12 | void LoadGamma(); 13 | void LoadSysPal(); 14 | void LoadPalette(char *pszFileName); 15 | void LoadRndLvlPal(int l); 16 | void ResetPal(); 17 | void IncreaseGamma(); 18 | void palette_update(); 19 | void ApplyGamma(PALETTEENTRY *dst, PALETTEENTRY *src, int n); 20 | void DecreaseGamma(); 21 | int UpdateGamma(int gamma); 22 | void BlackPalette(); 23 | void SetFadeLevel(DWORD fadeval); 24 | void PaletteFadeIn(int fr); 25 | void PaletteFadeOut(int fr); 26 | void palette_update_caves(); 27 | void palette_update_quest_palette(int n); 28 | BOOL palette_get_colour_cycling(); 29 | BOOL palette_set_color_cycling(BOOL enabled); 30 | 31 | /* rdata */ 32 | 33 | /* data */ 34 | 35 | extern int gamma_correction; 36 | extern BOOL color_cycling_enabled; 37 | 38 | #endif /* __PALETTE_H__ */ 39 | -------------------------------------------------------------------------------- /Source/path.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __PATH_H__ 3 | #define __PATH_H__ 4 | 5 | extern PATHNODE path_nodes[MAXPATHNODES]; 6 | extern int gdwCurPathStep; 7 | extern int gdwCurNodes; 8 | extern int pnode_vals[25]; 9 | extern PATHNODE *pnode_ptr; 10 | extern PATHNODE *pnode_tblptr[MAXPATHNODES]; 11 | extern PATHNODE *path_2_nodes; 12 | extern PATHNODE path_unusednodes[MAXPATHNODES]; 13 | 14 | int FindPath(BOOL(*PosOk)(int, int, int), int PosOkArg, int sx, int sy, int dx, int dy, char *path); 15 | int path_get_h_cost(int sx, int sy, int dx, int dy); 16 | int path_check_equal(PATHNODE *pPath, int dx, int dy); 17 | PATHNODE *GetNextPath(); 18 | BOOL path_solid_pieces(PATHNODE *pPath, int dx, int dy); 19 | BOOL path_get_path(BOOL(*PosOk)(int, int, int), int PosOkArg, PATHNODE *pPath, int x, int y); 20 | BOOL path_parent_path(PATHNODE *pPath, int dx, int dy, int sx, int sy); 21 | PATHNODE *path_get_node1(int dx, int dy); 22 | PATHNODE *path_get_node2(int dx, int dy); 23 | void path_next_node(PATHNODE *pPath); 24 | void path_set_coords(PATHNODE *pPath); 25 | void path_push_active_step(PATHNODE *pPath); 26 | PATHNODE *path_pop_active_step(); 27 | PATHNODE *path_new_step(); 28 | 29 | /* rdata */ 30 | 31 | extern const char pathxdir[8]; 32 | extern const char pathydir[8]; 33 | 34 | /* data */ 35 | extern char path_directions[9]; 36 | 37 | #endif /* __PATH_H__ */ 38 | -------------------------------------------------------------------------------- /Source/plrctrls.h: -------------------------------------------------------------------------------- 1 | #ifndef __PLRCTRLS_H__ 2 | #define __PLRCTRLS_H__ 3 | 4 | void checkTownersNearby(bool interact); 5 | void checkItemsNearby(bool interact); 6 | void keyboardExpansion(int vikey); 7 | void charMovement(); 8 | void movements(int key); 9 | bool checkMonstersNearby(bool attack); 10 | extern bool newCurHidden; 11 | void invMove(int key); 12 | void HideCursor(); 13 | void useBeltPotion(bool mana); 14 | typedef struct coords { 15 | int x; 16 | int y; 17 | } coords; 18 | extern coords speedspellscoords[50]; 19 | extern int speedspellcount; 20 | extern const InvXY InvRect[73]; // wasn't made public, so I'll add this here from inv.cpp 21 | 22 | extern DWORD talkwait; 23 | extern DWORD talktick; 24 | extern DWORD castwait; 25 | 26 | #define INV_TOP 240; 27 | #define INV_LEFT 350; 28 | #define INV_HEIGHT 320; 29 | #define DISPLAY_HEIGHT 360; 30 | #define DISPLAY_WIDTH 640; 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/plrmsg.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __PLRMSG_H__ 3 | #define __PLRMSG_H__ 4 | 5 | extern _plrmsg plr_msgs[PMSG_COUNT]; 6 | 7 | void plrmsg_delay(BOOL delay); 8 | char *ErrorPlrMsg(const char *pszMsg); 9 | size_t __cdecl EventPlrMsg(const char *pszFmt, ...); 10 | void SendPlrMsg(int pnum, const char *pszStr); 11 | void ClearPlrMsg(); 12 | void InitPlrMsg(); 13 | void DrawPlrMsg(); 14 | void PrintPlrMsg(unsigned int x, unsigned int y, unsigned int width, const char *str, unsigned char just); 15 | 16 | /* rdata */ 17 | 18 | extern const char text_color_from_player_num[MAX_PLRS + 1]; 19 | 20 | #endif /* __PLRMSG_H__ */ 21 | -------------------------------------------------------------------------------- /Source/portal.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __PORTAL_H__ 3 | #define __PORTAL_H__ 4 | 5 | extern PortalStruct portal[MAXPORTAL]; 6 | extern int portalindex; 7 | 8 | void InitPortals(); 9 | void SetPortalStats(int i, BOOL o, int x, int y, int lvl, int lvltype); 10 | void AddWarpMissile(int i, int x, int y); 11 | void SyncPortals(); 12 | void AddInTownPortal(int i); 13 | void ActivatePortal(int i, int x, int y, int lvl, int lvltype, BOOL sp); 14 | void DeactivatePortal(int i); 15 | BOOL PortalOnLevel(int i); 16 | void RemovePortalMissile(int id); 17 | void SetCurrentPortal(int p); 18 | void GetPortalLevel(); 19 | void GetPortalLvlPos(); 20 | BOOL PosOkPortal(int lvl, int x, int y); 21 | 22 | /* rdata */ 23 | extern int WarpDropX[MAXPORTAL]; 24 | extern int WarpDropY[MAXPORTAL]; 25 | 26 | #endif /* __PORTAL_H__ */ 27 | -------------------------------------------------------------------------------- /Source/render.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __RENDER_H__ 3 | #define __RENDER_H__ 4 | 5 | void drawTopArchesUpperScreen(BYTE *pBuff); 6 | void drawBottomArchesUpperScreen(BYTE *pBuff, unsigned int *pMask); 7 | void drawUpperScreen(BYTE *pBuff); 8 | void drawTopArchesLowerScreen(BYTE *pBuff); 9 | void drawBottomArchesLowerScreen(BYTE *pBuff, unsigned int *pMask); 10 | void drawLowerScreen(BYTE *pBuff); 11 | void world_draw_black_tile(BYTE *pBuff); 12 | 13 | /* rdata */ 14 | 15 | extern int WorldBoolFlag; 16 | extern unsigned int gdwCurrentMask; 17 | // extern char world_4B3264; 18 | extern unsigned char *gpCelFrame; 19 | extern unsigned int *gpDrawMask; 20 | // extern char world_4B326D[16]; 21 | extern unsigned int RightMask[32]; 22 | extern unsigned int LeftMask[32]; 23 | extern unsigned int WallMask[32]; 24 | extern int WorldTbl3x16[48]; 25 | extern int WorldTbl17_1[17]; 26 | extern int WorldTbl17_2[17]; 27 | 28 | #endif /* __RENDER_H__ */ 29 | -------------------------------------------------------------------------------- /Source/restrict.cpp: -------------------------------------------------------------------------------- 1 | #include "diablo.h" 2 | 3 | DEVILUTION_BEGIN_NAMESPACE 4 | 5 | BOOL SystemSupported() 6 | { 7 | 8 | 9 | return TRUE; 10 | } 11 | 12 | BOOL RestrictedTest() 13 | { 14 | #ifndef SWITCH 15 | FILE *f; 16 | char Buffer[MAX_PATH]; 17 | BOOL ret = FALSE; 18 | 19 | if (SystemSupported() && GetWindowsDirectory(Buffer, sizeof(Buffer))) { 20 | strcat(Buffer, "\\Diablo1RestrictedTest.foo"); 21 | f = fopen(Buffer, "wt"); 22 | if (f) { 23 | fclose(f); 24 | remove(Buffer); 25 | } else { 26 | ret = TRUE; 27 | } 28 | } 29 | return ret; 30 | #else 31 | return TRUE; 32 | #endif 33 | } 34 | 35 | BOOL ReadOnlyTest() 36 | { 37 | return false; 38 | } 39 | 40 | DEVILUTION_END_NAMESPACE 41 | -------------------------------------------------------------------------------- /Source/restrict.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __RESTRICT_H__ 3 | #define __RESTRICT_H__ 4 | 5 | BOOL SystemSupported(); 6 | BOOL RestrictedTest(); 7 | BOOL ReadOnlyTest(); 8 | 9 | #endif /* __RESTRICT_H__ */ 10 | -------------------------------------------------------------------------------- /Source/setmaps.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __SETMAPS_H__ 3 | #define __SETMAPS_H__ 4 | 5 | int ObjIndex(int x, int y); 6 | void AddSKingObjs(); 7 | void AddSChamObjs(); 8 | void AddVileObjs(); 9 | void DRLG_SetMapTrans(char *sFileName); 10 | void LoadSetMap(); 11 | 12 | /* rdata */ 13 | extern unsigned char SkelKingTrans1[8]; 14 | extern unsigned char SkelKingTrans2[8]; 15 | extern unsigned char SkelKingTrans3[20]; 16 | extern unsigned char SkelKingTrans4[28]; 17 | extern unsigned char SkelChamTrans1[20]; 18 | extern unsigned char SkelChamTrans2[8]; 19 | extern unsigned char SkelChamTrans3[36]; 20 | extern char *quest_level_names[]; 21 | 22 | #endif /* __SETMAPS_H__ */ 23 | -------------------------------------------------------------------------------- /Source/sha.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __SHA_H__ 3 | #define __SHA_H__ 4 | 5 | /* 6 | * Define the SHA1 circular left shift macro 7 | */ 8 | #define SHA1CircularShift(bits, word) \ 9 | (((word) << (bits)) | ((word) >> (32 - (bits)))) 10 | #define SHA1HashSize 20 11 | 12 | //sha 13 | 14 | void SHA1Clear(); 15 | void SHA1Result(int n, char Message_Digest[SHA1HashSize]); 16 | void SHA1Calculate(int n, const char *data, char Message_Digest[SHA1HashSize]); 17 | void SHA1Input(SHA1Context *context, const char *message_array, int len); 18 | void SHA1ProcessMessageBlock(SHA1Context *context); 19 | void SHA1Reset(int n); 20 | void SHA1Init(SHA1Context *context); 21 | 22 | #endif /* __SHA_H__ */ 23 | -------------------------------------------------------------------------------- /Source/sound.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __SOUND_H__ 3 | #define __SOUND_H__ 4 | 5 | extern IDirectSoundBuffer *DSBs[8]; 6 | extern BOOLEAN gbSndInited; 7 | extern HMODULE hDsound_dll; 8 | 9 | void snd_update(BOOL bStopAll); 10 | void snd_stop_snd(TSnd *pSnd); 11 | BOOL snd_playing(TSnd *pSnd); 12 | void snd_play_snd(TSnd *pSnd, int lVolume, int lPan); 13 | IDirectSoundBuffer *sound_dup_channel(IDirectSoundBuffer *DSB); 14 | BOOL sound_file_reload(TSnd *sound_file, IDirectSoundBuffer *DSB); 15 | TSnd *sound_file_load(char *path); 16 | void sound_CreateSoundBuffer(TSnd *sound_file); 17 | void sound_file_cleanup(TSnd *sound_file); 18 | void snd_init(HWND hWnd); 19 | void sound_load_volume(char *value_name, int *value); 20 | void sound_create_primary_buffer(HANDLE music_track); 21 | HRESULT sound_DirectSoundCreate(LPGUID lpGuid, LPDIRECTSOUND *ppDS, LPUNKNOWN pUnkOuter); 22 | void sound_cleanup(); 23 | void sound_store_volume(char *key, int value); 24 | void music_stop(); 25 | void music_start(int nTrack); 26 | void sound_disable_music(BOOL disable); 27 | int sound_get_or_set_music_volume(int volume); 28 | int sound_get_or_set_sound_volume(int volume); 29 | 30 | /* rdata */ 31 | 32 | /* data */ 33 | 34 | extern BYTE gbMusicOn; 35 | extern BYTE gbSoundOn; 36 | extern BYTE gbDupSounds; 37 | extern char unk_volume[4][2]; 38 | 39 | #endif /* __SOUND_H__ */ 40 | -------------------------------------------------------------------------------- /Source/spelldat.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __SPELLDAT_H__ 3 | #define __SPELLDAT_H__ 4 | 5 | extern SpellData spelldata[MAX_SPELLS]; 6 | 7 | #endif /* __SPELLDAT_H__ */ 8 | -------------------------------------------------------------------------------- /Source/spells.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __SPELLS_H__ 3 | #define __SPELLS_H__ 4 | 5 | int GetManaAmount(int id, int sn); 6 | void UseMana(int id, int sn); 7 | BOOL CheckSpell(int id, int sn, BYTE st, BOOL manaonly); 8 | void CastSpell(int id, int spl, int sx, int sy, int dx, int dy, int caster, int spllvl); 9 | void DoResurrect(int pnum, int rid); 10 | void PlacePlayer(int pnum); 11 | void DoHealOther(int pnum, int rid); 12 | 13 | #endif /* __SPELLS_H__ */ 14 | -------------------------------------------------------------------------------- /Source/sync.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __SYNC_H__ 3 | #define __SYNC_H__ 4 | 5 | extern WORD sync_word_6AA708[MAXMONSTERS]; 6 | extern int sgnMonsters; 7 | extern WORD sgwLRU[MAXMONSTERS]; 8 | extern int sgnSyncItem; 9 | 10 | DWORD sync_all_monsters(const BYTE *pbBuf, DWORD dwMaxLen); 11 | void sync_one_monster(); 12 | BOOL sync_monster_active(TSyncMonster *p); 13 | void sync_monster_pos(TSyncMonster *p, int ndx); 14 | BOOL sync_monster_active2(TSyncMonster *p); 15 | void SyncPlrInv(TSyncHeader *pHdr); 16 | DWORD sync_update(int pnum, const BYTE *pbBuf); 17 | void sync_monster(int pnum, const TSyncMonster *p); 18 | void sync_init(); 19 | 20 | #endif /* __SYNC_H__ */ 21 | -------------------------------------------------------------------------------- /Source/textdat.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __TEXTDAT_H__ 3 | #define __TEXTDAT_H__ 4 | 5 | extern const TextDataStruct alltext[259]; 6 | extern const int gdwAllTextEntries; 7 | 8 | #endif /* __TEXTDAT_H__ */ 9 | -------------------------------------------------------------------------------- /Source/tmsg.cpp: -------------------------------------------------------------------------------- 1 | #include "diablo.h" 2 | 3 | DEVILUTION_BEGIN_NAMESPACE 4 | 5 | static TMsg *sgpTimedMsgHead; 6 | 7 | int tmsg_get(BYTE *pbMsg, DWORD dwMaxLen) 8 | { 9 | int len; 10 | TMsg *head; 11 | 12 | if (!sgpTimedMsgHead) 13 | return 0; 14 | 15 | if ((int)(sgpTimedMsgHead->hdr.dwTime - GetTickCount()) >= 0) 16 | return 0; 17 | head = sgpTimedMsgHead; 18 | sgpTimedMsgHead = head->hdr.pNext; 19 | len = head->hdr.bLen; 20 | // BUGFIX: ignores dwMaxLen 21 | memcpy(pbMsg, head->body, len); 22 | mem_free_dbg(head); 23 | return len; 24 | } 25 | 26 | void tmsg_add(BYTE *pbMsg, BYTE bLen) 27 | { 28 | TMsg **tail; 29 | 30 | TMsg *msg = (TMsg *)DiabloAllocPtr(bLen + sizeof(*msg)); 31 | msg->hdr.pNext = NULL; 32 | msg->hdr.dwTime = GetTickCount() + 500; 33 | msg->hdr.bLen = bLen; 34 | memcpy(msg->body, pbMsg, bLen); 35 | for (tail = &sgpTimedMsgHead; *tail; tail = &(*tail)->hdr.pNext) { 36 | ; 37 | } 38 | *tail = msg; 39 | } 40 | 41 | void tmsg_start() 42 | { 43 | /// ASSERT: assert(! sgpTimedMsgHead); 44 | } 45 | 46 | void *tmsg_cleanup() 47 | { 48 | TMsg *next; 49 | 50 | while (sgpTimedMsgHead) { 51 | next = sgpTimedMsgHead->hdr.pNext; 52 | MemFreeDbg(sgpTimedMsgHead); 53 | sgpTimedMsgHead = next; 54 | } 55 | return sgpTimedMsgHead; 56 | } 57 | 58 | DEVILUTION_END_NAMESPACE 59 | -------------------------------------------------------------------------------- /Source/tmsg.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __TMSG_H__ 3 | #define __TMSG_H__ 4 | 5 | int tmsg_get(BYTE *pbMsg, DWORD dwMaxLen); 6 | void tmsg_add(BYTE *pbMsg, BYTE bLen); 7 | void tmsg_start(); 8 | void *tmsg_cleanup(); 9 | 10 | #endif /* __TMSG_H__ */ 11 | -------------------------------------------------------------------------------- /Source/town.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __TOWN_H__ 3 | #define __TOWN_H__ 4 | 5 | void town_clear_upper_buf(BYTE *pBuff); 6 | void town_clear_low_buf(BYTE *pBuff); 7 | void town_special_lower(BYTE *pBuff, int nCel); 8 | void town_special_upper(BYTE *pBuff, int nCel); 9 | void town_draw_clipped_e_flag(BYTE *pBuff, int x, int y, int sx, int sy); 10 | void town_draw_clipped_town(BYTE *pBuff, int x, int y, int sx, int sy, BOOL some_flag); 11 | void town_draw_lower(int x, int y, int sx, int sy, int a5, int some_flag); 12 | void town_draw_clipped_e_flag_2(BYTE *pBuff, int x, int y, int a4, int a5, int sx, int sy); 13 | void town_draw_clipped_town_2(BYTE *pBuff, int x, int y, int a4, int a5, int sx, int sy, BOOL some_flag); 14 | void town_draw_lower_2(int x, int y, int sx, int sy, int a5, int a6, int some_flag); 15 | void town_draw_e_flag(BYTE *pBuff, int x, int y, int a4, int dir, int sx, int sy); 16 | void town_draw_town_all(BYTE *pBuff, int x, int y, int a4, int dir, int sx, int sy, BOOL some_flag); 17 | void town_draw_upper(int x, int y, int sx, int sy, int a5, int a6, int some_flag); 18 | void T_DrawGame(int x, int y); 19 | void T_DrawZoom(int x, int y); 20 | void T_DrawView(int StartX, int StartY); 21 | void SetTownMicros(); 22 | void T_FillSector(unsigned char *P3Tiles, unsigned char *pSector, int xi, int yi, int w, int h); 23 | void T_FillTile(unsigned char *P3Tiles, int xx, int yy, int t); 24 | void T_Pass3(); 25 | void CreateTown(int entry); 26 | 27 | #endif /* __TOWN_H__ */ 28 | -------------------------------------------------------------------------------- /Source/towners.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __TOWNERS_H__ 3 | #define __TOWNERS_H__ 4 | 5 | extern TownerStruct towner[16]; 6 | 7 | int GetActiveTowner(int t); 8 | void SetTownerGPtrs(BYTE *pData, BYTE **pAnim); /* unsigned char *+** */ 9 | void NewTownerAnim(int tnum, unsigned char *pAnim, int numFrames, int Delay); 10 | void InitTownerInfo(int i, int w, int sel, int t, int x, int y, int ao, int tp); 11 | void InitQstSnds(int i); 12 | void InitSmith(); 13 | void InitBarOwner(); 14 | void InitTownDead(); 15 | void InitWitch(); 16 | void InitBarmaid(); 17 | void InitBoy(); 18 | void InitHealer(); 19 | void InitTeller(); 20 | void InitDrunk(); 21 | void InitCows(); 22 | void InitTowners(); 23 | void FreeTownerGFX(); 24 | void TownCtrlMsg(int i); 25 | void TownBlackSmith(); 26 | void TownBarOwner(); 27 | void TownDead(); 28 | void TownHealer(); 29 | void TownStory(); 30 | void TownDrunk(); 31 | void TownBoy(); 32 | void TownWitch(); 33 | void TownBarMaid(); 34 | void TownCow(); 35 | void ProcessTowners(); 36 | ItemStruct *PlrHasItem(int pnum, int item, int *i); 37 | void TownerTalk(int first, int t); 38 | void TalkToTowner(int p, int t); 39 | void CowSFX(int pnum); 40 | 41 | /* data */ 42 | 43 | extern QuestTalkData Qtalklist[11]; 44 | 45 | #endif /* __TOWNERS_H__ */ 46 | -------------------------------------------------------------------------------- /Source/track.cpp: -------------------------------------------------------------------------------- 1 | #include "diablo.h" 2 | #include "../3rdParty/Storm/Source/storm.h" 3 | 4 | DEVILUTION_BEGIN_NAMESPACE 5 | 6 | static BYTE sgbIsScrolling; 7 | static DWORD sgdwLastWalk; 8 | static BOOL sgbIsWalking; 9 | 10 | void track_process() 11 | { 12 | if (!sgbIsWalking) 13 | return; 14 | 15 | if (cursmx < 0 || cursmx >= MAXDUNX - 1 || cursmy < 0 || cursmy >= MAXDUNY - 1) 16 | return; 17 | 18 | if (plr[myplr]._pVar8 <= 6 && plr[myplr]._pmode != PM_STAND) 19 | return; 20 | 21 | if (cursmx != plr[myplr]._ptargx || cursmy != plr[myplr]._ptargy) { 22 | DWORD tick = GetTickCount(); 23 | if ((int)(tick - sgdwLastWalk) >= 300) { 24 | sgdwLastWalk = tick; 25 | NetSendCmdLoc(TRUE, CMD_WALKXY, cursmx, cursmy); 26 | if (!sgbIsScrolling) 27 | sgbIsScrolling = 1; 28 | } 29 | } 30 | } 31 | 32 | void track_repeat_walk(BOOL rep) 33 | { 34 | if (sgbIsWalking == rep) 35 | return; 36 | 37 | sgbIsWalking = rep; 38 | if (rep) { 39 | sgbIsScrolling = 0; 40 | sgdwLastWalk = GetTickCount() - 50; 41 | NetSendCmdLoc(TRUE, CMD_WALKXY, cursmx, cursmy); 42 | } else if (sgbIsScrolling) { 43 | sgbIsScrolling = 0; 44 | } 45 | } 46 | 47 | BOOL track_isscrolling() 48 | { 49 | return sgbIsScrolling; 50 | } 51 | 52 | DEVILUTION_END_NAMESPACE 53 | -------------------------------------------------------------------------------- /Source/track.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __TRACK_H__ 3 | #define __TRACK_H__ 4 | 5 | void track_process(); 6 | void track_repeat_walk(BOOL rep); 7 | BOOL track_isscrolling(); 8 | 9 | #endif /* __TRACK_H__ */ 10 | -------------------------------------------------------------------------------- /Source/trigs.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __TRIGS_H__ 3 | #define __TRIGS_H__ 4 | 5 | extern BOOL townwarps[3]; 6 | extern BOOL trigflag; 7 | extern int numtrigs; 8 | extern TriggerStruct trigs[MAXTRIGGERS]; 9 | extern int TWarpFrom; // weak 10 | 11 | void InitNoTriggers(); 12 | void InitTownTriggers(); 13 | void InitL1Triggers(); 14 | void InitL2Triggers(); 15 | void InitL3Triggers(); 16 | void InitL4Triggers(); 17 | void InitSKingTriggers(); 18 | void InitSChambTriggers(); 19 | void InitPWaterTriggers(); 20 | void InitVPTriggers(); 21 | BOOL ForceTownTrig(); 22 | BOOL ForceL1Trig(); 23 | BOOL ForceL2Trig(); 24 | BOOL ForceL3Trig(); 25 | BOOL ForceL4Trig(); 26 | void Freeupstairs(); 27 | BOOL ForceSKingTrig(); 28 | BOOL ForceSChambTrig(); 29 | BOOL ForcePWaterTrig(); 30 | void CheckTrigForce(); 31 | void CheckTriggers(); 32 | 33 | /* rdata */ 34 | 35 | extern int TownDownList[11]; 36 | extern int TownWarp1List[13]; 37 | extern int L1UpList[12]; 38 | extern int L1DownList[10]; 39 | extern int L2UpList[3]; 40 | extern int L2DownList[5]; 41 | extern int L2TWarpUpList[3]; 42 | extern int L3UpList[15]; 43 | extern int L3DownList[9]; 44 | extern int L3TWarpUpList[14]; 45 | extern int L4UpList[4]; 46 | extern int L4DownList[6]; 47 | extern int L4TWarpUpList[4]; 48 | extern int L4PentaList[33]; 49 | 50 | #endif /* __TRIGS_H__ */ 51 | -------------------------------------------------------------------------------- /Source/wave.h: -------------------------------------------------------------------------------- 1 | //HEADER_GOES_HERE 2 | #ifndef __WAVE_H__ 3 | #define __WAVE_H__ 4 | 5 | BOOL WCloseFile(HANDLE file); 6 | LONG WGetFileSize(HANDLE hsFile, DWORD *lpFileSizeHigh); 7 | void WGetFileArchive(HANDLE hsFile, DWORD *retry, const char *FileName); 8 | BOOL WOpenFile(const char *FileName, HANDLE *phsFile, BOOL mayNotExist); 9 | void WReadFile(HANDLE hsFile, LPVOID buf, DWORD to_read); 10 | int WSetFilePointer(HANDLE file1, int offset, HANDLE file2, int whence); 11 | BOOL LoadWaveFormat(HANDLE hsFile, WAVEFORMATEX *pwfx); 12 | void *AllocateMemFile(HANDLE hsFile, MEMFILE *pMemFile, DWORD dwPos); 13 | void FreeMemFile(MEMFILE *pMemFile); 14 | BOOL ReadWaveFile(MEMFILE *pMemFile, WAVEFORMATEX *pwfx, CKINFO *chunk); 15 | BOOL ReadMemFile(MEMFILE *pMemFile, void *lpBuf, size_t length); 16 | void FillMemFile(MEMFILE *pMemFile); 17 | int SeekMemFile(MEMFILE *pMemFile, ULONG lDist, DWORD dwMethod); 18 | BOOL ReadWaveSection(MEMFILE *pMemFile, DWORD id, CKINFO *chunk); 19 | BYTE *LoadWaveFile(HANDLE hsFile, WAVEFORMATEX *pwfx, CKINFO *chunk); 20 | 21 | #endif /* __WAVE_H__ */ 22 | -------------------------------------------------------------------------------- /SourceS/devilution.h: -------------------------------------------------------------------------------- 1 | #include "diablo.h" 2 | #include "../3rdParty/Storm/Source/storm.h" 3 | -------------------------------------------------------------------------------- /SourceS/macos_stdarg.h: -------------------------------------------------------------------------------- 1 | #ifndef __STDARG_H 2 | #define __STDARG_H 3 | 4 | typedef __builtin_va_list va_list; 5 | #define _VA_LIST_T 6 | #define va_start(ap, param) __builtin_va_start(ap, param) 7 | #define va_end(ap) __builtin_va_end(ap) 8 | 9 | #endif /* __STDARG_H */ 10 | -------------------------------------------------------------------------------- /SourceS/miniwin.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | // work around https://reviews.llvm.org/D51265 6 | #if defined(__APPLE__) || defined(__FreeBSD__) 7 | #include "macos_stdarg.h" 8 | #else 9 | #include 10 | #endif 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | // For _rotr() 17 | #if !defined(_MSC_VER) && defined(DEVILUTION_ENGINE) 18 | #if defined(__x86_64__) || defined(__i386__) 19 | #include 20 | #else 21 | unsigned int _rotl(unsigned int value, int shift); 22 | unsigned int _rotr(unsigned int value, int shift); 23 | #endif 24 | #endif 25 | 26 | #ifndef _WIN32 27 | #define __int8 char 28 | #define __int16 short 29 | #define __int32 int 30 | #define __int64 long long __attribute__((aligned(8))) 31 | #endif 32 | 33 | #include "miniwin/misc.h" 34 | #include "miniwin/com.h" 35 | #include "miniwin/ui.h" 36 | #include "miniwin/thread.h" 37 | #include "miniwin/rand.h" 38 | #include "storm_full.h" 39 | 40 | #define MAX_PATH DVL_MAX_PATH 41 | #ifdef DEVILUTION_ENGINE 42 | #include "miniwin/misc_macro.h" 43 | #include "miniwin/com_macro.h" 44 | #endif 45 | -------------------------------------------------------------------------------- /SourceS/miniwin/com/dsound_macro.inc: -------------------------------------------------------------------------------- 1 | #define DSBCAPS_PRIMARYBUFFER DVL_DSBCAPS_PRIMARYBUFFER 2 | #define DSBCAPS_STATIC DVL_DSBCAPS_STATIC 3 | #define DSBCAPS_CTRLPAN DVL_DSBCAPS_CTRLPAN 4 | #define DSBCAPS_CTRLVOLUME DVL_DSBCAPS_CTRLVOLUME 5 | 6 | #define WAVE_FORMAT_PCM DVL_WAVE_FORMAT_PCM 7 | 8 | #define ERROR_SUCCESS DVL_ERROR_SUCCESS 9 | 10 | #define _FACDS DVL__FACDS 11 | #define MAKE_DSHRESULT DVL_MAKE_DSHRESULT 12 | 13 | #define E_NOINTERFACE 0x80004002 14 | #define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70) 15 | #define DSERR_BADFORMAT MAKE_DSHRESULT(100) 16 | #define DSERR_NODRIVER MAKE_DSHRESULT(120) 17 | #define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130) 18 | #define DSERR_BUFFERLOST DVL_DSERR_BUFFERLOST 19 | #define DS_OK DVL_DS_OK 20 | #define DSERR_INVALIDCALL MAKE_DSHRESULT(50) 21 | #define DSERR_NOAGGREGATION 0x80040110 22 | #define DSERR_OUTOFMEMORY 0x8007000E 23 | #define DSERR_INVALIDPARAM DVL_DSERR_INVALIDPARAM 24 | #define DSERR_ALLOCATED MAKE_DSHRESULT(10) 25 | #define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30) 26 | 27 | #define DSSCL_EXCLUSIVE DVL_DSSCL_EXCLUSIVE 28 | #define DVL_DSBSTATUS_PLAYING DSBSTATUS_PLAYING 29 | -------------------------------------------------------------------------------- /SourceS/miniwin/com_macro.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define DSBSTATUS_PLAYING 0x00000001 4 | #define CS_HREDRAW 0x0001 5 | #define CS_VREDRAW 0x0002 6 | 7 | #define IDC_ARROW (LPCSTR)0x1 // Dummy value 8 | 9 | #define CSIDL_STARTMENU 0x000b 10 | 11 | #define SW_HIDE DVL_SW_HIDE 12 | #define SW_SHOWNORMAL DVL_SW_SHOWNORMAL 13 | 14 | #define BLACK_BRUSH 4 15 | 16 | #define LR_DEFAULTCOLOR 0x0000 17 | 18 | #define IMAGE_ICON 1 19 | 20 | #define SM_CXSCREEN DVL_SM_CXSCREEN 21 | #define SM_CYSCREEN DVL_SM_CYSCREEN 22 | 23 | #define GW_HWNDNEXT 2 24 | 25 | #define E_FAIL DVL_E_FAIL 26 | #define S_OK DVL_S_OK 27 | #define NOERROR DVL_S_OK 28 | 29 | #define MAKE_HRESULT DVL_MAKE_HRESULT 30 | 31 | #include "miniwin/com/ddraw_macro.inc" 32 | #include "miniwin/com/dsound_macro.inc" 33 | -------------------------------------------------------------------------------- /SourceS/miniwin/popdecl.inc: -------------------------------------------------------------------------------- 1 | #ifndef DEVILUTION_ENGINE 2 | #pragma pop_macro("__cdecl") 3 | #pragma pop_macro("__fastcall") 4 | #pragma pop_macro("__stdcall") 5 | #pragma pop_macro("CALLBACK") 6 | #pragma pop_macro("APIENTRY") 7 | #pragma pop_macro("WINAPI") 8 | #pragma pop_macro("WINAPIV") 9 | #pragma pop_macro("WINUSERAPI") 10 | #endif 11 | -------------------------------------------------------------------------------- /SourceS/miniwin/pushdecl.inc: -------------------------------------------------------------------------------- 1 | #ifndef DEVILUTION_ENGINE 2 | #pragma push_macro("__cdecl") 3 | #pragma push_macro("__fastcall") 4 | #pragma push_macro("__stdcall") 5 | #pragma push_macro("CALLBACK") 6 | #pragma push_macro("APIENTRY") 7 | #pragma push_macro("WINAPI") 8 | #pragma push_macro("WINAPIV") 9 | #pragma push_macro("WINUSERAPI") 10 | #endif 11 | 12 | #undef __cdecl 13 | #undef __fastcall 14 | #undef __stdcall 15 | #undef CALLBACK 16 | #undef APIENTRY 17 | #undef WINAPI 18 | #undef WINAPIV 19 | #undef WINUSERAPI 20 | #define __cdecl 21 | #define __fastcall 22 | #define __stdcall 23 | #define CALLBACK 24 | #define APIENTRY 25 | #define WINAPI 26 | #define WINAPIV 27 | #define WINUSERAPI 28 | -------------------------------------------------------------------------------- /SourceS/miniwin/rand.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace dvl { 4 | 5 | int rand(void); 6 | void srand(uint32_t seed); 7 | 8 | } // namespace dvl 9 | -------------------------------------------------------------------------------- /SourceS/miniwin/thread.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace dvl { 4 | 5 | typedef void *CRITICAL_SECTION, **LPCRITICAL_SECTION; 6 | void WINAPI InitializeCriticalSection(LPCRITICAL_SECTION lpCriticalSection); 7 | void WINAPI EnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection); 8 | void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION lpCriticalSection); 9 | void WINAPI DeleteCriticalSection(LPCRITICAL_SECTION lpCriticalSection); 10 | 11 | } // namespace dvl 12 | -------------------------------------------------------------------------------- /SourceS/miniwin/ui.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace dvl { 4 | 5 | BOOL EndDialog(HWND hDlg, INT_PTR nResult); 6 | BOOL SetDlgItemText(HWND hDlg, int nIDDlgItem, LPCSTR lpString); 7 | BOOL SetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags); 8 | DWORD FormatMessage(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, char *lpBuffer, DWORD nSize, va_list *Arguments); 9 | int DialogBoxParam(HINSTANCE hInstance, LPCSTR msgId, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam); 10 | LPCSTR DVL_MAKEINTRESOURCE(int i); 11 | 12 | } // namespace dvl 13 | -------------------------------------------------------------------------------- /SourceS/storm_full.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace dvl { 4 | extern "C" { 5 | 6 | extern DWORD nLastError; 7 | 8 | void TranslateFileName(char *dst, int dstLen, const char *src); 9 | 10 | } 11 | } // namespace dvl 12 | -------------------------------------------------------------------------------- /SourceX/.clang-format: -------------------------------------------------------------------------------- 1 | { 2 | BasedOnStyle: webkit, 3 | AlignTrailingComments: true, 4 | AllowShortBlocksOnASingleLine: true, 5 | AllowShortFunctionsOnASingleLine: None, 6 | PointerAlignment: Right, 7 | TabWidth: 4, 8 | UseTab: ForIndentation, 9 | } 10 | -------------------------------------------------------------------------------- /SourceX/DiabloUI/dialogs.cpp: -------------------------------------------------------------------------------- 1 | #include "devilution.h" 2 | #include "DiabloUI/diabloui.h" 3 | 4 | namespace dvl { 5 | 6 | UI_Item OKCANCEL_DIALOG[] = { 7 | { { 180, 168, 280, 144 }, UI_IMAGE, 0, 0, "ui_art\\spopup.pcx" }, 8 | { { 200, 180, 240, 80 }, UI_TEXT, UIS_CENTER }, // message 9 | { { 200, 265, 110, 28 }, UI_BUTTON, UIS_SML1, 0, "OK" }, 10 | { { 330, 265, 110, 28 }, UI_BUTTON, UIS_SML2, 0, "Cancel" }, 11 | }; 12 | 13 | UI_Item OK_DIALOG[] = { 14 | { { 180, 168, 280, 144 }, UI_IMAGE, 0, 0, "ui_art\\spopup.pcx" }, 15 | { { 200, 180, 240, 80 }, UI_TEXT, UIS_CENTER }, // message 16 | { { 265, 265, 110, 28 }, UI_BUTTON, UIS_SML1, 0, "OK" }, 17 | }; 18 | 19 | UI_Item PROGRESS_DIALOG[] = { 20 | { { 180, 168, 280, 144 }, UI_IMAGE, 0, 0, "ui_art\\spopup.pcx" }, 21 | { { 180, 177, 280, 43 }, UI_TEXT, UIS_CENTER }, // Message 22 | { { 205, 220, 228, 38 }, UI_IMAGE, 0, 0, "ui_art\\prog_bg.pcx" }, 23 | { { 265, 267, 110, 28 }, UI_BUTTON, UIS_SML1, 0, "Cancel" }, 24 | }; 25 | 26 | UI_Item SELOK_DIALOG[] = { 27 | { { 140, 210, 400, 168 } }, // Message 28 | { { 230, 390, 180, 35 }, UI_LIST, UIS_CENTER, 0, "OK" }, 29 | }; 30 | 31 | UI_Item SELYESNO_DIALOG[] = { 32 | { { 120, 210, 400, 168 } }, // Question text 33 | { { 230, 390, 180, 35 }, UI_LIST, UIS_CENTER, 0, "Yes" }, 34 | { { 230, 426, 180, 35 }, UI_LIST, UIS_CENTER, 0, "No" }, 35 | }; 36 | 37 | UI_Item SPAWNERR_DIALOG[] = { 38 | { { 140, 199, 400, 177 }, UI_TEXT, 0, 0, "The Rogue and Sorcerer are only available in the full retail version of Diablo. For ordering information call (800) 953-SNOW." }, 39 | { { 230, 407, 180, 43 }, UI_BUTTON, 0, 0, "OK" }, 40 | }; 41 | 42 | } 43 | -------------------------------------------------------------------------------- /SourceX/DiabloUI/selconn.h: -------------------------------------------------------------------------------- 1 | namespace dvl { 2 | 3 | void selconn_Esc(); 4 | void selconn_Focus(int value); 5 | void selconn_Select(int value); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /SourceX/DiabloUI/selgame.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace dvl { 4 | 5 | void selgame_GameSelection_Init(); 6 | void selgame_GameSelection_Focus(int value); 7 | void selgame_GameSelection_Select(int value); 8 | void selgame_GameSelection_Esc(); 9 | void selgame_Diff_Focus(int value); 10 | void selgame_Diff_Select(int value); 11 | void selgame_Diff_Esc(); 12 | void selgame_Password_Init(int value); 13 | void selgame_Password_Select(int value); 14 | void selgame_Password_Esc(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /SourceX/DiabloUI/selhero.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace dvl { 4 | 5 | void selhero_List_Init(); 6 | void selhero_List_Focus(int value); 7 | void selhero_List_Select(int value); 8 | void selhero_List_Esc(); 9 | void selhero_ClassSelector_Focus(int value); 10 | void selhero_ClassSelector_Select(int value); 11 | void selhero_ClassSelector_Esc(); 12 | void selhero_Name_Select(int value); 13 | void selhero_Name_Esc(); 14 | void selhero_Load_Focus(int value); 15 | void selhero_Load_Select(int value); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /SourceX/DiabloUI/title.cpp: -------------------------------------------------------------------------------- 1 | #include "devilution.h" 2 | #include "DiabloUI/diabloui.h" 3 | 4 | namespace dvl { 5 | 6 | void title_Load() 7 | { 8 | LoadBackgroundArt("ui_art\\title.pcx"); 9 | LoadMaskedArtFont("ui_art\\logo.pcx", &ArtLogos[LOGO_BIG], 15); 10 | } 11 | 12 | void title_Free() 13 | { 14 | mem_free_dbg(ArtBackground.data); 15 | ArtBackground.data = NULL; 16 | mem_free_dbg(ArtLogos[LOGO_BIG].data); 17 | ArtLogos[LOGO_BIG].data = NULL; 18 | } 19 | 20 | BOOL UiTitleDialog(int a1) 21 | { 22 | UI_Item TITLESCREEN_DIALOG[] = { 23 | { { 0, 0, 640, 480 }, UI_IMAGE, 0, 0, NULL, &ArtBackground }, 24 | { { 49, 410, 550, 26 }, UI_TEXT, UIS_MED | UIS_CENTER, 0, "Copyright \xA9 1996-2001 Blizzard Entertainment" }, 25 | }; 26 | 27 | title_Load(); 28 | 29 | bool endMenu = false; 30 | Uint32 timeOut = SDL_GetTicks() + 7000; 31 | 32 | SDL_Event event; 33 | while (!endMenu && SDL_GetTicks() < timeOut) { 34 | UiRenderItems(TITLESCREEN_DIALOG, size(TITLESCREEN_DIALOG)); 35 | DrawLogo(182, LOGO_BIG); 36 | UiFadeIn(); 37 | 38 | while (SDL_PollEvent(&event)) { 39 | switch (event.type) { 40 | case SDL_CONTROLLERBUTTONDOWN: 41 | case SDL_KEYDOWN: /* To match the original uncomment this 42 | if (event.key.keysym.sym == SDLK_UP 43 | || event.key.keysym.sym == SDLK_UP 44 | || event.key.keysym.sym == SDLK_LEFT 45 | || event.key.keysym.sym == SDLK_RIGHT) { 46 | break; 47 | }*/ 48 | case SDL_MOUSEBUTTONDOWN: 49 | endMenu = true; 50 | break; 51 | case SDL_QUIT: 52 | exit(0); 53 | } 54 | } 55 | } 56 | BlackPalette(); 57 | 58 | title_Free(); 59 | 60 | return true; 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /SourceX/dvlnet/abstract_net.cpp: -------------------------------------------------------------------------------- 1 | #include "dvlnet/abstract_net.h" 2 | 3 | #include "stubs.h" 4 | #include "dvlnet/loopback.h" 5 | 6 | namespace dvl { 7 | namespace net { 8 | 9 | abstract_net::~abstract_net() 10 | { 11 | } 12 | 13 | std::unique_ptr abstract_net::make_net(provider_t provider) 14 | { 15 | return std::make_unique(); 16 | } 17 | 18 | } // namespace net 19 | } // namespace dvl -------------------------------------------------------------------------------- /SourceX/dvlnet/frame_queue.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "dvlnet/abstract_net.h" 6 | 7 | namespace dvl { 8 | namespace net { 9 | 10 | class frame_queue_exception : public dvlnet_exception {}; 11 | 12 | class frame_queue { 13 | public: 14 | typedef uint32_t framesize_t; 15 | constexpr static framesize_t max_frame_size = 0xFFFF; 16 | private: 17 | size_t current_size = 0; 18 | std::deque buffer_deque; 19 | size_t nextsize = 0; 20 | 21 | size_t size(); 22 | buffer_t read(size_t s); 23 | public: 24 | bool packet_ready(); 25 | buffer_t read_packet(); 26 | void write(buffer_t buf); 27 | 28 | static buffer_t make_frame(buffer_t packetbuf); 29 | }; 30 | 31 | } // namespace net 32 | } // namespace dvl 33 | -------------------------------------------------------------------------------- /SourceX/dvlnet/loopback.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #include "devilution.h" 7 | #include "dvlnet/abstract_net.h" 8 | 9 | namespace dvl { 10 | namespace net { 11 | 12 | class loopback : public abstract_net { 13 | private: 14 | std::queue message_queue; 15 | buffer_t message_last; 16 | const int plr_single = 0; 17 | 18 | public: 19 | virtual int create(std::string addrstr, std::string passwd); 20 | virtual int join(std::string addrstr, std::string passwd); 21 | virtual bool SNetReceiveMessage(int* sender, char** data, int* size); 22 | virtual bool SNetSendMessage(int dest, void* data, unsigned int size); 23 | virtual bool SNetReceiveTurns(char** data, unsigned int* size, 24 | DWORD* status); 25 | virtual bool SNetSendTurn(char* data, unsigned int size); 26 | virtual int SNetGetProviderCaps(struct _SNETCAPS* caps); 27 | virtual bool SNetRegisterEventHandler(event_type evtype, 28 | SEVTHANDLER func); 29 | virtual bool SNetUnregisterEventHandler(event_type evtype, 30 | SEVTHANDLER func); 31 | virtual bool SNetLeaveGame(int type); 32 | virtual bool SNetDropPlayer(int playerid, DWORD flags); 33 | virtual bool SNetGetOwnerTurnsWaiting(DWORD *turns); 34 | virtual bool SNetGetTurnsInTransit(int *turns); 35 | virtual void setup_gameinfo(buffer_t info); 36 | }; 37 | 38 | } // namespace net 39 | } // namespace dvl 40 | -------------------------------------------------------------------------------- /SourceX/dvlnet/tcp_client.cpp: -------------------------------------------------------------------------------- 1 | #include "dvlnet/tcp_client.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace dvl { 10 | namespace net { 11 | 12 | int tcp_client::create(std::string addrstr, std::string passwd) 13 | { 14 | return -1; 15 | } 16 | 17 | int tcp_client::join(std::string addrstr, std::string passwd) 18 | { 19 | return 0; 20 | } 21 | 22 | void tcp_client::poll() 23 | { 24 | 25 | } 26 | 27 | 28 | 29 | } // namespace net 30 | } // namespace dvl 31 | -------------------------------------------------------------------------------- /SourceX/dvlnet/tcp_client.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | 7 | 8 | namespace dvl { 9 | namespace net { 10 | 11 | class tcp_client { 12 | 13 | public: 14 | int create(std::string addrstr, std::string passwd); 15 | int join(std::string addrstr, std::string passwd); 16 | 17 | constexpr static unsigned short default_port = 6112; 18 | 19 | virtual void poll(); 20 | 21 | 22 | }; 23 | 24 | } // namespace net 25 | } // namespace dvl 26 | -------------------------------------------------------------------------------- /SourceX/dvlnet/tcp_server.cpp: -------------------------------------------------------------------------------- 1 | #include "dvlnet/tcp_server.h" 2 | 3 | #include 4 | #include 5 | 6 | #include "dvlnet/base.h" 7 | 8 | namespace dvl { 9 | namespace net { 10 | 11 | tcp_server::tcp_server( ) 12 | { 13 | 14 | } 15 | 16 | std::string tcp_server::localhost_self() 17 | { 18 | return NULL; 19 | } 20 | 21 | 22 | } // namespace net 23 | } // namespace dvl 24 | -------------------------------------------------------------------------------- /SourceX/dvlnet/tcp_server.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | 8 | namespace dvl { 9 | namespace net { 10 | 11 | class server_exception ; 12 | 13 | class tcp_server { 14 | public: 15 | tcp_server(); 16 | std::string localhost_self(); 17 | 18 | }; 19 | 20 | } //namespace net 21 | } //namespace dvl 22 | -------------------------------------------------------------------------------- /SourceX/dvlnet/udp_p2p.cpp: -------------------------------------------------------------------------------- 1 | #include "dvlnet/udp_p2p.h" 2 | 3 | #include 4 | 5 | namespace dvl { 6 | namespace net { 7 | 8 | int udp_p2p::create(std::string addrstr, std::string passwd) 9 | { 10 | return 0; 11 | } 12 | 13 | int udp_p2p::join(std::string addrstr, std::string passwd) 14 | { 15 | return 0; 16 | } 17 | 18 | 19 | } // namespace net 20 | } // namespace dvl 21 | -------------------------------------------------------------------------------- /SourceX/dvlnet/udp_p2p.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | 7 | namespace dvl { 8 | namespace net { 9 | 10 | class udp_p2p { 11 | public: 12 | virtual int create(std::string addrstr, std::string passwd); 13 | virtual int join(std::string addrstr, std::string passwd); 14 | virtual void poll(); 15 | 16 | 17 | }; 18 | 19 | } // namespace net 20 | } // namespace dvl 21 | -------------------------------------------------------------------------------- /SourceX/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "devilution.h" 5 | 6 | #if !defined(__APPLE__) 7 | extern "C" const char *__asan_default_options() 8 | { 9 | return "halt_on_error=0"; 10 | } 11 | #endif 12 | 13 | static std::string build_cmdline(int argc, char **argv) 14 | { 15 | std::string str; 16 | for (int i = 1; i < argc; i++) { 17 | if (i != 1) { 18 | str += ' '; 19 | } 20 | str += argv[i]; 21 | } 22 | return str; 23 | } 24 | 25 | int main(int argc, char **argv) 26 | { 27 | auto cmdline = build_cmdline(argc, argv); 28 | return dvl::WinMain(NULL, NULL, (char *)cmdline.c_str(), 0); 29 | } 30 | 31 | 32 | -------------------------------------------------------------------------------- /SourceX/miniwin/dsound.h: -------------------------------------------------------------------------------- 1 | #include "devilution.h" 2 | 3 | #include 4 | 5 | namespace dvl { 6 | 7 | struct DirectSoundBuffer : public IDirectSoundBuffer { 8 | public: 9 | virtual ULONG Release(); 10 | BOOL GetStatus(LPDWORD pdwStatus); 11 | HRESULT Lock(DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, 12 | LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags); 13 | HRESULT Play(DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags); 14 | HRESULT SetFormat(LPCWAVEFORMATEX pcfxFormat); 15 | HRESULT SetVolume(LONG lVolume); 16 | HRESULT SetPan(LONG lPan); 17 | HRESULT Stop(); 18 | HRESULT Unlock(LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2); 19 | HRESULT Restore(); 20 | private: 21 | int volume = 0; 22 | int pan = 0; 23 | Mix_Chunk *chunk; 24 | }; 25 | 26 | } // namespace dvl 27 | -------------------------------------------------------------------------------- /SourceX/miniwin/misc_dx.cpp: -------------------------------------------------------------------------------- 1 | #include "devilution.h" 2 | #include "miniwin/ddraw.h" 3 | #include "stubs.h" 4 | #include 5 | 6 | namespace dvl { 7 | 8 | WINBOOL SetCursorPos(int X, int Y) 9 | { 10 | 11 | return true; 12 | } 13 | 14 | int ShowCursor(WINBOOL bShow) 15 | { 16 | 17 | return 1; 18 | } 19 | 20 | WINBOOL TextOutA(HDC hdc, int x, int y, LPCSTR lpString, int c) 21 | { 22 | 23 | return true; 24 | } 25 | 26 | } // namespace dvl 27 | -------------------------------------------------------------------------------- /SourceX/miniwin/rand.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "devilution.h" 4 | 5 | namespace dvl { 6 | 7 | static uint32_t rand_state = 0; 8 | 9 | int rand(void) 10 | { 11 | rand_state = rand_state * 214013 + 2531011; 12 | return (rand_state >> 16) & 0x7FFF; 13 | } 14 | 15 | void srand(uint32_t seed) 16 | { 17 | rand_state = seed; 18 | } 19 | 20 | } // namespace dvl 21 | -------------------------------------------------------------------------------- /SourceX/storm/storm_dx.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "devilution.h" 4 | #include "miniwin/ddraw.h" 5 | #include "stubs.h" 6 | 7 | namespace dvl { 8 | 9 | BOOL SDrawManualInitialize( 10 | HWND hWnd, 11 | LPDIRECTDRAW ddInterface, 12 | LPDIRECTDRAWSURFACE primarySurface, 13 | LPDIRECTDRAWSURFACE surface2, 14 | LPDIRECTDRAWSURFACE surface3, 15 | LPDIRECTDRAWSURFACE backSurface, 16 | LPDIRECTDRAWPALETTE ddPalette, 17 | HPALETTE hPalette) 18 | { 19 | DUMMY(); 20 | return true; 21 | } 22 | 23 | BOOL SDrawUpdatePalette(unsigned int firstentry, unsigned int numentries, PALETTEENTRY *pPalEntries, int a4) 24 | { 25 | assert(firstentry == 0); 26 | assert(numentries == 256); 27 | 28 | SDL_Color colors[256]; 29 | for (unsigned int i = firstentry; i < numentries; i++) { 30 | SDL_Color *c = &colors[i]; 31 | PALETTEENTRY *p = &pPalEntries[i]; 32 | c->r = p->peRed; 33 | c->g = p->peGreen; 34 | c->b = p->peBlue; 35 | c->a = SDL_ALPHA_OPAQUE; 36 | } 37 | 38 | assert(palette); 39 | if (SDL_SetPaletteColors(palette, colors, firstentry, numentries) <= -1) { 40 | SDL_Log(SDL_GetError()); 41 | return false; 42 | } 43 | 44 | return true; 45 | } 46 | 47 | } // namespace dvl 48 | -------------------------------------------------------------------------------- /Xcode/AppIcon.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/Xcode/AppIcon.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /Xcode/AppIcon.xcassets/AppIcon.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/Xcode/AppIcon.xcassets/AppIcon.appiconset/128.png -------------------------------------------------------------------------------- /Xcode/AppIcon.xcassets/AppIcon.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/Xcode/AppIcon.xcassets/AppIcon.appiconset/16.png -------------------------------------------------------------------------------- /Xcode/AppIcon.xcassets/AppIcon.appiconset/256-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/Xcode/AppIcon.xcassets/AppIcon.appiconset/256-1.png -------------------------------------------------------------------------------- /Xcode/AppIcon.xcassets/AppIcon.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/Xcode/AppIcon.xcassets/AppIcon.appiconset/256.png -------------------------------------------------------------------------------- /Xcode/AppIcon.xcassets/AppIcon.appiconset/512-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/Xcode/AppIcon.xcassets/AppIcon.appiconset/512-1.png -------------------------------------------------------------------------------- /Xcode/AppIcon.xcassets/AppIcon.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/Xcode/AppIcon.xcassets/AppIcon.appiconset/512.png -------------------------------------------------------------------------------- /Xcode/AppIcon.xcassets/AppIcon.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/Xcode/AppIcon.xcassets/AppIcon.appiconset/64.png -------------------------------------------------------------------------------- /Xcode/AppIcon.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "appicon-1.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "appicon-3.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "256-1.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "512-1.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Xcode/AppIcon.xcassets/AppIcon.appiconset/appicon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/Xcode/AppIcon.xcassets/AppIcon.appiconset/appicon-1.png -------------------------------------------------------------------------------- /Xcode/AppIcon.xcassets/AppIcon.appiconset/appicon-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/Xcode/AppIcon.xcassets/AppIcon.appiconset/appicon-3.png -------------------------------------------------------------------------------- /Xcode/AppIcon.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Xcode/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleIconFile 12 | AppIcon-1 13 | CFBundleIconName 14 | AppIcon-1 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | $(PRODUCT_NAME) 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 0.0.2 23 | CFBundleVersion 24 | 0.0.2 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | SDL_FILESYSTEM_BASE_DIR_TYPE 28 | parent 29 | 30 | 31 | -------------------------------------------------------------------------------- /Xcode/devilutionX.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Xcode/devilutionX.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 1.0.{build} 2 | 3 | pull_requests: 4 | do_not_increment_build_number: true 5 | clone_depth: 1 6 | image: Visual Studio 2017 7 | cache: c:\tools\vcpkg\installed\ 8 | 9 | install: 10 | - vcpkg install sdl2:x86-windows sdl2-mixer:x86-windows sdl2-ttf:x86-windows libsodium:x86-windows 11 | 12 | before_build: 13 | - cmake -G "Visual Studio 15 2017" -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake . 14 | 15 | build: 16 | project: $(APPVEYOR_BUILD_FOLDER)\$(APPVEYOR_PROJECT_NAME).sln 17 | verbosity: minimal 18 | artifacts: 19 | - path: Debug\devilutionx.exe 20 | name: devilutionx.exe 21 | -------------------------------------------------------------------------------- /docker/arch/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM base/archlinux 2 | 3 | RUN echo -e "[multilib]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf 4 | RUN pacman -Sy 5 | RUN pacman --noconfirm -Sy \ 6 | make gcc cmake pkg-config nasm lib32-gcc-libs lib32-sdl2 7 | 8 | WORKDIR /build 9 | VOLUME /src 10 | -------------------------------------------------------------------------------- /docker/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Build script to run inside a Docker container 5 | # 6 | 7 | set -e 8 | 9 | cmake /src 10 | make -j$(nproc) 11 | -------------------------------------------------------------------------------- /docker/ubuntu/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | RUN dpkg --add-architecture i386 4 | 5 | RUN apt-get update 6 | RUN apt-get update && apt-get install -y --no-install-recommends \ 7 | g++-multilib cmake nasm pkg-config libsdl2-dev:i386 8 | 9 | WORKDIR /build 10 | VOLUME /src 11 | -------------------------------------------------------------------------------- /docs/TODO.md: -------------------------------------------------------------------------------- 1 | ### Comments 2 | - `BUGFIX` known bugs in original (vanilla) code 3 | - `/* */` block comments are things to be fixed/checked 4 | - `FIX_ME` bad data 5 | 6 | Code issues (incorrect code that still works) 7 | - Critical sections should be constructors using `CCritSect` 8 | - Some functions/structures have incorrect signing (signed/unsigned BYTE) 9 | -------------------------------------------------------------------------------- /exefs/.stub: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/exefs/.stub -------------------------------------------------------------------------------- /exefs/main: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/exefs/main -------------------------------------------------------------------------------- /icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lantus/devilution-nx/02c215173cfd2c5ef9f3cb4e01b3ad73f36acaa2/icon.jpg -------------------------------------------------------------------------------- /resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by Diablo.rc 4 | // 5 | #define IDI_ICON1 101 6 | #define IDD_DIALOG1 104 // DX 7 | #define IDD_DIALOG2 105 // NOMEMORY 8 | #define IDD_DIALOG3 106 // NOFILE 9 | #define IDD_DIALOG4 107 // DDRAW 10 | #define IDD_DIALOG5 108 // DSOUND 11 | #define IDD_DIALOG6 109 // PENTIUM (deprecated in 1.00) 12 | #define IDD_DIALOG7 110 // DISKSPACE 13 | #define IDD_DIALOG8 111 // VIDEOMODE 14 | #define IDD_DIALOG9 112 // INSERTCD 15 | #define IDD_DIALOG10 113 // RESTRICTED 16 | #define IDD_DIALOG11 114 // READONLY 17 | 18 | // Next default values for new objects 19 | // 20 | #ifdef APSTUDIO_INVOKED 21 | #ifndef APSTUDIO_READONLY_SYMBOLS 22 | #define _APS_NEXT_RESOURCE_VALUE 103 23 | #define _APS_NEXT_COMMAND_VALUE 40001 24 | #define _APS_NEXT_CONTROL_VALUE 1000 25 | #define _APS_NEXT_SYMED_VALUE 101 26 | #endif 27 | #endif 28 | -------------------------------------------------------------------------------- /switch/switch_keyboard.h: -------------------------------------------------------------------------------- 1 | #ifndef SWITCH_KEYBOARD_H 2 | #define SWITCH_KEYBOARD_H 3 | 4 | void switch_start_text_input(char *guide_text, char *initial_text, int multiline); 5 | 6 | #endif /* SWITCH_KEYBOARD_H */ 7 | -------------------------------------------------------------------------------- /touch/touch.h: -------------------------------------------------------------------------------- 1 | #ifndef TOUCH_H 2 | #define TOUCH_H 3 | 4 | #include 5 | #include 6 | 7 | void handle_touch(SDL_Event *event, int current_mouse_x, int current_mouse_y); 8 | void finish_simulated_mouse_clicks(int current_mouse_x, int current_mouse_y); 9 | #endif 10 | --------------------------------------------------------------------------------