Trying to reduce memory footprint.
This commit is contained in:
@ -20,18 +20,18 @@
|
|||||||
#define MENU_HOLD_DURATION 1.0
|
#define MENU_HOLD_DURATION 1.0
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int32_t x;
|
uint8_t x;
|
||||||
int32_t y;
|
uint8_t y;
|
||||||
int32_t width;
|
uint8_t width;
|
||||||
int32_t height;
|
uint8_t height;
|
||||||
} menuitem_t;
|
} menuitem_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
menuitem_t items[MENU_ITEMS_MAX];
|
menuitem_t items[MENU_ITEMS_MAX];
|
||||||
int32_t itemCount;
|
uint8_t itemCount;
|
||||||
int32_t selected;
|
uint8_t selected;
|
||||||
int32_t cursorX;
|
uint8_t cursorX;
|
||||||
int32_t cursorY;
|
uint8_t cursorY;
|
||||||
|
|
||||||
// bool holdAllow;
|
// bool holdAllow;
|
||||||
// float holdLast;
|
// float holdLast;
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
|
|
||||||
void menuInit(menu_t *menu) {
|
void menuInit(menu_t *menu) {
|
||||||
int32_t i;
|
|
||||||
|
|
||||||
menu->itemCount = 0;
|
menu->itemCount = 0;
|
||||||
menu->selected = 0;
|
menu->selected = 0;
|
||||||
menu->cursorX = 0;
|
menu->cursorX = 0;
|
||||||
@ -19,7 +17,7 @@ void menuInit(menu_t *menu) {
|
|||||||
void menuUpdate(menu_t *menu, engine_t *engine) {
|
void menuUpdate(menu_t *menu, engine_t *engine) {
|
||||||
menuitem_t *current;
|
menuitem_t *current;
|
||||||
menuitem_t *item;
|
menuitem_t *item;
|
||||||
int32_t x, y, i, j;
|
uint8_t x, y, i, j;
|
||||||
|
|
||||||
current = menu->items + menu->selected;
|
current = menu->items + menu->selected;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user