Click here to Skip to main content
15,915,163 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Help with arrays Pin
LunaticFringe13-Dec-09 9:50
LunaticFringe13-Dec-09 9:50 
GeneralRe: Help with arrays Pin
Chidori-chan13-Dec-09 10:16
Chidori-chan13-Dec-09 10:16 
GeneralRe: Help with arrays Pin
Richard MacCutchan13-Dec-09 10:26
mveRichard MacCutchan13-Dec-09 10:26 
GeneralRe: Help with arrays Pin
LunaticFringe13-Dec-09 10:29
LunaticFringe13-Dec-09 10:29 
QuestionVisual C++ Drag and Drop and get filename and complete path Pin
ilu200713-Dec-09 6:54
ilu200713-Dec-09 6:54 
AnswerRe: Visual C++ Drag and Drop and get filename and complete path Pin
ilu200713-Dec-09 10:29
ilu200713-Dec-09 10:29 
AnswerRe: Visual C++ Drag and Drop and get filename and complete path Pin
Nelek15-Dec-09 20:51
protectorNelek15-Dec-09 20:51 
QuestionSpacebar: Animating a Circle to move across the screen, instead of jumping Pin
Chidori-chan12-Dec-09 21:30
Chidori-chan12-Dec-09 21:30 
I've been working on getting a circle to fire out of a cannon and move across the screen, but the closest I've come is making it jump to the end point. I think it's because of where I'm putting the function. However, wherever else I've put it, it has frozen my program.

So what I'm wanting, is when I press my space bar, my single circle from the draw fire function below to be seen moving across the screen to the top.

Here's the snippets of my code that pertain to this function:

float fire;


glPushMatrix();
glTranslatef(250+aim,102+fire,1);
    random_generator(0,3);
    if (randomValue == 0)
    {
glColor3f(0,.5,0);


    }
    else if (randomValue == 1)
    {
glColor3f(.5,0,0);


    }
    else
    {
glColor3f(0,0,.5);

    }

glLineWidth(1.0);
drawFire(14,200);
glPopMatrix();


void keyboardFunction(unsigned char key, int x, int y)
{
	switch (key)
		{
			case 'r' : d=1; break;		//tells the program what to do when certian keys are pushed
			case 's' : d=2; break;		// r will take you to the title screen, s to the game
			case ' ' : 			// and the space will case the cannon to fire
				for (fire=0; fire<353; fire++)
				{
				};
				 break;

		}
	glutPostRedisplay();
}


Do you all have any idea what I could do to make it move across the screen instead of jumping?
AnswerRe: Spacebar: Animating a Circle to move across the screen, instead of jumping Pin
Cedric Moonen12-Dec-09 22:16
Cedric Moonen12-Dec-09 22:16 
GeneralRe: Spacebar: Animating a Circle to move across the screen, instead of jumping Pin
Chidori-chan13-Dec-09 8:32
Chidori-chan13-Dec-09 8:32 
QuestionUsing RFX_Text_Bulk Pin
Larry Mills Sr12-Dec-09 13:35
Larry Mills Sr12-Dec-09 13:35 
AnswerRe: Using RFX_Text_Bulk Pin
Richard MacCutchan12-Dec-09 23:12
mveRichard MacCutchan12-Dec-09 23:12 
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr13-Dec-09 3:02
Larry Mills Sr13-Dec-09 3:02 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 3:18
mveRichard MacCutchan13-Dec-09 3:18 
GeneralRe: Using RFX_Text_Bulk [modified] Pin
Larry Mills Sr13-Dec-09 4:28
Larry Mills Sr13-Dec-09 4:28 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 4:50
mveRichard MacCutchan13-Dec-09 4:50 
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr13-Dec-09 6:18
Larry Mills Sr13-Dec-09 6:18 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 6:47
mveRichard MacCutchan13-Dec-09 6:47 
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr13-Dec-09 9:20
Larry Mills Sr13-Dec-09 9:20 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 9:48
mveRichard MacCutchan13-Dec-09 9:48 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 23:19
mveRichard MacCutchan13-Dec-09 23:19 
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr14-Dec-09 0:56
Larry Mills Sr14-Dec-09 0:56 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan14-Dec-09 4:48
mveRichard MacCutchan14-Dec-09 4:48 
QuestionSDI app executes CFrameWnd::OnCreate throwing Invalid Address specified to RtlValidateHeap Pin
sharion12-Dec-09 7:36
sharion12-Dec-09 7:36 
AnswerRe: SDI app executes CFrameWnd::OnCreate throwing Invalid Address specified to RtlValidateHeap Pin
Cedric Moonen12-Dec-09 22:18
Cedric Moonen12-Dec-09 22:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.