master
Name already in use
Commits on Dec 26, 2018
-
Fix Linux build and a map editor crash (#995)
* Fix build under GCC TextureXEditor.h failed to build because unique_ptr<T> can't be used with incomplete types... or, it can, sometimes, and this seems like one of those times, but it didn't work anyway. Including the header so the type (UndoManager) is fully defined is an easy fix. Some code was passing a vector directly to EntryOperations functions that accept a vector by reference, and GCC objected. Apparently the problem is just that a non-const value will presumably be modified, which makes no sense when the value is a temporary, so making the argument a const reference fixes it. * Fix a crash when opening the map editor SImage::create resizes its buffer and uses bpp() to determine the new size, but type_ is reassigned AFTER bpp() is called, so the old value is still used. This caused a write beyond the end of the buffer when loading grayscale + alpha PNGs (in my case, thing/flag.png), which then caused malloc to abort a short time later.
Commits on Jun 19, 2016
-
Fix sector drawing bug in #542 (#548)
* Restore LOG_DEBUG in debug builds Seems DEBUG isn't actually defined in debug builds? Not sure why I thought it was. * Fix an edge case in sector building. Fixes #542 After tracing an outer edge, SectorBuilder fires out a ray from the last vertex to try to find a corresponding inner edge. Tracing continues from the first line that ray hits. If the ray hits a vertex shared by two lines, it was possible to continue tracing from the further of those two lines, which could have been the _inner_ edge of some other shape. Adding a tiebreaker, which checks the actual distance to each line, fixes this.
Commits on Apr 21, 2016
-
Fix Debuggable in release mode (fixes #497)
- I was using WXDEBUG, which only reflects whether your existing copy of wx was built in debug or release mode, rather than how SLADE itself was built. - The non-debug version of Debuggable didn't have a constructor that accepted an argument, so it didn't compile against any actual use of Debuggable.
Commits on Mar 21, 2016
Commits on Mar 19, 2016
-
-
Try not to create a sector out of an enclosed void
I regularly ran into this problem when, say, wanting to move a recessed switch from one wall to another. I would want to copy the switch sector, paste it in the void, and then rotate it. But pasting would create a sector out of the entire void, and then deleting the new sector would leave a large chunk of my map untextured. Yikes. This seems to work in simple cases, and is no worse than before in convoluted cases.
Commits on Mar 18, 2016
-
Redraw the 3D side overlay if the associated sector changes
This ensures that the height property updates in realtime.
-
Fix undoing "paste sector properties", and possibly others
It turns out that setModified needs to be called before actually doing any modifying, as that's where the backup is taken. In the case of MapSector::copy, the backup was being taken after the most notable properties had already been copied.
-
Fix status message when shift-selecting
Previously, it showed the number of objects in the box that were already selected, rather than newly selected.
-
Don't double-change a side's light level
If light levels were unlinked, and two segments of the same side were highlighted, pressing ; or ' would change the light level for that side twice.
Commits on Mar 15, 2016
-
Fix rendering of flats with both scaling and panning
Scaling applies to offsets as well, just like with walls.
Commits on Mar 2, 2016
Commits on Feb 22, 2016
-
Don't focus the special tab in the edit objects dialog
Turns out the action special panel was forcibly focusing itself in several ways. There doesn't seem to be any reason for this, since the code is only ever called when the panel is created.
-
Fix custom properties errantly being identified as bools
Problem arose when doing the following: 1. In sector mode, add a string custom property like "moreids". 2. Select a sector, click the property field, and immediately click away. 3. Switch to another mode and highlight an object so the props panel refreshes. 4. Switch back to sector mode and highlight the sector you chose. The "moreids" property will be added, but it'll be given a boolean editor field. The sector from step 2 has the custom property in its properties map, but the value is left unset -- because in C++ maps, merely trying to read a key creates a new blank value. The default type of a Property is boolean, so that sector had a boolean "moreids" with no value, and when the prop grid tried to load that sector's properties, it dutifully created a boolean field. Examining any other sector would leave the field unchanged, because the prop grid thinks it already exists. The easy fix was to just not create the field in openObjects if the object doesn't have a value set. This could be a little more robust -- zany things will still happen if a map genuinely has the same property with different types, and your "moreids" custom field won't appear again until you highlight a sector that has it. But the immediate problem is fixed.
-
Two format string problems (size_t is supposed to use %zd, which is C99/C++11, but gcc seems happy enough?), plus using -2 as a wx window id which is not allowed.
-
Improve the heuristic for guessing sprite offset type
The old heuristic checked whether the entire sprite fit within a particular box. This new one assigns a "penalty" score based on how much the graphic's offsets deviate from what the average "ideal" HUD or sprite offsets would look like. This correctly identifies every graphic in doom2.wad and chex3.wad -- before, SLADE would incorrectly guess chex3'd BLUD sprites and a couple weapon frames. At a glance it also appears to work correctly for wrw.wad, the old ZDoom weapons resource WAD, though there are just so many sprites in here that I gave up checking about halfway through.
Commits on Jan 29, 2016
-
Expand on labels for speed arguments
It seems that Boom's generalized speeds are different for different specials, so they need to be part of the argument, not hard-coded into the app. Also changed the UI for a speed argument to use a combo box, so you can see all the labeled speeds, even if not on Windows where the slider shows tick marks.
-
Add renames to removed_files in DirArchive
Previously, after renaming A to B, the next dir update check would ask about adding the "new" file on disk A.
-
Commits on Jan 8, 2016
-
Draw the thing paste preview in the right place
Actually pasting snaps the relative movement, but previewing doesn't. I already did this for lines but didn't think to check for a separate case for things.
-
Update the prop panel after switching modes
This is necessary now because there might still be a selection after a mode change, and the prop panel should reflect that selection's properties.
Commits on Jan 5, 2016
Commits on Jan 2, 2016
-
-
Fix an obscure map tracing error
If the vertex being considered happens to be directly east of one end of a candidate line, and the other end of that line is further east, the distance between them would be computed as negative. That line would therefore always become part of the sector, even if there are other much closer lines between. fabs() fixes this.
-
Add a few more Debuggable types, and make NULL MapObjects work
Calling methods on NULL is undefined behavior, but that kind of optimization is likely to be turned off while debugging.
-
Insert a space between LOG_DEBUG arguments
I'm used to this from Python, and I don't see any reason you wouldn't want it here.
-
Commits on Dec 28, 2015
-
Fix MathStuff::closestPointOnLine
I don't know why I thought this expression was equivalent to lineSide; it's completely different.
-
Hopefully fix an undo-related crash
I crashed during an undo, /while/ trying to clear the selection, because the canvas tried to read properties of an object that no longer existed. Makes more sense to just clear the selection first, I think.
Commits on Dec 20, 2015
-
-
When pasting, snap the relative movement rather than the center
This fixes awkward problems like trying to paste a 3x3 room and finding that it won't paste aligned to the grid, because the center is what snaps. The new behavior matches how regular movement works.
-
The key was correctly recognized, but it was changing panning rather than scale!
-