All pastes #744836 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-10-21 20:46 UTC
rendered paste body
#include <tigcclib.h>
#define LCD_BYTES_COLS	20
#define LCD_ROW_BYTES	30
//#define LCD_BOTTOM_ROW (0x4C00 + 30 * 99 + 1)
#define LCD_BOTTOM_ROW 0x579B

long int blocks = 0xBA3E6000;
char spacing_count, platform_row = 0;

void scroll_up() {
	memcpy(LCD_MEM, LCD_MEM + LCD_ROW_BYTES, LCD_ROW_BYTES * LCD_HEIGHT);
}

void draw_platform() {
	if (platform_row == 4) {
		
	} else {
		int i;
		long int bits = 0x80000000;
		char *lcd = LCD_BOTTOM_ROW;
		for (i = 0; i < 20; i++){
			if (blocks & bits) {
				if (platform_row == 0 || platform_row == 3) {
					lcd[i] = 0xFF;
				}
			}
			bits = bits >> 1;
		}
	}
}
void _main(void) {
	unsigned char ball[] = {0x78,0x9C,0xBC,0xFC,0xFC,0x78};
	int i;
	//clrscr();
//	memset((char *)0x4C00 + (30 * 100), 0, 20);  // Not needed due to ClrScr()
	for (i = 0; i < 100; i++) {
		scroll_up();
	}
	draw_platform();
//	long int *mem = (void *)0x4C00;
//	*mem = 0xFFFFFFFF;
//	clrscr();
//	Sprite8(0, 0, 6, ball, LCD_MEM, SPRT_XOR);
	ngetchx();
}