Author Topic: Letter Colour Assign  (Read 208 times)

0 Members and 1 Guest are viewing this topic.

Offline bikemadness

  • Amiga 1200
  • ****
  • Posts: 260
  • Karma: 24
  • Hard players don't go home.
    • View Profile
Letter Colour Assign
« on: July 08, 2018 »
Just something I've wanted to achieve.
An idea I wanted to apply to another program here.

up/down D-Pad to scroll. Surprise on left D-Pad

Code: [Select]
restore wishlist
read list
dim wish$(list)
for a=1 to list
read wish$(a)
next a

restore highlight
read cols
dim letters$(cols)
dim R(cols)
dim G(cols)
dim B(cols)
for c=1 to cols
read letters$(c)
read R(c)
read G(c)
read B(c)
next c

sel=1

open window 640,512
repeat
setdispbuf vm
vm=1-vm
setdrawbuf vm
clear window
letter=0
row=0
c=peek("port1")

if and(c,16)>0 scroll=scroll+15
if and(c,64)>0 scroll=scroll-15
if scroll>0 scroll=0

if and(c,128)<>0 left=1
if left=1 L=L+1
if L>2 L=2
if L=2 left=0
if and(c,128)=0 L=0

if left=1 sel=sel-1
if sel<1 sel=3

for a=1 to list
space=260/len(wish$(a))
if instr(wish$(a),"*",0)=0 then
row=row+1
for b=1 to len(wish$(a))
for c=1 to cols
if mid$(wish$(a),b,1)=letters$(c) then
letter=letter+1
setrgb 1,R(c),G(c),B(c)
endif
next c
if sel=1 text b*10+10,row*15+scroll,mid$(wish$(a),b,1)
if sel=2 text b*10-(len(wish$(a))*10)+260,row*15+scroll,mid$(wish$(a),b,1)
if sel=3 text b*space,row*15+scroll,mid$(wish$(a),b,1)
next b
endif
next a

setrgb 1,256,256,256

text 10,(row+1)*15+scroll,"The "+str$(row)+" listed are the ones I"
text 10,(row+2)*15+scroll,"have of the "+str$(maxnum)+" in my wishlist"
text 10,(row+3)*15+scroll,str$(letter)

until (1=0)

label wishlist
data 94
data "A QUIET PLACE"
data "*ACTS OF VIOLENCE"
data "AMERICAN PASTORAL"
data "ATLANTIC RIM RESURRECTION"
data "AVENGERS INFINITY WAR"
data "*BALLAD OF LEFTY BROWN. THE"
data "*BEAST OF BURDEN"
data "*BLACK PANTHER"
data "*BRAVEN"
data "*BREATHE"
data "BROKEN"
data "*BUTTERFLIES ARE FREE"
data "BUTTERFLY TREE"
data "CALL ME BY YOUR NAME"
data "CHAOS"
data "CHAPPAQUIDDICK"
data "CIRCLE OF TWO"
data "CITY OF GHOSTS"
data "COCAINE GODMOTHER"
data "COLD MOON"
data "COMMANDO"
data "*COMMUTOR. THE"
data "DEVIL IN A BLUE DRESS"
data "*DOCTOR DETROIT"
data "ENDLESS. THE"
data "EVERY DAY"
data "EXCEPTION. THE"
data "*FORGOTTEN. THE"
data "FUNHOUSE. THE"
data "GAME NIGHT"
data "GARAGE SALE MYSTERY"
data "GHOSTHOUSE"
data "GORGEOUS"
data "GRAVE OF THE FIREFLIES"
data "GUARDIAN. THE"
data "GUERNSEY. THE"
data "*GUN SHY"
data "HANGMAN"
data "HERO. THE"
data "HOWARDS END"
data "HUMANITY BUREAU. THE"
data "*HUNTERS PRAYER"
data "I KILL GIANTS"
data "*INSIDIOUS THE LAST KEY"
data "JOURNEY. THE"
data "KNIGHTS OF THE DAMNED"
data "LADY BIRD"
data "LAST FLAG FLYING"
data "LITTLE VAMPIRE. THE"
data "LONDON"
data "*LOOKING GLASS"
data "MARY AND THE WITCHS FLOWER"
data "MARY MAGDALENE"
data "MEAN MACHINE"
data "MECHANIC RESURRECTION"
data "MENASHE"
data "MERCY. THE"
data "MOLLYS GAME"
data "MOM AND DAD"
data "*MONEY TRAIN"
data "*MONSTER FAMILY"
data "MOUNTAIN"
data "MY LIFE WITHOUT ME"
data "*NINE"
data "PACIFIC RIM UPRISING"
data "PETER RABBIT"
data "*PHANTOM THREAD"
data "*PRESSURE"
data "PROUD MARY"
data "RAISING CAIN"
data "RAMPAGE"
data "READY PLAYER ONE"
data "REANIMATOR TRILOGY"
data "RECALL. THE"
data "*RED SPARROW"
data "RENEGADES"
data "RETURN TO MONTAUK"
data "REVOLVER"
data "RUROUNI KENSHIN"
data "RWBY"
data "SAM I BLOOD"
data "SECRET WINDOW"
data "SILENT RUNNING"
data "SINGULARITY"
data "SNOWWHITE A TALE OF TERROR"
data "STOP MAKING SENSE"
data "STRANGERS PREY AT NIGHT. THE"
data "SUICIDE SQUAD HELL TO PAY"
data "TEACHER. THE"
data "TOP GUN"
data "TURN IT UP"
data "TWELVE STRONG"
data "VIEW FROM THE TOP"
data "WEST AND THE RUTHLESS. THE"
data "WILD CARD"
data "WINCHESTER"

label highlight
data 26
data "A",255,125,5
data "B",50,150,50
data "C",175,75,145
data "D",95,30,210
data "E",255,255,5
data "F",150,175,185
data "G",210,115,30
data "H",180,240,165
data "I",255,5,5
data "J",250,70,10
data "K",195,40,10
data "L",100,75,30
data "M",180,180,180
data "N",85,170,225
data "O",5,255,5
data "P",165,105,105
data "Q",230,230,130
data "R",255,200,200
data "S",255,5,255
data "T",80,80,205
data "U",5,5,255
data "V",200,150,35
data "W",240,15,70
data "X",15,15,90
data "Y",65,140,250
data "Z",45,160,85

Have A Yahappy Day.
« Last Edit: July 09, 2018 by bikemadness »
Have a Yahappy day.
I don't know what is wrong with the world - but I know how to fix it.