Holland

Untitled

Nov 8th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | None | 0 0
  1.     void Scene::DrawDebugLine(float x, float y, float x2, float y2, int a_Colour)
  2.     {
  3.        
  4.         /*
  5.        
  6.         -5 to 5
  7.         0 to SCRWIDTH*0.5f
  8.  
  9.         (SCRWIDTH*0.5f/10)*(x+5) - SCRWIDTH*0.5f;
  10.         (SCRHEIGHT*0.5f/10)*(y+5) - SCRHEIGHT*0.5f;
  11.        
  12.         */
  13.         m_DebugSurface->Line(
  14.             ((SCRWIDTH*0.5f/20)*(x+10)), SCRHEIGHT-((SCRHEIGHT/20)*(y+10)),
  15.             ((SCRWIDTH*0.5f/20)*(x2+10)), SCRHEIGHT-((SCRHEIGHT/20)*(y2+10)), a_Colour);
  16.     }
  17.    
  18.     void Scene::DrawDebugDot(float x, float y, int a_Colour)
  19.     {
  20.         /*
  21.        
  22.         -10 to 10
  23.         0 to SCRWIDTH*0.5f
  24.  
  25.         (SCRWIDTH*0.5f/10)*(x+5) - SCRWIDTH*0.5f;
  26.         (SCRHEIGHT*0.5f/10)*(y+5) - SCRHEIGHT*0.5f;
  27.        
  28.         */
  29.         //if(!m_DebugSurface->GetBuffer()[int((SCRWIDTH*0.5f/20)*(x+10))+(int)(SCRHEIGHT-((SCRHEIGHT/20)*(y+10)))*m_DebugSurface->GetWidth()])
  30.         m_DebugSurface->Plot((int)((SCRWIDTH*0.5f/20)*(x+10)), (int)(SCRHEIGHT-((SCRHEIGHT/20)*(y+10))), a_Colour);
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment