Fixed picking issue in Noodle

This commit is contained in:
neauoire 2021-03-22 09:56:33 -07:00
parent c191c7ea3d
commit 15435a7302
3 changed files with 36 additions and 29 deletions

View File

@ -76,8 +76,10 @@ RTN
- Includes - Includes
- Defines - Defines
- Jump helpers - Jump helpers
- LDRS should load from the zeropage? - Implement Peek/Pook to helpers
- A fast way(2 bytes) to read from the zero page #aa LDR. - Create a theme designer application
- DateTime device
- Document controller.player2
## Notes ## Notes

View File

@ -20,5 +20,5 @@ cc -std=c89 -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werr
# cc uxn.c emulator.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -L/usr/local/lib -lSDL2 -o bin/emulator # cc uxn.c emulator.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -L/usr/local/lib -lSDL2 -o bin/emulator
# run # run
./bin/assembler projects/examples/gui.ripples.usm bin/boot.rom ./bin/assembler projects/software/noodle.usm bin/boot.rom
./bin/emulator bin/boot.rom ./bin/emulator bin/boot.rom

View File

@ -14,22 +14,23 @@
- Only draw-canvas target tile - Only draw-canvas target tile
- Resize buttons - Resize buttons
- Limit size - Limit size
- Draw point inbetween
- Pixel cleanup brush - Pixel cleanup brush
- Drag canvas content - Drag canvas content
BUGS - [tool] fill rect
- If canvas is higher than 0, mouse picking fails - [tool] spray
- [tool] pen
) )
%RTN { JMP2r } %RTN { JMP2r }
%RTN? { JMP2r? } %RTN? { JMP2r? }
%ABS2 { DUP2 #000f SFT2 #ffff SWP2 SWP POP MUL2? } %ABS2 { DUP2 #000f SFT2 #ffff SWP2 SWP POP MUL2? }
%STEP8 { #0033 SFT2 }
%MOD8 { #0007 AND2 }
%SFL { #40 SFT SFT }
%++ { #0001 ADD2 } %-- { #0001 SUB2 } %++ { #0001 ADD2 } %-- { #0001 SUB2 }
%2/ { #0001 SFT2 } %2/ { #0001 SFT2 }
%8/ { #0003 SFT2 } %8* { #0030 SFT2 } %8/ { #0003 SFT2 } %8* { #0030 SFT2 }
%8+ { #0008 ADD2 } %8+ { #0008 ADD2 }
%MOD8 { #0007 AND2 }
%SFL { #40 SFT SFT }
( variables ) ( variables )
@ -140,8 +141,8 @@ BRK
$no-touch-toolbar $no-touch-toolbar
( in canvas ) ( in canvas )
,$no-touch-canvas ~Mouse.x CLN2r ~canvas.x1 GTH2 STH2r ~canvas.x2 LTH2 #0101 NEQ2 JMP2? ,$no-touch-canvas ~Mouse.x CLN2r ~canvas.x1 GTS2 STH2r ~canvas.x2 LTS2 #0101 NEQ2 JMP2?
,$no-touch-canvas ~Mouse.y CLN2r ~canvas.y1 GTH2 STH2r ~canvas.y2 LTH2 #0101 NEQ2 JMP2? ,$no-touch-canvas ~Mouse.y CLN2r ~canvas.y1 GTS2 STH2r ~canvas.y2 LTS2 #0101 NEQ2 JMP2?
( set cursor operation ) ( set cursor operation )
,add-pixel =cursor.oper ,add-pixel =cursor.oper
@ -158,10 +159,12 @@ BRK
,$no-mirror-mode ~cursor.mirror #00 EQU JMP2? ,$no-mirror-mode ~cursor.mirror #00 EQU JMP2?
~Mouse.x ~canvas.x1 SUB2 ~canvas.w 8* SWP2 SUB2 ~Mouse.y ~canvas.y1 SUB2 ,paint JSR2 ~Mouse.x ~canvas.x1 SUB2 ~canvas.w 8* SWP2 SUB2 ~Mouse.y ~canvas.y1 SUB2 ,paint JSR2
$no-mirror-mode $no-mirror-mode
,$touch-end JMP2
$no-touch-canvas $no-touch-canvas
( background interface ) ( background interface )
,$no-touch-background ~Mouse.y STEP8 ~Screen.height #0010 SUB2 NEQ2 JMP2?
~Mouse.x ~Screen.width #0020 SUB2 SUB2 8/ ~Mouse.x ~Screen.width #0020 SUB2 SUB2 8/
DUP2 DUP2
#0000 NEQ2 ,$no-toggle-zoom ROT JMP2? #0000 NEQ2 ,$no-toggle-zoom ROT JMP2?
@ -181,7 +184,9 @@ BRK
( release ) #00 =Mouse.state ( release ) #00 =Mouse.state
$no-save-button $no-save-button
POP2 POP2
$no-touch-background
( jump label )
$touch-end $touch-end
$no-touch $no-touch