- rewrote the condition nodes from SBARINFO in ZScript. This compiles but hasn't been tested yet.

This commit is contained in:
Christoph Oelckers 2017-03-23 00:25:26 +01:00
commit 31ea33bfc4
9 changed files with 694 additions and 29 deletions

View file

@ -1700,6 +1700,11 @@ float ActiveRatio(int width, int height, float *trueratio)
return (fakeratio != -1) ? forcedRatioTypes[fakeratio] : ratio;
}
DEFINE_ACTION_FUNCTION(_Screen, GetAspectRatio)
{
ACTION_RETURN_FLOAT(ActiveRatio(screen->GetWidth(), screen->GetHeight(), nullptr));
}
// Tries to guess the physical dimensions of the screen based on the
// screen's pixel dimensions. Can return:
// 0: 4:3