MantisBT - mSLDev
View Issue Details
0000134mSLDevGUI Relatedpublic2013-04-15 12:482013-05-17 07:59
Wims 
administrator 
normalminorhave not tried
feedbackreopened 
 
0.4.1.0 
0000134: Highlighting %variable
Create a new file, paste:
alias -l pacserv_collision {
  var %a 1
  while ($gettok($1,$+(%a,-,$calc(1+%a)),32)) {
    var %b 1,%a1 $gettok($v1,1,32),%a2 $gettok($v1,2,32)
    while ($gettok($2,$+(%b,-,$calc(1+%b)),32)) {
      var %b1 $gettok($v1,1,32),%b2 $gettok($v1,2,32),%vb $gettok($6,$ceil($calc(%b / 2)),32)
      if ($onpoly(4,4,$calc(3+%a1),$calc(3+%a2),$calc(-3+$3 +%a1),$calc(3+%a2),$calc(-3+$3 +%a1),$calc(-3+$4 +%a2),$calc(3+%a1),$calc(-3+$4 +%a2), $&
        %b1,%b2,$calc(%b1 + $3),%b2,$calc(%b1 + $3),$calc(%b2 + $4),%b1,$calc(%b2 + $4))) {
        if ($gettok($hget(pacservi,%vb),5,32)) {
          hadd pacservi %vb $calc($gettok($hget(pacservg,%vb),1,32) * $3) $calc($gettok($hget(pacservg,%vb),2,32) * $4) 0 0 0 0 $gettok($hget(pacservi,%vb),7,32)
        }
        else {
          if ($hget(pacserv,lives) > 1) {
            hadd pacservi $gettok($5,$ceil($calc(%a / 2)),32) $calc($gettok($hget(pacservg,pacman),1,32) * $3) $calc($gettok($hget(pacservg,pacman),2,32) * $4) 0 0 0 0 $gettok($hget(pacservi,$gettok($5,$ceil($calc(%a / 2)),32)),7,32)
            hadd pacservi %vb $calc($gettok($hget(pacservg,%vb),1,32) * $3) $calc($gettok($hget(pacservg,%vb),2,32) * $4) 0 0 0 0 $gettok($hget(pacservi,%vb),7,32)
            hdec pacserv lives
            swriting lives $hget(pacserv,lives)
          }
          else {
            hadd pacserv dead $hget(pacserv,dead) $gettok($5,$ceil($calc(%a / 2)),32)
            hdel pacservi $gettok($5,$ceil($calc(%a / 2)),32)
            swriting dead $gettok($5,$ceil($calc(%a / 2)),32)
            if (!$hfind(pacservi,pacman*,0,w)) hadd pacserv paclose 1
          }
        }
        if ($hget(pacserv,as_ $+ %vb)) && ($gettok($v1,1,32)) { hadd pacserv as_ $+ %vb $v1 1 | astar_go $v1 %vb }
      }
      inc %b 2
    }
    inc %a 2
  }
}
put your cursor around %vb on the line:
 hadd pacservi %vb $calc($gettok($hget(pacservg,%vb),1,32) * $3) $calc($gettok($hget(pacservg,%vb),2,32) * $4) 0 0 0 0

%vb variables on that same line are not highlighted.
No tags attached.
Issue History
2013-04-15 12:48WimsNew Issue
2013-05-16 19:11administratorNote Added: 0000100
2013-05-16 19:11administratorStatusnew => closed
2013-05-16 19:11administratorAssigned To => administrator
2013-05-16 19:11administratorResolutionopen => fixed
2013-05-16 19:11administratorFixed in Version => 0.4.1.0
2013-05-16 19:12administratorResolutionfixed => won't fix
2013-05-17 07:59WimsNote Added: 0000105
2013-05-17 07:59WimsStatusclosed => feedback
2013-05-17 07:59WimsResolutionwon't fix => reopened

Notes
(0000100)
administrator   
2013-05-16 19:11   
The current line highlight overrides those colors.
There are currently no plans on making them both work at once.
(0000105)
Wims   
2013-05-17 07:59   
If iirc, we talked about it and it turned out you could just apply the highlight after the selection of the line, which wasn't the case currently for some reason?
If so, is there still a possibility to see this?