| 101 | } |
| 102 | |
| 103 | void zEnvRender(xEnv* env) |
| 104 | { |
| 105 | RpWorld* world = env->geom->world; |
| 106 | S32 num = RpWorldGetNumMaterials(world); |
| 107 | |
| 108 | for (S32 i = 0; i < num; i++) |
| 109 | { |
| 110 | xSurface* sp = zSurfaceGetSurface(i); |
| 111 | zSurfaceProps* pp = (zSurfaceProps*)sp->moprops; |
| 112 | |
| 113 | if (pp && pp->asset && pp->texanim_flags & 0x1) |
| 114 | { |
| 115 | RpMaterial* mp = RpWorldGetMaterial(world, i); |
| 116 | |
| 117 | if (mp) |
| 118 | { |
| 119 | xGroup* g = (xGroup*)pp->texanim[0].group_ptr; |
| 120 | |
| 121 | if (g) |
| 122 | { |
| 123 | U32 texid = xGroupGetItem(g, pp->texanim[0].group_idx); |
| 124 | RwTexture* texptr = (RwTexture*)xSTFindAsset(texid, NULL); |
| 125 | |
| 126 | if (texptr) |
| 127 | { |
| 128 | RpMaterialSetTexture(mp, texptr); |
| 129 | } |
| 130 | } |
| 131 | } |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | xEnvRender(env); |
| 136 | } |
| 137 | |
| 138 | void zEnvSave(_zEnv* ent, xSerial* s) |
| 139 | { |
no test coverage detected