1 /************************************************************************
2 This file is part of NE.
4 NE is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 NE is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with NE. If not, see <http://www.gnu.org/licenses/>.
16 ************************************************************************/
18 #include "backend/input.h"
19 #include "backend/video.h"
20 #include "backend/shapes.h"
21 #include "mods/list.h"
31 int exit_func(void*) {
35 int main(int argc
, char **argv
)
46 const char *usage
= "USAGE:\n\t%s [-w WIDTH] [-h HEIGHT] [-f]\n";
49 for (int i
=1; i
<argc
; i
++)
56 else if (arg_s
== "-h")
58 else if (arg_s
== "-f")
61 printf(usage
, argv
[0]);
69 v_setup(width
, height
, full
);
73 Menu
main_menu("Main Menu");
78 for (struct mod
* curr_mod
= mod_list
; curr_mod
->runfunc
!= 0; curr_mod
++) {
79 Label
*l
= new Label(curr_mod
->name
);
80 l
->setCallback(curr_mod
->runfunc
);
81 l
->setSize(Vec3f(15,2.5,1));
82 float c
= 1.0 - 0.25 * (mod_count
%2);
84 main_menu
.addChild(l
);
88 Label
*l
= new Label("Quit");
89 l
->setCallback(exit_func
);
90 l
->setSize(Vec3f(15.0, 2.5, 1.0));
91 l
->setColor(1.0, 0.0, 0.0);
92 main_menu
.addChild(l
);
94 std::cout
<< "Counted " << mod_count
<< " mods" << std::endl
;
96 while (main_menu
.run() == 0) {
97 main_menu
.setMode(Menu::OVERLAY
);
99 std::cout
<< "Exiting normally" << std::endl
;