mIRC Home    About    Download    Register    News    Help

Print Thread
Drawscroll and multiple co-ordinates #143676 27/02/06 12:25 AM
Joined: Jun 2003
Posts: 9
S
StanZ Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Jun 2003
Posts: 9
There's maybe a bug when you use multiple co-ordinates vertical drawscroll.
Like if the first value of X was repeated.
(Modify the script for individual commands)

Code:
; /test to run

alias test {
  ;
  ; Centered 640*480 picture window
  window -CpdofB @a 0 0 640 480
  ;
  ; Draw a black background
  drawdot -nr @a 0 999 0 0
  ;
  ;
  ;
  ;
  ; 1) Red text for the HORIZONTAL scroller
  drawtext -nor @a 255 tahoma 230 0 -40 MIRC
  ; ### Multiple co-ordinates drawscroll (Horizontal)
  drawscroll -n @a 10 0  0 0 480 50     20 0  0 50 480 50    30 0  0 100 480 50   40 0  0 150 480 50
  ;
  ; 2) Blue text for the VERTICAL scroller
  drawtext -nor @a 16737280 tahoma 230 0 200 MIRC
  ; Replace 0 by 1 in case you want to test without multiple values.
  if (0) {
    drawscroll -n @a 0 10  0 200 50 640
    drawscroll -n @a 0 20  50 200 50 640
    drawscroll -n @a 0 30  100 200 50 640
    drawscroll -n @a 0 40  150 200 50 640
    drawscroll -n @a 0 50  200 200 50 640
  }
  ; ### Multiple co-ordinates drawscroll (Vertical)
  else {
    drawscroll -n @a 0 10  0 200 50 640   0 20  50 200 50 640    0 30  100 200 50 640   0 40  150 200 50 640   0 50  200 200 50 640
  }
  ;
  ;
  ;
  ;
  ; Just visuals
  drawtext -nr @a 65280 tahoma 20 0 0 Vertical drawscroll
  drawtext -nr @a 65280 tahoma 20 0 240 Horizontal drawscroll
  ;
  ; Redraw
  drawdot @a
  ;
}





Of course it's less a problem than the new timer instruction.
The timer "loop per second" rate is no more 64 (and rarely 100) under windows XP. (with a lot of version of mirc, even old one) Now it's the half, 32.
One could use an "external timer" instruction (timer 0 0 alias) but it's a bit annoying. It would be great if there was a new flag for the new orderer timer.
Thanks for reading smile

Code:
; /a  6.17 should be 32 (XP) and 64 with other version of mirc
alias a {
inc %1
if $calc($ticks -%2) > 999 { %3 = %1 | %1 = 0 | %2 = $ticks | echo -a %3 }
.timer 1 0 a
}

Last edited by StanZ; 27/02/06 02:03 AM.
Re: Drawscroll and multiple co-ordinates #143677 27/02/06 02:30 AM
Joined: Jun 2003
Posts: 9
S
StanZ Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Jun 2003
Posts: 9
Confusion, swap vertical <-> horizontal

Code:
; /test to run

alias test {
  ;
  ; Centered 640*480 picture window
  window -CpdofB @a 0 0 640 480
  ;
  ; Draw a black background
  drawdot -nr @a 0 999 0 0
  ;
  ;
  ;
  ;
  ; 1) Red text for the VERTICAL scroller
  drawtext -nor @a 255 tahoma 230 0 -40 MIRC
  ; ### Multiple co-ordinates drawscroll (Horizontal)
  drawscroll -n @a 10 0  0 0 640 50     20 0  0 50 640 50    30 0  0 100 640 50   40 0  0 150 640 50
  ;
  ; 2) Blue text for the HORIZONTAL scroller
  drawtext -nor @a 16737280 tahoma 230 0 200 MIRC
  ; *** Replace 0 by 1 in case you want to test without multiple values.
  if (0) {
    drawscroll -n @a 0 10  0 200 50 480
    drawscroll -n @a 0 20  50 200 50 480
    drawscroll -n @a 0 30  100 200 50 480
    drawscroll -n @a 0 40  150 200 50 480
    drawscroll -n @a 0 50  200 200 50 480
    drawtext -nr @a 65280 tahoma 20 170 240 :expected
  }
  ; ### Multiple co-ordinates drawscroll (Vertical)
  else {
    drawscroll -n @a 0 10  0 200 50 480   0 20  50 200 50 480    0 30  100 200 50 480   0 40  150 200 50 480   0 50  200 200 50 480
    drawtext -nr @a 65280 tahoma 20 170 240 :"no stairs", now modify the script.
  }
  ;
  ;
  ;
  ;
  ; Just visuals
  drawtext -nr @a 65280 tahoma 20 0 0 Horizontal drawscroll
  drawtext -nr @a 65280 tahoma 20 0 240 Vertical drawscroll
  ;
  ; Redraw
  drawdot @a
  ;
}

Last edited by StanZ; 27/02/06 02:45 AM.
Re: Drawscroll and multiple co-ordinates #143678 28/02/06 09:36 AM
Joined: Dec 2002
Posts: 4,874
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,874
I changed the 0 and 1 values back and forth and ran the script several times, however it looks the same with one /drawscroll or multiple /drawscrolls. I wonder whether the behaviour might be dependent on the Windows version or perhaps the graphics card. Which version of Windows are you using?

As for the timer, I'll be changing it in the next version so that the ordering only works when a switch is specified, so it will return back to it's normal speed. I also found out the reason why the /draw* commands were slower and that has been resolved as well :-)

Re: Drawscroll and multiple co-ordinates #143679 01/03/06 01:47 AM
Joined: Jun 2003
Posts: 9
S
StanZ Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Jun 2003
Posts: 9

XP pro (2002) Service pack 2
Intel p4 2.53GHz 512 Mo
Gforce FX 5600

(I should try this snippet on an AMD 3000+ and Geforce 6600 tomorrow.)

I had noticed differences between graphics cards. But had not enough feedback with gfx bugs (just incompatibilities with graphics modes bellow 640*480 and frequency's refresh rate > 60 Hz, or smoothed fonts with clear type that can bug drawfill and getdot)
2D performances too, mainly when it's about moving huge bitmaps (Maybe the ramdac).
I hope it wont be a nightmare to fix drawscroll instruction, especially if I'm alone with the problem ;P

Some people I know should be crazy as I am about all the improvements you said.
Better timer instruction and improved draw commands sound marvellous. OLALA! grin

Re: Drawscroll and multiple co-ordinates #143680 02/03/06 08:14 PM
Joined: Aug 2003
Posts: 72
V
visionz Offline
Babel fish
Offline
Babel fish
V
Joined: Aug 2003
Posts: 72
Yay, thank you Khaled!

Re: Drawscroll and multiple co-ordinates #143681 04/03/06 12:18 PM
Joined: Oct 2003
Posts: 25
Z
Zerg Offline
Ameglian cow
Offline
Ameglian cow
Z
Joined: Oct 2003
Posts: 25
yahoooo !
i'll test your script StanZo, and see how it's like on my comp. then i'll edit.

edit : ok, i've got the same problem as StanZ (i have exactly the same "drawings" he has). comp : Duron (!) 1Ghz, RAM : 256 Mo, GeForce 2 MX. sucky, but still works smile

Last edited by Zerg; 04/03/06 12:45 PM.
Re: Drawscroll and multiple co-ordinates #143682 04/03/06 09:16 PM
Joined: Oct 2003
Posts: 25
Z
Zerg Offline
Ameglian cow
Offline
Ameglian cow
Z
Joined: Oct 2003
Posts: 25
(as i already edited too much (?), i have to reply)

my OS is win XP SP2, if it helps...

- edit : tested on an Athlon XP 1800+ , 512 Mo RAM, ATI Radeon 9600 pro on winXP SP2 -> same bug observed. seems to be an OS problem, since nvidia's and ati's cards seems to behave the same way - i.e : buggy.

Last edited by Zerg; 04/03/06 09:57 PM.
Re: Drawscroll and multiple co-ordinates #143683 04/03/06 09:36 PM
Joined: Jun 2003
Posts: 9
S
StanZ Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Jun 2003
Posts: 9
I tried on an Athlon XP 3000+ but still with XP pro (2002) Service pack 2. Same problem, I think I can test on a p133 notebook and w98 wink

Re: Drawscroll and multiple co-ordinates #143684 27/03/06 02:33 AM
Joined: Mar 2006
Posts: 22
R
rehinged Offline
Ameglian cow
Offline
Ameglian cow
R
Joined: Mar 2006
Posts: 22
Same results.

mIRC 6.17
Windows 2000 Pro
566mhz Celeron
128mb Ram
Intel i810 integrated graphics chipset