/* librairie de gestion de boite inbox - sept.97 - par Sylvain Huet */ /* inboxes collisions (Second World-like)*/ struct InBox= [nameIB:S,sIB:SBox,curboxIB:Box,rayonIB:I,gravityIB:I] mkInBox;; /* inbox system loading */ fun inboxLoading(c)= let _getpack _checkpack c.nameIB -> file in if file==nil then nil else (set c.sIB=MBOXinit 200 600; set c.curboxIB=nil; if MBOXload c.sIB file then (MBOXend c.sIB; nil) else c);; /* inbox system closing */ fun inboxClosing(c)= MBOXend c.sIB;; /* inbox system placing */ fun inboxPlacing(ib,s,h)= set ib.curboxIB= let MBOXprojection ib.sIB (M3getObjVec s h) ib.rayonIB -> [b x] in (M3setObjVec s h x; b);; /* inbox system replacing */ fun inboxReplacing(ib,s,h)= M3movObjExt s h [0 (-ib.gravityIB) 0]; let MBOXmove ib.sIB ib.curboxIB (M3getObjVec s h) ib.rayonIB -> [b v] in (set ib.curboxIB=b; M3setObjVec s h v);;