Skip to content

Commit

Permalink
WadMapConverter|Refactor: Renamed mthing_t::pos as origin
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Apr 19, 2012
1 parent 27ae829 commit 0bae941
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion doomsday/plugins/wadmapconverter/include/wadmapconverter.h
Expand Up @@ -106,7 +106,7 @@ typedef struct msector_s {
} msector_t;

typedef struct mthing_s {
int16_t pos[3];
int16_t origin[3];
angle_t angle;
int16_t doomEdNum;
int32_t flags;
Expand Down
26 changes: 13 additions & 13 deletions doomsday/plugins/wadmapconverter/src/load.c
Expand Up @@ -894,7 +894,7 @@ static void findPolyobjs(void)
if(thing->doomEdNum == PO_ANCHOR_DOOMEDNUM)
{ // A polyobj anchor.
int tag = thing->angle;
findAndCreatePolyobj(tag, thing->pos[VX], thing->pos[VY]);
findAndCreatePolyobj(tag, thing->origin[VX], thing->origin[VY]);
}
}
}
Expand Down Expand Up @@ -1462,9 +1462,9 @@ static boolean loadThings(const uint8_t* buf, size_t len)
{
mthing_t* t = &map->things[n];

t->pos[VX] = SHORT(*((const int16_t*) (ptr)));
t->pos[VY] = SHORT(*((const int16_t*) (ptr+2)));
t->pos[VZ] = 0;
t->origin[VX] = SHORT(*((const int16_t*) (ptr)));
t->origin[VY] = SHORT(*((const int16_t*) (ptr+2)));
t->origin[VZ] = 0;
t->angle = ANG45 * (SHORT(*((const int16_t*) (ptr+4))) / 45);
t->doomEdNum = SHORT(*((const int16_t*) (ptr+6)));
t->flags = SHORT(*((const int16_t*) (ptr+8)));
Expand Down Expand Up @@ -1516,9 +1516,9 @@ static boolean loadThings(const uint8_t* buf, size_t len)
{
mthing_t* t = &map->things[n];

t->pos[VX] = SHORT(*((const int16_t*) (ptr)));
t->pos[VY] = SHORT(*((const int16_t*) (ptr+2)));
t->pos[VZ] = SHORT(*((const int16_t*) (ptr+4)));
t->origin[VX] = SHORT(*((const int16_t*) (ptr)));
t->origin[VY] = SHORT(*((const int16_t*) (ptr+2)));
t->origin[VZ] = SHORT(*((const int16_t*) (ptr+4)));
t->angle = ANG45 * (SHORT(*((const int16_t*) (ptr+6))) / 45);
t->doomEdNum = SHORT(*((const int16_t*) (ptr+8)));

Expand Down Expand Up @@ -1582,9 +1582,9 @@ static boolean loadThings(const uint8_t* buf, size_t len)
mthing_t* t = &map->things[n];

t->xTID = SHORT(*((const int16_t*) (ptr)));
t->pos[VX] = SHORT(*((const int16_t*) (ptr+2)));
t->pos[VY] = SHORT(*((const int16_t*) (ptr+4)));
t->pos[VZ] = SHORT(*((const int16_t*) (ptr+6)));
t->origin[VX] = SHORT(*((const int16_t*) (ptr+2)));
t->origin[VY] = SHORT(*((const int16_t*) (ptr+4)));
t->origin[VZ] = SHORT(*((const int16_t*) (ptr+6)));
t->angle = SHORT(*((const int16_t*) (ptr+8)));
t->doomEdNum = SHORT(*((const int16_t*) (ptr+10)));
/**
Expand Down Expand Up @@ -1910,9 +1910,9 @@ boolean TransferMap(void)
{
mthing_t* th = &map->things[i];

MPE_GameObjProperty("Thing", i, "X", DDVT_SHORT, &th->pos[VX]);
MPE_GameObjProperty("Thing", i, "Y", DDVT_SHORT, &th->pos[VY]);
MPE_GameObjProperty("Thing", i, "Z", DDVT_SHORT, &th->pos[VZ]);
MPE_GameObjProperty("Thing", i, "X", DDVT_SHORT, &th->origin[VX]);
MPE_GameObjProperty("Thing", i, "Y", DDVT_SHORT, &th->origin[VY]);
MPE_GameObjProperty("Thing", i, "Z", DDVT_SHORT, &th->origin[VZ]);
MPE_GameObjProperty("Thing", i, "Angle", DDVT_ANGLE, &th->angle);
MPE_GameObjProperty("Thing", i, "DoomEdNum", DDVT_SHORT, &th->doomEdNum);
MPE_GameObjProperty("Thing", i, "SkillModes", DDVT_INT, &th->skillModes);
Expand Down

0 comments on commit 0bae941

Please sign in to comment.