Decompile fn_01787 (DeviceOwnerDX7::PackColor)
Batch #970 by ragnarok-clanker: 0 byte-identical, 1 confirmed by peer review. - fn_01787 DeviceOwnerDX7::PackColor: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
11bd25e013
commit
2282078421
1 changed files with 11 additions and 2 deletions
|
|
@ -31,8 +31,7 @@ namespace {
|
|||
return static_cast<std::uint16_t>((value >> (channel.expansion & 31)) << (channel.shift & 31));
|
||||
}
|
||||
|
||||
// OFFSET: 0x00543220
|
||||
// FUNCTION: fn_01787
|
||||
// INLINED
|
||||
std::uint16_t Color(DeviceOwnerDX7& owner, unsigned red, unsigned green, unsigned blue) {
|
||||
return static_cast<std::uint16_t>(Channel(red, owner.red) + Channel(green, owner.green) + Channel(blue, owner.blue));
|
||||
}
|
||||
|
|
@ -229,6 +228,16 @@ void CSurfaceDX7::Stretch(int, int, int width, int height) {
|
|||
this->m_owner->renderTarget->Blt(&destination, this->m_surface, nullptr, DDBLT_WAIT, nullptr);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00543220
|
||||
// FUNCTION: fn_01787
|
||||
std::uint16_t DeviceOwnerDX7::PackColor(int red, int green, int blue) {
|
||||
return static_cast<std::uint16_t>(
|
||||
(static_cast<std::uint16_t>(red >> (this->red.expansion & 31)) << (this->red.shift & 31)) +
|
||||
(static_cast<std::uint16_t>(green >> (this->green.expansion & 31)) << (this->green.shift & 31)) +
|
||||
(static_cast<std::uint16_t>(blue >> (this->blue.expansion & 31)) << (this->blue.shift & 31))
|
||||
);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00543270
|
||||
// FUNCTION: fn_01788
|
||||
DWORD DeviceOwnerDX7::BlueMask() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue