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

Username:   Password: 
 RegisterRegister   
 Process help (again)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
BRENDON, CREIGHTON




PostPosted: Sun May 03, 2009 9:47 am   Post subject: Process help (again)

I want to enable my procs 1,3 to go right any ideas?

Turing:
%draw procs
proc drawObject1 (z, w : int)
    drawfillbox  (500 + z, 260 + w, 505 +z, 50 +w,yellow)

drawfilloval (500 + z, 270 + w, 10, 10, yellow)
drawfilloval (500 + z, 260 + w, 20, 10, grey)
end drawObject1

proc drawObject2 (z, w : int)
    drawfilloval(105 + (z + 2), 370 +(z + 2), 10, 10, grey)
end drawObject2

proc drawObject3 (z, w : int)
    drawoval (496 + z, 30 + w, 6, 4, white)
    drawline (495 + z, 25 + w, 495 + z, 18 + w, white)
    drawline (495 + z, 23 + w, 506 + z, 22 + w, white)
    drawline (495 + z, 23 + w, 506 + z, 22 + w, white)
    drawline (495 + z, 18 + w, 501 + z, 10 + w, white)
    drawline (495 + z, 18 + w, 486 + z, 10 + w, white)

end drawObject3

%use a buffer so it doesn't flicker like mad
setscreen ("offscreenonly")
var z, w := 0
loop
    %wipe screen
    drawfillbox (400, 50, 700, 280, black)
     drawfillbox (70, 400, 150, 600, black)
      drawfillbox (450, 0, 700, 50, white)


    z += 1
    w += 1
    if (z > maxx) then
        z := 0
    end if
    if (w > maxy) then
        w := 0
    end if

    %draw them in sequence
    drawObject1 (z, w)
    drawObject2 (z - z div 2, w + w div 4)
    drawObject3 (z + z div 4, w - w div 2)

    %view.update
    View.Update
end loop



Mod Edit: Remember to use syntax tags!
code:
[syntax="turing"]Code Here[/syntax]
Sponsor
Sponsor
Sponsor
sponsor
Dusk Eagle




PostPosted: Sun May 03, 2009 12:07 pm   Post subject: Re: Process help (again)

Unfortunately your question makes no sense. Please elaborate, in formal English, on exactly what you need help with.
BRENDON, CREIGHTON




PostPosted: Sun May 03, 2009 12:39 pm   Post subject: Re: Process help (again)

i need for my procs to move to the right, rather then their current diangle form.
Tony




PostPosted: Sun May 03, 2009 12:57 pm   Post subject: RE:Process help (again)

can you describe what makes the objects move along a diagonal?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
BRENDON, CREIGHTON




PostPosted: Sun May 03, 2009 1:09 pm   Post subject: Re: Process help (again)

no thats why im here Laughing
BRENDON, CREIGHTON




PostPosted: Sun May 03, 2009 1:09 pm   Post subject: Re: Process help (again)

but dont worry im fine now i tweaked the program so everythings on an angle lol
Tony




PostPosted: Sun May 03, 2009 1:31 pm   Post subject: Re: Process help (again)

BRENDON, CREIGHTON @ Sun May 03, 2009 1:09 pm wrote:
no thats why im here Laughing

I strongly suggest that you don't simply take someone else's code.

Also
code:

%view.update
View.Update
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
BRENDON, CREIGHTON




PostPosted: Sun May 03, 2009 2:52 pm   Post subject: Re: Process help (again)

its my code, but some1 one the forms gave me a template so i filled it in. but thats irrelenvent cause i fixed the issue
Sponsor
Sponsor
Sponsor
sponsor
Euphoracle




PostPosted: Mon May 04, 2009 10:16 am   Post subject: RE:Process help (again)

http://compsci.ca/v3/viewtopic.php?t=20917&highlight=drawobject1

The purpose of that code was to show you an example of how you can achieve the end result. It was not for you to copy and ask more questions to get it to do what you want >.>

Also the quirky comments are present for that very reason.

EDIT: Also, lol, you change "x" to "z" and "y" to "w"
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  [ 9 Posts ]
Jump to:   


Style:  
Search: