mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-31 03:50:37 -07:00
Was getting infamous c++ style warnings: ``` In file included from /home/erpre/s/ShipWright/soh/soh/SohGui/SohGui.cpp:8: In file included from /home/erpre/s/ShipWright/soh/soh/SohGui/SohGui.hpp:12: In file included from /home/erpre/s/ShipWright/soh/soh/SohGui/SohMenuBar.h:3: In file included from /home/erpre/s/ShipWright/soh/../libultraship/include/libultraship/libultraship.h:5: In file included from /home/erpre/s/ShipWright/soh/../libultraship/include/libultraship/bridge.h:4: In file included from /home/erpre/s/ShipWright/soh/../libultraship/src/public/bridge/resourcebridge.h:9: In file included from /home/erpre/s/ShipWright/soh/../libultraship/src/resource/type/Texture.h:3: In file included from /home/erpre/s/ShipWright/soh/../libultraship/src/resource/Resource.h:3: In file included from /home/erpre/s/ShipWright/soh/../libultraship/src/resource/File.h:3: In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/string:42: In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/char_traits.h:57: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:2: warning: destructor called on non-final 'SohGui::SohMenu' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor] 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:149:12: note: in instantiation of function template specialization 'std::destroy_at<SohGui::SohMenu>' requested here 149 | std::destroy_at(__pointer); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/alloc_traits.h:720:9: note: in instantiation of function template specialization 'std::_Destroy<SohGui::SohMenu>' requested here 720 | { std::_Destroy(__p); } | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:616:28: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<void>>::destroy<SohGui::SohMenu>' requested here 616 | allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:602:2: note: in instantiation of member function 'std::_Sp_counted_ptr_inplace<SohGui::SohMenu, std::allocator<void>, __gnu_cxx::_S_atomic>::_M_dispose' requested here 602 | _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:970:6: note: in instantiation of function template specialization 'std::_Sp_counted_ptr_inplace<SohGui::SohMenu, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace<const char (&)[18], const char (&)[10]>' requested here 970 | _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:1713:14: note: in instantiation of function template specialization 'std::__shared_count<>::__shared_count<SohGui::SohMenu, std::allocator<void>, const char (&)[18], const char (&)[10]>' requested here 1713 | : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:463:4: note: in instantiation of function template specialization 'std::__shared_ptr<SohGui::SohMenu>::__shared_ptr<std::allocator<void>, const char (&)[18], const char (&)[10]>' requested here 463 | : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:1007:14: note: in instantiation of function template specialization 'std::shared_ptr<SohGui::SohMenu>::shared_ptr<std::allocator<void>, const char (&)[18], const char (&)[10]>' requested here 1007 | return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, | ^ /home/erpre/s/ShipWright/soh/soh/SohGui/SohGui.cpp:121:21: note: in instantiation of function template specialization 'std::make_shared<SohGui::SohMenu, const char (&)[18], const char (&)[10]>' requested here 121 | mSohMenu = std::make_shared<SohMenu>(CVAR_WINDOW("Menu"), "Port Menu"); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:15: note: qualify call to silence this warning 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:2: warning: destructor called on non-final 'SohConsoleWindow' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor] 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:149:12: note: in instantiation of function template specialization 'std::destroy_at<SohConsoleWindow>' requested here 149 | std::destroy_at(__pointer); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/alloc_traits.h:720:9: note: in instantiation of function template specialization 'std::_Destroy<SohConsoleWindow>' requested here 720 | { std::_Destroy(__p); } | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:616:28: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<void>>::destroy<SohConsoleWindow>' requested here 616 | allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:602:2: note: in instantiation of member function 'std::_Sp_counted_ptr_inplace<SohConsoleWindow, std::allocator<void>, __gnu_cxx::_S_atomic>::_M_dispose' requested here 602 | _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:970:6: note: in instantiation of function template specialization 'std::_Sp_counted_ptr_inplace<SohConsoleWindow, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace<const char (&)[24], const char (&)[13], ImVec2>' requested here 970 | _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:1713:14: note: in instantiation of function template specialization 'std::__shared_count<>::__shared_count<SohConsoleWindow, std::allocator<void>, const char (&)[24], const char (&)[13], ImVec2>' requested here 1713 | : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:463:4: note: in instantiation of function template specialization 'std::__shared_ptr<SohConsoleWindow>::__shared_ptr<std::allocator<void>, const char (&)[24], const char (&)[13], ImVec2>' requested here 463 | : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:1007:14: note: in instantiation of function template specialization 'std::shared_ptr<SohConsoleWindow>::shared_ptr<std::allocator<void>, const char (&)[24], const char (&)[13], ImVec2>' requested here 1007 | return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, | ^ /home/erpre/s/ShipWright/soh/soh/SohGui/SohGui.cpp:124:27: note: in instantiation of function template specialization 'std::make_shared<SohConsoleWindow, const char (&)[24], const char (&)[13], ImVec2>' requested here 124 | mConsoleWindow = std::make_shared<SohConsoleWindow>(CVAR_WINDOW("SohConsole"), "Console##SoH", ImVec2(820, 630)); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:15: note: qualify call to silence this warning 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:2: warning: destructor called on non-final 'SohGfxDebuggerWindow' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor] 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:149:12: note: in instantiation of function template specialization 'std::destroy_at<SohGfxDebuggerWindow>' requested here 149 | std::destroy_at(__pointer); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/alloc_traits.h:720:9: note: in instantiation of function template specialization 'std::_Destroy<SohGfxDebuggerWindow>' requested here 720 | { std::_Destroy(__p); } | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:616:28: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<void>>::destroy<SohGfxDebuggerWindow>' requested here 616 | allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:602:2: note: in instantiation of member function 'std::_Sp_counted_ptr_inplace<SohGfxDebuggerWindow, std::allocator<void>, __gnu_cxx::_S_atomic>::_M_dispose' requested here 602 | _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:970:6: note: in instantiation of function template specialization 'std::_Sp_counted_ptr_inplace<SohGfxDebuggerWindow, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace<const char (&)[28], const char (&)[17], ImVec2>' requested here 970 | _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:1713:14: note: in instantiation of function template specialization 'std::__shared_count<>::__shared_count<SohGfxDebuggerWindow, std::allocator<void>, const char (&)[28], const char (&)[17], ImVec2>' requested here 1713 | : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:463:4: note: in instantiation of function template specialization 'std::__shared_ptr<SohGfxDebuggerWindow>::__shared_ptr<std::allocator<void>, const char (&)[28], const char (&)[17], ImVec2>' requested here 463 | : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:1007:14: note: in instantiation of function template specialization 'std::shared_ptr<SohGfxDebuggerWindow>::shared_ptr<std::allocator<void>, const char (&)[28], const char (&)[17], ImVec2>' requested here 1007 | return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, | ^ /home/erpre/s/ShipWright/soh/soh/SohGui/SohGui.cpp:128:14: note: in instantiation of function template specialization 'std::make_shared<SohGfxDebuggerWindow, const char (&)[28], const char (&)[17], ImVec2>' requested here 128 | std::make_shared<SohGfxDebuggerWindow>(CVAR_WINDOW("SohGfxDebugger"), "GfxDebugger##SoH", ImVec2(820, 630)); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:15: note: qualify call to silence this warning 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:2: warning: destructor called on non-final 'SohStatsWindow' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor] 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:149:12: note: in instantiation of function template specialization 'std::destroy_at<SohStatsWindow>' requested here 149 | std::destroy_at(__pointer); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/alloc_traits.h:720:9: note: in instantiation of function template specialization 'std::_Destroy<SohStatsWindow>' requested here 720 | { std::_Destroy(__p); } | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:616:28: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<void>>::destroy<SohStatsWindow>' requested here 616 | allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:602:2: note: in instantiation of member function 'std::_Sp_counted_ptr_inplace<SohStatsWindow, std::allocator<void>, __gnu_cxx::_S_atomic>::_M_dispose' requested here 602 | _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:970:6: note: in instantiation of function template specialization 'std::_Sp_counted_ptr_inplace<SohStatsWindow, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace<const char (&)[22], const char (&)[11], ImVec2>' requested here 970 | _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:1713:14: note: in instantiation of function template specialization 'std::__shared_count<>::__shared_count<SohStatsWindow, std::allocator<void>, const char (&)[22], const char (&)[11], ImVec2>' requested here 1713 | : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:463:4: note: in instantiation of function template specialization 'std::__shared_ptr<SohStatsWindow>::__shared_ptr<std::allocator<void>, const char (&)[22], const char (&)[11], ImVec2>' requested here 463 | : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:1007:14: note: in instantiation of function template specialization 'std::shared_ptr<SohStatsWindow>::shared_ptr<std::allocator<void>, const char (&)[22], const char (&)[11], ImVec2>' requested here 1007 | return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, | ^ /home/erpre/s/ShipWright/soh/soh/SohGui/SohGui.cpp:131:25: note: in instantiation of function template specialization 'std::make_shared<SohStatsWindow, const char (&)[22], const char (&)[11], ImVec2>' requested here 131 | mStatsWindow = std::make_shared<SohStatsWindow>(CVAR_WINDOW("SohStats"), "Stats##Soh", ImVec2(400, 100)); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:15: note: qualify call to silence this warning 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:2: warning: destructor called on non-final 'AudioEditor' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor] 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:149:12: note: in instantiation of function template specialization 'std::destroy_at<AudioEditor>' requested here 149 | std::destroy_at(__pointer); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/alloc_traits.h:720:9: note: in instantiation of function template specialization 'std::_Destroy<AudioEditor>' requested here 720 | { std::_Destroy(__p); } | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:616:28: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<void>>::destroy<AudioEditor>' requested here 616 | allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:602:2: note: in instantiation of member function 'std::_Sp_counted_ptr_inplace<AudioEditor, std::allocator<void>, __gnu_cxx::_S_atomic>::_M_dispose' requested here 602 | _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:970:6: note: in instantiation of function template specialization 'std::_Sp_counted_ptr_inplace<AudioEditor, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace<const char (&)[25], const char (&)[13], ImVec2>' requested here 970 | _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:1713:14: note: in instantiation of function template specialization 'std::__shared_count<>::__shared_count<AudioEditor, std::allocator<void>, const char (&)[25], const char (&)[13], ImVec2>' requested here 1713 | : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:463:4: note: in instantiation of function template specialization 'std::__shared_ptr<AudioEditor>::__shared_ptr<std::allocator<void>, const char (&)[25], const char (&)[13], ImVec2>' requested here 463 | : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:1007:14: note: in instantiation of function template specialization 'std::shared_ptr<AudioEditor>::shared_ptr<std::allocator<void>, const char (&)[25], const char (&)[13], ImVec2>' requested here 1007 | return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, | ^ /home/erpre/s/ShipWright/soh/soh/SohGui/SohGui.cpp:139:31: note: in instantiation of function template specialization 'std::make_shared<AudioEditor, const char (&)[25], const char (&)[13], ImVec2>' requested here 139 | mAudioEditorWindow = std::make_shared<AudioEditor>(CVAR_WINDOW("AudioEditor"), "Audio Editor", ImVec2(820, 630)); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:15: note: qualify call to silence this warning 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:2: warning: destructor called on non-final 'InputViewer' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor] 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:149:12: note: in instantiation of function template specialization 'std::destroy_at<InputViewer>' requested here 149 | std::destroy_at(__pointer); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/alloc_traits.h:720:9: note: in instantiation of function template specialization 'std::_Destroy<InputViewer>' requested here 720 | { std::_Destroy(__p); } | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:616:28: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<void>>::destroy<InputViewer>' requested here 616 | allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:602:2: note: in instantiation of member function 'std::_Sp_counted_ptr_inplace<InputViewer, std::allocator<void>, __gnu_cxx::_S_atomic>::_M_dispose' requested here 602 | _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:970:6: note: in instantiation of function template specialization 'std::_Sp_counted_ptr_inplace<InputViewer, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace<const char (&)[25], const char (&)[13]>' requested here 970 | _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:1713:14: note: in instantiation of function template specialization 'std::__shared_count<>::__shared_count<InputViewer, std::allocator<void>, const char (&)[25], const char (&)[13]>' requested here 1713 | : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:463:4: note: in instantiation of function template specialization 'std::__shared_ptr<InputViewer>::__shared_ptr<std::allocator<void>, const char (&)[25], const char (&)[13]>' requested here 463 | : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:1007:14: note: in instantiation of function template specialization 'std::shared_ptr<InputViewer>::shared_ptr<std::allocator<void>, const char (&)[25], const char (&)[13]>' requested here 1007 | return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, | ^ /home/erpre/s/ShipWright/soh/soh/SohGui/SohGui.cpp:141:25: note: in instantiation of function template specialization 'std::make_shared<InputViewer, const char (&)[25], const char (&)[13]>' requested here 141 | mInputViewer = std::make_shared<InputViewer>(CVAR_WINDOW("InputViewer"), "Input Viewer"); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:15: note: qualify call to silence this warning 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:2: warning: destructor called on non-final 'InputViewerSettingsWindow' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor] 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:149:12: note: in instantiation of function template specialization 'std::destroy_at<InputViewerSettingsWindow>' requested here 149 | std::destroy_at(__pointer); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/alloc_traits.h:720:9: note: in instantiation of function template specialization 'std::_Destroy<InputViewerSettingsWindow>' requested here 720 | { std::_Destroy(__p); } | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:616:28: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<void>>::destroy<InputViewerSettingsWindow>' requested here 616 | allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:602:2: note: in instantiation of member function 'std::_Sp_counted_ptr_inplace<InputViewerSettingsWindow, std::allocator<void>, __gnu_cxx::_S_atomic>::_M_dispose' requested here 602 | _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:970:6: note: in instantiation of function template specialization 'std::_Sp_counted_ptr_inplace<InputViewerSettingsWindow, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace<const char (&)[33], const char (&)[22], ImVec2>' requested here 970 | _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:1713:14: note: in instantiation of function template specialization 'std::__shared_count<>::__shared_count<InputViewerSettingsWindow, std::allocator<void>, const char (&)[33], const char (&)[22], ImVec2>' requested here 1713 | : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:463:4: note: in instantiation of function template specialization 'std::__shared_ptr<InputViewerSettingsWindow>::__shared_ptr<std::allocator<void>, const char (&)[33], const char (&)[22], ImVec2>' requested here 463 | : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:1007:14: note: in instantiation of function template specialization 'std::shared_ptr<InputViewerSettingsWindow>::shared_ptr<std::allocator<void>, const char (&)[33], const char (&)[22], ImVec2>' requested here 1007 | return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, | ^ /home/erpre/s/ShipWright/soh/soh/SohGui/SohGui.cpp:143:33: note: in instantiation of function template specialization 'std::make_shared<InputViewerSettingsWindow, const char (&)[33], const char (&)[22], ImVec2>' requested here 143 | mInputViewerSettings = std::make_shared<InputViewerSettingsWindow>(CVAR_WINDOW("InputViewerSettings"), | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:15: note: qualify call to silence this warning 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:2: warning: destructor called on non-final 'CosmeticsEditorWindow' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor] 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:149:12: note: in instantiation of function template specialization 'std::destroy_at<CosmeticsEditorWindow>' requested here 149 | std::destroy_at(__pointer); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/alloc_traits.h:720:9: note: in instantiation of function template specialization 'std::_Destroy<CosmeticsEditorWindow>' requested here 720 | { std::_Destroy(__p); } | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:616:28: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<void>>::destroy<CosmeticsEditorWindow>' requested here 616 | allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:602:2: note: in instantiation of member function 'std::_Sp_counted_ptr_inplace<CosmeticsEditorWindow, std::allocator<void>, __gnu_cxx::_S_atomic>::_M_dispose' requested here 602 | _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:970:6: note: in instantiation of function template specialization 'std::_Sp_counted_ptr_inplace<CosmeticsEditorWindow, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace<const char (&)[29], const char (&)[17], ImVec2>' requested here 970 | _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:1713:14: note: in instantiation of function template specialization 'std::__shared_count<>::__shared_count<CosmeticsEditorWindow, std::allocator<void>, const char (&)[29], const char (&)[17], ImVec2>' requested here 1713 | : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:463:4: note: in instantiation of function template specialization 'std::__shared_ptr<CosmeticsEditorWindow>::__shared_ptr<std::allocator<void>, const char (&)[29], const char (&)[17], ImVec2>' requested here 463 | : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:1007:14: note: in instantiation of function template specialization 'std::shared_ptr<CosmeticsEditorWindow>::shared_ptr<std::allocator<void>, const char (&)[29], const char (&)[17], ImVec2>' requested here 1007 | return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, | ^ /home/erpre/s/ShipWright/soh/soh/SohGui/SohGui.cpp:147:14: note: in instantiation of function template specialization 'std::make_shared<CosmeticsEditorWindow, const char (&)[29], const char (&)[17], ImVec2>' requested here 147 | std::make_shared<CosmeticsEditorWindow>(CVAR_WINDOW("CosmeticsEditor"), "Cosmetics Editor", ImVec2(550, 520)); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:15: note: qualify call to silence this warning 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:2: warning: destructor called on non-final 'ActorViewerWindow' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor] 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:149:12: note: in instantiation of function template specialization 'std::destroy_at<ActorViewerWindow>' requested here 149 | std::destroy_at(__pointer); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/alloc_traits.h:720:9: note: in instantiation of function template specialization 'std::_Destroy<ActorViewerWindow>' requested here 720 | { std::_Destroy(__p); } | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:616:28: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<void>>::destroy<ActorViewerWindow>' requested here 616 | allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:602:2: note: in instantiation of member function 'std::_Sp_counted_ptr_inplace<ActorViewerWindow, std::allocator<void>, __gnu_cxx::_S_atomic>::_M_dispose' requested here 602 | _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:970:6: note: in instantiation of function template specialization 'std::_Sp_counted_ptr_inplace<ActorViewerWindow, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace<const char (&)[25], const char (&)[13], ImVec2>' requested here 970 | _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:1713:14: note: in instantiation of function template specialization 'std::__shared_count<>::__shared_count<ActorViewerWindow, std::allocator<void>, const char (&)[25], const char (&)[13], ImVec2>' requested here 1713 | : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:463:4: note: in instantiation of function template specialization 'std::__shared_ptr<ActorViewerWindow>::__shared_ptr<std::allocator<void>, const char (&)[25], const char (&)[13], ImVec2>' requested here 463 | : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:1007:14: note: in instantiation of function template specialization 'std::shared_ptr<ActorViewerWindow>::shared_ptr<std::allocator<void>, const char (&)[25], const char (&)[13], ImVec2>' requested here 1007 | return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, | ^ /home/erpre/s/ShipWright/soh/soh/SohGui/SohGui.cpp:150:14: note: in instantiation of function template specialization 'std::make_shared<ActorViewerWindow, const char (&)[25], const char (&)[13], ImVec2>' requested here 150 | std::make_shared<ActorViewerWindow>(CVAR_WINDOW("ActorViewer"), "Actor Viewer", ImVec2(520, 600)); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:15: note: qualify call to silence this warning 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:2: warning: destructor called on non-final 'ColViewerWindow' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor] 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:149:12: note: in instantiation of function template specialization 'std::destroy_at<ColViewerWindow>' requested here 149 | std::destroy_at(__pointer); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/alloc_traits.h:720:9: note: in instantiation of function template specialization 'std::_Destroy<ColViewerWindow>' requested here 720 | { std::_Destroy(__p); } | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:616:28: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<void>>::destroy<ColViewerWindow>' requested here 616 | allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:602:2: note: in instantiation of member function 'std::_Sp_counted_ptr_inplace<ColViewerWindow, std::allocator<void>, __gnu_cxx::_S_atomic>::_M_dispose' requested here 602 | _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:970:6: note: in instantiation of function template specialization 'std::_Sp_counted_ptr_inplace<ColViewerWindow, std::allocator<void>, __gnu_cxx::_S_atomic>::_Sp_counted_ptr_inplace<const char (&)[29], const char (&)[17], ImVec2>' requested here 970 | _Sp_cp_type(__a._M_a, std::forward<_Args>(__args)...); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:1713:14: note: in instantiation of function template specialization 'std::__shared_count<>::__shared_count<ColViewerWindow, std::allocator<void>, const char (&)[29], const char (&)[17], ImVec2>' requested here 1713 | : _M_ptr(), _M_refcount(_M_ptr, __tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:463:4: note: in instantiation of function template specialization 'std::__shared_ptr<ColViewerWindow>::__shared_ptr<std::allocator<void>, const char (&)[29], const char (&)[17], ImVec2>' requested here 463 | : __shared_ptr<_Tp>(__tag, std::forward<_Args>(__args)...) | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr.h:1007:14: note: in instantiation of function template specialization 'std::shared_ptr<ColViewerWindow>::shared_ptr<std::allocator<void>, const char (&)[29], const char (&)[17], ImVec2>' requested here 1007 | return shared_ptr<_Tp>(_Sp_alloc_shared_tag<_Alloc>{__a}, | ^ /home/erpre/s/ShipWright/soh/soh/SohGui/SohGui.cpp:153:14: note: in instantiation of function template specialization 'std::make_shared<ColViewerWindow, const char (&)[29], const char (&)[17], ImVec2>' requested here 153 | std::make_shared<ColViewerWindow>(CVAR_WINDOW("CollisionViewer"), "Collision Viewer", ImVec2(520, 600)); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:15: note: qualify call to silence this warning 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:88:2: warning: destructor called on non-final 'SaveEditorWindow' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor] 88 | __location->~_Tp(); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/stl_construct.h:149:12: note: in instantiation of function template specialization 'std::destroy_at<SaveEditorWindow>' requested here 149 | std::destroy_at(__pointer); | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/alloc_traits.h:720:9: note: in instantiation of function template specialization 'std::_Destroy<SaveEditorWindow>' requested here 720 | { std::_Destroy(__p); } | ^ /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/shared_ptr_base.h:616:28: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<void>>::destroy<SaveEditorWindow>' requested here 616 | allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr()); | ^ ... ```
101 lines
4 KiB
C++
101 lines
4 KiB
C++
#pragma once
|
|
|
|
#include "stdint.h"
|
|
#include <libultraship/libultraship.h>
|
|
#include <imgui.h>
|
|
#include <unordered_map>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <set>
|
|
#include <list>
|
|
|
|
typedef CONTROLLERBUTTONS_T N64ButtonMask;
|
|
|
|
typedef struct {
|
|
const char* label;
|
|
const char* cVarName;
|
|
N64ButtonMask defaultBtn;
|
|
} CustomButtonMap;
|
|
|
|
class SohInputEditorWindow final : public Ship::GuiWindow {
|
|
public:
|
|
using GuiWindow::GuiWindow;
|
|
~SohInputEditorWindow();
|
|
|
|
void DrawButton(const char* label, int32_t n64Btn, int32_t currentPort, int32_t* btnReading);
|
|
|
|
void DrawInputChip(const char* buttonName, ImVec4 color);
|
|
void DrawAnalogPreview(const char* label, ImVec2 stick, float deadzone = 0, bool gyro = false);
|
|
void DrawControllerSchema();
|
|
bool TestingRumble();
|
|
|
|
protected:
|
|
void InitElement() override;
|
|
void DrawElement() override;
|
|
void UpdateElement() override;
|
|
|
|
private:
|
|
void DrawStickDirectionLine(const char* axisDirectionName, uint8_t port, uint8_t stick, Ship::Direction direction,
|
|
ImVec4 color);
|
|
void DrawButtonLine(const char* buttonName, uint8_t port, N64ButtonMask bitmask, ImVec4 color);
|
|
void DrawButtonLineEditMappingButton(uint8_t port, N64ButtonMask bitmask, std::string id);
|
|
void DrawButtonLineAddMappingButton(uint8_t port, N64ButtonMask bitmask);
|
|
|
|
void DrawStickDirectionLineEditMappingButton(uint8_t port, uint8_t stick, Ship::Direction direction,
|
|
std::string id);
|
|
void DrawStickDirectionLineAddMappingButton(uint8_t port, uint8_t stick, Ship::Direction direction);
|
|
void DrawStickSection(uint8_t port, uint8_t stick, int32_t id, ImVec4 color);
|
|
|
|
void DrawRumbleSection(uint8_t port);
|
|
void DrawRemoveRumbleMappingButton(uint8_t port, std::string id);
|
|
void DrawAddRumbleMappingButton(uint8_t port);
|
|
|
|
void DrawLEDSection(uint8_t port);
|
|
void DrawRemoveLEDMappingButton(uint8_t port, std::string id);
|
|
void DrawAddLEDMappingButton(uint8_t port);
|
|
|
|
void DrawGyroSection(uint8_t port);
|
|
void DrawRemoveGyroMappingButton(uint8_t port, std::string id);
|
|
void DrawAddGyroMappingButton(uint8_t port);
|
|
|
|
// Used together for an incomplete linked hash map implementation in order to
|
|
// map button masks to their names and original mapping on N64
|
|
std::list<std::pair<N64ButtonMask, const char*>> buttons;
|
|
std::unordered_map<N64ButtonMask, decltype(buttons)::iterator> buttonNames;
|
|
void addButtonName(N64ButtonMask mask, const char* name);
|
|
void DrawMapping(CustomButtonMap& mapping, float labelWidth, N64ButtonMask excludedButtons);
|
|
void DrawOcarinaControlPanel();
|
|
void DrawCameraControlPanel();
|
|
void DrawDpadControlPanel();
|
|
|
|
int32_t mGameInputBlockTimer;
|
|
int32_t mMappingInputBlockTimer;
|
|
int32_t mRumbleTimer;
|
|
std::shared_ptr<Ship::ControllerRumbleMapping> mRumbleMappingToTest;
|
|
|
|
// mBitmaskToMappingIds[port][bitmask] = { id0, id1, ... }
|
|
std::unordered_map<uint8_t, std::unordered_map<N64ButtonMask, std::vector<std::string>>> mBitmaskToMappingIds;
|
|
|
|
// mStickDirectionToMappingIds[port][stick][direction] = { id0, id1, ... }
|
|
std::unordered_map<uint8_t,
|
|
std::unordered_map<uint8_t, std::unordered_map<Ship::Direction, std::vector<std::string>>>>
|
|
mStickDirectionToMappingIds;
|
|
|
|
void UpdateBitmaskToMappingIds(uint8_t port);
|
|
void UpdateStickDirectionToMappingIds(uint8_t port);
|
|
|
|
void GetButtonColorsForDeviceType(Ship::PhysicalDeviceType lusIndex, ImVec4& buttonColor,
|
|
ImVec4& buttonHoveredColor);
|
|
void DrawLinkTab();
|
|
void DrawIvanTab();
|
|
void DrawDebugPortTab(uint8_t portIndex, std::string customName = "");
|
|
std::set<N64ButtonMask> mButtonsBitmasks;
|
|
std::set<N64ButtonMask> mDpadBitmasks;
|
|
std::set<N64ButtonMask> mModifierButtonsBitmasks;
|
|
std::set<N64ButtonMask> mCustomOcarinaButtonsBitmasks;
|
|
bool mInputEditorPopupOpen;
|
|
void DrawSetDefaultsButton(uint8_t portIndex);
|
|
void DrawClearAllButton(uint8_t portIndex);
|
|
|
|
void DrawDeviceToggles(uint8_t portIndex);
|
|
};
|