diff --git a/gui/wireworld/wireworld.tal b/gui/wireworld/wireworld.tal index 90406ce..3819b37 100644 --- a/gui/wireworld/wireworld.tal +++ b/gui/wireworld/wireworld.tal @@ -26,8 +26,8 @@ #0d46 .System/g DEO2 #006f .System/b DEO2 ( size ) - #0100 .Screen/width DEO2 - #0100 .Screen/height DEO2 + #0200 .Screen/width DEO2 + #0200 .Screen/height DEO2 ( vectors ) ;on-frame .Screen/vector DEO2 ;on-mouse .Mouse/vector DEO2 @@ -90,10 +90,8 @@ BRK &no-toggle POP &no-menu - ( color ) .color LDZ .Mouse/state DEI #01 GTH #00 EQU MUL - ( cell* ) .Mouse/x DEI2 #02 SFT2 .Mouse/y DEI2 #02 SFT2 #60 SFT2 ADD2 - ;get-addr/current LDA2 ADD2 STA + ( cell* ) .Mouse/x DEI2 #03 SFT2 .Mouse/y DEI2 #03 SFT2 make-addr STA redraw BRK @@ -188,32 +186,41 @@ JMP2r JMP2r +@make-addr ( x* y* -- addr* ) + + #60 SFT2 ADD2 ;get-addr/current LDA2 ADD2 + +JMP2r + ( @|drawing ) @redraw ( -- ) ;cell-icn .Screen/addr DEO2 - #4000 - &ver - #00 OVR #20 SFT2 .Screen/y DEO2 - STHk - #4000 - &hor - #00 OVR #20 SFT2 .Screen/x DEO2 - DUP STHkr get-addr LDA .Screen/sprite DEO - INC GTHk ?&hor - POP2 - POPr - INC GTHk ?&ver - POP2 + #01 .Screen/auto DEO + #0000 + DUP2 .Screen/x DEO2 + .Screen/y DEO2 + + #1000 #0000 + &l + ( x ) DUP2 #003f AND2 + ( y ) OVR2 #06 SFT2 + make-addr LDA .Screen/sprite DEO + INCk #3f AND ?&no-bound + #0000 .Screen/x DEO2 + .Screen/y DEI2 #0008 ADD2 .Screen/y DEO2 + &no-bound + INC2 GTH2k ?&l + POP2 POP2 @draw-ui ( -- ) ( colors ) #01 .Screen/auto DEO #0010 DUP2 .Screen/x DEO2 .Screen/y DEO2 - ;color-icn .Screen/addr DEO2 + ;cell-icn .Screen/addr DEO2 #01 .Screen/sprite DEO #02 .Screen/sprite DEO #03 .Screen/sprite DEO @@ -224,16 +231,12 @@ JMP2r JMP2r -@phex ( short* -- ) SWP phex/b &b DUP #04 SFT phex/c &c #0f AND DUP #09 GTH #27 MUL ADD #30 ADD #18 DEO JMP2r - ( @|assets ) @pointer-icn [ 80c0 e0f0 f8e0 1000 ] @cell-icn [ - e0e0 e000 0000 0000 ] -@color-icn [ 7cfe fefe fefe 7c00 ] @toggle-icn [ 6666 6666 6666 6600