/***************************************************************/ /* */ /* PBINTERF.PKG */ /* */ /* plug-in PhotoPaintBall */ /* 2D interface */ /* */ /* version 5 : Loïc Berthelot, janv 2001 */ /* */ /***************************************************************/ /****************************************************************/ /* */ /* file version : 5.1 */ /* */ /* _Surface2Surface calls have been turned into _Bitmap2Surface */ /* in order to make work good with the OpenGl 3d engine. */ /* */ /****************************************************************/ /***************************************************************/ /* */ /* */ /* DATA STRUCT */ /* var PBIF_PLAYERS_MSG_TYPE : I */ /* var PBIF_OBJECTS_MSG_TYPE : I */ /* var PBIF_DIALOGUE_MSG_TYPE : I */ /* struct PBInterf */ /* typeof pbInterf : PBInterf */ /* */ /* */ /* INTERNAL BODY */ /* interf_valuesDestroy : fun [S] I */ /* interf_gunsDestroy : fun [S] I */ /* interf_msgDestroy : fun [S] I */ /* interf_talkDestroy : fun [S] I */ /* interf_start2 : fun [] I */ /* interf_updateGun : fun [I] I */ /* */ /* */ /* EXTERNAL BODY */ /* interf_change : fun [] I */ /* interf_updateMsgLine : fun [I S I I] I */ /* interf_updateMsg : fun [] I */ /* interf_updateMsgSpeed : fun [Timer u0] I */ /* interf_printMsg : fun [I S] I */ /* interf_updateScore : fun [] I */ /* interf_updateLife : fun [] I */ /* interf_updateAmmos : fun [] I */ /* interf_updateTalk : fun [] I */ /* interf_initTalk : fun [] I */ /* interf_printTalk : fun [I] I */ /* interf_updateGuns : fun [] I */ /* interf_render : fun [] I */ /* interf_destroy : fun [] I */ /* interf_start : fun [] I */ /* */ /* */ /***************************************************************/ /**************************************************************************/ /* */ /* D A T A S T R U C T */ /* */ /**************************************************************************/ /* type of messages to print */ var PBIF_PLAYERS_MSG_TYPE = 1;; /* player enters, dead, ... */ var PBIF_OBJECTS_MSG_TYPE = 2;; /* you take a gun, ammos, ... */ var PBIF_DIALOGUE_MSG_TYPE = 3;; /* chat messages */ struct PBInterf = [ /* font objects */ font_PBIF : ObjFont, fontMsg_PBIF : ObjFont, fontBoldMsg_PBIF : ObjFont, /* colors */ playersMsgColor_PBIF : I, objectsMsgColor_PBIF : I, dialogueMsgColor_PBIF : I, /* timer for messages scrolling */ timerMsgDelay_PBIF : I, timerMsg_PBIF : Timer, /* messages buffer */ msgLines_PBIF : [[I S] r1], msgNbLines_PBIF : I, /* positions of messages lines */ msgLineX_PBIF : I, msgLineW_PBIF : I, msgLineH_PBIF : I, msgLine1Y_PBIF : I, msgLine2Y_PBIF : I, msgLine3Y_PBIF : I, msgLine4Y_PBIF : I, /* objects for messages interface */ winMsg_PBIF : ObjWin, bmpMsg_PBIF : ObjBitmap, wMsg_PBIF : I, hMsg_PBIF : I, /* objects for chat interface */ talkLine_PBIF : S, talkLineX_PBIF : I, winTalk_PBIF : ObjWin, bmpTalk_PBIF : ObjBitmap, wTalk_PBIF : I, hTalk_PBIF : I, /* objects for values (score, life, ammos) */ winValues_PBIF : ObjWin, bmpValues_PBIF : ObjBitmap, wValues_PBIF : I, hValues_PBIF : I, /* objects for guns you have */ winGuns_PBIF : ObjWin, bmpGuns_PBIF : ObjBitmap, wGuns_PBIF : I, hGuns_PBIF : I, /* alphabitmaps for interface backgrounds */ scoreBkg_PBIF : AlphaBitmap, scoreBkgW_PBIF : I, scoreBkgH_PBIF : I, ammosBkg_PBIF : AlphaBitmap, ammosBkgW_PBIF : I, ammosBkgH_PBIF : I, lifeBkg_PBIF : AlphaBitmap, lifeBkgW_PBIF : I, lifeBkgH_PBIF : I, scoreX_PBIF : I, scoreY_PBIF : I, ammosX_PBIF : I, ammosY_PBIF : I, lifeX_PBIF : I, lifeY_PBIF : I, ammoIcon_PBIF : AlphaBitmap, ammoIconW_PBIF : I, ammoIconH_PBIF : I, gunsIcon_PBIF : AlphaBitmap, gunsIconH_PBIF : I, enableValues_PBIF : I, enableGuns_PBIF : I, /* transparent Color for _SurfaceToSurface */ tc_PBIF : I ] mkPBInterf;; typeof pbInterf = PBInterf;; /**************************************************************************/ /* */ /* I N T E R N A L B O D Y */ /* */ /**************************************************************************/ /*****************************************/ /* interf_valuesDestroy [S] I */ /* */ /* free resources of values interface */ /* (score, life, ammos...) */ /*****************************************/ fun interf_valuesDestroy (name) = _DSalphaBitmap pbInterf.scoreBkg_PBIF; _DSalphaBitmap pbInterf.ammosBkg_PBIF; _DSalphaBitmap pbInterf.lifeBkg_PBIF; _DSalphaBitmap pbInterf.ammoIcon_PBIF; _DSbitmap pbInterf.bmpValues_PBIF; 1 ;; /*****************************************/ /* interf_gunsDestroy [S] I */ /* */ /* free resources of guns interface */ /*****************************************/ fun interf_gunsDestroy (name) = _DSalphaBitmap pbInterf.gunsIcon_PBIF; _DSbitmap pbInterf.bmpGuns_PBIF; 1 ;; /*****************************************/ /* interf_msgDestroy [S] I */ /* */ /* free resources of messages interface */ /*****************************************/ fun interf_msgDestroy (name) = _DSbitmap pbInterf.bmpMsg_PBIF; 1 ;; /*****************************************/ /* interf_talkDestroy [S] I */ /* */ /* free resources of chat interface */ /*****************************************/ fun interf_talkDestroy (name) = _DSbitmap pbInterf.bmpTalk_PBIF; 1 ;; /*****************************************/ /* interf_start2 [] I */ /* */ /* create objets and ressource for */ /* all interfaces */ /*****************************************/ fun interf_start2 () = let strcatn pbItemsPath::pbDefault.bkgAmmosBmpFln_PBD::nil -> bkgAmmosFln in let strcatn pbItemsPath::pbDefault.bkgScoreBmpFln_PBD::nil -> bkgScoreFln in let strcatn pbItemsPath::pbDefault.bkgLifeBmpFln_PBD::nil -> bkgLifeFln in let strcatn pbItemsPath::pbDefault.iconAmmoBmpFln_PBD::nil -> iconAmmoFln in let strcatn pbItemsPath::pbDefault.iconGunsBmpFln_PBD::nil -> iconGunsFln in ( let _CRfont _channel 20 0 FF_WEIGHT "Arial" -> font in let _CRfont _channel 14 0 0 "Arial" -> fontMsg in let _CRfont _channel 14 0 FF_WEIGHT "Arial" -> fontBoldMsg in let make_rgb 255 0 0 -> playersMsgColor in let make_rgb 125 125 245 -> objectsMsgColor in let make_rgb 65 255 65 -> dialogueMsgColor in let 10 -> msgLineX in let 490 -> msgLineW in let 80 -> msgLineH in let 0 -> msgLine1Y in let 20 -> msgLine2Y in let 40 -> msgLine3Y in let 60 -> msgLine4Y in let 5 -> talkLineX in let _DMSgetZone this "paintBallValues" nil nil @interf_valuesDestroy -> [vwin vx vy vw vh] in let _DMSgetZone this "paintBallGuns" nil nil @interf_gunsDestroy -> [gwin gx gy gw gh] in let _DMSgetZone this "paintBallMsg" nil nil @interf_msgDestroy -> [mwin mx my mw mh] in let _DMSgetZone this "paintBallTalk" nil nil @interf_talkDestroy -> [twin tx ty tw th] in let 104 -> WV in let 56 -> HV in let 320 -> WG in let 32 -> HG in let 500 -> WM in let 80 -> HM in let 500 -> WT in let 30 -> HT in let _CRbitmap _channel WT HT -> bmpT in let _CRbitmap _channel WM HM -> bmpM in let _CRbitmap _channel WV HV -> bmpV in let _CRbitmap _channel WG HG -> bmpG in let _LDalphaBitmap _channel (_checkpack bkgAmmosFln) -> bkgAmmos in let _GETalphaBitmaps bkgAmmos -> [_ alphaAmmos] in let _LDalphaBitmap _channel (_checkpack bkgScoreFln) -> bkgScore in let _GETalphaBitmaps bkgScore -> [_ alphaScore] in let _LDalphaBitmap _channel (_checkpack bkgLifeFln) -> bkgLife in let _GETalphaBitmaps bkgLife -> [_ alphaLife] in let _LDalphaBitmap _channel (_checkpack iconAmmoFln) -> iconAmmo in let _LDalphaBitmap _channel (_checkpack iconGunsFln) -> iconGuns in let make_rgb 0 0 255 -> tc in let mktab 768 0 -> palette in let 0 -> i in let 0 -> c in let while (i < 768) do ( set palette.(i) = c; set palette.(i+1) = c; set palette.(i+2) = c; set i = i+3; set c = c+1; ) -> tmp in ( _SETbitmapPalette alphaAmmos palette; _SETbitmapPalette alphaScore palette; _SETbitmapPalette alphaLife palette; if (mwin == nil) then nil else _BLTbitmap mwin bmpM 0 0; if (vwin == nil) then nil else _BLTbitmap vwin bmpV 0 0; if (gwin == nil) then nil else _BLTbitmap gwin bmpG 0 0; if (twin == nil) then nil else _BLTbitmap twin bmpT 0 0; set pbInterf = mkPBInterf [font fontMsg fontBoldMsg playersMsgColor objectsMsgColor dialogueMsgColor nil nil nil 0 msgLineX msgLineW msgLineH msgLine1Y msgLine2Y msgLine3Y msgLine4Y mwin bmpM WM HM nil talkLineX twin bmpT WT HT vwin bmpV WV HV gwin bmpG WG HG bkgScore 104 24 bkgAmmos 104 24 bkgLife 104 8 30 20 30 20 0 0 iconAmmo 24 24 iconGuns 32 1 1 tc]; ); ); pbFlags_set "interf"; 1 ;; /*****************************************/ /* interf_updateGun [I] I */ /* */ /* you took a gun. insert its icon in */ /* the gun interface. */ /*****************************************/ fun interf_updateGun (index) = if (!gunsLib.(index).enable_GEL) then nil else ( /* all icons are stored in an alphabitmap */ /* get the x position of the icon you want */ let if (index == 0) then (pbNbItems-1)*32 else (index-1)*32 -> pointer in /* insert icon */ _CPalphaBitmap pbInterf.bmpGuns_PBIF pointer 0 pbInterf.gunsIcon_PBIF pointer 0 32 32; ); 1 ;; fun interf_blitValues () = if ((pbInterf.winValues_PBIF == nil) || (!pbInterf.enableValues_PBIF)) then nil else _BLTbitmap pbInterf.winValues_PBIF pbInterf.bmpValues_PBIF 0 0; 1 ;; /**************************************************************************/ /* */ /* E X T E R N A L B O D Y */ /* */ /**************************************************************************/ /*****************************************/ /* interf_change [] I */ /* */ /* user can switch between several */ /* interface "configurations" */ /*****************************************/ fun interf_change () = if (!pbInterf.enableValues_PBIF) then if (pbInterf.enableGuns_PBIF) then set pbInterf.enableGuns_PBIF = 0 else set pbInterf.enableValues_PBIF = 1 else if (pbInterf.enableGuns_PBIF) then set pbInterf.enableValues_PBIF = 0 else set pbInterf.enableGuns_PBIF = 1 ;; /*****************************************/ /* interf_updateMsgLine [I S I I] I */ /* */ /* write a message line into the message */ /* bitmap. */ /*****************************************/ fun interf_updateMsgLine (type, msg, x, y) = let if (type == PBIF_DIALOGUE_MSG_TYPE) then pbInterf.dialogueMsgColor_PBIF else if (type == PBIF_PLAYERS_MSG_TYPE) then pbInterf.playersMsgColor_PBIF else pbInterf.objectsMsgColor_PBIF -> color in ( _DRAWtext pbInterf.bmpMsg_PBIF pbInterf.fontBoldMsg_PBIF x y TD_TOP|TD_LEFT color msg; 1; ) ;; /*****************************************/ /* interf_updateMsg [] I */ /* */ /* update the message zone. timer make */ /* a scrolling on messages lines. */ /*****************************************/ fun interf_updateMsg () = _FILLbitmap pbInterf.bmpMsg_PBIF pbInterf.tc_PBIF; /* print the first message line if exists */ if (pbInterf.msgLines_PBIF == nil) then nil else let pbInterf.msgLines_PBIF -> [[type1 msg1] nxt1] in ( interf_updateMsgLine type1 msg1 pbInterf.msgLineX_PBIF pbInterf.msgLine1Y_PBIF; /* do the same with others messages lines, if exist */ if (nxt1 == nil) then nil else let nxt1 -> [[type2 msg2] nxt2] in ( interf_updateMsgLine type2 msg2 pbInterf.msgLineX_PBIF pbInterf.msgLine2Y_PBIF; if (nxt2 == nil) then nil else let nxt2 -> [[type3 msg3] nxt3] in ( interf_updateMsgLine type3 msg3 pbInterf.msgLineX_PBIF pbInterf.msgLine3Y_PBIF; if (nxt3 == nil) then nil else let nxt3 -> [[type4 msg4] _] in interf_updateMsgLine type4 msg4 pbInterf.msgLineX_PBIF pbInterf.msgLine4Y_PBIF; ); ); ); if (pbInterf.winMsg_PBIF == nil) then nil else _BLTbitmap pbInterf.winMsg_PBIF pbInterf.bmpMsg_PBIF 0 0; 1 ;; proto interf_updateMsgSpeed = fun [Timer u0] I;; /*****************************************/ /* interf_updateMsgSpeed [Timer u0] I */ /* */ /* the speed of messages scrolling */ /* changes with the number of messages */ /*****************************************/ fun interf_updateMsgSpeed (t, z) = /* delete timer if no more messages */ if (pbInterf.msgNbLines_PBIF == 0) then ( _deltimer pbInterf.timerMsg_PBIF; set pbInterf.timerMsg_PBIF = nil; set pbInterf.timerMsgDelay_PBIF = nil; interf_updateMsg; 0; ) else ( /* change timer delay if needed */ let pbInterf.msgLines_PBIF -> [fst nxt] in set pbInterf.msgLines_PBIF = nxt; set pbInterf.msgNbLines_PBIF = pbInterf.msgNbLines_PBIF - 1; let if (pbInterf.msgNbLines_PBIF > 4) then 1500 else 4000 -> newTimerDelay in if (pbInterf.timerMsgDelay_PBIF != newTimerDelay) then ( _deltimer pbInterf.timerMsg_PBIF; set pbInterf.timerMsgDelay_PBIF = newTimerDelay; set pbInterf.timerMsg_PBIF = _starttimer _channel newTimerDelay; _rfltimer pbInterf.timerMsg_PBIF @interf_updateMsgSpeed nil; ) else nil; interf_updateMsg; 1; ) ;; /*****************************************/ /* interf_printMsg [I S] I */ /* */ /* add a message in the messages list */ /*****************************************/ fun interf_printMsg (type, msg) = set pbInterf.msgLines_PBIF = listcat pbInterf.msgLines_PBIF [type msg]::nil; set pbInterf.msgNbLines_PBIF = pbInterf.msgNbLines_PBIF + 1; let if (pbInterf.msgNbLines_PBIF > 4) then 1500 else 4000 -> newTimerDelay in ( /* restart timer of message scrolling */ _deltimer pbInterf.timerMsg_PBIF; set pbInterf.timerMsgDelay_PBIF = newTimerDelay; set pbInterf.timerMsg_PBIF = _starttimer _channel newTimerDelay; _rfltimer pbInterf.timerMsg_PBIF @interf_updateMsgSpeed nil; ); /* redraw messages lines on screen */ interf_updateMsg; 1 ;; /*****************************************/ /* interf_updateScore [] I */ /* */ /* draw the score zone */ /*****************************************/ fun interf_updateScore () = /* get the current score value */ let itoa pbData.score_PBDATA -> scoreValue in ( _DRAWrectangle pbInterf.bmpValues_PBIF 0 24 104 24 DRAW_SOLID 1 pbInterf.tc_PBIF DRAW_SOLID pbInterf.tc_PBIF; /* draw the value in black */ _DRAWtext pbInterf.bmpValues_PBIF pbInterf.font_PBIF pbInterf.scoreX_PBIF pbInterf.scoreY_PBIF+24 TD_BOTTOM|TD_LEFT 0 scoreValue; /* draw the value in alpha channel */ let _GETalphaBitmaps pbInterf.scoreBkg_PBIF -> [bmp alpha] in ( _FILLbitmap8 alpha 0; _DRAWtext8 alpha pbInterf.font_PBIF (pbInterf.scoreX_PBIF+2) (pbInterf.scoreY_PBIF-2) TD_BOTTOM|TD_LEFT 0xFFFFFF scoreValue; ); /* copy alphabitmap ==> make a text with shadow */ _CPalphaBitmap pbInterf.bmpValues_PBIF 0 24 pbInterf.scoreBkg_PBIF 0 0 pbInterf.scoreBkgW_PBIF pbInterf.scoreBkgH_PBIF; interf_blitValues; 1; ) ;; /*****************************************/ /* interf_updateLife [] I */ /* */ /* draw the life bar zone */ /*****************************************/ fun interf_updateLife () = _DRAWrectangle pbInterf.bmpValues_PBIF 0 48 104 8 DRAW_SOLID 1 pbInterf.tc_PBIF DRAW_SOLID pbInterf.tc_PBIF; let _GETalphaBitmaps pbInterf.lifeBkg_PBIF -> [bmp alpha] in ( _FILLbitmap8 alpha 0; let (pbData.life_PBDATA * pbInterf.lifeBkgW_PBIF) / 100 -> value in _DRAWrectangle8 alpha 0 0 value 8 DRAW_SOLID 1 0xFFFFFF DRAW_SOLID 0xFFFFFF; ); _CPalphaBitmap pbInterf.bmpValues_PBIF 0 48 pbInterf.lifeBkg_PBIF 0 0 pbInterf.lifeBkgW_PBIF pbInterf.lifeBkgH_PBIF; 1 ;; /*****************************************/ /* interf_updateAmmos [] I */ /* */ /* draw the ammos zone */ /*****************************************/ fun interf_updateAmmos () = /* get the ammos values */ let strcat strcat (itoa ammosLib.(pbData.itemIndex_PBDATA).clipNb_AEL) "/" (itoa ammosLib.(pbData.itemIndex_PBDATA).nb_AEL) -> ammosValue in ( _DRAWrectangle pbInterf.bmpValues_PBIF 0 0 104 24 DRAW_SOLID 1 pbInterf.tc_PBIF DRAW_SOLID pbInterf.tc_PBIF; /* insert icon of ammos */ let _GETalphaBitmaps pbInterf.ammoIcon_PBIF -> [bmp alpha] in _CPbitmap16 pbInterf.bmpValues_PBIF 0 0 bmp 0 0 pbInterf.ammoIconW_PBIF pbInterf.ammoIconH_PBIF nil; /* draw values in black for shadow */ _DRAWtext pbInterf.bmpValues_PBIF pbInterf.font_PBIF pbInterf.ammosX_PBIF pbInterf.ammosY_PBIF TD_BOTTOM|TD_LEFT 0 ammosValue; /* draw values in alpha channel */ let _GETalphaBitmaps pbInterf.ammosBkg_PBIF -> [bmp alpha] in ( _FILLbitmap8 alpha 0; _DRAWtext8 alpha pbInterf.font_PBIF (pbInterf.ammosX_PBIF+2) (pbInterf.ammosY_PBIF-2) TD_BOTTOM|TD_LEFT 0xFFFFFF ammosValue; ); /* copy alphabitmap, to make a a text with shadow */ _CPalphaBitmap pbInterf.bmpValues_PBIF 0 0 pbInterf.ammosBkg_PBIF 0 0 pbInterf.ammosBkgW_PBIF pbInterf.ammosBkgH_PBIF; interf_blitValues; 1; ) ;; /*****************************************/ /* interf_updateTalk [] I */ /* */ /* draw the chat zone */ /*****************************************/ fun interf_updateTalk () = _FILLbitmap pbInterf.bmpTalk_PBIF pbInterf.tc_PBIF; _DRAWtext pbInterf.bmpTalk_PBIF pbInterf.fontBoldMsg_PBIF pbInterf.talkLineX_PBIF 10 TD_TOP|TD_LEFT pbInterf.dialogueMsgColor_PBIF (strcat strcat "You say : " pbInterf.talkLine_PBIF "_"); if ((pbInterf.winTalk_PBIF == nil) || (!pbData.speaking_PBDATA)) then nil else _BLTbitmap pbInterf.winTalk_PBIF pbInterf.bmpTalk_PBIF 0 0; 1 ;; /*****************************************/ /* interf_initTalk [] I */ /* */ /* initialize the chat zone */ /*****************************************/ fun interf_initTalk () = _FILLbitmap pbInterf.bmpTalk_PBIF pbInterf.tc_PBIF; 1 ;; /*****************************************/ /* interf_printTalk [I] I */ /* */ /* add a character to the chat message */ /*****************************************/ fun interf_printTalk (car) = if (pbInterf.talkLine_PBIF == nil) then if (car == pbKeys.backspace_PBK) then nil else set pbInterf.talkLine_PBIF = ctoa car else if (car == pbKeys.backspace_PBK) then ( set pbInterf.talkLine_PBIF = substr pbInterf.talkLine_PBIF 0 ((strlen pbInterf.talkLine_PBIF)-1) ) else set pbInterf.talkLine_PBIF = strcat pbInterf.talkLine_PBIF (ctoa car); interf_updateTalk; 1 ;; /*****************************************/ /* interf_updateGuns [] I */ /* */ /* redraw guns icon */ /*****************************************/ fun interf_updateGuns () = _FILLbitmap pbInterf.bmpGuns_PBIF pbInterf.tc_PBIF; let 0 -> i in while (i < pbNbItems) do ( interf_updateGun i; set i = i+1; ); if ((pbInterf.winGuns_PBIF == nil) || (!pbInterf.enableGuns_PBIF)) then nil else _BLTbitmap pbInterf.winGuns_PBIF pbInterf.bmpGuns_PBIF 0 0; 1 ;; /*****************************************/ /* interf_render [] I */ /* */ /* postrender callback */ /* redraw 2d interface */ /*****************************************/ fun interf_render (surf, sw, sh) = if (pbInterf.winMsg_PBIF != nil) then nil else ( _Bitmap2Surface surf 0 0 pbInterf.bmpMsg_PBIF 0 0 pbInterf.wMsg_PBIF pbInterf.hMsg_PBIF pbInterf.tc_PBIF; ); if ((pbInterf.winValues_PBIF != nil) || (!pbInterf.enableValues_PBIF)) then nil else _Bitmap2Surface surf (sw - pbInterf.wValues_PBIF - 5) 5 pbInterf.bmpValues_PBIF 0 0 pbInterf.wValues_PBIF pbInterf.hValues_PBIF pbInterf.tc_PBIF; if ((pbInterf.winGuns_PBIF != nil) || (!pbInterf.enableGuns_PBIF)) then nil else _Bitmap2Surface surf 5 (sh - pbInterf.hGuns_PBIF - 5) pbInterf.bmpGuns_PBIF 0 0 pbInterf.wGuns_PBIF pbInterf.hGuns_PBIF pbInterf.tc_PBIF; if ((pbInterf.winTalk_PBIF != nil) || (!pbData.speaking_PBDATA)) then nil else _Bitmap2Surface surf 0 (sh - pbInterf.gunsIconH_PBIF - pbInterf.hTalk_PBIF) pbInterf.bmpTalk_PBIF 0 0 pbInterf.wTalk_PBIF pbInterf.hTalk_PBIF pbInterf.tc_PBIF; 1 ;; /*****************************************/ /* interf_destroy [] I */ /* */ /* free resources */ /*****************************************/ fun interf_destroy () = _deltimer pbInterf.timerMsg_PBIF; interf_msgDestroy nil; interf_valuesDestroy nil; interf_gunsDestroy nil; _DSfont pbInterf.font_PBIF; _DSfont pbInterf.fontMsg_PBIF; _DSfont pbInterf.fontBoldMsg_PBIF; 1 ;; /*****************************************/ /* interf_start [] I */ /* */ /* initialize 2d interface data structs */ /*****************************************/ fun interf_start () = interf_start2; 1 ;;