Computer Science Canada

House Generator!

Author:  Prince Pwn [ Sun Dec 17, 2006 10:34 pm ]
Post subject:  House Generator!

I was bored and made this crummy little program =D

code:

procedure DrawHouse (StartX, StartY, EndX, EndY, Top, Col : int, Door : boolean)
    if Door then
        Draw.FillBox (((StartX + EndX) div 2) - 2, StartY, ((StartX + EndX) div 2) + 2, StartY + 5, brightred)
    end if
    Draw.Box (StartX, StartY, EndX, EndY, Col)
    Draw.Line (StartX, EndY, (StartX + EndX) div 2, EndY + Top, Col)
    Draw.Line (EndX, EndY, (StartX + EndX) div 2, EndY + Top, Col)
    Draw.Line (StartX + 1, EndY, EndX - 1, EndY, white)
end DrawHouse

var x, y : int := 0
var xrad : int := 40
var yrad : int := 10
var border : int := black

loop
    DrawHouse (x, y, x + xrad, y + yrad, yrad, border, true)
    x += xrad
    if x >= maxx then
        x := 0
        y += yrad * 2
    end if
    exit when y >= maxy
end loop

var picID : int := Pic.New (0, 0, maxx, maxy)
Mouse.ButtonChoose ("multibutton")
View.Set ("graphics;offscreenonly")
var mousex, mousey, button : int

loop
    Mouse.Where (mousex, mousey, button)
    Pic.Draw (picID, 0, 0, picCopy)
    if button = 1 then
        Draw.Fill (mousex, mousey, brightgreen, border)
    end if
    View.Update
end loop

Author:  Voltage128 [ Wed Dec 20, 2006 5:06 pm ]
Post subject: 

uhm, whats it supposed to do? i opened it and im not sure what to do with it. If i click something it goes green?

Author:  Prince Pwn [ Tue Dec 26, 2006 8:45 pm ]
Post subject: 

Just a small house generator =D
Doesn't really do anything but I was practicing with patterns and proc's with arguments.

Author:  John-O-McReily [ Thu Apr 19, 2007 7:56 am ]
Post subject:  RE:House Generator!

What the hell is the point of this !!!!!!

Author:  Ultrahex [ Thu Apr 19, 2007 9:41 pm ]
Post subject:  Re: House Generator!

These kind of programs do not need to be posted, it is almost like spam to most administrators on here...

The program does what he programmed it to do, which overall is not that great... (as you said it was crummy)

so ... why did you post crummy stuff, sure you programmed this and you may be proud of it, but you do not need to share with the rest of the world, if the program is useful then maybe i would post it, however it does not seem that way....

sorry for those who may be offended....

Please DON"T post "omfg sooo trippy cool flashes!"

Link above shows that we do not want this stuff on the forum, thanks.


: