Page 1 of 1

little help w/ the source plez

Posted: Wed Apr 18, 2007 2:58 am
by revolutiongames2004
ok so im a quick learner when it comes to programming, but vc++ is giving me a little trouble, Id like to edit the Echaos entity. could someone walk me through this segment because im fairly sure that this is where i need to be

Code: Select all

pTex->YOffset += (geFloat)pTex->YStep * dwTicks;//(dwTicks*0.001f);
	
		if(pTex->YOffset > GE_2PI)
			pTex->YOffset = 0.0f;

		CosStep = GE_2PI / (geFloat)pTex->SegmentCount;
		CurYOffset = pTex->YOffset;

		// adjust vertically
		for(Col=0; Col<pTex->SegmentCount; Col++)
		{
			// adjust offset
			CurYOffset += CosStep;

			if(CurYOffset > GE_PI)
			{
				CosStep = -CosStep;
				// changed QD 12/15/05
				CurYOffset = GE_2PI - CurYOffset;// GE_PI - (CurYOffset - GE_PI);
			}
			else if(CurYOffset < 0.0)
			{
				CosStep = -CosStep;
				CurYOffset = -CurYOffset;
			}

			// compute positions
			XPos = Col * pTex->SegmentSize;
			YPos = (int)(((geFloat)cos(CurYOffset) + 1.0f) * ((geFloat)pTex->MaxYSway*0.5f));

			// adjust bitmap
			geBitmap_Blit(pTex->OriginalBmp, XPos, 0, pTex->WorkBmp, XPos, YPos, pTex->SegmentSize, AttachInfo.Height - YPos );
			geBitmap_Blit(pTex->OriginalBmp, XPos, AttachInfo.Height - YPos, pTex->WorkBmp, XPos, 0, pTex->SegmentSize, YPos );
		}

Posted: Wed Apr 18, 2007 3:32 am
by paradoxnj
What are you trying to make the eChaos entity do? A little more information would help out here...

Posted: Wed Apr 18, 2007 3:36 am
by revolutiongames2004
id like it if, when i put zero in for the max sway on x or y it will scroll the texture step number of times per cycle. I know the logic behind it, but im confused on the

1)pointer
2)variables

thanks

Posted: Wed Apr 18, 2007 4:56 am
by revolutiongames2004
never mind ill use a texture proc thingy but an explanation would be helpful for future coding, or maybe there is a guide somewhere that im missing