Archived

This topic is now archived and is closed to further replies.

Seaner

Won't display until I move mouse!@!

Recommended Posts

Seaner    122
This is pretty awkward.... My program won't display my splash screen until I move my mouse... THEN! It won't display my loading... wow. Talk about awkward, sheesh.

	if(splash)
	{
		

		glTranslatef(0.0f, 0.0f, -.1f);
		glColor3f(0.0f, 0.0f, 0.0f);
		glRasterPos2f(-.05f, 0.0f);
 		glPrint("THIS IS THE SPLASH SCREEN");
		glRasterPos2f(-.05f, -0.01f);
		glPrint("Press 'M' to play");

		glTranslatef(0.0, 0.0f, .1f);
		
		
		
		
		//Draw the splash screen
	}
	else
	{



	
	if(!loaded)
	{
		glLoadIdentity();
		glTranslatef(0.0f, 0.0f, -.1f);
		glColor3f(0.0f, 0.0f, 0.0f);
		glRasterPos2f(-.05f, 0.0f);
 		glPrint("TTESTINGAE");
		glRasterPos2f(-.05f, -0.01f);
		glPrint("Press 'M' to play");

		glTranslatef(0.0, 0.0f, .1f);

		LoadUpTheStuff();
	}
  
It's pretty straight foward... The above is the first thing in my DrawGLScene function right after glClear and glLoadIdentity. So.. when I start my .exe it switches the resolution properly, but just hangs at my desktop until I move the mouse, at which point it will load that splash. THEN, when I hit 'M', splash becomes false, and since loading initially is false, it runs the second part of the above code. I put some delays (Sleep(1000)) into LoadUpTheStuff() so I could detect there was some loading. And boy it delays, but the TTESTINGAE never shows up! It stays on the THIS IS A SPLASH SCREEN. Does anyone have any ideas? Any help will be greatly appreciated. Thanks. Sean Berry [edited by - Seaner on May 26, 2004 10:59:24 AM]

Share this post


Link to post
Share on other sites
Seaner    122
Ok Here''s an update... Obviously something is up with my Mouse_Move...

case WM_MOUSEMOVE:
{

/*********addition for mousemove******/


if (LOWORD(lParam) > 370)
SetCursorPos(10,(int)mouse_ypos), mouse_wrap_x--;

else if (LOWORD(lParam) < 10)
SetCursorPos(370,(int)mouse_ypos), mouse_wrap_x++;


if (HIWORD(lParam) > 370)
SetCursorPos((int)mouse_xpos,10), mouse_wrap_x--;
else if (HIWORD(lParam) < 10)
SetCursorPos((int)mouse_xpos,370), mouse_wrap_x++;

if (ABS(mouse_xpos-LOWORD(lParam)) > 300)
{
if (mouse_xpos > 360/2)
mouse_xpos_cursor += ((mouse_xpos-360)-LOWORD(lParam))/sensitivity;
else if (LOWORD(lParam) > 360/2)
mouse_xpos_cursor += (mouse_xpos-(LOWORD(lParam)-360))/sensitivity;
}
else
{
mouse_xpos_cursor += (mouse_xpos-LOWORD(lParam))/sensitivity;
}

if (mouse_xpos_cursor > 360)
mouse_xpos_cursor = 0;
else if (mouse_xpos_cursor < 0)
mouse_xpos_cursor = 360;

if (invert_mouse)
{
if (abs(mouse_ypos-HIWORD(lParam)) > 300)
{
if (mouse_ypos > 360/2)
mouse_ypos_cursor -= (HIWORD(lParam)-(mouse_ypos-360))/sensitivity;
else if (LOWORD(lParam) > 360/2)
mouse_ypos_cursor -= ((HIWORD(lParam)-360)-mouse_ypos)/sensitivity;
}
else
{
mouse_ypos_cursor -= (HIWORD(lParam)-mouse_ypos)/sensitivity;
}
}
else
{
if (ABS(mouse_ypos-HIWORD(lParam)) > 300)
{
if (mouse_ypos > 360/2)
mouse_ypos_cursor -= ((mouse_ypos-360)-HIWORD(lParam))/sensitivity;
else if (LOWORD(lParam) > 360/2)
mouse_ypos_cursor -= (mouse_ypos-(HIWORD(lParam)-360))/sensitivity;
}
else
{
mouse_ypos_cursor -= (mouse_ypos-HIWORD(lParam))/sensitivity;
}
}

if (mouse_xpos_cursor > 360)
mouse_xpos_cursor = 0;
else if (mouse_xpos_cursor < 0)
mouse_xpos_cursor = 360;

if (mouse_ypos_cursor > 85)
mouse_ypos_cursor = 85;
else if (mouse_ypos_cursor < -85)
mouse_ypos_cursor = -85;


mouse_xpos = LOWORD(lParam);
mouse_ypos = HIWORD(lParam);



}
break;


Specifically, right in the beginning there, if I edit out the following..
else if (LOWORD(lParam) < 10)
SetCursorPos(370,(int)mouse_ypos), mouse_wrap_x++;


THEN IT STARTS UP FINE!!!
''

ISN''T THAT WEIRD?!$

Share this post


Link to post
Share on other sites