I have had this same problem more, with the feedback effect. This is also that effect, like everything is blurring 'towards' you.
I know the problem is in the drawer, but I don't know where. When I used a line instead of this weird 1-dimensional plasma it worked great.
BTW Dont get me wrong, I dont ask you to solve this, but I would find it nice if you try if you can compile it or that the same thing happens(Illegal function call)...
Thnx already,
Codemss
Code:
Code: Select all
DECLARE SUB gradient (startcolour%, red1%, blue1%, green1%, endcolour%, red2%, blue2%, green2%)
CLS
SCREEN 13
DEFINT A-Z
CONST scale = .93
REM $DYNAMIC
gradient 0, 0, 0, 0, 31, 63, 0, 0
gradient 32, 63, 0, 0, 63, 0, 63, 0
gradient 64, 0, 63, 0, 91, 0, 0, 63
gradient 92, 0, 0, 63, 123, 63, 63, 0
gradient 124, 63, 63, 0, 155, 0, 63, 63
gradient 156, 0, 63, 63, 187, 63, 0, 63
gradient 188, 63, 0, 63, 255, 63, 63, 63
COLOR 255
CONST i = 15
DIM sin1(319 + 283)
FOR s = 0 TO 319 + 283
sin1(s) = 25 + SIN(s / 45) * i
NEXT
DIM sin2(319 + 94)
FOR s = 0 TO 319 + 94
sin2(s) = 25 + SIN(s / 15) * i
NEXT
DIM sin3(319 + 157)
FOR s = 0 TO 319 + 157
sin3(s) = 25 + SIN(s / 25) * i
NEXT
DIM sin4(-220 TO 319)
FOR s = -220 TO 319
sin4(s) = 25 + SIN(s / 35) * i
NEXT
DIM lutx(319), luty(319)
FOR x = 0 TO 319
lutx(x) = (x - 160) * scale + 160
NEXT
FOR y = 0 TO 199
luty(y) = (y - 100) * scale + 100
NEXT
DIM mul320(199) AS LONG
FOR y = 0 TO 199
mul320(y) = 320& * y
NEXT
DIM div(5 * 255)
FOR c = 0 TO 5 * 255
div(c) = c / 5 - 1
IF div(c) <0> 255 THEN div(c) = 255
NEXT
DIM b1(32001), b2(32001)
GET (0, 0)-(319, 199), b1(0)
seg1 = VARSEG(b1(0)): segment = seg1
GET (0, 0)-(319, 199), b2(0)
seg2 = VARSEG(b2(0))
DIM lut(319)
DO UNTIL LEN(INKEY$)
DEF SEG = seg1
c1 = c1 + 1
IF c1 >= 283 THEN c1 = 0
c2 = c2 + 2
IF c2 >= 94 THEN c2 = 0
c3 = c3 + 3
IF c3 >= 157 THEN c3 = 0
c4 = c4 + 2
IF c4 >= 220 THEN c4 = 0
REM the problem must be here somewhere
FOR x = 1 TO 318
h = sin1(x + c1) + sin2(x + c2) + sin3(x + c3) + sin4(x - c4)
y = 199 - h
IF y > 1 AND y < 199 THEN POKE x + 4 + mul320(y), 255
NEXT
yp = 0
FOR y = 0 TO 199
DEF SEG = seg1
FOR x = 0 TO 319
lut(x) = PEEK(mul320(luty(y)) + lutx(x) + 4)
NEXT
DEF SEG = 1& * seg2 + yp
FOR x = 0 TO 319
POKE x + 4, lut(x)
NEXT
yp = yp + 20
NEXT
p& = 325
DEF SEG = seg2
FOR y = 1 TO 198
FOR x = 1 TO 318
POKE p&, div(PEEK(p& - 320) + PEEK(p& - 1) + PEEK(p&) + PEEK(p& + 1) + PEEK(p& + 320))
p& = p& + 1
NEXT
p& = p& + 2
NEXT
IF segment = seg1 THEN PUT (0, 0), b1(0), PSET ELSE PUT (0, 0), b2(0), PSET
SWAP seg1, seg2
LOOP
DEF SEG
SUB gradient (startcolour%, red1%, blue1%, green1%, endcolour%, red2%, blue2%, green2%)
Steps% = endcolour% - startcolour% + 1
Redstep! = (red2% - red1%) / Steps%
Bluestep! = (blue2% - blue1%) / Steps%
Greenstep! = (green2% - green1%) / Steps%
FOR ii% = startcolour% TO endcolour%
OUT &H3C8, ii%
OUT &H3C9, CINT(j% * Redstep!) + red1%
OUT &H3C9, CINT(j% * Bluestep!) + blue1%
OUT &H3C9, CINT(j% * Greenstep!) + green1%
j% = j% + 1
NEXT ii%
END SUB