Instead of hard coding the shaders we now allow the terrain property to
supplied data about the shaders. This is not optional currently, since
we expect the clients to understand the different layers (like "sand",
"grass" etc.), but we'll leave it at that for now.
This follows earlier work where we've moved more and more functionality
out of the entity classes and into properties. One of the goals of this
change is to allow for the "terrain" property to be added to arbitrary
entities.
All IG code should use the interface of LocatedEntity when dealing
with any entity, rather than sometimes requiring Entity. Add virtual
functions to the interface where required, and modify all other interfaces
to stop them using Entity. This makes the code way cleaner, and much better
de-coupled.
* rulesets/TerrainModProperty.cpp, rulesetes/TerrainModProperty.h: Add
a member to store the pointer returned from Terrain::addMod(). Revise
set() to use this pointer.
* rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h: Update the
API for controlling modifiers to use the pointer returned by
Terrain::addMod() when adding or updating modifiers.
* server/CorePropertyManager.cpp: Update the handler for Move Operations
on terrain modifiers so that it correctly uses the new position.
* rulesets/TerrainProperty.cpp, rulesets/World.cpp: Fix the code
to take account of the modified semantics of Segment member
variable xref and yref.
* configure.ac: Add a requirement for the latest version of
Mercator.
Changes by Tamas Bates <rhymer@gmail.com>
* rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h: Add an
API for controlling modifiers to the terrain.
* rulesets/TerrainModProperty.cpp, rulesets/TerrainModProperty.h:
Implement a new property for entities which affect the height
of the terrain.
* server/CorePropertyManager.cpp: Add handlers to deal with
operations that manipulate the terrain when a terrain mod
property changes.
* rulesets/mason/define_world.py: Add a test function for
terrain modification properties.
* rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h:
Add storage for terrain.surfaces subproperty.
* rulesets/mason/define_world.py: Add some surface settings to the
default moraf terrain.
* rulesets/Character.cpp, rulesets/MemMap.cpp, rulesets/Motion.cpp,
rulesets/Python_API.cpp, rulesets/TerrainProperty.cpp,
rulesets/Thing.cpp, rulesets/World.cpp: Don't use camel casing for
local variables or function arguments.
* rulesets/Py_Property.h, rulesets/Py_Property.cpp: Add handling
for a Python wrapper for terrain property.
* rulesets/TerrainProperty.h, rulesets/TerrainProperty.cpp:
Copy functions from World for getting information about surface
and height from the terrain property.
* tests/Makefile.am: Update the linker options for the flags now that
the core property code references the mercator terrain library.