Attr-Texture by class

From Vectorlab
Jump to: navigation, search


Sets every part ID of an object to be by class. By Orso B. Schmid


{ Orso ***************************** }
{ sets texture by class, for every part }
PROCEDURE A_TextureByClass(h: HANDLE);
	VAR
		i : INTEGER;
	BEGIN
		IF (h <> NIL) & IsTextureableObject(h) THEN
			FOR i:= 0 TO 2 DO { primary, secondary, tertiary }
				SetTextureRef(h, -1, i);
				{ -1 as texture ID is "byClass" flag }
		
		{ walls will need all parts set, roofs only 0 and 1, the rest only 0 }
	END;