borgware-2d/menu/menu.h

43 lines
709 B
C
Raw Normal View History

/* A game chooser for borgs
* by: Christian Kroll
* date: Tuesday, 2008/03/16
*/
#ifndef MENU_H_
#define MENU_H_
#include <inttypes.h>
2009-01-01 17:06:38 +00:00
/*
typedef enum menu_item_t
{
MENU_ITEM_SNAKE,
MENU_ITEM_SPACEINVADERS,
MENU_ITEM_TETRIS,
MENU_ITEM_MAX // fake entry to mark the end
}
menu_item_t;
2009-01-01 17:06:38 +00:00
*/
typedef enum menu_direction_t
{
MENU_DIRECTION_LEFT,
MENU_DIRECTION_RIGHT,
MENU_DIRECTION_STILL
}
menu_direction_t;
2009-01-01 17:06:38 +00:00
typedef struct{
void(*run)(void);
uint8_t * icon;
}game_descriptor_t;
void menu();
2009-01-01 17:06:38 +00:00
void menu_animate(uint8_t currentItem, menu_direction_t direction);
uint8_t menu_getIconPixel(uint8_t item, int8_t x, int8_t y);
void menu_setpixel(int8_t x, int8_t y, int8_t isSet);
#endif /*MENU_H_*/