Skip to content

Commit

Permalink
Merge remote-tracking branch 'greebo/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Mott committed Oct 11, 2022
2 parents 962af8b + 12753bc commit 577201c
Show file tree
Hide file tree
Showing 120 changed files with 4,160 additions and 690 deletions.
11 changes: 10 additions & 1 deletion CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12)

# Project name and version
project(darkradiant VERSION 3.3.0)
project(darkradiant VERSION 3.4.0)

# C++ standard
set(CMAKE_CXX_STANDARD 17)
Expand Down Expand Up @@ -171,6 +171,15 @@ install(DIRECTORY install/ui DESTINATION ${PKGDATADIR}
FILES_MATCHING PATTERN "*.ttf" PATTERN "*.xrc")
install(DIRECTORY install/resources DESTINATION ${PKGDATADIR})

install(FILES ${PROJECT_SOURCE_DIR}/install/bitmaps/darkradiant_icon_64x64.png
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/64x64/apps
RENAME net.darkradiant.DarkRadiant.png)
install(FILES ${PROJECT_SOURCE_DIR}/install/bitmaps/darkradiant_icon_128x128.png
DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/128x128/apps
RENAME net.darkradiant.DarkRadiant.png)
install(FILES ${PROJECT_SOURCE_DIR}/install/net.darkradiant.DarkRadiant.metainfo.xml
DESTINATION ${CMAKE_INSTALL_DATADIR}/metainfo)

# Install locale data
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14")
# CMake 3.14 and above support TYPE LOCALE, they deduct DESTINATION themselves
Expand Down
50 changes: 41 additions & 9 deletions include/ilayer.h
Expand Up @@ -136,32 +136,29 @@ class ILayerManager
/**
* greebo: Queries the visibility of the given layer.
*/
virtual bool layerIsVisible(const std::string& layerName) = 0;
virtual bool layerIsVisible(int layerID) = 0;

/**
* greebo: Sets the visibility of the given layer.
* This operation will affect all child layers that might be
* assigned to this one, recursively.
*/
virtual void setLayerVisibility(const std::string& layerName, bool visible) = 0;
virtual void setLayerVisibility(int layerID, bool visible) = 0;

/**
* greebo: Traverses the selection and adds each node to the given layer.
*/
virtual void addSelectionToLayer(const std::string& layerName) = 0;
virtual void addSelectionToLayer(int layerID) = 0;

/**
* greebo: Moves all selected nodes to the given layer. This implicitly
* removes the nodes from all other layers.
*/
virtual void moveSelectionToLayer(const std::string& layerName) = 0;
virtual void moveSelectionToLayer(int layerID) = 0;

/**
* greebo: Removes the selected nodes from the given layers.
*/
virtual void removeSelectionFromLayer(const std::string& layerName) = 0;
virtual void removeSelectionFromLayer(int layerID) = 0;

/**
Expand All @@ -172,7 +169,7 @@ class ILayerManager
* current layer settings resulted to "invisible" and the
* node was therefore hidden.
*/
virtual bool updateNodeVisibility(const scene::INodePtr& node) = 0;
virtual bool updateNodeVisibility(const INodePtr& node) = 0;

/**
* greebo: Sets the selection status of the entire layer.
Expand All @@ -183,6 +180,33 @@ class ILayerManager
*/
virtual void setSelected(int layerID, bool selected) = 0;

/**
* Returns the parent layer ID of the layer identified by the given ID.
* Will return -1 if the given layer doesn't have a parent or doesn't exist.
*/
virtual int getParentLayer(int layerId) = 0;

/**
* Sets the parent of the given child layer, replacing any previous parent.
*
* Any layer can be made a child of another layer, as long as the formed
* tree is staying sane (no recursions).
* Setting a parent layer ID of -1 will remove the parent and make this
* a top-level layer.
*
* An attempt to form an invalid operation (like modifying the default layer
* or forming a recursion) will throw a std::runtime_error.
*/
virtual void setParentLayer(int childLayerId, int parentLayerId) = 0;

/**
* Returns true if the given parentLayerId is part of the ancestry of the
* given candidateLayerId (the node itself is not part of the ancestry).
*
* Returns false if any of the given IDs is -1.
*/
virtual bool layerIsChildOf(int candidateLayerId, int parentLayerId) = 0;

/**
* A signal for client code to get notified about layer creation,
* renamings and removal.
Expand All @@ -194,6 +218,11 @@ class ILayerManager
*/
virtual sigc::signal<void> signal_layerVisibilityChanged() = 0;

/**
* Fired whenever a parent of a layer has been changed.
*/
virtual sigc::signal<void> signal_layerHierarchyChanged() = 0;

/**
* Public signal to get notified about layer membership changes,
* e.g. when a node has been added to a layer, or moved to a new one.
Expand All @@ -208,14 +237,17 @@ class ILayerModule :
public RegisterableModule
{
public:
virtual ~ILayerModule() {}
~ILayerModule() override {}

virtual ILayerManager::Ptr createLayerManager() = 0;
/**
* Creates a new layer manager instance associated to the given scene (root) node
*/
virtual ILayerManager::Ptr createLayerManager(INode& rootNode) = 0;
};

} // namespace scene

const char* const MODULE_LAYERS("LayerModule");
constexpr const char* const MODULE_LAYERS("LayerModule");

inline scene::ILayerModule& GlobalLayerModule()
{
Expand Down
2 changes: 2 additions & 0 deletions include/imodelsurface.h
Expand Up @@ -3,6 +3,8 @@
// Math/Vertex classes
#include "render/MeshVertex.h"

class AABB;

namespace model
{

Expand Down
6 changes: 3 additions & 3 deletions include/iselectable.h
@@ -1,6 +1,7 @@
#pragma once

#include <memory>
#include "inode.h"

/**
* greebo: A Selectable is everything that can be highlighted
Expand All @@ -9,7 +10,6 @@
class ISelectable
{
public:
// destructor
virtual ~ISelectable() {}

// Set the selection status of this object
Expand All @@ -28,7 +28,7 @@ namespace scene

inline void Node_setSelected(const scene::INodePtr& node, bool selected)
{
ISelectablePtr selectable = scene::node_cast<ISelectable>(node);
auto selectable = scene::node_cast<ISelectable>(node);

if (selectable)
{
Expand All @@ -38,7 +38,7 @@ inline void Node_setSelected(const scene::INodePtr& node, bool selected)

inline bool Node_isSelected(const scene::INodePtr& node)
{
ISelectablePtr selectable = scene::node_cast<ISelectable>(node);
auto selectable = scene::node_cast<ISelectable>(node);

if (selectable)
{
Expand Down
2 changes: 1 addition & 1 deletion include/version.h
Expand Up @@ -4,7 +4,7 @@
#include <config.h>
#define RADIANT_VERSION PACKAGE_VERSION
#else
#define RADIANT_VERSION "3.3.0"
#define RADIANT_VERSION "3.4.0"
#endif

#define RADIANT_APPNAME "DarkRadiant"
Expand Down
Binary file added install/bitmaps/darkradiant_icon_128x128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions install/darkradiant.desktop.in
Expand Up @@ -4,10 +4,10 @@ Name=DarkRadiant
GenericName=Level editor
Keywords=doom;doom3;idtech;level;map;the dark mod;game development;

Comment=3D level editor for Doom 3 and the Dark Mod
Comment[de]=3D Level Editor für Doom 3 und The Dark Mod
Comment=3D level editor for The Dark Mod and Doom 3
Comment[de]=3D Level Editor für The Dark Mod und Doom 3

Icon=@CMAKE_INSTALL_PREFIX@/share/darkradiant/bitmaps/darkradiant_icon_64x64.png
Icon=net.darkradiant.DarkRadiant

# The %f means a single, local, absolute file. Remote files will be
# first copied in a local temp location and then given to the program:
Expand Down
77 changes: 77 additions & 0 deletions install/net.darkradiant.DarkRadiant.metainfo.xml
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>net.darkradiant.DarkRadiant</id>
<name>DarkRadiant</name>
<summary>3D level editor for The Dark Mod and Doom 3</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0-or-later</project_license>
<content_rating type="oars-1.1" />
<url type="homepage">https://www.darkradiant.net/</url>
<screenshots>
<screenshot type="default">
<caption>Main window</caption>
<image type="source" width="1960" height="1039">https://www.darkradiant.net/images/screenshots/appstream_screenshot1.png</image>
</screenshot>
<screenshot>
<caption>Prefab chooser</caption>
<image type="source" width="1960" height="1039">https://www.darkradiant.net/images/screenshots/appstream_screenshot2.png</image>
</screenshot>
<screenshot>
<caption>Animation viewer</caption>
<image type="source" width="1960" height="1039">https://www.darkradiant.net/images/screenshots/appstream_screenshot3.png</image>
</screenshot>
<screenshot>
<caption>Material editor</caption>
<image type="source" width="1960" height="1039">https://www.darkradiant.net/images/screenshots/appstream_screenshot4.png</image>
</screenshot>
</screenshots>
<description>
<p>
DarkRadiant is an overhauled version originally based on GtkRadiant designed for use with The Dark Mod (www.thedarkmod.com), a Thief-inspired modification of the Doom 3 game engine.
</p>
<p>
Feature Highlights include:
<ul>
<li>Media Browser</li>
<li>Surface / Patch / Light Inspector</li>
<li>Layers, Grouping and Selection Sets</li>
<li>Model Scaling</li>
<li>Particle Editor incl. realtime Preview</li>
<li>Export entire map sections to ASE, LWO and OBJ format</li>
<li>Browsers for Models, Entity Classes, Skins, Sounds</li>
<li>Support for most idTech4 shader features</li>
<li>TexTool (U/V Editing Tool)</li>
<li>MD5 Animation Viewer</li>
<li>Curve Editing</li>
<li>Drag-Manipulation of Brushes, Patches and Lights (Point and Projected)</li>
<li>Python Script Interface</li>
<li>Game support for: The Dark Mod 2.0, Doom 3, Quake 4, Quake 3, XreaL</li>
<li>Imports all kinds of maps in classic Quake/idTech map formats</li>
<li>Exports maps to Doom 3 / Quake4 / Quake 3 format</li>
<li>Customisable colour schemes</li>
<li>English and German localisation</li>
</ul>
</p>
<p>
Our goal is to provide the TDM fan-mission community with a capable and easy-to-use editor. To achieve this, specialised plugins were developed to assist authors in tackling the complex mission creating tasks:
<ul>
<li>Stim/Response Editor</li>
<li>Objectives Editor</li>
<li>Difficulty Editor</li>
<li>Conversation Editor</li>
<li>AI Property Panel</li>
<li>Readable Editor incl. Preview</li>
<li>AI Head Selector</li>
</ul>
</p>
</description>

<launchable type="desktop-id">net.darkradiant.DarkRadiant.desktop</launchable>

<releases>
<release version="3.4.0" date="2022-10-09"/>
<release version="3.3.0" date="2022-09-23"/>
<release version="3.2.0" date="2022-09-03"/>
</releases>

</component>

0 comments on commit 577201c

Please sign in to comment.