Browse code

Rounded corners

neauoire authored on 19/02/2021 17:59:46
Showing 3 changed files
... ...
@@ -106,6 +106,7 @@ A device that works like a NES controller, each button is a bit from a single by
106 106
 
107 107
 ### Misc TODOs
108 108
 
109
+- Defining theme colors in memory
109 110
 - Includes
110 111
 - Defines
111 112
 - Lint, print unused labels
... ...
@@ -131,6 +131,10 @@ clear(Uint32 *dst)
131 131
 void
132 132
 putpixel(Uint32 *dst, int x, int y, int color)
133 133
 {
134
+	if(y == PAD * 8 || y == HEIGHT - PAD * 8 - 1) {
135
+		if(x == PAD * 8) return;
136
+		if(x == WIDTH - PAD * 8 - 1) return;
137
+	}
134 138
 	if(x >= 0 && x < WIDTH - 8 && y >= 0 && y < HEIGHT - 8)
135 139
 		dst[y * WIDTH + x] = theme[color];
136 140
 }
... ...
@@ -42,13 +42,13 @@ BRK
42 42
 			#02 IOR2 #0008 DIV2 #0006 NEQ2 ,option3 ROT JMP? POP2
43 43
 				,brush_tiny =brush BRK
44 44
 			@option3
45
-			#02 IOR2 #0008 DIV2 #0007 NEQ2 ,option4 ROT JMP? POP2
45
+			#02 IOR2 #0008 DIV2 #000b NEQ2 ,option4 ROT JMP? POP2
46 46
 				#05 =color BRK
47 47
 			@option4
48
-			#02 IOR2 #0008 DIV2 #0008 NEQ2 ,option5 ROT JMP? POP2
48
+			#02 IOR2 #0008 DIV2 #000c NEQ2 ,option5 ROT JMP? POP2
49 49
 				#06 =color BRK
50 50
 			@option5
51
-			#02 IOR2 #0008 DIV2 #0009 NEQ2 ,option6 ROT JMP? POP2
51
+			#02 IOR2 #0008 DIV2 #000d NEQ2 ,option6 ROT JMP? POP2
52 52
 				#07 =color BRK
53 53
 			@option6
54 54
 
... ...
@@ -66,9 +66,9 @@ BRK
66 66
 	#05 ,brush_large #0008 #0020 ,draw-sprite JSR
67 67
 	#05 ,brush_small #0008 #0028 ,draw-sprite JSR
68 68
 	#05 ,brush_tiny  #0008 #0030 ,draw-sprite JSR
69
-	#05 ,brush_large #0008 #0038 ,draw-sprite JSR
70
-	#06 ,brush_large #0008 #0040 ,draw-sprite JSR
71
-	#07 ,brush_large #0008 #0048 ,draw-sprite JSR
69
+	#05 ,brush_large #0008 #0058 ,draw-sprite JSR
70
+	#06 ,brush_large #0008 #0060 ,draw-sprite JSR
71
+	#07 ,brush_large #0008 #0068 ,draw-sprite JSR
72 72
 	RTS
73 73
 
74 74
 @draw-sprite