Cursor Filter

This filter is activated whenever the contents of the cursor is changed.  The cursor represents the hand of the lead character and is used to pick things up, put them down, throw them, place them in the character's backpack, etc

The DSA receives six integers as parameters:
  1. The objectID of the object being put into the cursor or taken from the cursor
  2. A code telling what sort of transaction is taking place (see enum CURSORFILTER_TYPE below)
  3. P1
  4. P2
  5. P3
  6. P4


enum CURSORFILTER_TYPE
{
  CURSORFILTER_Unknown             = 0,

  CURSORFILTER_ReadGame            = 1,   // P1 = P2 = P3 = P4 = 0
             
  CURSORFILTER_PickFromFloor       = 2,   // Can be Canceled.  The effect will
                                          // be as if a Screamer were sitting
                                          // on top of the object.
                                          // P1 = level
                                          // P2 = relative x
                                          // P3 = relative y
                                          // P4 = position

  CURSORFILTER_PlaceOnCharacter    = 3,   // 'PlaceOnCharacter' and 'PickFromCharacter'
                                          // are connected because it is possible to
                                          // swap the contents of the cursor with the
                                          // object in the character's possession.
                                          // In order to allow the filter to cancel the
                                          // entire operation, the filter is always called
                                          // with type 'CURSORFILTER_PlaceOnCharacter'
                                          // even if the cursor is totally empty.  In such
                                          // a case, the object is RNnul (0xffff).
                                          // The operation can be canceled by setting
                                          // the type to CURSORFILTER_Cancel.  The effect
                                          // will be as if the object in the cursor cannot
                                          // be placed in the particular possession slot.
                                          // As if you tried to place a chest on the
                                          // character's head.
                                          // P1 = Character Index
                                          // P2 = Position on character

  CURSORFILTER_PickFromCharacter   = 4,   // This always follows the 'PlaceOnCharacter'
                                          // operation unless the operation has been
                                          // canceled or there is not object in the
                                          // particular possession slot.
                                          // See discussion at 'PlaceOnCharacter'.
                                          // P1 = Character Index
                                          // P2 = Position on character

  CURSORFILTER_Throw               = 5,   // Can be canceled.  The object will
                                          // remain in the hand.
                                          // P1 = Left or Right
 
  CURSORFILTER_EnteringPrison      = 6,   // P1 = P2 = P3 = P4 = 0

  CURSORFILTER_DropObject          = 7,   // Can be canceled.  The object will
                                          // remain in the hand.
                                          // P1 = level
                                          // P2 = relative x
                                          // P3 = relative y
                                          // P4 = position

  CURSORFILTER_Eat                 = 8,   // Gulp

  CURSORFILTER_ResumeSavedGame     = 9,

  CURSORFILTER_DSA_DEL             = 10,

  CURSORFILTER_DSA_ADD             = 11,

  CURSORFILTER_TakeFromTorchHolder = 12,  // Can be canceled.  The same effect
                                          // as if no object of the correct type
                                          // was available at the holder's location.
                                          // P1 = level
                                          // P2 = relative x
                                          // P3 = relative y
                                          // P4 = position

  CURSORFILTER_PlaceInTorchHolder  = 13,  // Can be canceled.  It would act as
                                          // if the torch holder already contained
                                          // a torch.
                                          // P1 = level
                                          // P2 = relative x
                                          // P3 = relative y
                                          // P4 = position

  CURSORFILTER_SwapRemove          = 14,  // 'SwapRemove' and 'SwapReplace'
                                          // are connected because they act together to
                                          // swap the contents of the cursor with the
                                          // object at the actuator's location..
                                          // In order to allow the filter to cancel the
                                          // entire operation, the filter is always called
                                          // with type 'CURSORFILTER_SwapRemove' first.
                                          // The operation can be canceled by setting
                                          // the type to CURSORFILTER_Cancel.  The effect
                                          // will be as if there is no object
                                          // at the actuator's location.
                                          // P1 = level        //Actuator type 16
                                          // P2 = relative x
                                          // P3 = relative y
                                          // P4 = position

  CURSORFILTER_SwapReplace         = 15,  // See discussion of 'SwapRemove'.
                                          // P1 = level        //Actuator type 16
                                          // P2 = relative x
                                          // P3 = relative y
                                          // P4 = position

  CURSORFILTER_GiftFromGod         = 16,  // Can be canceled.
                                          // P1 = level        //Actuator type 12
                                          // P2 = relative x
                                          // P3 = relative y
                                          // P4 = position

  CURSORFILTER_TakeKey             = 17,  // Can be canceled.  Everything will work
                                          // exactly as before but the key will
                                          // remain in the player's hand.
                                          // P1 = level
                                          // P2 = relative x
                                          // P3 = relative y
                                          // P4 = position

  CURSORFILTER_DSA_MoveFrom        = 18,

  CURSORFILTER_DSA_MoveTo          = 19,

  CURSORFILTER_Cancel              = 20,  // Some cursor actions can be canceled
                                          // by setting the type to this value.

};