Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float focusX = ((pPlayer1->o.x - pPlayer1->o.x) / 2) * -1 + (RADAR_SIZE / 2);
- float focusY = ((pPlayer1->o.y - pPlayer1->o.y) / 2) + (RADAR_SIZE / 2);
- float tmpX = ((pPlayer1->o.x - pPlayer->o.x) / 5) + (RADAR_SIZE / 2);
- float tmpY = ((pPlayer1->o.y - pPlayer->o.y) / 5) * -1 + (RADAR_SIZE / 2);
- tmpX -= focusX;
- tmpY -= focusY;
- float cosY = (float)cos((double)RadianToDegree((double)pPlayer1->yaw));
- float sinY = (float)sin((double)RadianToDegree((double)pPlayer1->yaw));
- float x = (tmpY * cosY - tmpX * sinY) * -1 + (RADAR_SIZE / 2);
- float y = tmpX * cosY + tmpY * sinY + (RADAR_SIZE / 2);
- renderer->Fill(position.X + x, position.Y + y, 5, 5 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement