log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- Announcing the TIB 2024 Advent Calendar (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- RISCOSbits releases a new laptop solution (News:)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
- RISC OS London Show Report 2024 (News:1)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: Big text
 
  Big text
  Revin Kevin (15:31 12/12/2002)
  rich (15:44 12/12/2002)
  rich (15:54 12/12/2002)
    Revin Kevin (18:19 12/12/2002)
  Loris (15:58 12/12/2002)
 
Kevin Wells Message #26901, posted by Revin Kevin at 15:31, 12/12/2002
Member
Posts: 644
How do you create a large text in bssic?

Thanks
________
I did not do it.
  ^[ Log in to reply ]
 
Richard Goodwin Message #26910, posted by rich at 15:44, 12/12/2002, in reply to message #26901
Rich
Dictator for life
Posts: 6828
For what? Would outline fonts be okay?
________
RichGCheers,
Rich.
  ^[ Log in to reply ]
 
Richard Goodwin Message #26919, posted by rich at 15:54, 12/12/2002, in reply to message #26901
Rich
Dictator for life
Posts: 6828
printy$="X"
SYS"Font_FindFont",,"Homerton.Bold"+CHR$(0),300*16,300*16,90,90 TO handle%
SYS"Font_SetFontColours",handle%,15,0,14
SYS"Font_Paint",handle%,printy$,%10010,400,400
SYS"Font_LoseFont",handle%

Should print a 300 point X in Homerton Bold at around 400,400 in colour 15 on a colour 0 background - on a MODE 20 greyscale screen it looks suitably large :) I'll leave it as an excercise for the reader to modify it to do something sensible.

[edit]

OK, something not sensible:
http://www.iconbar.com/programming/tea.bas
(set type to BASIC)
:)
________
RichGCheers,
Rich.
  ^[ Log in to reply ]
 
Tony Haines Message #26920, posted by Loris at 15:58, 12/12/2002, in reply to message #26901
madbanHa ha, me mine, mwahahahaha
Posts: 1025
Do you mean text in a large font or a large amount of data? I assume you mean the former, and also that you meant BASIC.

There are several ways.
There is IIRC a VDU command to draw text at double height. Then you need to print the text twice because it only draws half at a time. I don't remember the details, but it works quite well and you can even colour the top and bottom half of the text different colours.
In fact I think there may be another VDU call which will let you draw text in any size. It does get a bit blocky at larger sizes though because it uses the 8*8 character bitmaps.
You could use an anti-aliased font, with the appropriate SYS calls. These look really nice but you need to set things up correctly. I've not done this but it is certainly possible.
You could design your own characters using data statements and BASIC's draw commands (ie MOVE x,y DRAW x,y FILL x,y. Give each different command you implement a different type then store type,x,y[,...] Load these characters into an array at initialisation, and write a procedure to plot the text. (I've done this before.)
Or you could design a set of sprites which have one character each, then load the spritefile and plot them using SYS"OS_SpriteOp" calls.
Or something else I've not thought of...
  ^[ Log in to reply ]
 
Kevin Wells Message #26960, posted by Revin Kevin at 18:19, 12/12/2002, in reply to message #26919
Member
Posts: 644
printy$="X"
SYS"Font_FindFont",,"Homerton.Bold"+CHR$(0),300*16,300*16,90,90 TO handle%
SYS"Font_SetFontColours",handle%,15,0,14
SYS"Font_Paint",handle%,printy$,%10010,400,400
SYS"Font_LoseFont",handle%

Should print a 300 point X in Homerton Bold at around 400,400 in colour 15 on a colour 0 background - on a MODE 20 greyscale screen it looks suitably large :) I'll leave it as an excercise for the reader to modify it to do something sensible.

[edit]

OK, something not sensible:
http://www.iconbar.com/programming/tea.bas
(set type to BASIC)
:)
Thaks that was perfect.
:) :)
________
I did not do it.
  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: Big text