4 void( vector pPos, vector pSize, vector pColor, float pAlpha, float pDrawFlag, string pText ) _Mgfx_Debug_Info =
9 pText = String_Zone( pText );
11 print( "MGFX output: ", vtos( pPos ), " - ", vtos( pSize), " C", vtos( pColor ) );
12 print( " A", ftos( pAlpha ), " X", ftos( pDrawFlag ), " ", pText, "\n" );
22 vector( vector pPos ) Menu_MenToOrg =
24 return pPos - Menu_Origin;
32 vector( vector pPos ) Menu_OrgToMen =
34 return pPos + Menu_Origin;
42 vector( vector pPos ) Menu_ConToOrg =
44 pPos = Gfx_ConToMen( pPos );
45 return Menu_MenToOrg( pPos );
53 vector( vector pPos ) Menu_OrgToCon =
55 pPos = Menu_OrgToMen( pPos );
56 return Gfx_MenToCon( pPos );
64 float( vector pPosition, float pCharacter, vector pScale, vector pRGB, float pAlpha, float pFlag )
67 _Mgfx_Debug_Info( pPosition, pScale, pRGB, pAlpha, pFlag, strcat( "DrawChar: ", ftos( pCharacter ) ) );
69 pPosition = Menu_OrgToMen( pPosition );
70 return Gfx_DrawCharacter( pPosition, pCharacter, pScale, pRGB, pAlpha, pFlag );
78 float( vector pPosition, string pText, vector pScale, vector pRGB, float pAlpha, float pFlag )
81 // TODO: FIXME: do I really want this?
85 _Mgfx_Debug_Info( pPosition, pScale, pRGB, pAlpha, pFlag, strcat( "DrawString: ", pText ) );
87 pPosition = Menu_OrgToMen( pPosition );
88 return Gfx_DrawString( pPosition, pText, pScale, pRGB, pAlpha, pFlag );
96 float( vector pPosition, string pPicture, vector pSize, vector pRGB, float pAlpha, float pFlag )
99 _Mgfx_Debug_Info( pPosition, pSize, pRGB, pAlpha, pFlag, strcat( "DrawPicture: ", pPicture ) );
101 pPosition = Menu_OrgToMen( pPosition );
102 return Gfx_DrawPic( pPosition, pPicture, pSize, pRGB, pAlpha, pFlag );
110 float( vector pPosition, vector pSize, vector pRGB, float pAlpha, float pFlag )
113 _Mgfx_Debug_Info( pPosition, pSize, pRGB, pAlpha, pFlag, "Fill" );
115 pPosition = Menu_OrgToMen( pPosition );
116 return Gfx_Fill( pPosition, pSize, pRGB, pAlpha, pFlag );
124 void( float pX, float pY, float pWidth, float pHeight )
127 local vector lPosition;
133 lPosition = Menu_OrgToMen( lPosition);
137 // clip it to the current clip area
138 lDelta = Util_GetClipDelta( lPosition, Menu_Clip_Position, Menu_Clip_Size );
139 lPosition = lPosition + lDelta;
140 lSize = Util_ClipRect( lPosition, lSize - lDelta, Menu_Clip_Position, Menu_Clip_Size );
142 Gfx_SetClipArea( lPosition_x, lPosition_y, pWidth, pHeight );
153 if( Menu_Clip_Position == '0 0 0' && Menu_Clip_Size == '0 0 0' )
156 Gfx_SetClipArea( Menu_Clip_Position_x, Menu_Clip_Position_y, Menu_Clip_Size_x, Menu_Clip_Size_y );