Commit Graph

21 Commits

Author SHA1 Message Date
Finlay Davidson
7f45538eb5 Apply clang-format to all C++ files 2022-06-05 09:15:46 +03:00
Reinhold Gschweicher
2e42b90009 Keep the paddle on screen in whole
As suggested in https://github.com/InfiniTimeOrg/InfiniTime/issues/1062
in point 3. The paddle should be kept on screen and not travel out of
the screen boundaries.

Co-authored-by: Riku Isokoski <riksu9000@gmail.com>
2022-04-25 15:51:51 +03:00
Riku Isokoski
68a7016080 Replace lv_label_set_text where possible 2022-04-18 19:47:42 +03:00
Reinhold Gschweicher
054a99cf6c Paddle: add a little randomization in the dy speed
To make the game a bit more challenging an less predictable add a little
bit of randomness to the `dy` value. When hitting the right wall add a random
number (one of [-1, 0, 1]) to the `dy` value.

To keep the difficulty level managable limit the dy value to be in the
range from -5 to 5.
2021-12-02 21:46:36 +01:00
Reinhold Gschweicher
ac7b2da611 Update includes to to be relative to src directory
Don't use relative imports like `../foo.h` as those depend on the
relative position of both files. Rather than that use imports relative
to the `src` directory, which explicitly is part of the include
directories.
2021-11-15 22:02:49 +01:00
Reinhold Gschweicher
7cd4929bfd Paddle: compare ballX coordinate with horizontal resolution
Fix the comment as the comparison checks if the ball is at the right
side of the screen.

Compare the x coordinate of the ball with the horizontal resolution of
the screen, instead of the vertical resolution. On the PinePhone this
does make no difference as we have square 240x240 screen. Change it
anyways to be completely correct.
2021-10-11 21:46:19 +02:00
Riku Isokoski
c2fae47391 Merge branch 'develop' into refresh_rework 2021-08-28 17:25:50 +03:00
Riku Isokoski
331fc2be69 Set remaining default periods to LV_DISP_DEF_REFR_PERIOD 2021-07-19 17:06:20 +03:00
Riku Isokoski
97c761a5c7 Refresh rework 2021-07-19 16:26:12 +03:00
Riku Isokoski
2a3e126390 Fix most issues 2021-07-16 00:07:55 +03:00
Riku Isokoski
217f16d189 Improve paddle game 2021-07-03 10:40:30 +02:00
Avamander
40d45d923b Reformatted all the files according to clang-format style 2021-04-24 11:39:53 +03:00
Joaquim
1d3742e14f Big UI and navigation Rewrite
new navigation
add some color to the apps
redesign menus
new settings menu
new quick settings
code clean up
size reduction by converting navigation images to font
and more...
2021-04-04 03:08:51 +01:00
Joaquim
a456887eff LVGL v7.10.0 2021-01-28 17:13:28 +00:00
ZephyrLabs
cc04c2c1f8 Update Paddle.cpp
blankline removal
2020-12-20 11:53:39 +05:30
ZephyrLabs
61e78d338b Update Paddle.cpp
fix uppercase
2020-12-20 09:32:00 +05:30
ZephyrLabs
b098d27d08 Update Paddle.cpp
tranparent paddle bug fix.
2020-12-20 09:23:31 +05:30
ZephyrLabs
ea4d2560cf Update Paddle.cpp
added changes from PR
2020-12-08 10:06:30 +05:30
ZephyrLabs
418d857308 Update Paddle.cpp
bugfix: add missing class
2020-12-03 20:59:22 +05:30
ZephyrLabs
4f41d4d854 Update Paddle.cpp
create Paddle.cpp
2020-12-03 20:03:11 +05:30
ZephyrLabs
1d69c79942 Addition of new files in MakeList
added Paddle.cpp and Paddle.h
2020-12-03 19:46:36 +05:30