Tommy
d58829e129
sdl/rect: Add pos() and size() returning points {x,y} and {w,h}
2022-07-21 12:16:04 +12:00
Tommy
2da7515722
sdl/window: add set_logical_size(point)
...
Also changed get_logical_size to return point not SDL_Point.
2022-07-21 12:16:04 +12:00
Tommy
eae182ba80
draw_manager: Make TLD removal more robust
...
TLDs can now be deregistered or raised during TLD iteration.
Also removed an explicit deregister of the loading screen, which
appears to no longer be necessary.
2022-07-21 12:16:04 +12:00
Tommy
8633120f08
Add update() function to top_level_drawable, run before layout()
...
This is mostly good for updating things that may change layout,
such as motion animations. However it can be useful for other things.
2022-07-21 12:16:04 +12:00
Tommy
5e54f2eca3
draw_manager: Just raise TLD on redundant reregistration
2022-07-21 12:16:04 +12:00
Tommy
afa2abb667
display: Allow using chained setters to manage blit helpers
...
For example `drawing_buffer_add(...).set_alpha(128).set_hflip(true);`
2022-07-21 12:16:04 +12:00
Tommy
3b12a5043f
sdl/rect: Add shift(point) to shift a rect to a relative position
2022-07-21 12:16:04 +12:00
Tommy
163c6e3949
Add a single-white-pixel PNG, for hardware stretching
...
It can be used to draw rectangles and lines, particularly when
passed via drawing_buffer_add as this only supports rendering
textures, not other drawing operations.
It can be loaded as "misc/single-pixel.png".
2022-07-21 12:16:04 +12:00
Pentarctagon
62d4bd001a
3942 was reopened.
2022-07-20 09:04:42 -05:00
newfrenchy83
0bfb384887
Update codeblocks project files for gcc11
2022-07-20 11:39:50 +02:00
Tommy
c2ab49b887
Catch a few more missed logging newlines
...
Mostly with a space before the trailing newline.
2022-07-20 15:20:57 +12:00
Tommy
bd8efdffec
Remove some now-unnecessary usages of std::flush
2022-07-20 15:20:57 +12:00
Tommy
9e15bae76c
Fix broken unit test
...
This log definition really shouldn't work. It seems to rely on log
timestamps being globally disabled during tests. However that's what
it was set up to do, so i am not changing it more than necessary.
2022-07-20 15:20:57 +12:00
Tommy
ba24612f73
Remove trailing newlines from multiline log messages
2022-07-20 15:20:57 +12:00
Tommy
a02709e0ff
Remove \n from log lines with it as suffix on the final string
2022-07-20 15:20:57 +12:00
Tommy
1fe87c4e24
Remove "<< '\n';" from log lines
2022-07-20 15:20:57 +12:00
Tommy
6ace55e063
Remove << "\n";
from log lines
2022-07-20 15:20:57 +12:00
Tommy
1c25ebdfa2
Remove std::endl from log lines, now that it's added automatically
2022-07-20 15:20:57 +12:00
Tommy
6a1cda1f28
Remove newline from PLAIN_LOG entries, or use STREAMING_LOG
2022-07-20 15:20:57 +12:00
Tommy
63185a9609
log: Automatically add newlines to log entries
...
I also added a STREAMING_LOG logger, which is equivalent to PLAIN_LOG
except that it does not add the newline at the end.
Other loggers reprint the timestamp every time, so eliding the newline
was never useful for them anyway.
2022-07-20 15:20:57 +12:00
Pentarctagon
78764ccd58
1.17.6+dev
2022-07-19 19:31:18 -05:00
Pentarctagon
ab8fe65b83
1.17.6
1.17.6
2022-07-19 19:30:24 -05:00
Pentarctagon
765681335a
pot-update and regenerate doc files
2022-07-19 19:26:27 -05:00
Celtic Minstrel
306e6b95fc
Fix assertion when opening the gamestate inspector while disabled events haven't been cleaned up ( #6884 )
...
Fixes #3257
2022-07-19 13:48:03 -04:00
Luis Miguel Iglesias Sánchez
1ab5abb370
Remove command prefixes on commandline ( #6421 )
2022-07-19 19:04:34 +02:00
Gunter Labes
1a49e91b0a
Schema: Use correct type
2022-07-19 15:35:18 +02:00
Gunter Labes
7c021b73cb
Schema: Add missing modify_unit_type keys
2022-07-19 15:22:36 +02:00
Steve Cotton
2e28ed4617
Schema: the [fire_event][data] tag is optional
...
Fixup for 715cf386.
2022-07-19 13:09:29 +02:00
Gunter Labes
2e87731e97
Clean up build options table
2022-07-19 13:02:57 +02:00
Iris Morelle
657818758d
campaignd: Drop removed pbl attributes on upload if applicable
...
Closes #6284 .
2022-07-19 08:45:51 +02:00
Iris Morelle
c11d0365f3
config: Add copy_or_remove_attributes()
...
Unlike copy_attributes(), this erases attributes in the destination that
don't exist in the source.
2022-07-19 08:42:40 +02:00
Celtic Minstrel
0923a67d9b
Update changelog
2022-07-19 02:22:48 -04:00
Celtic Minstrel
22ad4d7137
A few missing details in wesnoth.game_events.add LuaDoc
2022-07-19 02:10:29 -04:00
Celtic Minstrel
715cf3864e
Add missing tag in the schema
2022-07-19 02:10:02 -04:00
Celtic Minstrel
5001999e0b
Some cleanup of the events API
...
- Add default name for wesnoth.game_events.add when it's a menu item
- Add error message when both ID and name are empty
2022-07-18 21:56:42 -04:00
Celtic Minstrel
81d56508c7
Support {filter_type = "variable_path"}
...
This creates a filter that's read dynamically from the specified WML variable.
2022-07-18 21:56:42 -04:00
Celtic Minstrel
d1f846d9da
Support "formula" in the filter table
...
Although it's already possible to pass {formula = "whatever"},
this change allows mixing that with the simplified syntax,
such as {formula = "whatever", side = {side = 3}}
2022-07-18 21:56:42 -04:00
Celtic Minstrel
a0fbb87677
Fix WML errors showing as Lua errors
2022-07-18 21:56:42 -04:00
Celtic Minstrel
7e234f8833
Replace deprecated usages of on_event()
2022-07-18 21:56:42 -04:00
Celtic Minstrel
501936affb
Support primary_attack and secondary_attack in wesnoth.game_events.fire
...
These are taken as synonyms of the actual internal tag names, [first] and [second]. So, first is interchangeable with primary_attack and second is interchangeable with secondary_attack.
2022-07-18 21:56:42 -04:00
Celtic Minstrel
8eb7a70a63
Add luadoc for the new event functions
2022-07-18 21:56:42 -04:00
Celtic Minstrel
72249b1bb3
Fix non-serializable events being serialized as an empty [event] tag
2022-07-18 21:56:42 -04:00
Celtic Minstrel
865eface07
Include non-serializable events in the gamestate inspector
...
Since they're non-serializable, the code can't be shown, but the fact that unspecified Lua code is present will be shown.
2022-07-18 21:56:42 -04:00
Celtic Minstrel
5a184bbb40
Split wesnoth.game_events.add into multiple functions
...
Basically this means each of the call modes of the old function is now a separate function.
- add_repeating and add_menu take an ID and a function
- add_wml takes variable substitution setting and a config
- add takes the full options table
2022-07-18 21:56:42 -04:00
Celtic Minstrel
59c5d5ba66
Fix dynamic filters behaviour change
2022-07-18 21:56:42 -04:00
Celtic Minstrel
42889232ea
Update schema for the new [event] options
2022-07-18 21:56:42 -04:00
Celtic Minstrel
19c62a083e
Update [remove_event] to use new API
2022-07-18 21:56:42 -04:00
Celtic Minstrel
8a72206f02
Unit tests for the new filter options
2022-07-18 21:56:42 -04:00
Celtic Minstrel
245cd57d24
Unit tests for each way of assigning an action to an event handler
2022-07-18 21:56:42 -04:00
Celtic Minstrel
d03116f829
Adding an event handler via the positional call style now defaults to a repeating event
...
This is a somewhat controversial change!
PROS:
- This makes wesnoth.game_events.add a drop-in replacement for the on_event function
- If you're registering events in preload, most of them WILL be repeating events
CONS:
- This makes the default depend on the call style; in positional style, it defaults to repeating, and in named-argument style, it defaults to non-repeating
- This makes the default different from the WML default of non-repeating events
2022-07-18 21:56:42 -04:00