MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / MaterialSetEnvMap

Function MaterialSetEnvMap

src/SB/Core/x/xFX.cpp:1023–1059  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1021 // Matching but with mr. instead of cmplwi
1022 if (data == NULL)
1023 {
1024 return NULL;
1025 }
1026 if (material->texture)
1027 {
1028 if (data)
1029 {
1030 RwFrame* frame = NULL;
1031 if ((gFXSurfaceFlags & 0x10) != 0)
1032 {
1033 if (globals.camera.lo_cam)
1034 {
1035 frame = (RwFrame*)globals.camera.lo_cam->object.object.parent;
1036 }
1037 else
1038 {
1039 frame = (RwFrame*)MainLight->object.object.parent;
1040 }
1041 }
1042 else
1043 {
1044 frame = (RwFrame*)MainLight->object.object.parent;
1045 }
1046 RpMatFXMaterialSetEffects(material, rpMATFXEFFECTENVMAP);
1047 RpMatFXMaterialSetupEnvMap(material, (RwTexture*)data, frame, FALSE, 1.0f);
1048 }
1049 else
1050 {
1051 RpMatFXMaterialSetEffects(material, rpMATFXEFFECTNULL);
1052 }
1053 }
1054 return material;
1055}
1056
1057RpMaterial* MaterialSetEnvMap2(RpMaterial* material, void* data)
1058{
1059 if (material->texture != NULL)
1060 {
1061 RwFrame* frame;
1062 if (RwEngineInstance->stringFuncs.vecStrcmp(((RwTexture*)data)->name, "spec3") == 0)

Callers 1

xFX_SceneEnterFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected