Robert Müller
95550fd6a9
Move CRenderTools::DrawUIRect/4
to CUIRect::Draw/4
...
Use `ColorRGBA` instead of `vec4` for `Draw4`.
2022-08-12 19:37:08 +02:00
Robert Müller
7b20009980
Move CUI::CORNER_*
enum to IGraphics::CORNER_*
...
Entirely automatic replacement in preparation for moving rect drawing methods from `CRenderTools` to `IGraphics`.
2022-08-12 17:42:04 +02:00
Fireball
5bf7f60bf6
Parallax Zoom: Add default zoom option to the editor
...
Safe defaults for map editing: unless opted-in, Parallax Zoom
will default to maximum(parallax{x,y}).
2022-08-06 01:31:42 +01:00
Fireball
a90c86e9a5
Parallax-aware zoom
...
How this works: parallax values configure perceived distance from camera
when it's moving along x and y axes. Assume that zoom is moving the
camera away and scale layers accordingly, with background layers
(furtherst away) changing the least.
New per-ItemGroup (LayerGroup) setting allows to set the new parallax
value independently from the other two. This can be used to do tricks
like on Time Shop zoom correctly or make it feel like the camera is
changing the field of view at the same time as moving in space.
2022-08-05 00:40:58 +01:00
Robert Müller
1d6dca8c24
Fix accesses to vector with index -1 by adding static button IDs
2022-07-31 13:13:53 +02:00
Robert Müller
344e50f76f
Remove dead code
2022-07-31 13:10:03 +02:00
Chairn
a69dc599a9
Huge variable naming format
...
Fix pointer and pointer array variable naming
Huge renaming to match our rules
Used regex: (?!(return|delete)\b)\b\w+ (m_|ms_|g_|gs_|s_)[^a]\w+\[
(?!(return|delete)\b)\b\w+ (?!(m_|ms_|g_|gs_|s_))[^a]\w+\[
Further format static variables
Format almost all pointer names accordingly
Used regex: (?!(return)\b)\b\w+
\*(?!(m_p|p|s_p|m_ap|s_ap|g_p|g_ap|ap|gs_ap|ms_ap|gs_p|ms_p))\w+\b[^:\(p]
clang-format
Fix CI fail
Fix misnamed non pointer as pointer and non array as array
Used regex: (?!(return|delete)\b)\b\w+ (m_|ms_|g_|gs_|s_)p\w+\b
(?!return\b)\b\w+ (ms_|m_|g_|gs_|s_)a\w+\b[^\[]
clang-format
Revert to SCREAMING_SNAKE_CASE and reinstate dead code
2022-07-08 18:01:29 +02:00
Chairn
c9345e7d32
More vector naming format
2022-06-15 19:37:37 +02:00
ChillerDragon
3667061b68
Use nullptr in generated and editor
...
-Wzero-as-null-pointer-constant
2022-06-13 18:28:13 +02:00
Robert Müller
ffff4435c4
Remove ui_scale
:
...
- remove config variable `ui_scale`
- remove `CUI::Scale`
- remove `CUI::SetScale`
- remove `CUI::DoLabelScaled`
- remove `CUIRect::Scale`
- use `CUI::DoLabel` instead of `CUI::DoLabelScaled`
- remove usages of `CUI::Scale()` and `CUIRect::Scale()`, or use 1.0f instead
2022-06-12 10:40:19 +02:00
Chairn
01edaec628
Format vector variables names ( fixes #5209 )
2022-06-11 21:38:49 +02:00
Robert Müller
91d2ba1865
Organize game-client includes
2022-05-29 21:24:43 +02:00
bors[bot]
ccf0622984
Merge #5252
...
5252: Use std::vector instead of array, remove base/tl/array.h, algorithm.h, allocator.h, range.h r=def- a=Robyt3
Replaces all usages of `array` with `std::vector`.
I adjusted variable names of variables I changed to use the `v` prefix. Not so in the editor however, as there are already many changes due to clang-tidy enforcing the use of for-each loops.
This allows us to remove all remaining `base/tl` headers except `threading.h`.
Clang-tidy now finds `clang-analyzer-cplusplus.NewDelete` (Use of memory after it is freed), which is also fixed here, though it appears to be a false-positive.
This last remaining usages of `goto` are also removed.
## Checklist
- [X] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck ) (optional)
Co-authored-by: Robert Müller <robytemueller@gmail.com>
2022-05-28 10:56:21 +00:00
Robert Müller
0c69495522
Use std::vector instead of array in editor
2022-05-27 16:36:39 +02:00
Robert Müller
b9c52f7e31
Use SetActiveItem(nullptr) instead of SetActiveItem(0)
2022-05-27 11:59:14 +02:00
Robert Müller
2b02bd449b
Prevent lock of UI
...
Co-authored-by: oy <tom_adams@web.de>
2022-05-27 11:53:05 +02:00
Dennis Felsing
843acf6a5a
Use std::size instead of sizeof(a) / sizeof(a[0])
2022-03-30 18:55:04 +02:00
Jupeyy
14ac5cf297
lazy load editor textures
...
improve entities texture flags
2022-03-20 18:03:33 +01:00
def
8134f9fa55
Enable -Wshadow=local
...
> Warn when a local variable shadows another local variable or parameter.
Found one actual bug in graphics_threaded.cpp
Should reduce confusion in the future when reading source code
2022-03-20 13:24:34 +01:00
Jupeyy
95fe457abb
Auto font size
2022-03-11 17:34:48 +01:00
Ravie
2745c1a694
Knife tool
2022-02-26 18:49:06 +01:00
def
94272f82c7
Add more readability checks
2022-01-22 17:45:25 +01:00
ChillerDragon
b770bc6988
Use ETextAlignment enum for UI
...
Replaces the magic numbers -1/0/1 for left/center/right
Based on the work done in upstream:
@cinaera added alignment enums
04ee8b20a1
@TsFreddie renamed them
67651e8122
2022-01-21 16:26:19 +01:00
Wohoo
68a8bbadbc
clang-format fix
2022-01-08 12:30:51 +01:00
Wohoo
2017464282
Livefreeze implementation with CHARACTERFLAG_NO_MOVEMENTS flag.
...
Freeze and Unfreeze tiles added to switch layer too.
2022-01-07 16:53:40 +01:00
def
8625487292
Support enter and escape in editor when confirming save
2021-12-23 11:50:45 +01:00
Robert Müller
2fe5464938
remove delegate functions in CMenus, fix variable names
2021-12-03 20:26:26 +01:00
Robert Müller
d948a1e41f
fix variable name
2021-12-03 20:26:21 +01:00
Robert Müller
053981ee4c
refactor UI scrollbars
2021-11-26 23:03:45 +01:00
def
b4b9016cf4
Fix enter behavior when creating new folder in editor
...
As reported by louis:
> pressing enter while creating a new folder in the editor (while using
> "save as") does not create the folder but instead enters the selected
> folder in the background
2021-11-22 18:12:32 +01:00
oy
9e17281573
invalidate texture when unloading a texture.
...
Closes https://github.com/teeworlds/teeworlds/issues/1450
(cherry picked from commit 23a1b80f60
)
2021-09-13 13:23:00 +02:00
def
165857a5a8
Fix variable names manually
2020-11-02 22:40:40 +01:00
def
b1f0fd8969
Enable modernize-loop-convert clang-tidy check
...
and run clang-format afterwards
https://clang.llvm.org/extra/clang-tidy/checks/modernize-loop-convert.html
2020-11-02 22:40:24 +01:00
def
343e48248e
Editor: Fix selection of None value in auto rules ( fixes #3013 )
...
by starting the indexing at 0
2020-10-18 00:33:04 +02:00
def
5c1b8cd221
Fix clang-analyzer-deadcode.DeadStores
...
/media/ddnet/src/game/client/components/statboard.cpp:288:3: warning: Value stored to 'tw' is never read [clang-analyzer-deadcode.DeadStores]
2020-10-14 15:45:47 +02:00
Edgar
5391ff8cc9
fix auto rules scrollbar bugs
2020-09-27 17:20:41 +02:00
def
3be8a592e5
Run clang-format
...
Purely automatic change. In case of conflict with this change, apply the
other change and rerun the formatting to restore it:
$ python scripts/fix_style.py
2020-09-26 21:50:15 +02:00
bors[bot]
7000987ff5
Merge #2884
...
2884: Add scrollbar to auto rules list, fixes #2514 r=def- a=edg-l
![image](https://user-images.githubusercontent.com/15859336/93710826-afde7e80-fb49-11ea-9754-c44c79d5ff94.png )
It doesn't show a scrollbar when there aren't more than 5 rules.
Co-authored-by: Edgar <git@edgarluque.com>
2020-09-24 17:01:19 +00:00
Edgar
76f3dbfe64
fix scrolling triggering zoom
2020-09-24 18:52:31 +02:00
Edgar
af29d8da99
remove unnecessary condition
2020-09-24 18:09:35 +02:00
Jupeyy
84cad658d6
Add new renderer(as streamed vertices) for editor
2020-09-23 16:45:32 +02:00
bors[bot]
4875b0993a
Merge #2907
...
2907: properly set sound envelope offsets for sound sources r=def- a=Patiga
before, `m_SoundEnvOffset` was always set to the same value as `m_PosEnvOffset`, due to wrong behavior in the ui.
Co-authored-by: patiga <patigatus21@gmail.com>
2020-09-22 14:17:21 +00:00
patiga
b437526925
run fix_style script
2020-09-22 15:42:20 +02:00
patiga
2ef344ea1a
set the correct variable
2020-09-22 14:50:04 +02:00
Learath
bbdcb7035d
Style
2020-09-22 15:47:21 +03:00
Learath
586043fc64
Use fixed point conversion consistently
2020-09-22 15:29:16 +03:00
Edgar
9cdaba88dc
fix style
2020-09-20 14:08:27 +02:00
Edgar
ffade19e19
don't show scrollbar if not needed on auto rules
2020-09-20 14:01:28 +02:00
Edgar
2587328aa4
add scrollbar to auto rules list, fixes #2514
2020-09-20 13:52:38 +02:00
Fireball
bb2be60a08
Ask for confirmation before placing border tiles ( fixes #2823 )
2020-09-20 01:42:07 +01:00
Jupeyy
a1eb5dc114
Max images(for editor, clamp for client and warning for mapconvert) ( fixes #2148 )
2020-09-19 21:22:21 +02:00
def
433881824a
Only make Esc key leave editor when no popup is open
2020-09-15 21:57:09 +02:00
Andrii
5ef0270cd2
Fix map details layout
2020-09-02 18:28:28 +03:00
def
b718282def
Add warning for editor as well
2020-08-31 15:08:04 +02:00
def
c99d791f4b
Add warning in editor for image widths
2020-06-21 01:14:36 +02:00
Andrii
e1828b88ab
fix more format failures
2020-05-21 00:44:41 +02:00
Andrii
4f62389eda
follow naming convention
2020-05-21 00:44:41 +02:00
Andrii
1ae3d5e69c
add key binding description to find empty slot button
2020-05-21 00:44:41 +02:00
Andrii
e132fac612
hide Entities popup after item selected
2020-05-21 00:44:41 +02:00
Andrii
29f093841c
add switch empty slot finder button
2020-05-21 00:44:41 +02:00
Andrii
192d118c85
add binding for teleFindEmpty button
2020-05-21 00:44:41 +02:00
Andrii
1c870a3e1b
fix some tele number picker issues
2020-05-21 00:44:41 +02:00
Andrii
0f1af41911
add binding for tele/switch/speedup/tune button
2020-05-21 00:44:41 +02:00
Learath
d2498f257c
Stateful editing
2020-02-28 18:25:27 +03:00
Learath
f679fbfbc5
Allow editing multiple tile layer props
2020-02-27 16:53:12 +03:00
Learath
2abe4fbcfb
Display envelope name
2020-01-23 20:27:01 +01:00
bors[bot]
33d88f647c
Merge #1974
...
1974: more typesafty in the graphics. introduced the IGraphics::CTextureHandle r=def- a=ChillerDragon
Edited by @ChillerDragon to fit in ddnet
(cherry picked from commit cb95e8dfe8
)
Co-authored-by: Magnus Auvinen <magnus.auvinen@gmail.com>
2019-11-27 17:55:45 +00:00
Magnus Auvinen
6a6a5f00c9
more typesafty in the graphics. introduced the IGraphics::CTextureHandle
...
Edited by @ChillerDragon to fit in ddnet
(cherry picked from commit cb95e8dfe8
)
2019-11-22 18:08:37 +01:00
ChillerDragon
227a223c32
Fix a few names in popups
2019-11-22 12:28:34 +01:00
Learath
15058330fa
Don't inherit from vector, more cleanup
2019-04-27 00:47:34 +03:00
Learath
93d14a1eca
Inconvenience for windows
2019-04-26 22:36:49 +03:00
Learath
65a17599e1
Add ColorHSVA, phase out more vec3's
2019-04-26 15:06:32 +03:00
Dennis Felsing
cde07b420b
Implement changes suggested by -Wuseless-cast
...
But don't enable it yet because I'm not sure what the best way is.
2019-04-11 19:54:43 +02:00
Bojidar Marinov
6ca6fce0b2
Allow editing texture UV offsets in Quad properties.
...
Manual cherrypick of de82ad7a26
, original code by @cinaera
2019-03-29 13:38:21 +02:00
12pm
2daafdaad5
Disable unused tiles only for DDNet entities
2019-02-08 04:04:41 +01:00
Dennis Felsing
f82ab4cb21
Fix editor crash (reported in #1425 )
2019-01-09 08:38:49 +01:00
Bojidar Marinov
823e4ee0f3
Save automapper config as external-typed mapitem
2018-10-09 13:17:05 +03:00
Bojidar Marinov
c52a3c970e
Add option to automatically run the automapper
...
Also, put automapping config selection seperatelly from the automapper button.
Also, add seed parameter to the automapper.
2018-10-09 12:56:48 +03:00
Tim Schumacher
ab6f344daa
Fix current selection highlighting
2018-10-02 23:39:22 +02:00
Tim Schumacher
fd52bc7a26
List all game layer entities images in directory
2018-10-02 23:08:17 +02:00
Tim Schumacher
bee694a8cb
Forgot to remove debug
2018-10-01 23:10:46 +02:00
Tim Schumacher
2e36ad67bb
Allow choosing game layer entities for different gametypes, closes #1283
2018-10-01 23:05:36 +02:00
Aerll
f79bf5d03b
selecting multiple quads
2018-08-13 11:11:56 +02:00
Bojidar Marinov
aa091bb8f7
Allow multiple layers to be selected and edited at the same time.
2018-07-25 23:57:58 +03:00
yangfl
1620fc9b0f
Fix typo
2018-02-07 16:10:40 +08:00
Learath2
09552a6d9f
Get rid of trailing whitespaces
2017-02-21 19:11:43 +03:00
BannZay
c6e7ad5e45
map details button name fix
2016-11-27 20:55:05 +02:00
BannZay
c658411f15
Load Current Map button added
2016-08-23 14:29:53 +03:00
Andrew
e6eb607cc8
PROPTYPE_ANGLE_SCROLL mixed
2016-06-02 17:53:52 +03:00
def
475df14134
Fix editor popups a bit
2016-05-14 15:16:52 +02:00
Tim Schumacher
afd0e5a3eb
rename some auto game tile placers
2016-05-05 18:23:04 +02:00
gamertyp
7a3f96431a
Re-ordered the Gametiles-menu
2016-05-04 22:30:16 +02:00
Tim Schumacher
aeea3777a3
show button to mapper when placing unused tiles
2016-05-01 18:12:20 +02:00
Tim Schumacher
e61456f381
added auto game tile placer for hookthrough
2016-05-01 17:44:02 +02:00
def
4761608329
Input fixes from TW master for mouse wheel
2016-04-30 20:11:26 +02:00
def
618dc9a6b0
Alert if layer size too big in editor (thanks to Lady Saavik, fixes #404 )
2016-04-27 17:49:14 +02:00
def
b5aca60662
Fix mouse hang with editor popup, value selector and escape ( fixes #290 )
2015-08-22 20:22:23 +02:00
def
db2256e827
Fix a few whitespace-at-end-of-file issues
2015-08-22 15:27:41 +02:00
BeaR
6b0d2b9b9a
Fix hue picker scaling
2015-08-17 20:19:27 +02:00
BeaR
a4cfc10898
Implement an HSV picker for color of quad points
2015-08-17 20:14:23 +02:00
def
6e8ada1ac8
Fix whitespaces a bit
2015-07-09 02:12:35 +02:00
def
f5d31b595c
Editor: Scroll Speedup angles by 45° (finer with shift)
2015-07-08 13:55:02 +02:00
def
d846583ba7
Make a few value selectors in editor wrap around
2015-06-28 16:17:23 +02:00
def
aaaf0cdaeb
Don't create too many popups
2015-05-31 17:34:01 +02:00
def
6d54de89b6
Get rid of clang static analyzer warnings
2015-04-19 00:31:45 +02:00
def
158ba846fa
Merge branch 'DDRace64' of github.com:def-/ddnet into DDRace64
2014-12-01 20:35:52 +01:00
def
49f6f2dff2
Fix some editor popup
2014-12-01 20:35:30 +01:00
Dennis Felsing
598c6c9968
Merge pull request #111 from cinaera/pr_pan
...
Add option to enable/disable panning per voice
2014-11-30 13:26:01 +01:00
BeaR
186de4e08e
Add option to enable/disable panning per voice
2014-11-30 12:23:05 +01:00
BeaR
5f4067c483
Check array boundary for shape type
2014-11-30 11:33:44 +01:00
BeaR
98d42adf9d
Implement sound logic for shaped sounds, fix rectangle height property in editor and submit voice shape information to audio interface
2014-11-29 14:29:40 +01:00
BeaR
485aa4ce54
Add editor properties for rectangle shaped sources and visualize falloff distance
2014-11-29 13:20:04 +01:00
BeaR
fbcd560eb0
Working on adding editor UI support for sound shapes
2014-11-28 20:25:43 +01:00
BeaR
9996751161
Remove deprecated falloff distance
2014-11-28 19:21:59 +01:00
BeaR
1e42136f5d
Fix wrong memory allocation and sound selection
2014-10-23 12:19:26 +02:00
def
0b2bf15c35
Clean up compiler warnings
2014-10-19 13:19:36 +02:00
BeaR
b67fab8fdb
Fix parallax scrolling for audio sources and remove global property
2014-10-18 18:41:58 +02:00
BeaR
920ac531aa
Add support for position envelopes to sound sources
2014-10-18 18:41:55 +02:00
BeaR
0a70d49566
Remove distance from envelopes, add falloff distance to source properties and render it in the editor
2014-10-18 18:41:55 +02:00
BeaR
655c2466b9
Start adding a sound envelope
2014-10-18 18:41:54 +02:00
BeaR
dd35d2be84
Add editor support for editing sound source properties
2014-10-18 18:41:52 +02:00
BeaR
d968b42f2f
Add support for sound layers
2014-10-18 18:41:51 +02:00
def
51c508192a
Negative clipping width and height make no sense
2014-08-31 15:24:19 +02:00
def
e3b94ead93
Editor: Show all images to choose from, no matter how many
2014-06-12 01:09:02 +02:00
def
0a49301eea
New editor feature: Show if tele and switch numbers are used already
2014-05-17 17:19:48 +02:00
def
0bceef9903
Make larger image selection popups show fully on screen (Thanks to Obst)
2014-05-12 10:41:41 +02:00
HMH
655546c4d3
added creating button for tunelayer and a popup menu for TuneZone Numbers
2014-03-23 17:10:48 +01:00
def
92ba863ff0
Automatic conversion of tiles to checkpoint teleports
2014-02-12 21:44:05 +01:00
def
3eaad43b6b
Merge remote-tracking branch 'upstream-teeworlds/0.6' into DDRace
...
Conflicts:
bam.lua
data/languages/index.txt
src/engine/server/server.cpp
src/engine/shared/network_server.cpp
src/game/client/components/chat.cpp
src/game/client/components/menus_settings.cpp
src/game/server/entities/character.cpp
src/game/server/gamecontext.cpp
src/game/version.h
2013-12-26 18:02:22 +01:00
Magnus Auvinen
1711be955b
fixed all the errors that the clang static analayzer found
2013-02-24 17:58:34 +01:00
GreYFoX
cd4ba53bae
Merge branch 'master' of git://github.com/teeworlds/teeworlds into DDRace
...
Conflicts:
bam.lua
scripts/build.py
scripts/make_release.py
src/engine/server.h
src/game/client/gameclient.cpp
src/game/server/gamecontext.cpp
src/game/server/gamecontext.h
src/game/server/gamecontroller.cpp
src/game/server/gamecontroller.h
src/game/server/player.cpp
src/game/version.h
2012-04-12 02:09:31 +02:00
SushiTee
65f4416164
added map info
2012-01-10 23:14:24 +01:00
oy
be37147342
fixed border rendering in the editor's image preview. Closes #908
2012-01-08 01:47:53 +01:00
GreYFoX
de4a95c5d2
Merge branch 'master' of git://github.com/oy/teeworlds into DDRace0611
2011-08-20 06:50:06 +02:00
oy
c38c632d06
fixed multiple popup creation in the editor. Closes #836
2011-08-13 19:22:01 +02:00
GreYFoX
06afe36db4
Removed old hook through prediction as 0.5.2 servers are no longer compatible
...
made it possible to load old maps
Enumerated layers
2011-08-13 02:12:40 +02:00
GreYFoX
35d16bd58c
Merge branch 'master' of git://github.com/oy/teeworlds into DDRace0611
...
Conflicts:
src/engine/console.h
src/engine/server.h
src/engine/server/server.cpp
src/engine/shared/config_variables.h
src/engine/shared/console.cpp
src/engine/shared/console.h
src/engine/shared/network_server.cpp
src/game/client/components/console.cpp
src/game/client/components/console.h
src/game/client/components/menus_browser.cpp
src/game/client/gameclient.cpp
src/game/editor/editor.cpp
src/game/editor/editor.h
src/game/editor/io.cpp
src/game/editor/layer_tiles.cpp
src/game/editor/popups.cpp
src/game/gamecore.cpp
src/game/mapitems.h
src/game/server/entities/character.cpp
src/game/server/entities/laser.cpp
src/game/server/gamecontext.cpp
src/game/server/gamecontroller.cpp
src/game/server/gamecontroller.h
src/game/server/gamemodes/ctf.cpp
src/game/server/player.cpp
src/game/variables.h
2011-08-13 02:01:40 +02:00
Shereef Marzouk
c6fd4a2cc5
General whitespace and tab cleanup
2011-08-11 10:59:14 +02:00
oy
5fc5b63dac
just list the correct envelope types(colour/pos) when linking an envelope to a quad/tile layer
2011-08-06 22:30:18 +02:00
oy
003c0aa281
fixed aspect ratio in the editor's image preview. Closes #784
2011-08-06 13:08:29 +02:00
oy
6312a2d71c
fixed few things in th editor
2011-07-20 22:18:31 +02:00
SushiTee
f7a9e80163
added possibility to collapse groups by double clicking them
2011-07-15 01:03:22 +02:00
SushiTee
d78c0d66e5
ability to name groups and layers
2011-07-15 00:47:52 +02:00
oy
7bc07b613f
added auto mapping feature by LordSkelethom
2011-07-09 01:09:06 +02:00
GreYFoX
cc63cf2553
Merge branch 'master' of git://github.com/oy/teeworlds
...
Conflicts:
src/engine/external/pnglite/pnglite.c
src/engine/external/pnglite/pnglite.h
src/engine/shared/config_variables.h
src/game/client/components/menus_browser.cpp
src/game/server/entities/character.cpp
src/game/server/entities/laser.cpp
src/game/server/gamecontext.cpp
src/game/server/player.cpp
src/game/version.h
2011-05-09 18:36:13 +02:00
Choupom
0c6f187e3b
renamed editor files
2011-05-03 18:45:42 +02:00