uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 3d2f764914916c4b132c3a3c63302013b749aa25
parent 59229bdb9fab6247518fcd06524a9a64f78cf899
Author: neauoire <aliceffekt@gmail.com>
Date:   Fri, 19 Feb 2021 09:59:46 -0800

Rounded corners

Diffstat:
MREADME.md | 1+
Memulator.c | 4++++
Mexamples/paint.usm | 12++++++------
3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md @@ -106,6 +106,7 @@ A device that works like a NES controller, each button is a bit from a single by ### Misc TODOs +- Defining theme colors in memory - Includes - Defines - Lint, print unused labels diff --git a/emulator.c b/emulator.c @@ -131,6 +131,10 @@ clear(Uint32 *dst) void putpixel(Uint32 *dst, int x, int y, int color) { + if(y == PAD * 8 || y == HEIGHT - PAD * 8 - 1) { + if(x == PAD * 8) return; + if(x == WIDTH - PAD * 8 - 1) return; + } if(x >= 0 && x < WIDTH - 8 && y >= 0 && y < HEIGHT - 8) dst[y * WIDTH + x] = theme[color]; } diff --git a/examples/paint.usm b/examples/paint.usm @@ -42,13 +42,13 @@ BRK #02 IOR2 #0008 DIV2 #0006 NEQ2 ,option3 ROT JMP? POP2 ,brush_tiny =brush BRK @option3 - #02 IOR2 #0008 DIV2 #0007 NEQ2 ,option4 ROT JMP? POP2 + #02 IOR2 #0008 DIV2 #000b NEQ2 ,option4 ROT JMP? POP2 #05 =color BRK @option4 - #02 IOR2 #0008 DIV2 #0008 NEQ2 ,option5 ROT JMP? POP2 + #02 IOR2 #0008 DIV2 #000c NEQ2 ,option5 ROT JMP? POP2 #06 =color BRK @option5 - #02 IOR2 #0008 DIV2 #0009 NEQ2 ,option6 ROT JMP? POP2 + #02 IOR2 #0008 DIV2 #000d NEQ2 ,option6 ROT JMP? POP2 #07 =color BRK @option6 @@ -66,9 +66,9 @@ BRK #05 ,brush_large #0008 #0020 ,draw-sprite JSR #05 ,brush_small #0008 #0028 ,draw-sprite JSR #05 ,brush_tiny #0008 #0030 ,draw-sprite JSR - #05 ,brush_large #0008 #0038 ,draw-sprite JSR - #06 ,brush_large #0008 #0040 ,draw-sprite JSR - #07 ,brush_large #0008 #0048 ,draw-sprite JSR + #05 ,brush_large #0008 #0058 ,draw-sprite JSR + #06 ,brush_large #0008 #0060 ,draw-sprite JSR + #07 ,brush_large #0008 #0068 ,draw-sprite JSR RTS @draw-sprite