2 * Copyright (C) 2003 Robert Kooima
4 * NEVERBALL is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published
6 * by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
21 /*---------------------------------------------------------------------------*/
23 int level_load(const char *filename, struct level * level)
24 /* Load the level 'filename' and fill the 'level' structure */
25 /* return 1 on success, 0 on error */
27 strcpy(level->file, filename);
31 void level_dump_info(const struct level * level)
33 printf("filename: %s\n"
40 level->file, level->back, level->grad, level->shot, level->song,
41 level->time, level->goal);
44 /*---------------------------------------------------------------------------*/
46 const char * mode_to_str(int m)
50 case MODE_CHALLENGE: return _("Challenge");
51 case MODE_NORMAL: return _("Normal");
52 case MODE_PRACTICE: return _("Practice");
53 case MODE_SINGLE: return _("Single");
54 default: return "???";
58 /*---------------------------------------------------------------------------*/
60 const char * state_to_str(int m)
64 case GAME_NONE: return _("Aborted");
65 case GAME_TIME: return _("Time-out");
66 case GAME_GOAL: return _("Success");
67 case GAME_FALL: return _("Fall-out");
68 default: return "???";
72 /*---------------------------------------------------------------------------*/