text/plain
•
583 B
•
23 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
#define AUDIO_FREQ 44100
#define AUDIO_SAMPLES 1024
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);