Decompile fn_02119 (CRendererDX7::SetTexture)
Batch #16018 by Yommy: 1 byte-identical, 0 confirmed by peer review. - fn_02119 CRendererDX7::SetTexture: byte-identical Merged automatically: every function is byte-identical to the original.
This commit is contained in:
parent
9bb9ce7a8f
commit
89450d494e
1 changed files with 15 additions and 3 deletions
|
|
@ -8,17 +8,29 @@ void CRendererDX7::SetTexture(unsigned stage, CTextureDX7* texture) {
|
|||
switch (stage) {
|
||||
case 0:
|
||||
if (this->boundTexture != texture) {
|
||||
this->device->SetTexture(0, texture ? texture->NativeSurface() : nullptr);
|
||||
if (texture == nullptr) {
|
||||
this->device->SetTexture(0, nullptr);
|
||||
} else {
|
||||
this->device->SetTexture(0, texture->NativeSurface());
|
||||
}
|
||||
this->boundTexture = texture;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (this->boundLightmap != texture) {
|
||||
this->device->SetTexture(1, texture ? texture->NativeSurface() : nullptr);
|
||||
if (texture == nullptr) {
|
||||
this->device->SetTexture(1, nullptr);
|
||||
} else {
|
||||
this->device->SetTexture(1, texture->NativeSurface());
|
||||
}
|
||||
this->boundLightmap = texture;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
this->device->SetTexture(stage, texture ? texture->NativeSurface() : nullptr);
|
||||
if (texture != nullptr) {
|
||||
this->device->SetTexture(stage, texture->NativeSurface());
|
||||
} else {
|
||||
this->device->SetTexture(stage, nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue