mirror of
https://github.com/blondie7575/WeeGUI.git
synced 2025-07-17 21:24:05 +00:00
Added support for raw characters to WGPrint
- Updated Applesoft sample code
This commit is contained in:
@@ -812,8 +812,13 @@ Prints a string into the current view, at the *local* cursor position. The text
|
|||||||
X: WGPrint
|
X: WGPrint
|
||||||
PARAM0: Pointer to null-terminated string (LSB)
|
PARAM0: Pointer to null-terminated string (LSB)
|
||||||
PARAM1: Pointer to null-terminated string (MSB)
|
PARAM1: Pointer to null-terminated string (MSB)
|
||||||
|
Overflow: If set, characters are printed raw, with no high bit manipulation. Only works in NORMAL mode.
|
||||||
</pre></td><td><pre>
|
</pre></td><td><pre>
|
||||||
&PRINT("string")
|
&PRINT("string")
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
&PRINT(raw_character)
|
||||||
</pre></td></tr>
|
</pre></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@@ -8,7 +8,6 @@ Known issues
|
|||||||
|
|
||||||
To Do:
|
To Do:
|
||||||
------
|
------
|
||||||
- Clicking on scroll arrows in basicdemo messes up title rendering
|
|
||||||
- Write sample code
|
- Write sample code
|
||||||
- Update side effects in assembly API
|
- Update side effects in assembly API
|
||||||
- Support for frameless views
|
- Support for frameless views
|
||||||
|
22
applesoft.s
22
applesoft.s
@@ -611,6 +611,10 @@ WGAmpersand_CURSR:
|
|||||||
WGAmpersand_PRINT:
|
WGAmpersand_PRINT:
|
||||||
jsr WGAmpersandBeginArguments
|
jsr WGAmpersandBeginArguments
|
||||||
|
|
||||||
|
jsr CHRGOT ; Experimental alternate parameter support
|
||||||
|
cmp #'"'
|
||||||
|
bne WGAmpersand_PRINTint
|
||||||
|
|
||||||
jsr WGAmpersandTempStrArgument
|
jsr WGAmpersandTempStrArgument
|
||||||
stx PARAM0
|
stx PARAM0
|
||||||
sty PARAM1
|
sty PARAM1
|
||||||
@@ -637,6 +641,24 @@ WGAmpersand_PRINT:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
WGAmpersand_PRINTint:
|
||||||
|
; User passed a non-string, so interpret as an ASCII code
|
||||||
|
jsr WGAmpersandIntArgument
|
||||||
|
sta WGAmpersand_PRINTintBuffer
|
||||||
|
jsr WGAmpersandEndArguments
|
||||||
|
|
||||||
|
lda #<WGAmpersand_PRINTintBuffer
|
||||||
|
sta PARAM0
|
||||||
|
lda #>WGAmpersand_PRINTintBuffer
|
||||||
|
sta PARAM1
|
||||||
|
bit WGAmpersand_PRINTrts ; Set overflow
|
||||||
|
jsr WGPrint
|
||||||
|
|
||||||
|
WGAmpersand_PRINTrts:
|
||||||
|
rts
|
||||||
|
|
||||||
|
WGAmpersand_PRINTintBuffer:
|
||||||
|
.byte 0,0
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
; WGAmpersand_SCR
|
; WGAmpersand_SCR
|
||||||
|
14
painting.s
14
painting.s
@@ -130,12 +130,22 @@ WGPlot_done:
|
|||||||
; cursor position. Clips to current view.
|
; cursor position. Clips to current view.
|
||||||
; PARAM0: String pointer, LSB
|
; PARAM0: String pointer, LSB
|
||||||
; PARAM1: String pointer, MSB
|
; PARAM1: String pointer, MSB
|
||||||
|
; V: If set, characters are printed raw with no high bit alterations
|
||||||
; Side effects: Clobbers SA,BASL,BASH
|
; Side effects: Clobbers SA,BASL,BASH
|
||||||
;
|
;
|
||||||
WGPrint:
|
WGPrint:
|
||||||
SAVE_AXY
|
SAVE_AXY
|
||||||
SAVE_ZPS
|
SAVE_ZPS
|
||||||
|
|
||||||
|
lda #%10000000
|
||||||
|
bvc WGPrint_setupMask
|
||||||
|
lda #0
|
||||||
|
clv
|
||||||
|
|
||||||
|
WGPrint_setupMask:
|
||||||
|
sta WGPrint_specialMask
|
||||||
|
|
||||||
|
; Start checking clipping boundaries
|
||||||
lda WG_LOCALCURSORY
|
lda WG_LOCALCURSORY
|
||||||
cmp WG_VIEWCLIP+3
|
cmp WG_VIEWCLIP+3
|
||||||
bcs WGPrint_leapDone ; Entire string is below the clip box
|
bcs WGPrint_leapDone ; Entire string is below the clip box
|
||||||
@@ -220,7 +230,7 @@ WGPrint_visibleChars:
|
|||||||
WGPrint_charLoopNormal:
|
WGPrint_charLoopNormal:
|
||||||
lda (PARAM0),y ; Draw current character
|
lda (PARAM0),y ; Draw current character
|
||||||
beq WGPrint_done
|
beq WGPrint_done
|
||||||
ora #%10000000
|
ora WGPrint_specialMask
|
||||||
jsr WGPlot
|
jsr WGPlot
|
||||||
iny
|
iny
|
||||||
|
|
||||||
@@ -286,3 +296,5 @@ WGPrint_charLoopInversePlot:
|
|||||||
beq WGPrint_endVisible
|
beq WGPrint_endVisible
|
||||||
bra WGPrint_charLoopInverse
|
bra WGPrint_charLoopInverse
|
||||||
|
|
||||||
|
WGPrint_specialMask:
|
||||||
|
.byte 0
|
||||||
|
BIN
weegui.dsk
BIN
weegui.dsk
Binary file not shown.
Reference in New Issue
Block a user