30 lines
589 B
C
30 lines
589 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;
|
|
};
|
|
|
|
|
|
#define SCREEN_WIDTH (320)
|
|
#define SCREEN_HEIGHT (256)
|
|
|
|
#define TOTAL_SCREEN_SETUP_SIZE(s) ((s->width / 8) * s->height * s->bitplanes)
|
|
|
|
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
|