Jump to content

  • Log In with Google      Sign In   
  • Create Account

phil67rpg

Member Since 25 Feb 2004
Offline Last Active May 23 2014 10:18 PM

#5060416 tictac toe marks

Posted by phil67rpg on 08 May 2013 - 04:25 PM

yes I listen beer nutts, I am trying my best, I do need practice




#5060176 tictac toe marks

Posted by phil67rpg on 07 May 2013 - 09:42 PM

well after a break I am going to finish my tic tac toe game, however I still get the problem I have stated above.




#5056268 dx9 tutorial help

Posted by phil67rpg on 23 April 2013 - 10:55 PM

well I reread lesson 5




#5055388 tictac toe marks

Posted by phil67rpg on 20 April 2013 - 09:42 PM

Well I am still working on my tic tac toe game using dx9 and c++. My problem is that when I click on the second row that it puts a mark in the first row and when I click on the third row it puts a mark in the second row. The x and y variables are the mouse position.
here is the code I am using.
void display_text_x(int x,int y)
{
	d3ddev->BeginScene();

	RECT font_rect;
	
	if(x>=300 && x <=350 && y>=225 && y <=275)
	{
	font_rect.left=310;
	font_rect.top=235;
	font_rect.right=330;
	font_rect.bottom=255;
	board_x[0][0]=true;
	}

	if(x>=350 && x <=400 && y>=225 && y <=275)
	{
	font_rect.left=360;
	font_rect.top=235;
	font_rect.right=380;
	font_rect.bottom=255;
	board_x[0][1]=true;
	}

	if(x>=400 && x <=450 && y>=225 && y <=275)
	{
	font_rect.left=415;
	font_rect.top=235;
	font_rect.right=435;
	font_rect.bottom=255;
	board_x[0][2]=true;
	}

	if(x>=300 && x <=350 && y>=275 && y <=325)
	{
	font_rect.left=310;
	font_rect.top=290;
	font_rect.right=330;
	font_rect.bottom=310;
	board_x[1][0]=true;
	}

	if(x>=350 && x <=400 && y>=275 && y <=325)
	{
	font_rect.left=360;
	font_rect.top=290;
	font_rect.right=380;
	font_rect.bottom=310;
	board_x[1][1]=true;
	}

	if(x>=400 && x <=450 && y>=275 && y <=325)
	{
	font_rect.left=415;
	font_rect.top=290;
	font_rect.right=435;
	font_rect.bottom=310;
	board_x[1][2]=true;
	}

	if(x>=300 && x <=350 && y>=325 && y <=375)
	{
	font_rect.left=310;
	font_rect.top=350;
	font_rect.right=330;
	font_rect.bottom=370;
	board_x[2][0]=true;
	}

	if(x>=350 && x <=400 && y>=325 && y <=375)
	{
	font_rect.left=360;
	font_rect.top=350;
	font_rect.right=380;
	font_rect.bottom=370;
	board_x[2][1]=true;
	}

	if(x>=400 && x <=450 && y>=325 && y <=375)
	{
	font_rect.left=415;
	font_rect.top=350;
	font_rect.right=435;
	font_rect.bottom=370;
	board_x[2][2]=true;
	}

	HRESULT hr=D3DXCreateFontA(d3ddev,
				  20,
				  10,
				  FW_NORMAL,
				  1,
				  false,
				  DEFAULT_CHARSET,
				  OUT_DEFAULT_PRECIS,
				  ANTIALIASED_QUALITY,
				  DEFAULT_PITCH|FF_DONTCARE,
				  "Arial",
				  &g_font);
			 g_font->DrawTextA(NULL,"X",-1,&font_rect,DT_CENTER,0xFFFFFFFF);

	 d3ddev->EndScene();

    d3ddev->Present(NULL, NULL, NULL, NULL);
}



#5054405 RECT font_rect

Posted by phil67rpg on 17 April 2013 - 08:28 PM

well I am going to take a break because I am angering some good people and that is not my intent.


#5054073 RECT font_rect

Posted by phil67rpg on 16 April 2013 - 09:28 PM

	RECT font_rect;
	
	if(x>=300 && x <=350 && y>=225 && y <=275)
	{
	font_rect.left=310;
	font_rect.top=235;
	font_rect.right=330;
	font_rect.bottom=255;
	board_x[0][0]=true;
	}
is RECT font_rect;
and font_rect.left;
correct.


#5052622 dx9 tutorial help

Posted by phil67rpg on 12 April 2013 - 06:40 PM

I am able to draw a triangular pyramid to the screen, I am working with the directxtutorial.com web site. I really like this tutorial. I want to draw 20 triangular pyramids to the screen. Here is the code I am working with.
        { -1.0f, -1.0f, 0.0f, D3DCOLOR_XRGB(0, 255, 0), },
        { -1.0f, 1.0f,-1.0f, D3DCOLOR_XRGB(0, 0, 255), },
        { 1.0f, 1.0f, 0.0f, D3DCOLOR_XRGB(255, 0, 0), },
        { 1.0f, -1.0f, -1.0f, D3DCOLOR_XRGB(0, 0, 255), },



#5049812 3d game

Posted by phil67rpg on 03 April 2013 - 08:49 PM

I want to design a 3d game using either opengl or dx9 I have books on both api's. can I get some ideas on what type of 3d game to program.


#5048116 breakout lives

Posted by phil67rpg on 29 March 2013 - 02:37 PM

ok I am going to quit for a while.


#5046098 first breakout game

Posted by phil67rpg on 23 March 2013 - 06:09 PM

I have tweaked my game a little bit, let me know what you think.

Attached Files




#5043772 finshed breakout game

Posted by phil67rpg on 16 March 2013 - 03:03 PM

well I have rendered a background image with a bitmap, thanks steve




#5042501 finshed breakout game

Posted by phil67rpg on 12 March 2013 - 05:05 PM

well after doing some research this should work let me know if you get any errors

Attached Files




#5042491 starting over

Posted by phil67rpg on 12 March 2013 - 04:45 PM

thanks for all the advice




#5042124 finshed breakout game

Posted by phil67rpg on 11 March 2013 - 06:18 PM

sorry here is the link

Attached Files




#5042102 finshed breakout game

Posted by phil67rpg on 11 March 2013 - 05:23 PM

well here is my game let me know if there are any bugs and what you think of it and any extras I can include.

Attached Files






PARTNERS