Wintermute Engine Forum

Wintermute Engine => Bug reports => Fixed => Topic started by: mRax on September 14, 2009, 08:15:33 AM

Title: About m_DrawOffset*
Post by: mRax on September 14, 2009, 08:15:33 AM
Probably those are not bugs, but

1. I suppose, .SetMousePos method must be
Code: [Select]
Stack->CorrectParams(2);
int x = Stack->Pop()->GetInt();
int y = Stack->Pop()->GetInt();
x = max(x, 0); x = min(x, m_Renderer->m_Width);
y = max(y, 0); y = min(y, m_Renderer->m_Height);
POINT p;
p.x = x + m_Renderer->m_DrawOffsetX;
p.y = y + m_Renderer->m_DrawOffsetY;
CBPlatform::ClientToScreen(m_Renderer->m_Window, &p);
CBPlatform::SetCursorPos(p.x, p.y);

Stack->PushNULL();
return S_OK;
instead of
Code: [Select]
Stack->CorrectParams(2);
int x = Stack->Pop()->GetInt();
int y = Stack->Pop()->GetInt();
x = max(x, 0); x = min(x, m_Renderer->m_Width);
y = max(y, 0); y = min(y, m_Renderer->m_Height);
POINT p;
p.x = x; p.y = y;
CBPlatform::ClientToScreen(m_Renderer->m_Window, &p);
CBPlatform::SetCursorPos(p.x, p.y);

Stack->PushNULL();
return S_OK;

2. The same goes to .CreateParticleEmitterBone method. Last one doesn't respect m_DrawOffset* values.