MOTY 2013

Dedicated to the discussion of OTP and Deus Ex in general.

Moderators: Master_Kale, TNM Team

Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: MOTY 2013

Post by Hanfling »

Cybernetic pig wrote:Well, that is one point of them. They are most commonly used for minor tweaks.
GMDX Release notes reads like a collection of many many minor tweaks making up a whole new experience. But the point is you can bundle them, add features which are easy to do as mutators, add custom playerpawn, gameinfo and rootwindow class and you are good to go.

And björn and I would really really love to see these features implemented as mutators. And at least starting with Revision 1.1 (maybe even 1.0, thats not settled yet) it will be at it's core a game content neutral framework which will fix a lot of bugs in DeusEx and offer a huge amount of added interface for rootwindow, playerpawns, gameinfos, missionscripts, etc. To give you just a teaser:

Code: Select all

//=============================================================================
// RevisionRootWindow.
//=============================================================================
class RevisionRootWindow expands DeusExRootWindow;

//
// INT Scale;
// if ( ForcedMaxScale>0 )
//   Scale = (INT)Max(1,Min(ScreenWidth/HorizontalDivisor,ScreenHeight/VerticalDivisor,ForcedMaxScale))
// else
//   Scale = (INT)Max(1,Min(ScreenWidth/HorizontalDivisor,ScreenHeight/VerticalDivisor))
//
var(UI) float HorizontalDivisor;
var(UI) float VerticalDivisor;   
var(UI) INT   ForcedMaxScale;    

// [..]

// ----------------------------------------------------------------------------
// ResizeRoot()
//
// Notes:
//  * Moved out of C++ Code.
//  * vMult default divisor might be relaxed to 450.0 for better support
//    of ridiculous tiny laptop screens.
// ----------------------------------------------------------------------------

event ResizeRoot( Canvas Canvas )
{
	local int hMult, vMult;

	// Calculate multipliers
	hMult = Canvas.ClipX/HorizontalDivisor;
	vMult = Canvas.ClipY/VerticalDivisor;

	if ( hMult < 1 )
		hMult = 1;
	if ( vMult < 1 )
		vMult = 1;

	if ( hMult < vMult )
		vMult = hMult;
	else if ( hMult > vMult )
		hMult = vMult;

	// Override scale
	if ( ForcedMaxScale>0 && ForcedMaxScale<hMult && ForcedMaxScale<vMult )
	{
		hMult = ForcedMaxScale;
		vMult = ForcedMaxScale;
	}

	// Apply initial settings.
	SetPropertyText( "hMultiplier",     String(hMult) );
	SetPropertyText( "vMultiplier",     String(vMult) );
	SetPropertyText( "x",               "0"           );
	SetPropertyText( "y",               "0"           );
	SetPropertyText( "hMargin0",        "0.0"         );
	SetPropertyText( "hMargin1",        "0.0"         );
	SetPropertyText( "vMargin0",        "0.0"         );
	SetPropertyText( "vMargin1",        "0.0"         );
	SetPropertyText( "winHAlign",       "HALIGN_Left" );
	SetPropertyText( "winVAlign",       "VALIGN_Top"  );
	SetPropertyText( "hardcodedWidth",  String(Canvas.ClipX/hMult) );
	SetPropertyText( "hardcodedHeight", String(Canvas.ClipY/vMult) );

	if ( hardcodedWidth!=width || hardcodedHeight!=height )
	{
		ConfigureChild( 0.0, 0.0, hardcodedWidth, hardcodedHeight );
	}
}

// [..]

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

defaultproperties
{
	HorizontalDivisor=640.0
	VerticalDivisor=480.0
	ForcedMaxScale=0
}
This is the event which gets called when it comes to calculating the overall UI rendering scale. So you could enforce 1x scale or reducing the resolution needed for 2x UI just by editing it's properties. Or if you really want to kick it a notch do stuff like using 2x drawscale when in some kind of menüs and for ingame hud falling back to forced 1x. Just to name the most obvious things. But i have to admit that is a really bad example, as this even will even be called on any rootwindow as long as it has this function in.

Of when we are talking about windows. Window.NewChild() will be hooked to. Before the new child is constructed, so you can change the class of the window, and after it is constructed, so you can either edit properties, run some changing on on them. This will be pretty powerful. :3
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
Post Reply