Don't delete ChangeLog when cleaning
[tennix.git] / tennixpy.h
bloba3ab98d60c111a22200dfbab3a6f8bc1b0ac20f6
3 /**
5 * Tennix! SDL Port
6 * Copyright (C) 2003, 2007, 2008, 2009 Thomas Perl <thp@thpinfo.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
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 Street, Fifth Floor, Boston,
21 * MA 02110-1301, USA.
23 **/
25 #ifndef __TENNIXPY_H
26 #define __TENNIXPY_H
28 #ifdef TENNIX_PYTHON
30 #include "archive.hh"
32 extern PyThreadState* _py_save;
34 PyObject* tennixpy_register_bot(PyObject* self, PyObject* bot_class);
35 void tennixpy_unregister_bot(PyObject* bot);
36 void tennixpy_get_bot_name(PyObject* bot_class, char* dest, int maxlen);
38 PyObject* tennixpy_create_bot(PyObject* bot_class, GameState* s, int player_id);
39 void tennixpy_destroy_bot(PyObject* bot);
41 float tennixpy_bot_get_axis(PyObject* bot, int axis);
42 char tennixpy_bot_get_key(PyObject* bot, int key);
44 PyObject* tennixpy_get_ball_pos(PyObject* self, PyObject* gamestate);
45 PyObject* tennixpy_get_power(PyObject* self, PyObject* args);
46 PyObject* tennixpy_get_position(PyObject* self, PyObject* args);
48 PyObject* tennixpy_create_module(void);
50 void tennixpy_init(TennixArchive& tnxar);
51 void tennixpy_uninit();
53 #endif
55 #endif