Protofall / Crayon-Game-Framework

My own library for making games on the Dreamcast
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

Crayon: Make "input" section to libcrayon #250

Open Protofall opened 4 years ago

Protofall commented 4 years ago

Takes parts of what #107 mentioned.

Would universally handle controllers, keyboards and mice (Twinsticks are a form of controller)

// 1 struct for 1 controller
struct crayon_gamepad_input{
    uint32_t available_buttons; // A bitmap to show what buttons (And thumbsticks) the controller has available
    uint32_t current_buttons;   // For non-DC, stuff like hats (Pressing thumbsticks) is stored in these two aswell
    uint32_t previous_buttons;
    vec2_t *thumbstick;
    vec2_t *trigger;

    uint8_t player_active;  // For determining if a player is currently doing anything
    // Maybe another parameter or two to say how long a button has been held for?
}   crayon_gamepad_input_t;
Protofall commented 4 years ago

Reminder to still look at #107 when tackling this because although closed, it does have some links of stuff to check (Particularly the August 2019 comments, Ignore the December 2019 comment, that's something the user should handle)