Skip to content

Commit

Permalink
refactor: scene 3 deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
QtRoS committed Nov 6, 2023
1 parent 3b797e0 commit 3d7a721
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 170 deletions.
4 changes: 0 additions & 4 deletions hex_viewer.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ HexViewer* hex_viewer_app_alloc() {
HexViewerViewIdScene2,
hex_viewer_scene_2_get_view(app->hex_viewer_scene_2));

app->button_menu = button_menu_alloc();
view_dispatcher_add_view(
app->view_dispatcher, HexViewerViewIdScene3, button_menu_get_view(app->button_menu));

app->variable_item_list = variable_item_list_alloc();
view_dispatcher_add_view(
app->view_dispatcher,
Expand Down
54 changes: 30 additions & 24 deletions hex_viewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,41 +43,43 @@
// typedef struct HexViewerModel HexViewerModel;
// typedef struct HexViewer HexViewer;

typedef struct {
typedef struct
{
uint8_t file_bytes[HEX_VIEWER_LINES_ON_SCREEN][HEX_VIEWER_BYTES_PER_LINE];
uint32_t file_offset;
uint32_t file_read_bytes;
uint32_t file_size;

Stream* stream;
Stream *stream;
} HexViewerModel;

// TODO Clean
typedef struct {
HexViewerModel* model;

Gui* gui;
Storage* storage;
NotificationApp* notification;
ViewDispatcher* view_dispatcher;
Submenu* submenu;
TextInput* text_input;
SceneManager* scene_manager;
VariableItemList* variable_item_list;
HexViewerStartscreen* hex_viewer_startscreen;
HexViewerScene1* hex_viewer_scene_1;
HexViewerScene2* hex_viewer_scene_2;
DialogsApp* dialogs; // File Browser
FuriString* file_path; // File Browser
typedef struct
{
HexViewerModel *model;

Gui *gui;
Storage *storage;
NotificationApp *notification;
ViewDispatcher *view_dispatcher;
Submenu *submenu;
TextInput *text_input;
SceneManager *scene_manager;
VariableItemList *variable_item_list;
HexViewerStartscreen *hex_viewer_startscreen;
HexViewerScene1 *hex_viewer_scene_1;
HexViewerScene2 *hex_viewer_scene_2;
DialogsApp *dialogs; // File Browser
FuriString *file_path; // File Browser
uint32_t haptic;
uint32_t speaker;
uint32_t led;
uint32_t save_settings;
ButtonMenu* button_menu; // Button Menu
char percent_buf[HEX_VIEWER_PERCENT_INPUT];
} HexViewer;

typedef enum {
typedef enum
{
HexViewerViewIdStartscreen,
HexViewerViewIdMenu,
HexViewerViewIdScene1,
Expand All @@ -88,22 +90,26 @@ typedef enum {
HexViewerViewIdSettings,
} HexViewerViewId;

typedef enum {
typedef enum
{
HexViewerHapticOff,
HexViewerHapticOn,
} HexViewerHapticState;

typedef enum {
typedef enum
{
HexViewerSpeakerOff,
HexViewerSpeakerOn,
} HexViewerSpeakerState;

typedef enum {
typedef enum
{
HexViewerLedOff,
HexViewerLedOn,
} HexViewerLedState;

typedef enum {
typedef enum
{
HexViewerSettingsOff,
HexViewerSettingsOn,
} HexViewerSettingsStoreState;
1 change: 0 additions & 1 deletion scenes/hex_viewer_scene_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ ADD_SCENE(hex_viewer, startscreen, Startscreen)
ADD_SCENE(hex_viewer, menu, Menu)
ADD_SCENE(hex_viewer, scene_1, Scene_1)
ADD_SCENE(hex_viewer, scene_2, Scene_2)
ADD_SCENE(hex_viewer, scene_3, Scene_3)
ADD_SCENE(hex_viewer, scene_4, Scene_4)
ADD_SCENE(hex_viewer, settings, Settings)
141 changes: 0 additions & 141 deletions scenes/hex_viewer_scene_scene_3.c

This file was deleted.

0 comments on commit 3d7a721

Please sign in to comment.