diff --git a/src/mapper/mapper.cc b/src/mapper/mapper.cc new file mode 100644 index 0000000..a3885e9 --- /dev/null +++ b/src/mapper/mapper.cc @@ -0,0 +1,30 @@ +#include "mapper/mapper.h" + +#include "object.h" +#include "proto.h" + +namespace fallout { + +static void mapper_mark_all_exit_grids(); + +// 0x559748 +MapTransition mapInfo = { -1, -1, 0, 0 }; + +// 0x48C704 +void mapper_mark_all_exit_grids() +{ + Object* obj; + + obj = objectFindFirstAtElevation(gElevation); + while (obj != NULL) { + if (isExitGridPid(obj->pid)) { + obj->data.misc.map = mapInfo.map; + obj->data.misc.tile = mapInfo.tile; + obj->data.misc.elevation = mapInfo.elevation; + obj->data.misc.rotation = mapInfo.rotation; + } + obj = objectFindNextAtElevation(); + } +} + +} // namespace fallout diff --git a/src/mapper/mapper.h b/src/mapper/mapper.h new file mode 100644 index 0000000..3d6adb3 --- /dev/null +++ b/src/mapper/mapper.h @@ -0,0 +1,12 @@ +#ifndef FALLOUT_MAPPER_MAPPER_H_ +#define FALLOUT_MAPPER_MAPPER_H_ + +#include "map.h" + +namespace fallout { + +extern MapTransition mapInfo; + +} // namespace fallout + +#endif /* FALLOUT_MAPPER_MAPPER_H_ */