paulo@0: /* Header for PC frontend for LOCKJAW, an implementation of the Soviet Mind Game paulo@0: paulo@0: Copyright (C) 2006 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 LJPC_H paulo@0: #define LJPC_H paulo@0: #include paulo@0: #include "ljmusic.h" paulo@0: #include "ljplay.h" paulo@0: #include "pcjoy.h" paulo@0: #include "ljvorbis.h" paulo@0: #include "options.h" paulo@0: paulo@0: typedef struct LJPCSkin { paulo@0: BITMAP *bg; paulo@0: BITMAP *blocks; paulo@0: BITMAP *connBlocks; paulo@0: BITMAP *fullback; paulo@0: unsigned short blkW, blkH; paulo@0: unsigned short baseX, baseY; paulo@0: unsigned short pfElev; paulo@0: unsigned char transparentPF; paulo@0: unsigned char nextPos; paulo@0: unsigned char shiftScale; paulo@0: LJMusic *bgm; paulo@0: } LJPCSkin; paulo@0: paulo@0: typedef struct LJPCView paulo@0: { paulo@0: BITMAP *back; paulo@0: LJPCSkin *skin; paulo@0: unsigned short baseX; paulo@0: unsigned char nextAbove; // number of next pieces above shadow paulo@0: paulo@0: // Platform-dependent sound paulo@0: unsigned char b2bcd1, b2bcd2; paulo@0: paulo@0: unsigned char wantRecord; paulo@0: } LJPCView; paulo@0: paulo@0: extern char skinName[PATH_MAX]; paulo@0: extern char ljblocksSRSName[PATH_MAX]; paulo@0: extern char ljblocksSegaName[PATH_MAX]; paulo@0: extern char ljconnSRSName[PATH_MAX]; paulo@0: extern char ljconnSegaName[PATH_MAX]; paulo@0: extern char ljbgName[PATH_MAX]; paulo@0: extern char bgmName[PATH_MAX]; paulo@0: paulo@0: paulo@0: #define N_GIMMICKS LJGM_N_GIMMICKS paulo@0: paulo@0: paulo@0: enum { paulo@0: LJNEXT_RIGHT = 0, paulo@0: LJNEXT_RIGHT_TAPER, paulo@0: LJNEXT_TOP, paulo@0: LJNEXT_N_STYLES paulo@0: }; paulo@0: paulo@0: /** paulo@0: * The number of persistent preferences. Must match the number of paulo@0: * fields in struct LJPrefsNamed. paulo@0: */ paulo@0: paulo@0: /** paulo@0: * Names of persistent preferences. paulo@0: * Order must be exactly the same as in paulo@0: * optionsMenu[] (options.c) paulo@0: */ paulo@0: enum { paulo@0: OPTIONS_NEXT_ABOVE = OPTIONS_MENU_LEN, paulo@0: OPTIONS_TRAILS, paulo@0: OPTIONS_AUTO_PAUSE, paulo@0: OPTIONS_AUTO_RECORD, paulo@0: OPTIONS_WINDOWED, paulo@0: PC_OPTIONS_MENU_LEN paulo@0: }; paulo@0: struct LJPrefs { paulo@0: unsigned char number[PC_OPTIONS_MENU_LEN]; paulo@0: }; paulo@0: paulo@0: paulo@0: /* set by display mode */ paulo@0: extern int pfBgColor, pfFgColor, bgColor, fgColor, hiliteColor; paulo@0: extern const FONT *aver32, *aver16; paulo@0: extern volatile char redrawWholeScreen; paulo@0: extern char autoPause; paulo@0: paulo@0: void saveScreen(int n); paulo@0: void ezPlaySample(const char *filename, int vol); paulo@0: int parse_ini_line(const char *in, char *key, char *var, char *val); paulo@0: int loadOptions(struct LJPrefs *prefs); paulo@0: void saveOptions(const struct LJPrefs *prefs); paulo@0: void options(LJView *v, unsigned char *prefs); paulo@0: void unpackOptions(LJView *v, const struct LJPrefs *prefs); paulo@0: void debrief(LJView *v); paulo@0: paulo@0: paulo@0: #endif