%%%
  VERSION:1
  LANGUAGE:ENGLISH
%%%

MODULE BRUSH100


   ! Changelog:
   !----------------------------------------------------------------------------
   !
   ! W752:(Initial version) 
   !      Brush tables and PROC SelectBrushTab loacted in dedicated module.
   !
   ! w837: Default values set to zero.
   !
   ! w918: Special version for Gun control.
   !
   !----------------------------------------------------------------------------



!______________________________BRUSH DATA_________________________________________
   



   PERS brushdata bd1{5}:=[
      [0,0,0,0],
      [0,0,0,0],
      [0,0,0,0],
      [0,0,0,0],
      [0,0,0,0],
      [0,0,0,0],
      [0,0,0,0],
      [0,0,0,0],
      [0,0,0,0],
      [0,0,0,0]];

  



   PROC SelectBrushTab()
   

	  VAR NUM ThisBrush;

      ThisBrush := nSelectedBrush;
 
      IF NOT bBrushSelActive RETURN;
      
      IF ThisBrush = nLastBrush THEN
         ! Brush already loaded, nothing to do !
         IF bTestRack TPWrite "BrushTab OK! ";
      ELSE
         
         TEST ThisBrush
         
         CASE 1:  UseBrushTab bd1;  strCurBrushTab := "bd1";
            
            ! etc...
            ! etc...
            ! etc...
            ! etc...
            
         DEFAULT: !UseBrushTab bd1; strCurBrushTab := "bd1";
         ENDTEST
         
         IF bTestRack TPWrite "Using BrushTab: " + strCurBrushTab;

         SetBrush 1;
         SetColor "1";
         
      ENDIF


   ERROR ! Error handler
   
      ! Use default brush table !
      UseBrushTab bd1;
         
      RETURN;
      
   ENDPROC

  
ENDMODULE

