#include "screen.h" #include "types.h" #include #include void allocateScreenMemory(struct ScreenSetup *screenSetup) { char *memory = (char *)AllocMem( TOTAL_SCREEN_SETUP_SIZE(screenSetup), MEMF_CLEAR | MEMF_CHIP ); screenSetup->memoryStart = memory; } void freeScreenMemory(struct ScreenSetup *screenSetup) { FreeMem( screenSetup->memoryStart, TOTAL_SCREEN_SETUP_SIZE(screenSetup) ); } void prepareScreen( struct ScreenSetup *screenSetup, uint16_t width, uint16_t height, uint8_t bitplanes ) { screenSetup->width = width; screenSetup->height = height; screenSetup->bitplanes = bitplanes; screenSetup->nextBitplaneAdvance = width * height / 8; screenSetup->currentBuffer = 0; }