comparison libadventure/adventure/splashscreen_state.c @ 131:c679e08b32b2

molko: fix startup
author David Demelier <markand@malikania.fr>
date Wed, 07 Oct 2020 09:37:28 +0200
parents 789b23e01f52
children ea0bfecdd0fd
comparison
equal deleted inserted replaced
130:09978921e281 131:c679e08b32b2
26 #include <core/state.h> 26 #include <core/state.h>
27 #include <core/sys.h> 27 #include <core/sys.h>
28 #include <core/texture.h> 28 #include <core/texture.h>
29 #include <core/window.h> 29 #include <core/window.h>
30 30
31 #include <core/assets/fonts/teutonic1.h>
32
31 #include "splashscreen_state.h" 33 #include "splashscreen_state.h"
32 #include "mainmenu_state.h" 34 #include "mainmenu_state.h"
33 35
34 #define DELAY 2000 36 #define DELAY 2000
35 37
40 { 42 {
41 struct font font = { 43 struct font font = {
42 .color = 0x000000ff 44 .color = 0x000000ff
43 }; 45 };
44 46
45 if (!(font_open(&font, sys_datapath("fonts/teutonic1.ttf"), 130))) 47 if (!(font_openmem(&font, teutonic_, sizeof (teutonic_), 130)))
46 panic(); 48 panic();
47 if (!(font_render(&font, &splashscreen_state_data.text, "Molko's Adventure"))) 49 if (!(font_render(&font, &splashscreen_state_data.text, "Molko's Adventure")))
48 panic(); 50 panic();
49 51
50 /* Compute position. */ 52 /* Compute position. */