SetTextCelCoords

Sets x and y coordinates for a cel.

Synopsis

void SetTextCelCoords (TextCel *tCel, Coord ccbX, Coord ccbY)

Description

Sets the TextCel CCB coordinates (ccb_XPos and ccb_YPos). Use this call as a convenience so that you don't need to dereference two levels of pointers to update a CCB's on-screen position.

If you prefer, you can manipulate a CCB's position, size, and perspective fields directly; you don't have to use this function to safely modify the on-screen position. Other utility routines for positioning cels, such as MapCel(), may also be safely used.

The ccbX and ccbY values are interpreted as integer values if, when viewed as a longword, they are in the range of -1024<value<1024. (That is, if interpreting the values as frac16 types would result in a very small fraction almost zero they are assumed to be integers.) In this case, SetTextCelCoords() converts the values to frac16 before storing them into the CCB. Values outside that range are considered to be frac16 values already, and are stored into the CCB without conversion.

Arguments

tCel
Pointer to a TextCel structure.
ccbX
X coordinate for the text cel CCB.
ccbY
Y coordinate for the text cel CCB.

Associated Files

lib3do.lib, textlib.h