rodecomp/Source/Render/DX7/TextureBindingDX7.cpp
ragnarok-clanker 25fffd9579 Decompile fn_02119 (CRendererDX7::SetTexture)
Batch #12294 by cremane: 0 byte-identical, 1 confirmed by peer review.

- fn_02119 CRendererDX7::SetTexture: logic confirmed by peer review

Peer-reviewed-by: Yommy, gordaoprogramas, dori
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
2026-11-05 16:28:20 +00:00

24 lines
713 B
C++

#include "Render/DX7/RenderSystemDX7.h"
#include "Render/RendererDX7.h"
#include "Render/DX7/TextureDX7.h"
// OFFSET: 0x0055F7D0
// FUNCTION: fn_02119
void CRendererDX7::SetTexture(unsigned stage, CTextureDX7* texture) {
switch (stage) {
case 0:
if (this->boundTexture != texture) {
this->device->SetTexture(0, texture ? texture->NativeSurface() : nullptr);
this->boundTexture = texture;
}
break;
case 1:
if (this->boundLightmap != texture) {
this->device->SetTexture(1, texture ? texture->NativeSurface() : nullptr);
this->boundLightmap = texture;
}
break;
default:
this->device->SetTexture(stage, texture ? texture->NativeSurface() : nullptr);
}
}