| 211 | RwTexture* bump, F32 bumpiness); |
| 212 | |
| 213 | void xFX_SceneEnter(RpWorld* world) |
| 214 | { |
| 215 | S32 i; |
| 216 | S32 num = RpWorldGetNumMaterials(world); |
| 217 | |
| 218 | for (i = 0; i < num; i++) |
| 219 | { |
| 220 | xSurface* sp = zSurfaceGetSurface(i); |
| 221 | zSurfaceProps* pp = (zSurfaceProps*)sp->moprops; |
| 222 | |
| 223 | if (pp && pp->asset) |
| 224 | { |
| 225 | zSurfMatFX* fxp = &pp->asset->matfx; |
| 226 | |
| 227 | if (fxp->flags) |
| 228 | { |
| 229 | if (fxp->flags == 0x10) |
| 230 | { |
| 231 | fxp->flags |= 0x1; |
| 232 | } |
| 233 | |
| 234 | RpMaterial* mp = RpWorldGetMaterial(world, i); |
| 235 | |
| 236 | if (RpMaterialGetTexture(mp)) |
| 237 | { |
| 238 | gFXSurfaceFlags = fxp->flags; |
| 239 | |
| 240 | if (fxp->flags & 0x1) |
| 241 | { |
| 242 | RwTexture* env = (RwTexture*)xSTFindAsset(fxp->envmapID, NULL); |
| 243 | |
| 244 | if (!env) |
| 245 | { |
| 246 | continue; |
| 247 | } |
| 248 | |
| 249 | MaterialSetEnvMap(mp, env); |
| 250 | RpMatFXMaterialSetEnvMapCoefficient(mp, 0.5f * fxp->shininess); |
| 251 | } |
| 252 | |
| 253 | if (fxp->flags & 0x2) |
| 254 | { |
| 255 | RwTexture* bump = (RwTexture*)xSTFindAsset(fxp->bumpmapID, NULL); |
| 256 | |
| 257 | if (!bump) |
| 258 | { |
| 259 | continue; |
| 260 | } |
| 261 | |
| 262 | MaterialSetBumpMap(mp, bump); |
| 263 | RpMatFXMaterialSetBumpMapCoefficient(mp, fxp->bumpiness); |
| 264 | } |
| 265 | |
| 266 | if (fxp->flags & 0x4) |
| 267 | { |
| 268 | RwTexture* env = (RwTexture*)xSTFindAsset(fxp->envmapID, NULL); |
| 269 | RwTexture* bump = (RwTexture*)xSTFindAsset(fxp->bumpmapID, NULL); |
| 270 |
nothing calls this directly
no test coverage detected