Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
lines
#1
(picture creator program)
what inspired me to do this is Pyrokid post
I seriously contemplated whether or not to make this post or not in fear of people thinking im trying to up-stage Pyrokid. i ain't. this started off being a "let's see if i can do this now." with just using arrow keys and such. then it evolved into this.
yule notice a lot of "IF press$ = " this is the only way i know how.
yule also notice i don't uze a lot of SUB's. in fact, i don't uze any subs. i think i regret it now. i never really learned how to use them and i think i'll fix that so my code is less confusing.
things i need to work on is how to save a pic to use in other games. for that's what this whole program is about. ;)
please run this before reading the code. if you want.
now this is no pp256
(it's a little lower on that page) but i like it. onced it's finished of course. ;)
I apologize in advance for the bad spelling in the program. I suck at spelling.

I tried to have a undo command but the thing is that taking a
screen shot takes time and slows down the program. i bet it
would run faster in FB. also i couldn't get the "copy&paste"
thing to work also. what i currently do now to take a screen shot is
i split the screen into 4 chunks and re-place them back in there correct order. what if someone tries to copy the whole screen? that's right.

that's all i can think of for now. try it and tell me what you think
(be kind!!)
EDIT: code update (5/2/05)
another ud: (5/3/05)
they keep coming!: (5/7/05)
finally got around to it: (6/4/05)
[syntax="qbasic"]DECLARE SUB help ()
DECLARE SUB nuepresscolor ()
CLS
press$ = INKEY$
PRINT " During use, press 'h' for help"
COLOR 28
PRINT " MAKE SURE CAPLOCKS IS OFF!!!"
COLOR 15
SLEEP
IF press$ = CHR$(27) THEN END
SCREEN 13
x = 160: y = 100
press$ = INKEY$
DIM ss1(8000)
DIM ss2(8000)
DIM ss3(8000)
DIM ss4(8000)
DIM cb1(8000)
DIM cb2(8000)
DIM cb3(8000)
DIM cb4(8000)
brx = 319
bry = 199
ccb = 1
d = 1
c = d
chc = 15
a$ = "0"
B$ = "1"
c$ = "1"
ch$ = "1"
f$ = "0"
cd = 7
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc



1

DO

press$ = INKEY$

ox = x
oy = y

IF press$ = "o" THEN
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa

GET (0, 0)-(159, 99), ss1
GET (160, 0)-(319, 99), ss2
GET (0, 100)-(159, 199), ss3
GET (160, 100)-(319, 199), ss4
press$ = INKEY$
CLS
PRINT "1) Borders"
PRINT "2) Crosshairs"
PRINT "3) Crosshair color"
PRINT "4) Custom Distance"
PRINT "5) Convert all 0's to 255's"
PRINT "6) Color change"
PRINT "7) Corner the pic"
PRINT "8) Bottom right corner the pic"
PRINT "9) save (not operational)"
PRINT
PRINT "Choose which to modify"
DO
press$ = INKEY$

IF press$ = CHR$(27) THEN
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
IF ch$ = "0" THEN
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa
END IF
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF

GOTO 1
END IF

LOOP UNTIL press$ <> ""
IF press$ = "1" THEN press$ = "borders"
IF press$ = "2" THEN press$ = "crosshairs"
IF press$ = "3" THEN press$ = "crosshair color"
IF press$ = "4" THEN press$ = "Custom Distance"
IF press$ = "5" THEN press$ = "Convert"
IF press$ = "6" THEN press$ = "Color change"
IF press$ = "7" THEN press$ = "Corner"
IF press$ = "8" THEN press$ = "brCorner"
IF press$ = "9" THEN press$ = "save"

PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
IF ch$ = "0" THEN
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa
END IF
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF

END IF

IF press$ = "save" THEN
GOTO 88
CLS
PRINT "bitmap file name:": INPUT ; filename$
CLS
OPEN "pic.bmp" FOR OUTPUT AS #1
FOR iiy = 0 TO bry
FOR iix = 0 TO brx
WRITE #1, col(brx, bry)
NEXT
NEXT
CLOSE #1
CLS
PUT (0, 0), ss1, PSET ' ' '
PUT (160, 0), ss2, PSET ' ' '
PUT (0, 100), ss3, PSET ' ' '
PUT (160, 100), ss4, PSET' ' '
END IF
88

IF press$ = "brCorner" THEN '''''''''''''''''''''''''
bry = 199: brx = 319 '
DO'''''''''''''''''''''''''''''''''''''''''''''' '
126 ' '
press$ = INKEY$ ' '
IF press$ = "q" THEN d = 1 ' '
IF press$ = "w" THEN d = 2 ' '
IF press$ = "e" THEN d = 3 ' '
IF press$ = "r" THEN d = 4 ' '
IF press$ = "t" THEN d = 5 ' '
IF press$ = "y" THEN d = 6 ' '
IF press$ = "u" THEN d = cd ' '
' '
IF press$ = CHR$(0) + "H" THEN bry = bry - d ' '
IF press$ = CHR$(0) + "K" THEN brx = brx - d ' '
IF press$ = CHR$(0) + "M" THEN brx = brx + d ' '
IF press$ = CHR$(0) + "P" THEN bry = bry + d ' '
IF bry >= 200 THEN bry = 200
IF brx >= 320 THEN brx = 320
IF press$ = CHR$(27) THEN '' ' '
PUT (0, 0), ss1, PSET ' ' '
PUT (160, 0), ss2, PSET ' ' '
PUT (0, 100), ss3, PSET ' ' '
PUT (160, 100), ss4, PSET' ' '
IF ch$ = "0" THEN '''' ' ' '
PSET (x, y - 2), ww ' ' ' '
PSET (x + 2, y), dd ' ' ' '
PSET (x - 2, y), xx ' ' ' '
PSET (x, y + 2), aa ' ' ' '
END IF'''''''''''''''' ' ' '
IF ch$ = "1" THEN ''''' ' ' '
PSET (x, y - 2), chc ' ' ' '
PSET (x + 2, y), chc ' ' ' '
PSET (x - 2, y), chc ' ' ' '
PSET (x, y + 2), chc ' ' ' '
END IF''''''''''''''''' ' ' '
GOTO 158 ' ' '
END IF'''''''''''''''''''' ' '
LOOP UNTIL press$ <> ""'''''''''''''''''''''''' '
PUT (0, 0), ss1, PSET '
PUT (160, 0), ss2, PSET '
PUT (0, 100), ss3, PSET '
PUT (160, 100), ss4, PSET '
LINE (-1, -1)-(brx, bry), 1, B '
'
PSET (brx / 2, bry), 4 '
PSET (brx, bry / 2), 4 '
IF press$ = CHR$(13) THEN '
nocor = 1
IF brx >= 319 THEN GOTO 175
LINE (brx + 1, 0)-(319, 199), 23, BF '
175
IF bry >= 199 THEN GOTO 178
LINE (0, bry + 1)-(319, 199), 23, BF '
178
IF x + 2 >= brx THEN
x = brx - 3
ox = x
END IF
IF y + 2 >= bry THEN
y = bry - 3
oy = y
END IF
dd = POINT(x + 2, y)
aa = POINT(x - 2, y)

xx = POINT(x, y + 2)
ww = POINT(x, y - 2)
c$ = "0"
GOTO 158 '
END IF '
GOTO 126 '
END IF'''''''''''''''''''''''''''''''''''''''''''''''
158
IF press$ = "Corner" THEN
IF nocor = 1 THEN
SOUND 307, 2

press$ = ""
GOTO 158
END IF

cy = -1
cx = -1
CLS
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET

FOR yy = 0 TO 199
cy = cy + 1
FOR xx = 0 TO 319
IF POINT(xx, yy) < 255 THEN
yy = 199
xx = 319
END IF
NEXT
NEXT
FOR xx = 0 TO 319
cx = cx + 1
FOR yy = 0 TO 199
IF POINT(xx, yy) < 255 THEN
yy = 199
xx = 319
END IF
NEXT
NEXT


GET (cx, cy)-(cx + 159, cy + 99), ss1
GET (cx + 160, cy + 0)-(cx + 319, cy + 99), ss2
GET (cx + 0, cy + 100)-(cx + 159, cy + 199), ss3
GET (cx + 160, cy + 100)-(cx + 319, cy + 199), ss4
CLS
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
ww = POINT(x, y - 2)
dd = POINT(x + 2, y)
xx = POINT(x - 2, y)
aa = POINT(x, y + 2)

IF ch$ = "0" THEN
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa
END IF
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF

END IF
IF press$ = "Color change" THEN
87
CLS
INPUT "what color you want to be changed"; oc
IF oc < 0 OR oc > 255 THEN
PRINT "pick a # 0-255"
SLEEP 1
GOTO 87
END IF
PRINT
95
INPUT "what color to replace with"; nc
IF nc < 0 OR oc > 255 THEN
PRINT "pick a # 0-255"
SLEEP 1
GOTO 95
END IF
PRINT
INPUT "press 'y' to continue 'n' to cancel"; yon$
IF yon$ = "y" THEN
CLS
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa

FOR yy = 0 TO 199
FOR xx = 0 TO 319
IF POINT(xx, yy) = oc THEN PSET (xx, yy), nc
NEXT: NEXT
END IF
ww = POINT(x, y - 2)
dd = POINT(x + 2, y)
xx = POINT(x - 2, y)
aa = POINT(x, y + 2)

IF ch$ = "0" THEN
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa
END IF
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF
IF yon$ = "n" THEN
140
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
IF ch$ = "0" THEN
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa
END IF
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF
GOTO 1
END IF
IF yon$ = "y" THEN
CLS
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa

FOR yy = 0 TO 199
FOR xx = 0 TO 319
IF POINT(xx, yy) = oc THEN PSET (xx, yy), nc
NEXT: NEXT
END IF
ww = POINT(x, y - 2)
dd = POINT(x + 2, y)
xx = POINT(x - 2, y)
aa = POINT(x, y + 2)

IF ch$ = "0" THEN
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa
END IF
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF

END IF
IF press$ = "Convert" THEN
CLS
COLOR 4: PRINT " are you sure?"
PRINT " this will change all the black(0)"

PRINT " pixels to the magical number of 255"
PRINT " so if you want to change all the"
PRINT " black pixels that are suppose to"
PRINT " be black to another color so they"
PRINT " wont get changed, press 'n' now."
INPUT " else press 'g'"; press$
COLOR 15
IF press$ = "n" THEN
CLS
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
IF ch$ = "0" THEN
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa
END IF
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF

GOTO 1
END IF
IF press$ = "g" THEN
CLS
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET

FOR xx = 0 TO 319
FOR yy = 0 TO 199
IF POINT(xx, yy) = 0 THEN PSET (xx, yy), 255
NEXT: NEXT
GET (0, 0)-(159, 99), ss1
GET (160, 0)-(319, 99), ss2
GET (0, 100)-(159, 199), ss3
GET (160, 100)-(319, 199), ss4

END IF
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
ww = POINT(x, y - 2)
dd = POINT(x + 2, y)
xx = POINT(x - 2, y)
aa = POINT(x, y + 2)
IF ch$ = "0" THEN
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa
END IF
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF

END IF



IF press$ = "borders" THEN
CLS
INPUT "borders: 'on' or 'off' "; booo$
IF booo$ = "on" THEN B$ = "1"
IF booo$ = "off" THEN B$ = "0"
CLS
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
IF B$ = "0" THEN GOTO 157
IF B$ = "1" THEN
IF x > 319 THEN x = 319
IF x < 0 THEN x = 0
IF y > 199 THEN y = 199
IF y < 0 THEN y = 0
END IF
IF ch$ = "0" THEN
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa
END IF
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF

END IF
IF press$ = "crosshairs" THEN
CLS
INPUT "crosshairs: 'on' or 'off' "; chooo$
IF chooo$ = "on" THEN ch$ = "1"

IF chooo$ = "off" THEN ch$ = "0"

CLS
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
IF ch$ = "0" THEN
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa
END IF
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF


END IF
IF press$ = "crosshair color" THEN
CLS
PRINT "New color?"
PRINT "press 'c' to pick a color"
DO
LOCATE 3, 1: PRINT " "
COLOR chc
PRINT " "; chc
press$ = INKEY$
IF press$ = "," OR press$ = "<" THEN
IF chc - 1 > -1 THEN chc = chc - 1
END IF
IF press$ = "." OR press$ = ">" THEN
IF chc + 1 < 256 THEN chc = chc + 1
END IF
LINE (40, 40)-(160, 100), chc, BF
LOOP UNTIL press$ = "c"
COLOR 15
CLS
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
IF ch$ = "0" THEN
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa
END IF
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF
END IF
IF press$ = "Custom Distance" THEN
CLS
INPUT "New Distance "; d
IF d < 1 THEN d = 1
IF d > 6 THEN cd = d
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET

IF ch$ = "0" THEN
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa
END IF
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF




END IF


IF press$ = "u" THEN d = cd
IF press$ = "i" THEN c = POINT(x, y)

GOTO 666
'IF press$ = "c" THEN
GET (0, 0)-(159, 99), ss1
GET (160, 0)-(319, 99), ss2
GET (0, 100)-(159, 199), ss3
GET (160, 100)-(319, 199), ss4
sx = x: sy = y

' DO
press$ = INKEY$
IF press$ = "0" THEN ccb = 0
IF press$ = "1" THEN ccb = 1
IF press$ = "2" THEN ccb = 2
IF press$ = "3" THEN ccb = 3
IF press$ = "4" THEN ccb = 4
IF press$ = "5" THEN ccb = 5
IF press$ = "6" THEN ccb = 6
IF press$ = "7" THEN ccb = 7
IF press$ = "8" THEN ccb = 8
IF press$ = "9" THEN ccb = 9

IF press$ = CHR$(0) + "H" THEN y = y - d
IF press$ = CHR$(0) + "K" THEN x = x - d
IF press$ = CHR$(0) + "M" THEN x = x + d
IF press$ = CHR$(0) + "P" THEN y = y + d
' LOOP UNTIL press$ <> ""
PUT (0, 0), ss1, PSET '16383
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
666
IF press$ = "`" THEN

IF c$ = "1" THEN

IF ch$ = "0" THEN
ach = 1
ch$ = "1"
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc

END IF

c$ = "0"
GOTO 16
END IF


IF c$ = "0" THEN

IF ach = 1 THEN
ch$ = "0"
ach = 0
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa

END IF

c$ = "1"

END IF

16
END IF
IF press$ = "I" THEN
chc = POINT(x, y)
IF ch$ = "0" THEN
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa
END IF
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF

END IF

IF press$ = "h" THEN
GET (0, 0)-(159, 99), ss1
GET (160, 0)-(319, 99), ss2
GET (0, 100)-(159, 199), ss3
GET (160, 100)-(319, 199), ss4
help
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
END IF

IF press$ = "0" THEN c = 0: c$ = "1"
IF press$ = "1" THEN c = 1: c$ = "1"
IF press$ = "2" THEN c = 2: c$ = "1"
IF press$ = "3" THEN c = 3: c$ = "1"
IF press$ = "4" THEN c = 4: c$ = "1"
IF press$ = "5" THEN c = 5: c$ = "1"
IF press$ = "6" THEN c = 6: c$ = "1"
IF press$ = "7" THEN c = 7: c$ = "1"
IF press$ = "8" THEN c = 8: c$ = "1"
IF press$ = "9" THEN c = 9: c$ = "1"


IF press$ = "b" THEN
bx = x: by = y
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa

GET (0, 0)-(159, 99), ss1
GET (160, 0)-(319, 99), ss2
GET (0, 100)-(159, 199), ss3
GET (160, 100)-(319, 199), ss4

stx = x: sty = y

DO
IF f$ = "0" THEN LINE (stx, sty)-(x, y), c, B
IF f$ = "1" THEN LINE (stx, sty)-(x, y), c, BF

SLEEP
IF press$ = "q" THEN d = 1
IF press$ = "w" THEN d = 2
IF press$ = "e" THEN d = 3
IF press$ = "r" THEN d = 4
IF press$ = "t" THEN d = 5
IF press$ = "y" THEN d = 6
IF press$ = "u" THEN d = cd
press$ = INKEY$
IF press$ = "f" THEN
IF f$ = "1" THEN
f$ = "0"
GOTO 179
END IF
IF f$ = "0" THEN f$ = "1"
END IF

179
IF press$ = CHR$(0) + "H" THEN y = y - d
IF press$ = CHR$(0) + "K" THEN x = x - d
IF press$ = CHR$(0) + "M" THEN x = x + d
IF press$ = CHR$(0) + "P" THEN y = y + d


IF B$ = "0" THEN GOTO 182
IF B$ = "1" THEN
IF x >= brx THEN x = brx - 1
IF x < 0 THEN x = 0
IF y >= bry THEN y = bry - 1
IF y < 0 THEN y = 0
END IF

182
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET

IF press$ = "b" THEN
IF f$ = "0" THEN LINE (stx, sty)-(x, y), c, B
IF f$ = "1" THEN LINE (stx, sty)-(x, y), c, BF
stx = x: sty = y
ww = POINT(x, y - 2)
dd = POINT(x + 2, y)
xx = POINT(x - 2, y)
aa = POINT(x, y + 2)
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF
GOTO 1
END IF
IF press$ = "0" THEN c = 0: c$ = "1"
IF press$ = "1" THEN c = 1: c$ = "1"
IF press$ = "2" THEN c = 2: c$ = "1"
IF press$ = "3" THEN c = 3: c$ = "1"
IF press$ = "4" THEN c = 4: c$ = "1"
IF press$ = "5" THEN c = 5: c$ = "1"
IF press$ = "6" THEN c = 6: c$ = "1"
IF press$ = "7" THEN c = 7: c$ = "1"
IF press$ = "8" THEN c = 8: c$ = "1"
IF press$ = "9" THEN c = 9: c$ = "1"
IF press$ = "10" THEN c = 10: c$ = "1"
IF press$ = "11" THEN c = 11: c$ = "1"
IF press$ = "12" THEN c = 12: c$ = "1"
IF press$ = "13" THEN c = 13: c$ = "1"
IF press$ = "14" THEN c = 14: c$ = "1"
IF press$ = "15" THEN c = 15: c$ = "1"







IF press$ = CHR$(27) THEN
x = bx: y = by
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET

press$ = INKEY$
GOTO 227
END IF

LOOP
END IF

227


IF press$ = "l" THEN
lx = x: ly = y
PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa

GET (0, 0)-(159, 99), ss1
GET (160, 0)-(319, 99), ss2
GET (0, 100)-(159, 199), ss3
GET (160, 100)-(319, 199), ss4

stx = x: sty = y

DO
LINE (stx, sty)-(x, y), c
SLEEP
IF press$ = "q" THEN d = 1
IF press$ = "w" THEN d = 2
IF press$ = "e" THEN d = 3
IF press$ = "r" THEN d = 4
IF press$ = "t" THEN d = 5
IF press$ = "y" THEN d = 6
IF press$ = "u" THEN d = cd
press$ = INKEY$

'179
IF press$ = CHR$(0) + "H" THEN y = y - d
IF press$ = CHR$(0) + "K" THEN x = x - d
IF press$ = CHR$(0) + "M" THEN x = x + d
IF press$ = CHR$(0) + "P" THEN y = y + d


IF B$ = "0" THEN GOTO 395
IF B$ = "1" THEN
IF x >= brx THEN x = brx - 1
IF x < 0 THEN x = 0
IF y >= bry THEN y = bry - 1
IF y < 0 THEN y = 0
END IF

395
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET

IF press$ = "l" THEN
LINE (stx, sty)-(x, y), c


ww = POINT(x, y - 2)
dd = POINT(x + 2, y)
xx = POINT(x - 2, y)
aa = POINT(x, y + 2)
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF
GOTO 1
END IF
IF press$ = "0" THEN c = 0: c$ = "1"
IF press$ = "1" THEN c = 1: c$ = "1"
IF press$ = "2" THEN c = 2: c$ = "1"
IF press$ = "3" THEN c = 3: c$ = "1"
IF press$ = "4" THEN c = 4: c$ = "1"
IF press$ = "5" THEN c = 5: c$ = "1"
IF press$ = "6" THEN c = 6: c$ = "1"
IF press$ = "7" THEN c = 7: c$ = "1"
IF press$ = "8" THEN c = 8: c$ = "1"
IF press$ = "9" THEN c = 9: c$ = "1"
IF press$ = "10" THEN c = 10: c$ = "1"
IF press$ = "11" THEN c = 11: c$ = "1"
IF press$ = "12" THEN c = 12: c$ = "1"
IF press$ = "13" THEN c = 13: c$ = "1"
IF press$ = "14" THEN c = 14: c$ = "1"
IF press$ = "15" THEN c = 15: c$ = "1"







IF press$ = CHR$(27) THEN
x = lx: y = ly
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET

press$ = INKEY$
GOTO 452
END IF

LOOP
END IF

452



IF press$ = "-" THEN

GET (0, 0)-(159, 99), ss1
GET (160, 0)-(319, 99), ss2
GET (0, 100)-(159, 199), ss3
GET (160, 100)-(319, 199), ss4
CLS
PRINT "New color?"
PRINT "press 'c' to pick a color"
DO
LOCATE 3, 1: PRINT " "
COLOR c
PRINT " "; c
press$ = INKEY$
IF press$ = "," OR press$ = "<" THEN
IF c - 1 > -1 THEN c = c - 1
END IF
IF press$ = "." OR press$ = ">" THEN
IF c + 1 < 256 THEN c = c + 1
END IF
LINE (40, 40)-(160, 100), c, BF
LOOP UNTIL press$ = "c"
COLOR 15
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET

END IF

t = 0
IF press$ = "q" THEN d = 1
IF press$ = "w" THEN d = 2
IF press$ = "e" THEN d = 3
IF press$ = "r" THEN d = 4
IF press$ = "t" THEN d = 5
IF press$ = "y" THEN d = 6
IF press$ = "p" THEN
GET (0, 0)-(159, 99), ss1
GET (160, 0)-(319, 99), ss2
GET (0, 100)-(159, 199), ss3
GET (160, 100)-(319, 199), ss4

CLS
PRINT "do you really want to clear the screen?"
PRINT "(press 'y' or 'n')"
DO
press$ = INKEY$
IF press$ = "y" THEN
nocor = 0
bry = 199: brx = 319
CLS
ww = 0
dd = 0
xx = 0
aa = 0
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF

GOTO 534
END IF
IF press$ = "n" THEN
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF
GOTO 534
END IF
LOOP
534
press$ = INKEY$
END IF
IF gtp = 1 THEN
ww = POINT(x, y - 2)
dd = POINT(x + 2, y)
xx = POINT(x - 2, y)
aa = POINT(x, y + 2)
gtp = 0
IF ch$ = "1" THEN
PSET (x, y - 2), chc
PSET (x + 2, y), chc
PSET (x - 2, y), chc
PSET (x, y + 2), chc
END IF
END IF
IF press$ = CHR$(0) + "H" THEN

PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa

y = y - d
IF B$ = "0" THEN GOTO 157
IF B$ = "1" THEN
IF x >= brx THEN x = brx - 1
IF x < 0 THEN x = 0
IF y >= bry THEN y = bry - 1
IF y < 0 THEN y = 0
END IF
157
gtp = 1
END IF
IF press$ = CHR$(0) + "K" THEN

PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa

x = x - d
IF B$ = "0" THEN GOTO 176
IF B$ = "1" THEN
IF x >= brx THEN x = brx - 1
IF x < 0 THEN x = 0
IF y >= bry THEN y = bry - 1
IF y < 0 THEN y = 0
END IF
176
gtp = 1
END IF



IF press$ = CHR$(0) + "M" THEN

PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa

x = x + d
IF B$ = "0" THEN GOTO 198
IF B$ = "1" THEN
IF x >= brx THEN x = brx - 1
IF x < 0 THEN x = 0
IF y >= bry THEN y = bry - 1
IF y < 0 THEN y = 0
END IF

198
gtp = 1
END IF



IF press$ = CHR$(0) + "P" THEN

PSET (x, y - 2), ww
PSET (x + 2, y), dd
PSET (x - 2, y), xx
PSET (x, y + 2), aa

y = y + d
IF B$ = "0" THEN GOTO 243
IF B$ = "1" THEN
IF x >= brx THEN x = brx - 1
IF x < 0 THEN x = 0
IF y >= bry THEN y = bry - 1
IF y < 0 THEN y = 0
END IF
243
gtp = 1
END IF
IF press$ = CHR$(27) THEN '''''''''''''''''''''''''''
GET (0, 0)-(159, 99), ss1 '
GET (160, 0)-(319, 99), ss2 '
GET (0, 100)-(159, 199), ss3 '
GET (160, 100)-(319, 199), ss4 '
CLS '
PRINT "Are you sure you want to exit? (y) (n)" '
DO''''''''''''''''''''''''''''''' '
press$ = INKEY$ ' '
IF press$ = "y" THEN ' ' '
GOTO 1150 ' ' '
END IF'''''''''''''''' ' '
' '
IF press$ = "n" THEN ''''''' ' '
PUT (0, 0), ss1, PSET ' ' '
PUT (160, 0), ss2, PSET ' ' '
PUT (0, 100), ss3, PSET ' ' '
PUT (160, 100), ss4, PSET ' ' '
IF ch$ = "0" THEN ''''' ' ' '
PSET (x, y - 2), ww ' ' ' '
PSET (x + 2, y), dd ' ' ' '
PSET (x - 2, y), xx ' ' ' '
PSET (x, y + 2), aa ' ' ' '
END IF''''''''''''''''' ' ' '
IF ch$ = "1" THEN ''''' ' ' '
PSET (x, y - 2), chc ' ' ' '
PSET (x + 2, y), chc ' ' ' '
PSET (x - 2, y), chc ' ' ' '
PSET (x, y + 2), chc ' ' ' '
END IF''''''''''''''''' ' ' '
GOTO 49 ' ' '
END IF ''''''''''''''''''''' ' '
' '
' '
LOOP''''''''''''''''''''''''''''''' '
END IF'''''''''''''''''''''''''''''''''''''''''''''''
49

IF press$ = "=" THEN

GET (0, 0)-(159, 99), ss1
GET (160, 0)-(319, 99), ss2
GET (0, 100)-(159, 199), ss3
GET (160, 100)-(319, 199), ss4
CLS
black = 0
COLOR c
IF c = 0 THEN
COLOR 15
black = 1
END IF
IF d = 1 THEN PRINT "Distance = 1 (ooooooooooooooooo)"
IF d = 2 THEN PRINT "Distance = 2 (o-o-o-o-o-o-o-o-o)"
IF d = 3 THEN PRINT "Distance = 3 (o--o--o--o--o--o--o)"
IF d = 4 THEN PRINT "Distance = 4 (o---o---o---o---o)"
IF d = 5 THEN PRINT "Distance = 5 (o----o----o----o----o)"
IF d = 6 THEN PRINT "Distance = 6 (o-----o-----o-----o)"
IF d > 6 THEN PRINT "the distance is custom ("; d; ")"
PRINT
IF B$ = "1" THEN PRINT "The borders are on"
IF B$ = "0" THEN PRINT "The borders are off"
PRINT
IF a$ = "1" THEN PRINT "The lines are dotted"
IF a$ = "0" THEN PRINT "The lines are solid"
PRINT
IF black = 1 THEN
PRINT "the color is black"
PRINT
END IF

COLOR 15
PRINT "press any key to return"
SLEEP
PUT (0, 0), ss1, PSET
PUT (160, 0), ss2, PSET
PUT (0, 100), ss3, PSET
PUT (160, 100), ss4, PSET
press$ = INKEY$
END IF



IF press$ = "z" THEN a$ = "1"
IF press$ = "x" THEN a$ = "0"
IF c$ = "1" THEN
IF a$ = "1" THEN PSET (x, y), c
IF a$ = "0" THEN LINE (ox, oy)-(x, y), c
END IF
FOR i = 0 TO 9: NEXT
LOOP
1150

SUB help

SCREEN 12
DO
112
CLS
PRINT "1) Lines"
PRINT "2) Color"
PRINT "3) Box"
PRINT "4) Cross-Hairs"
PRINT "5) Invisable lines"
PRINT "6) Clear The Screen"
PRINT "7) Iye Drop tool"
PRINT "8) Actul lines"
PRINT "9) Line formating"
PRINT "10) Custom line distances"
PRINT "11) Coverting 0's to 255's"
PRINT "12) Changing colors"
PRINT "13) Corner the Pic"
PRINT "(enter 14 to exit)"
INPUT "Choose one to learn more"; hl
CLS

IF hl = 13 THEN
PRINT "what 'corner the pic' means is that it moves whatever you"
PRINT "drew gets put in the top left corner. this is so you do"
PRINT "not have to draw with restrictions. note: you MUST 255 the 0"
PRINT "before preceding. Nice little errors result otherwise."
COLOR 4
PRINT " PRESS ANY KEY": COLOR 15
SLEEP
GOTO 112
END IF

IF hl = 19 THEN
PRINT "way to guess a number or just read the code. Shame on you"
COLOR 4
PRINT " PRESS ANY KEY": COLOR 15
FOR ii = 700 TO 37 STEP -1
press$ = INKEY$
SOUND ii, .25
IF press$ <> "" THEN GOTO 535
NEXT
535

GOTO 112
END IF


IF hl = 12 THEN
PRINT "what this does is if a certain specified color is found"
PRINT "it replaces it with another certain color. for example,"
PRINT "if I tell it to replace any red pixel with a blue one,"
PRINT "ittle do it :P"
COLOR 4
PRINT " PRESS ANY KEY": COLOR 15
SLEEP
GOTO 112
END IF


IF hl = 11 THEN
PRINT "I read some where that in a picture that if a pixel has a"
PRINT "value of 255 it gets over looked and not 'PSET'ed or what"
PRINT "ever. you can make what you want of it."
COLOR 4
PRINT " PRESS ANY KEY": COLOR 15
SLEEP
GOTO 112
END IF


IF hl = 10 THEN
PRINT "When you create a CD (Custom Distance) > 6 then while you are"
PRINT "drawling, if you"
PRINT "change back to one of the pre-set distances (1-6)(q-y); just "
PRINT "press 'u' to return back to your last CD"
PRINT "for example: if i create a CD of 10 and draw with that for a"
PRINT "bit and i change to a D of 3 them if i want to change back to"
PRINT "10 i just press 'u'. It's usful if you want to make a little "
PRINT "change without going thru the options menu again."
COLOR 4
PRINT " PRESS ANY KEY": COLOR 15
SLEEP
GOTO 112
END IF


IF hl = 1 THEN
PRINT " LINES"
PRINT "To make lines dotted, press the"
PRINT "'z' key. To make the line segments solid, press the 'x' "
PRINT "key. Hard to explan, you'll understand when you see it."
PRINT "Also, the numbers that you press corraspond to their colors"
PRINT "(red = 4; blue = 1). to change the distance of the lines,"
PRINT "press keys 'q' - 'y'. 'y' being 6 and 'q' being one."
PRINT "again, you'll have to see it to get a better understanding."
COLOR 4
PRINT " PRESS ANY KEY": COLOR 15
SLEEP
GOTO 112
END IF
IF hl = 3 THEN
PRINT "To draw a box; use the arrow keys to move to the starting"
PRINT "point, press 'b' to start the box (you don't need to hold"
PRINT "the button down) move to the disired location and press 'b'"
PRINT "again to draw the box. press 'Esc' to cancel drawing the"
PRINT "box. the color of the box corrasponds to the color or the"
PRINT "lines. to fill the box; while shaping the box press the "
PRINT "'f' button. you are still able to change 'distance' during."
COLOR 4
PRINT " PRESS ANY KEY": COLOR 15
SLEEP
GOTO 112

END IF

IF hl = 8 THEN
PRINT "To draw a line; use the arrow keys to move to the starting"
PRINT "point, press 'l' to start the line (you don't need to hold"
PRINT "the button down) move to the disired location and press 'l'"
PRINT "again to draw the line. press 'Esc' to cancel drawing the"
PRINT "line. the color of the line corrasponds to the color of the"
PRINT "lines. you are still able to change 'distance' during."
COLOR 4
PRINT " PRESS ANY KEY": COLOR 15
SLEEP
GOTO 112

END IF


IF hl = 4 THEN
PRINT "To turn the crosshairs on/off: during play, press the 'o'"
PRINT "button. then enter 2. type 'on' or 'off'. to change the color"
PRINT "of the crosshairs, do the same as above, exept press 3."
COLOR 4
PRINT " PRESS ANY KEY": COLOR 15
SLEEP
GOTO 112

END IF

IF hl = 2 THEN
PRINT "To chose a different color press '-'."
PRINT "use the '<' and '>' keys to sift through different colors"
PRINT "(or use the ',' and '.' keys if you don't feel like holding"
PRINT "down the shift key ;*)"
COLOR 4
PRINT " PRESS ANY KEY": COLOR 15
SLEEP
GOTO 112

END IF

IF hl = 5 THEN
PRINT "to turn on invisable line press the '`' key (it's the one just"
PRINT "left of the 1 key) in this mode you can move around freely"
PRINT "with out destroying your current background. "
COLOR 4
PRINT " PRESS ANY KEY": COLOR 15
SLEEP
GOTO 112

END IF

IF hl = 6 THEN
PRINT "if you want to clear the screen then press 'p'. a warning message"
PRINT "will apper. press'y' or 'n'."
COLOR 4
PRINT " PRESS ANY KEY": COLOR 15
SLEEP
GOTO 112
END IF
IF hl = 7 THEN
PRINT "the iye dropper tool is simple. i stole the idea and name from"
PRINT "MS Paint. how it works is when in invisable lines mode, move"
PRINT "over a pixel and press 'i'. and the current color is whatever"
PRINT "that pixel was. usful if you forget what a certain color is"
COLOR 4
PRINT " PRESS ANY KEY": COLOR 15
SLEEP
GOTO 112

END IF
IF hl = 9 THEN
PRINT "press '=' to see what kind of lines you are currently drawing with"
COLOR 4
PRINT " PRESS ANY KEY": COLOR 15
SLEEP
GOTO 112
END IF
press$ = INKEY$
LOOP UNTIL hl = 14

SCREEN 13


END SUB


[/syntax]
quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
Reply
#2
nice job man i tried it out... take it to the next level, add mouse support / saving and anything else you can think of.

does what it does well though =) i liked the description for the 'iye' dropper tool hahahaha. that was classic 8)

Quote: PRINT "the iye dropper tool is simple. i stole the idea and name from"
PRINT "MS Paint.
Reply
#3
nice although if you want to save your eather gonna hafta use FB of use screen 13 cause arrarys cant get that big. the one that i got that was the simplest way i could think of.

Very nice though if i had some more interest with mine i prolly couldve added some of the nice features you got there. :lol:
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Reply
#4
its slower of course, but if you wanted to you could read one line of pixels into a "string * 1" array and write one line at a time into the file =)
Reply
#5
thanks, i would love to implicate somesort of save/load system but i do not know how to. i mean i probley could but it might not be compatible with other peopls programs. and the mouse i have no clue. and i have the problem with clipboard.
btw i updated my code.
i can't seem to get FB to work correctly. QBasic barely works for me. :-?
quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
Reply
#6
your prog as it is compiles under fb, barring one single change

Code:
chr$(0)

becomes

Code:
chr$(255)


all fall down before the glory of fb!!!
Reply
#7
i mean more like that i can't even get fb to run!
quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
Reply
#8
hehe... fb isnt a thing like qb to edit progs, fb only turns your ".bas" into ".exe" ... so, what you must do is either 1.) get FBIde, install it, set it up, and use it to send your files to fbc.exe or, go on the command prompt, go in the path fb is in, then type "fbc c:\the\path\of\your\prog.bas" and it will make an exe for you =) you can also edit autoexec.bat and add the directory where fb is located onto the path variable, then you wont even have to get in fb's directory to use it from the command line.







p.s. WE NEED A STICKY ABOUT THIS PEOPLE!!! seriously.
Reply
#9
Try this...

http://prdownloads.sourceforge.net/fbide...e?download

It's got the IDE included. It's alot easier to get started wth. Wink
Reply
#10
i should probley figure out how to save/load pics. (not the whole screen of course) so that it could be used in other peoples programs. i tryed to steal Pyrokids' code to do that, but i just got confused. i guess i'll try again. Smile
quote="whitetiger0990"]whitetiger is.. WHITE POWER!!! [/quote]
Here
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)