text/plain
•
616 B
•
22 lines
/*
* moon.h - header with types/globals that should be available pretty much
* everywhere
*/
#pragma once
#include <stdint.h>
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#define countof(x) (sizeof(x) / sizeof(*x))
#define SCREEN_WIDTH 160
#define SCREEN_HEIGHT 128
extern uint8_t button_state;
#define BUTTON_STATE_UP (1 << 0)
#define BUTTON_STATE_DOWN (1 << 1)
#define BUTTON_STATE_OK (1 << 2)
#define BUTTON_STATE_BACK (1 << 3)
void blit_buf(const void *buf, int yStart, int yEnd);
void blit_buf_rect(const void *buf, int xStart, int yStart, int xEnd, int yEnd);