#Shift = 0
#Delay = 0
IncludeFile "LSDemo (plasmabeam).pb"

Procedure.l RealFireOrBeamColor(xColor.f)
  Define.l xColorR

  If xColor > 1
    xColorR = $ff
    ElseIf xColor < 5/7
    xColorR = xColor / 5 * 7 * $100
    If xColorR > $ff
      xColorR = $ff
      EndIf
    xColorR * $100
    ElseIf xColor > 6/7
    xColorR = (xColor - 6/7) * 7 * $100
    If xColorR > $ff
      xColorR = $ff
      EndIf
    xColorR = $ffff - xColorR * $100
    Else
    xColorR = (xColor - 5/7) * 7 * $100
    If xColorR > $ff
      xColorR = $ff
      EndIf
    xColorR = xColorR + $ff00
    ;xColorR = $ff0000
    EndIf

  ProcedureReturn xColorR
  EndProcedure
; IDE Options = PureBasic 4.61 (Windows - x86)
; CursorPosition = 7
; Folding = -
; EnableAsm
; DisableDebugger
; AddResource = LSDemo (PlasmaBeam).rc