-
Notifications
You must be signed in to change notification settings - Fork 4
/
resource-manager.h
43 lines (34 loc) · 887 Bytes
/
resource-manager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* SPDX-FileCopyrightText: 2021 Samuel Cuella <[email protected]>
*
* This file is part of SoFIS - an open source EFIS
*
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef RESOURCE_MANAGER_H
#define RESOURCE_MANAGER_H
#include "SDL_pcf.h"
typedef enum{
TERMINUS_12,
TERMINUS_14,
TERMINUS_16,
TERMINUS_18,
TERMINUS_24,
TERMINUS_32,
FONT_MAX
}FontResource;
typedef struct{
PCF_StaticFont *font;
SDL_Color color;
FontResource creator;
}StaticFontResource;
typedef struct{
PCF_Font *fonts[FONT_MAX];
StaticFontResource *sfonts;
size_t n_allocated;
size_t n_sfonts;
}ResourceManager;
PCF_Font *resource_manager_get_font(FontResource font);
PCF_StaticFont *resource_manager_get_static_font(FontResource font, SDL_Color *color, int nsets, ...);
void resource_manager_shutdown(void);
#endif /* RESOURCE_MANAGER_H */