Skip to content

Commit

Permalink
Using constants and defines
Browse files Browse the repository at this point in the history
  • Loading branch information
Viperio19 committed Jan 1, 2025
1 parent aa8de65 commit fb4265e
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 69 deletions.
12 changes: 6 additions & 6 deletions src/applications/journal_display/journal_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ static void JournalController_SetupBgs(BgConfig *bgConfig)
0
};

Bg_InitFromTemplate(bgConfig, 0, &bgTemplate1, 0);
Bg_ClearTilemap(bgConfig, 0);
Bg_InitFromTemplate(bgConfig, BG_LAYER_MAIN_0, &bgTemplate1, BG_TYPE_STATIC);
Bg_ClearTilemap(bgConfig, BG_LAYER_MAIN_0);

BgTemplate bgTemplate2 = {
0,
Expand All @@ -227,8 +227,8 @@ static void JournalController_SetupBgs(BgConfig *bgConfig)
0
};

Bg_InitFromTemplate(bgConfig, 1, &bgTemplate2, 0);
Bg_ClearTilemap(bgConfig, 1);
Bg_InitFromTemplate(bgConfig, BG_LAYER_MAIN_1, &bgTemplate2, BG_TYPE_STATIC);
Bg_ClearTilemap(bgConfig, BG_LAYER_MAIN_1);

BgTemplate bgTemplate3 = {
0,
Expand All @@ -246,7 +246,7 @@ static void JournalController_SetupBgs(BgConfig *bgConfig)
0
};

Bg_InitFromTemplate(bgConfig, 2, &bgTemplate3, 0);
Bg_InitFromTemplate(bgConfig, BG_LAYER_MAIN_2, &bgTemplate3, BG_TYPE_STATIC);

BgTemplate bgTemplate4 = {
0,
Expand All @@ -264,7 +264,7 @@ static void JournalController_SetupBgs(BgConfig *bgConfig)
0
};

Bg_InitFromTemplate(bgConfig, 3, &bgTemplate4, 0);
Bg_InitFromTemplate(bgConfig, BG_LAYER_MAIN_3, &bgTemplate4, BG_TYPE_STATIC);

Bg_ClearTilesRange(BG_LAYER_MAIN_0, 32, 0, HEAP_ID_JOURNAL);
Bg_ClearTilesRange(BG_LAYER_MAIN_1, 32, 0, HEAP_ID_JOURNAL);
Expand Down
Loading

0 comments on commit fb4265e

Please sign in to comment.