diff --git a/shmserver/mod-maps.cpp b/shmserver/mod-maps.cpp index a6cfc0fe1..54700101a 100644 --- a/shmserver/mod-maps.cpp +++ b/shmserver/mod-maps.cpp @@ -11,7 +11,6 @@ using namespace DFHack::Maps; #include #include -#include extern char *shm; @@ -38,9 +37,9 @@ void GetMapSize (void *data) maps_modulestate * state = (maps_modulestate *) data; if(state->inited) { - SHMHDR->x = *((uint32_t *)state->offsets.x_count_offset); - SHMHDR->y = *((uint32_t *)state->offsets.y_count_offset); - SHMHDR->z = *((uint32_t *)state->offsets.z_count_offset); + SHMHDR->x = *(uint32_t *) (state->offsets.x_count_offset); + SHMHDR->y = *(uint32_t *) (state->offsets.y_count_offset); + SHMHDR->z = *(uint32_t *) (state->offsets.z_count_offset); SHMHDR->error = false; } else @@ -86,7 +85,7 @@ void ReadBlockByCoords (void * data) } } -DFPP_module InitMaps(void) +DFPP_module InitMaps(std::vector * module_registry) { DFPP_module maps; maps.name = "Maps"; @@ -110,5 +109,5 @@ DFPP_module InitMaps(void) // really doesn't fit into 1MB, there should be a streaming variant to better utilize context switches maps.set_command(MAP_READ_BLOCKS_3D, FUNCTION, "Read a range of blocks between two sets of coords", NullCommand, CORE_SUSPENDED); - return maps; + module_registry->push_back(maps); } \ No newline at end of file