Closed aod6060 closed 2 hours ago
Alright time to added in an iterface that will allow for the gamepad to have inputmapping. However, this will be implemented separately from the keyboard and mouse input mapping due to the gamepad being different for those to input devices.
Here is the function interface for this input mapping interface for the gamepad. Its pretty similar to the normal inputmapping interface.
struct InputMapping {
PlayerControllerName name;
ControllerButton button;
};
// Regular boolean check
bool isInputMappingReleased(InputMapping* mapping);
bool isInputMappingPressedOnce(InputMapping* mapping);
bool isInputMappingPressed(InputMapping* mapping);
bool isInputMappingReleasedOnce(InputMapping* mapping);
// Axis Functions
float getInputMappingAxisReleased(InputMapping& negative, InputMapping& positive);
float getInputMappingAxisPressedOnce(InputMapping& negative, InputMapping& positive);
float getInputMappingAxisPressed(InputMapping& negative, InputMapping& positive);
float getInputMappingAxisReleasedOnce(InputMapping& negative, InputMapping& positive);
// Value Functions
float getInputMappingValueReleased(InputMapping& mapping);
float getInputMappingValuePressedOnce(InputMapping& mapping);
float getInputMappingValuePressed(InputMapping& mapping);
float getInputMappingValueReleasedOnce(InputMapping& mapping);
I messed up. Here is the actual interface for the gamepad input mapping.
struct InputMapping {
PlayerControllerName name;
ControllerButton button;
};
void initInputMapping(InputMapping* mapping, PlayerControllerName name, ControllerButton button);
// Regular boolean check
bool isInputMappingReleased(InputMapping* mapping);
bool isInputMappingPressedOnce(InputMapping* mapping);
bool isInputMappingPressed(InputMapping* mapping);
bool isInputMappingReleasedOnce(InputMapping* mapping);
// Axis Functions
float getInputMappingAxisReleased(InputMapping* negative, InputMapping* positive);
float getInputMappingAxisPressedOnce(InputMapping* negative, InputMapping* positive);
float getInputMappingAxisPressed(InputMapping* negative, InputMapping* positive);
float getInputMappingAxisReleasedOnce(InputMapping* negative, InputMapping* positive);
// Value Functions
float getInputMappingValueReleased(InputMapping* mapping);
float getInputMappingValuePressedOnce(InputMapping* mapping);
float getInputMappingValuePressed(InputMapping* mapping);
float getInputMappingValueReleasedOnce(InputMapping* mapping);
Alright I'm done with this issue. So I think I'm finished with this issue for now. I'm going to start working on the configuration issue and app/render issue next.
Originally posted by @aod6060 in https://github.com/aod6060/dsge/issues/12#issuecomment-2481811450