blob: 8c0a2ec43ab7c2621736c995c35944c1cc09d6be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// Copyright 2009 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "VideoCommon/BPMemory.h"
#include <cstring>
// BP state
// STATE_TO_SAVE
BPMemory bpmem;
bool BlendMode::UseLogicOp() const
{
// Logicop bit has lowest priority.
if (subtract || blendenable || !logicopenable)
return false;
// Fast path for Kirby's Return to Dreamland, they use it with dstAlpha.
if (logicmode == BlendMode::NOOP)
return false;
return true;
}
float FogParam0::GetA() const
{
// scale mantissa from 11 to 23 bits
const u32 integral = (static_cast<u32>(sign) << 31) | (static_cast<u32>(exponent) << 23) |
(static_cast<u32>(mantissa) << 12);
float real;
std::memcpy(&real, &integral, sizeof(u32));
return real;
}
float FogParam3::GetC() const
{
// scale mantissa from 11 to 23 bits
const u32 integral = (c_sign.Value() << 31) | (c_exp.Value() << 23) | (c_mant.Value() << 12);
float real;
std::memcpy(&real, &integral, sizeof(u32));
return real;
}
|