Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions BrowEdit3.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<ClCompile Include="browedit\actions\TileNewAction.cpp" />
<ClCompile Include="browedit\actions\TilePropertyChangeAction.cpp" />
<ClCompile Include="browedit\actions\TileSelectAction.cpp" />
<ClCompile Include="browedit\actions\WaterHeightChangeAction.cpp" />
<ClCompile Include="browedit\actions\WaterSplitChangeAction.cpp" />
<ClCompile Include="browedit\BrowEdit.cpp" />
<ClCompile Include="browedit\BrowEdit.glfw.cpp" />
Expand Down Expand Up @@ -72,6 +73,7 @@
<ClCompile Include="browedit\MapView.Shadowmode.cpp" />
<ClCompile Include="browedit\MapView.Texturemode.cpp" />
<ClCompile Include="browedit\MapView.Wallmode.cpp" />
<ClCompile Include="browedit\MapView.Watermode.cpp" />
<ClCompile Include="browedit\math\AABB.cpp" />
<ClCompile Include="browedit\math\HermiteCurve.cpp" />
<ClCompile Include="browedit\math\Plane.cpp" />
Expand Down Expand Up @@ -105,6 +107,7 @@
<ClCompile Include="browedit\windows\Toolbar.cpp" />
<ClCompile Include="browedit\windows\UndoWindow.cpp" />
<ClCompile Include="browedit\windows\WallEditWindow.cpp" />
<ClCompile Include="browedit\windows\WaterEditWindow.cpp" />
<ClCompile Include="lib\glad\src\gl.c" />
<ClCompile Include="lib\glad\src\wgl.c" />
<ClCompile Include="lib\grflib\grf.c" />
Expand Down Expand Up @@ -163,6 +166,7 @@
<ClInclude Include="browedit\actions\TileNewAction.h" />
<ClInclude Include="browedit\actions\TilePropertyChangeAction.h" />
<ClInclude Include="browedit\actions\TileSelectAction.h" />
<ClInclude Include="browedit\actions\WaterHeightChangeAction.h" />
<ClInclude Include="browedit\actions\WaterSplitChangeAction.h" />
<ClInclude Include="browedit\BrowEdit.h" />
<ClInclude Include="browedit\components\BillboardRenderer.h" />
Expand Down Expand Up @@ -205,6 +209,7 @@
<ClInclude Include="browedit\Node.h" />
<ClInclude Include="browedit\NodeRenderer.h" />
<ClInclude Include="browedit\shaders\GndShader.h" />
<ClInclude Include="browedit\shaders\OutlineShader.h" />
<ClInclude Include="browedit\shaders\RsmShader.h" />
<ClInclude Include="browedit\shaders\SimpleShader.h" />
<ClInclude Include="browedit\shaders\WaterShader.h" />
Expand Down Expand Up @@ -266,6 +271,8 @@
<None Include="data\shaders\gnd.vs" />
<None Include="data\shaders\lub.fs" />
<None Include="data\shaders\lub.vs" />
<None Include="data\shaders\outline.fs" />
<None Include="data\shaders\outline.vs" />
<None Include="data\shaders\rsm.fs" />
<None Include="data\shaders\rsm.vs" />
<None Include="data\shaders\simple.fs" />
Expand Down Expand Up @@ -371,8 +378,8 @@
<IgnoreSpecificDefaultLibraries>MSVCRT</IgnoreSpecificDefaultLibraries>
</Link>
<PostBuildEvent>
<Command>xcopy /y $(TargetPath) $(SolutionDir)
xcopy /y $(OutDir)BrowEdit3.pdb $(SolutionDir)
<Command>xcopy /y "$(TargetPath)" "$(SolutionDir)"
xcopy /y "$(OutDir)BrowEdit3.pdb" "$(SolutionDir)"
</Command>
</PostBuildEvent>
<PostBuildEvent>
Expand Down
21 changes: 21 additions & 0 deletions BrowEdit3.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,15 @@
<ClCompile Include="lib\glad\src\wgl.c">
<Filter>lib\glad</Filter>
</ClCompile>
<ClCompile Include="browedit\windows\WaterEditWindow.cpp">
<Filter>browedit\windows</Filter>
</ClCompile>
<ClCompile Include="browedit\MapView.Watermode.cpp">
<Filter>browedit</Filter>
</ClCompile>
<ClCompile Include="browedit\actions\WaterHeightChangeAction.cpp">
<Filter>browedit\actions</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="lib\imgui\imgui.h">
Expand Down Expand Up @@ -780,6 +789,12 @@
<ClInclude Include="lib\lzma\Compiler.h">
<Filter>lib\lzma</Filter>
</ClInclude>
<ClInclude Include="browedit\actions\WaterHeightChangeAction.h">
<Filter>browedit\actions</Filter>
</ClInclude>
<ClInclude Include="browedit\shaders\OutlineShader.h">
<Filter>browedit\shaders</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="BrowEdit3.rc">
Expand Down Expand Up @@ -853,6 +868,12 @@
<None Include="docs\formats\Gnd.md">
<Filter>docs\formats</Filter>
</None>
<None Include="data\shaders\outline.fs">
<Filter>data\shaders</Filter>
</None>
<None Include="data\shaders\outline.vs">
<Filter>data\shaders</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Manifest Include="BrowEdit3.manifest">
Expand Down
4 changes: 4 additions & 0 deletions browedit/BrowEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ void BrowEdit::run()
showShadowEditWindow();
if (editMode == EditMode::Cinematic)
showCinematicModeWindow();
if (editMode == EditMode::Water)
showWaterEditWindow();

if (windowData.hotkeyEditWindowVisible)
showHotkeyEditorWindow();
Expand Down Expand Up @@ -595,6 +597,8 @@ void BrowEdit::showMapWindow(MapView& mapView, float deltaTime)
mapView.postRenderShadowMode(this);
else if (editMode == EditMode::Cinematic)
mapView.postRenderCinematicMode(this);
else if (editMode == EditMode::Water)
mapView.postRenderWaterMode(this);
}


Expand Down
2 changes: 2 additions & 0 deletions browedit/BrowEdit.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ class BrowEdit
Shadow,
Sprite,
Cinematic,
Water,
} editMode = EditMode::Gat;

enum class SelectTool
Expand Down Expand Up @@ -352,6 +353,7 @@ class BrowEdit
void showColorEditWindow();
void showShadowEditWindow();
void showCinematicModeWindow();
void showWaterEditWindow();

void copyTiles();
void copyGat();
Expand Down
1 change: 1 addition & 0 deletions browedit/HotkeyActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ void BrowEdit::registerActions()
HotkeyRegistry::registerAction(HotkeyAction::EditMode_Shadow, [this]() { editMode = EditMode::Shadow; });
HotkeyRegistry::registerAction(HotkeyAction::EditMode_Sprite, [this]() { editMode = EditMode::Sprite; });
HotkeyRegistry::registerAction(HotkeyAction::EditMode_Cinematic, [this]() { editMode = EditMode::Cinematic; });
HotkeyRegistry::registerAction(HotkeyAction::EditMode_Water, [this]() { editMode = EditMode::Water; });

HotkeyRegistry::registerAction(HotkeyAction::View_ShadowMap, [this]() { activeMapView->viewLightmapShadow = !activeMapView->viewLightmapShadow; }, hasActiveMapView);
HotkeyRegistry::registerAction(HotkeyAction::View_ColorMap, [this]() { activeMapView->viewLightmapColor = !activeMapView->viewLightmapColor; }, hasActiveMapView);
Expand Down
1 change: 1 addition & 0 deletions browedit/HotkeyRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ enum class HotkeyAction
EditMode_Shadow,
EditMode_Sprite,
EditMode_Cinematic,
EditMode_Water,

View_ShadowMap,
View_ColorMap,
Expand Down
1 change: 1 addition & 0 deletions browedit/Map.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Map
std::vector<Node*> selectedNodes;
std::vector<glm::ivec2> tileSelection;
std::vector<glm::ivec2> gatSelection;
std::vector<glm::ivec2> waterSelection;

bool changed = false;
bool mapHasNoGnd = false; // This variable is meant to prevent the console from being filled with the "map has no gnd" error
Expand Down
2 changes: 1 addition & 1 deletion browedit/MapView.Gatmode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ void MapView::postRenderGatMode(BrowEdit* browEdit)
if (gadgetHeight[i].axisClicked)
{
dragIndex = i;
mouseDragPlane.normal = glm::normalize(glm::vec3(nodeRenderContext.viewMatrix * glm::vec4(0, 0, 1, 1)) - glm::vec3(nodeRenderContext.viewMatrix * glm::vec4(0, 0, 0, 1)));
mouseDragPlane.normal = -mouseRay.dir;
mouseDragPlane.normal.y = 0;
mouseDragPlane.normal = glm::normalize(mouseDragPlane.normal);
mouseDragPlane.D = -glm::dot(pos[i], mouseDragPlane.normal);
Expand Down
2 changes: 1 addition & 1 deletion browedit/MapView.Heightmode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ void MapView::postRenderHeightMode(BrowEdit* browEdit)
if (gadgetHeight[i].axisClicked)
{
dragIndex = i;
mouseDragPlane.normal = glm::normalize(glm::vec3(nodeRenderContext.viewMatrix * glm::vec4(0, 0, 1, 1)) - glm::vec3(nodeRenderContext.viewMatrix * glm::vec4(0, 0, 0, 1)));
mouseDragPlane.normal = -mouseRay.dir;
mouseDragPlane.normal.y = 0;
mouseDragPlane.normal = glm::normalize(mouseDragPlane.normal);
mouseDragPlane.D = -glm::dot(pos[i], mouseDragPlane.normal);
Expand Down
Loading
Loading