Skip to content

Commit

Permalink
API: MPE_PolyobjCreate() origin coordinates are now specified as double
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Apr 19, 2012
1 parent 11eb4c0 commit bf3e94e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion doomsday/engine/api/doomsday.h
Expand Up @@ -319,7 +319,7 @@ boolean MPE_End(void);
uint MPE_LinedefCreate(uint v1, uint v2, uint frontSide, uint backSide, int flags);
uint MPE_SectorCreate(float lightlevel, float red, float green, float blue);
uint MPE_PlaneCreate(uint sector, coord_t height, materialid_t materialId, float matOffsetX, float matOffsetY, float r, float g, float b, float a, float normalX, float normalY, float normalZ);
uint MPE_PolyobjCreate(uint* lines, uint linecount, int tag, int sequenceType, float anchorX, float anchorY);
uint MPE_PolyobjCreate(uint* lines, uint linecount, int tag, int sequenceType, coord_t originX, coord_t originY);
boolean MPE_GameObjProperty(const char* objName, uint idx, const char* propName, valuetype_t type, void* data);
///@}

Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/portable/include/edit_map.h
Expand Up @@ -102,7 +102,7 @@ uint MPE_PlaneCreate(uint sector, coord_t height,
float r, float g, float b, float a,
float normalX, float normalY, float normalZ);
uint MPE_PolyobjCreate(uint *lines, uint linecount,
int tag, int sequenceType, float startX, float startY);
int tag, int sequenceType, coord_t originX, coord_t originY);

boolean MPE_GameObjProperty(const char *objName, uint idx,
const char *propName, valuetype_t type,
Expand Down
6 changes: 3 additions & 3 deletions doomsday/engine/portable/src/edit_map.c
Expand Up @@ -1951,7 +1951,7 @@ uint MPE_SectorCreate(float lightlevel, float red, float green, float blue)
}

uint MPE_PolyobjCreate(uint* lines, uint lineCount, int tag, int sequenceType,
float anchorX, float anchorY)
coord_t originX, coord_t originY)
{
Polyobj* po;
uint i;
Expand All @@ -1973,8 +1973,8 @@ uint MPE_PolyobjCreate(uint* lines, uint lineCount, int tag, int sequenceType,
po = createPolyobj();
po->tag = tag;
po->seqType = sequenceType;
po->origin[VX] = anchorX;
po->origin[VY] = anchorY;
po->origin[VX] = originX;
po->origin[VY] = originY;

po->lineCount = lineCount;
po->lines = M_Calloc(sizeof(LineDef*) * (po->lineCount+1));
Expand Down
8 changes: 4 additions & 4 deletions doomsday/plugins/wadmapconverter/src/load.c
Expand Up @@ -1893,15 +1893,15 @@ boolean TransferMap(void)
VERBOSE2(Con_Message("WadMapConverter::Transfering polyobjs...\n"));
for(i = 0; i < map->numPolyobjs; ++i)
{
mpolyobj_t* po = map->polyobjs[i];
uint j, *lineList;
mpolyobj_t* po = map->polyobjs[i];
uint j, *lineList;

lineList = malloc(sizeof(uint) * po->lineCount);
for(j = 0; j < po->lineCount; ++j)
lineList[j] = po->lineIndices[j] + 1;
MPE_PolyobjCreate(lineList, po->lineCount, po->tag,
po->seqType, (float) po->anchor[VX],
(float) po->anchor[VY]);
po->seqType, (coord_t) po->anchor[VX],
(coord_t) po->anchor[VY]);
free(lineList);
}

Expand Down

0 comments on commit bf3e94e

Please sign in to comment.