1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 09:39:43 +01:00

Add support for GameCube glyphs.

It's kind of a bummer that L/R don't actually do anything... we should add ZL/ZR support at some point.

Also note that GameCube binds X to 'back' rather than B, this will be fixed by SDL_ActionSet for 2.5.
This commit is contained in:
Ethan Lee 2024-01-16 22:57:18 -05:00
parent ceaaea1597
commit afbcb3f867
7 changed files with 26 additions and 8 deletions

View file

@ -5,9 +5,9 @@
<height>10</height>
<white_teeth>1</white_teeth>
<chars>
<range start="0xEB00" end="0xEB2F"/>
<range start="0xEB00" end="0xEB36"/>
</chars>
<special>
<range start="0xEB00" end="0xEB2F" color="1"/>
<range start="0xEB00" end="0xEB36" color="1"/>
</special>
</font_metadata>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -5,9 +5,9 @@
<height>12</height>
<white_teeth>1</white_teeth>
<chars>
<range start="0xEB00" end="0xEB2F"/>
<range start="0xEB00" end="0xEB36"/>
</chars>
<special>
<range start="0xEB00" end="0xEB2F" color="1"/>
<range start="0xEB00" end="0xEB36" color="1"/>
</special>
</font_metadata>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -5,9 +5,9 @@
<height>8</height>
<white_teeth>1</white_teeth>
<chars>
<range start="0xEB00" end="0xEB2F"/>
<range start="0xEB00" end="0xEB36"/>
</chars>
<special>
<range start="0xEB00" end="0xEB2F" color="1"/>
<range start="0xEB00" end="0xEB36" color="1"/>
</special>
</font_metadata>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -62,6 +62,15 @@ typedef enum
GLYPH_NINTENDO_GENERIC_STICK,
GLYPH_UNKNOWN,
/* Added after 2.4 */
GLYPH_NINTENDO_GAMECUBE_A,
GLYPH_NINTENDO_GAMECUBE_B,
GLYPH_NINTENDO_GAMECUBE_X,
GLYPH_NINTENDO_GAMECUBE_Y,
GLYPH_NINTENDO_GAMECUBE_L,
GLYPH_NINTENDO_GAMECUBE_R,
GLYPH_NINTENDO_GAMECUBE_Z,
GLYPH_TOTAL
}
ButtonGlyphKey;
@ -78,6 +87,9 @@ typedef enum
LAYOUT_XBOX,
LAYOUT_GENERIC,
/* Added after 2.4 */
LAYOUT_GAMECUBE,
LAYOUT_TOTAL
}
ButtonGlyphLayout;
@ -133,6 +145,13 @@ static const char* glyph_layout[LAYOUT_TOTAL][SDL_CONTROLLER_BUTTON_RIGHTSHOULDE
"SELECT", "GUIDE", "START",
glyph[GLYPH_NINTENDO_XBOX_LSTICK], glyph[GLYPH_NINTENDO_XBOX_RSTICK],
glyph[GLYPH_GENERIC_L], glyph[GLYPH_GENERIC_R]
},
{ // GAMECUBE
glyph[GLYPH_NINTENDO_GAMECUBE_A], glyph[GLYPH_NINTENDO_GAMECUBE_X],
glyph[GLYPH_NINTENDO_GAMECUBE_B], glyph[GLYPH_NINTENDO_GAMECUBE_Y],
glyph[GLYPH_UNKNOWN], glyph[GLYPH_UNKNOWN], "START",
glyph[GLYPH_UNKNOWN], glyph[GLYPH_UNKNOWN],
glyph[GLYPH_UNKNOWN], glyph[GLYPH_NINTENDO_GAMECUBE_Z]
}
};
@ -215,8 +234,7 @@ void BUTTONGLYPHS_update_layout(SDL_GameController *c)
}
else if (product == 0x0337)
{
/* FIXME: GameCube glyphs? -flibit */
layout = LAYOUT_XBOX;
layout = LAYOUT_GAMECUBE;
}
else
{