little help w/ the source plez

Topics regarding Scripting with Reality Factory
Post Reply
revolutiongames2004
Posts: 75
Joined: Tue Jul 05, 2005 4:29 pm

little help w/ the source plez

Post 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 );
		}
User avatar
paradoxnj
RF2 Dev Team
Posts: 1328
Joined: Wed Mar 01, 2006 7:37 pm
Location: Brick, NJ
Contact:

Post by paradoxnj »

What are you trying to make the eChaos entity do? A little more information would help out here...
revolutiongames2004
Posts: 75
Joined: Tue Jul 05, 2005 4:29 pm

Post 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
revolutiongames2004
Posts: 75
Joined: Tue Jul 05, 2005 4:29 pm

Post 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
Post Reply