From 1ed3b3aed2e538af2c3bffa41f54a30ac6535f12 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 17 Mar 2013 17:55:03 +0000 Subject: Rewritten generators so that they use the cChunkDesc class (and thus can use cBlockArea merging) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1282 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Generating/ComposableGenerator.h | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) (limited to 'source/Generating/ComposableGenerator.h') diff --git a/source/Generating/ComposableGenerator.h b/source/Generating/ComposableGenerator.h index b6f946eb3..fca2c26c6 100644 --- a/source/Generating/ComposableGenerator.h +++ b/source/Generating/ComposableGenerator.h @@ -18,6 +18,7 @@ See http://forum.mc-server.org/showthread.php?tid=409 for details. #pragma once #include "ChunkGenerator.h" +#include "ChunkDesc.h" @@ -72,15 +73,7 @@ class cTerrainCompositionGen public: virtual ~cTerrainCompositionGen() {} // Force a virtual destructor in descendants - virtual void ComposeTerrain( - int a_ChunkX, int a_ChunkZ, - cChunkDef::BlockTypes & a_BlockTypes, // BlockTypes to be generated (the whole array gets initialized, even air) - cChunkDef::BlockNibbles & a_BlockMeta, // BlockMetas to be generated (the whole array gets initialized) - const cChunkDef::HeightMap & a_HeightMap, // The height map to fit - const cChunkDef::BiomeMap & a_BiomeMap, // Biomes to adhere to - cEntityList & a_Entities, // Entitites may be generated along with the terrain - cBlockEntityList & a_BlockEntities // Block entitites may be generated (chests / furnaces / ...) - ) = 0; + virtual void ComposeTerrain(cChunkDesc & a_ChunkDesc) = 0; } ; @@ -98,14 +91,7 @@ class cStructureGen public: virtual ~cStructureGen() {} // Force a virtual destructor in descendants - virtual void GenStructures( - int a_ChunkX, int a_ChunkZ, - cChunkDef::BlockTypes & a_BlockTypes, // Block types to read and change - cChunkDef::BlockNibbles & a_BlockMeta, // Block meta to read and change - cChunkDef::HeightMap & a_HeightMap, // Height map to read and change by the current data - cEntityList & a_Entities, // Entities may be added or deleted - cBlockEntityList & a_BlockEntities // Block entities may be added or deleted - ) = 0; + virtual void GenStructures(cChunkDesc & a_ChunkDesc) = 0; } ; typedef std::list cStructureGenList; @@ -122,15 +108,7 @@ class cFinishGen public: virtual ~cFinishGen() {} // Force a virtual destructor in descendants - virtual void GenFinish( - int a_ChunkX, int a_ChunkZ, - cChunkDef::BlockTypes & a_BlockTypes, // Block types to read and change - cChunkDef::BlockNibbles & a_BlockMeta, // Block meta to read and change - cChunkDef::HeightMap & a_HeightMap, // Height map to read and change by the current data - const cChunkDef::BiomeMap & a_BiomeMap, // Biomes to adhere to - cEntityList & a_Entities, // Entities may be added or deleted - cBlockEntityList & a_BlockEntities // Block entities may be added or deleted - ) = 0; + virtual void GenFinish(cChunkDesc & a_ChunkDesc) = 0; } ; typedef std::list cFinishGenList; -- cgit v1.2.3