cool-bun-demo/32x50_bun.c

64 lines
1.3 KiB
C

/**
* What do we need
* * [ ] screen setup
*/
#include <hardware/custom.h>
#include "system/system.h"
#include "system/copper.h"
#include "screen.h"
extern struct Custom far custom;
uint16_t custom_color = (uint16_t)offsetof(Custom, color);
uint16_t custom_sprite = (uint16_t)offsetof(Custom, sprpt);
uint16_t custom_sprite_control = (uint16_t)offsetof(Custom, spr);
int main(void) {
struct ScreenDefinition screenDefinition;
struct ActiveScreenBufferDetails activeScreenBufferDetails;
uint16_t *copperlist, *currentCopperlist;
void *copperlistBitplanePointers[8][2];
int i;
allocateDoubleBufferedScreenMemory(
&screenDefinition,
&activeScreenBufferDetails,
320,
256,
2
);
copperlist = prepareNewCopperlist(300);
currentCopperlist = addDisplayToCopperlist(
copperlist,
&screenDefinition,
&activeScreenBufferDetails,
&copperlistBitplanePointers
);
COPPERLIST_MOVE(currentCopperlist, custom_color, 0x3a6);
COPPERLIST_MOVE(currentCopperlist, custom_color + 2, 0x000);
COPPERLIST_MOVE(currentCopperlist, custom_color + 4, 0xfff);
endCopperlist(currentCopperlist);
takeOverSystem();
setCopperlist(copperlist);
setUpDisplay((uint32_t)screenDefinition.bitplanes);
for (i = 0; i < 100000; ++i) {
}
giveBackSystem();
freeCopperlist(copperlist);
teardownScreen(&screenDefinition);
}