ommited to install the header file neuro_engine.h,
[neuro.git] / src / neuro_main.c
blobbc6e54d0750dfa0fc73e52e916a36499404f4b55
2 /*
3 * libneuro, a light weight abstraction of high or lower libraries
4 * and toolkit for applications.
5 * Copyright (C) 2005-2006 Nicholas Niro, Robert Lemay
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 /* neuro.c
23 * Main libNeuro source file.
26 /*-------------------- Extern Headers Including --------------------*/
29 /*-------------------- Local Headers Including ---------------------*/
30 #include <graphics.h>
31 #include <events.h>
32 #include <extlib.h>
33 #include <debug.h>
35 /*-------------------- Main Module Header --------------------------*/
36 #include <neuro_main.h>
39 /*-------------------- Other ----------------------------*/
41 /*-------------------- Global Variables ----------------------------*/
43 /*-------------------- Static Variables ----------------------------*/
45 /*-------------------- Static Prototypes ---------------------------*/
49 /*-------------------- Static Functions ----------------------------*/
51 /*-------------------- Global Functions ----------------------------*/
53 /*-------------------- Poll ----------------------------------------*/
55 int
56 Neuro_Poll()
58 int _err = 0;
60 Events_Poll();
61 Graphics_Poll();
63 _err = Lib_PollEvent(NULL);
65 return _err;
68 /*-------------------- Constructor Destructor ----------------------*/
70 int
71 Neuro_Init()
73 int _err = 0;
75 _err = Debug_Init();
76 if (_err)
77 return _err;
79 _err = Graphics_Init();
80 if (_err)
82 return _err;
85 _err = Events_Init();
86 if (_err)
88 return _err;
91 _err = Lib_FontsInit();
92 if (_err)
94 return _err;
97 return _err;
100 void
101 Neuro_Quit()
103 Lib_FontsExit();
104 Events_Clean();
105 Graphics_Clean();
106 Debug_Clean();