@lmerckx said in New Hypseus with overlays and Singe support:
Hello @DirtBagXon,
Mad Dog McCree is playable (memories, memories ... ). But does Singe support the joystick ?
For me, I can only move the target with the mouse but perhaps I broke something with my patch ...
Aha, the infamous Daphne joystick support.
Singe has never supported joystick axis movement as far as the codebase says, button yes, but axis no.
The LUA game script interface for mouse movement is fairly simplistic:
void sep_do_mouse_move(Uint16 x, Uint16 y, Sint16 xrel, Sint16 yrel)
{
static bool debounced = false;
int x1 = (int)x;
int y1 = (int)y;
int xr = (int)xrel;
int yr = (int)yrel;
// Not sure what's wrong here. I think things are getting started before Singe is ready.
if (!debounced) {
debounced = true;
return;
}
x1 *= g_sep_overlay_scale_x;
y1 *= g_sep_overlay_scale_y;
xr *= g_sep_overlay_scale_x;
yr *= g_sep_overlay_scale_y;
sep_call_lua("onMouseMoved", "iiii", x1, y1, xr, yr);
}
Whereas the joystick is referenced in Daphne I/O based on SDL events:
// processes movements of the joystick
void process_joystick_motion(SDL_Event *event)
I believe in the past people may have used joystick to mouse movement wrappers as a work-a-round.
I will take a look to see if I can link these differing elements of the codebase, but suspect it's not as easy as it looks or sounds.... inherited issue.....