Announcement

Collapse
No announcement yet.

Suggestion MAT Command

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Suggestion MAT Command

    I was looking at the MAT (Matrix Math) command and I was wondering
    if you could add an "IGNORE" feature to this command.

    Sorta like a selective MATRIX addition. The reason for my suggestion
    is because I was told this command copies arrays VERY fast. Well,
    with a little modification, it could perform what gamers call
    a Transparent Blt. Nothing more than a matrix copy of values
    but ignoring a certain COLOR/Value in the source matrix.

    I don't know if this is the right area for this suggestion but I
    just thought it would be a good idea.

    BUT maybe this can be simulated with som AND/OR logic in conjuctionn
    with the MAT command.. I'll play with it a bit. Anyone with
    any info on this idea, please post..



    ------------------
    Explorations v3.0 RPG Development System
    http://www.explore-rpg.com
    Explorations v9.10 RPG Development System
    http://www.explore-rpg.com

  • #2
    I just attempted to use the MAT command with Boolean logic and
    recieve an error..

    MAT aRed() = source() AND CON(63488)

    From the help file I assumed that CON means a constant. But I guess
    the MAT command doesn't have AND/OR support.. I think it would
    be a GREAT addition to make the command more powerful..

    *Unless I'm missing something..



    ------------------
    Explorations v3.0 RPG Development System
    http://www.explore-rpg.com
    Explorations v9.10 RPG Development System
    http://www.explore-rpg.com

    Comment


    • #3
      I would also like to suggest an ARRAY / MAT command for the wish list.

      As long as the ARRAY SORT only allows one TAGARRAY, it would be very
      helpful to have a command which will initialize the elements of an array
      to their respective index values.

      Ie.

      Code:
      DIM MyArray1( %MaxElem) AS LONG
      DIM MyArray2( %MaxElem) AS LONG
      DIM MyArray3( %MaxElem) AS LONG
      
      
      DIM TempArray( %MaxElem) AS LONG
      DIM OrigOrder( %MaxElem) AS LONG
      
      
      MAT OrigOrder() = INDEX   '<-- Proposed new Fn, sets
      '                              OrigOrder(0) = 0, 
      '                              OrigOrder(1) = 1, etc.
      
      
      'Sort arrays using MyArray1 as the key
      MAT TempArray() = MyArray1()
      ARRAY SORT TempArray(), TAGARRAY MyArray2()
      MAT TempArray() = MyArray1()
      ARRAY SORT TempArray(), TAGARRAY MyArray3()
      ARRAY SORT MyArray1(), TAGARRAY OrigOrder()
      
      
      ....  'Process arrays
      
      
      'Restore arrays to original order
      MAT TempArray() = OrigOrder()
      ARRAY SORT TempArray(), TAGARRAY MyArray2()
      MAT TempArray() = OrigOrder()
      ARRAY SORT TempArray(), TAGARRAY MyArray3()
      ARRAY SORT OrigOrder(), TAGARRAY MyArray1()
      ------------------
      Bernard Ertl

      [This message has been edited by Bern Ertl (edited April 23, 2001).]
      Bernard Ertl
      InterPlan Systems

      Comment

      Working...
      X