Instead of computing the grabbable areas on the fly in mouse event
handlers, we now figure out which parts of the splitter are grabbable
when something moves around, and then remember it.
This makes the code a lot easier to follow.
This removes `constexpr` from the interpolate method in Color.h and adds
`noexcept`. The roundf call cannot be constexpr on clang. This is the
only incompatibility preventing serenity from building under clang. I
tested this on OSX Big Sur 11.3 and 11.3.1, and everything works with
this change.
Since the introduction of multi-select, we have had both `on_selection`
and `on_selection_change`, the latter of which was only invoked when a
change in selection came in through the model.
This removes `AbstractView::on_selection` and replaces it usage with
the more explicit `on_selection_change` everywhere.
Models that contain UV co-ordinates are now supported,
and will display with a texture wrapped around it, provided
a `bmp` with the same name as the object is in the same
directory as the 3D Model.
The software rasterizer now samples a texture passed to us from the
GL context. This is currently a bit of a hack, as we should be
scanning from a list of texture units and checking if they are
enabled. For now, this at least gives some visual confirmation
that texturing is working as it should
There is some really wild stuff going on in the OpenGL spec for this..
The Khronos website states that GLsizei is a 32-bit non-negative value
used for sizes, however, some functions such as `glGenTextures` state
that the input `n` could be negative, which implies signage. Most other
implementations of `gl.h` seem to `typedef` this to `int` so we should
too.
Instead of being its own separate unrelated class.
This automatically makes typed array properties available to it,
as well as making it available to the runtime.
This allows the JS side to access the wasm memory, assuming it's
exported by the module.
This can be used to draw stuff on the wasm side and display them from
the js side, for example :^)
This impl is *extremely* simple, and is missing a lot of things, it's
also not particularly spec-compliant in some places, but it's definitely
a start :^)
This replaces the two sloppy copies of the load() function with a
cleaned up implementation:
- Only use the first argument, to load multiple files just call the
function multiple times
- Fix a crash when using any non-string argument
- Throw an error if the file can't be opened instead of logging to
stderr
- Don't use parse_and_run(), which would print the AST of the loaded
file when using -A, for example - it's used either way as the entry
point in both REPL and non-REPL mode, so we already get exception
handling and all that
Previously TCPSocket::send_tcp_packet() would try to send TCP packets
which matched whatever size the userspace program specified. We'd try to
break those packets up into smaller fragments, however a much better
approach is to limit TCP packets to the maximum segment size and
avoid fragmentation altogether.
Right now Socket::send() assumes that it can send everything in one
go. However, send() is allowed to do partial writes and while that
can't happen at the moment there's nothing that says this can't
happen in the future (like in the next commit).
Currently, the player loses 100 points each time the waste stack is
recycled. In three-card draw mode, it's standard to only lose 20 points
after the third recycle event.
This invocation will exit immediately. There's also no reason to invoke
stop_game_over_animation here because that's the first thing that will
happen in the call to setup.
When an animation is stopped the cards should be moved to their final
position anyway. Otherwise they might end up getting stuck in the
middle of the animation.
This changes the game so that more than one hand can be played. Once
one player has 100 or more points the game ends. A score card is shown
between each hand.
Fixes#7374.