cool-bun-demo/screen.h

31 lines
620 B
C
Raw Normal View History

2024-05-02 16:52:06 +00:00
#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;
2024-05-27 20:50:56 +00:00
short int currentBuffer;
};
2024-05-02 16:52:06 +00:00
#define SCREEN_WIDTH (320)
#define SCREEN_HEIGHT (256)
2024-05-27 20:50:56 +00:00
#define TOTAL_SCREEN_SETUP_SIZE(s) ((s->width / 8) * s->height * s->bitplanes * 2)
2024-05-02 16:52:06 +00:00
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