Andreas Kling
e83390387c
LibGUI: Simplify GCommonActions a bit
...
Use the same callback signature as GAction so we can just forward it
to GAction instead of chaining callbacks.
2019-09-14 22:10:44 +02:00
rhin123
3261ffb2fd
Snake: Added GCommonActions
2019-09-05 09:40:54 +02:00
Andreas Kling
227bfd79d3
Snake: Merge "Game" menu into the app menu
2019-08-27 13:25:08 +02:00
Andreas Kling
841b2e5d13
WindowServer+LibGUI: Pass window icons as shared buffers rather than paths.
...
Now that we support more than 2 clients per shared buffer, we can use them
for window icons. I didn't do that previously since it would have made the
Taskbar process unable to access the icons.
This opens up some nice possibilities for programmatically generated icons.
2019-07-28 10:18:49 +02:00
Andreas Kling
72a3f69df7
LibGUI: Get rid of GWindow::should_exit_event_loop_on_close().
...
This behavior and API was extremely counter-intuitive since our default
behavior was for applications to never exit after you close all of their
windows.
Now that we exit the event loop by default when the very last GWindow is
deleted, we don't have to worry about this.
2019-07-23 18:20:00 +02:00
Andreas Kling
1c0669f010
LibDraw: Introduce (formerly known as SharedGraphics.)
...
Instead of LibGUI and WindowServer building their own copies of the drawing
and graphics code, let's it in a separate LibDraw library.
This avoids building the code twice, and will encourage better separation
of concerns. :^)
2019-07-18 10:18:16 +02:00
VAN BOSSUYT Nicolas
802d4dcb6b
Meta: Removed all gitignore in the source tree only keeping the root one
2019-06-30 10:41:26 +02:00
Andreas Kling
d403e56494
Snake: Use NonnullRefPtrVector.
2019-06-27 13:46:31 +02:00
Andreas Kling
90b1354688
AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr.
2019-06-21 18:37:47 +02:00
Andreas Kling
fba2c971e7
Games: Run clang-format on everything.
2019-06-07 11:48:15 +02:00
Robin Burchell
0dc9af5f7e
Add clang-format file
...
Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
2019-05-28 17:31:20 +02:00
Andreas Kling
852d648912
Fix "make clean" not deleting app binaries.
2019-05-13 14:56:18 +02:00
Andreas Kling
08bc5d44e7
Games: Use Makefile.common here too.
2019-04-26 15:14:28 +02:00
Andreas Kling
b3f7f5436a
Snake+Minesweeper: Exit process when game window is closed.
2019-04-21 04:11:29 +02:00
Andreas Kling
a56e1afb64
Snake: Show the highest score achieved so far (in this session.)
2019-04-20 21:24:38 +02:00
Andreas Kling
a0633c298b
Snake: Add a window icon. :^)
2019-04-20 20:14:02 +02:00
Andreas Kling
ca9a430965
Snake: Disable double-buffering for the game window.
...
There's no need to use automatic double-buffering here since we manage the
backing store manually.
2019-04-20 19:51:10 +02:00
Andreas Kling
c9b86be1cc
Snake: Add some more fruit types.
2019-04-20 18:50:41 +02:00
Andreas Kling
4619019481
Snake: Tweak game speed so it's not too easy.
2019-04-20 17:46:59 +02:00
Andreas Kling
79573ce7e6
Snake: Try to only repaint the parts that actually changed between ticks.
2019-04-20 15:04:34 +02:00
Andreas Kling
301a269ca0
Get rid of SERENITY macro since the compiler already defines __serenity__
...
This makes it a bit easier to use AK templates out-of-tree.
2019-04-20 12:58:49 +02:00
Andreas Kling
6ef8e2df5a
Snake: Use a vegetable icon for the fruit.
2019-04-20 04:00:32 +02:00
Andreas Kling
09c087177c
Snake: Clear the movement queue on game reset.
2019-04-20 03:47:35 +02:00
Andreas Kling
b41e95b578
Snake: Use a queue for the movement inputs.
...
This makes it a lot less finicky to make rapid moves like staircasing and
sudden turns.
2019-04-20 03:44:56 +02:00
Andreas Kling
e24e486714
Snake: Flesh out a basic snake game :^)
2019-04-20 03:24:50 +02:00
Andreas Kling
eca9494adf
Snake: Import skeleton of a new snake game.
2019-04-20 01:54:10 +02:00