Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Editor Modes #298

Open
wants to merge 54 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
3d523b6
Updating the editor to support multiple modes
Interrupt Oct 16, 2022
b55a259
Shoring up extrude mode
Interrupt Oct 16, 2022
143e450
Shoring up how the tile selection bounds are used for empty selections
Interrupt Oct 17, 2022
502c8a0
Can hold shift to adjust the floor/ceil grid snapping
Interrupt Oct 17, 2022
2f126db
Starting to implement the Picked Entity editor mode
Interrupt Oct 17, 2022
7036ed2
Re-implementing entity movement logic
Interrupt Oct 17, 2022
2af9cc2
Saving editor history after entity movement
Interrupt Oct 17, 2022
c5e0cbb
Fix entity placement via right-click menu
Interrupt Oct 17, 2022
b7bc8df
Adding some controls that will allow us to subclass the CarveMode to …
Interrupt Oct 17, 2022
a88ca0c
Shoring up entity mode switching
Interrupt Oct 17, 2022
92d18c6
Implementing an example arch mode
Interrupt Oct 17, 2022
13b3662
Making carve mode height adjustment cleaner
Interrupt Oct 17, 2022
38bd0ea
Adding basic toolbar
joshuaskelly Oct 17, 2022
b883303
Added a few other test editor modes
Interrupt Oct 17, 2022
fd171a2
Toolbar update + refactor ctors + mode for modes
joshuaskelly Oct 17, 2022
b3a8572
Don't switch automatic in entity pick mode
joshuaskelly Oct 17, 2022
7c9bd0a
Blocking out a Ramp editor mode
Interrupt Oct 18, 2022
de4066f
Perlin noise based editor mode
Interrupt Oct 18, 2022
12399a0
Draw, Erase, and Paint modes
Interrupt Oct 18, 2022
93ebcb4
Tile selections can use the found tile heights now
Interrupt Oct 19, 2022
1e5abf9
Adding support for multiple tile selections
Interrupt Oct 19, 2022
d639e33
Tweaking noise mode to be able to carve and delete
Interrupt Oct 19, 2022
29ed4f3
Merge branch 'master' into noodling/editormodes
Interrupt Oct 19, 2022
30100c7
Switching between modes preserves tile selections
Interrupt Oct 20, 2022
6c9739c
Working on tile selection edge detection
Interrupt Oct 20, 2022
3040d3e
Helper methods for determining TileEdge from ControlPointType
Interrupt Oct 20, 2022
c752184
More ramp logic
Interrupt Oct 20, 2022
672e4af
Ramp mode works by being able to click on the actual tesselated tiles…
Interrupt Oct 21, 2022
3598728
Moving picked tile selection drawing into the CarveMode base class
Interrupt Oct 21, 2022
597ed7e
Resizing the editor window will update the uiBatch sizes now
Interrupt Oct 21, 2022
91762d8
Adding a cleaner way to apply per-vertex functions to a range of tiles
Interrupt Oct 23, 2022
c7e7e18
Adding a flatten editor mode
Interrupt Oct 23, 2022
0d3b891
Working on new ramp modes
Interrupt Oct 23, 2022
fb02128
Fixing the landscape tool with the power of math
Interrupt Oct 23, 2022
fdf9a67
Adding a pyramid editor mode
Interrupt Oct 23, 2022
9b8b33a
Fixing Marker placement
Interrupt Oct 23, 2022
49de4bd
Fixing editor mode selection collision after undo
Interrupt Oct 24, 2022
d39968e
Fixing pyramid editor mode movement
Interrupt Oct 24, 2022
2756b61
Better paint mode
Interrupt Oct 24, 2022
fec5b19
Resetting draw mode state when switching away or back
Interrupt Oct 24, 2022
dc5f4e2
Adding a texture pan mode
Interrupt Oct 24, 2022
a5ccfb0
Adding flood fill to the paint tool
Interrupt Oct 24, 2022
c4f88a3
Fixed loading of texture pans in the editor
Interrupt Oct 24, 2022
9269f50
Refreshing editor world chunks based on tile selection sizes
Interrupt Oct 24, 2022
d8d966b
Fixing editor tile copy and paste
Interrupt Oct 24, 2022
b8cd185
Fix for multi tile selection box pasting
Interrupt Oct 24, 2022
4fff30f
Fixed crash when copy+pasting entities
Interrupt Oct 24, 2022
b87fa2a
Tile copy+paste now copies ceiling heights and wall atlases
Interrupt Oct 24, 2022
db88952
Copying a tile to another tile now copies the wall texture atlases as…
Interrupt Oct 24, 2022
f64ad30
Adding a vertex editor tool
Interrupt Oct 25, 2022
48a6b68
Tools bar shows under the Menu bar now
Interrupt Oct 25, 2022
2c3db6e
Fixing a few movement issues in vertex edit mode
Interrupt Oct 25, 2022
e263bd7
Cleaning up some dead code in EditorApplication.java
Interrupt Oct 25, 2022
1ff5726
Carve mode can change wall angles again
Interrupt Nov 9, 2022
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
64 changes: 64 additions & 0 deletions DelvEdit/src/com/interrupt/dungeoneer/editor/ControlPoint.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package com.interrupt.dungeoneer.editor;

import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.utils.Array;

public class ControlPoint {
public Vector3 point;
public ControlPointType controlPointType;

public enum ControlPointType { floor, ceiling, northFloor, northCeil, eastFloor, eastCeil, southFloor, southCeil, westFloor, westCeil, vertex };

public Array<ControlPointVertex> vertices = new Array<>();

public ControlPoint(Vector3 point, ControlPointType type) {
this.point = point;
controlPointType = type;
}

public ControlPoint(Vector3 point, ControlPointVertex vertex) {
this.point = point;
controlPointType = ControlPointType.vertex;
vertices.add(vertex);
}

public boolean isCeiling() {
return controlPointType == ControlPointType.northCeil || controlPointType == ControlPointType.eastCeil || controlPointType == ControlPointType.southCeil || controlPointType == ControlPointType.westCeil;
}

public boolean isFloor() {
return controlPointType == ControlPointType.northFloor || controlPointType == ControlPointType.eastFloor || controlPointType == ControlPointType.southFloor || controlPointType == ControlPointType.westFloor;
}

public boolean isNorthCeiling() {
return controlPointType == ControlPointType.northCeil || controlPointType == ControlPointType.ceiling;
}

public boolean isSouthCeiling() {
return controlPointType == ControlPointType.southCeil || controlPointType == ControlPointType.ceiling;
}

public boolean isEastCeiling() {
return controlPointType == ControlPointType.eastCeil || controlPointType == ControlPointType.ceiling;
}

public boolean isWestCeiling() {
return controlPointType == ControlPointType.westCeil || controlPointType == ControlPointType.ceiling;
}

public boolean isNorthFloor() {
return controlPointType == ControlPointType.northFloor || controlPointType == ControlPointType.floor;
}

public boolean isSouthFloor() {
return controlPointType == ControlPointType.southFloor || controlPointType == ControlPointType.floor;
}

public boolean isEastFloor() {
return controlPointType == ControlPointType.eastFloor || controlPointType == ControlPointType.floor;
}

public boolean isWestFloor() {
return controlPointType == ControlPointType.westFloor || controlPointType == ControlPointType.floor;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.interrupt.dungeoneer.editor;

import com.interrupt.dungeoneer.tiles.Tile;

public class ControlPointVertex {
public Tile tile;
public ControlVertex vertex = ControlVertex.slopeNE;

public enum ControlVertex { slopeNW, slopeNE, slopeSW, slopeSE, ceilNW, ceilNE, ceilSW, ceilSE }

public ControlPointVertex(Tile tile, ControlVertex vertex) {
this.tile = tile;
this.vertex = vertex;
}
}
Loading