Skip to content

Commit

Permalink
Merge pull request #28 from Tokeiburu/lightmap-improvements
Browse files Browse the repository at this point in the history
Lightmap improvements
  • Loading branch information
Borf authored Dec 7, 2024
2 parents d2ca54c + 781abac commit 17a23d5
Show file tree
Hide file tree
Showing 29 changed files with 1,113 additions and 164 deletions.
2 changes: 2 additions & 0 deletions BrowEdit3.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<ClCompile Include="browedit\actions\GndTextureActions.cpp" />
<ClCompile Include="browedit\actions\GndVersionChangeAction.cpp" />
<ClCompile Include="browedit\actions\GroupAction.cpp" />
<ClCompile Include="browedit\actions\LightmapChangeAction.cpp" />
<ClCompile Include="browedit\actions\LightmapNewAction.cpp" />
<ClCompile Include="browedit\actions\LubChangeTextureAction.cpp" />
<ClCompile Include="browedit\actions\ModelChangeAction.cpp" />
Expand Down Expand Up @@ -144,6 +145,7 @@
<ClInclude Include="browedit\actions\GndTextureActions.h" />
<ClInclude Include="browedit\actions\GndVersionChangeAction.h" />
<ClInclude Include="browedit\actions\GroupAction.h" />
<ClInclude Include="browedit\actions\LightmapChangeAction.h" />
<ClInclude Include="browedit\actions\LightmapNewAction.h" />
<ClInclude Include="browedit\actions\LubChangeTextureAction.h" />
<ClInclude Include="browedit\actions\ModelChangeAction.h" />
Expand Down
6 changes: 6 additions & 0 deletions BrowEdit3.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,9 @@
<ClCompile Include="browedit\actions\LubChangeTextureAction.cpp">
<Filter>browedit\actions</Filter>
</ClCompile>
<ClCompile Include="browedit\actions\LightmapChangeAction.cpp">
<Filter>browedit\actions</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="lib\imgui\imgui.h">
Expand Down Expand Up @@ -741,6 +744,9 @@
<ClInclude Include="browedit\actions\LubChangeTextureAction.h">
<Filter>browedit\actions</Filter>
</ClInclude>
<ClInclude Include="browedit\actions\LightmapChangeAction.h">
<Filter>browedit\actions</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="BrowEdit3.rc">
Expand Down
8 changes: 6 additions & 2 deletions browedit/BrowEdit.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ class BrowEdit
} textureBrushMode = TextureBrushMode::Stamp;
TextureBrushMode brushModeBeforeDropper;

bool heightDoodle = true;
bool heightDoodle = false;

std::map<std::string, std::vector<std::string>> tagList; // tag -> [ file ], utf8
std::map<std::string, std::vector<std::string>> tagListReverse; // file -> [ tag ], kr
Expand All @@ -258,7 +258,11 @@ class BrowEdit
Config config;
std::vector<std::pair<Node*, glm::vec3>> newNodes;
glm::vec3 newNodesCenter;
bool newNodeHeight = false;
enum {
Ground, // The new node will be relative to the ground
Absolute, // The new node position will be determined by newNodesCenter
Relative // The new node will be relative to the ground + newNodesCenter
} newNodePlacement = Ground;
std::vector<CopyCube*> newCubes;
std::vector<CopyCubeGat*> newGatCubes;
int pasteOptions = -1;
Expand Down
2 changes: 1 addition & 1 deletion browedit/HotkeyActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void BrowEdit::registerActions()
else if (editMode == EditMode::Gat && !heightDoodle)
pasteGat();
}, hasActiveMapView);
HotkeyRegistry::registerAction(HotkeyAction::Global_PasteChangeHeight, [this]() { if (editMode == EditMode::Object) { newNodeHeight = !newNodeHeight; } }, hasActiveMapView);
HotkeyRegistry::registerAction(HotkeyAction::Global_PasteChangeHeight, [this]() { if (editMode == EditMode::Object) { newNodePlacement = newNodePlacement == BrowEdit::Absolute ? BrowEdit::Ground : BrowEdit::Absolute; } }, hasActiveMapView);

HotkeyRegistry::registerAction(HotkeyAction::Global_ClearZeroHeightWalls, [this]() { activeMapView->map->rootNode->getComponent<Gnd>()->removeZeroHeightWalls(); }, hasActiveMapView);
HotkeyRegistry::registerAction(HotkeyAction::Global_CalculateQuadtree, [this]() { activeMapView->map->recalculateQuadTree(this); }, hasActiveMapView);
Expand Down
Loading

0 comments on commit 17a23d5

Please sign in to comment.