mIRC Home    About    Download    Register    News    Help

Print Thread
#90996 19/07/04 04:08 PM
Joined: Aug 2003
Posts: 72
V
visionz Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Aug 2003
Posts: 72
Hello, I think there is a bug with drawfill

Try this
As soon as you click on the White Box, it drawfill the White Box area ONE TIME, and it become slowwww as hell (take a look at the FPS).

Anyone know something about that?

Btw, here is the code, //showbug to run it
Code:
alias showbug {
  if ($window(@bug)) window -c @bug
  if ($window(@buf)) window -c @buf  
  window -dfop @bug 0 0 400 400
  window -hp @buf 0 0 500 500
  drawtext -r @bug 255 arial 20 50 50 loading..
  var %y = 0
  while (%y < 400) {
    var %x = 0 
    while (%x < 400) { 
      drawrect -nrf @buf $rgb($r(0,%y),0,$calc($sin($calc(%x * 10)) * 255))) 1 %x %y 10 10 
      inc %x 5 
    }
    inc %y 5
  }
  set %bug.fps 0
  set %obj.x 200
  set %obj.y 200
  set %obj.s 10
  set %obj.p 0
  set %obj.plt $ticks
  .timer -h 1 0 bugloop

}


alias bugloop {
  var %i = 1, %col = 0, %ticks = $ticks
  while (%i < 10) {
    drawcopy -n @buf 0 0 400 400 @bug 0 0 400 400
    var %y = 0
    while (%y < 400) {
      drawcopy -nr @bug 0 %y 400 5 @bug $calc($sin($calc(%y * %obj.p)) * 5) %y 400 5
      inc %y 5
    }
    var %s = 40
    drawcopy -nr @bug 0 0 400 200 @bug 0 400 400 -200

    drawtext -nor @bug 0 arial %s 54 98 Da drawfill bug
    drawtext -nor @bug 16777215 arial %s 56 100 Da drawfill bug
    drawtext -nor @bug 123 arial %s 58 102 Da drawfill bug
    drawrect -nrif @bug 0 1 150 150 100 30
    drawrect -nrf @bug 16777215 1 150 180 100 70
    drawrect -nr @bug 0 5 150 150 100 100

    drawtext -nr @bug 0 arial 10 158 155 Click on the white 
    drawtext -nr @bug 0 arial 10 162 165 box to drawfill it
    drawline -nr @bug 0 5 150 180 250 180
    drawtext -nor @bug 255 arial 12 0 0 $int(%bug.fps) fps

    drawdot @bug
    inc %obj.s .9
    inc %i
  }
  if ($calc($ticks - %obj.plt) > 1) {
    set %obj.plt $ticks
    inc %obj.p 10
    set %obj.p $calc(%obj.p % 40)
  }
  set %bug.fps $calc(1000 / (($ticks - %ticks) / 10))
  .timer -h 1 0 bugloop
}

menu @bug {
  sclick {
    if ($inrect($mouse.x,$mouse.y,155,185,90,60)) {
      drawfill -r @bug $rgb(255,0,255) 0  $mouse.x $mouse.y
    }
  }
}



#90997 20/07/04 02:22 AM
Joined: Aug 2003
Posts: 72
V
visionz Offline OP
Babel fish
OP Offline
Babel fish
V
Joined: Aug 2003
Posts: 72
Someone else on picwin.tk noticed this too


Link Copied to Clipboard