Revision 855dd978

View differences:

main.c
217 217
		OE();
218 218
		_delay_us(80);
219 219
		ODE();
220
		_delay_us(1); // avoid ghosting
220 221
		PORT(C) = round+1;
221 222
	}
222 223
}
......
464 465

  
465 466
	rawToBlock(block, tmp, (*sprite).offset);
466 467

  
467
	// check if sprite violates borders
468
	// check if sprite violates borders // TODO needs to be updated if game area doesn't span the whole line
468 469
	for(uint8_t i = 0; i < 4; i++){
469 470
		if((*sprite).offset < 0){
470 471
			if(((block[i]<<((*sprite).offset*-1)) ^ ((tmp&((0xf)<<(i*4)))>>(i*4))) != 0){
......
476 477
				return;
477 478
			}
478 479
		}
480
		else{
481
			break;
482
		}
479 483
	}
480 484

  
481 485
	// check first if rotated sprite crashes, if, drop to game

Also available in: Unified diff