This repository has been archived on 2022-09-26. You can view files and clone it, but cannot push or open issues or pull requests.
fd2/src/controls.h

21 lines
474 B
C

// controls
struct controls {
bool left, right, up, down, a, b, c, start;
};
struct controls ctrl;
void updateControls(u16 joy, u16 changed, u16 state){
if(joy == JOY_1){
if(changed){}
ctrl.left = (state & BUTTON_LEFT);
ctrl.right = (state & BUTTON_RIGHT);
ctrl.up = (state & BUTTON_UP);
ctrl.down = (state & BUTTON_DOWN);
ctrl.a = (state & BUTTON_A);
ctrl.b = (state & BUTTON_B);
ctrl.c = (state & BUTTON_C);
ctrl.start = (state & BUTTON_START);
}
}