Lines Matching refs:ly

83 static void TCSetLayerType		( TCLayer* ly, u32 type );
84 static void TCSetLayerDimensions( TCLayer* ly, u32 width, u32 height );
98 void TCSetLayerAttributes ( TCLayer* ly, u32 type, u32 width, u32 height ) in TCSetLayerAttributes() argument
100 TCAssertMsg( (ly != NULL), "TCSetLayerAttributes: NULL layer ptr\n" ); in TCSetLayerAttributes()
111 TCSetLayerType( ly, type ); in TCSetLayerAttributes()
112 TCSetLayerDimensions(ly, width, height); in TCSetLayerAttributes()
124 u8* TCSetLayerBuffer ( TCLayer* ly ) in TCSetLayerBuffer() argument
129 TCAssertMsg( (ly != NULL), "TCSetLayerBuffer: NULL layer ptr\n" ); in TCSetLayerBuffer()
130 TCAssertMsg( (ly->width ), "TCSetLayerBuffer: layer width is not set\n" ); in TCSetLayerBuffer()
131 TCAssertMsg( (ly->height), "TCSetLayerBuffer: layer height is not set\n" ); in TCSetLayerBuffer()
134 TCFree( (void**)(&ly->data) ) ; in TCSetLayerBuffer()
139 switch(ly->type) in TCSetLayerBuffer()
142 size = ( ly->width * ly->height * 3 ); in TCSetLayerBuffer()
146 size = ( ly->width * ly->height * 2 ); in TCSetLayerBuffer()
150 size = ( ly->width * ly->height ); in TCSetLayerBuffer()
158 size = ( ( ly->width * ly->height * 4 ) >> 3 ); in TCSetLayerBuffer()
171 ly->data = (u8*)TCCalloc( 1, size ); in TCSetLayerBuffer()
173 return ly->data; in TCSetLayerBuffer()
185 void TCSetLayerValue ( TCLayer* ly, u32 x, u32 y, u16 ria, u8 g, u8 b ) in TCSetLayerValue() argument
191 TCAssertMsg( (ly != NULL), "TCSetLayerValue: NULL layer ptr\n" ); in TCSetLayerValue()
192 TCAssertMsg( (ly->width ), "TCSetLayerValue: layer width is not set\n" ); in TCSetLayerValue()
193 TCAssertMsg( (ly->data != NULL), "TCSetLayerValue: layer data ptr is not set\n" ); in TCSetLayerValue()
195 basePtr = (u8*)(ly->data); in TCSetLayerValue()
197 switch(ly->type) in TCSetLayerValue()
201 offset = ( (y * ly->width) + x ) * 3; in TCSetLayerValue()
210 offset = ((y * ly->width) + x) * 2; // offset in bytes in TCSetLayerValue()
216 offset = (y * ly->width) + x; in TCSetLayerValue()
237 void TCGetLayerValue ( TCLayer* ly, u32 x, u32 y, u16* riaPtr, u8* gPtr, u8* bPtr ) in TCGetLayerValue() argument
243 TCAssertMsg( (ly != NULL), "TCGetLayerValue: NULL layer ptr\n" ); in TCGetLayerValue()
244 TCAssertMsg( (ly->width ), "TCGetLayerValue: layer width is not set\n" ); in TCGetLayerValue()
245 TCAssertMsg( (ly->data != NULL), "TCGetLayerValue: layer data ptr is not set\n" ); in TCGetLayerValue()
248 basePtr = (u8*)(ly->data); in TCGetLayerValue()
250 switch(ly->type) in TCGetLayerValue()
254 offset = ( (y * ly->width) + x ) * 3; in TCGetLayerValue()
269 offset = ((y * ly->width) + x) * 2; // offset in bytes in TCGetLayerValue()
275 offset = (y * ly->width) + x; in TCGetLayerValue()
397 static void TCSetLayerType( TCLayer* ly, u32 type ) in TCSetLayerType() argument
400 TCAssertMsg( (ly != NULL), "TCSetLayerType, Null TCLayer ptr\n" ); in TCSetLayerType()
409 ly->type = type; in TCSetLayerType()
419 static void TCSetLayerDimensions( TCLayer* ly, u32 width, u32 height ) in TCSetLayerDimensions() argument
422 TCAssertMsg( (ly != NULL), "TCSetLayerDimensions: NULL TCLayer ptr\n" ); in TCSetLayerDimensions()
430 ly->width = width; in TCSetLayerDimensions()
431 ly->height = height; in TCSetLayerDimensions()