cool-bun-demo/screen.h

31 lines
620 B
C

#ifndef __SCREEN_H__
#define __SCREEN_H__
#include "types.h"
struct ScreenSetup {
short int width;
short int height;
short int bitplanes;
unsigned char *memoryStart;
short int nextBitplaneAdvance;
short int currentBuffer;
};
#define SCREEN_WIDTH (320)
#define SCREEN_HEIGHT (256)
#define TOTAL_SCREEN_SETUP_SIZE(s) ((s->width / 8) * s->height * s->bitplanes * 2)
void allocateScreenMemory(struct ScreenSetup *screenSetup);
void freeScreenMemory(struct ScreenSetup *screenSetup);
void prepareScreen(
struct ScreenSetup *screenSetup,
uint16_t width,
uint16_t height,
uint8_t bitplanes
);
#endif