TGC Codebase Backup



LCD Writer 2 by Richard Davey

29th Sep 2003 14:07
Summary

An updated version of my LCD text writer, now reads from a data statement for handling multiple-lines.



Description



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    `	------------------------------------------------------------------------
`	Console Text Writer Version 2             DarkForge Snippet (12/12/2000)
`	------------------------------------------------------------------------
`	An updated version of my LCD text writer, now reads from a data statement
`	for handling multiple-lines.

sync rate 0
sync on
hide mouse

ink rgb(0,255,0),0
box 0,0,8,11
get image 1,0,0,8,11

set text font "Courier"

read rich$

x = len(rich$) : a = 1 : i = 0 : s = 16 : b = 0

cls

do

	repeat
		
		sprite 1,s,b,1
		set cursor a*8,b
		a$ = mid$(rich$, a)
		
		repeat
	
			ink rgb(0,i,0),0
			text (a-1)*8,b,a$
			inc i,35
			sync
		
		until i=>255
	
		inc a
		inc s,8
		i=0
		
	until a=x+1

	read rich$
	x = len(rich$)
	inc b,12
	a = 1
	s = 16

	if rich$="#"
		wait key
		end
	endif

loop


lcdtext:

	data "-----------------"
	data "LCD Text Writer 2"
	data "-----------------"
	data "                 "
	data "Welcome to the LCD text writer demo version 2"
	data "Developed one stormy night in December 2000"
	data "New version released by request to handle multiple lines!"
	data "                  "
	data "Code by Richard Davey (rich@darkforge.co.uk)"
	data "Visit the web site for stacks more free DarkBASIC source code"
	data "                  "
	data "******     *******"
	data "***   **   ***    "
	data "***   **   *****  "
	data "***   **   ****   "
	data "*******    ***    "
	data "                   "
	data "www.darkforge.co.uk"
	data "                   "
	data "#"