Skip to content

Commit

Permalink
Merge branch 'master' of ssh://deng.git.sourceforge.net/gitroot/deng/…
Browse files Browse the repository at this point in the history
…deng
  • Loading branch information
skyjake committed Jul 24, 2012
2 parents e942c04 + 133c329 commit 4e142e5
Show file tree
Hide file tree
Showing 18 changed files with 1,388 additions and 1,329 deletions.
4 changes: 2 additions & 2 deletions doomsday/engine/api/doomsday.h
Expand Up @@ -313,10 +313,10 @@ boolean MPE_End(void);

uint MPE_VertexCreate(coord_t x, coord_t y);
boolean MPE_VertexCreatev(size_t num, coord_t* values, uint* indices);
uint MPE_SidedefCreate(short flags, materialid_t topMaterial, float topOffsetX, float topOffsetY, float topRed, float topGreen, float topBlue, materialid_t middleMaterial, float middleOffsetX, float middleOffsetY, float middleRed, float middleGreen, float middleBlue, float middleAlpha, materialid_t bottomMaterial, float bottomOffsetX, float bottomOffsetY, float bottomRed, float bottomGreen, float bottomBlue);
uint MPE_SidedefCreate(short flags, const ddstring_t* topMaterial, float topOffsetX, float topOffsetY, float topRed, float topGreen, float topBlue, const ddstring_t* middleMaterial, float middleOffsetX, float middleOffsetY, float middleRed, float middleGreen, float middleBlue, float middleAlpha, const ddstring_t* bottomMaterial, float bottomOffsetX, float bottomOffsetY, float bottomRed, float bottomGreen, float bottomBlue);
uint MPE_LinedefCreate(uint v1, uint v2, uint frontSector, uint backSector, 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_PlaneCreate(uint sector, coord_t height, const ddstring_t* materialUri, 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, coord_t originX, coord_t originY);
boolean MPE_GameObjProperty(const char* objName, uint idx, const char* propName, valuetype_t type, void* data);
///@}
Expand Down
20 changes: 14 additions & 6 deletions doomsday/engine/portable/include/edit_map.h
Expand Up @@ -55,8 +55,15 @@ typedef struct editmap_s {

//extern editmap_t editMap;

boolean MPE_Begin(const char* mapUri);
boolean MPE_End(void);
/**
* To be called to begin the map building process.
*/
boolean MPE_Begin(const char* mapUri);

/**
* To be called to end the map building process.
*/
boolean MPE_End(void);

/**
* Create a new vertex in currently loaded editable map.
Expand All @@ -82,9 +89,9 @@ uint MPE_VertexCreate(coord_t x, coord_t y);
boolean MPE_VertexCreatev(size_t num, coord_t* values, uint* indices);

uint MPE_SidedefCreate(short flags,
materialid_t topMaterial, float topOffsetX, float topOffsetY, float topRed, float topGreen, float topBlue,
materialid_t middleMaterial, float middleOffsetX, float middleOffsetY, float middleRed, float middleGreen, float middleBlue, float middleAlpha,
materialid_t bottomMaterial, float bottomOffsetX, float bottomOffsetY, float bottomRed, float bottomGreen, float bottomBlue);
const ddstring_t* topMaterial, float topOffsetX, float topOffsetY, float topRed, float topGreen, float topBlue,
const ddstring_t* middleMaterial, float middleOffsetX, float middleOffsetY, float middleRed, float middleGreen, float middleBlue, float middleAlpha,
const ddstring_t* bottomMaterial, float bottomOffsetX, float bottomOffsetY, float bottomRed, float bottomGreen, float bottomBlue);

/**
* Create a new linedef in the editable map.
Expand All @@ -105,7 +112,7 @@ uint MPE_LinedefCreate(uint v1, uint v2, uint frontSector, uint backSector,

uint MPE_SectorCreate(float lightlevel, float red, float green, float blue);
uint MPE_PlaneCreate(uint sector, coord_t height,
materialid_t material,
const ddstring_t* material,
float matOffsetX, float matOffsetY,
float r, float g, float b, float a,
float normalX, float normalY, float normalZ);
Expand All @@ -127,6 +134,7 @@ boolean MPE_GameObjProperty(const char *objName, uint idx,
void MPE_PruneRedundantMapData(editmap_t* map, int flags);

GameMap* MPE_GetLastBuiltMap(void);
boolean MPE_GetLastBuiltMapResult(void);

#ifdef __cplusplus
} // extern "C"
Expand Down
10 changes: 5 additions & 5 deletions doomsday/engine/portable/include/p_mapdata.h
Expand Up @@ -225,17 +225,17 @@ const char* P_MapSourceFile(const char* uri);
*/
boolean P_LoadMap(const char* uri);

void P_RegisterUnknownTexture(const char* name, boolean planeTex);
void P_RegisterMissingMaterial(const char* materialUri);

/**
* Announce any bad texture names we came across when loading the map.
* Announce any missing materials we came across when loading the map.
*/
void P_PrintMissingTextureList(void);
void P_PrintMissingMaterialList(void);

/**
* Frees memory we allocated for bad texture name collection.
* Clear the missing material list.
*/
void P_FreeBadTexList(void);
void P_ClearMissingMaterialList(void);

/**
* To be called to initialize the game map object defs.
Expand Down
15 changes: 10 additions & 5 deletions doomsday/engine/portable/src/dam_main.c
Expand Up @@ -207,15 +207,20 @@ static boolean convertMap(GameMap** map, archivedmap_t* dam)
Str_Delete(path);
);

// Nope. See if there is a converter available.
// Any converters available?
if(Plug_CheckForHook(HOOK_MAP_CONVERT))
{
// Pass the lump list around the map converters, hopefully
// one of them will recognise the format and convert it.
// Ask each converter in turn whether the map format is recognised
// and if so, to interpret/transfer it to us via the map edit interface.
if(DD_CallHooks(HOOK_MAP_CONVERT, 0, (void*) dam->uri))
{
converted = true;
*map = MPE_GetLastBuiltMap();
// Transfer went OK.
// Were we able to produce a valid map?
converted = MPE_GetLastBuiltMapResult();
if(converted)
{
*map = MPE_GetLastBuiltMap();
}
}
}

Expand Down

0 comments on commit 4e142e5

Please sign in to comment.