This is for 3P VERT SPLIT but a few changes can make it work for horizontal as well.
1. Add new type of SplitScreenInfo to enum ESplitScreenType so it now looks like this:
Code:
enum ESplitScreenType
{
eSST_NONE, // No split
eSST_2P_HORIZONTAL, // 2 player horizontal split
eSST_2P_VERTICAL, // 2 player vertical split
eSST_3P_FAVOR_TOP, // 3 Player split with 1 player on top and 2 on bottom
eSST_3P_FAVOR_BOTTOM, // 3 Player split with 1 player on bottom and 2 on top
eSST_4P, // 4 Player split
eSST_3P_VERTICAL // 3 Player Vertical Split each get 1/3 width of screen
};
2. Define it in the DefaultProperties block:
Code:
SplitscreenInfo(eSST_3P_VERTICAL)=
{(PlayerData=((SizeX=0.3f,SizeY=1.0f,OriginX=0.0f,OriginY=0.0f), (SizeX=0.3f,SizeY=1.0f,OriginX=0.3f,OriginY=0.0f),(SizeX=0.3f,SizeY=1.0f,OriginX=0.6f,OriginY=0.0f)))}
3. In GetPixelSizeOfScreen(), add this:
Code:
case eSST_3P_VERTICAL:
out_Width = Canvas.ClipX * 3;
out_Height = Canvas.ClipY;
return;
4. I have no clue what the SafeZones are for, but this how I set them up.
For HasTopSafeZone(), HasBottomSafeZone() and HasLeftSafeZone() I used the same case block as 2P_VERTICAL
For HasRightSafeZone(),
Code:
case eSST_3P_VERTICAL:
return (LocalPlayerIndex < 2) ? false : true;
5. In UpdateActiveSplitscreenType(), I commented out the code existing for case 3 and made it
Code:
SplitType = eSST_3P_VERTICAL;
On testing this using DebugCreatePlayer, it shows a 3P Vertical Split with some left-over part of the screen. I tried changing the definition to accommodate the entire screen but all this did was make the game part black even though I can see each player's HUD.
To make the split horizontal all you have to do is change the definition. (hint: SizeY and OriginY take the values instead of SizeX and OriginX)
Hope this helps.
Bookmarks