pouët.net

Christmas Diamonds

xeleh_amiga_asm_vc3-2023

Author:   Xeleh
Category: Christmas Challenge
System:   Amiga
Language: M68k Assembler, vasm
Len source code:
Len exe file:    104 bytes
Len code only:   68 bytes
Instructions:
Tested on FS-UAE with Kickstarts 1.3, 2.0 & 3.1. It should also work on WinUAE.
Description:
A determinant is calculated for each character position of the 19x19 object area.
The determinant of the positions belonging to any of the lines we need to draw satisfies any of the following formulas:
  - (column position + row position + 3 ) % 6 = 0   (45 degrees lines)
  - (column position - row position + 21) % 6 = 0   (135 degrees lines)
Where both row and column positions are zero-based and % stands for the modulo operation. 
Comments:
Thanks for organizing this challenge, Logiker. It was quite fun! :)