## XIII
Class XIIIBaseHud

source: C:\XIII\XIII\Classes\XIIIBaseHud.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.HUD
             |
             +--XIII.XIIIBaseHud

Direct Known Subclasses:XIIIMPHud

class XIIIBaseHud
extends Engine.HUD

    //-----------------------------------------------------------
    //
    //-----------------------------------------------------------

Variables
`CartoonWindowNumber` | `` alpha de la texture de warning
`Texture` | `BlackTex` alpha de la texture de warning
`Pawn` | `Boss` Display boss life bar
`RenderTargetMaterial` | `CWndMat` The unique material used for Cartoon windows
`Texture` | `DamageWarnTex` splash texture
`Texture` | `DamageWarnTexBack` Used for visual effect on screen
`Texture` | `DamageWarnTexFront` Used for visual effect on screen
`Texture` | `DamageWarnTexLeft` Used for visual effect on screen
`XIIIItems` | `DrawnItem` Item to draw info on screen
`Texture` | `FlechDlg` to be used by HUDMsg(s) & HUDDlg(s)
`Texture` | `FondDlg` to be used by HUDMsg(s) & HUDDlg(s)
`HideCartoonHud,` | `HudCartoonInit` To display SixSense SFX
`float` | `HudCartoonOffset` alpha de la texture de warning
`bool` | `HudCartoonSFX` To display SixSense SFX
`CWndFullScreen` | `HudCartoonWnd` alpha de la texture de warning
`int` | `HudCartoonWndID` alpha de la texture de warning
`HudDialog` | `HudDlg` Linked chain of Dialogs (sub-titles) to display (each one independant but linked in order)
`HudEndMessage` | `HudEndMsg` Linked chain of messages to display (each one independant but linked in order)
`HudCartoonFocus` | `HudFoc` Liked chain of focus windows (realtime 'outlines' of some actors
`HudMPMessage` | `HudMPMsg` Linked chain of messages to display (each one independant but linked in order)
`HudMessage` | `HudMsg` Linked chain of messages to display (each one independant but linked in order)
`HudObjectifMessage` | `HudObjMsg` Linked chain of messages to display (each one independant but linked in order)
`HudState` | `HudStt` for 'Saving' message type, screen-centered.
`HudCartoonWindow` | `HudWnd` Linked chain of cartoon windows to display
`float` | `InitX[5],InitY[5],InitW[5],InitH[5]` alpha de la texture de warning
`InputOk,` | `InputCancel` To display SixSense SFX
`float` | `OffsetX[5],OffsetY[5],OffsetW[5],OffsetH[5]` alpha de la texture de warning
`int` | `OldClipX` Used for Messages
`bool` | `SafeArea` To display SixSense SFX
`Actor` | `ShowDebugActor` for 'Saving' message type, screen-centered.
`switchDelay,` | `SpeedFactor` alpha de la texture de warning
`int` | `ViewPortId` alpha de la texture de warning
`Texture` | `WhiteTex` alpha de la texture de warning
`XIIIPlayerController` | `XIIIPlayerOwner` Cast of the controller
`float` | `X[5],Y[5],W[5],H[5]` alpha de la texture de warning
`bool` | `bDrawBossBar` Display boss life bar
`bool` | `bDrawDamageWarn` To display SixSense SFX
`bool` | `bDrawItems` To display list of Items when changing (PendingItem != SelectedItem)
`bool` | `bDrawWeapons` To display list of weapons when changing (PendingWeapon != weapon)
`float` | `dT` alpha de la texture de warning
`UpMargin2,` | `downMargin2` for TV security draw, in
`int` | `eNbHudCartoonFocus` alpha de la texture de warning
`float` | `fDrawDamageWarnTimer[4]` timer used w/ the bool above.
`float` | `fDrawItemsTimer` timer used w/ the bool above.
`float` | `fDrawScale` for reduced viewports drawing
`float` | `fTranspWarningDamage` alpha de la texture de warning
`sound` | `hIntroBeginMap,hIntroBeginMapFocus,hIntroBeginMapPlayerMove` alpha de la texture de warning
`string` | `sTimeLeft` alpha de la texture de warning
`HudCartoonFocus` | `tCartoonFocus[5]` alpha de la texture de warning
`CWndFocusTrigger` | `tFocusTrigger[5]` alpha de la texture de warning
`vector` | `vDrawDamageWarnLoc[4]` Location on screen

Function Summary
`void` | `AddBossBar(Pawn P)`
    //____________________________________________________________________
`void` | `AddChronoDisplay(string S, optional float)`
    //____________________________________________________________________
`void` | `AddDamageWarn(int RelativeHitLoc)`
    //____________________________________________________________________
`void` | `AddHudCartoonFocus(Actor Focus, int AppearFX, bool bUseVignette, float Duration, bool zoom, float zoomFOV, float zoomDist, bool bDanger)`
    //____________________________________________________________________
`void` | `AddHudCartoonWindow(float XPos, float YPos, float DXSize, float DYSize, BitmapMaterial Tex, float X, float Y, float XSize, float YSize, float Lifetime, color cBorder, int CWndAppearFX, bool bLowPrio)`
    //____________________________________________________________________
`void` | `AddHudOnoOverLay(vector v3DLocation, float Size, BitmapMaterial Tex, color cColor, float Lifetime, int CWFX, float Delay)`
    //____________________________________________________________________
`void` | `AddSixSenseFX(Vector V)`
    //____________________________________________________________________
`void` | `AdjustMargin()`
    //____________________________________________________________________
`void` | `BossBarDisplay(Canvas C)`
    //____________________________________________________________________
`void` | `DamageWarnDisplay(Canvas C)`
    //____________________________________________________________________
`void` | `DoorTimerDisplay(Canvas C)`
    //____________________________________________________________________
`void` | `DrawCartoonWindowBis(Canvas C)`
    //____________________________________________________________________
`void` | `DrawCurrentItem(Canvas C)`
    //____________________________________________________________________
    //
`void` | `DrawHUD(Canvas C)`
    //____________________________________________________________________
    // ELR Draw HUD
`void` | `DrawItemsIconsList(Canvas C)`
    //____________________________________________________________________
`bool` | `DrawLevelAction(Canvas C)`
    //____________________________________________________________________
    // ELR Add Prepare saving, do not remove...
`void` | `DrawSafeArea(Canvas C)`
    //____________________________________________________________________
    // Cadre de Securite
    //____________________________________________________________________
`void` | `EndGameDisplay(Canvas C)`
    //____________________________________________________________________
    // ELR End Game Display = GAME OVER !!
`void` | `EraseCartoonWindows()`
    //____________________________________________________________________
`void` | `EraseLowPriorityCartoonWindows()`
    //____________________________________________________________________
`void` | `HUDSetup(Canvas C)`
    //____________________________________________________________________
    // ELR do prepare HUD Drawing
`void` | `InitViewportId(Canvas C, bool bShowId)`
    //____________________________________________________________________
`bool` | `IsFocusing(Actor A)`
    //____________________________________________________________________
`simulated` | `Message(PlayerReplicationInfo PRI, string Msg, name N)`
    //____________________________________________________________________
`void` | `PlayerNameDisplay(Canvas C)`
    //____________________________________________________________________
`void` | `PostBeginPlay()`
    //____________________________________________________________________
    // ELR init
`void` | `PrintActionMessage(Canvas C, string BigMessage)`
    //____________________________________________________________________
    //  Print a centered level action message with a drop shadow.
`void` | `ResetSixSenseSFX()`
    //____________________________________________________________________
`void` | `UseDialogFont(Canvas C)`
`void` | `UseHeadFont(Canvas C)`
`void` | `UseHugeFont(Canvas Canvas)`
`void` | `UseItemFont(Canvas C)`
`void` | `UseLargeFont(Canvas Canvas)`
`void` | `UseMediumFont(Canvas Canvas)`
`void` | `UseMsgFont(Canvas C)`
`void` | `UseNumericLargeFont(Canvas Canvas)`
`void` | `UseSmallFont(Canvas Canvas)`
    //____________________________________________________________________
    // Font Selection.
`void` | `XIIIDrawAmmo(Canvas C)`
    //____________________________________________________________________
`void` | `XIIIDrawPlayerInfo(Canvas C)`
    //____________________________________________________________________
    // this function draw all the player HUD info

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class XIIIBaseHud extends HUD;
    00005
    00006	//#EXEC OBJ LOAD FILE=../TexturesPC/XIIIMenu.utx PACKAGE=XIIIMENU
    00007
    00008	//var bool bNumericDisplay;     // if true, armor ( vest + helm ), life & breath are in numeric display mode
    00009	var bool bDrawWeapons;          // To display list of weapons when changing (PendingWeapon != weapon)
    00010	var bool bDrawItems;            // To display list of Items when changing (PendingItem != SelectedItem)
    00011	var bool bDrawDamageWarn;       // To display SixSense SFX
    00012	var bool SafeArea;
    00013	var bool HudCartoonSFX;
    00014	var bool CanDisplay, HideCartoonHud, HudCartoonInit;
    00015	var bool InputUp, InputDown, InputLeft, InputRight, InputOk, InputCancel;
    00016	var bool bDrawBossBar;          // Display boss life bar
    00017	var Pawn Boss;
    00018
    00019	var int OldClipX;     // Used for Messages
    00020	var XIIIPlayerController XIIIPlayerOwner; // Cast of the controller
    00021
    00022	//var texture FullDamageTex;      // texture used for drawing layer of damages/armor levels
    00023	//var texture EncartPersoTex;     // background for FullDamageTex.
    00024	//var texture CasqueTex;          // Icon for drawing when wearing a Helmet
    00025	//var texture GiletTex;           // Icon for drawing when wearing a BulletProof vest
    00026
    00027	//var localized string sSixSenseOn; // instead of a message event.
    00028
    00029	var XIIIItems DrawnItem;        // Item to draw info on screen
    00030	var float fDrawItemsTimer;      // timer used w/ the bool above.
    00031
    00032	var float LeftMargin2, RightMargin2, UpMargin2, downMargin2;  // for TV security draw, in %
    00033	var float fDrawScale;           // for reduced viewports drawing
    00034
    00035	var HudObjectifMessage HudObjMsg;          // Linked chain of messages to display (each one independant but linked in order)
    00036	var HudMPMessage HudMPMsg;          // Linked chain of messages to display (each one independant but linked in order)
    00037	var HudEndMessage HudEndMsg;          // Linked chain of messages to display (each one independant but linked in order)
    00038	var HudMessage HudMsg;          // Linked chain of messages to display (each one independant but linked in order)
    00039	var HudDialog HudDlg;           // Linked chain of Dialogs (sub-titles) to display (each one independant but linked in order)
    00040	var texture FondDlg;            // to be used by HUDMsg(s) & HUDDlg(s)
    00041	var texture FlechDlg;           // to be used by HUDMsg(s) & HUDDlg(s)
    00042	var HudCartoonWindow HudWnd;    // Linked chain of cartoon windows to display
    00043	var HudCartoonFocus HudFoc;     // Liked chain of focus windows (realtime 'outlines' of some actors
    00044
    00045	var HudState HudStt;                // for 'Saving' message type, screen-centered.
    00046
    00047	//::iKi::BEGIN
    00048	var transient actor ShowDebugActor;
    00049	//::iKi::END
    00050
    00051	var float fDrawDamageWarnTimer[4];  // timer used w/ the bool above.
    00052	var texture DamageWarnTexFront;     // Used for visual effect on screen
    00053	var texture DamageWarnTexBack;      // Used for visual effect on screen
    00054	var texture DamageWarnTexLeft;      // Used for visual effect on screen
    00055	// for damage warn type 2
    00056	var vector vDrawDamageWarnLoc[4];   // Location on screen
    00057	var texture DamageWarnTex;          // splash texture
    00058
    00059	var RenderTargetMaterial CWndMat;   // The unique material used for Cartoon windows
    00060
    00061	//var Casque Helmet;                // memorize this item to avoid findInventoryType each frame
    00062	//var GiletMk1 Vest;                // -//- same
    00063
    00064	//::DBUG::
    00065	//var localized string TESTXIII;
    00066
    00067	var float fTranspWarningDamage;     // alpha de la texture de warning
    00068
    00069	var int ViewPortId;
    00070
    00071	var texture WhiteTex;
    00072	var texture BlackTex;
    00073	var float HudCartoonOffset;
    00074	var CWndFullScreen HudCartoonWnd;
    00075	var int LastSwitchTime,RealTimeWndId, CartoonWindowNumber ;
    00076	var float X[5],Y[5],W[5],H[5];
    00077	var float OffsetX[5],OffsetY[5],OffsetW[5],OffsetH[5];
    00078	var float InitX[5],InitY[5],InitW[5],InitH[5];
    00079	var float dT;
    00080	var float switchDelay, SpeedFactor;
    00081	var sound hIntroBeginMap,hIntroBeginMapFocus,hIntroBeginMapPlayerMove;
    00082	//var CWndMyBossIsBeautiful HudBossWnd;
    00083	var int HudCartoonWndID;
    00084
    00085	// pour les focus longs (durent tant qu'un event n'est pas reçu)
    00086	// on stocke ici les données propres aux FocusTrigger et aux CartoonFocus equivalents
    00087	var HudCartoonFocus tCartoonFocus[5];
    00088	var CwndFocusTrigger tFocusTrigger[5];
    00089	var int eNbHudCartoonFocus;
    00090
    00091	var localized string sTimeLeft;
    00092
    00093	//____________________________________________________________________
    00094	// ELR init
    00095	function PostBeginPlay()
    00096	{
    00097	    // Init real-time screen capture material
    00098	    CWndMat = new(none) class'RenderTargetMaterial';
    00099	    Super.PostBeginPlay();
    00100	//    SetTimer(1.0, True);  // Used for messages management
    00101	}
    00102
    00103	//____________________________________________________________________
    00104	// ELR Add Prepare saving, do not remove...
    00105	function bool DrawLevelAction( canvas C )
    00106	{
    00107	    local string BigMessage;
    00108	    local texture LoadTex;
    00109
    00110	    if (Level.LevelAction == LEVACT_None )
    00111	    {
    00112	      if ( Level.Pauser != None )
    00113	           BigMessage = "";//PausedMessage;// PausedMessage; // Add pauser name?
    00114	      else
    00115	      {
    00116	           BigMessage = "";
    00117	           return false;
    00118	      }
    00119	    }
    00120	    else if ( Level.LevelAction == LEVACT_Loading )
    00121	    {
    00122	      if ((XIIIGameInfo(Level.Game).bGameEnded) && (!XIIIPlayerController(PlayerOwner).isInState('GameEndedDeath')))
    00123	      {
    00124	          LoadTex = XIIIGameInfo(Level.Game).MapInfo.nextLoadScreen;
    00125	          PlayerOwner.ConsoleCommand("RestoreBriefing");
    00126	          if (LoadTex != none)
    00127	          {
    00128	               C.SetPos(0 ,0);
    00129	               C.Style = 1; C.DrawColor = WhiteColor;
    00130	//               C.SetPos(C.ClipX / 2 - LoadTex.USize / 2, C.ClipY / 2 - LoadTex.VSize / 2);
    00131	               C.DrawTile(LoadTex, C.ClipX, C.ClipY, 0, 0, LoadTex.USize, LoadTex.VSize);
    00132	               BigMessage = "";
    00133	          }
    00134	      }
    00135	      else {
    00136	        //MLK Better be it static ? To consider if final solution
    00137	        LoadTex = texture(DynamicLoadObject("XIIIMenu.Loading", class'texture'));
    00138	        C.SetPos(0,0);
    00139	        C.Style = 1; C.DrawColor = WhiteColor;
    00140	        C.DrawTile(LoadTex, C.ClipX, C.clipY, 0, 0, LoadTex.USize, LoadTex.VSize);
    00141	        BigMessage = LoadingMessage;
    00142	      }
    00143	    }
    00144	    else if ( Level.LevelAction == LEVACT_Saving )
    00145	      BigMessage = SavingMessage;
    00146	    else if ( Level.LevelAction == LEVACT_Connecting )
    00147	      BigMessage = ConnectingMessage;
    00148	    else if ( Level.LevelAction == LEVACT_Precaching )
    00149	      BigMessage = PrecachingMessage;
    00150
    00151
    00152	    if ( BigMessage != "" )
    00153	    {
    00154	      C.Style = ERenderStyle.STY_Normal;
    00155	      UseLargeFont(C);
    00156	      PrintActionMessage(C, BigMessage);
    00157	      return true;
    00158	    }
    00159	    return false;
    00160	}
    00161
    00162	//____________________________________________________________________
    00163	//  Print a centered level action message with a drop shadow.
    00164	function PrintActionMessage( Canvas C, string BigMessage )
    00165	{
    00166	    local float XL, YL;
    00167
    00168	    if ( Len(BigMessage) > 10 )
    00169	      UseLargeFont(C);
    00170	    else
    00171	      UseHugeFont(C);
    00172
    00173	    C.bCenter = false;
    00174	    C.StrLen( BigMessage, XL, YL );
    00175	    C.SetPos(0.5 * (C.ClipX - XL) + 2, 0.93 * C.ClipY - YL + 2);
    00176	    C.SetDrawColor(80,80,80);
    00177	    C.DrawText( BigMessage, false );
    00178	    C.SetPos(0.5 * (C.ClipX - XL), 0.93 * C.ClipY - YL );
    00179	    C.SetDrawColor(255,255,255);
    00180	    C.DrawText( BigMessage, false );
    00181	}
    00182
    00183	//____________________________________________________________________
    00184	//::iKi::BEGIN
    00185	// toggles displaying properties of player's current viewtarget
    00186	exec function ShowDebug2(optional class<actor> aClass)
    00187	{
    00188	    local actor other, first;
    00189	    local bool bFound;
    00190
    00191	//     if ( (Level.Game != None) && !Level.Game.bCanViewOthers )
    00192	//          return;
    00193
    00194	    if (aClass!=none)
    00195	    {
    00196	      first = None;
    00197	      ForEach AllActors( aClass, other )
    00198	      {
    00199	        if ( bFound || (first == None) )
    00200	        {
    00201	          first = other;
    00202	          if ( bFound )
    00203	            break;
    00204	        }
    00205	        if ( other == ShowDebugActor )
    00206	        bFound = true;
    00207	      }
    00208
    00209	     ShowDebugActor=first;
    00210	     bShowDebugInfo = true;
    00211	     }
    00212	     else
    00213	     {
    00214	       if (ShowDebugActor==none)
    00215	         bShowDebugInfo = !bShowDebugInfo;
    00216	       else
    00217	       {
    00218	         ShowDebugActor=none;
    00219	         bShowDebugInfo = true;
    00220	       }
    00221	     }
    00222	}
    00223
    00224	simulated event WorldSpaceOverlays()
    00225	{
    00226	    local int i;
    00227	    local vector tV1, tV2;
    00228	    local rotator tR;
    00229	    local float faTan;
    00230
    00231	    Super.WorldSpaceOverlays();
    00232	    if ( ShowDebugActor!=none )
    00233	    {
    00234	    	ShowDebugActor.RenderOverlays(none);
    00235	    }
    00236	    if ( (XIIIPlayerOwner != none) && (XIIIPlayerOwner.PlayerInput != none) && XIIIPlayerOwner.PlayerInput.bCheckInputRanges )
    00237	    {
    00238	      // Circle
    00239	      tV1 = XIIIPlayerOwner.Pawn.Location;
    00240	      tR = XIIIPlayerOwner.Pawn.Rotation;
    00241	      tR.Yaw += 16384;
    00242	      tV2 = XIIIPlayerOwner.Pawn.Location + XIIIPlayerOwner.PlayerInput.fInputRange / 100 * vector(tR);
    00243	//      Draw3DLine(tV1, tV2, class'Canvas'.Static.MakeColor(255,255,255));
    00244	      for (i=1; i<120; i++)
    00245
{ 00246 tV1 = tV2; 00247 tR = XIIIPlayerOwner.Pawn.Rotation; 00248 tR.Yaw -= i*3.0*(65535/4.0/90.0) - 16384; 00249 tV2 = XIIIPlayerOwner.Pawn.Location + XIIIPlayerOwner.PlayerInput.fInputRange / 100 * vector(tR); 00250 Draw3DLine(tV1, tV2, class'Canvas'.Static.MakeColor(255,255,255)); 00251 } 00252 tV1 = tV2; 00253 tR = XIIIPlayerOwner.Pawn.Rotation; 00254 tR.Yaw += 16384; 00255 tV2 = XIIIPlayerOwner.Pawn.Location + XIIIPlayerOwner.PlayerInput.fInputRange / 100 * vector(tR); 00256 Draw3DLine(tV1, tV2, class'Canvas'.Static.MakeColor(255,255,255)); 00257 00258 // Move 00259 tV1 = XIIIPlayerOwner.Pawn.Location; 00260 tR = XIIIPlayerOwner.Pawn.Rotation; 00261 tR.Yaw += 16384; 00262 tV2 = XIIIPlayerOwner.Pawn.Location + XIIIPlayerOwner.PlayerInput.MoveRange[0] / 100 * vector(tR); 00263 // Draw3DLine(tV1, tV2, class'Canvas'.Static.MakeColor(255,255,0)); 00264 for (i=1; i<120; i++) 00265 { 00266 tV1 = tV2; 00267 tR = XIIIPlayerOwner.Pawn.Rotation; 00268 tR.Yaw -= i*3.0*(65535/4.0/90.0) - 16384; 00269 tV2 = XIIIPlayerOwner.Pawn.Location + XIIIPlayerOwner.PlayerInput.MoveRange[i] / 100 * vector(tR); 00270 Draw3DLine(tV1, tV2, class'Canvas'.Static.MakeColor(255,255,0)); 00271 } 00272 tV1 = tV2; 00273 tR = XIIIPlayerOwner.Pawn.Rotation; 00274 tR.Yaw += 16384; 00275 tV2 = XIIIPlayerOwner.Pawn.Location + XIIIPlayerOwner.PlayerInput.MoveRange[0] / 100 * vector(tR); 00276 Draw3DLine(tV1, tV2, class'Canvas'.Static.MakeColor(255,255,0)); 00277 00278 // Current 00279 // Log("AngleRef="$AngleRef@"Max="$Max@"X="$XIIIPlayerOwner.aBaseY@"Y="$XIIIPlayerOwner.aStrafe); 00280 tV1 = XIIIPlayerOwner.Pawn.Location + vect(0,0,1); 00281 tR = XIIIPlayerOwner.Pawn.Rotation; 00282 tR.Yaw -= XIIIPlayerOwner.PlayerInput.CurrentInputAngle*3.0*(65535/4.0/90.0) - 16384; 00283 tV2 = XIIIPlayerOwner.Pawn.Location + vect(0,0,1) + XIIIPlayerOwner.PlayerInput.CurrentInput / 100 * vector(tR); 00284 Draw3DLine(tV1, tV2, class'Canvas'.Static.MakeColor(255,0,0)); 00285 00286 // Turn 00287 tV1 = XIIIPlayerOwner.Pawn.Location; 00288 tR = XIIIPlayerOwner.Pawn.Rotation; 00289 tR.Yaw += 32768; 00290 tV2 = XIIIPlayerOwner.Pawn.Location + XIIIPlayerOwner.PlayerInput.TurnRange[0] / 100 * vector(tR); 00291 // Draw3DLine(tV1, tV2, class'Canvas'.Static.MakeColor(255,255,0)); 00292 for (i=1; i<120; i++) 00293 { 00294 tV1 = tV2; 00295 tR = XIIIPlayerOwner.Pawn.Rotation; 00296 tR.Yaw -= i*3.0*(65535/4.0/90.0) - 32768; 00297 tV2 = XIIIPlayerOwner.Pawn.Location + XIIIPlayerOwner.PlayerInput.TurnRange[i] / 100 * vector(tR); 00298 Draw3DLine(tV1, tV2, class'Canvas'.Static.MakeColor(255,0,255)); 00299 } 00300 tV1 = tV2; 00301 tR = XIIIPlayerOwner.Pawn.Rotation; 00302 tR.Yaw += 32768; 00303 tV2 = XIIIPlayerOwner.Pawn.Location + XIIIPlayerOwner.PlayerInput.TurnRange[0] / 100 * vector(tR); 00304 Draw3DLine(tV1, tV2, class'Canvas'.Static.MakeColor(255,0,255)); 00305 00306 // Current 00307 // Log("AngleRef="$AngleRef@"Max="$Max@"X="$XIIIPlayerOwner.aBaseY@"Y="$XIIIPlayerOwner.aStrafe); 00308 tV1 = XIIIPlayerOwner.Pawn.Location + vect(0,0,1); 00309 tR = XIIIPlayerOwner.Pawn.Rotation; 00310 tR.Yaw -= XIIIPlayerOwner.PlayerInput.CurrentTurnInputAngle*3.0*(65535/4.0/90.0) - 32768; 00311 tV2 = XIIIPlayerOwner.Pawn.Location + vect(0,0,1) + XIIIPlayerOwner.PlayerInput.CurrentTurnInput / 100 * vector(tR); 00312 Draw3DLine(tV1, tV2, class'Canvas'.Static.MakeColor(0,0,255)); 00313 } 00314 } 00315 00316 //::iKi::END 00317 00318 //____________________________________________________________________ 00319 // ELR 00320 simulated event PostRender( canvas Canvas ) 00321 { 00322 // local HUD H; 00323 local float YL,YPos; 00324 local Pawn P; 00325 local int i; 00326 00327 // to be sure tap taps are erased even when not rendered. 00328 for (i=0; i<5; i++ ) 00329 if ( fDrawSixSenseTimer[i] > 0 ) 00330 fDrawSixSenseTimer[i] -= dT/6.0; 00331 /* 00332 if ( XIIIPlayerController(PlayerOwner).bDrawingPortal ) 00333 return; 00334 */ 00335 if ( xiiiplayercontroller(PlayerOwner).bRenderPortal ) 00336 { 00337 xiiiplayercontroller(PlayerOwner).RenderScreenOverlays(Canvas); 00338 return; 00339 } 00340 00341 if ( !PlayerOwner.bBehindView ) 00342 PlayerOwner.RenderOverLays(Canvas); 00343 00344 if ( PawnOwner != PlayerOwner.ViewTarget ) 00345 { 00346 // Helmet = none; 00347 // Vest = none; 00348 PawnOwner = Pawn(PlayerOwner.ViewTarget); 00349 } 00350 00351 if ( PawnOwner != none ) 00352 { 00353 if ( PawnOwner.region.Zone.FlashEffectDesc.IsActivated && !Level.Game.bGameEnded ) 00354 { 00355 if ( HudMsg != none ) 00356 { 00357 Canvas.SpaceX = 0; 00358 UseMsgFont(Canvas); 00359 Canvas.Style = ERenderStyle.STY_Alpha; 00360 HudMSG.DrawMsg(Canvas); 00361 } 00362 00363 if ( HudDlg != none ) 00364 HudDlg.DrawDlg(Canvas); 00365 return; 00366 } 00367 } 00368 00369 // DisplayMessages(Canvas); 00370 bHideCenterMessages = DrawLevelAction(Canvas); 00371 00372 if ( !bHideCenterMessages && (PlayerOwner.ProgressTimeOut > Level.TimeSeconds) ) 00373 DisplayProgressMessage(Canvas); 00374 00375 if ( bBadConnectionAlert ) 00376 DisplayBadConnectionAlert(Canvas); 00377 // Log("calling DisplayBadConnectionAlert Canvas "$Canvas); 00378 00379 if ( bShowDebugInfo ) 00380 { 00381 YPos = 5; 00382 UseSmallFont(Canvas); 00383 // PlayerOwner.ViewTarget.DisplayDebug(Canvas,YL,YPos); 00384 //::iKi::BEGIN 00385 if (ShowDebugActor==none) 00386 PlayerOwner.ViewTarget.DisplayDebug(Canvas,YL,YPos); 00387 else 00388 { 00389 ShowDebugActor.DisplayDebug(Canvas,YL,YPos); 00390 // if ( ShowDebugActor!=none ) 00391 // { 00392 Canvas.SetPos(Canvas.ClipX*0.64, Canvas.ClipY*0.05-Canvas.ClipX*0.01); 00393 Canvas.Style = ERenderStyle.STY_Normal; 00394 Canvas.DrawColor.R=255; 00395 Canvas.DrawColor.G=255; 00396 Canvas.DrawColor.B=255; 00397 // Canvas.DrawColor.A=255; 00398 Canvas.DrawTile( WhiteTex, Canvas.ClipX*0.32, Canvas.ClipY*0.30+Canvas.ClipX*0.02, 0, 0, 8, 8 ); 00399 00400 XIIIPlayerOwner.bRenderPortal = true; 00401 Canvas.DrawPortal( Canvas.ClipX*0.65, Canvas.ClipY*0.05, Canvas.ClipX*0.30, Canvas.ClipY*0.30, ShowDebugActor /*actor CamActor*/, ShowDebugActor.Location+Pawn(ShowDebugActor).BaseEyeHeight*vect(0,0,1), ShowDebugActor.Rotation, /*optional int FOV*/, true /*optional bool ClearZ*/ ); 00402 XIIIPlayerOwner.bRenderPortal = false; 00403 // } 00404 } 00405 //::iKi::END 00406 } 00407 else 00408 DrawHUD(Canvas); 00409 // ELR no multi hud for us 00410 // for ( H=self; H!=None; H=H.NextHUD ) 00411 // H.DrawHUD(Canvas); 00412 00413 CanDisplay = true; 00414 } 00415 00416 //____________________________________________________________________ 00417 // ELR do prepare HUD Drawing 00418 function HUDSetup( canvas C ) 00419 { 00420 OldClipX = C.ClipX; 00421 C.Reset(); 00422 C.SpaceX = 0; 00423 C.bNoSmooth = true; 00424 00425 C.DrawCineFrame(Level.bCineFrame); 00426 00427 if ( (C.ClipX/C.ClipY > 2.0) || (C.ClipY < 440) ) 00428 fDrawScale=0.5; 00429 else 00430 fDrawScale=1.0; 00431 00432 PawnOwner = Pawn(PlayerOwner.ViewTarget); 00433 if (PawnOwner == none) 00434 { 00435 PawnOwner = PlayerOwner.Pawn; 00436 bViewPlayer = false; 00437 } 00438 else 00439 { 00440 if ( PlayerOwner.IsInState('CameraView') ) 00441 bViewPlayer = false; 00442 else 00443 bViewPlayer = true; 00444 } 00445 00446 XIIIPlayerOwner = XIIIPlayerController(PlayerOwner); 00447 00448 if (PawnOwner != none) 00449 { 00450 if ( XIIIPlayerController(PlayerOwner).bWaitForWeaponMode ) 00451 { 00452 if ( (PawnOwner.PendingWeapon != none) ) //&& (PawnOwner.PendingWeapon != PawnOwner.Weapon) ) 00453 { 00454 DrawnWeapon = PawnOwner.PendingWeapon; 00455 } 00456 else 00457 { 00458 DrawnWeapon = PawnOwner.Weapon; 00459 bDrawWeapons = false; 00460 } 00461 } 00462 else 00463 { 00464 if ( (PawnOwner.PendingItem != none) ) 00465 { 00466 DrawnItem = XIIIItems(PawnOwner.PendingItem); 00467 } 00468 else if ( XIIIItems(PawnOwner.SelectedItem) != none ) 00469 { 00470 DrawnItem = XIIIItems(PawnOwner.SelectedItem); 00471 bDrawItems = false; 00472 } 00473 else 00474 { // ALMOST BUG, should not have selected item none (may happen if using last medkit before locking w/ bWeaponBlock 00475 bDrawItems = false; 00476 DrawnItem = none; 00477 XIIIPlayercontroller(PawnOwner.controller).NextWeapon(); 00478 PawnOwner.ChangedWeapon(); 00479 } 00480 } 00481 } 00482 } 00483 00484 //____________________________________________________________________ 00485 00486 function InitViewportId( canvas C,bool bShowId ) 00487 { 00488 local controller Ctrl; 00489 local int Index; 00490 local string strViewPort; 00491 00492 if( ViewPortId == -1 ) 00493 { 00494 if( Level.NetMode == NM_Standalone ) 00495 { 00496 if( ! Level.bLonePlayer ) 00497 { 00498 Index = 1; 00499 00500 for( Ctrl=Level.ControllerList; Ctrl!=None; Ctrl=Ctrl.nextController ) 00501 if( Ctrl.IsA('PlayerController') ) 00502 { 00503 if( Ctrl == XIIIPlayerOwner ) 00504 { 00505 ViewPortId = Level.Game.NumPlayers - Index; 00506 break; 00507 } 00508 00509 Index++; 00510 } 00511 } 00512 } 00513 } 00514 00515 if( Level.NetMode == NM_Standalone ) 00516 { 00517 if( ! Level.bLonePlayer ) 00518 { 00519 if( bShowId ) 00520 { 00521 strViewPort = "Viewport"@ViewPortId; 00522 00523 UseHugeFont(C); 00524 C.SpaceX = 1; 00525 C.bUseBorder = false; 00526 00527 C.Style = ERenderStyle.STY_Alpha; 00528 C.DrawColor = HudBasicColor; 00529 C.DrawColor.A = 128; 00530 00531 C.SetPos(C.ClipX/2.0,C.ClipY/2.0); 00532 C.DrawText(strViewPort, false); 00533 00534 C.SpaceX = 0; 00535 } 00536 } 00537 } 00538 } 00539 00540 //____________________________________________________________________ 00541 00542 function AdjustMargin() 00543 { 00544 if( Level.NetMode != NM_Standalone ) 00545 return; 00546 00547 if( ( Level.bLonePlayer ) || ( Level.Game.NumPlayers == 1 ) ) 00548 return; 00549 00550 if( LeftMargin2 == -1 ) 00551 { 00552 LeftMargin2=LeftMargin; 00553 RightMargin2=RightMargin; 00554 UpMargin2=UpMargin; 00555 DownMargin2=DownMargin; 00556 } 00557 00558 00559 00560 if( Level.Game.NumPlayers == 2 ) 00561 { 00562 // Splitt 2 00563 00564 if( ViewPortId == 0 ) 00565 { 00566 // ViewPort 1 ( Up ) 00567 00568 LeftMargin = LeftMargin2; 00569 RightMargin = RightMargin2; 00570 UpMargin = UpMargin2*2; 00571 DownMargin = 0.02; 00572 } 00573 else 00574 { 00575 // ViewPort 2 ( Down ) 00576 00577 LeftMargin = LeftMargin2; 00578 RightMargin = RightMargin2; 00579 UpMargin = 0.02; 00580 DownMargin = DownMargin2*2; 00581 } 00582 } 00583 else 00584 { 00585 // Splitt 3 & 4 00586 00587 if( ViewPortId == 0 ) 00588 { 00589 // ViewPort 1 ( UpLeft ) 00590 00591 LeftMargin = LeftMargin2*2; 00592 RightMargin = 0.02; 00593 UpMargin = UpMargin2*2; 00594 DownMargin = 0.02; 00595 } 00596 else 00597 { 00598 if( ViewPortId == 1 ) 00599 { 00600 // ViewPort 2 ( UpRight ) 00601 00602 LeftMargin = 0.02; 00603 RightMargin = RightMargin2*2; 00604 UpMargin = UpMargin2*2; 00605 DownMargin = 0.02; 00606 } 00607 else 00608 { 00609 if( ViewPortId == 2 ) 00610 { 00611 // ViewPort 3 ( DownLeft ) 00612 00613 LeftMargin = LeftMargin2*2; 00614 RightMargin = 0.02; 00615 UpMargin = 0.02; 00616 DownMargin = DownMargin2*2; 00617 } 00618 else 00619 { 00620 // ViewPort 4 ( DownRight ) 00621 00622 LeftMargin = 0.02; 00623 RightMargin = RightMargin2*2; 00624 UpMargin = 0.02; 00625 downMargin = DownMargin2*2; 00626 } 00627 } 00628 } 00629 } 00630 } 00631 00632 //____________________________________________________________________ 00633 // ELR Draw HUD 00634 function DrawHUD( canvas C ) 00635 { 00636 local int i, fx, fy; 00637 00638 HUDSetup( C ); 00639 InitViewPortId( C, false ); 00640 AdjustMargin(); 00641 00642 if ( !Level.bLonePlayer || (XIIIGameInfo(Level.Game).CheckPointNumber > 1) ) 00643 HudCartoonSFX = false; 00644 else if( Level.InitialCartoonEffect != 0 ) 00645 HudCartoonSFX = true; 00646 else if ( (Level.Game != none) && (XIIIGameInfo(Level.Game).MapInfo != none) ) 00647 XIIIGameInfo(Level.Game).MapInfo.EndCartoonEffect = true; 00648 00649 // ELR Do show scores if needed. 00650 if ( bShowScores && (Scoring != None) ) 00651 { 00652 if ( (Level.Game== none) || (Level.NetMode != NM_StandAlone) ) 00653 Scoring.ShowScores(C, ViewPortId, 1); 00654 else 00655 Scoring.ShowScores(C, ViewPortId, Level.Game.NumPlayers); 00656 return; 00657 } 00658 00659 if( SafeArea ) 00660 DrawSafeArea( C ); 00661 00662 if ( !bHideHud && (PawnOwner!=none) ) 00663 { 00664 if ((Level.LevelAction == LEVACT_None) && (Level.Pauser == none)) 00665 { 00666 if ( (Level.bLonePlayer) && Level.Game.bGameEnded ) 00667 { 00668 EndGameDisplay(C); 00669 //return; //FABE3 00670 } 00671 00672 if ( !HudCartoonSFX ) 00673 { 00674 XIIIDrawPlayerInfo(C); 00675 if ( bDrawBossBar ) 00676 BossBarDisplay(C); 00677 if ( bViewPlayer ) 00678 { 00679 if ( HudMsg != none ) 00680 { 00681 C.SpaceX = 0; 00682 UseMsgFont(C); 00683 C.Style = ERenderStyle.STY_Alpha; 00684 HudMsg.DrawMsg(C); 00685 } 00686 00687 XP = C.ClipX * LeftMargin; 00688 YP = C.ClipY * UpMargin; 00689 00690 PlayerNameDisplay(C); // Draw PlayerName (multionly) 00691 00692 XP = C.ClipX * LeftMargin; 00693 YP = C.ClipY * ( 1 - DownMargin ); 00694 if ( (XIIIPlayerController(PawnOwner.controller)!=none) && (XIIIPlayerController(PawnOwner.Controller).aDoor != none) ) 00695 DoorTimerDisplay(C); // Draw DoorTimer 00696 00697 if ( bDrawDamageWarn ) 00698 DamageWarnDisplay(C); 00699 } 00700 } 00701 00702 if ( HudCartoonSFX ) 00703 // DrawCartoonWindowInGame( C ); 00704 DrawCartoonWindowBis( C ); 00705 00706 XP = C.ClipX * LeftMargin + 32; 00707 YP = C.ClipY * UpMArgin; 00708 00709 if ( HudWnd != none ) 00710 HudWnd.DrawWnd(C); 00711 if ( HudFoc != none ) 00712 HudFoc.DrawWnd(C); 00713 if ( HudDlg != none ) 00714 HudDlg.DrawDlg(C); 00715 if ( HudStt != none ) 00716 HudStt.DrawStt(C); 00717 if ( HudMpMsg != none ) 00718 HudMpMsg.DrawMsg(C); 00719 if ( HudObjMsg != none ) 00720 HudObjMsg.DrawMsg(C); 00721 } 00722 } 00723 else if ( Level.LevelAction == LEVACT_None ) 00724 { 00725 XP = C.ClipX * LeftMargin; 00726 YP = C.ClipY * ( 1 - DownMargin ); 00727 00728 if ( HudEndMsg != none ) 00729 HudEndMsg.DrawMsg(C); 00730 } 00731 } 00732 00733 //____________________________________________________________________ 00734 // this function draw all the player HUD info 00735 function XIIIDrawPlayerInfo(Canvas C) 00736 { 00737 XP = int(C.ClipX * LeftMargin); // ELR align on pixels else Mipmap pbs 00738 YP = int(C.ClipY * ( 1 - DownMargin )); 00739 UseHugeFont(C); 00740 00741 Super.DrawPlayerInfo(C); 00742 if ( bViewPlayer ) 00743 { 00744 XP = C.ClipX * (1 - RightMargin); 00745 YP = C.ClipY * (1 - DownMargin ); 00746 if ( DrawnWeapon != none ) 00747 { 00748 //WeaponDisplay(C); // Draw the Weapons of the player (DOWN-RIGHT Corner of the HUD). 00749 C.Style = ERenderStyle.STY_Normal; 00750 if ( XIIIPlayerController(PlayerOwner).bWaitForWeaponMode ) 00751 { 00752 if ( bDrawWeapons || ( (fDrawWeaponsTimer-Level.TimeSeconds) >= 0.0)) 00753 { 00754 DrawWeaponIconsList(C); 00755 YP -= 16; 00756 } 00757 else 00758 XIIIDrawAmmo(C); 00759 } 00760 else 00761 { 00762 if ( bDrawItems || ( (fDrawItemsTimer-Level.TimeSeconds) >= 0.0)) 00763 { 00764 DrawItemsIconsList(C); 00765 YP -= 16; 00766 } 00767 else if ( DrawnItem != none ) 00768 DrawCurrentItem(C); 00769 } 00770 } 00771 } 00772 } 00773 00774 //____________________________________________________________________ 00775 event Tick( float DeltaTime ) 00776 { 00777 dT = DeltaTime; 00778 // ELR Super.tick useless as there is nothing in 00779 } 00780 00781 //____________________________________________________________________ 00782 function AddBossBar(Pawn P) 00783 { 00784 bDrawBossBar = true; 00785 Boss = P; 00786 } 00787 00788 //____________________________________________________________________ 00789 function BossBarDisplay(Canvas C) 00790 { 00791 local float Scale; 00792 Local int XPloc, YPloc, Heig; 00793 00794 if ( (Boss == none) || Boss.bIsDead ) 00795 { 00796 bDrawBossBar = false; 00797 return; 00798 } 00799 Scale = 1.8; 00800 Heig = int(LifeDisplayHeight*1.3); 00801 XPloc = int(C.ClipX*0.5 - 50.0*Scale - Heig); 00802 YPloc = int(C.ClipY - 120.0 - 2.0); 00803 // BackGround 00804 C.SetPos(XPloc, YPloc); 00805 C.DrawColor = HudBasicColor*0.1; 00806 C.DrawColor.A = 90; 00807 DrawStdBackground(C, Heig, int(100.0*scale+4.0)); 00808 00809 C.Style = ERenderStyle.STY_Alpha; 00810 00811 C.Font = C.smallfont; 00812 C.SetDrawColor(250,220,170,255); 00813 C.bTextShadow = true; 00814 C.SetPos(XPloc+Heig+8, YPloc ); 00815 C.DrawText(Boss.PawnName); 00816 C.bTextShadow = false; 00817 00818 C.SetPos(XPloc+Heig+1, YPloc-4+LifeDisplayHeight); 00819 C.SetDrawColor(0,0,0,0); 00820 C.BorderColor = WhiteColor; 00821 C.bUseBorder = true; 00822 C.DrawTile(WhiteTex, 100*scale, Heig-LifeDisplayHeight, 0, 0, 1, 1); 00823 C.bUseBorder = false; 00824 C.SetPos(XPloc+Heig, YPloc-5+LifeDisplayHeight); 00825 C.SetDrawColor(250,190,100,196); 00826 C.DrawTile(WhiteTex, Boss.HealthPercent()*scale+1, Heig-LifeDisplayHeight+1, 0, 0, 1, 1); 00827 } 00828 00829 //____________________________________________________________________ 00830 function DrawCartoonWindowBis( canvas C) 00831 { 00832 local float dX,dY, Border, Width,Height ; 00833 local float XF,YF,WF,HF; 00834 local int Loop; 00835 00836 if( Level.InitialCartoonEffect == -1 ) 00837 Level.InitialCartoonEffect = Rand(3)+1; 00838 00839 if( LastSwitchTime == -1 ) 00840 { 00841 RealTimeWndId = 0; 00842 LastSwitchTime = Level.TimeSeconds; 00843 } 00844 else 00845 { 00846 if( !HideCartoonHud ) 00847 { 00848 if( Level.TimeSeconds - LastSwitchTime > SwitchDelay ) 00849 { 00850 PawnOwner.PlayMenu( hIntroBeginMapFocus ); 00851 RealTimeWndId++; 00852 LastSwitchTime = Level.TimeSeconds; 00853 00854 if( RealTimeWndId == CartoonWindowNumber ) 00855 RealTimeWndId = 0; 00856 } 00857 } 00858 } 00859 00860 if( !HideCartoonHud ) 00861 if( PawnOwner.velocity != vect(0,0,0) ) 00862 { 00863 HideCartoonHud = true; 00864 XIIIGameInfo(Level.Game).MapInfo.EndCartoonEffect = true; 00865 PawnOwner.PlayMenu( hIntroBeginMapPlayerMove ); 00866 } 00867 00868 00869 if( HideCartoonHud ) 00870 { 00871 if( Level.InitialCartoonEffect == 1 ) 00872 { 00873 // -------- ---- ---- 00874 // | | | || 4 | 00875 // | 0 | | 2 |---- 00876 // | | | |---- 00877 // -------- ---- | 3 | 00878 // ------------- | | 00879 // | 1 || | 00880 // ------------- ---- 00881 00882 switch( RealTimeWndId ) 00883 { 00884 case 0: 00885 OffsetX[ 0 ] = -0.50 ; OffsetY[ 0 ] = -0.50 ; OffsetW[ 0 ] = 1.50 ; OffsetH[ 0 ] = 1.50 ; 00886 OffsetX[ 1 ] = 0.00 ; OffsetY[ 1 ] = 1.00 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 00887 OffsetX[ 2 ] = 0.00 ; OffsetY[ 2 ] = -1.50 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = 0.00 ; 00888 OffsetX[ 3 ] = 1.00 ; OffsetY[ 3 ] = 0.00 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = 0.00 ; 00889 OffsetX[ 4 ] = 1.00 ; OffsetY[ 4 ] = -1.00 ; OffsetW[ 4 ] = 0.00 ; OffsetH[ 4 ] = 0.00 ; 00890 break; 00891 case 1: 00892 OffsetX[ 0 ] = -1.00 ; OffsetY[ 0 ] = 0.00 ; OffsetW[ 0 ] = 0.00 ; OffsetH[ 0 ] = -1.00 ; 00893 OffsetX[ 1 ] = -0.50 ; OffsetY[ 1 ] = -1.00 ; OffsetW[ 1 ] = 1.50 ; OffsetH[ 1 ] = 2.00 ; 00894 OffsetX[ 2 ] = 0.00 ; OffsetY[ 2 ] = 2.00 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = 0.00 ; 00895 OffsetX[ 3 ] = +1.00 ; OffsetY[ 3 ] = 0.00 ; OffsetW[ 3 ] = -1.00 ; OffsetH[ 3 ] = 0.00 ; 00896 OffsetX[ 4 ] = 1.00 ; OffsetY[ 4 ] = -1.00 ; OffsetW[ 4 ] = 0.00 ; OffsetH[ 4 ] = 0.00 ; 00897 break; 00898 case 2: 00899 OffsetX[ 0 ] = -1.00 ; OffsetY[ 0 ] = 1.00 ; OffsetW[ 0 ] = -1.00 ; OffsetH[ 0 ] = -1.00 ; 00900 OffsetX[ 1 ] = 0.00 ; OffsetY[ 1 ] = 1.00 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 00901 OffsetX[ 2 ] = -1.00 ; OffsetY[ 2 ] = -0.50 ; OffsetW[ 2 ] = 2.00 ; OffsetH[ 2 ] = 1.00 ; 00902 OffsetX[ 3 ] = +1.00 ; OffsetY[ 3 ] = 1.00 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = 0.00 ; 00903 OffsetX[ 4 ] = 1.00 ; OffsetY[ 4 ] = 0.00 ; OffsetW[ 4 ] = -1.00 ; OffsetH[ 4 ] = 0.00 ; 00904 break; 00905 case 3: 00906 OffsetX[ 0 ] = 1.00 ; OffsetY[ 0 ] = 0.00 ; OffsetW[ 0 ] = 0.00 ; OffsetH[ 0 ] = -0.80 ; 00907 OffsetX[ 1 ] = -1.00 ; OffsetY[ 1 ] = -0.50 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 00908 OffsetX[ 2 ] = -1.00 ; OffsetY[ 2 ] = 0.50 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = 0.00 ; 00909 OffsetX[ 3 ] = -1.00 ; OffsetY[ 3 ] = -1.00 ; OffsetW[ 3 ] = 1.50 ; OffsetH[ 3 ] = 1.50 ; 00910 OffsetX[ 4 ] = 0.00 ; OffsetY[ 4 ] = 1.00 ; OffsetW[ 4 ] = 0.00 ; OffsetH[ 4 ] = 0.00 ; 00911 break; 00912 case 4: 00913 OffsetX[ 0 ] = 0.00 ; OffsetY[ 0 ] = 1.00 ; OffsetW[ 0 ] = -0.65 ; OffsetH[ 0 ] = 0.00 ; 00914 OffsetX[ 1 ] = -1.00 ; OffsetY[ 1 ] = 0.00 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 00915 OffsetX[ 2 ] = -1.00 ; OffsetY[ 2 ] = -0.50 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = 0.00 ; 00916 OffsetX[ 3 ] = 0.00 ; OffsetY[ 3 ] = 1.50 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = -1.50 ; 00917 OffsetX[ 4 ] = -1.00 ; OffsetY[ 4 ] = -0.50 ; OffsetW[ 4 ] = 1.50 ; OffsetH[ 4 ] = 1.50 ; 00918 break; 00919 } 00920 } 00921 else if( Level.InitialCartoonEffect == 2 ) 00922 { 00923 // ------------- ---- 00924 // | 0 || | 00925 // ------------- | | 00926 // -------- ---- | 4 | 00927 // | || 2 || | 00928 // | 1 |---- ---- 00929 // | |--------- 00930 // | || 3 | 00931 // -------- --------- 00932 00933 switch( RealTimeWndId ) 00934 { 00935 case 0: 00936 OffsetX[ 0 ] = -0.50 ; OffsetY[ 0 ] = -0.50 ; OffsetW[ 0 ] = 1.00 ; OffsetH[ 0 ] = 1.50 ; 00937 OffsetX[ 1 ] = 0.00 ; OffsetY[ 1 ] = 1.50 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 00938 OffsetX[ 2 ] = 0.00 ; OffsetY[ 2 ] = -1.50 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = 0.00 ; 00939 OffsetX[ 3 ] = -2.50 ; OffsetY[ 3 ] = 0.00 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = 0.00 ; 00940 OffsetX[ 4 ] = 0.00 ; OffsetY[ 4 ] = 1.80 ; OffsetW[ 4 ] = 0.00 ; OffsetH[ 4 ] = 0.00 ; 00941 break; 00942 case 1: 00943 OffsetX[ 0 ] = 0.00 ; OffsetY[ 0 ] = -1.00 ; OffsetW[ 0 ] = 0.50 ; OffsetH[ 0 ] = 0.00 ; 00944 OffsetX[ 1 ] = -0.50 ; OffsetY[ 1 ] = -1.00 ; OffsetW[ 1 ] = 1.50 ; OffsetH[ 1 ] = 2.00 ; 00945 OffsetX[ 2 ] = 1.20 ; OffsetY[ 2 ] = -0.50 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = 0.80 ; 00946 OffsetX[ 3 ] = 1.00 ; OffsetY[ 3 ] = 1.00 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = 0.00 ; 00947 OffsetX[ 4 ] = 0.00 ; OffsetY[ 4 ] = 1.80 ; OffsetW[ 4 ] = 0.00 ; OffsetH[ 4 ] = 0.00 ; 00948 break; 00949 case 2: 00950 OffsetX[ 0 ] = 0.00 ; OffsetY[ 0 ] = -0.50 ; OffsetW[ 0 ] = 0.00 ; OffsetH[ 0 ] = 0.00 ; 00951 OffsetX[ 1 ] = -1.00 ; OffsetY[ 1 ] = 0.00 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 00952 OffsetX[ 2 ] = -1.00 ; OffsetY[ 2 ] = -0.50 ; OffsetW[ 2 ] = 1.50 ; OffsetH[ 2 ] = 1.00 ; 00953 OffsetX[ 3 ] = 0.00 ; OffsetY[ 3 ] = 0.50 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = 0.00 ; 00954 OffsetX[ 4 ] = 0.50 ; OffsetY[ 4 ] = 0.00 ; OffsetW[ 4 ] = 0.00 ; OffsetH[ 4 ] = 0.00 ; 00955 break; 00956 case 3: 00957 OffsetX[ 0 ] = 0.00 ; OffsetY[ 0 ] = -0.50 ; OffsetW[ 0 ] = 0.00 ; OffsetH[ 0 ] = 0.00 ; 00958 OffsetX[ 1 ] = -1.00 ; OffsetY[ 1 ] = 0.00 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 00959 OffsetX[ 2 ] = 0.00 ; OffsetY[ 2 ] = 1.00 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = 0.00 ; 00960 OffsetX[ 3 ] = -1.00 ; OffsetY[ 3 ] = -1.00 ; OffsetW[ 3 ] = 1.50 ; OffsetH[ 3 ] = 1.50 ; 00961 OffsetX[ 4 ] = 1.00 ; OffsetY[ 4 ] = 1.00 ; OffsetW[ 4 ] = 0.00 ; OffsetH[ 4 ] = 0.00 ; 00962 break; 00963 case 4: 00964 OffsetX[ 0 ] = -1.20 ; OffsetY[ 0 ] = 1.00 ; OffsetW[ 0 ] = 0.00 ; OffsetH[ 0 ] = 0.00 ; 00965 OffsetX[ 1 ] = -0.70 ; OffsetY[ 1 ] = -1.00 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 00966 OffsetX[ 2 ] = 1.50 ; OffsetY[ 2 ] = 0.00 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = 0.00 ; 00967 OffsetX[ 3 ] = 0.00 ; OffsetY[ 3 ] = 1.50 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = 0.00 ; 00968 OffsetX[ 4 ] = -1.00 ; OffsetY[ 4 ] = -0.50 ; OffsetW[ 4 ] = 1.50 ; OffsetH[ 4 ] = 1.50 ; 00969 break; 00970 } 00971 } 00972 else if( Level.InitialCartoonEffect == 3 ) 00973 { 00974 // ---- -------- ---- 00975 // | || || | 00976 // | || || | 00977 // | || 4 || 3 | 00978 // | 0 || || | 00979 // | | ------- ---- 00980 // | | --- -------- 00981 // | || 1 || 2 | 00982 // ---- --- -------- 00983 00984 switch( RealTimeWndId ) 00985 { 00986 case 0: 00987 OffsetX[ 0 ] = -0.1 ; OffsetY[ 0 ] = -0.10 ; OffsetW[ 0 ] = 1.50 ; OffsetH[ 0 ] = 0.20 ; 00988 OffsetX[ 1 ] = 0.00 ; OffsetY[ 1 ] = 1.50 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 00989 OffsetX[ 2 ] = 0.00 ; OffsetY[ 2 ] = -1.50 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = 0.00 ; 00990 OffsetX[ 3 ] = 1.00 ; OffsetY[ 3 ] = -1.00 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = 0.00 ; 00991 OffsetX[ 4 ] = 1.00 ; OffsetY[ 4 ] = 1.00 ; OffsetW[ 4 ] = 0.00 ; OffsetH[ 4 ] = 0.00 ; 00992 break; 00993 case 1: 00994 OffsetX[ 0 ] = -0.60 ; OffsetY[ 0 ] = 0.00 ; OffsetW[ 0 ] = 0.00 ; OffsetH[ 0 ] = 0.00 ; 00995 OffsetX[ 1 ] = -0.50 ; OffsetY[ 1 ] = -1.50 ; OffsetW[ 1 ] = 1.50 ; OffsetH[ 1 ] = 1.6 ; 00996 OffsetX[ 2 ] = 1.60 ; OffsetY[ 2 ] = 0.00 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = 0.00 ; 00997 OffsetX[ 3 ] = 0.00 ; OffsetY[ 3 ] = 1.30 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = 0.00 ; 00998 OffsetX[ 4 ] = 0.00 ; OffsetY[ 4 ] = -1.80 ; OffsetW[ 4 ] = 0.00 ; OffsetH[ 4 ] = 0.00 ; 00999 break; 01000 case 2: 01001 OffsetX[ 0 ] = -0.80 ; OffsetY[ 0 ] = 2.00 ; OffsetW[ 0 ] = 0.00 ; OffsetH[ 0 ] = 0.00 ; 01002 OffsetX[ 1 ] = 0.00 ; OffsetY[ 1 ] = 1.00 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 01003 OffsetX[ 2 ] = -1.40 ; OffsetY[ 2 ] = -1.50 ; OffsetW[ 2 ] = 1.60 ; OffsetH[ 2 ] = 1.60 ; 01004 OffsetX[ 3 ] = 0.20 ; OffsetY[ 3 ] = -1.70 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = 0.00 ; 01005 OffsetX[ 4 ] = -0.50 ; OffsetY[ 4 ] = -1.80 ; OffsetW[ 4 ] = 0.00 ; OffsetH[ 4 ] = 0.00 ; 01006 break; 01007 case 3: 01008 OffsetX[ 0 ] = -0.20 ; OffsetY[ 0 ] = 1.60 ; OffsetW[ 0 ] = 0.00 ; OffsetH[ 0 ] = 0.00 ; 01009 OffsetX[ 1 ] = -0.40 ; OffsetY[ 1 ] = -1.80 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 01010 OffsetX[ 2 ] = 0.00 ; OffsetY[ 2 ] =2.00 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = 0.00 ; 01011 OffsetX[ 3 ] = -1.40 ; OffsetY[ 3 ] = -0.20 ; OffsetW[ 3 ] = 1.60 ; OffsetH[ 3 ] = 1.0 ; 01012 OffsetX[ 4 ] = -1.60 ; OffsetY[ 4 ] = 0.04 ; OffsetW[ 4 ] = -0.20 ; OffsetH[ 4 ] = -0.60 ; 01013 break; 01014 case 4: 01015 OffsetX[ 0 ] = -1.00 ; OffsetY[ 0 ] = 0.00 ; OffsetW[ 0 ] = 0.00 ; OffsetH[ 0 ] = 0.00 ; 01016 OffsetX[ 1 ] = 0.00 ; OffsetY[ 1 ] = 1.60 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 01017 OffsetX[ 2 ] = 0.50 ; OffsetY[ 2 ] = 1.60 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = 0.00 ; 01018 OffsetX[ 3 ] = 1.00 ; OffsetY[ 3 ] = 0.50 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = 0.00 ; 01019 OffsetX[ 4 ] = -0.80 ; OffsetY[ 4 ] = -0.20 ; OffsetW[ 4 ] = 1.60 ; OffsetH[ 4 ] = 1.30 ; 01020 break; 01021 } 01022 } 01023 else if( Level.InitialCartoonEffect == 4 ) 01024 { 01025 // --- ----- ------- ----- --- 01026 // | || || || || | 01027 // | || || || || | 01028 // | 0|| 1 || 2 || 3 || 4| 01029 // | || || || || | 01030 // | || || || || | 01031 // | || || || || | 01032 // --- ----- ------- ----- --- 01033 01034 switch( RealTimeWndId ) 01035 { 01036 case 0: 01037 OffsetX[ 0 ] = -0.1 ; OffsetY[ 0 ] = -0.10 ; OffsetW[ 0 ] = 1.70 ; OffsetH[ 0 ] = 0.20 ; 01038 OffsetX[ 1 ] = 0.00 ; OffsetY[ 1 ] = 1.00 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 01039 OffsetX[ 2 ] = 0.00 ; OffsetY[ 2 ] = -1.00 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = 0.00 ; 01040 OffsetX[ 3 ] = 0.00 ; OffsetY[ 3 ] = 1.00 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = 0.00 ; 01041 OffsetX[ 4 ] = 0.00 ; OffsetY[ 4 ] = -1.00 ; OffsetW[ 4 ] = 0.00 ; OffsetH[ 4 ] = 0.00 ; 01042 break; 01043 case 1: 01044 OffsetX[ 0 ] = -0.60 ; OffsetY[ 0 ] = 0.00 ; OffsetW[ 0 ] = 0.00 ; OffsetH[ 0 ] = 0.00 ; 01045 OffsetX[ 1 ] = -0.50 ; OffsetY[ 1 ] = -0.1 ; OffsetW[ 1 ] = 1.70 ; OffsetH[ 1 ] = 0.2 ; 01046 OffsetX[ 2 ] = 1.10 ; OffsetY[ 2 ] = 0.00 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = 0.00 ; 01047 OffsetX[ 3 ] = 0.00 ; OffsetY[ 3 ] = 1.30 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = 0.00 ; 01048 OffsetX[ 4 ] = 0.00 ; OffsetY[ 4 ] = -1.80 ; OffsetW[ 4 ] = 0.00 ; OffsetH[ 4 ] = 0.00 ; 01049 break; 01050 case 2: 01051 OffsetX[ 0 ] = -0.50 ; OffsetY[ 0 ] = 0.00 ; OffsetW[ 0 ] = 0.00 ; OffsetH[ 0 ] = 0.00 ; 01052 OffsetX[ 1 ] = 0.80 ; OffsetY[ 1 ] = 1.20 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 01053 OffsetX[ 2 ] = -0.80 ; OffsetY[ 2 ] = -0.10 ; OffsetW[ 2 ] = 1.80 ; OffsetH[ 2 ] = 0.70 ; 01054 OffsetX[ 3 ] = -0.80 ; OffsetY[ 3 ] = -1.20 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = 0.00 ; 01055 OffsetX[ 4 ] = 0.50 ; OffsetY[ 4 ] = 0.00 ; OffsetW[ 4 ] = 0.00 ; OffsetH[ 4 ] = 0.00 ; 01056 break; 01057 case 3: 01058 OffsetX[ 0 ] = -0.20 ; OffsetY[ 0 ] = 1.60 ; OffsetW[ 0 ] = 0.00 ; OffsetH[ 0 ] = 0.00 ; 01059 OffsetX[ 1 ] = -0.40 ; OffsetY[ 1 ] = -1.80 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = 0.00 ; 01060 OffsetX[ 2 ] = -0.80 ; OffsetY[ 2 ] = 0.20 ; OffsetW[ 2 ] = -0.40 ; OffsetH[ 2 ] = -0.40 ; 01061 OffsetX[ 3 ] = -1.20 ; OffsetY[ 3 ] = -0.10 ; OffsetW[ 3 ] = 1.70 ; OffsetH[ 3 ] = 0.2 ; 01062 OffsetX[ 4 ] = 0.60 ; OffsetY[ 4 ] = 0.00 ; OffsetW[ 4 ] = 0.00 ; OffsetH[ 4 ] = 0.00 ; 01063 break; 01064 case 4: 01065 OffsetX[ 0 ] = 0.00 ; OffsetY[ 0 ] = 0.60 ; OffsetW[ 0 ] = 0.00 ; OffsetH[ 0 ] = -1.20 ; 01066 OffsetX[ 1 ] = 0.00 ; OffsetY[ 1 ] = 0.80 ; OffsetW[ 1 ] = 0.00 ; OffsetH[ 1 ] = -1.60 ; 01067 OffsetX[ 2 ] = 0.00 ; OffsetY[ 2 ] = 1.00 ; OffsetW[ 2 ] = 0.00 ; OffsetH[ 2 ] = -2.00 ; 01068 OffsetX[ 3 ] = 0.00 ; OffsetY[ 3 ] = 1.20 ; OffsetW[ 3 ] = 0.00 ; OffsetH[ 3 ] = -2.40 ; 01069 OffsetX[ 4 ] = -1.30 ; OffsetY[ 4 ] = -0.10 ; OffsetW[ 4 ] = 1.50 ; OffsetH[ 4 ] = 0.20 ; 01070 break; 01071 } 01072 } 01073 01074 For( Loop=0;Loop<5;Loop++) 01075 { 01076 OffsetX[ Loop ] *= SpeedFactor; 01077 OffsetY[ Loop ] *= SpeedFactor; 01078 OffsetW[ Loop ] *= SpeedFactor; 01079 OffsetH[ Loop ] *= SpeedFactor; 01080 } 01081 } 01082 01083 Width = C.ClipX; 01084 Height = C.ClipY; 01085 01086 dX = 8; 01087 dY = 8; 01088 Border = 3; 01089 01090 01091 // ScreenShot 01092 01093 if( CanDisplay ) 01094 if( HudCartoonWnd == none ) 01095 { 01096 HudCartoonWnd = spawn(class'CWndFullScreen'); 01097 HudCartoonWnd.MyHudForFX = self; 01098 } 01099 01100 if( ! HudCartoonInit ) 01101 { 01102 PawnOwner.PlayMenu( hIntroBeginMap ); 01103 HudCartoonInit = true; 01104 HudCartoonWndID = Level.InitialCartoonEffect; 01105 01106 if( Level.InitialCartoonEffect == 1 ) 01107 { 01108 // -------- ---- ---- 01109 // | | | || 4 | 01110 // | 0 | | 2 |---- 01111 // | | | |---- 01112 // -------- ---- | 3 | 01113 // ------------- | | 01114 // | 1 || | 01115 // ------------- ---- 01116 01117 X[ 0 ] = Width * 0.08; Y[ 0 ] = Height * 0.08; W[ 0 ] = Width * 0.40; H[ 0 ] = Height * 0.52; 01118 X[ 1 ] = Width * 0.08; Y[ 1 ] = Height * 0.66; W[ 1 ] = Width * 0.62; H[ 1 ] = Height * 0.26; 01119 X[ 2 ] = Width * 0.52; Y[ 2 ] = Height * 0.08; W[ 2 ] = Width * 0.18; H[ 2 ] = Height * 0.52; 01120 X[ 3 ] = Width * 0.74; Y[ 3 ] = Height * 0.38; W[ 3 ] = Width * 0.18; H[ 3 ] = Height * 0.54; 01121 X[ 4 ] = Width * 0.74; Y[ 4 ] = Height * 0.08; W[ 4 ] = Width * 0.18; H[ 4 ] = Height * 0.24; 01122 } 01123 else if( Level.InitialCartoonEffect == 2 ) 01124 { 01125 // ------------- ---- 01126 // | 0 || | 01127 // ------------- | | 01128 // -------- ---- | 4 | 01129 // | || 2 || | 01130 // | 1 |---- ---- 01131 // | |--------- 01132 // | || 3 | 01133 // -------- --------- 01134 01135 X[ 0 ] = Width * 0.08; Y[ 0 ] = Height * 0.08; W[ 0 ] = Width * 0.60; H[ 0 ] = Height * 0.21; 01136 X[ 1 ] = Width * 0.08; Y[ 1 ] = Height * 0.35; W[ 1 ] = Width * 0.33; H[ 1 ] = Height * 0.57; 01137 X[ 2 ] = Width * 0.45; Y[ 2 ] = Height * 0.35; W[ 2 ] = Width * 0.23; H[ 2 ] = Height * 0.29; 01138 X[ 3 ] = Width * 0.45; Y[ 3 ] = Height * 0.70; W[ 3 ] = Width * 0.47; H[ 3 ] = Height * 0.22; 01139 X[ 4 ] = Width * 0.72; Y[ 4 ] = Height * 0.08; W[ 4 ] = Width * 0.20; H[ 4 ] = Height * 0.56; 01140 } 01141 else if( Level.InitialCartoonEffect == 3 ) 01142 { 01143 // ---- -------- ---- 01144 // | || || | 01145 // | || || | 01146 // | || 4 || 3 | 01147 // | 0 || || | 01148 // | | ------- ---- 01149 // | | --- -------- 01150 // | || 1 || 2 | 01151 // ---- --- -------- 01152 01153 X[ 0 ] = Width * 0.08; Y[ 0 ] = Height * 0.08; W[ 0 ] = Width * 0.12; H[ 0 ] = Height * 0.84; 01154 X[ 1 ] = Width * 0.24; Y[ 1 ] = Height * 0.76; W[ 1 ] = Width * 0.12; H[ 1 ] = Height * 0.16; 01155 X[ 2 ] = Width * 0.40; Y[ 2 ] = Height * 0.76; W[ 2 ] = Width * 0.52; H[ 2 ] = Height * 0.16; 01156 X[ 3 ] = Width * 0.80; Y[ 3 ] = Height * 0.08; W[ 3 ] = Width * 0.12; H[ 3 ] = Height * 0.62; 01157 X[ 4 ] = Width * 0.24; Y[ 4 ] = Height * 0.08; W[ 4 ] = Width * 0.52; H[ 4 ] = Height * 0.62; 01158 } 01159 else if( Level.InitialCartoonEffect == 4 ) 01160 { 01161 // --- ----- ------- ----- --- 01162 // | || || || || | 01163 // | || || || || | 01164 // | 0|| 1 || 2 || 3 || 4| 01165 // | || || || || | 01166 // | || || || || | 01167 // | || || || || | 01168 // --- ----- ------- ----- --- 01169 01170 X[ 0 ] = Width * 0.08; Y[ 0 ] = Height * 0.08; W[ 0 ] = Width * 0.08; H[ 0 ] = Height * 0.84; 01171 X[ 1 ] = Width * 0.20; Y[ 1 ] = Height * 0.08; W[ 1 ] = Width * 0.12; H[ 1 ] = Height * 0.84; 01172 X[ 2 ] = Width * 0.36; Y[ 2 ] = Height * 0.08; W[ 2 ] = Width * 0.28; H[ 2 ] = Height * 0.84; 01173 X[ 3 ] = Width * 0.68; Y[ 3 ] = Height * 0.08; W[ 3 ] = Width * 0.12; H[ 3 ] = Height * 0.84; 01174 X[ 4 ] = Width * 0.84; Y[ 4 ] = Height * 0.08; W[ 4 ] = Width * 0.08; H[ 4 ] = Height * 0.84; 01175 } 01176 01177 For( Loop=0;Loop<5;Loop++) 01178 { 01179 InitX[ Loop ] = X[ Loop ]; 01180 InitY[ Loop ] = Y[ Loop ]; 01181 InitW[ Loop ] = W[ Loop ]; 01182 InitH[ Loop ] = H[ Loop ]; 01183 } 01184 } 01185 else 01186 { 01187 if( HideCartoonHud ) 01188 { 01189 For( Loop=0;Loop<5;Loop++) 01190 { 01191 X[ Loop ] += OffsetX[ Loop ]*dT*30*2; 01192 Y[ Loop ] += OffsetY[ Loop ]*dT*30*2; 01193 W[ Loop ] += OffsetW[ Loop ]*dT*30*2; 01194 H[ Loop ] += OffsetH[ Loop ]*dT*30*2; 01195 01196 if( W[ Loop ] < 0.0 ) 01197 W[ Loop ] = 0.0; 01198 01199 if( H[ Loop ] < 0.0 ) 01200 W[ Loop ] = 0.0; 01201 } 01202 01203 if( X[ RealTimeWndId ] <= 0 ) 01204 { 01205 X[ RealTimeWndId ] = 0.0; 01206 OffsetW[ RealTimeWndId ] += OffsetX[ RealTimeWndId ]; 01207 OffsetX[ RealTimeWndId ] = 0.0; 01208 } 01209 01210 if( Y[ RealTimeWndId ] <= 0 ) 01211 { 01212 Y[ RealTimeWndId ] = 0.0; 01213 OffsetH[ RealTimeWndId ] += OffsetY[ RealTimeWndId ]; 01214 OffsetY[ RealTimeWndId ] = 0.0; 01215 } 01216 01217 if( W[ RealTimeWndId ] > Width ) 01218 { 01219 W[ RealTimeWndId ]= Width; 01220 OffsetW[ RealTimeWndId ]= 0.0; 01221 } 01222 01223 if( H[ RealTimeWndId ] > Height ) 01224 { 01225 H[ RealTimeWndId ]= Height; 01226 OffsetH[ RealTimeWndId ]= 0.0; 01227 } 01228 } 01229 } 01230 01231 // Add Cartoon Window 01232 01233 C.Style = ERenderStyle.STY_Alpha; 01234 C.bUseBorder = false; 01235 01236 C.DrawColor = BlackColor; 01237 01238 C.SetPos(0,0); 01239 C.DrawTile(WhiteTex, X[RealTimeWndId],Height, 0, 0, WhiteTex.USize, WhiteTex.VSize); 01240 01241 C.SetPos(X[RealTimeWndId],0); 01242 C.DrawTile(WhiteTex, Width-X[RealTimeWndId],Y[RealTimeWndId], 0, 0, WhiteTex.USize, WhiteTex.VSize); 01243 01244 C.SetPos(X[RealTimeWndId]+W[RealTimeWndId],0); 01245 C.DrawTile(WhiteTex, Width-X[RealTimeWndId]-W[RealTimeWndId],Height, 0, 0, WhiteTex.USize, WhiteTex.VSize); 01246 01247 C.SetPos(X[RealTimeWndId],Y[RealTimeWndId]+H[RealTimeWndId]); 01248 C.DrawTile(WhiteTex, W[RealTimeWndId],Height-Y[RealTimeWndId]-H[RealTimeWndId], 0, 0, WhiteTex.USize, WhiteTex.VSize); 01249 01250 // ScreenShot Display 01251 01252 C.DrawColor = WhiteColor; 01253 C.BorderColor = BlackColor; 01254 C.bUseBorder = true; 01255 01256 for( Loop=0; Loop<5;Loop++) 01257 { 01258 if( RealTimeWndId != Loop ) 01259 { 01260 if( ( W[Loop]!=0 ) && ( H[Loop]!=0 ) ) 01261 { 01262 C.bUseBorder = false; 01263 C.DrawColor = WhiteColor; 01264 C.SetPos(X[Loop]-Width*0.01,Y[Loop]-Height*0.015); 01265 C.DrawTile(WhiteTex, W[Loop]+Width*0.02,H[Loop]+Height*0.03, 0, 0, WhiteTex.USize, WhiteTex.VSize); 01266 01267 C.bUseBorder = true; 01268 01269 C.SetPos(X[Loop],Y[Loop]); 01270 01271 XF = InitX[Loop]; 01272 XF = XF/Width*256; 01273 YF = InitY[Loop]; 01274 YF = YF/Height*192+32; // convert from 1/1 to 4/3 01275 01276 WF = W[Loop]; 01277 WF = WF/Width*256; 01278 HF = H[Loop]; 01279 HF = HF/Height*192; // convert from 1/1 to 4/3 01280 01281 if( !HudCartoonWnd.WndIsUpdate ) 01282 { 01283 C.DrawColor = GrayColor; 01284 C.DrawTile(WhiteTex, W[Loop] ,H[Loop], XF, YF, WF, HF); 01285 } 01286 else 01287 { 01288 if( CanDisplay ) 01289 C.DrawTile(CWndMat, W[Loop] ,H[Loop], XF, YF, WF, HF); 01290 else 01291 C.DrawTile(WhiteTex, W[Loop] ,H[Loop], XF, YF, WF, HF); 01292 } 01293 } 01294 } 01295 else 01296 { 01297 C.bUseBorder = false; 01298 C.DrawColor = WhiteColor; 01299 01300 C.SetPos(X[Loop]-Width*0.01,Y[Loop]-Height*0.015); 01301 C.DrawTile(WhiteTex, W[Loop]+Width*0.02,Height*0.015, 0, 0, WhiteTex.USize, WhiteTex.VSize); 01302 01303 C.SetPos(X[Loop]-Width*0.01,Y[Loop]+H[Loop]); 01304 C.DrawTile(WhiteTex, W[Loop]+Width*0.02,Height*0.015, 0, 0, WhiteTex.USize, WhiteTex.VSize); 01305 01306 C.SetPos(X[Loop]-Width*0.01,Y[Loop]-Height*0.015); 01307 C.DrawTile(WhiteTex, Width*0.01,H[Loop]+Height*0.03, 0, 0, WhiteTex.USize, WhiteTex.VSize); 01308 01309 C.SetPos(X[Loop]+W[Loop],Y[Loop]-Height*0.015); 01310 C.DrawTile(WhiteTex, Width*0.01,H[Loop]+Height*0.03, 0, 0, WhiteTex.USize, WhiteTex.VSize); 01311 01312 C.bUseBorder = true; 01313 C.DrawColor = BlackColor; 01314 C.SetPos(X[Loop],Y[Loop]); 01315 C.DrawColor.A = 0; 01316 C.DrawTile(WhiteTex, W[Loop],H[Loop], 0, 0, WhiteTex.USize, WhiteTex.VSize); 01317 C.DrawColor.A = 255; 01318 } 01319 } 01320 01321 C.bUseBorder = false; 01322 01323 if( ( W[RealTimeWndId]==Width ) && ( H[RealTimeWndId]==Height ) ) 01324 if( ( X[RealTimeWndId]<=0 ) && ( Y[RealTimeWndId]<=0 ) ) 01325 { 01326 HudCartoonSFX = false; 01327 Level.InitialCartoonEffect = 0; 01328 XIIIGameInfo(Level.Game).MapInfo.EndCartoonEffect = true; 01329 TriggerEvent( 'EndCartoonEffect', self, none); 01330 } 01331 } 01332 01333 //____________________________________________________________________ 01334 // ELR End Game Display = GAME OVER !! 01335 function EndGameDisplay( canvas C ) 01336 { 01337 if ( HudMsg != none ) 01338 { 01339 C.SpaceX = 0; 01340 UseMsgFont(C); 01341 C.Style = ERenderStyle.STY_Alpha; 01342 HudMSG.DrawMsg(C); 01343 } 01344 } 01345 01346 //____________________________________________________________________ 01347 function PlayerNameDisplay(Canvas C); 01348 01349 //____________________________________________________________________ 01350 function DoorTimerDisplay(Canvas C) 01351 { 01352 local float XL,YL,X; 01353 local XIIIPorte Obj; 01354 local int iSec, iMilliSec; 01355 local string sTimerString; 01356 01357 // Already checked != none in DoorDisplay 01358 Obj = XIIIPlayerController(PawnOwner.Controller).aDoor; 01359 if ( Obj.fUnlocktimer > 0 ) 01360 { 01361 iSec = int(Obj.fUnlocktimer); 01362 iMilliSec = int( (Obj.fUnlocktimer - iSec)*100 ); 01363 if ( Len(string(iMilliSec)) <= 1 ) 01364 { 01365 if (iMilliSec < 10) 01366 sTimerString = iSec$":"$iMilliSec$"0"@sTimeLeft; 01367 else 01368 sTimerString = iSec$":0"$iMilliSec@sTimeLeft; 01369 } 01370 else 01371 sTimerString = iSec$":"$iMilliSec@sTimeLeft; 01372 01373 UseLargeFont(C); 01374 C.SpaceX=0; 01375 C.StrLen(" 3:00"@sTimeLeft$" ", X, YL); 01376 X += 5; 01377 C.StrLen(sTimerString, XL, YL); 01378 C.Style = ERenderStyle.STY_Alpha; 01379 C.BorderColor = WhiteColor; 01380 C.BorderColor.A = 128; 01381 01382 C.SetPos(C.ClipX/2.0 - X/2.0 - 2,C.ClipY/2.0 - 66); 01383 01384 C.DrawColor = WhiteColor * 0.5; 01385 C.DrawColor.A = 128; 01386 C.bUseBorder = true; 01387 C.DrawTile(FondMSG, X+4, YL+4, 0, 0, FondMSG.USize, FondMSG.VSize); 01388 C.bUseBorder = false; 01389 01390 C.DrawColor = WhiteColor; 01391 C.SetPos(C.ClipX/2.0-XL/2.0,C.ClipY/2.0 - 64); 01392 C.DrawText(sTimerString); 01393 C.SpaceX=0; 01394 } 01395 } 01396 01397 //____________________________________________________________________ 01398 function DamageWarnDisplay(Canvas C) 01399 { 01400 local int i; 01401 local float fSize, fTransp; 01402 local int DamageWarnType; 01403 local float ft; 01404 01405 DamageWarnType = 1; 01406 01407 bDrawDamageWarn = false; 01408 C.Style=ERenderStyle.STY_Translucent; 01409 // 0 = Front 01410 // 1 = Right 01411 // 2 = Left 01412 // 3 = back 01413 01414 if ( DamageWarnType == 1 ) 01415 fSize = 2.0; // *fDrawScale; // Test w/out drawscale for more splitt screen feedback 01416 else 01417 fSize = 2.5; // *fDrawScale; 01418 fTransp = fTranspWarningDamage*DamageWarnType; 01419 01420 XP = 0.5*C.ClipX; 01421 YP = 0.5*C.ClipY; 01422 switch(DamageWarnType) 01423 { 01424 Case 1: 01425 if ( fDrawDamageWarnTimer[0] > 0.0 ) 01426 { // Front 01427 C.DrawColor = RedColor*fTransp*fDrawDamageWarnTimer[0]; 01428 // C.SetPos( XP - DamageWarnTexFront.Usize/2.0*fSize*4.0 , YP - 64 - DamageWarnTexFront.VSize*fSize ); 01429 C.SetPos( XP - DamageWarnTexFront.Usize/2.0*fSize*4.0 , C.ClipY*UpMargin + 32 ); 01430 C.DrawRect(DamageWarnTexFront, DamageWarnTexFront.USize*fSize*4.0, DamageWarnTexFront.USize*fSize*2.0); 01431 fDrawDamageWarnTimer[0] -= 0.05; 01432 } 01433 if ( fDrawDamageWarnTimer[1] > 0.0 ) 01434 { // Right 01435 C.DrawColor = RedColor*fTransp*fDrawDamageWarnTimer[1]; 01436 // C.SetPos( XP + 64, YP - DamageWarnTexLeft.VSize/2.0*fSize*4.0); 01437 C.SetPos( C.ClipX*(1.0-RightMargin) - 32 - DamageWarnTexLeft.USize*fSize*2.0, YP - DamageWarnTexLeft.VSize/2.0*fSize*4.0); 01438 C.DrawTile(DamageWarnTexLeft, DamageWarnTexLeft.USize*fSize*2.0, DamageWarnTexLeft.VSize*fSize*4.0, 0, 0, -DamageWarnTexLeft.USize, DamageWarnTexLeft.VSize); 01439 fDrawDamageWarnTimer[1] -= 0.05; 01440 } 01441 if ( fDrawDamageWarnTimer[2] > 0.0 ) 01442 { // Left 01443 C.DrawColor = RedColor*fTransp*fDrawDamageWarnTimer[2]; 01444 // C.SetPos( XP - DamageWarnTexLeft.Usize*fSize - 64, YP - DamageWarnTexLeft.VSize/2.0*fSize*4.0); 01445 C.SetPos( C.ClipX*LeftMargin + 32, YP - DamageWarnTexLeft.VSize/2.0*fSize*4.0); 01446 C.DrawRect(DamageWarnTexLeft, DamageWarnTexFront.USize*fSize*2.0, DamageWarnTexFront.USize*fSize*4.0); 01447 fDrawDamageWarnTimer[2] -= 0.05; 01448 } 01449 if ( fDrawDamageWarnTimer[3] > 0.0 ) 01450 { // Back 01451 C.DrawColor = RedColor*fTransp*fDrawDamageWarnTimer[3]; 01452 // C.SetPos( XP - DamageWarnTexBack.Usize/2.0*fSize*4.0, YP + 64 ); 01453 C.SetPos( XP - DamageWarnTexBack.Usize/2.0*fSize*4.0, C.ClipY*(1.0-DownMargin) - 32 - DamageWarnTexFront.USize*fSize*2.0); 01454 C.DrawRect(DamageWarnTexBack, DamageWarnTexFront.USize*fSize*4.0, DamageWarnTexFront.USize*fSize*2.0); 01455 fDrawDamageWarnTimer[3] -= 0.05; 01456 } 01457 break; 01458 Case 2: 01459 if ( fDrawDamageWarnTimer[0] > 0.0 ) 01460 { // front 01461 if ( vDrawDamageWarnLoc[0] == vect(0,0,0) ) 01462 { 01463 fT = fRand()*0.5; 01464 vDrawDamageWarnLoc[0].Y = fT*(C.ClipY); 01465 vDrawDamageWarnLoc[0].X = C.ClipX*0.5 + (0.5-fT)*C.ClipX*(fRand()-0.5); 01466 } 01467 C.DrawColor = RedColor*fTransp*fDrawDamageWarnTimer[0]; 01468 C.SetPos( vDrawDamageWarnLoc[0].x - DamageWarnTex.Usize*fSize/2.0, vDrawDamageWarnLoc[0].y - DamageWarnTex.Vsize*fSize/2.0 ); 01469 C.DrawIcon(DamageWarnTex, fSize); 01470 fDrawDamageWarnTimer[0] -= 0.05; 01471 } 01472 if ( fDrawDamageWarnTimer[1] > 0.0 ) 01473 { // right 01474 if ( vDrawDamageWarnLoc[1] == vect(0,0,0) ) 01475 { 01476 vDrawDamageWarnLoc[1].X = 0.5 * fRand() * (C.ClipX*0.5) - DamageWarnTex.USize*fSize/2.0 + (C.ClipX*0.5); 01477 vDrawDamageWarnLoc[1].Y = 0.5*C.ClipX - DamageWarnTexFront.Usize*fSize/2.0; 01478 } 01479 C.DrawColor = RedColor*fTransp*fDrawDamageWarnTimer[1]; 01480 C.SetPos( vDrawDamageWarnLoc[1].x, vDrawDamageWarnLoc[1].y ); 01481 C.DrawIcon(DamageWarnTex, fSize); 01482 fDrawDamageWarnTimer[1] -= 0.05; 01483 } 01484 if ( fDrawDamageWarnTimer[2] > 0.0 ) 01485 { // left 01486 if ( vDrawDamageWarnLoc[2] == vect(0,0,0) ) 01487 { 01488 vDrawDamageWarnLoc[2].X = 0.5 * fRand() * (C.ClipX*0.5) - DamageWarnTex.USize*fSize/2.0; 01489 vDrawDamageWarnLoc[2].Y = 0.5*C.ClipX - DamageWarnTexFront.Usize*fSize/2.0; 01490 } 01491 C.DrawColor = RedColor*fTransp*fDrawDamageWarnTimer[2]; 01492 C.SetPos( vDrawDamageWarnLoc[2].x, vDrawDamageWarnLoc[2].y ); 01493 C.DrawIcon(DamageWarnTex, fSize); 01494 fDrawDamageWarnTimer[2] -= 0.05; 01495 } 01496 if ( fDrawDamageWarnTimer[3] > 0.0 ) 01497 { // back 01498 if ( vDrawDamageWarnLoc[3] == vect(0,0,0) ) 01499 { 01500 vDrawDamageWarnLoc[3].X = 0.5*C.ClipX - DamageWarnTexFront.Usize*fSize/2.0; 01501 vDrawDamageWarnLoc[3].Y = 0.5 * fRand() * (C.ClipY*0.5) - DamageWarnTex.Vsize*fSize/2.0 + (C.ClipY*0.5); 01502 } 01503 C.DrawColor = RedColor*fTransp*fDrawDamageWarnTimer[3]; 01504 C.SetPos( vDrawDamageWarnLoc[3].x, vDrawDamageWarnLoc[3].y ); 01505 C.DrawIcon(DamageWarnTex, fSize); 01506 fDrawDamageWarnTimer[3] -= 0.05; 01507 } 01508 break; 01509 } 01510 01511 for (i=0; i<4; i++) 01512 { 01513 if ( fDrawDamageWarnTimer[i] > 0.0 ) 01514 bDrawDamageWarn = true; 01515 else 01516 vDrawDamageWarnLoc[i] = vect(0,0,0); 01517 } 01518 } 01519 01520 01521 //____________________________________________________________________ 01522 // Cadre de Securite 01523 //____________________________________________________________________ 01524 01525 function DrawSafeArea( Canvas C ) 01526 { 01527 C.Style = ERenderStyle.STY_Alpha; 01528 C.DrawColor = GoldColor; 01529 C.BorderColor = GoldColor; 01530 C.DrawColor.A = 0; 01531 C.BorderColor.A = 255; 01532 C.bUseBorder = true; 01533 01534 C.SetPos(C.ClipX*LeftMargin,C.ClipY*UpMargin); 01535 C.DrawTile(FondMsg, C.ClipX*(1-LeftMargin-RightMargin),C.ClipY*(1-UpMargin-DownMargin), 0, 0, FondMsg.USize, FondMsg.VSize); 01536 C.bUseBorder = false; 01537 } 01538 01539 //____________________________________________________________________ 01540 function XIIIDrawAmmo(canvas C) 01541 { 01542 local string ItemText; 01543 local float H , BackGroundSize, ColorFact; 01544 local int bDrawbulletIcon; 01545 01546 // Retrieve Text 01547 ItemText = PawnOwner.Weapon.GetAmmoText(bDrawbulletIcon); 01548 UseHugeFont(C); 01549 01550 if( bDrawbulletIcon == 1 ) 01551 { 01552 if ( !PawnOwner.Weapon.HasAmmo() && !PawnOwner.Weapon.HasAltAmmo() && !(PawnOwner.Weapon.bHaveSlave && PawnOwner.Weapon.MySlave.ReloadCount > 0) ) 01553 { 01554 ColorFact = Level.TimeSeconds*1.5 - int(Level.TimeSeconds*1.5); 01555 C.DrawColor = HudWarningColor * ColorFact; 01556 } 01557 else 01558 C.DrawColor = HudBasicColor; 01559 DrawAmmo(C, ItemText); 01560 } 01561 } 01562 01563 //____________________________________________________________________ 01564 function DrawItemsIconsList(canvas C) 01565 { 01566 local string ItemText; 01567 local float L2, H2; 01568 local int Loop, NbWeapon, MaxWeaponIndex, Ammo; 01569 local float WeaponPos; 01570 local PowerUps W,TW[22]; 01571 local inventory I; 01572 local int XCoords, YCoords; 01573 01574 NbWeapon = 0; 01575 I = PawnOwner.Inventory; 01576 while ( I != none ) 01577 { // add items in array TW 01578 W = PowerUps(I); 01579 if ( ( W != none ) && (XIIIItems(I) != none) && I.bDisplayableInv ) 01580 { 01581 TW[W.InventoryGroup] = W; 01582 MaxWeaponIndex = Max(MaxWeaponIndex, W.InventoryGroup); 01583 NbWeapon++; 01584 } 01585 I = I.Inventory; 01586 } 01587 01588 // global pre drax init 01589 YP = C.ClipY * ( 1 - downMargin ); 01590 YP -= LifeDisplayHeight; 01591 WeaponPos = C.ClipX * ( 1 - RightMargin ) - (NbWeapon)*(2*LifeDisplayHeight+4) - LifeDisplayHeight; 01592 ItemText = Left("------", Ammo); 01593 C.StrLen(ItemText, L2, H2); 01594 C.bUseBorder = false; 01595 C.Style = ERenderStyle.STY_Alpha; 01596 01597 for( Loop=0; Loop<MaxWeaponIndex+1; Loop++) 01598 { 01599 W = TW[Loop]; 01600 01601 if ( W != none ) 01602 { 01603 if ( (XIIIItems(W).IHand == IH_2H) && PawnOwner.bHaveOnlyOneHandFree ) 01604 C.DrawColor = OrangeColor; 01605 else 01606 C.DrawColor = HudBasicColor*0.1; 01607 01608 if ( W == DrawnItem ) 01609 C.DrawColor.A= 140 ; 01610 else 01611 C.DrawColor.A= 70 ; 01612 01613 C.SetPos( WeaponPos,YP); 01614 C.DrawTile(FondMsg, 2*LifeDisplayHeight,LifeDisplayHeight, 0, 0, FondMsg.USize, FondMsg.VSize); 01615 01616 C.DrawColor= WhiteColor; 01617 01618 if ( W == DrawnItem ) 01619 { 01620 C.bUseBorder = true; 01621 C.BorderColor= HudBasicColor; 01622 C.BorderColor.A= 255 ; 01623 } 01624 01625 C.SetPos(WeaponPos,YP); 01626 // C.DrawTile(W.Icon, 2*LifeDisplayHeight,LifeDisplayHeight, 0, 0, W.Icon.USize, W.Icon.VSize); 01627 YCoords = XIIIItems(W).IconNumber / 4; 01628 XCoords = XIIIItems(W).IconNumber - YCoords * 4; 01629 C.DrawTile(HudWIcons, 2*LifeDisplayHeight, LifeDisplayHeight, 64*XCoords, 32*YCoords, 64, 32); 01630 C.bUseBorder = false; 01631 01632 // affichage du nombre d'item 01633 C.DrawColor= HudBasicColor; 01634 if ( W == DrawnItem ) 01635 C.DrawColor.A = 255; 01636 else 01637 C.DrawColor.A = 150; 01638 01639 Ammo = W.Charge; 01640 if( Ammo > 0 ) 01641 { 01642 if( Ammo > 6 ) 01643 Ammo = 6 ; 01644 ItemText = Left(sAmmoRef, Ammo); 01645 C.SetPos( WeaponPos,YP-LifeDisplayHeight/2-6 ); 01646 C.DrawText(ItemText, false); 01647 } 01648 WeaponPos += 2*LifeDisplayHeight + 4; 01649 } 01650 } 01651 01652 C.DrawColor = HudBasicColor*0.1; 01653 C.DrawColor.A= 70 ; 01654 C.bUseBorder = false; 01655 01656 C.SetPos( WeaponPos,YP); 01657 // HudWIcons coords 128+64(L=32) x 256-32(L=32) 01658 // C.DrawTile(RoundBackGroundTex, LifeDisplayHeight,LifeDisplayHeight, 32, 0, -RoundBackGroundTex.USize, RoundBackGroundTex.VSize); 01659 C.DrawTile(HudWIcons, LifeDisplayHeight,LifeDisplayHeight, 128+64+32, 256-32, -32, 32); 01660 01661 WeaponPos= C.ClipX * ( 1 - RightMargin ) - (NbWeapon)*(2*LifeDisplayHeight+4) - LifeDisplayHeight - LifeDisplayHeight - 4; 01662 01663 C.SetPos( WeaponPos,C.CurY); 01664 // C.DrawTile(RoundBackGroundTex, LifeDisplayHeight,LifeDisplayHeight, 0, 0, RoundBackGroundTex.USize, RoundBackGroundTex.VSize); 01665 C.DrawTile(HudWIcons, LifeDisplayHeight,LifeDisplayHeight, 128+64, 256-32, 32, 32); 01666 } 01667 01668 //____________________________________________________________________ 01669 // 01670 function DrawCurrentItem(canvas C) 01671 { 01672 local string ItemText; 01673 local float H , BackGroundSize; 01674 local int bDrawbulletIcon; 01675 01676 // Text 01677 UseHugeFont(C); 01678 C.SpaceX = 1; 01679 if ( (XIIIItems(PawnOwner.SelectedItem) != none) && (XIIIItems(PawnOwner.SelectedItem).bNumberedItem) ) 01680 { 01681 ItemText = string(PawnOwner.SelectedItem.Charge); 01682 ItemText = "x"$ItemText; 01683 } 01684 else 01685 ItemText = PawnOwner.SelectedItem.ItemName; 01686 // ItemText = Lowcaps(ItemText); 01687 C.StrLen(ItemText, BackGroundSize, H); 01688 01689 YP -= LifeDisplayHeight; 01690 01691 // BackGround 01692 C.Style = ERenderStyle.STY_Alpha; 01693 C.DrawColor = HudBasicColor*0.1; 01694 C.DrawColor.A = 90; 01695 C.SetPos(XP-2*(LifeDisplayHeight-4)-(BackGroundSize+8),YP+4); 01696 DrawStdBackground(C, LifeDisplayHeight-4, BackGroundSize+8); 01697 01698 C.bTextShadow = true; 01699 // Text 01700 C.DrawColor = HudBasicColor; 01701 C.SetPos(XP-(LifeDisplayHeight-4)-(BackGroundSize+8)+4,YP+2); 01702 C.DrawText(ItemText, false); 01703 } 01704 01705 //____________________________________________________________________ 01706 function NotifyNewWeapon(Class<Weapon> WClass) 01707 { 01708 local class<Pickup> PickClass; 01709 01710 PickClass = class<Pickup>(DynamicLoadObject(WClass.default.PickupClassName, class'Class')); 01711 01712 // Log("NotifyNewWeapon"@WClass@"PickupClass="$PickClass); 01713 // NewWeaponIndex = WClass.Default.InventoryGroup; 01714 // fDrawNewWeaponTimer = default.fDrawNewWeaponTimer; 01715 01716 if ( HudMsg == none ) 01717 { 01718 HudMsg = Spawn(class'HudMessage',self); 01719 HudMsg.SetUpLocalizedMessage( class'XIIILocalMessage', WClass.Default.InventoryGroup, none, none, PickClass, "" ); 01720 } 01721 else 01722 { 01723 HudMsg.AddLocalizedMessage( class'XIIILocalMessage', WClass.Default.InventoryGroup, none, none, PickClass, "" ); 01724 } 01725 } 01726 01727 //____________________________________________________________________ 01728 Simulated function AddHudEndMessage( 01729 class<LocalMessage> Message, 01730 optional int Switch, 01731 optional PlayerReplicationInfo RelatedPRI_1, 01732 optional PlayerReplicationInfo RelatedPRI_2, 01733 optional Object OptionalObject, 01734 optional string CriticalString 01735 ) 01736 { 01737 if ( HudEndMsg == none ) 01738 { 01739 HudEndMsg = Spawn(class'HudEndMessage',self); 01740 HudEndMsg.SetUpLocalizedMessage( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01741 } 01742 else 01743 { 01744 HudEndMsg.AddLocalizedMessage( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01745 } 01746 } 01747 01748 //____________________________________________________________________ 01749 simulated function AddHudObjMessage( 01750 class<LocalMessage> Message, 01751 optional int Switch, 01752 optional PlayerReplicationInfo RelatedPRI_1, 01753 optional PlayerReplicationInfo RelatedPRI_2, 01754 optional Object OptionalObject, 01755 optional string CriticalString 01756 ) 01757 { 01758 // Log("AddHudObjMessage"); 01759 if ( HudObjMsg == none ) 01760 { 01761 HudObjMsg = Spawn(class'HudObjectifMessage',self); 01762 HudObjMsg.SetUpLocalizedMessage( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01763 } 01764 else 01765 { 01766 HudObjMsg.AddLocalizedMessage( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01767 } 01768 } 01769 01770 //____________________________________________________________________ 01771 Simulated function AddHudMPMessage( 01772 class<LocalMessage> Message, 01773 optional int Switch, 01774 optional PlayerReplicationInfo RelatedPRI_1, 01775 optional PlayerReplicationInfo RelatedPRI_2, 01776 optional Object OptionalObject, 01777 optional string CriticalString 01778 ) 01779 { 01780 if ( HudMPMsg == none ) 01781 { 01782 HudMPMsg = Spawn(class'HudMPMessage',self); 01783 HudMPMsg.SetUpLocalizedMessage( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01784 } 01785 else 01786 { 01787 HudMPMsg.AddLocalizedMessage( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01788 } 01789 } 01790 01791 //____________________________________________________________________ 01792 Simulated function AddHudMessage( 01793 class<LocalMessage> Message, 01794 optional int Switch, 01795 optional PlayerReplicationInfo RelatedPRI_1, 01796 optional PlayerReplicationInfo RelatedPRI_2, 01797 optional Object OptionalObject, 01798 optional string CriticalString 01799 ) 01800 { 01801 // Log("AddHudMessage '"$CriticalString$"' HudMsg="$HudMsg); 01802 if ( HudMsg == none ) 01803 { 01804 HudMsg = Spawn(class'HudMessage',self); 01805 HudMsg.SetUpLocalizedMessage( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01806 } 01807 else 01808 { 01809 HudMsg.AddLocalizedMessage( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01810 } 01811 } 01812 01813 //____________________________________________________________________ 01814 Simulated function AddHudDialog( 01815 class<LocalMessage> Message, 01816 optional int Switch, 01817 optional PlayerReplicationInfo RelatedPRI_1, 01818 optional PlayerReplicationInfo RelatedPRI_2, 01819 optional Object OptionalObject, 01820 optional string CriticalString 01821 ) 01822 { 01823 if ( (HudDlg != none) && (Switch == 4) ) 01824 return; // cancel adding, low priority on 4 type (message ~ can't hold more ammo) 01825 01826 if ( HudDlg != none ) 01827 HudDlg.Destroy(); 01828 HudDlg = Spawn(class'HudDialog',self); 01829 HudDlg.SetUpLocalizedMessage( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01830 } 01831 01832 //____________________________________________________________________ 01833 Simulated function AddHudState( 01834 class<LocalMessage> Message, 01835 optional int Switch, 01836 optional PlayerReplicationInfo RelatedPRI_1, 01837 optional PlayerReplicationInfo RelatedPRI_2, 01838 optional Object OptionalObject, 01839 optional string CriticalString 01840 ) 01841 { 01842 // Log("HudState Message"); 01843 if ( HudStt != none ) 01844 HudStt.Destroy(); 01845 HudStt = Spawn(class'HudState',self); 01846 HudStt.SetUpLocalizedMessage( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01847 } 01848 01849 //____________________________________________________________________ 01850 function AddHudCartoonWindow(float XPos, float YPos, float DXSize, float DYSize, BitMapMaterial Tex, float X, float Y, float XSize, float YSize, float Lifetime, color cBorder, int CWndAppearFX, bool bLowPrio) 01851 { 01852 DebugLog("AddHudCartoonWindow High Priority="$!bLowPrio); 01853 if ( !bLowPrio ) 01854 EraseLowPriorityCartoonWindows(); 01855 01856 if ( HudWnd == none ) 01857 { 01858 HudWnd = Spawn(class'HudCartoonWindow',self); 01859 if( bLowPrio ) 01860 HudWnd.SetUpCartoonWindow(XPos, YPos, DXSize, DYSize, Tex, X, Y, XSize, YSize, Lifetime, cBorder, CWndAppearFX, true); 01861 else 01862 HudWnd.SetUpCartoonWindow(XPos, YPos, DXSize, DYSize, Tex, X, Y, XSize, YSize, Lifetime, cBorder, CWndAppearFX, false); 01863 } 01864 else 01865 { 01866 if( bLowPrio ) 01867 HudWnd.AddCartoonWindow(XPos, YPos, DXSize, DYSize, Tex, X, Y, XSize, YSize, Lifetime, cBorder, CWndAppearFX, true); 01868 else 01869 HudWnd.AddCartoonWindow(XPos, YPos, DXSize, DYSize, Tex, X, Y, XSize, YSize, Lifetime, cBorder, CWndAppearFX, false); 01870 } 01871 } 01872 01873 //____________________________________________________________________ 01874 function AddHudCartoonFocus(actor Focus, int AppearFX, bool bUseVignette, float Duration, bool zoom, float zoomFOV, float zoomDist, bool bDanger) 01875 { 01876 if ( HudFoc == none ) 01877 { 01878 HudFoc = Spawn(class'HudCartoonFocus',self); 01879 HudFoc.SetUpCartoonFocus(Focus, AppearFX, bUseVignette, Duration, zoom, zoomFOV, zoomDist, bDanger); 01880 } 01881 else 01882 { 01883 HudFoc.AddCartoonFocus(Focus, AppearFX, bUseVignette, Duration, zoom, zoomFOV, zoomDist, bDanger); 01884 } 01885 } 01886 01887 //____________________________________________________________________ 01888 function bool IsFocusing(Actor A) 01889 { 01890 if ( HudFoc == none ) 01891 return false; 01892 01893 while ( HudFoc != none ) 01894 { 01895 if ( HudFoc.MyFocus == A ) 01896 { 01897 return true; 01898 break; 01899 } 01900 HudFoc = HudFoc.NextHudFoc; 01901 } 01902 return false; 01903 } 01904 01905 /* 01906 //____________________________________________________________________ 01907 function AddHudOnoOverLay(vector v3DLocation, float Size, BitMapMaterial Tex, color cColor, float Lifetime, int CWFX, float Delay) 01908 { 01909 if ( !FastTrace( PawnOwner.Location + PawnOwner.EyePosition(), v3DLocation) ) 01910 return; 01911 01912 if ( HudOno == none ) 01913 { 01914 HudOno = Spawn(class'HudOnomatop',self); 01915 HudOno.SetUpOnoOverLay(v3DLocation, Size, Tex, cColor, Lifetime, CWFX, Delay); 01916 } 01917 else 01918 { 01919 HudOno.AddOnoOverLay(v3DLocation, Size, Tex, cColor, Lifetime, CWFX, Delay); 01920 } 01921 } 01922 */ 01923 01924 //____________________________________________________________________ 01925 function EraseCartoonWindows() 01926 { 01927 while ( HudWnd != none ) 01928 { 01929 HudWnd.RemoveMe(); 01930 } 01931 } 01932 01933 //____________________________________________________________________ 01934 function EraseLowPriorityCartoonWindows() 01935 { 01936 local HudCartoonWindow temp, temp2; 01937 01938 DebugLog("BEGIN EraseLowPriorityCartoonWindows"); 01939 01940 temp = HudWnd; 01941 while ( temp != none ) 01942 { 01943 DebugLog(" Erase ? "$Temp); 01944 01945 if (temp.bLowPriority) 01946 { 01947 DebugLog(" Erasing "$Temp); 01948 temp2 = temp.NextHudWnd; 01949 temp.RemoveMe(); 01950 temp = temp2; 01951 } 01952 else 01953 temp = temp.NextHudWnd; 01954 } 01955 DebugLog("END EraseLowPriorityCartoonWindows"); 01956 } 01957 01958 //____________________________________________________________________ 01959 simulated function Message( PlayerReplicationInfo PRI, coerce string Msg, name N ) 01960 { 01961 // Log("Message '"$Msg$"'"); 01962 01963 if ( Msg == "" ) 01964 return; 01965 01966 // ELR Add some text 01967 if ( (N == 'Say') || (N == 'TeamSay') ) 01968 Msg = PRI.PlayerName$": "$Msg; 01969 01970 if ( N == 'Death' ) 01971 LocalizedMessage(class'XIIIEndGameMessage', 1, none, none, none, Msg); 01972 else if ( N == 'PlayerEnter' ) 01973 LocalizedMessage(class'XIIIMultiMessage', -1, none, none, none, Msg@class'XIIIMultiMessage'.default.WelcomeMessage); 01974 else 01975 LocalizedMessage(class'XIIILocalMessage', 0, none, none, none, Msg); 01976 } 01977 01978 //____________________________________________________________________ 01979 simulated function LocalizedMessage( class<LocalMessage> Message, optional int Switch, optional PlayerReplicationInfo RelatedPRI_1, optional PlayerReplicationInfo RelatedPRI_2, optional Object OptionalObject, optional string CriticalString ) 01980 { 01981 if ( ( Message == class'XIIIEndGameMessage' ) || ( Message == class'XIIIMissionCompletedMessage' ) ) 01982 { 01983 AddHudEndMessage( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01984 bHideHud = true; 01985 } 01986 else if ( Message == class'XIIIDialogMessage' ) 01987 AddHudDialog( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01988 else if ( Message == class'XIIISaveMessage' ) 01989 AddHudState( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01990 else if ( Message == class'XIIIGoalMessage' ) 01991 AddHudObjMessage( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01992 else 01993 AddHudMessage( Message, Switch, RelatedPRI_1, RelatedPRI_2, OptionalObject, CriticalString ); 01994 } 01995 01996 //____________________________________________________________________ 01997 function AddDamageWarn(int RelativeHitLoc) 01998 { 01999 bDrawDamageWarn = true; 02000 // bDrawDamageDir = true; 02001 02002 // 0 = Front 02003 // 1 = Right 02004 // 2 = Left 02005 // 3 = back 02006 // log("receiving AddDamageWarn w/ RelativeHitLoc="$RelativeHitLoc); 02007 fDrawDamageWarnTimer[RelativeHitLoc] = 1.0; 02008 // fDrawDamageDirTimer[RelativeHitLoc] = 1.0; 02009 vDrawDamageWarnLoc[RelativeHitLoc] = vect(0,0,0); 02010 } 02011 02012 //____________________________________________________________________ 02013 function ResetSixSenseSFX() 02014 { 02015 local int i; 02016 02017 for (i=0;i<5;i++) 02018 fDrawSixSenseTimer[i] = 0.0; 02019 } 02020 02021 //____________________________________________________________________ 02022 function AddSixSenseFX(Vector V) 02023 { 02024 local int i, iOldestTimer; 02025 local float fOldestTimer; 02026 02027 // Log("AddSixSenseFX called"); 02028 fOldestTimer = 99.0; 02029 iOldestTimer = -1; 02030 for (i=0;i<5;i++) 02031 { 02032 if ( fDrawSixSenseTimer[i] <= 0 ) 02033 { 02034 vSixSensePos[i] = V; 02035 fDrawSixSenseTimer[i] = 1.0; 02036 return; 02037 } 02038 else 02039 { 02040 if ( fDrawSixSenseTimer[i] < fOldestTimer ) 02041 { 02042 fOldestTimer = fDrawSixSenseTimer[i]; 02043 iOldestTimer = i; 02044 } 02045 } 02046 // no slot found, erase the oldest timer 02047 } 02048 if ( iOldestTimer >= 0 ) 02049 { 02050 vSixSensePos[iOldestTimer] = V; 02051 fDrawSixSenseTimer[iOldestTimer] = 1.0; 02052 } 02053 } 02054 02055 //____________________________________________________________________ 02056 function AddChronoDisplay(string S, optional float Duration) 02057 { 02058 bDrawChrono = true; 02059 if ( Duration > 0.0 ) 02060 fDrawChronoTimer = Level.TimeSeconds+Duration; 02061 else 02062 fDrawChronoTimer = Level.TimeSeconds+1.0; 02063 sChronoString = S; 02064 } 02065 02066 //____________________________________________________________________ 02067 // Font Selection. 02068 function UseSmallFont(Canvas Canvas) 02069 { 02070 Canvas.Font = SmallFont; 02071 } 02072 02073 function UseNumericLargeFont(Canvas Canvas) 02074 { 02075 Canvas.Font = Canvas.SmallFont; 02076 } 02077 02078 function UseMediumFont(Canvas Canvas) 02079 { 02080 if ( fDrawScale <= 0.5 ) 02081 Canvas.Font = SmallFont; 02082 else if ( Canvas.ClipX <= 640 ) 02083 Canvas.Font = MedFont; 02084 else 02085 Canvas.Font = BigFont; 02086 } 02087 02088 function UseLargeFont(Canvas Canvas) 02089 { 02090 if ( fDrawScale <= 0.5 ) 02091 Canvas.Font = MedFont; 02092 else if ( Canvas.ClipX <= 640 ) 02093 Canvas.Font = BigFont; 02094 else 02095 Canvas.Font = LargeFont; 02096 } 02097 02098 function UseHugeFont(Canvas Canvas) 02099 { 02100 if ( fDrawScale <= 0.5 ) 02101 Canvas.Font = BigFont; 02102 else 02103 Canvas.Font = LargeFont; 02104 } 02105 02106 function UseMsgFont(Canvas C) 02107 { 02108 if ( fDrawScale <= 0.5 ) 02109 C.Font = MedFont; 02110 else 02111 C.Font = BigFont; 02112 } 02113 02114 function UseDialogFont(Canvas C) 02115 { 02116 C.Font = BigFont; 02117 } 02118 02119 function UseItemFont(Canvas C) 02120 { 02121 if( C.ClipX <= 800 ) 02122 C.Font = BigFont; 02123 else 02124 C.Font = LargeFont; 02125 } 02126 02127 function UseHeadFont(Canvas C) 02128 { 02129 if( C.ClipX <= 800 ) 02130 C.Font = SmallFont; 02131 else 02132 C.Font = MedFont; 02133 C.Font = MedFont; 02134 } 02135 02136 02137 02138 defaultproperties 02139 { 02140 LeftMargin2=-1.000000 02141 RightMargin2=-1.000000 02142 UpMargin2=-1.000000 02143 downMargin2=-1.000000 02144 FondDlg=Texture'XIIIMenu.HUD.fondialog' 02145 FlechDlg=Texture'XIIIMenu.HUD.flechdialogA' 02146 DamageWarnTexFront=Texture'XIIIMenu.HUD.impactfront' 02147 DamageWarnTexBack=Texture'XIIIMenu.HUD.impactback' 02148 DamageWarnTexLeft=Texture'XIIIMenu.HUD.impactside' 02149 DamageWarnTex=Texture'XIIICine.effets.vignetteblood' 02150 fTranspWarningDamage=0.350000 02151 ViewPortId=-1 02152 WhiteTex=Texture'XIIIMenu.HUD.blanc' 02153 BlackTex=Texture'XIIIMenu.HUD.noir' 02154 HudCartoonOffset=-0.200000 02155 LastSwitchTime=-1 02156 CartoonWindowNumber=5 02157 switchDelay=1.500000 02158 SpeedFactor=8.000000 02159 hIntroBeginMap=Sound'XIIIsound.Interface__BeginMap.BeginMap__hBeginMap' 02160 hIntroBeginMapFocus=Sound'XIIIsound.Interface__BeginMap.BeginMap__hBeginMapFocus' 02161 hIntroBeginMapPlayerMove=Sound'XIIIsound.Interface__BeginMap.BeginMap__hBeginMapPlayerMove' 02162 sTimeLeft="left" 02163 SmallFont=Font'XIIIFonts.XIIISmallFont' 02164 MedFont=Font'XIIIFonts.XIIIConsoleFont' 02165 BigFont=Font'XIIIFonts.PoliceF16' 02166 LargeFont=Font'XIIIFonts.PoliceF20' 02167 RoundBackGroundTex=Texture'XIIIMenu.HUD.fondmsg2' 02168 FondMsg=Texture'XIIIMenu.HUD.FondMsg' 02169 OrangeColor=(G=180,R=220,A=255) 02170 BlackColor=(A=255) 02171 GoldColor=(G=255,R=255,A=255) 02172 RedColor=(R=255,A=255) 02173 BlueColor=(B=255,A=255) 02174 GreenColor=(G=255,A=255) 02175 TurqColor=(B=255,G=128,A=255) 02176 GrayColor=(B=200,G=200,R=200,A=255) 02177 CyanColor=(B=255,G=255,A=255) 02178 PurpleColor=(B=255,R=255,A=255) 02179 LightGreenColor=(B=140,G=255,R=140,A=255) 02180 LightBlueColor=(B=255,G=110,R=110,A=255) 02181 LightPurpleColor=(B=160,G=100,R=160,A=255) 02182 SixSenseTex=Texture'XIIIMenu.SFX.sonvisual' 02183 SixSenseDisplayTex=Texture'XIIIMenu.HUD.6sense' 02184 BulletIconTex=Texture'XIIIMenu.HUD.bullet_iconA' 02185 LeftMargin=0.070000 02186 RightMargin=0.070000 02187 UpMargin=0.070000 02188 DownMargin=0.070000 02189 HudIcons=Texture'XIIIMenu.HUD.HudIcons' 02190 HudWIcons=Texture'XIIIMenu.HUD.Weapon1Icons' 02191 sAmmoRef="••••••" 02192 }

End Source Code