1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2026-03-09 11:24:47 +00:00

Use line continuation to remove intermediate calcs

This commit is contained in:
David Schmenk
2025-01-14 10:21:11 -08:00
parent 18cf6aea8b
commit 53dd1ec6aa

View File

@@ -229,8 +229,7 @@ export def dcgrBoldStr(clr, x, y, strptr)#2
return dcgrStr(x, y, strptr)
end
export def dcgrFont(font)#0
var rows, pWide, pThin
byte bits
var rows, pWide, pThin
if font
if font == @fontDefThin
@@ -239,10 +238,9 @@ export def dcgrFont(font)#0
pThin = heapalloc(96*8)
fontDefThin:fnt_glyptrs = pThin
for rows = 0 to 96*8
bits = (^pWide ) & $02
bits = bits | (^pWide | ^pWide >> 1 | ^pWide >> 2) & $04
bits = bits | ( ^pWide >> 2) & $08
^pThin = bits
^pThin = ((^pWide ) & $02) \
| ((^pWide | ^pWide >> 1 | ^pWide >> 2) & $04) \
| (( ^pWide >> 2) & $08)
pThin++
pWide++
next