mirror of
https://github.com/alexbatalov/fallout2-ce.git
synced 2024-11-19 14:11:15 +00:00
Add mapper_mark_exit_grid
This commit is contained in:
parent
78ae0fb3bf
commit
e68c2a4784
@ -1,15 +1,45 @@
|
||||
#include "mapper/mapper.h"
|
||||
|
||||
#include "game_mouse.h"
|
||||
#include "object.h"
|
||||
#include "proto.h"
|
||||
|
||||
namespace fallout {
|
||||
|
||||
static int mapper_mark_exit_grid();
|
||||
static void mapper_mark_all_exit_grids();
|
||||
|
||||
// 0x559748
|
||||
MapTransition mapInfo = { -1, -1, 0, 0 };
|
||||
|
||||
// 0x48C678
|
||||
int mapper_mark_exit_grid()
|
||||
{
|
||||
int y;
|
||||
int x;
|
||||
int tile;
|
||||
Object* obj;
|
||||
|
||||
for (y = -2000; y != 2000; y += 200) {
|
||||
for (x = -10; x < 10; x++) {
|
||||
tile = gGameMouseBouncingCursor->tile + y + x;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 0x48C704
|
||||
void mapper_mark_all_exit_grids()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user