Skip to content

Commit

Permalink
MouseMeta migration
Browse files Browse the repository at this point in the history
  • Loading branch information
lightmanLP committed Dec 18, 2024
1 parent 1f7beb6 commit 57be37f
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/controller/controldeck/ControlDeck.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <config/Config.h>
#include "controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h"
#include "controller/deviceindex/ShipDeviceIndexMappingManager.h"
#include "window/MouseMeta.h"

namespace Ship {

Expand Down
1 change: 0 additions & 1 deletion src/controller/controldevice/controller/Controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "ControllerLED.h"
#include "controller/controldevice/ControlDevice.h"
#include "controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h"
#include "window/MouseMeta.h"

namespace Ship {

Expand Down
1 change: 0 additions & 1 deletion src/controller/controldevice/controller/ControllerButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include <string>
#include "libultraship/libultra/controller.h"
#include "controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h"
#include "window/MouseMeta.h"

namespace Ship {

Expand Down
1 change: 0 additions & 1 deletion src/controller/controldevice/controller/ControllerStick.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <memory>
#include <unordered_map>
#include "controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h"
#include "window/MouseMeta.h"

namespace Ship {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "Context.h"
#include "controller/deviceindex/ShipDeviceIndexToSDLDeviceIndexMapping.h"

#include "window/MouseMeta.h"
#include "controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h"

namespace Ship {
std::shared_ptr<ControllerAxisDirectionMapping>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "controller/controldevice/controller/mapping/sdl/SDLButtonToButtonMapping.h"
#include "controller/controldevice/controller/mapping/sdl/SDLAxisDirectionToButtonMapping.h"
#include "controller/deviceindex/ShipDeviceIndexToSDLDeviceIndexMapping.h"
#include "window/MouseMeta.h"
#include "controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h"

namespace Ship {
std::shared_ptr<ControllerButtonMapping> ButtonMappingFactory::CreateButtonMappingFromConfig(uint8_t portIndex,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#pragma once

#ifdef __cplusplus
#include <string>

namespace Ship {
#endif

Expand Down Expand Up @@ -118,6 +120,10 @@ typedef enum KbScancode {
LUS_KB_MAX
} KbScancode;

typedef enum MouseBtn { LEFT, MIDDLE, RIGHT, BACKWARD, FORWARD, MOUSE_BTN_COUNT, MOUSE_BTN_UNKNOWN } MouseBtn;

#ifdef __cplusplus
static std::string mouseBtnNames[7] = { "MouseLeft", "MouseMiddle", "MouseRight", "MouseBackward",
"MouseForward", "MOUSE_BTN_COUNT", "MOUSE_BTN_UNKNOWN" };
} // namespace Ship
#endif
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "controller/controldevice/controller/mapping/ControllerInputMapping.h"
#include "window/MouseMeta.h"
#include "controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h"

namespace Ship {
class MouseKeyToAnyMapping : virtual public ControllerInputMapping {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "controller/controldevice/controller/mapping/ControllerAxisDirectionMapping.h"
#include "MouseKeyToAnyMapping.h"
#include "window/MouseMeta.h"
#include "controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h"

namespace Ship {
class MouseKeyToAxisDirectionMapping final : public MouseKeyToAnyMapping, public ControllerAxisDirectionMapping {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "controller/controldevice/controller/mapping/ControllerButtonMapping.h"
#include "MouseKeyToAnyMapping.h"
#include "window/MouseMeta.h"
#include "controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h"

namespace Ship {
class MouseKeyToButtonMapping final : public MouseKeyToAnyMapping, public ControllerButtonMapping {
Expand Down
2 changes: 1 addition & 1 deletion src/graphic/Fast3D/Fast3dWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "graphic/Fast3D/gfx_window_manager_api.h"
#include "graphic/Fast3D/gfx_rendering_api.h"
#include "public/bridge/gfxbridge.h"
#include "window/MouseMeta.h"
#include "controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h"

namespace Fast {
class Fast3dWindow : public Ship::Window {
Expand Down
9 changes: 0 additions & 9 deletions src/window/MouseMeta.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/window/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <unordered_set>
#include <spdlog/spdlog.h>
#include "window/gui/Gui.h"
#include "window/MouseMeta.h"
#include "controller/controldevice/controller/mapping/keyboard/KeyboardScancodes.h"

namespace Ship {
enum class WindowBackend { FAST3D_DXGI_DX11, FAST3D_SDL_OPENGL, FAST3D_SDL_METAL, WINDOW_BACKEND_COUNT };
Expand Down

0 comments on commit 57be37f

Please sign in to comment.