Mercurial > molko
comparison src/adventure/panic_state.c @ 117:445035ace840
core: fix panic handling early
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 03 Oct 2020 19:03:22 +0200 |
parents | c7e993455985 |
children |
comparison
equal
deleted
inserted
replaced
116:0a6683615c73 | 117:445035ace840 |
---|---|
29 #include <texture.h> | 29 #include <texture.h> |
30 #include <util.h> | 30 #include <util.h> |
31 #include <window.h> | 31 #include <window.h> |
32 #include <map_state.h> | 32 #include <map_state.h> |
33 | 33 |
34 #include <assets/fonts/Lato-Regular.h> | |
35 | |
34 #include "panic_state.h" | 36 #include "panic_state.h" |
35 | 37 |
36 #define BACKGROUND 0x4f5070ff | 38 #define BACKGROUND 0x4f5070ff |
37 #define FOREGROUND 0xffffffff | 39 #define FOREGROUND 0xffffffff |
38 | 40 |
39 #define FONT "fonts/Lato-Regular.ttf" | 41 #define SIZE 16 |
40 #define FONT_SZ 16 | |
41 | |
42 #define PADDING 20 | 42 #define PADDING 20 |
43 | 43 |
44 #define OUT "molko-adventure.txt" | 44 #define OUT "molko-adventure.txt" |
45 | 45 |
46 struct label { | 46 struct label { |
220 /* | 220 /* |
221 * If the panic state can not be loaded we're unable to show any | 221 * If the panic state can not be loaded we're unable to show any |
222 * useful information to the screen so as last resort print them | 222 * useful information to the screen so as last resort print them |
223 * on the console. | 223 * on the console. |
224 */ | 224 */ |
225 if (!(font_open(&data.font, sys_datapath(FONT), FONT_SZ))) | 225 if (!(font_openmem(&data.font, Lato_Regular, sizeof (Lato_Regular), SIZE))) |
226 die("%s", error()); | 226 die("%s", error()); |
227 } | 227 } |