Add mapper_mark_all_exit_grids

This commit is contained in:
Alexander Batalov 2023-07-23 09:25:56 +03:00
parent 127de14318
commit 78ae0fb3bf
2 changed files with 42 additions and 0 deletions

30
src/mapper/mapper.cc Normal file
View File

@ -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

12
src/mapper/mapper.h Normal file
View File

@ -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_ */