Skip to main content
gamedev.net
🔒 Locked

Question about an example

Started by subnet_rx 0 replies 200+ views
Original Post
subnet_rx
subnet_rx
    for (xIdx = 0; xIdx < 36; xIdx++)				// x-direction

		{
			for (yIdx = 0; yIdx < 18; yIdx++)			// y-direction

			{
				// calculate texture coordinates for current quad

				texLeft = float(xIdx) / 35.0f;			// left texture coordinate

				texBottom = float(yIdx) / 18.0f;		// bottom texture coordinate

				texRight = float(xIdx+1) / 35.0f;		// right texture coordinate

				texTop = float(yIdx+1) / 18.0f;			// top texture coordinate    
Why are they dividing by 35 and 18? This is a flag using a 36x20 array of points. subnet_rx

"There are two types of langages, those that everyone bitches about, and those that no one uses."

Standardized C++ Libraries
C++ Programming help
The only news site on the web Edited by - subnet_rx on January 3, 2002 2:21:42 AM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.