forked from Mirrors/openclonk
Add two new Material Shapes Octagon and Smoother, more chunk antialias
Previously, smooth materials would get extra triangles at the top to create slopes instead of steps. Now those also appear at the bottom. Smooth also gets generally smoother at the bottom, while Rough gets rougher at the top. The new Smoother material is somewhere between Flat and Smooth. Octagon is like Flat but also gets straight slope triangles.
parent
6524f5b9d5
commit
6d6737a022
24
docs/de.po
24
docs/de.po
|
@ -3,16 +3,16 @@
|
||||||
# PeterW <Peter.Wortmann@gmx.de>
|
# PeterW <Peter.Wortmann@gmx.de>
|
||||||
# Sven2 <sven2@goldwipf.de>
|
# Sven2 <sven2@goldwipf.de>
|
||||||
# Armin Burgmeier <armin@arbur.net>, 2010.
|
# Armin Burgmeier <armin@arbur.net>, 2010.
|
||||||
# Günther Brammer <gbrammer@gmx.de>, 2009, 2010, 2011.
|
|
||||||
# Benedict Etzel <benedict.etzel@gmail.com>, 2011.
|
# Benedict Etzel <benedict.etzel@gmail.com>, 2011.
|
||||||
|
# Günther Brammer <gbrammer@gmx.de>, 2009, 2010, 2011.
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: OpenClonk documentation\n"
|
"Project-Id-Version: OpenClonk documentation\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2011-09-05 22:05+0200\n"
|
"POT-Creation-Date: 2011-09-06 23:32+0200\n"
|
||||||
"PO-Revision-Date: 2011-07-01 15:00+0100\n"
|
"PO-Revision-Date: 2011-09-06 23:16+0200\n"
|
||||||
"Last-Translator: Benedict Etzel <benedict.etzel@gmail.com>\n"
|
"Last-Translator: Günther Brammer <gbrammer@gmx.de>\n"
|
||||||
"Language-Team: German <>\n"
|
"Language-Team: German <>\n"
|
||||||
"Language: German\n"
|
"Language: German\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
|
@ -153,7 +153,6 @@ msgstr "Scripte"
|
||||||
#: sdk/particle/index.xml:161(h)
|
#: sdk/particle/index.xml:161(h)
|
||||||
#: sdk/definition/properties.xml:6(title)
|
#: sdk/definition/properties.xml:6(title)
|
||||||
#: sdk/definition/properties.xml:7(h)
|
#: sdk/definition/properties.xml:7(h)
|
||||||
#: sdk/definition/properties.xml:22(caption)
|
|
||||||
msgid "Properties"
|
msgid "Properties"
|
||||||
msgstr "Eigenschaften"
|
msgstr "Eigenschaften"
|
||||||
|
|
||||||
|
@ -13822,8 +13821,8 @@ msgid "Shape"
|
||||||
msgstr "Shape"
|
msgstr "Shape"
|
||||||
|
|
||||||
#: sdk/material/ocm.xml:31(col)
|
#: sdk/material/ocm.xml:31(col)
|
||||||
msgid "Shape of surface: 0 smooth, 1 smooth on top, 2 semi rough, 3 rough."
|
msgid "Shape of surface: Flat (0), Octagon, FlatTop (1), Smoother, Smooth (2) or Rough (3)."
|
||||||
msgstr "Landschaftsform: 0 glatt, 1 oben glatt, 2 halbrauh, 3 komplett rauh."
|
msgstr "Form der Oberfläche: Flat (0, flach), Octagon (achteckig), FlatTop (1, oben flach), Smoother (weicher), Smooth (2, weich) oder Rough (3, rau)."
|
||||||
|
|
||||||
#: sdk/material/ocm.xml:34(col)
|
#: sdk/material/ocm.xml:34(col)
|
||||||
msgid "Density"
|
msgid "Density"
|
||||||
|
@ -15367,6 +15366,10 @@ msgstr "Die Engine ruft zu Zeiten die folgenden Funktionen in Objektscripten auf
|
||||||
msgid "Every object has a number of properties that are handled by the engine. Typically, these are inherited from the object's Prototype, an <emlink href=\"definition/index.html#Objektdefinitionen\">Object Definition</emlink>. A Property of an Object Definition is defined with the <code>local</code> keyword in the <emlink href=\"definition/script.html#Objektscripte\">Definition's script</emlink>:"
|
msgid "Every object has a number of properties that are handled by the engine. Typically, these are inherited from the object's Prototype, an <emlink href=\"definition/index.html#Objektdefinitionen\">Object Definition</emlink>. A Property of an Object Definition is defined with the <code>local</code> keyword in the <emlink href=\"definition/script.html#Objektscripte\">Definition's script</emlink>:"
|
||||||
msgstr "Jedes Objekt besitzt Properties die von der engine interpretiert werden. Normalerweise werden diese vom Prototyp des objekts abgeleitet, seiner <emlink href=\"definition/index.html#Objektdefinitionen\">Objektdefinition</emlink>. Eine Property einer Objektdefinition wird mit dem <code>local</code>-Schlüsselwort im <emlink href=\"definition/script.html#Objektscripte\">Definitionsscript</emlink> definiert."
|
msgstr "Jedes Objekt besitzt Properties die von der engine interpretiert werden. Normalerweise werden diese vom Prototyp des objekts abgeleitet, seiner <emlink href=\"definition/index.html#Objektdefinitionen\">Objektdefinition</emlink>. Eine Property einer Objektdefinition wird mit dem <code>local</code>-Schlüsselwort im <emlink href=\"definition/script.html#Objektscripte\">Definitionsscript</emlink> definiert."
|
||||||
|
|
||||||
|
#: sdk/definition/properties.xml:22(caption)
|
||||||
|
msgid "Object Properties"
|
||||||
|
msgstr "Objekteigenschaften"
|
||||||
|
|
||||||
#: sdk/definition/properties.xml:30(col)
|
#: sdk/definition/properties.xml:30(col)
|
||||||
#: sdk/definition/properties.xml:50(col)
|
#: sdk/definition/properties.xml:50(col)
|
||||||
#: sdk/definition/properties.xml:90(col)
|
#: sdk/definition/properties.xml:90(col)
|
||||||
|
@ -15398,11 +15401,11 @@ msgstr "[int, int]"
|
||||||
|
|
||||||
#: sdk/definition/properties.xml:121(col)
|
#: sdk/definition/properties.xml:121(col)
|
||||||
msgid "The Objects's major Z-Position. See <placeholder-1/>."
|
msgid "The Objects's major Z-Position. See <placeholder-1/>."
|
||||||
msgstr ""
|
msgstr "Die hauptsächliche Z-Position des Objekts. Siehe auch <placeholder-1/>."
|
||||||
|
|
||||||
#: sdk/definition/properties.xml:126(col)
|
#: sdk/definition/properties.xml:126(col)
|
||||||
msgid "The Object's minor Z-Position. Negative values are behind the landscape, positive values before it."
|
msgid "The Object's minor Z-Position. Negative values are behind the landscape, positive values before it."
|
||||||
msgstr ""
|
msgstr "Die sekundäre Z-Position des Objekts. Negative Werte sind hinter der Landschaft, positive vor ihr."
|
||||||
|
|
||||||
#: sdk/definition/procedures.xml:8(text)
|
#: sdk/definition/procedures.xml:8(text)
|
||||||
msgid "For object activity the engine offers various standard procedures which perform typical physcial behaviour. In procedure WALK, for instance, the activity automatically changes to \"Jump\" if the ground under the feet is lost."
|
msgid "For object activity the engine offers various standard procedures which perform typical physcial behaviour. In procedure WALK, for instance, the activity automatically changes to \"Jump\" if the ground under the feet is lost."
|
||||||
|
@ -16989,6 +16992,9 @@ msgstr "c4group.exe (Windows) c4group (Linux) c4group (Mac)"
|
||||||
msgid "This command line program is used for processing group files. A list of command line options is available by starting the program without parameters via command line (<i>not</i> by double clicking)."
|
msgid "This command line program is used for processing group files. A list of command line options is available by starting the program without parameters via command line (<i>not</i> by double clicking)."
|
||||||
msgstr "Dieses Kommandozeilen-Programm dient zum Bearbeiten von Gruppendateien. Es kann nicht per Doppelklick, sondern nur per Kommandozeile (Eingabeaufforderung) gestartet werden. Auskunft über alle verfügbaren Kommandozeilenparameter erhält man, indem man das Programm ohne weitere Parameter über die Kommandozeile startet."
|
msgstr "Dieses Kommandozeilen-Programm dient zum Bearbeiten von Gruppendateien. Es kann nicht per Doppelklick, sondern nur per Kommandozeile (Eingabeaufforderung) gestartet werden. Auskunft über alle verfügbaren Kommandozeilenparameter erhält man, indem man das Programm ohne weitere Parameter über die Kommandozeile startet."
|
||||||
|
|
||||||
|
#~ msgid "Shape of surface: 0 smooth, 1 smooth on top, 2 semi rough, 3 rough."
|
||||||
|
#~ msgstr "Landschaftsform: 0 glatt, 1 oben glatt, 2 halbrauh, 3 komplett rauh."
|
||||||
|
|
||||||
#~ msgid "The object will only be visible for it's owner and the spectators."
|
#~ msgid "The object will only be visible for it's owner and the spectators."
|
||||||
#~ msgstr "Das Objekt wird nur für seinen Besitzer und Zuschauer sichtbar."
|
#~ msgstr "Das Objekt wird nur für seinen Besitzer und Zuschauer sichtbar."
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<row>
|
<row>
|
||||||
<col>Shape</col>
|
<col>Shape</col>
|
||||||
<col>Integer</col>
|
<col>Integer</col>
|
||||||
<col>Shape of surface: 0 smooth, 1 smooth on top, 2 semi rough, 3 rough.</col>
|
<col>Shape of surface: Flat (0), Octagon, FlatTop (1), Smoother, Smooth (2) or Rough (3).</col>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<col>Density</col>
|
<col>Density</col>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Ice
|
Name=Ice
|
||||||
Shape=1
|
Shape=TopFlat
|
||||||
Density=50
|
Density=50
|
||||||
Friction=15
|
Friction=15
|
||||||
BlastFree=1
|
BlastFree=1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Snow
|
Name=Snow
|
||||||
Shape=2
|
Shape=Smooth
|
||||||
Density=50
|
Density=50
|
||||||
Friction=40
|
Friction=40
|
||||||
DigFree=1
|
DigFree=1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Ametyst
|
Name=Ametyst
|
||||||
Shape=3
|
Shape=Rough
|
||||||
Density=50
|
Density=50
|
||||||
Friction=15
|
Friction=15
|
||||||
BlastFree=1
|
BlastFree=1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Ruby
|
Name=Ruby
|
||||||
Shape=3
|
Shape=Rough
|
||||||
Density=50
|
Density=50
|
||||||
Friction=15
|
Friction=15
|
||||||
BlastFree=1
|
BlastFree=1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Brick
|
Name=Brick
|
||||||
Shape=0
|
Shape=Flat
|
||||||
Density=50
|
Density=50
|
||||||
Friction=15
|
Friction=15
|
||||||
Placement=80
|
Placement=80
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=BrickSoft
|
Name=BrickSoft
|
||||||
Shape=0
|
Shape=Flat
|
||||||
Density=50
|
Density=50
|
||||||
Placement=60
|
Placement=60
|
||||||
TextureOverlay=brick1
|
TextureOverlay=brick1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Coal
|
Name=Coal
|
||||||
Shape=3
|
Shape=Rough
|
||||||
Density=50
|
Density=50
|
||||||
Friction=75
|
Friction=75
|
||||||
DigFree=1
|
DigFree=1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Earth
|
Name=Earth
|
||||||
Shape=2
|
Shape=Smooth
|
||||||
Density=50
|
Density=50
|
||||||
Friction=80
|
Friction=80
|
||||||
DigFree=1
|
DigFree=1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Gold
|
Name=Gold
|
||||||
Shape=3
|
Shape=Rough
|
||||||
Density=50
|
Density=50
|
||||||
Friction=100
|
Friction=100
|
||||||
BlastFree=1
|
BlastFree=1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Granite
|
Name=Granite
|
||||||
Shape=3
|
Shape=Rough
|
||||||
Density=50
|
Density=50
|
||||||
Friction=100
|
Friction=100
|
||||||
MaxAirSpeed=100
|
MaxAirSpeed=100
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Ice
|
Name=Ice
|
||||||
Shape=1
|
Shape=TopFlat
|
||||||
Density=50
|
Density=50
|
||||||
Friction=15
|
Friction=15
|
||||||
DigFree=1
|
DigFree=1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Ore
|
Name=Ore
|
||||||
Shape=3
|
Shape=Rough
|
||||||
Density=50
|
Density=50
|
||||||
Friction=100
|
Friction=100
|
||||||
BlastFree=1
|
BlastFree=1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Rock
|
Name=Rock
|
||||||
Shape=3
|
Shape=Rough
|
||||||
Density=50
|
Density=50
|
||||||
Friction=100
|
Friction=100
|
||||||
BlastFree=1
|
BlastFree=1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Sand
|
Name=Sand
|
||||||
Shape=2
|
Shape=Smooth
|
||||||
Density=50
|
Density=50
|
||||||
Friction=80
|
Friction=80
|
||||||
DigFree=1
|
DigFree=1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=SandDry
|
Name=SandDry
|
||||||
Shape=2
|
Shape=Smooth
|
||||||
Density=50
|
Density=50
|
||||||
Friction=30
|
Friction=30
|
||||||
DigFree=1
|
DigFree=1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Snow
|
Name=Snow
|
||||||
Shape=2
|
Shape=Smooth
|
||||||
Density=50
|
Density=50
|
||||||
Friction=40
|
Friction=40
|
||||||
DigFree=1
|
DigFree=1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Sulphur
|
Name=Sulphur
|
||||||
Shape=3
|
Shape=Rough
|
||||||
Density=50
|
Density=50
|
||||||
Friction=75
|
Friction=75
|
||||||
DigFree=1
|
DigFree=1
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[Material]
|
[Material]
|
||||||
Name=Tunnel
|
Name=Tunnel
|
||||||
Shape=2
|
Shape=Smooth
|
||||||
Placement=5
|
Placement=5
|
||||||
TextureOverlay=tunnel
|
TextureOverlay=tunnel
|
||||||
|
|
|
@ -1586,56 +1586,64 @@ uint32_t C4Landscape::ChunkyRandom(uint32_t & iOffset, uint32_t iRange)
|
||||||
return (iOffset ^ MapSeed) % iRange;
|
return (iOffset ^ MapSeed) % iRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
void C4Landscape::DrawChunk(int32_t tx, int32_t ty, int32_t wdt, int32_t hgt, int32_t mcol, int32_t iChunkType, uint32_t cro)
|
void C4Landscape::DrawChunk(int32_t tx, int32_t ty, int32_t wdt, int32_t hgt, int32_t mcol, C4MaterialCoreShape Shape, uint32_t cro)
|
||||||
{
|
{
|
||||||
BYTE top_rough = 0; BYTE side_rough = 0;
|
unsigned int top_rough = 0, side_rough = 0, bottom_rough = 0;
|
||||||
// what to do?
|
// what to do?
|
||||||
switch (iChunkType)
|
switch (Shape)
|
||||||
{
|
{
|
||||||
case C4M_Flat:
|
case C4M_Flat: case C4M_Octagon:
|
||||||
Surface8->Box(tx, ty, tx + wdt, ty + hgt, mcol);
|
Surface8->Box(tx, ty, tx + wdt, ty + hgt, mcol);
|
||||||
return;
|
return;
|
||||||
case C4M_TopFlat:
|
case C4M_TopFlat:
|
||||||
top_rough = 0; side_rough = 1;
|
top_rough = 0; side_rough = 2; bottom_rough = 4;
|
||||||
break;
|
break;
|
||||||
case C4M_Smooth:
|
case C4M_Smooth:
|
||||||
top_rough = 1; side_rough = 1;
|
top_rough = 2; side_rough = 2; bottom_rough = 2;
|
||||||
break;
|
break;
|
||||||
case C4M_Rough:
|
case C4M_Rough:
|
||||||
top_rough = 1; side_rough = 2;
|
top_rough = 4; side_rough = 4; bottom_rough = 4;
|
||||||
|
break;
|
||||||
|
case C4M_Smoother:
|
||||||
|
top_rough = 1; side_rough = 1; bottom_rough = 1;
|
||||||
break;
|
break;
|
||||||
case C4M_None: // no drawing
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
int vtcs[16];
|
int vtcs[16];
|
||||||
uint32_t rx = Max(wdt / 2, 1);
|
unsigned int rx = Max(wdt / 2, 1);
|
||||||
|
|
||||||
vtcs[0] = tx - ChunkyRandom(cro, rx / 2); vtcs[1] = ty - ChunkyRandom(cro, rx / 2 * top_rough);
|
vtcs[0] = tx - ChunkyRandom(cro, rx * side_rough / 4); vtcs[1] = ty - ChunkyRandom(cro, rx * top_rough / 4);
|
||||||
vtcs[2] = tx - ChunkyRandom(cro, rx * side_rough); vtcs[3] = ty + hgt / 2;
|
vtcs[2] = tx - ChunkyRandom(cro, rx * side_rough / 2); vtcs[3] = ty + hgt / 2;
|
||||||
vtcs[4] = tx - ChunkyRandom(cro, rx); vtcs[5] = ty + hgt + ChunkyRandom(cro, rx);
|
vtcs[4] = tx - ChunkyRandom(cro, rx * side_rough / 4); vtcs[5] = ty + hgt + ChunkyRandom(cro, rx * bottom_rough / 4);
|
||||||
vtcs[6] = tx + wdt / 2; vtcs[7] = ty + hgt + ChunkyRandom(cro, 2 * rx);
|
vtcs[6] = tx + wdt / 2; vtcs[7] = ty + hgt + ChunkyRandom(cro, rx * bottom_rough / 2);
|
||||||
vtcs[8] = tx + wdt + ChunkyRandom(cro, rx); vtcs[9] = ty + hgt + ChunkyRandom(cro, rx);
|
vtcs[8] = tx + wdt + ChunkyRandom(cro, rx * side_rough / 4); vtcs[9] = ty + hgt + ChunkyRandom(cro, rx * bottom_rough / 4);
|
||||||
vtcs[10] = tx + wdt + ChunkyRandom(cro, rx * side_rough); vtcs[11] = ty + hgt / 2;
|
vtcs[10] = tx + wdt + ChunkyRandom(cro, rx * side_rough / 2); vtcs[11] = ty + hgt / 2;
|
||||||
vtcs[12] = tx + wdt + ChunkyRandom(cro, rx / 2); vtcs[13] = ty - ChunkyRandom(cro, rx / 2 * top_rough);
|
vtcs[12] = tx + wdt + ChunkyRandom(cro, rx * side_rough / 4); vtcs[13] = ty - ChunkyRandom(cro, rx * top_rough / 4);
|
||||||
vtcs[14] = tx + wdt / 2; vtcs[15] = ty - ChunkyRandom(cro, rx * top_rough);
|
vtcs[14] = tx + wdt / 2; vtcs[15] = ty - ChunkyRandom(cro, rx * top_rough / 2);
|
||||||
|
|
||||||
ForPolygon(vtcs, 8, NULL, NULL, mcol);
|
ForPolygon(vtcs, 8, NULL, NULL, mcol);
|
||||||
}
|
}
|
||||||
|
|
||||||
void C4Landscape::DrawSmoothOChunk(int32_t tx, int32_t ty, int32_t wdt, int32_t hgt, int32_t mcol, BYTE flip, uint32_t cro)
|
void C4Landscape::DrawSmoothOChunk(int32_t tx, int32_t ty, int32_t wdt, int32_t hgt, int32_t mcol, int flip, uint32_t cro)
|
||||||
{
|
{
|
||||||
int vtcs[8];
|
int vtcs[8];
|
||||||
uint32_t rx = Max(wdt / 2, 1);
|
unsigned int rx = Max(wdt / 2, 1);
|
||||||
|
|
||||||
vtcs[0] = tx; vtcs[1] = ty - ChunkyRandom(cro, rx / 2);
|
vtcs[0] = tx; vtcs[1] = ty;
|
||||||
vtcs[2] = tx; vtcs[3] = ty + hgt;
|
vtcs[2] = tx; vtcs[3] = ty + hgt;
|
||||||
vtcs[4] = tx + wdt; vtcs[5] = ty + hgt;
|
vtcs[4] = tx + wdt; vtcs[5] = ty + hgt;
|
||||||
vtcs[6] = tx + wdt; vtcs[7] = ty - ChunkyRandom(cro, rx / 2);
|
vtcs[6] = tx + wdt; vtcs[7] = ty;
|
||||||
|
|
||||||
if (flip)
|
switch (flip)
|
||||||
{ vtcs[0] = tx + wdt / 2; vtcs[1] = ty + hgt / 3; }
|
{
|
||||||
else
|
case 0: vtcs[0] = tx + wdt / 2; vtcs[1] += hgt / 3; vtcs[7] -= ChunkyRandom(cro, rx / 2); break;
|
||||||
{ vtcs[6] = tx + wdt / 2; vtcs[7] = ty + hgt / 3; }
|
case 1: vtcs[2] = tx + wdt / 2; vtcs[3] -= hgt / 3; vtcs[5] += ChunkyRandom(cro, rx / 2); break;
|
||||||
|
case 2: vtcs[4] = tx + wdt / 2; vtcs[5] -= hgt / 3; vtcs[3] += ChunkyRandom(cro, rx / 2); break;
|
||||||
|
case 3: vtcs[6] = tx + wdt / 2; vtcs[7] += hgt / 3; vtcs[1] -= ChunkyRandom(cro, rx / 2); break;
|
||||||
|
case 4: vtcs[0] = tx + wdt / 2; vtcs[1] += hgt / 2; break;
|
||||||
|
case 5: vtcs[2] = tx + wdt / 2; vtcs[3] -= hgt / 2; break;
|
||||||
|
case 6: vtcs[4] = tx + wdt / 2; vtcs[5] -= hgt / 2; break;
|
||||||
|
case 7: vtcs[6] = tx + wdt / 2; vtcs[7] += hgt / 2; break;
|
||||||
|
}
|
||||||
|
|
||||||
ForPolygon(vtcs, 4, NULL, NULL, mcol);
|
ForPolygon(vtcs, 4, NULL, NULL, mcol);
|
||||||
}
|
}
|
||||||
|
@ -1700,67 +1708,93 @@ void C4Landscape::DrawCustomShape(CSurface8 * sfcMap, C4MaterialShape *shape, in
|
||||||
|
|
||||||
void C4Landscape::ChunkOZoom(CSurface8 * sfcMap, int32_t iMapX, int32_t iMapY, int32_t iMapWdt, int32_t iMapHgt, int32_t iTexture, int32_t iOffX, int32_t iOffY)
|
void C4Landscape::ChunkOZoom(CSurface8 * sfcMap, int32_t iMapX, int32_t iMapY, int32_t iMapWdt, int32_t iMapHgt, int32_t iTexture, int32_t iOffX, int32_t iOffY)
|
||||||
{
|
{
|
||||||
int32_t iX,iY,iChunkWidth,iChunkHeight,iToX,iToY;
|
|
||||||
int32_t iIFT;
|
|
||||||
BYTE byMapPixel, byMapPixelBelow;
|
|
||||||
int iMapWidth,iMapHeight;
|
|
||||||
C4Material *pMaterial = ::TextureMap.GetEntry(iTexture)->GetMaterial();
|
C4Material *pMaterial = ::TextureMap.GetEntry(iTexture)->GetMaterial();
|
||||||
if (!pMaterial) return;
|
if (!pMaterial) return;
|
||||||
int32_t iChunkType=pMaterial->MapChunkType;
|
C4MaterialCoreShape iChunkType = pMaterial->MapChunkType;
|
||||||
BYTE byColor=MatTex2PixCol(iTexture);
|
BYTE byColor = MatTex2PixCol(iTexture);
|
||||||
// Get map & landscape size
|
// Get map & landscape size
|
||||||
sfcMap->GetSurfaceSize(iMapWidth,iMapHeight);
|
int iMapWidth, iMapHeight;
|
||||||
|
sfcMap->GetSurfaceSize(iMapWidth, iMapHeight);
|
||||||
// Clip desired map segment to map size
|
// Clip desired map segment to map size
|
||||||
iMapX=BoundBy<int32_t>(iMapX,0,iMapWidth-1); iMapY=BoundBy<int32_t>(iMapY,0,iMapHeight-1);
|
iMapX = BoundBy<int32_t>(iMapX, 0, iMapWidth - 1);
|
||||||
iMapWdt=BoundBy<int32_t>(iMapWdt,0,iMapWidth-iMapX); iMapHgt=BoundBy<int32_t>(iMapHgt,0,iMapHeight-iMapY);
|
iMapY = BoundBy<int32_t>(iMapY, 0, iMapHeight - 1);
|
||||||
|
iMapWdt = BoundBy<int32_t>(iMapWdt, 0, iMapWidth - iMapX);
|
||||||
|
iMapHgt = BoundBy<int32_t>(iMapHgt, 0, iMapHeight - iMapY);
|
||||||
// get chunk size
|
// get chunk size
|
||||||
iChunkWidth=MapZoom; iChunkHeight=MapZoom;
|
int iChunkWidth = MapZoom, iChunkHeight = MapZoom;
|
||||||
// Scan map lines
|
// Scan map lines
|
||||||
if (pMaterial->MapChunkType != C4M_None)
|
for (int iY = iMapY; iY < iMapY + iMapHgt; iY++)
|
||||||
{
|
{
|
||||||
for (iY=iMapY; iY<iMapY+iMapHgt; iY++)
|
// Landscape target coordinate vertical
|
||||||
|
int iToY = iY * iChunkHeight + iOffY;
|
||||||
|
// Scan map line
|
||||||
|
for (int iX = iMapX; iX < iMapX + iMapWdt; iX++)
|
||||||
{
|
{
|
||||||
// Landscape target coordinate vertical
|
int32_t iIFT;
|
||||||
iToY=iY*iChunkHeight+iOffY;
|
// Map scan line start
|
||||||
// Scan map line
|
uint8_t MapPixel=sfcMap->_GetPix(iX, iY);
|
||||||
for (iX=iMapX; iX<iMapX+iMapWdt; iX++)
|
// Landscape target coordinate horizontal
|
||||||
|
int iToX = iX * iChunkWidth + iOffX;
|
||||||
|
// Here's a chunk of the texture-material to zoom
|
||||||
|
if ((MapPixel & 127) == iTexture)
|
||||||
|
{
|
||||||
|
// Determine IFT
|
||||||
|
iIFT = 0; if (MapPixel >= 128) iIFT = IFT;
|
||||||
|
// Draw chunk
|
||||||
|
DrawChunk(iToX, iToY, iChunkWidth, iChunkHeight, byColor + iIFT, iChunkType, (iX<<16)+iY);
|
||||||
|
}
|
||||||
|
// Other chunk, check for slope smoothers
|
||||||
|
else if (iChunkType == C4M_Smooth || iChunkType == C4M_Smoother || iChunkType == C4M_Octagon)
|
||||||
{
|
{
|
||||||
// Map scan line start
|
|
||||||
byMapPixel=sfcMap->_GetPix(iX, iY);
|
|
||||||
// Map scan line pixel below
|
// Map scan line pixel below
|
||||||
byMapPixelBelow = sfcMap->GetPix(iX, iY + 1);
|
uint8_t below = sfcMap->GetPix(iX, iY + 1) & 127;
|
||||||
// Landscape target coordinate horizontal
|
uint8_t above = sfcMap->GetPix(iX, iY - 1) & 127;
|
||||||
iToX=iX*iChunkWidth+iOffX;
|
uint8_t left = sfcMap->GetPix(iX - 1, iY) & 127;
|
||||||
// Here's a chunk of the texture-material to zoom
|
uint8_t right = sfcMap->GetPix(iX + 1, iY) & 127;
|
||||||
if ((byMapPixel & 127) == iTexture)
|
// do not fill a tiny hole
|
||||||
|
if (below == iTexture && above == iTexture && left == iTexture && right == iTexture)
|
||||||
|
continue;
|
||||||
|
int flat = iChunkType == C4M_Octagon ? 4 : 0;
|
||||||
|
// Smooth chunk & same texture-material below
|
||||||
|
if (iY < iMapHeight - 1 && below == iTexture)
|
||||||
{
|
{
|
||||||
// Determine IFT
|
// Same texture-material on left
|
||||||
iIFT=0; if (byMapPixel>=128) iIFT=IFT;
|
if (iX > 0 && left == iTexture)
|
||||||
// Draw chunk
|
|
||||||
DrawChunk(iToX,iToY,iChunkWidth,iChunkHeight,byColor+iIFT,pMaterial->MapChunkType,(iX<<16)+iY);
|
|
||||||
}
|
|
||||||
// Other chunk, check for slope smoothers
|
|
||||||
else
|
|
||||||
// Smooth chunk & same texture-material below
|
|
||||||
if ((iChunkType==C4M_Smooth) && (iY<iMapHeight-1) && ((byMapPixelBelow & 127)==iTexture))
|
|
||||||
{
|
{
|
||||||
// Same texture-material on left
|
// Determine IFT
|
||||||
if ((iX>0) && ((sfcMap->GetPix(iX-1, iY) & 127)==iTexture))
|
iIFT = 0; if (sfcMap->GetPix(iX-1, iY) >= 128) iIFT = IFT;
|
||||||
{
|
// Draw smoother
|
||||||
// Determine IFT
|
DrawSmoothOChunk(iToX, iToY, iChunkWidth, iChunkHeight, byColor + iIFT, 3 + flat, (iX<<16) + iY);
|
||||||
iIFT=0; if (sfcMap->GetPix(iX-1, iY) >= 128) iIFT=IFT;
|
|
||||||
// Draw smoother
|
|
||||||
DrawSmoothOChunk(iToX,iToY,iChunkWidth,iChunkHeight,byColor+iIFT,0,(iX<<16)+iY);
|
|
||||||
}
|
|
||||||
// Same texture-material on right
|
|
||||||
if ((iX<iMapWidth-1) && ((sfcMap->GetPix(iX+1, iY) & 127)==iTexture))
|
|
||||||
{
|
|
||||||
// Determine IFT
|
|
||||||
iIFT=0; if (sfcMap->GetPix(iX+1, iY) >= 128) iIFT=IFT;
|
|
||||||
// Draw smoother
|
|
||||||
DrawSmoothOChunk(iToX,iToY,iChunkWidth,iChunkHeight,byColor+iIFT,1,(iX<<16)+iY);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// Same texture-material on right
|
||||||
|
if (iX < iMapWidth - 1 && right == iTexture)
|
||||||
|
{
|
||||||
|
// Determine IFT
|
||||||
|
iIFT = 0; if (sfcMap->GetPix(iX+1, iY) >= 128) iIFT = IFT;
|
||||||
|
// Draw smoother
|
||||||
|
DrawSmoothOChunk(iToX, iToY, iChunkWidth, iChunkHeight, byColor + iIFT, 0 + flat, (iX<<16)+iY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Smooth chunk & same texture-material above
|
||||||
|
if (iY > 0 && above == iTexture)
|
||||||
|
{
|
||||||
|
// Same texture-material on left
|
||||||
|
if (iX > 0 && left == iTexture)
|
||||||
|
{
|
||||||
|
// Determine IFT
|
||||||
|
iIFT = 0; if (sfcMap->GetPix(iX - 1, iY) >= 128) iIFT = IFT;
|
||||||
|
// Draw smoother
|
||||||
|
DrawSmoothOChunk(iToX, iToY, iChunkWidth, iChunkHeight, byColor + iIFT, 2 + flat, (iX<<16)+iY);
|
||||||
|
}
|
||||||
|
// Same texture-material on right
|
||||||
|
if (iX < iMapWidth - 1 && right == iTexture)
|
||||||
|
{
|
||||||
|
// Determine IFT
|
||||||
|
iIFT = 0; if (sfcMap->GetPix(iX + 1, iY) >= 128) iIFT = IFT;
|
||||||
|
// Draw smoother
|
||||||
|
DrawSmoothOChunk(iToX, iToY, iChunkWidth, iChunkHeight, byColor + iIFT, 1 + flat, (iX<<16)+iY);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,8 +210,8 @@ protected:
|
||||||
void ExecuteScan();
|
void ExecuteScan();
|
||||||
int32_t DoScan(int32_t x, int32_t y, int32_t mat, int32_t dir);
|
int32_t DoScan(int32_t x, int32_t y, int32_t mat, int32_t dir);
|
||||||
uint32_t ChunkyRandom(uint32_t &iOffset, uint32_t iRange); // return static random value, according to offset and MapSeed
|
uint32_t ChunkyRandom(uint32_t &iOffset, uint32_t iRange); // return static random value, according to offset and MapSeed
|
||||||
void DrawChunk(int32_t tx, int32_t ty, int32_t wdt, int32_t hgt, int32_t mcol, int32_t iChunkType, uint32_t cro);
|
void DrawChunk(int32_t tx, int32_t ty, int32_t wdt, int32_t hgt, int32_t mcol, C4MaterialCoreShape Shape, uint32_t cro);
|
||||||
void DrawSmoothOChunk(int32_t tx, int32_t ty, int32_t wdt, int32_t hgt, int32_t mcol, BYTE flip, uint32_t cro);
|
void DrawSmoothOChunk(int32_t tx, int32_t ty, int32_t wdt, int32_t hgt, int32_t mcol, int flip, uint32_t cro);
|
||||||
void DrawCustomShapePoly(const C4MaterialShape::Poly &poly, int32_t off_x, int32_t off_y, int32_t mcol);
|
void DrawCustomShapePoly(const C4MaterialShape::Poly &poly, int32_t off_x, int32_t off_y, int32_t mcol);
|
||||||
void DrawCustomShape(CSurface8 * sfcMap, C4MaterialShape *shape, int32_t iMapX, int32_t iMapY, int32_t iMapWdt, int32_t iMapHgt, int32_t iTexture, int32_t mcol, int32_t iOffX, int32_t iOffY);
|
void DrawCustomShape(CSurface8 * sfcMap, C4MaterialShape *shape, int32_t iMapX, int32_t iMapY, int32_t iMapWdt, int32_t iMapHgt, int32_t iTexture, int32_t mcol, int32_t iOffX, int32_t iOffY);
|
||||||
void ChunkOZoom(CSurface8 * sfcMap, int32_t iMapX, int32_t iMapY, int32_t iMapWdt, int32_t iMapHgt, int32_t iTexture,int32_t iOffX=0,int32_t iOffY=0);
|
void ChunkOZoom(CSurface8 * sfcMap, int32_t iMapX, int32_t iMapY, int32_t iMapWdt, int32_t iMapHgt, int32_t iTexture,int32_t iOffX=0,int32_t iOffY=0);
|
||||||
|
|
|
@ -232,7 +232,7 @@ void C4MaterialCore::Clear()
|
||||||
sBelowTempConvertTo.Clear();
|
sBelowTempConvertTo.Clear();
|
||||||
sAboveTempConvertTo.Clear();
|
sAboveTempConvertTo.Clear();
|
||||||
*Name='\0';
|
*Name='\0';
|
||||||
MapChunkType = 0;
|
MapChunkType = C4M_Flat;
|
||||||
ShapeTexture.Clear();
|
ShapeTexture.Clear();
|
||||||
Density = 0;
|
Density = 0;
|
||||||
Friction = 0;
|
Friction = 0;
|
||||||
|
@ -303,54 +303,73 @@ void C4MaterialCore::CompileFunc(StdCompiler *pComp)
|
||||||
{
|
{
|
||||||
if (pComp->isCompiler()) Clear();
|
if (pComp->isCompiler()) Clear();
|
||||||
pComp->Name("Material");
|
pComp->Name("Material");
|
||||||
pComp->Value(mkNamingAdapt(toC4CStr(Name), "Name", "" ));
|
pComp->Value(mkNamingAdapt(toC4CStr(Name), "Name", ""));
|
||||||
pComp->Value(mkNamingAdapt(ColorAnimation, "ColorAnimation", 0 ));
|
pComp->Value(mkNamingAdapt(ColorAnimation, "ColorAnimation", 0));
|
||||||
pComp->Value(mkNamingAdapt(MapChunkType, "Shape", 0 ));
|
|
||||||
pComp->Value(mkNamingAdapt(mkParAdapt(ShapeTexture, StdCompiler::RCT_All),"ShapeTexture", "" ));
|
const StdEnumEntry<C4MaterialCoreShape> Shapes[] =
|
||||||
pComp->Value(mkNamingAdapt(Density, "Density", 0 ));
|
{
|
||||||
pComp->Value(mkNamingAdapt(Friction, "Friction", 0 ));
|
{ "Flat", C4M_Flat },
|
||||||
pComp->Value(mkNamingAdapt(DigFree, "DigFree", 0 ));
|
{ "TopFlat", C4M_TopFlat },
|
||||||
pComp->Value(mkNamingAdapt(BlastFree, "BlastFree", 0 ));
|
{ "Smooth", C4M_Smooth },
|
||||||
pComp->Value(mkNamingAdapt(Blast2Object,"Blast2Object", C4ID::None ));
|
{ "Rough", C4M_Rough },
|
||||||
pComp->Value(mkNamingAdapt(Dig2Object, "Dig2Object", C4ID::None ));
|
{ "Octagon", C4M_Octagon },
|
||||||
pComp->Value(mkNamingAdapt(Dig2ObjectRatio, "Dig2ObjectRatio", 0 ));
|
{ "Smoother", C4M_Smoother },
|
||||||
pComp->Value(mkNamingAdapt(Dig2ObjectCollect, "Dig2ObjectCollect", 0 ));
|
{ NULL, C4M_Flat }
|
||||||
pComp->Value(mkNamingAdapt(Blast2ObjectRatio, "Blast2ObjectRatio", 0 ));
|
};
|
||||||
pComp->Value(mkNamingAdapt(Blast2PXSRatio, "Blast2PXSRatio", 0 ));
|
pComp->Value(mkNamingAdapt(mkEnumAdaptT<uint8_t>(MapChunkType, Shapes),
|
||||||
pComp->Value(mkNamingAdapt(Instable, "Instable", 0 ));
|
"Shape", C4M_Flat));
|
||||||
pComp->Value(mkNamingAdapt(MaxAirSpeed, "MaxAirSpeed", 0 ));
|
pComp->Value(mkNamingAdapt(mkParAdapt(ShapeTexture, StdCompiler::RCT_All),
|
||||||
pComp->Value(mkNamingAdapt(MaxSlide, "MaxSlide", 0 ));
|
"ShapeTexture", ""));
|
||||||
pComp->Value(mkNamingAdapt(WindDrift, "WindDrift", 0 ));
|
pComp->Value(mkNamingAdapt(Density, "Density", 0));
|
||||||
pComp->Value(mkNamingAdapt(Inflammable, "Inflammable", 0 ));
|
pComp->Value(mkNamingAdapt(Friction, "Friction", 0));
|
||||||
pComp->Value(mkNamingAdapt(Incindiary, "Incindiary", 0 ));
|
pComp->Value(mkNamingAdapt(DigFree, "DigFree", 0));
|
||||||
pComp->Value(mkNamingAdapt(Corrode, "Corrode", 0 ));
|
pComp->Value(mkNamingAdapt(BlastFree, "BlastFree", 0));
|
||||||
pComp->Value(mkNamingAdapt(Corrosive, "Corrosive", 0 ));
|
pComp->Value(mkNamingAdapt(Blast2Object, "Blast2Object", C4ID::None));
|
||||||
pComp->Value(mkNamingAdapt(Extinguisher, "Extinguisher", 0 ));
|
pComp->Value(mkNamingAdapt(Dig2Object, "Dig2Object", C4ID::None));
|
||||||
pComp->Value(mkNamingAdapt(Soil, "Soil", 0 ));
|
pComp->Value(mkNamingAdapt(Dig2ObjectRatio, "Dig2ObjectRatio", 0));
|
||||||
pComp->Value(mkNamingAdapt(Placement, "Placement", 0 ));
|
pComp->Value(mkNamingAdapt(Dig2ObjectCollect, "Dig2ObjectCollect", 0));
|
||||||
pComp->Value(mkNamingAdapt(mkParAdapt(sTextureOverlay, StdCompiler::RCT_IdtfAllowEmpty),"TextureOverlay", "" ));
|
pComp->Value(mkNamingAdapt(Blast2ObjectRatio, "Blast2ObjectRatio", 0));
|
||||||
pComp->Value(mkNamingAdapt(OverlayType, "OverlayType", 0 ));
|
pComp->Value(mkNamingAdapt(Blast2PXSRatio, "Blast2PXSRatio", 0));
|
||||||
pComp->Value(mkNamingAdapt(mkParAdapt(sPXSGfx, StdCompiler::RCT_IdtfAllowEmpty), "PXSGfx", "" ));
|
pComp->Value(mkNamingAdapt(Instable, "Instable", 0));
|
||||||
pComp->Value(mkNamingAdapt(PXSGfxRt, "PXSGfxRt", TargetRect0 ));
|
pComp->Value(mkNamingAdapt(MaxAirSpeed, "MaxAirSpeed", 0));
|
||||||
pComp->Value(mkNamingAdapt(PXSGfxSize, "PXSGfxSize", PXSGfxRt.Wdt ));
|
pComp->Value(mkNamingAdapt(MaxSlide, "MaxSlide", 0));
|
||||||
pComp->Value(mkNamingAdapt(TempConvStrength, "TempConvStrength", 0 ));
|
pComp->Value(mkNamingAdapt(WindDrift, "WindDrift", 0));
|
||||||
pComp->Value(mkNamingAdapt(mkParAdapt(sBlastShiftTo, StdCompiler::RCT_IdtfAllowEmpty),"BlastShiftTo", "" ));
|
pComp->Value(mkNamingAdapt(Inflammable, "Inflammable", 0));
|
||||||
pComp->Value(mkNamingAdapt(mkParAdapt(sInMatConvert, StdCompiler::RCT_IdtfAllowEmpty),"InMatConvert", "" ));
|
pComp->Value(mkNamingAdapt(Incindiary, "Incindiary", 0));
|
||||||
pComp->Value(mkNamingAdapt(mkParAdapt(sInMatConvertTo, StdCompiler::RCT_IdtfAllowEmpty),"InMatConvertTo", "" ));
|
pComp->Value(mkNamingAdapt(Corrode, "Corrode", 0));
|
||||||
pComp->Value(mkNamingAdapt(InMatConvertDepth, "InMatConvertDepth", 0 ));
|
pComp->Value(mkNamingAdapt(Corrosive, "Corrosive", 0));
|
||||||
pComp->Value(mkNamingAdapt(AboveTempConvert, "AboveTempConvert", 0 ));
|
pComp->Value(mkNamingAdapt(Extinguisher, "Extinguisher", 0));
|
||||||
pComp->Value(mkNamingAdapt(AboveTempConvertDir, "AboveTempConvertDir",0 ));
|
pComp->Value(mkNamingAdapt(Soil, "Soil", 0));
|
||||||
pComp->Value(mkNamingAdapt(mkParAdapt(sAboveTempConvertTo, StdCompiler::RCT_IdtfAllowEmpty),"AboveTempConvertTo", "" ));
|
pComp->Value(mkNamingAdapt(Placement, "Placement", 0));
|
||||||
pComp->Value(mkNamingAdapt(BelowTempConvert, "BelowTempConvert", 0 ));
|
pComp->Value(mkNamingAdapt(mkParAdapt(sTextureOverlay, StdCompiler::RCT_IdtfAllowEmpty),
|
||||||
pComp->Value(mkNamingAdapt(BelowTempConvertDir, "BelowTempConvertDir",0 ));
|
"TextureOverlay", ""));
|
||||||
pComp->Value(mkNamingAdapt(mkParAdapt(sBelowTempConvertTo, StdCompiler::RCT_IdtfAllowEmpty),"BelowTempConvertTo", "" ));
|
pComp->Value(mkNamingAdapt(OverlayType, "OverlayType", 0));
|
||||||
pComp->Value(mkNamingAdapt(MinHeightCount, "MinHeightCount", 0 ));
|
pComp->Value(mkNamingAdapt(mkParAdapt(sPXSGfx, StdCompiler::RCT_IdtfAllowEmpty),
|
||||||
pComp->Value(mkNamingAdapt(SplashRate, "SplashRate", 10 ));
|
"PXSGfx", ""));
|
||||||
|
pComp->Value(mkNamingAdapt(PXSGfxRt, "PXSGfxRt", TargetRect0));
|
||||||
|
pComp->Value(mkNamingAdapt(PXSGfxSize, "PXSGfxSize", PXSGfxRt.Wdt));
|
||||||
|
pComp->Value(mkNamingAdapt(TempConvStrength, "TempConvStrength", 0));
|
||||||
|
pComp->Value(mkNamingAdapt(mkParAdapt(sBlastShiftTo, StdCompiler::RCT_IdtfAllowEmpty),
|
||||||
|
"BlastShiftTo", ""));
|
||||||
|
pComp->Value(mkNamingAdapt(mkParAdapt(sInMatConvert, StdCompiler::RCT_IdtfAllowEmpty),
|
||||||
|
"InMatConvert", ""));
|
||||||
|
pComp->Value(mkNamingAdapt(mkParAdapt(sInMatConvertTo, StdCompiler::RCT_IdtfAllowEmpty),
|
||||||
|
"InMatConvertTo", ""));
|
||||||
|
pComp->Value(mkNamingAdapt(InMatConvertDepth, "InMatConvertDepth", 0));
|
||||||
|
pComp->Value(mkNamingAdapt(AboveTempConvert, "AboveTempConvert", 0));
|
||||||
|
pComp->Value(mkNamingAdapt(AboveTempConvertDir, "AboveTempConvertDir", 0));
|
||||||
|
pComp->Value(mkNamingAdapt(mkParAdapt(sAboveTempConvertTo, StdCompiler::RCT_IdtfAllowEmpty),
|
||||||
|
"AboveTempConvertTo", ""));
|
||||||
|
pComp->Value(mkNamingAdapt(BelowTempConvert, "BelowTempConvert", 0));
|
||||||
|
pComp->Value(mkNamingAdapt(BelowTempConvertDir, "BelowTempConvertDir", 0));
|
||||||
|
pComp->Value(mkNamingAdapt(mkParAdapt(sBelowTempConvertTo, StdCompiler::RCT_IdtfAllowEmpty),
|
||||||
|
"BelowTempConvertTo", ""));
|
||||||
|
pComp->Value(mkNamingAdapt(MinHeightCount, "MinHeightCount", 0));
|
||||||
|
pComp->Value(mkNamingAdapt(SplashRate, "SplashRate", 10));
|
||||||
pComp->NameEnd();
|
pComp->NameEnd();
|
||||||
// material reactions
|
// material reactions
|
||||||
pComp->Value(mkNamingAdapt(
|
pComp->Value(mkNamingAdapt(mkSTLContainerAdapt(CustomReactionList),
|
||||||
mkSTLContainerAdapt(CustomReactionList),
|
"Reaction", std::vector<C4MaterialReaction>()));
|
||||||
"Reaction", std::vector<C4MaterialReaction>()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -124,17 +124,27 @@ public:
|
||||||
|
|
||||||
typedef std::map<StdCopyStrBuf, C4MaterialShape> C4MaterialShapeMap;
|
typedef std::map<StdCopyStrBuf, C4MaterialShape> C4MaterialShapeMap;
|
||||||
|
|
||||||
|
enum C4MaterialCoreShape
|
||||||
|
{
|
||||||
|
C4M_Flat = 0,
|
||||||
|
C4M_TopFlat = 1,
|
||||||
|
C4M_Smooth = 2,
|
||||||
|
C4M_Rough = 3,
|
||||||
|
C4M_Octagon = 4,
|
||||||
|
C4M_Smoother= 5,
|
||||||
|
};
|
||||||
|
|
||||||
class C4MaterialCore
|
class C4MaterialCore
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
C4MaterialCore();
|
C4MaterialCore();
|
||||||
~C4MaterialCore() { Clear(); }
|
~C4MaterialCore() { Clear(); }
|
||||||
|
|
||||||
public:
|
|
||||||
std::vector<C4MaterialReaction> CustomReactionList;
|
std::vector<C4MaterialReaction> CustomReactionList;
|
||||||
public:
|
|
||||||
char Name[C4M_MaxName+1];
|
char Name[C4M_MaxName+1];
|
||||||
int32_t MapChunkType;
|
|
||||||
|
C4MaterialCoreShape MapChunkType;
|
||||||
StdCopyStrBuf ShapeTexture;
|
StdCopyStrBuf ShapeTexture;
|
||||||
int32_t Density;
|
int32_t Density;
|
||||||
int32_t Friction;
|
int32_t Friction;
|
||||||
|
@ -176,7 +186,7 @@ public:
|
||||||
int32_t TempConvStrength;
|
int32_t TempConvStrength;
|
||||||
int32_t MinHeightCount; // minimum material thickness in order for it to be counted
|
int32_t MinHeightCount; // minimum material thickness in order for it to be counted
|
||||||
int32_t SplashRate;
|
int32_t SplashRate;
|
||||||
public:
|
|
||||||
void Clear();
|
void Clear();
|
||||||
void Default();
|
void Default();
|
||||||
bool Load(C4Group &hGroup, const char *szEntryName);
|
bool Load(C4Group &hGroup, const char *szEntryName);
|
||||||
|
@ -248,13 +258,8 @@ protected:
|
||||||
|
|
||||||
extern C4MaterialMap MaterialMap;
|
extern C4MaterialMap MaterialMap;
|
||||||
|
|
||||||
const int32_t C4M_Flat = 0,
|
// Material Density Levels
|
||||||
C4M_TopFlat = 1,
|
const int32_t C4M_Vehicle = 100,
|
||||||
C4M_Smooth = 2,
|
|
||||||
C4M_Rough = 3,
|
|
||||||
C4M_None = 4,
|
|
||||||
// Material Density Levels
|
|
||||||
C4M_Vehicle = 100,
|
|
||||||
C4M_Solid = 50,
|
C4M_Solid = 50,
|
||||||
C4M_SemiSolid = 25,
|
C4M_SemiSolid = 25,
|
||||||
C4M_Liquid = 25,
|
C4M_Liquid = 25,
|
||||||
|
|
Loading…
Reference in New Issue