Skip to content

Commit

Permalink
Merge commit '8e0859cd7a428d46719d1af99049c36f13c70d27' from orbweave…
Browse files Browse the repository at this point in the history
…r's fork.

Lots of conflicts due to the large diff set and the whitespace changes.
  • Loading branch information
codereader committed Sep 27, 2020
2 parents dc1df25 + 8e0859c commit 1af853a
Show file tree
Hide file tree
Showing 125 changed files with 4,614 additions and 5,871 deletions.
6 changes: 3 additions & 3 deletions configure.ac
@@ -1,4 +1,4 @@
AC_INIT([darkradiant], [2.9.0])
AC_INIT([darkradiant], [2.8.1])
AM_INIT_AUTOMAKE([subdir-objects])
AM_SILENT_RULES([yes])

Expand Down Expand Up @@ -332,8 +332,8 @@ LDFLAGS="$USER_LDFLAGS $LIBSIGC_LIBS $FMTLIB_LDFLAGS"
if test "$debug_build" != 'no'
then
CPPFLAGS="-D_DEBUG $CPPFLAGS"
CFLAGS="-g -O0 $CFLAGS"
CXXFLAGS="-g -O0 $CXXFLAGS"
CFLAGS="-g -Og $CFLAGS"
CXXFLAGS="-g -Og $CXXFLAGS"
else
CFLAGS="-g -O2 -DNDEBUG $CFLAGS"
CXXFLAGS="-g -O2 -DNDEBUG $CXXFLAGS"
Expand Down
Binary file modified doc/img/DifficultyEditor.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/img/farClipIn.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/img/farClipOut.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/img/lightingMode.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/img/solidMode16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/img/textureMode16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/img/wireframeMode16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 85 additions & 6 deletions doc/manual.adoc
Expand Up @@ -808,6 +808,59 @@ needs to align across all of the brushes, regardless of how they are moved or
resized), you will want to disable *Texture Lock*.
|===

==== Using the shader clipboard

While constructing a map it will frequently be necessary to apply the same
texture to several different surfaces such that they appear seamless in game. In
order to assist with this, DarkRadiant provides a *shader clipboard* which
allows shaders to be copied and pasted between primitives, and is independent of
the main clipboard used for copying and pasting other objects.

===== Copying a shader

There are two ways to copy a shader to the shader clipboard.

1. Select a _single face_ (not an entire brush) with *Ctrl + Shift + Left click*
in the 3D view, then choose *Edit -> Copy shader*.
2. Directly *Middle click* the face in the 3D view (there is no need to select
it first).

In both cases, the *ShaderClipboard* section of the bottom status bar will
update to show the new value of the shader clipboard. If the *Media* or
*Textures* tab is visible, their contents will also update to view the selected
shader.

NOTE: Selecting a texture explicitly in the *Media* or *Textures* tabs will also
update the shader clipboard with the selected shader.

===== Pasting a shader

Once a shader is on the shader clipboard, it can be pasted onto another surface
in a number of ways:

1. Select the destination face with *Ctrl + Shift + Left click*, then choose
*Edit -> Paste shader* or *Edit -> Paste shader (natural)*.
2. Directly *Middle click* the destination face while holding down either *Ctrl*
(to paste the shader with projected coordinates) or *Shift* (to paste the shader
with natural coordinates).

.Natural or projected pasting
****
The difference between natural and projected coordinates is apparent when
pasting a shader onto a curved patch.
With *projected* coordinates (*Ctrl + Middle click*) the texture on the patch
will be aligned identically to the texture on the source face, which might
result in a stretched texture depending on the angle between the patch and the
source face.
With *natural* coordinates (*Shift + Middle click*) the texture will flow over
the curved surface in a more natural manner.
When pasting a shader onto a flat brush face, there may be little or no
difference between the two options.
****

=== Working with entities

If brushes are the bricks and mortar of a map (often literally), entities are
Expand Down Expand Up @@ -1108,6 +1161,26 @@ list of entity properties. If an entire entity is selected, the text will appear
similar to `Entity 1`, whereas with a primitive selected it will read
`Entity 1, Primitive 1`.

==== Adding or removing primitives

Once you have created a *func_static* or similar entity from a number of
primitives, you can add or remove primitives without needing to create a new
entity from scratch.

*Adding a primitive*:: Select the entity, then expand the selection (i.e. using
*Shift + Left click*) to include one or more existing primitives to add to this
entity. Then choose *Edit -> Reparent primitives*.

*Removing a primitive*:: Use the *TAB* key to select the individual primitive to
remove (you must do this even if there is only one primitive in the entity),
then choose *Edit -> Reparent primitives to worldspawn*. The removed primitive
will still exist in the map but it will be a regular worldspawn brush or patch,
not parented to any other entity.

*Unparenting all primitives*:: With the entity selected, simply right-click in
the 2D view and choose *Revert to worldspawn* to turn all of the primitives
back into worldspawn.

=== Compiling a map

DarkRadiant does not include functionality for compiling a map into the form
Expand Down Expand Up @@ -1503,11 +1576,12 @@ removing a particular enemy type's ability to relight torches.
.The Difficulty editor, showing a modified property on a particular entity class
image::DifficultyEditor.png[align="center"]

The Difficulty editor consists of a tabbed widget, where each tab contains the
settings which correspond to a particular difficulty level. The difficulty names
are shown for the current map — normally these will be the default values of
"Easy", "Medium" and "Difficult", but if the current map has customised
difficulty names DarkRadiant will adjust the tab names accordingly.
The Difficulty editor shows the names of the available difficulty levels in a
dropdown widget, beneath which are the settings for the selected difficulty
level. The difficulty names are customisable on a per-map basis — normally these
will be the default values of "Easy", "Medium" and "Difficult", but if the
current map has customised difficulty names DarkRadiant will adjust the tab
names accordingly.

On the left is a tree view showing all of the property overrides for the current
difficulty level. Each top-level item is a particular entity class, which
Expand All @@ -1529,9 +1603,14 @@ all enemies of this particular type will not be able to relight torches.
assignments from the list; to remove all of the assignments for a particular
entity class, you must select and delete each one individually.

*Editing the difficulty name*:: To edit the name of the current difficulty
level, click the edit button to the right of the dropdown, and enter a new name
in the text box. The modified name will be written into a property on the
`worldspawn` entity and reflected both in game and in DarkRadiant.

TIP: For details of more advanced difficulty-dependent changes, such as
modifying the behaviour of a *single* entity (rather than an entire entity
class), or changing the names of difficulty settings, consult the Dark Mod Wiki.
class), consult the Dark Mod Wiki.

== Command reference

Expand Down
146 changes: 139 additions & 7 deletions doc/manual.html
Expand Up @@ -474,6 +474,7 @@ <h1>DarkRadiant User Guide</h1>
<li><a href="#MediaTab">The Media tab</a></li>
<li><a href="#TexturesTab">The Textures tab</a></li>
<li><a href="#SurfaceInspector">Using the Surface Inspector</a></li>
<li><a href="#_using_the_shader_clipboard">Using the shader clipboard</a></li>
</ul>
</li>
<li><a href="#_working_with_entities">Working with entities</a>
Expand All @@ -489,6 +490,7 @@ <h1>DarkRadiant User Guide</h1>
<ul class="sectlevel3">
<li><a href="#_converting_primitives_into_func_static">Converting primitives into func_static</a></li>
<li><a href="#_selecting_individual_child_primitives">Selecting individual child primitives</a></li>
<li><a href="#_adding_or_removing_primitives">Adding or removing primitives</a></li>
</ul>
</li>
<li><a href="#_compiling_a_map">Compiling a map</a>
Expand Down Expand Up @@ -1885,6 +1887,96 @@ <h4 id="SurfaceInspector">Using the Surface Inspector</h4>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="_using_the_shader_clipboard">Using the shader clipboard</h4>
<div class="paragraph">
<p>While constructing a map it will frequently be necessary to apply the same
texture to several different surfaces such that they appear seamless in game. In
order to assist with this, DarkRadiant provides a <strong>shader clipboard</strong> which
allows shaders to be copied and pasted between primitives, and is independent of
the main clipboard used for copying and pasting other objects.</p>
</div>
<div class="sect4">
<h5 id="_copying_a_shader">Copying a shader</h5>
<div class="paragraph">
<p>There are two ways to copy a shader to the shader clipboard.</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Select a <em>single face</em> (not an entire brush) with <strong>Ctrl + Shift + Left click</strong>
in the 3D view, then choose <strong>Edit &#8594; Copy shader</strong>.</p>
</li>
<li>
<p>Directly <strong>Middle click</strong> the face in the 3D view (there is no need to select
it first).</p>
</li>
</ol>
</div>
<div class="paragraph">
<p>In both cases, the <strong>ShaderClipboard</strong> section of the bottom status bar will
update to show the new value of the shader clipboard. If the <strong>Media</strong> or
<strong>Textures</strong> tab is visible, their contents will also update to view the selected
shader.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<img src="img/note.png" alt="Note">
</td>
<td class="content">
Selecting a texture explicitly in the <strong>Media</strong> or <strong>Textures</strong> tabs will also
update the shader clipboard with the selected shader.
</td>
</tr>
</table>
</div>
</div>
<div class="sect4">
<h5 id="_pasting_a_shader">Pasting a shader</h5>
<div class="paragraph">
<p>Once a shader is on the shader clipboard, it can be pasted onto another surface
in a number of ways:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Select the destination face with <strong>Ctrl + Shift + Left click</strong>, then choose
<strong>Edit &#8594; Paste shader</strong> or <strong>Edit &#8594; Paste shader (natural)</strong>.</p>
</li>
<li>
<p>Directly <strong>Middle click</strong> the destination face while holding down either <strong>Ctrl</strong>
(to paste the shader in projected coordinates) or <strong>Shift</strong> (to paste the shader
with natural coordinates).</p>
</li>
</ol>
</div>
<div class="sidebarblock">
<div class="content">
<div class="title">Natural or projected pasting</div>
<div class="paragraph">
<p>The difference between natural and projected coordinates is apparent when
pasting a shader onto a curved patch.</p>
</div>
<div class="paragraph">
<p>With <strong>projected</strong> coordinates (<strong>Ctrl + Middle click</strong>) the texture on the patch
will be aligned identically to the texture on the source face, which might
result in a stretched texture depending on the angle between the patch and the
source face.</p>
</div>
<div class="paragraph">
<p>With <strong>natural</strong> coordinates (<strong>Shift + Middle click</strong>) the texture will flow over
the curved surface in a more natural manner.</p>
</div>
<div class="paragraph">
<p>When pasting a shader onto a flat brush face, there may be little or no
difference between the two options.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_working_with_entities">Working with entities</h3>
Expand Down Expand Up @@ -2331,6 +2423,38 @@ <h4 id="_selecting_individual_child_primitives">Selecting individual child primi
<code>Entity&nbsp;1,&nbsp;Primitive&nbsp;1</code>.</p>
</div>
</div>
<div class="sect3">
<h4 id="_adding_or_removing_primitives">Adding or removing primitives</h4>
<div class="paragraph">
<p>Once you have created a <strong>func_static</strong> or similar entity from a number of
primitives, you can add or remove primitives without needing to create a new
entity from scratch.</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1"><strong>Adding a primitive</strong></dt>
<dd>
<p>Select the entity, then expand the selection (i.e. using
<strong>Shift + Left click</strong>) to include one or more existing primitives to add to this
entity. Then choose <strong>Edit &#8594; Reparent primitives</strong>.</p>
</dd>
<dt class="hdlist1"><strong>Removing a primitive</strong></dt>
<dd>
<p>Use the <strong>TAB</strong> key to select the individual primitive to
remove (you must do this even if there is only one primitive in the entity),
then choose <strong>Edit &#8594; Reparent primitives to worldspawn</strong>. The removed primitive
will still exist in the map but it will be a regular worldspawn brush or patch,
not parented to any other entity.</p>
</dd>
<dt class="hdlist1"><strong>Unparenting all primitives</strong></dt>
<dd>
<p>With the entity selected, simply right-click in
the 2D view and choose <strong>Revert to worldspawn</strong> to turn all of the primitives
back into worldspawn.</p>
</dd>
</dl>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_compiling_a_map">Compiling a map</h3>
Expand Down Expand Up @@ -3016,11 +3140,12 @@ <h3 id="_the_difficulty_editor">The Difficulty editor</h3>
<div class="title">Figure 12. The Difficulty editor, showing a modified property on a particular entity class</div>
</div>
<div class="paragraph">
<p>The Difficulty editor consists of a tabbed widget, where each tab contains the
settings which correspond to a particular difficulty level. The difficulty names
are shown for the current map — normally these will be the default values of
"Easy", "Medium" and "Difficult", but if the current map has customised
difficulty names DarkRadiant will adjust the tab names accordingly.</p>
<p>The Difficulty editor shows the names of the available difficulty levels in a
dropdown widget, beneath which are the settings for the selected difficulty
level. The difficulty names are customisable on a per-map basis — normally these
will be the default values of "Easy", "Medium" and "Difficult", but if the
current map has customised difficulty names DarkRadiant will adjust the tab
names accordingly.</p>
</div>
<div class="paragraph">
<p>On the left is a tree view showing all of the property overrides for the current
Expand Down Expand Up @@ -3049,6 +3174,13 @@ <h3 id="_the_difficulty_editor">The Difficulty editor</h3>
assignments from the list; to remove all of the assignments for a particular
entity class, you must select and delete each one individually.</p>
</dd>
<dt class="hdlist1"><strong>Editing the difficulty name</strong></dt>
<dd>
<p>To edit the name of the current difficulty
level, click the edit button to the right of the dropdown, and enter a new name
in the text box. The modified name will be written into a property on the
<code>worldspawn</code> entity and reflected both in game and in DarkRadiant.</p>
</dd>
</dl>
</div>
<div class="admonitionblock tip">
Expand All @@ -3060,7 +3192,7 @@ <h3 id="_the_difficulty_editor">The Difficulty editor</h3>
<td class="content">
For details of more advanced difficulty-dependent changes, such as
modifying the behaviour of a <strong>single</strong> entity (rather than an entire entity
class), or changing the names of difficulty settings, consult the Dark Mod Wiki.
class), consult the Dark Mod Wiki.
</td>
</tr>
</table>
Expand Down Expand Up @@ -3723,7 +3855,7 @@ <h4 id="_creating_an_assets_lst_file">Creating an assets.lst file</h4>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2020-03-10 21:18:41 GMT
Last updated 2020-06-02 20:50:59 BST
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion include/ientity.h
Expand Up @@ -213,7 +213,7 @@ class Entity

/// Interface for a INode subclass that contains an Entity
class IEntityNode :
public virtual IRenderEntity,
public IRenderEntity,
public virtual scene::INode
{
public:
Expand Down

0 comments on commit 1af853a

Please sign in to comment.