diff options
| author | oy <Tom_Adams@web.de> | 2010-08-16 02:21:18 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-08-16 02:21:18 +0200 |
| commit | abc84ac0b0ff77b3b30a20252f86332c699e4466 (patch) | |
| tree | 4ed487066f87aaac06b28ffd749f94126b169cd9 /src/engine/client | |
| parent | 4c2dcc4f2b5f061a1d75aa2aa0b316c4b86bc1d8 (diff) | |
| download | zcatch-abc84ac0b0ff77b3b30a20252f86332c699e4466.tar.gz zcatch-abc84ac0b0ff77b3b30a20252f86332c699e4466.zip | |
added fixes for compiler errors and warnings by sworddragon
Diffstat (limited to 'src/engine/client')
| -rw-r--r-- | src/engine/client/input.cpp | 4 | ||||
| -rw-r--r-- | src/engine/client/input.h | 2 | ||||
| -rw-r--r-- | src/engine/client/sound.cpp | 2 | ||||
| -rw-r--r-- | src/engine/client/text.cpp | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/engine/client/input.cpp b/src/engine/client/input.cpp index 32e61bbb..c6d3f58e 100644 --- a/src/engine/client/input.cpp +++ b/src/engine/client/input.cpp @@ -65,8 +65,8 @@ void CInput::MouseRelative(int *x, int *y) } } - *x = nx*Sens; - *y = ny*Sens; + *x = (int)(nx*Sens); + *y = (int)(ny*Sens); } void CInput::MouseModeAbsolute() diff --git a/src/engine/client/input.h b/src/engine/client/input.h index cc4e32e3..0b6d5b76 100644 --- a/src/engine/client/input.h +++ b/src/engine/client/input.h @@ -8,7 +8,7 @@ class CInput : public IEngineInput int m_InputGrabbed; unsigned int m_LastRelease; - unsigned int m_ReleaseDelta; + int m_ReleaseDelta; void AddEvent(int Unicode, int Key, int Flags); diff --git a/src/engine/client/sound.cpp b/src/engine/client/sound.cpp index df8fa66b..b829686c 100644 --- a/src/engine/client/sound.cpp +++ b/src/engine/client/sound.cpp @@ -121,7 +121,7 @@ static void Mix(short *pFinalOut, unsigned Frames) const int Range = 1500; // magic value, remove int dx = v->m_X - m_CenterX; int dy = v->m_Y - m_CenterY; - int Dist = sqrtf((float)dx*dx+dy*dy); // float here. nasty + int Dist = (int)sqrtf((float)dx*dx+dy*dy); // float here. nasty int p = IntAbs(dx); if(Dist < Range) { diff --git a/src/engine/client/text.cpp b/src/engine/client/text.cpp index 672fde60..ef741c12 100644 --- a/src/engine/client/text.cpp +++ b/src/engine/client/text.cpp @@ -509,7 +509,7 @@ public: return Cursor.m_X; } - virtual float TextLineCount(void *pFontSetV, float Size, const char *pText, int LineWidth) + virtual int TextLineCount(void *pFontSetV, float Size, const char *pText, float LineWidth) { CTextCursor Cursor; SetCursor(&Cursor, 0, 0, Size, 0); @@ -551,14 +551,14 @@ public: FakeToScreenX = (Graphics()->ScreenWidth()/(ScreenX1-ScreenX0)); FakeToScreenY = (Graphics()->ScreenHeight()/(ScreenY1-ScreenY0)); - ActualX = pCursor->m_X * FakeToScreenX; - ActualY = pCursor->m_Y * FakeToScreenY; + ActualX = (int)(pCursor->m_X * FakeToScreenX); + ActualY = (int)(pCursor->m_Y * FakeToScreenY); CursorX = ActualX / FakeToScreenX; CursorY = ActualY / FakeToScreenY; // same with size - ActualSize = Size * FakeToScreenY; + ActualSize = (int)(Size * FakeToScreenY); Size = ActualSize / FakeToScreenY; // fetch pFont data |