Gets a pre-rotated point that does not fall exactly on one of our 255 height values
| 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) { |
| 350 | if (yvalue < 0) |
| 351 | yvalue = 0; |
| 352 | if (yvalue > MAX_TERRAIN_HEIGHT) |
| 353 | yvalue = MAX_TERRAIN_HEIGHT; |
| 354 | |
| 355 | vector up_vector = {0, yvalue, 0}; |
| 356 | vector dyp = up_vector * *TS_View_matrix; |
| 357 | |
| 358 | dest->p3_vec = TS_PreRows[z]; |
| 359 | dest->p3_vec += TS_RVectorAdd * x; |
| 360 | dest->p3_vec += dyp; |
| 361 | |
| 362 | // also store the unrotated point |
| 363 | dest->p3_flags |= PF_ORIGPOINT; |
| 364 | dest->p3_vecPreRot.x = TERRAIN_SIZE * x; |
| 365 | dest->p3_vecPreRot.y = yvalue; |
| 366 | dest->p3_vecPreRot.z = TERRAIN_SIZE * z; |
| 367 | } |
| 368 | |
| 369 | void Terrain_start_frame(vector *eye, matrix *view_orient) { |
| 370 | TS_View_position = eye; |
no outgoing calls
no test coverage detected