1 /* 2 * file action.h - converting player actions to bytes and back 3 * 4 * $Id: action.h,v 1.9 2006/02/09 21:21:22 fzago Exp $ 5 * 6 * Program XBLAST 7 * (C) by Oliver Vogel (e-mail: m.vogel@ndh.net) 8 * 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 11 * by the Free Software Foundation; either version 2; or (at your option) 12 * any later version 13 * 14 * This program is distributed in the hope that it will be entertaining, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILTY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 17 * Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License along 20 * with this program; if not, write to the Free Software Foundation, Inc. 21 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 */ 23 #ifndef XBLAST_ACTION_H 24 #define XBLAST_ACTION_H 25 26 /* 27 * type definitions 28 */ 29 30 /* status of player abort */ 31 typedef enum 32 { 33 ABORT_NONE = 0, 34 ABORT_TRUE, 35 ABORT_CANCEL 36 } PlayerAbort; 37 38 /* chat defines */ 39 #define CHAT_NONE 0 40 #define CHAT_START 1 41 #define CHAT_SEND 2 42 #define CHAT_CANCEL 3 43 #define CHAT_LEN 40 44 45 /* player action(s) at last turn */ 46 typedef struct 47 { 48 int player; 49 BMDirection dir; 50 XBBool bomb; 51 XBBool special; 52 XBBool pause; 53 PlayerAbort abort; 54 XBBool suicide; 55 XBBool laola; 56 XBBool looser; 57 XBBool bot; 58 XBBool away; 59 } PlayerAction; 60 61 /* 62 * global prototypes 63 */ 64 extern unsigned char PlayerActionToByte (const PlayerAction *); 65 extern void PlayerActionFromByte (PlayerAction *, unsigned char); 66 67 #endif 68 /* 69 * end of file action.h 70 */ 71