Tobias Zwick
f6d64e46f8
fix querying InsertMaterial for bodies of water that stretch to the edge of the landscape
2013-06-02 17:59:13 +02:00
Martin Plicht
eaf93d6a0e
Also check for DebugRec flag in #ifdef DEBUGREC_* blocks
2013-05-25 23:01:41 +02:00
Martin Plicht
524fe879aa
Make DEBUGREC define a commandline option
2013-05-25 22:51:32 +02:00
Günther Brammer
4e875f4495
Don't store object rotation twice
...
Rotation was still stored as an integer and as a fixed point number.
Compute the integer on demand from the fixed point instead, like the
position. Rewrite the movement code where the two variables were
temporarily out of sync.
2013-05-25 14:59:58 +02:00
Sven Eberhardt
183c1527b6
Added query_only parameter to script function InsertMaterial.
2013-04-28 13:57:52 +02:00
Sven Eberhardt
09a6349060
Fix DrawMaterialQuad with DMQ_Bridge and non-default texture settings
2013-04-08 19:33:20 +02:00
Sven Eberhardt
6250ff1766
Silence a few MSVC warnings
2013-04-01 12:48:02 +02:00
Sven Eberhardt
c17080a4a2
Added no_instability_check parameter to script functions DigFree and DigFreeRect ( #932 ).
2013-03-31 15:39:29 +02:00
Sven Eberhardt
1322391f5f
Implemented C4S.Landscape.BottomOpen=2: Bottom is closed iff corresponding map pixel in bottom row has tunnel background.
2013-03-30 14:54:51 +01:00
Sven Eberhardt
1f78ee3a88
Adjusted PXS code for cases of PXS-density > C4M_Solid ( #944 ).
2013-03-30 14:05:12 +01:00
Sven Eberhardt
1e1d4eb78a
Fix potential double-free of static Map and MapLayer prop lists ( #935 )
2013-03-27 21:48:18 +01:00
Nicolas Hake
459fce0758
Replace std::auto_ptr with std::unique_ptr
...
std::auto_ptr has awkward copy semantics and is deprecated in C++11.
2013-03-26 15:43:01 +01:00
Sven Eberhardt
698be41e90
Fix build
2013-03-26 10:57:46 +01:00
Sven Eberhardt
c115fbfaa0
FnBlastFree: Added max_density parameter.
...
Also updated material densities and added attribute MaxPickDensity to pickaxe, so it's now possible to define a pickaxe that cannot go through granite.
2013-03-26 00:45:44 +01:00
Sven Eberhardt
4b6c26a48a
Added script function array MapLayer.CreateMatTexMask(any mask_spec).
...
Returns mask_spec as an array of 256 bools to be used e.g. in conjunction with the return value of GetPixel.
2013-03-24 13:23:37 +01:00
Sven Eberhardt
cc7c9488c5
FnLayerSetPixel also takes string parameter for pixel color
2013-03-22 21:31:34 +01:00
Sven Eberhardt
0edee130a7
Fix error message in C4MapScriptAlgo::GetXYProps
2013-03-20 23:09:40 +01:00
Sven Eberhardt
0b8476c029
Scripted map drawing: Fix integer overflow issues for large maps in MAPALGO_Ellipsis and MAPALGO_Polygon
2013-03-19 20:10:37 +01:00
Sven Eberhardt
57e63a5275
Added support for scripted maps (Map.c) and documentation.
2013-03-19 00:36:06 +01:00
Sven Eberhardt
8e19c52014
Do not check instability when converting material to solid. This fixes ice of frozen lakes immediately crumbling down due to our cool, new anti-single-pixel-code.
2013-03-02 22:33:55 +01:00
Sven Eberhardt
e6df566ebe
Fix theoretical crash when several objects dug free at the same time delete each other.
2013-02-21 00:22:50 +01:00
Sven Eberhardt
b02676a6e7
Auto-collect fragile objects (i.e.: Firestones) when digging.
...
See http://www.clonkspot.org/comic/1
2013-02-20 21:12:50 +01:00
Sven Eberhardt
437433776f
C4Landscape::InsertMaterial use ptr instead of ref for insertion pos
2013-02-18 00:48:25 +01:00
Sven Eberhardt
30e07f87b8
Added parameter to InsertMaterial() to return actual insertion position.
...
The insertion position might be pushed upwards if e.g. water is inserted to the bottom of a lake. However, we need the actual insertion position if we ever want to modify the pump to require/produce energy depending on the vertical distance of material pumped.
2013-02-17 18:29:44 +01:00
Sven Eberhardt
ffcd74e70d
Check and warn against invalid texture indices in map when creating landscape.
2013-02-11 21:01:19 +01:00
Sven Eberhardt
f1d05785aa
Shake free single pixels of diggable material
2013-02-10 18:28:48 +01:00
Sven Eberhardt
4b189cacd1
Added Scenario [Landscape] FlatChunkShapes. If set to true, all chunks are drawn flat. Useful for scenario editing to fix little holes in your static landscape.
2013-01-20 12:51:33 +01:00
Armin Burgmeier
9e4d3d9caf
Make C4MapCreatorS2 show line numbers in error messages when parsing from mem
2013-01-14 02:25:15 +01:00
Armin Burgmeier
7357125368
Make C4Material.cpp independent of C4Game
...
This allows compiling and linking with it without pulling in whole
C4Game. This is useful for the mape map editor.
The only place where C4Game was used in C4Material.cpp was in
CrossMapMaterials where the name of the earth material is read from
Game.C4S. The code has been changed such that the earth material name is
now a parameter to the CrossMaterialMap function.
2013-01-14 02:14:39 +01:00
Armin Burgmeier
3420b2a9a2
Move C4ScenarioSection code from C4Scenario.cpp into C4ScenatioSection.cpp
...
This allows compiling and linking with C4Scenario.cpp without having to
pull in whole C4Game.
2013-01-14 02:14:37 +01:00
Armin Burgmeier
b6bcc0d36e
Make a texture's average color able to be set externally
2013-01-14 01:41:22 +01:00
Armin Burgmeier
257db99165
Merge remote-tracking branch 'new/master' into mape
...
Conflicts:
CMakeLists.txt
src/graphics/C4Draw.h
2013-01-14 01:38:03 +01:00
Tobias Zwick
d018920f53
if Crew is not specified, default to Clonk=1 in the scenario.txt
2013-01-13 22:08:30 +01:00
Armin Burgmeier
2d3a4981bf
map creator: don't crash when using a template within itself ( #534 )
2013-01-13 18:19:32 +01:00
Tobias Zwick
65d50da83f
cleaned up obsolete entries in scenario.txt
2013-01-13 15:45:01 +01:00
Günther Brammer
864c5c7ea8
copyright notices update 2012
2013-01-12 16:31:40 +01:00
Tobias Zwick
d0a6bb099f
fix #792 : wouldn't load Overlay.*.png
2013-01-08 23:52:45 +01:00
Günther Brammer
d5c1cb8c51
Remove some unused variables
2012-12-31 22:03:12 +01:00
Günther Brammer
6a6190564f
Remove some forward declarations that are already in C4Prototypes.h
2012-12-31 22:03:12 +01:00
Sven Eberhardt
6e85a7a5fc
Fix SolidMasks not moving objects if the top left of the landscape was solid
...
A missing fixed conversion let the shape check happen at or around position 1/1 instead of at the actual object position.
Also removed a redundant contact check.
2012-12-31 15:56:02 +01:00
Armin Burgmeier
84c43f9a1d
Draw particles with subpixel precision
2012-12-28 19:28:39 +01:00
David Dormagen
8f2058e55b
adjusted PathFree2 to return the first point on the line from point1 to point2
...
before, when point1 was f.e. more to the right, PathFree2 would swap the points and return an unexpected point
2012-12-22 16:48:50 +01:00
Sven Eberhardt
548413449d
fix material conversion on insertion into converting liquid
2012-12-16 18:52:32 +01:00
Günther Brammer
8a001972ab
Avoid some false positives on a naive Random-between-sequence-points check
...
The check was git grep -Ewn -e 'Random\s*\([^;{}]+Random' src
2012-11-17 16:30:12 +01:00
Tobias Zwick
348fb8c7a9
clean up mouse controls, reduced cursor graphics to the used ones
2012-11-16 17:29:42 +01:00
Peter Wortmann
2c821552e5
Reset default material zoom level to 4
...
Due to popular demand
2012-11-07 22:14:07 +00:00
Peter Wortmann
cc6d138133
Fixed CompileFunc entry for MaterialZoom
...
oops.
2012-11-05 19:16:33 +00:00
Peter Wortmann
a4b4065206
Made material zoom configurable
...
Also set default to 8. This might be a pretty controversial change, but
the amounts of screenshots we have at zoom levels beyond 4 just calls for
a more high-res approach.
2012-11-05 17:17:12 +00:00
Peter Wortmann
41b51907c6
Officially make BROKEN_ARRAYS_WORKAROUND the default
...
Pretty awkward compromise, but the array version seems to confuse a lot of
drivers, without causing an actual error. So this is probably better in
practice until better drivers are more common.
2012-11-05 16:57:33 +00:00
Günther Brammer
a5b83665af
Store all channels of a color together in CStdPalette
...
This mostly simplifies things, since most other places use an 32 bit
integer to store colors, but might even improve performance through better
cache locality.
2012-08-16 00:45:27 +02:00