- added GetAspectRatio function to ACS.
- added a sixth parameter for SetHUDClipRect so that the forced aspect ratio fudging this function performs can be disabled.
This commit is contained in:
parent
81f521fe56
commit
ad0e71942d
5 changed files with 23 additions and 4 deletions
|
|
@ -4442,6 +4442,7 @@ enum EACSFunctions
|
|||
ACSF_GetActorRoll,
|
||||
ACSF_QuakeEx,
|
||||
ACSF_Warp, // 92
|
||||
ACSF_GetAspectRatio,
|
||||
|
||||
/* Zandronum's - these must be skipped when we reach 99!
|
||||
-100:ResetMap(0),
|
||||
|
|
@ -5315,6 +5316,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args, const
|
|||
ClipRectWidth = argCount > 2 ? args[2] : 0;
|
||||
ClipRectHeight = argCount > 3 ? args[3] : 0;
|
||||
WrapWidth = argCount > 4 ? args[4] : 0;
|
||||
HandleAspect = argCount > 5 ? !!args[5] : true;
|
||||
break;
|
||||
|
||||
case ACSF_SetHUDWrapWidth:
|
||||
|
|
@ -5915,10 +5917,14 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
|
|||
return false;
|
||||
}
|
||||
|
||||
case ACSF_GetAspectRatio:
|
||||
return CheckRatio(screen->GetWidth(), screen->GetHeight());
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -7854,7 +7860,7 @@ scriptwait:
|
|||
}
|
||||
break;
|
||||
}
|
||||
msg->SetClipRect(ClipRectLeft, ClipRectTop, ClipRectWidth, ClipRectHeight);
|
||||
msg->SetClipRect(ClipRectLeft, ClipRectTop, ClipRectWidth, ClipRectHeight, HandleAspect);
|
||||
if (WrapWidth != 0)
|
||||
{
|
||||
msg->SetWrapWidth(WrapWidth);
|
||||
|
|
@ -9466,6 +9472,7 @@ DLevelScript::DLevelScript (AActor *who, line_t *where, int num, const ScriptPtr
|
|||
activefont = SmallFont;
|
||||
hudwidth = hudheight = 0;
|
||||
ClipRectLeft = ClipRectTop = ClipRectWidth = ClipRectHeight = WrapWidth = 0;
|
||||
HandleAspect = true;
|
||||
state = SCRIPT_Running;
|
||||
|
||||
// Hexen waited one second before executing any open scripts. I didn't realize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue