sdl: fix formatting in code

This commit is contained in:
punkrockguy318 2013-03-16 02:37:50 +00:00
parent 3d1484c7e7
commit 5eeafe4ae3
1 changed files with 858 additions and 867 deletions

View File

@ -1315,7 +1315,7 @@ FCEUD_UpdateInput ()
}
}
void
void
FCEUD_SetInput (bool fourscore, bool microphone, ESI port0, ESI port1,
ESIFC fcexp)
{
@ -1342,8 +1342,7 @@ FCEUD_SetInput (bool fourscore, bool microphone, ESI port0, ESI port1,
/**
* Initialize the input device interface between the emulation and the driver.
*/
void
InitInputInterface ()
void InitInputInterface ()
{
void *InputDPtr;
@ -1447,8 +1446,7 @@ static ButtConfig fkbmap[0x48] = {
/**
* Update the status of the Family KeyBoard.
*/
static void
UpdateFKB ()
static void updatefkb ()
{
int x;
@ -1456,7 +1454,7 @@ UpdateFKB ()
{
fkbkeys[x] = 0;
if (DTestButton (&fkbmap[x]))
if (dtestbutton (&fkbmap[x]))
{
fkbkeys[x] = 1;
}
@ -1470,7 +1468,7 @@ static ButtConfig HyperShotButtons[4] = {
/**
* Update the status of the HyperShot input device.
*/
static void
static void
UpdateHyperShot ()
{
int x;
@ -1494,7 +1492,7 @@ static ButtConfig MahjongButtons[21] = {
/**
* Update the status of for the Mahjong input device.
*/
static void
static void
UpdateMahjong ()
{
int x;
@ -1516,7 +1514,7 @@ static ButtConfig QuizKingButtons[6] = {
/**
* Update the status of the QuizKing input device.
*/
static void
static void
UpdateQuizKing ()
{
int x;
@ -1539,7 +1537,7 @@ static ButtConfig TopRiderButtons[8] = {
/**
* Update the status of the TopRider input device.
*/
static void
static void
UpdateTopRider ()
{
int x;
@ -1563,8 +1561,7 @@ static ButtConfig FTrainerButtons[12] = {
/**
* Update the status of the FTrainer input device.
*/
static void
UpdateFTrainer ()
static void UpdateFTrainer ()
{
int x;
FTrainerData = 0;
@ -1584,8 +1581,7 @@ UpdateFTrainer ()
* @param bc the NES gamepad's button config
* @param which the index of the button
*/
const char *
ButtonName (const ButtConfig * bc, int which)
const char * ButtonName (const ButtConfig * bc, int which)
{
static char name[256];
@ -1647,8 +1643,7 @@ ButtonName (const ButtConfig * bc, int which)
* Waits for a button input and returns the information as to which
* button was pressed. Used in button configuration.
*/
int
DWaitButton (const uint8 * text, ButtConfig * bc, int wb)
int DWaitButton (const uint8 * text, ButtConfig * bc, int wb)
{
SDL_Event event;
static int32 LastAx[64][64];
@ -1744,7 +1739,7 @@ DWaitButton (const uint8 * text, ButtConfig * bc, int wb)
break;
}
return (0);
return 0;
}
/**
@ -1754,26 +1749,25 @@ DWaitButton (const uint8 * text, ButtConfig * bc, int wb)
* used as input for the specified button, thus allowing up to four
* possible settings for each input button.
*/
void
ConfigButton (char *text, ButtConfig * bc)
void configbutton (char *text, buttconfig * bc)
{
uint8 buf[256];
int wc;
for (wc = 0; wc < MAXBUTTCONFIG; wc++)
for (wc = 0; wc < maxbuttconfig; wc++)
{
sprintf ((char *) buf, "%s (%d)", text, wc + 1);
DWaitButton (buf, bc, wc);
dwaitbutton (buf, bc, wc);
if (wc &&
bc->ButtType[wc] == bc->ButtType[wc - 1] &&
bc->DeviceNum[wc] == bc->DeviceNum[wc - 1] &&
bc->ButtonNum[wc] == bc->ButtonNum[wc - 1])
bc->butttype[wc] == bc->butttype[wc - 1] &&
bc->devicenum[wc] == bc->devicenum[wc - 1] &&
bc->buttonnum[wc] == bc->buttonnum[wc - 1])
{
break;
}
}
bc->NumC = wc;
bc->numc = wc;
}
/**
@ -1781,8 +1775,7 @@ ConfigButton (char *text, ButtConfig * bc)
*/
extern Config *g_config;
void
ConfigDevice (int which, int arg)
void ConfigDevice (int which, int arg)
{
char buf[256];
int x;
@ -1916,8 +1909,7 @@ ConfigDevice (int which, int arg)
/**
* Update the button configuration for a device, specified by a text string.
*/
void
InputCfg (const std::string & text)
void InputCfg (const std::string & text)
{
#ifdef _GTK
// enable noGui to prevent the gtk x11 hack from executing
@ -1970,8 +1962,7 @@ InputCfg (const std::string & text)
* configuration management. Will probably want to change this in the
* future - soules.
*/
void
UpdateInput (Config * config)
void UpdateInput (Config * config)
{
char buf[64];
std::string device, prefix;
@ -2289,9 +2280,9 @@ const char *GamePadNames[GAMEPAD_NUM_BUTTONS] = { "A", "B", "Select", "Start",
"Up", "Down", "Left", "Right", "TurboA", "TurboB"
};
const char *DefaultGamePadDevice[GAMEPAD_NUM_DEVICES] =
{ "Keyboard", "None", "None", "None" };
{ "Keyboard", "None", "None", "None" };
const int DefaultGamePad[GAMEPAD_NUM_DEVICES][GAMEPAD_NUM_BUTTONS] =
{ {SDLK_F, SDLK_D, SDLK_S, SDLK_RETURN,
{ {SDLK_F, SDLK_D, SDLK_S, SDLK_RETURN,
SDLK_UP, SDLK_DOWN, SDLK_LEFT, SDLK_RIGHT, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
@ -2300,11 +2291,11 @@ const int DefaultGamePad[GAMEPAD_NUM_DEVICES][GAMEPAD_NUM_BUTTONS] =
// PowerPad defaults
const char *PowerPadNames[POWERPAD_NUM_BUTTONS] =
{ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B" };
{ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B" };
const char *DefaultPowerPadDevice[POWERPAD_NUM_DEVICES] =
{ "Keyboard", "None" };
{ "Keyboard", "None" };
const int DefaultPowerPad[POWERPAD_NUM_DEVICES][POWERPAD_NUM_BUTTONS] =
{ {SDLK_o, SDLK_p, SDLK_LEFTBRACKET, SDLK_RIGHTBRACKET,
{ {SDLK_o, SDLK_p, SDLK_LEFTBRACKET, SDLK_RIGHTBRACKET,
SDLK_k, SDLK_l, SDLK_SEMICOLON, SDLK_QUOTE,
SDLK_m, SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
@ -2312,52 +2303,52 @@ const int DefaultPowerPad[POWERPAD_NUM_DEVICES][POWERPAD_NUM_BUTTONS] =
// QuizKing defaults
const char *QuizKingNames[QUIZKING_NUM_BUTTONS] =
{ "0", "1", "2", "3", "4", "5" };
{ "0", "1", "2", "3", "4", "5" };
const char *DefaultQuizKingDevice = "Keyboard";
const int DefaultQuizKing[QUIZKING_NUM_BUTTONS] =
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r, SDLK_t, SDLK_y };
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r, SDLK_t, SDLK_y };
// HyperShot defaults
const char *HyperShotNames[HYPERSHOT_NUM_BUTTONS] = { "0", "1", "2", "3" };
const char *DefaultHyperShotDevice = "Keyboard";
const int DefaultHyperShot[HYPERSHOT_NUM_BUTTONS] =
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r };
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r };
// Mahjong defaults
const char *MahjongNames[MAHJONG_NUM_BUTTONS] =
{ "00", "01", "02", "03", "04", "05", "06", "07",
{ "00", "01", "02", "03", "04", "05", "06", "07",
"08", "09", "10", "11", "12", "13", "14", "15",
"16", "17", "18", "19", "20"
};
const char *DefaultMahjongDevice = "Keyboard";
const int DefaultMahjong[MAHJONG_NUM_BUTTONS] =
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r, SDLK_t, SDLK_a, SDLK_s, SDLK_d,
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r, SDLK_t, SDLK_a, SDLK_s, SDLK_d,
SDLK_f, SDLK_g, SDLK_h, SDLK_j, SDLK_k, SDLK_l, SDLK_z, SDLK_x,
SDLK_c, SDLK_v, SDLK_b, SDLK_n, SDLK_m
};
// TopRider defaults
const char *TopRiderNames[TOPRIDER_NUM_BUTTONS] =
{ "0", "1", "2", "3", "4", "5", "6", "7" };
{ "0", "1", "2", "3", "4", "5", "6", "7" };
const char *DefaultTopRiderDevice = "Keyboard";
const int DefaultTopRider[TOPRIDER_NUM_BUTTONS] =
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r, SDLK_t, SDLK_y, SDLK_u, SDLK_i };
{ SDLK_q, SDLK_w, SDLK_e, SDLK_r, SDLK_t, SDLK_y, SDLK_u, SDLK_i };
// FTrainer defaults
const char *FTrainerNames[FTRAINER_NUM_BUTTONS] =
{ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B" };
{ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B" };
const char *DefaultFTrainerDevice = "Keyboard";
const int DefaultFTrainer[FTRAINER_NUM_BUTTONS] =
{ SDLK_o, SDLK_p, SDLK_LEFTBRACKET, SDLK_RIGHTBRACKET,
{ SDLK_o, SDLK_p, SDLK_LEFTBRACKET, SDLK_RIGHTBRACKET,
SDLK_k, SDLK_l, SDLK_SEMICOLON, SDLK_QUOTE,
SDLK_m, SDLK_COMMA, SDLK_PERIOD, SDLK_SLASH
};
// FamilyKeyBoard defaults
const char *FamilyKeyBoardNames[FAMILYKEYBOARD_NUM_BUTTONS] =
{ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8",
{ "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8",
"1", "2", "3", "4", "5", "6", "7", "8", "9", "0",
"MINUS", "EQUAL", "BACKSLASH", "BACKSPACE",
"ESCAPE", "Q", "W", "E", "R", "T", "Y", "U", "I", "O",
@ -2372,7 +2363,7 @@ const char *FamilyKeyBoardNames[FAMILYKEYBOARD_NUM_BUTTONS] =
const char *DefaultFamilyKeyBoardDevice = "Keyboard";
const int DefaultFamilyKeyBoard[FAMILYKEYBOARD_NUM_BUTTONS] =
{ SDLK_F1, SDLK_F2, SDLK_F3, SDLK_F4, SDLK_F5, SDLK_F6, SDLK_F7, SDLK_F8,
{ SDLK_F1, SDLK_F2, SDLK_F3, SDLK_F4, SDLK_F5, SDLK_F6, SDLK_F7, SDLK_F8,
SDLK_1, SDLK_2, SDLK_3, SDLK_4, SDLK_5,
SDLK_6, SDLK_7, SDLK_8, SDLK_9, SDLK_0,
SDLK_MINUS, SDLK_EQUALS, SDLK_BACKSLASH, SDLK_BACKSPACE,