| 325 | } |
| 326 | |
| 327 | void GetPreRotatedPoint(g3Point *dest, int x, int z, int yvalue) { |
| 328 | ASSERT(yvalue >= 0 && yvalue <= 255); |
| 329 | |
| 330 | // If the terrain is supposed to be flat, bash this to zero |
| 331 | #ifdef EDITOR |
| 332 | if (Flat_terrain) { |
| 333 | yvalue = 0; |
| 334 | } |
| 335 | #endif |
| 336 | |
| 337 | dest->p3_vec = TS_PreRows[z]; |
| 338 | dest->p3_vec += TS_RVectorAdd * x; |
| 339 | dest->p3_vec += *GetDYVector(yvalue); |
| 340 | |
| 341 | // also store the unrotated point |
| 342 | dest->p3_flags |= PF_ORIGPOINT; |
| 343 | dest->p3_vecPreRot.x = TERRAIN_SIZE * x; |
| 344 | dest->p3_vecPreRot.y = TERRAIN_HEIGHT_INCREMENT * yvalue; |
| 345 | dest->p3_vecPreRot.z = TERRAIN_SIZE * z; |
| 346 | } |
| 347 | |
| 348 | // Gets a pre-rotated point that does not fall exactly on one of our 255 height values |
| 349 | void GetSpecialRotatedPoint(g3Point *dest, int x, int z, float yvalue) { |
no test coverage detected