forked from andreax79/tabboz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsharedimg.cpp
89 lines (68 loc) · 2.75 KB
/
sharedimg.cpp
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/* Tabboz Simulator NG */
/* */
/* Copyright 2022-2023 Walter Agazzi */
/* Original Copyright 1997-2000 Andrea Bonomi */
/*
This file is part of Tabboz Simulator NG.
Tabboz Simulator NG is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Tabboz Simulator NG is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Tabboz Simulator NG. If not, see <http://www.gnu.org/licenses/>.
*/
#include "os.h"
#include <stdio.h>
#include <stdlib.h>
#include "sharedimg.h"
Fl_Shared_Image *ImgTesta[N_TESTA];
Fl_Shared_Image *ImgGiubbotto[N_GIUBBOTTO];
Fl_Shared_Image *ImgPantaloni[N_PANTALONI];
Fl_Shared_Image *ImgScarpe[N_SCARPE];
Fl_Shared_Image *ImgEventi[N_EVENTI];
Fl_Shared_Image *ImgDitte[N_DITTE];
Fl_Shared_Image *ImgExit;
Fl_Shared_Image *ImgInfo;
Fl_Shared_Image *ImgDomanda;
Fl_Shared_Image *ImgAvviso;
Fl_Shared_Image *ImgStop;
Fl_Shared_Image *ImgCool;
/* Carica da file le immagini condivise (usate in più finestre) */
void CaricaSharedImgs()
{
char path[128];
for(int i=0; i < N_TESTA; ++i) {
sprintf(path, "res/pic/testa_%d.png",i);
ImgTesta[i] = Fl_Shared_Image::get(path);
}
for(int i=0; i < N_GIUBBOTTO; ++i) {
sprintf(path, "res/pic/giubbotto_%d.png",i);
ImgGiubbotto[i] = Fl_Shared_Image::get(path);
}
for(int i=0; i < N_PANTALONI; ++i) {
sprintf(path, "res/pic/pantaloni_%d.png",i);
ImgPantaloni[i] = Fl_Shared_Image::get(path);
}
for(int i=0; i < N_SCARPE; ++i) {
sprintf(path, "res/pic/scarpe_%d.png",i);
ImgScarpe[i] = Fl_Shared_Image::get(path);
}
for(int i=0; i < N_EVENTI; ++i) {
sprintf(path, "res/pic/eventi_%d.png",i);
ImgEventi[i] = Fl_Shared_Image::get(path);
}
for(int i=0; i < N_DITTE; ++i) {
sprintf(path, "res/pic/ditta_%d.png",i);
ImgDitte[i] = Fl_Shared_Image::get(path);
}
ImgExit = Fl_Shared_Image::get("res/gui/icons/b_exit.png");
ImgInfo = Fl_Shared_Image::get("res/gui/icons/msg_info.png");
ImgDomanda = Fl_Shared_Image::get("res/gui/icons/msg_question.png");
ImgAvviso = Fl_Shared_Image::get("res/gui/icons/msg_warn.png");
ImgStop = Fl_Shared_Image::get("res/gui/icons/msg_error.png");
ImgCool = Fl_Shared_Image::get("res/gui/icons/msg_cool.png");
}