Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive refining mapgen API prototype #5005

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ set(common_SRCS
mapgen_flat.cpp
mapgen_fractal.cpp
mapgen_singlenode.cpp
mapgen_rec.cpp
mapgen_v5.cpp
mapgen_v6.cpp
mapgen_v7.cpp
Expand Down
1 change: 1 addition & 0 deletions src/irr_v2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,

typedef core::vector2d<f32> v2f;
typedef core::vector2d<s16> v2s16;
typedef core::vector2d<u16> v2u16;
typedef core::vector2d<s32> v2s32;
typedef core::vector2d<u32> v2u32;
typedef core::vector2d<f32> v2f32;
Expand Down
6 changes: 6 additions & 0 deletions src/mapgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mapgen_v7.h"
#include "mapgen_valleys.h"
#include "mapgen_singlenode.h"
#include "mapgen_rec.h"
#include "cavegen.h"
#include "dungeongen.h"

Expand Down Expand Up @@ -85,6 +86,7 @@ static MapgenDesc g_reg_mapgens[] = {
{"fractal", true},
{"valleys", true},
{"singlenode", false},
{"rr_demo", true}
};

STATIC_ASSERT(
Expand Down Expand Up @@ -187,6 +189,8 @@ Mapgen *Mapgen::createMapgen(MapgenType mgtype, int mgid,
return new MapgenV7(mgid, (MapgenV7Params *)params, emerge);
case MAPGEN_VALLEYS:
return new MapgenValleys(mgid, (MapgenValleysParams *)params, emerge);
case MAPGEN_RR_DEMO:
return new Mapgen_Test(mgid, (MapgenParams *)params, emerge);
default:
return NULL;
}
Expand All @@ -210,6 +214,8 @@ MapgenParams *Mapgen::createMapgenParams(MapgenType mgtype)
return new MapgenV7Params;
case MAPGEN_VALLEYS:
return new MapgenValleysParams;
case MAPGEN_RR_DEMO:
return new MapgenParams;
default:
return NULL;
}
Expand Down
1 change: 1 addition & 0 deletions src/mapgen.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ enum MapgenType {
MAPGEN_FRACTAL,
MAPGEN_VALLEYS,
MAPGEN_SINGLENODE,
MAPGEN_RR_DEMO,
MAPGEN_INVALID,
};

Expand Down