… | |
… | |
58 | faceidx |
58 | faceidx |
59 | sound_find (const char *str) |
59 | sound_find (const char *str) |
60 | { |
60 | { |
61 | auto (i, ht.find (str)); |
61 | auto (i, ht.find (str)); |
62 | |
62 | |
63 | return i == ht.end () |
63 | if (i != ht.end ()) |
64 | ? 0 |
|
|
65 | : i->second; |
64 | return i->second; |
|
|
65 | |
|
|
66 | //TODO: really fall back to face name? |
|
|
67 | char face[128]; |
|
|
68 | snprintf (face, 128, "sound/%s", str); |
|
|
69 | return face_find (face); |
66 | } |
70 | } |
67 | |
71 | |
68 | void |
72 | void |
69 | sound_set (const char *str, faceidx face) |
73 | sound_set (const char *str, faceidx face) |
70 | { |
74 | { |