uxn

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

commit ca1d830055470c6a866c3d07c8a45bdeb5a9892e
parent 9bc6a83873b7820173410cbfa8d239cd0fdc7f72
Author: neauoire <aliceffekt@gmail.com>
Date:   Thu, 16 Dec 2021 10:46:27 -0800

(font.tal) Migrated to AUTO-Y-ADDR

Diffstat:
Mprojects/examples/demos/font.tal | 74+++++++++++++++++++++++++++++++++++++++-----------------------------------
Mprojects/fonts/chicago12.uf2 | 0
Aprojects/fonts/courier12.uf2 | 0
Mprojects/fonts/diamond12.uf2 | 0
Mprojects/fonts/geneva12.uf2 | 0
Mprojects/fonts/geneva14.uf2 | 0
Mprojects/fonts/helvetica12.uf2 | 0
Mprojects/fonts/helvetica14.uf2 | 0
Mprojects/fonts/losangeles12.uf2 | 0
Aprojects/fonts/monaco12.uf2 | 0
Aprojects/fonts/msx816.uf2 | 0
Mprojects/fonts/newyork12.uf2 | 0
Mprojects/fonts/newyork14.uf2 | 0
Mprojects/fonts/palatino12.uf2 | 0
Mprojects/fonts/palatino14.uf2 | 0
Mprojects/fonts/sans10-bold.uf2 | 0
Mprojects/fonts/sans10-regular.uf2 | 0
Mprojects/fonts/sapphire14.uf2 | 0
Mprojects/fonts/terminal12.uf2 | 0
Mprojects/fonts/times12.uf2 | 0
Mprojects/fonts/times15.uf2 | 0
Mprojects/fonts/venice14.uf2 | 0
22 files changed, 39 insertions(+), 35 deletions(-)

diff --git a/projects/examples/demos/font.tal b/projects/examples/demos/font.tal @@ -1,4 +1,4 @@ -( font ) +( uxnasm projects/examples/demos/font.tal bin/font.rom && uxnemu bin/font.rom ) %+ { ADD } %- { SUB } %* { MUL } %/ { DIV } %< { LTH } %> { GTH } %= { EQU } %! { NEQ } @@ -8,10 +8,20 @@ %RTN { JMP2r } %TOS { #00 SWP } +%GET-WIDTH { TOS ;font-data ++ LDA } +%GET-GLYPH { TOS #50 SFT2 ;font-data/glyphs ++ } + +%AUTO-NONE { #00 .Screen/auto DEO } +%AUTO-X { #01 .Screen/auto DEO } +%AUTO-Y { #02 .Screen/auto DEO } +%AUTO-ADDR { #04 .Screen/auto DEO } +%AUTO-X-ADDR { #05 .Screen/auto DEO } +%AUTO-Y-ADDR { #06 .Screen/auto DEO } + ( devices ) |00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2 -|20 @Screen &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 +|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 |a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 ( variables ) @@ -76,41 +86,35 @@ RTN STH SWP2 .Screen/y DEO2 - SWP2 DUP2 .Screen/x DEO2 SWP2 - &loop - LDAk - DUP #0a ! ,&no-linebreak JCN - ( move down ) STH OVR2 .Screen/x DEO2 STHr - ( incr y ) .Screen/y DEI2 #0010 ++ .Screen/y DEO2 - POP ,&continue JMP &no-linebreak - STHkr ,&sprite JSR + SWP2 .Screen/x DEO2 + AUTO-Y-ADDR + &while + LDAk #0a ! ,&no-linebreak JCN + ( reset ) #0020 .Screen/x DEO2 + ( down ) .Screen/y DEI2k #0010 ++ ROT DEO2 + ,&continue JMP &no-linebreak + LDAk STHkr ,&sprite JSR &continue - ( incr addr ) INC2 - LDAk ,&loop JCN - POP2 POP2 POPr + INC2 LDAk ,&while JCN + POP2 POPr + AUTO-NONE RTN &sprite ( char color -- ) - STH - ( get addr ) STHk TOS #50 SFT2 ;font-data #0100 ++ ++ .Screen/addr DEO2 - ( get width ) STHkr TOS ;font-data ++ LDA TOS - SWPr - ( left-top ) STHkr .Screen/sprite DEO - .Screen/y DEI2 #0008 ++ .Screen/y DEO2 - .Screen/addr DEI2 #0010 ++ .Screen/addr DEO2 - ( left-bottom ) STHkr .Screen/sprite DEO - .Screen/x DEI2 #0008 ++ .Screen/x DEO2 - .Screen/y DEI2 #0008 -- .Screen/y DEO2 - DUP #0a < ,&thin JCN - .Screen/addr DEI2 #0008 -- .Screen/addr DEO2 - ( right-top ) STHkr .Screen/sprite DEO - .Screen/addr DEI2 #0010 ++ .Screen/addr DEO2 - .Screen/y DEI2 #0008 ++ .Screen/y DEO2 - ( right-bottom ) STHkr .Screen/sprite DEO - .Screen/y DEI2 #0008 -- .Screen/y DEO2 &thin - SWPr - ( use width ) .Screen/x DEI2 ++ #0008 -- .Screen/x DEO2 - POPr POPr + .Screen/x DEI2 STH2 + .Screen/y DEI2 STH2 + ( glyph ) OVR GET-GLYPH .Screen/addr DEO2 + DUP .Screen/sprite DEOk DEO + STH2kr .Screen/y DEO2 + SWP GET-WIDTH + DUP #09 < ,&narrow JCN + .Screen/x DEI2k #0008 ++ ROT DEO2 + OVR .Screen/sprite DEOk DEO + STH2kr .Screen/y DEO2 + &narrow + POP2r + ( width ) TOS STH2r ++ .Screen/x DEO2 + POP RTN RTN @@ -187,4 +191,4 @@ RTN @font-path-small "projects/fonts/atari8.uf1 $1 -@font-data -\ No newline at end of file +@font-data $100 &glyphs +\ No newline at end of file diff --git a/projects/fonts/chicago12.uf2 b/projects/fonts/chicago12.uf2 Binary files differ. diff --git a/projects/fonts/courier12.uf2 b/projects/fonts/courier12.uf2 Binary files differ. diff --git a/projects/fonts/diamond12.uf2 b/projects/fonts/diamond12.uf2 Binary files differ. diff --git a/projects/fonts/geneva12.uf2 b/projects/fonts/geneva12.uf2 Binary files differ. diff --git a/projects/fonts/geneva14.uf2 b/projects/fonts/geneva14.uf2 Binary files differ. diff --git a/projects/fonts/helvetica12.uf2 b/projects/fonts/helvetica12.uf2 Binary files differ. diff --git a/projects/fonts/helvetica14.uf2 b/projects/fonts/helvetica14.uf2 Binary files differ. diff --git a/projects/fonts/losangeles12.uf2 b/projects/fonts/losangeles12.uf2 Binary files differ. diff --git a/projects/fonts/monaco12.uf2 b/projects/fonts/monaco12.uf2 Binary files differ. diff --git a/projects/fonts/msx816.uf2 b/projects/fonts/msx816.uf2 Binary files differ. diff --git a/projects/fonts/newyork12.uf2 b/projects/fonts/newyork12.uf2 Binary files differ. diff --git a/projects/fonts/newyork14.uf2 b/projects/fonts/newyork14.uf2 Binary files differ. diff --git a/projects/fonts/palatino12.uf2 b/projects/fonts/palatino12.uf2 Binary files differ. diff --git a/projects/fonts/palatino14.uf2 b/projects/fonts/palatino14.uf2 Binary files differ. diff --git a/projects/fonts/sans10-bold.uf2 b/projects/fonts/sans10-bold.uf2 Binary files differ. diff --git a/projects/fonts/sans10-regular.uf2 b/projects/fonts/sans10-regular.uf2 Binary files differ. diff --git a/projects/fonts/sapphire14.uf2 b/projects/fonts/sapphire14.uf2 Binary files differ. diff --git a/projects/fonts/terminal12.uf2 b/projects/fonts/terminal12.uf2 Binary files differ. diff --git a/projects/fonts/times12.uf2 b/projects/fonts/times12.uf2 Binary files differ. diff --git a/projects/fonts/times15.uf2 b/projects/fonts/times15.uf2 Binary files differ. diff --git a/projects/fonts/venice14.uf2 b/projects/fonts/venice14.uf2 Binary files differ.