| 1942 | } |
| 1943 | |
| 1944 | static command_result GetWorldMapCenter(color_ostream &stream, const EmptyMessage *in, WorldMap *out) |
| 1945 | { |
| 1946 | if (!df::global::world->world_data) |
| 1947 | { |
| 1948 | out->set_world_width(0); |
| 1949 | out->set_world_height(0); |
| 1950 | return CR_FAILURE; |
| 1951 | } |
| 1952 | df::world_data * data = df::global::world->world_data; |
| 1953 | int width = data->world_width; |
| 1954 | int height = data->world_height; |
| 1955 | out->set_world_width(width); |
| 1956 | out->set_world_height(height); |
| 1957 | DFCoord pos = GetMapCenter(); |
| 1958 | out->set_center_x(pos.x); |
| 1959 | out->set_center_y(pos.y); |
| 1960 | out->set_center_z(pos.z); |
| 1961 | out->set_name(DF2UTF(Translation::translateName(&(data->name), false))); |
| 1962 | out->set_name_english(DF2UTF(Translation::translateName(&(data->name), true))); |
| 1963 | out->set_cur_year(World::ReadCurrentYear()); |
| 1964 | out->set_cur_year_tick(World::ReadCurrentTick()); |
| 1965 | return CR_OK; |
| 1966 | } |
| 1967 | |
| 1968 | static command_result GetWorldMap(color_ostream &stream, const EmptyMessage *in, WorldMap *out) |
| 1969 | { |
nothing calls this directly
no test coverage detected