|
Simutrans-Squirrel-API
r11875
|

Public Member Functions | |
| coord (int x, int y) | |
| coord | operator+ (coord other) |
| coord | operator- (coord other) |
| coord | operator- () |
| coord | operator* (integer fac) |
| coord | operator/ (integer fac) |
| string | _tostring () |
| string | href (string text) |
| dir | to_dir () |
Public Attributes | |
| integer | x |
| x-coordinate More... | |
| integer | y |
| y-coordinate More... | |
Class that holds 2d coordinates. All functions that use this as input parameters will accept every data structure that contains members x and y.
Coordinates always refer to the original rotation in map::file. They will be rotated if transferred between the game engine and squirrel.
Definition at line 32 of file api_simple.cc.
| coord::coord | ( | int | x, |
| int | y | ||
| ) |
| string coord::_tostring | ( | ) |
Converts coordinate to string containing the coordinates in the current rotation of the map.
Cannot be used in links in scenario texts. Use href instead.
| string coord::href | ( | string | text | ) |
Generates text to generate links to coordinates in scenario texts.
| text | text to be shown in the link |
| coord coord::operator* | ( | integer | fac | ) |
| coord coord::operator- | ( | ) |
| coord coord::operator/ | ( | integer | fac | ) |
| dir coord::to_dir | ( | ) |
Helper function to convert direction vector to dir type.
| integer coord::x |
x-coordinate
Definition at line 35 of file api_simple.cc.
| integer coord::y |
y-coordinate
Definition at line 37 of file api_simple.cc.
1.8.13