mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-22 23:06:18 +00:00
Move snowballs compass, see #43
This commit is contained in:
parent
8230238b5f
commit
06e96929af
1 changed files with 11 additions and 2 deletions
|
@ -28,6 +28,7 @@
|
|||
#include <nel/3d/u_driver.h>
|
||||
#include <nel/3d/u_text_context.h>
|
||||
#include <nel/3d/u_texture.h>
|
||||
#include <nel/3d/stereo_ovr.h>
|
||||
|
||||
#include "mouse_listener.h"
|
||||
#include "camera.h"
|
||||
|
@ -94,6 +95,13 @@ void updateCompass ()
|
|||
{
|
||||
float x = CompassPosX;
|
||||
float y = CompassPosY;
|
||||
if (StereoHMD)
|
||||
{
|
||||
float xshift, yshift;
|
||||
StereoHMD->getInterface2DShift(xshift, yshift, 4.0f);
|
||||
x += xshift;
|
||||
y += yshift;
|
||||
}
|
||||
float radius = CompassRadius;
|
||||
|
||||
// tri
|
||||
|
@ -109,7 +117,8 @@ void updateCompass ()
|
|||
quad.V2.set ( radius, radius, 0);
|
||||
quad.V3.set (-radius, radius, 0);
|
||||
|
||||
Driver->setMatrixMode2D43 ();
|
||||
if (StereoHMD) Driver->setMatrixMode2D11();
|
||||
else Driver->setMatrixMode2D43();
|
||||
|
||||
CMatrix mtx;
|
||||
|
||||
|
@ -152,7 +161,7 @@ void updateCompass ()
|
|||
Driver->setModelMatrix (mtx);
|
||||
Driver->drawQuad (quad, CompassMaterial);
|
||||
|
||||
x *= 3.0/4.0f;
|
||||
if (!StereoHMD) x *= 3.0/4.0f;
|
||||
|
||||
// Print position
|
||||
TextContext->setHotSpot(UTextContext::MiddleTop);
|
||||
|
|
Loading…
Reference in a new issue