refraction part 1
[mancala] / src / callbacks.c
1 /*
2 * This file is part of Crazy Parking
3 *
4 * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia
5 * http://www.indt.org/maemo
6 *
7 * This software is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public License
9 * as published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful, but
13 * 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.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 *
22 */
23 #include <stdio.h>
24 #include <hgw/hgw.h>
25 #include "callbacks.h"
26 // #include "images.h"
27 // #include "level.h"
28
29 // Pause the game
30 int exit_callback(int errcode) {
31 //      FILE *han;
32
33 //      // Save state
34 //      han = fopen("/tmp/.crazyparking-save", "wb");
35 //      if (han) {
36 //              fwrite(&actual_level, sizeof(int), 1, han);
37 //              fwrite(&moves, sizeof(int), 1, han);
38 //              fwrite(car, sizeof(struct CAR), cars, han);
39 //              fclose(han);
40 //      }
41     fprintf(stderr, "exit_callback called...\n");
42
43         return 0;
44 }
45
46 // Quit game
47 int quit_callback(int errcode) {
48 //      remove("/tmp/.crazyparking-save");
49     fprintf(stderr, "quit_callback called...\n");
50         hgw_context_compat_destroy_quit(hgw_context);
51         return 0;
52 }
53
54 int flush_callback(int errcode) {
55 //      remove("/tmp/.crazyparking-save");
56     fprintf(stderr, "quit_callback called...\n");
57         return 0;
58 }