World management.
More...
World management.
◆ TLN_LoadWorld()
bool TLN_LoadWorld |
( |
const char * |
filename, |
|
|
int |
first_layer |
|
) |
| |
Loads and assigns complete TMX file.
- Parameters
-
filename | TMX file to load |
first_layer | Starting layer number where place the loaded tmx |
◆ TLN_SetWorldPosition()
void TLN_SetWorldPosition |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
Sets global world position, moving all layers in sync according to their parallax factor.
- Parameters
-
x | horizontal position in world space |
y | vertical position in world space |
◆ TLN_SetLayerParallaxFactor()
bool TLN_SetLayerParallaxFactor |
( |
int |
nlayer, |
|
|
float |
x, |
|
|
float |
y |
|
) |
| |
Sets layer parallax factor to use in conjunction with TLN_SetWorldPosition.
- Parameters
-
nlayer | Layer index [0, num_layers - 1] |
x | Horizontal parallax factor |
y | Vertical parallax factor |
◆ TLN_SetSpriteWorldPosition()
bool TLN_SetSpriteWorldPosition |
( |
int |
nsprite, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
Sets the sprite position in world space coordinates.
- Parameters
-
nsprite | Id of the sprite [0, num_sprites - 1] |
x | Horizontal world position of pivot (0 = left margin) |
y | Vertical world position of pivot (0 = top margin) |
- See also
- TLN_SetSpritePivot