paulo@0: /* PC preset code for LOCKJAW, an implementation of the Soviet Mind Game paulo@0: paulo@0: Copyright (C) 2008 Damian Yerrick paulo@0: paulo@0: This work is free software; you can redistribute it and/or modify paulo@0: it under the terms of the GNU General Public License as published by paulo@0: the Free Software Foundation; either version 2 of the License, or paulo@0: (at your option) any later version. paulo@0: paulo@0: This program is distributed in the hope that it will be useful, paulo@0: but WITHOUT ANY WARRANTY; without even the implied warranty of paulo@0: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the paulo@0: GNU General Public License for more details. paulo@0: paulo@0: You should have received a copy of the GNU General Public License paulo@0: along with this program; if not, write to the Free Software paulo@0: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA paulo@0: paulo@0: Original game concept and design by Alexey Pajitnov. paulo@0: The Software is not sponsored or endorsed by Alexey Pajitnov, Elorg, paulo@0: or The Tetris Company LLC. paulo@0: paulo@0: */ paulo@0: paulo@0: #ifndef PCPRESET_H paulo@0: #define PCPRESET_H paulo@0: #include paulo@0: #include "ljcontrol.h" paulo@0: paulo@0: typedef struct PresetRule { paulo@0: unsigned char line, value; paulo@0: } PresetRule; paulo@0: paulo@0: #define PRESET_NAME_LEN 32 paulo@0: #define PRESET_MAX_RULES 32 paulo@0: paulo@0: typedef struct Preset { paulo@0: char name[PRESET_NAME_LEN]; paulo@0: PresetRule rules[PRESET_MAX_RULES]; paulo@0: } Preset; paulo@0: paulo@0: /** paulo@0: * Resets all options in the preset buffer to inherit. paulo@0: */ paulo@0: void presetStart(void); paulo@0: paulo@0: /** paulo@0: * Adds a preset to the preset buffer. paulo@0: */ paulo@0: void presetAdd(size_t which); paulo@0: paulo@0: /** paulo@0: * Unpacks the preset buffer onto a view. paulo@0: */ paulo@0: void presetFinish(struct LJView *v); paulo@0: paulo@0: extern const Preset *loadedPresets; paulo@0: extern size_t nLoadedPresets; paulo@0: paulo@0: #endif