put example files to dedicated dir
[monster.git] / player.h
blob2459454abb2348f3482c5d0c7f869dbde704f08b
1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
4 * player interface
5 * This file is part of monster
7 * Copyright (C) 2006,2007 Nedko Arnaudov <nedko@arnaudov.name>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; version 2 of the License
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22 *****************************************************************************/
24 #ifndef PLAYER_H__CC9B87C2_8B1D_47F2_96B5_CF107C204E08__INCLUDED
25 #define PLAYER_H__CC9B87C2_8B1D_47F2_96B5_CF107C204E08__INCLUDED
27 struct player;
29 typedef void (* player_destroy_t)(struct player * player_ptr);
31 typedef int (* player_start_prepare_t)(struct player * player_ptr);
33 typedef int (* player_start_t)(struct player * player_ptr);
35 struct player
37 player_destroy_t destroy;
38 player_start_prepare_t start_prepare;
39 player_start_t start;
40 char name[1024];
43 static __inline__
44 void
45 player_destroy(struct player * player_ptr)
47 return player_ptr->destroy(player_ptr);
50 static __inline__
51 int
52 player_start_prepare(struct player * player_ptr)
54 return player_ptr->start_prepare(player_ptr);
57 static __inline__
58 int
59 player_start(struct player * player_ptr)
61 return player_ptr->start(player_ptr);
64 /* end of data callback */
65 typedef void (* eod_t)(unsigned int context);
67 #endif /* #ifndef PLAYER_H__CC9B87C2_8B1D_47F2_96B5_CF107C204E08__INCLUDED */