ManaPlus
Functions
inputactionoperators.h File Reference

(986a3bf)

#include "enums/input/inputaction.h"

Go to the source code of this file.

Functions

InputActionT operator+ (InputActionT action, const int &i)
 
InputActionT operator+ (InputActionT action, const unsigned int &i)
 
int operator- (const InputActionT &action1, const InputActionT &action2)
 

Function Documentation

◆ operator+() [1/2]

InputActionT operator+ ( InputActionT  action,
const int &  i 
)

Definition at line 28 of file inputactionoperators.cpp.

29 {
30  action = static_cast<InputActionT>(CAST_S32(action) + i);
31  return action;
32 }
#define CAST_S32
Definition: cast.h:30
InputAction ::T InputActionT
Definition: inputaction.h:717

References CAST_S32.

◆ operator+() [2/2]

InputActionT operator+ ( InputActionT  action,
const unsigned int &  i 
)

Definition at line 34 of file inputactionoperators.cpp.

35 {
36  action = static_cast<InputActionT>(CAST_U32(action) + i);
37  return action;
38 }
#define CAST_U32
Definition: cast.h:31

References CAST_U32.

◆ operator-()

int operator- ( const InputActionT action1,
const InputActionT action2 
)

Definition at line 40 of file inputactionoperators.cpp.

41 {
42  return CAST_S32(action1) - CAST_S32(action2);
43 }

References CAST_S32.