libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
Controller.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <memory>
5#include <string>
6#include <cstdint>
7#include <queue>
8#include <vector>
9#include <map>
10#include "libultraship/libultra/controller.h"
11#include "ship/utils/color.h"
12#include <unordered_map>
13#include "ship/controller/controldevice/controller/Controller.h"
14
15namespace LUS {
30 public:
36 Controller(uint8_t portIndex, std::vector<CONTROLLERBUTTONS_T> bitmasks,
37 std::shared_ptr<Ship::ConsoleVariable> consoleVariable = nullptr,
38 std::shared_ptr<Ship::ControlDeck> controlDeck = nullptr,
39 std::shared_ptr<Ship::Window> window = nullptr);
40
48 void ReadToPad(void* pad) override;
49
50 private:
55 void ReadToOSContPad(OSContPad* pad);
56
57 std::deque<OSContPad> mPadBuffer;
58};
59} // namespace LUS
Ship's N64-compatible Controller implementation.
Definition Controller.h:29
Controller(uint8_t portIndex, std::vector< CONTROLLERBUTTONS_T > bitmasks, std::shared_ptr< Ship::ConsoleVariable > consoleVariable=nullptr, std::shared_ptr< Ship::ControlDeck > controlDeck=nullptr, std::shared_ptr< Ship::Window > window=nullptr)
Constructs a Controller for the given port with the specified button bitmasks.
void ReadToPad(void *pad) override
Reads the current Ship::Controller state and writes it to the game's pad structure.
Represents a single logical controller connected to a ControlPort.
Definition Controller.h:38
Definition ControlDeck.h:13