Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 8776 → Rev 8777

/source/duke3d/src/_functio.h
278,10 → 278,6
};
 
 
static const char * mousedigitaldefaults[MAXMOUSEDIGITAL] =
{
};
 
#if defined GEKKO
static const char * joystickdefaults[MAXJOYBUTTONSANDHATS] =
{
/source/duke3d/src/config.cpp
343,7 → 343,6
CONFIG_SetDefaultKeys(keydefaults);
 
memset(ud.config.MouseFunctions, -1, sizeof(ud.config.MouseFunctions));
memset(ud.config.MouseDigitalFunctions, -1, sizeof(ud.config.MouseDigitalFunctions));
memset(ud.config.JoystickFunctions, -1, sizeof(ud.config.JoystickFunctions));
memset(ud.config.JoystickDigitalFunctions, -1, sizeof(ud.config.JoystickDigitalFunctions));
 
360,14 → 359,8
 
for (int i=0; i<MAXMOUSEAXES; i++)
{
ud.config.MouseAnalogueScale[i] = DEFAULTMOUSEANALOGUESCALE;
CONTROL_SetAnalogAxisScale(i, ud.config.MouseAnalogueScale[i], controldevice_mouse);
CONTROL_SetAnalogAxisScale(i, DEFAULTMOUSEANALOGUESCALE, controldevice_mouse);
 
ud.config.MouseDigitalFunctions[i][0] = CONFIG_FunctionNameToNum(mousedigitaldefaults[i*2]);
ud.config.MouseDigitalFunctions[i][1] = CONFIG_FunctionNameToNum(mousedigitaldefaults[i*2+1]);
CONTROL_MapDigitalAxis(i, ud.config.MouseDigitalFunctions[i][0], 0, controldevice_mouse);
CONTROL_MapDigitalAxis(i, ud.config.MouseDigitalFunctions[i][1], 1, controldevice_mouse);
 
ud.config.MouseAnalogueAxes[i] = CONFIG_AnalogNameToNum(mouseanalogdefaults[i]);
CONTROL_MapAnalogAxis(i, ud.config.MouseAnalogueAxes[i], controldevice_mouse);
}
482,21 → 475,6
temp[0] = 0;
if (!SCRIPT_GetString(ud.config.scripthandle, "Controls", str,temp))
ud.config.MouseAnalogueAxes[i] = CONFIG_AnalogNameToNum(temp);
 
Bsprintf(str,"MouseDigitalAxes%d_0",i);
temp[0] = 0;
if (!SCRIPT_GetString(ud.config.scripthandle, "Controls", str,temp))
ud.config.MouseDigitalFunctions[i][0] = CONFIG_FunctionNameToNum(temp);
 
Bsprintf(str,"MouseDigitalAxes%d_1",i);
temp[0] = 0;
if (!SCRIPT_GetString(ud.config.scripthandle, "Controls", str,temp))
ud.config.MouseDigitalFunctions[i][1] = CONFIG_FunctionNameToNum(temp);
 
Bsprintf(str,"MouseAnalogScale%d",i);
int32_t scale = ud.config.MouseAnalogueScale[i];
SCRIPT_GetNumber(ud.config.scripthandle, "Controls", str, &scale);
ud.config.MouseAnalogueScale[i] = scale;
}
 
for (int i=0; i<MAXMOUSEBUTTONS; i++)
505,12 → 483,7
CONTROL_MapButton(ud.config.MouseFunctions[i][1], i, 1, controldevice_mouse);
}
for (int i=0; i<MAXMOUSEAXES; i++)
{
CONTROL_MapAnalogAxis(i, ud.config.MouseAnalogueAxes[i], controldevice_mouse);
CONTROL_MapDigitalAxis(i, ud.config.MouseDigitalFunctions[i][0], 0,controldevice_mouse);
CONTROL_MapDigitalAxis(i, ud.config.MouseDigitalFunctions[i][1], 1,controldevice_mouse);
CONTROL_SetAnalogAxisScale(i, ud.config.MouseAnalogueScale[i], controldevice_mouse);
}
}
 
 
1042,21 → 1015,6
Bsprintf(buf, "MouseAnalogAxes%d", i);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_AnalogNumToName(ud.config.MouseAnalogueAxes[i]));
}
 
if (CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[i][0]))
{
Bsprintf(buf, "MouseDigitalAxes%d_0", i);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[i][0]));
}
 
if (CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[i][1]))
{
Bsprintf(buf, "MouseDigitalAxes%d_1", i);
SCRIPT_PutString(ud.config.scripthandle, "Controls", buf, CONFIG_FunctionNumToName(ud.config.MouseDigitalFunctions[i][1]));
}
 
Bsprintf(buf, "MouseAnalogScale%d", i);
SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.MouseAnalogueScale[i], FALSE, FALSE);
}
}
 
/source/duke3d/src/game.h
241,9 → 241,7
// JBF 20031211: Store the input settings because
// (currently) mact can't regurgitate them
int32_t MouseFunctions[MAXMOUSEBUTTONS][2];
int32_t MouseDigitalFunctions[MAXMOUSEAXES][2];
int32_t MouseAnalogueAxes[MAXMOUSEAXES];
int32_t MouseAnalogueScale[MAXMOUSEAXES];
int32_t JoystickFunctions[MAXJOYBUTTONSANDHATS][2];
int32_t JoystickDigitalFunctions[MAXJOYAXES][2];
int32_t JoystickAnalogueAxes[MAXJOYAXES];
/source/duke3d/src/gamedefs.h
43,7 → 43,6
 
// KEEPINSYNC mact/include/_control.h, build/src/sdlayer.cpp
#define MAXMOUSEAXES 2
#define MAXMOUSEDIGITAL (MAXMOUSEAXES*2)
 
// KEEPINSYNC mact/include/_control.h, build/src/sdlayer.cpp
#define MAXJOYAXES 9
/source/duke3d/src/lunatic/_defs_game.lua
534,7 → 534,6
// JBF 20031211: Store the input settings because
// (currently) mact can't regurgitate them
int32_t MouseFunctions[MAXMOUSEBUTTONS][2];
int32_t MouseDigitalFunctions[MAXMOUSEAXES][2];
int32_t MouseAnalogueAxes[MAXMOUSEAXES];
int32_t MouseAnalogueScale[MAXMOUSEAXES];
int32_t JoystickFunctions[MAXJOYBUTTONSANDHATS][2];