mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-17 17:00:29 +02:00
Moved ddraw into exe, temp added libsmacker to test out movie event code. Movies work if converted to SMK.
This commit is contained in:
+60
@@ -0,0 +1,60 @@
|
||||
|
||||
/*=========================================================================*\
|
||||
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
||||
File: D2D1_2Helper.h
|
||||
|
||||
Module Name: D2D
|
||||
|
||||
Description: Helper files over the D2D interfaces and APIs.
|
||||
|
||||
\*=========================================================================*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma once
|
||||
#endif // _MSC_VER
|
||||
|
||||
#ifndef _D2D1_2HELPER_H_
|
||||
#define _D2D1_2HELPER_H_
|
||||
|
||||
#if NTDDI_VERSION >= NTDDI_WINBLUE
|
||||
|
||||
#ifndef _D2D1_2_H_
|
||||
#include <d2d1_2.h>
|
||||
#endif // #ifndef _D2D1_2_H_
|
||||
|
||||
#ifndef D2D_USE_C_DEFINITIONS
|
||||
|
||||
|
||||
|
||||
namespace D2D1
|
||||
{
|
||||
COM_DECLSPEC_NOTHROW
|
||||
D2D1FORCEINLINE
|
||||
FLOAT
|
||||
ComputeFlatteningTolerance(
|
||||
_In_ CONST D2D1_MATRIX_3X2_F &matrix,
|
||||
FLOAT dpiX = 96.0f,
|
||||
FLOAT dpiY = 96.0f,
|
||||
FLOAT maxZoomFactor = 1.0f
|
||||
)
|
||||
{
|
||||
D2D1_MATRIX_3X2_F dpiDependentTransform =
|
||||
matrix * D2D1::Matrix3x2F::Scale(dpiX / 96.0f, dpiY / 96.0f);
|
||||
|
||||
FLOAT absMaxZoomFactor = (maxZoomFactor > 0) ? maxZoomFactor : -maxZoomFactor;
|
||||
|
||||
return D2D1_DEFAULT_FLATTENING_TOLERANCE /
|
||||
(absMaxZoomFactor * D2D1ComputeMaximumScaleFactor(&dpiDependentTransform));
|
||||
}
|
||||
|
||||
} // namespace D2D1
|
||||
|
||||
|
||||
#endif // #ifndef D2D_USE_C_DEFINITIONS
|
||||
|
||||
#endif // #if NTDDI_VERSION >= NTDDI_WINBLUE
|
||||
|
||||
#endif // #ifndef _D2D1_HELPER_H_
|
||||
|
||||
Reference in New Issue
Block a user