Skip to content

Commit

Permalink
Led anim (#308)
Browse files Browse the repository at this point in the history
Touch up LED animations for the new shape
  • Loading branch information
AEFeinstein authored Oct 29, 2024
1 parent 03a6f43 commit a976a77
Show file tree
Hide file tree
Showing 9 changed files with 455 additions and 287 deletions.
11 changes: 9 additions & 2 deletions emulator/src/extensions/leds/ext_leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,15 @@ emuExtension_t ledEmuExtension = {
// first value is the LED column (top-to-bottom(?))
// second value is the row
static const vec_t ledOffsets[CONFIG_NUM_LEDS] = {
{.x = 4, .y = 1}, {.x = 5, .y = 0}, {.x = 3, .y = 0}, {.x = 1, .y = 0}, {.x = 2, .y = 1},
{.x = 0, .y = 2}, {.x = 2, .y = 2}, {.x = 4, .y = 2}, {.x = 6, .y = 2},
{.x = 5, .y = 1}, // 1
{.x = 6, .y = 0}, // 2
{.x = 3, .y = 0}, // 3
{.x = 0, .y = 0}, // 4
{.x = 1, .y = 1}, // 5
{.x = 0, .y = 2}, // 6
{.x = 2, .y = 2}, // 7
{.x = 4, .y = 2}, // 8
{.x = 6, .y = 2} // 9,
};

//==============================================================================
Expand Down
18 changes: 16 additions & 2 deletions main/menu/menu_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,25 @@ const char* getMenuItemLabelText(char* buffer, int buflen, const menuItem_t* ite
// Handle concatenating the values
if (item->options)
{
snprintf(buffer, buflen - 1, "%s%s", item->label, item->options[item->currentOpt]);
if (NULL != item->label)
{
snprintf(buffer, buflen - 1, "%s%s", item->label, item->options[item->currentOpt]);
}
else
{
snprintf(buffer, buflen - 1, "%s", item->options[item->currentOpt]);
}
}
else
{
snprintf(buffer, buflen - 1, "%s: %" PRId32, item->label, item->currentSetting);
if (NULL != item->label)
{
snprintf(buffer, buflen - 1, "%s: %" PRId32, item->label, item->currentSetting);
}
else
{
snprintf(buffer, buflen - 1, "%" PRId32, item->currentSetting);
}
}

// Return the buffer passed to us
Expand Down
3 changes: 3 additions & 0 deletions main/modes/games/ultimateTTT/ultimateTTT.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ ultimateTTT_t* ttt;
*/
static void tttEnterMode(void)
{
// TODO enable speaker if BGM is added
setDacShutdown(true);

// Allocate memory for the mode
ttt = calloc(1, sizeof(ultimateTTT_t));

Expand Down
Loading

0 comments on commit a976a77

Please sign in to comment.