Mercurial > molko
comparison libmlk-adventure/adventure/mapscene/mapscene.c @ 276:8d41e317c07b
adventure: enable trace_hud
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sun, 13 Dec 2020 11:10:35 +0100 |
parents | f89a53abb314 |
children | d01e83210ca2 |
comparison
equal
deleted
inserted
replaced
275:f89a53abb314 | 276:8d41e317c07b |
---|---|
27 | 27 |
28 #include <rpg/map.h> | 28 #include <rpg/map.h> |
29 | 29 |
30 #include <adventure/action/teleport.h> | 30 #include <adventure/action/teleport.h> |
31 #include <adventure/action/spawner.h> | 31 #include <adventure/action/spawner.h> |
32 | |
33 #include <adventure/trace_hud.h> | |
32 | 34 |
33 #include "mapscene.h" | 35 #include "mapscene.h" |
34 | 36 |
35 #define SEARCH(key, array, size, cmp) \ | 37 #define SEARCH(key, array, size, cmp) \ |
36 bsearch(key, array, UTIL_SIZE(array), size, (cmp_fn)cmp) | 38 bsearch(key, array, UTIL_SIZE(array), size, (cmp_fn)cmp) |
137 struct mapscene_loader *ld; | 139 struct mapscene_loader *ld; |
138 | 140 |
139 /* Same layout, can use cmp_title as well. */ | 141 /* Same layout, can use cmp_title as well. */ |
140 if ((ld = SEARCH(m->title, mapscenes, sizeof (*ld), cmp_title))) | 142 if ((ld = SEARCH(m->title, mapscenes, sizeof (*ld), cmp_title))) |
141 ld->load(m); | 143 ld->load(m); |
144 | |
145 /* Add the trace hud. */ | |
146 action_stack_add(&m->astack_par, trace_hud_action()); | |
142 } | 147 } |