mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-11 16:10:26 -04:00
Doom - Mayhem Edition (#2570)
* Doom - Mini Mayhem version * Update ui_doom.cpp * Update ui_doom.cpp * Update ui_doom.cpp * Update ui_doom.cpp * Update ui_doom.cpp * Update ui_doom.cpp * Update ui_doom.cpp * Update ui_doom.cpp * Doom - Mayhem Edition Made the Doom - Mayhem Edition game. Some little bugs but good enough for nightly. * Code formatting. Forgot like always. * give more initial ammo until i put ammo around the maze to collect
This commit is contained in:
parent
4aa5fc1fbe
commit
40cf2b3f8c
8 changed files with 1397 additions and 0 deletions
42
firmware/application/external/doom/ui_doom.hpp
vendored
Normal file
42
firmware/application/external/doom/ui_doom.hpp
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* ------------------------------------------------------------
|
||||
* | Made by RocketGod |
|
||||
* | Find me at https://betaskynet.com |
|
||||
* | Argh matey! |
|
||||
* ------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef __UI_DOOM_H__
|
||||
#define __UI_DOOM_H__
|
||||
|
||||
#include "ui_widget.hpp"
|
||||
#include "ui_navigation.hpp"
|
||||
#include "message.hpp"
|
||||
|
||||
namespace ui::external_app::doom {
|
||||
|
||||
class DoomView : public View {
|
||||
public:
|
||||
DoomView(NavigationView& nav);
|
||||
void on_show() override;
|
||||
std::string title() const override { return "Doom"; }
|
||||
void focus() override { dummy.focus(); }
|
||||
void paint(Painter& painter) override;
|
||||
void frame_sync();
|
||||
bool on_key(const KeyEvent key) override;
|
||||
|
||||
private:
|
||||
NavigationView& nav_;
|
||||
Button dummy{{240, 0, 0, 0}, ""};
|
||||
bool initialized{false};
|
||||
bool prev_velocity_moving{false};
|
||||
MessageHandlerRegistration message_handler_frame_sync{
|
||||
Message::ID::DisplayFrameSync,
|
||||
[this](const Message* const) {
|
||||
this->frame_sync();
|
||||
}};
|
||||
};
|
||||
|
||||
} // namespace ui::external_app::doom
|
||||
|
||||
#endif /*__UI_DOOM_H__*/
|
Loading…
Add table
Add a link
Reference in a new issue