Trying to reduce memory footprint.

This commit is contained in:
2021-09-02 10:35:21 -07:00
parent 70116f3aea
commit 1938d44667
2 changed files with 9 additions and 11 deletions

View File

@ -20,18 +20,18 @@
#define MENU_HOLD_DURATION 1.0
typedef struct {
int32_t x;
int32_t y;
int32_t width;
int32_t height;
uint8_t x;
uint8_t y;
uint8_t width;
uint8_t height;
} menuitem_t;
typedef struct {
menuitem_t items[MENU_ITEMS_MAX];
int32_t itemCount;
int32_t selected;
int32_t cursorX;
int32_t cursorY;
uint8_t itemCount;
uint8_t selected;
uint8_t cursorX;
uint8_t cursorY;
// bool holdAllow;
// float holdLast;

View File

@ -8,8 +8,6 @@
#include "menu.h"
void menuInit(menu_t *menu) {
int32_t i;
menu->itemCount = 0;
menu->selected = 0;
menu->cursorX = 0;
@ -19,7 +17,7 @@ void menuInit(menu_t *menu) {
void menuUpdate(menu_t *menu, engine_t *engine) {
menuitem_t *current;
menuitem_t *item;
int32_t x, y, i, j;
uint8_t x, y, i, j;
current = menu->items + menu->selected;