Skip to content

Commit 11246f1

Browse files
committed
Added a vignette to the pause menu.
1 parent 376dc57 commit 11246f1

File tree

7 files changed

+121
-7
lines changed

7 files changed

+121
-7
lines changed
24.2 KB
Loading

manual/content/system_content_names.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,12 @@ <h2 id="graphics">Graphics</h2>
346346
<td>Internal name</td>
347347
<td>gui/title_screen_bg</td>
348348
</tr>
349+
<tr>
350+
<td>vignette</td>
351+
<td>Vignette used in some menus.</td>
352+
<td>Internal name</td>
353+
<td>gui/vignette</td>
354+
</tr>
349355
<tr>
350356
<td>wave_ring</td>
351357
<td>Particle for waves in water, used when objects are standing in water.</td>

source/documents/vectorial_graphics/gui.svg

Lines changed: 99 additions & 6 deletions
Loading

source/source/core/load.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,8 @@ void loadMiscGraphics() {
394394
game.content.bitmaps.list.get(
395395
game.sysContentNames.bmpThrowPreviewDashed
396396
);
397+
game.sysContent.bmpVignette =
398+
game.content.bitmaps.list.get(game.sysContentNames.bmpVignette);
397399
game.sysContent.bmpWaveRing =
398400
game.content.bitmaps.list.get(game.sysContentNames.bmpWaveRing);
399401
}
@@ -599,6 +601,7 @@ void unloadMiscResources() {
599601
game.content.bitmaps.list.free(game.sysContent.bmpThrowInvalid);
600602
game.content.bitmaps.list.free(game.sysContent.bmpThrowPreview);
601603
game.content.bitmaps.list.free(game.sysContent.bmpThrowPreviewDashed);
604+
game.content.bitmaps.list.free(game.sysContent.bmpVignette);
602605
game.content.bitmaps.list.free(game.sysContent.bmpWaveRing);
603606

604607
//Fonts.

source/source/core/misc_structs.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2163,6 +2163,7 @@ void SystemContentNames::load(DataNode* file) {
21632163
graRS.set("throw_preview", bmpThrowPreview);
21642164
graRS.set("throw_preview_dashed", bmpThrowPreviewDashed);
21652165
graRS.set("title_screen_bg", bmpTitleScreenBg);
2166+
graRS.set("vignette", bmpVignette);
21662167
graRS.set("wave_ring", bmpWaveRing);
21672168

21682169
ReaderSetter fntRS(file->getChildByName("fonts"));

source/source/core/misc_structs.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,9 @@ struct SystemContentList {
771771
//Dashed throw preview texture.
772772
ALLEGRO_BITMAP* bmpThrowPreviewDashed = nullptr;
773773

774+
//Vignette, used for menus.
775+
ALLEGRO_BITMAP* bmpVignette = nullptr;
776+
774777
//Wave ring.
775778
ALLEGRO_BITMAP* bmpWaveRing = nullptr;
776779

@@ -1040,6 +1043,9 @@ struct SystemContentNames {
10401043
//Title screen background.
10411044
string bmpTitleScreenBg = "gui/title_screen_bg";
10421045

1046+
//Vignette, used for menus.
1047+
string bmpVignette = "gui/vignette";
1048+
10431049
//Wave ring.
10441050
string bmpWaveRing = "effects/wave_ring";
10451051

source/source/game_state/gameplay/drawing.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,12 @@ void GameplayState::drawOnionMenu() {
15051505
void GameplayState::drawPauseMenu() {
15061506
al_draw_filled_rectangle(
15071507
0, 0, game.winW, game.winH,
1508-
al_map_rgba(24, 64, 60, 200 * pauseMenu->bgAlphaMult)
1508+
al_map_rgba(24, 48, 70, 200 * pauseMenu->bgAlphaMult)
1509+
);
1510+
drawBitmap(
1511+
game.sysContent.bmpVignette,
1512+
Point(game.winW, game.winH) / 2.0f, Point(game.winW, game.winH),
1513+
0.0f, al_map_rgba(140, 182, 224, 44 * pauseMenu->bgAlphaMult)
15091514
);
15101515

15111516
pauseMenu->draw();

0 commit comments

Comments
 (0)