Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 weird opaque coloring
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
beedub




PostPosted: Sun Apr 27, 2003 8:55 am   Post subject: weird opaque coloring

this is my program so far, the problem is, after the [colorback] is set, there is this weird coloring over everything. Here is the coding:
code:
%beginning
procedure CentreFont (s : string, x, y, f, clr : int)
    var w : int := Font.Width (s, f)
    Font.Draw (s, x - w div 2, y, f, clr)
end CentreFont
var announceFont : int := Font.New ("courier:20:bold")
var crazy : string
for t : 16 .. 31
    locate (6, 7)
    color (t)
    put chr (4), " A Ben & Duncan Production", chr (4)
    delay (50)
    locate (8, 12)
    color (t)
end for
delay (200)
color (green)
locate (8, 14)
crazy := "YEE OLD ICE CREAM SHOP!"
for p : 1 .. 23
    put crazy (p) ..
    delay (90)
end for
cls
%sky
drawfillbox (0,0, 640, 400)
% ground
drawfillbox (0, 0, 640, 100, 19)
drawbox (0, 0, 640, 100, grey)
drawfillbox (250, 150, 550, 300, black)
drawbox (250, 150, 550, 300, grey)

%shop
colorback (7)
drawfillbox (200, 50, 600, 350, yellow)
drawbox (200, 50, 600, 350, grey)
drawfillbox (250, 150, 550, 300, black)
drawbox (250, 150, 550, 300, grey)
drawline (200, 350, 210, 355, grey)
drawfill (201, 353, yellow, black)
drawline (590, 360, 610, 360, grey)
drawline (610, 360, 600, 350, grey)
drawline (610, 360, 610, 70, grey)
drawline (610, 70, 600, 50, grey)
drawline (250, 150, 260, 160, grey)
drawline (260, 160, 550, 160, grey)
drawfillbox (590, 350, 210, 390, purple)
drawbox (590, 350, 210, 390, grey)
CentreFont ("B & D ICE CREAM CENTRAL", maxx div 1.6, maxy div 1.1, announceFont, yellow)

% Person
drawfillbox (395, 230, 405, 225, 44)
drawbox (395, 230, 405, 225, grey)
drawfilloval (400, 250, 15, 20, 44)
drawoval (400, 250, 15, 20, grey)
drawfillbox (375, 185, 425, 225, 127)
drawbox (375, 185, 425, 225, grey)
drawfillbox (375, 220, 335, 210, 127)
drawbox (375, 220, 335, 210, grey)
drawfillbox (335, 210, 335, 240, 127)
drawbox (335, 210, 335, 240, grey)
delay (3000)
%question1....asks the user if they want to come to the ice cream shop.
colorback (7)
var ans1 : string
put "Do you want to proceed to the ice cream shop? y/n?"
get ans1
if ans1 = "n" then
    cls
elsif ans1 = "y" then
    cls
    drawfillbox (25, 25, 615, 375, yellow)
else
    cls
    put "invalid answer please press the [x] on the top-right corner of your screen and try again"
end if




see, the probelm might be my computer, but im not sure.
Sponsor
Sponsor
Sponsor
sponsor
beedub




PostPosted: Sun Apr 27, 2003 9:01 am   Post subject: (No subject)

srry... i found out how to do it...
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: