/* move event by macfly august 2001 */ var MOVEEVENT_CONTINUE = 1;; var MOVEEVENT_SINGLE = 2;; var SPECIALEVENT_MOUSEMOVE = "MOUSE_MOVE";; struct MoveEvent = [ MOVEEVENTcode : S, /* code indentifier */ MOVEEVENTtype : I, /* event type : MOVEEVENT_CONTINUE or MOVEEVENT_SINGLE */ MOVEEVENTmove : [[I I I] [I I I]] /* move action ; 0 for no modification */ ]mkMoveEvent;; fun MOVEEVENT_GetCode (event) = event.MOVEEVENTcode;; fun MOVEEVENT_GetMove (event) = event.MOVEEVENTmove;; fun MOVEEVENT_CompareCode (elt, code) = !strcmp elt.MOVEEVENTcode code;; fun MOVEEVENT_GetMoveFromS (move) = if !strcmpi move "_" then nil else let hd strextr move -> [x [y [z [a [b [c _]]]]]] in [[atoi x atoi y atoi z] [atoi a atoi b atoi c]] ;; fun MOVEEVENT_AddList (listEvent) = if listEvent == nil then nil else let listEvent -> [[code [type [move _]]] next] in (mkMoveEvent [code (atoi type) MOVEEVENT_GetMoveFromS move]):: MOVEEVENT_AddList next ;; fun MOVEEVENT_PosInList (listEvent, code) = posf_in_list listEvent @MOVEEVENT_CompareCode code;; fun MOVEEVENT_Init () = MOVEEVENT_AddList (strextr _getpack _checkpack strcat (PLUGpath thisplug) "move/moveevent.cfg");; /* MODIF MOVE */