comparison libadventure/adventure/state/mainmenu.c @ 227:befa2e855d3b

core: reinterface the alloc module
author David Demelier <markand@malikania.fr>
date Thu, 19 Nov 2020 10:48:46 +0100
parents 64f24b482722
children
comparison
equal deleted inserted replaced
226:dd7c8d4321a3 227:befa2e855d3b
134 { 134 {
135 struct mainmenu *main; 135 struct mainmenu *main;
136 struct font fonts[2]; 136 struct font fonts[2];
137 137
138 /* Allocate the main menu data. */ 138 /* Allocate the main menu data. */
139 main = (state->data = alloc_zero(1, sizeof (*main))); 139 main = (state->data = alloc_new0(sizeof (*main)));
140 140
141 if (!font_openmem(&fonts[0], fonts_teutonic, sizeof (fonts_teutonic), 130) || 141 if (!font_openmem(&fonts[0], fonts_teutonic, sizeof (fonts_teutonic), 130) ||
142 !font_openmem(&fonts[1], fonts_pirata_one, sizeof (fonts_pirata_one), 30)) 142 !font_openmem(&fonts[1], fonts_pirata_one, sizeof (fonts_pirata_one), 30))
143 panic(); 143 panic();
144 144