1 /*************************************************************************** 2 config.h - description 3 ------------------- 4 begin : Tue Feb 13 2001 5 copyright : (C) 2001 by Michael Speck 6 email : kulkanie@gmx.net 7 ***************************************************************************/ 8 9 /*************************************************************************** 10 * * 11 * This program is free software; you can redistribute it and/or modify * 12 * it under the terms of the GNU General Public License as published by * 13 * the Free Software Foundation; either version 2 of the License, or * 14 * (at your option) any later version. * 15 * * 16 ***************************************************************************/ 17 18 #ifndef __CONFIG_H 19 #define __CONFIG_H 20 21 /* game type ids */ 22 enum { 23 GAME_DEMO = 0, 24 GAME_CLASSIC, 25 GAME_FIGURES, 26 GAME_VS_HUMAN, 27 GAME_VS_CPU, 28 GAME_VS_HUMAN_HUMAN, 29 GAME_VS_HUMAN_CPU, 30 GAME_VS_CPU_CPU, 31 GAME_TRAINING, 32 GAME_TYPENUM 33 }; 34 35 typedef struct { 36 int left; 37 int right; 38 int rot_left; 39 int rot_right; 40 int down; 41 int drop; 42 } Controls; 43 44 typedef struct { 45 char name[32]; 46 Controls controls; 47 } Player; 48 49 /* configure struct */ 50 typedef struct { 51 /* directory to save config and saved games */ 52 char dir_name[512]; 53 /* game options */ 54 int gametype; 55 int starting_level; 56 int preview; 57 int modern; 58 int expert; 59 Player player1; 60 Player player2; 61 Player player3; 62 /* multiplayer */ 63 int holes; 64 int rand_holes; 65 int send_all; 66 int send_tetris; 67 /* cpu */ 68 int cpu_aggr; /* how much plays the cpu on completing multiple lines */ 69 int cpu_delay; /* delay in ms that CPU waits before moving down fast */ 70 int cpu_rot_delay; /* delay between rotative steps */ 71 /* controls */ 72 int hori_delay; 73 int vert_delay; 74 int pause_key; 75 /* sound */ 76 int sound; 77 int volume; /* 1 - 8 */ 78 int shiftsound; 79 /* graphics */ 80 int anim; 81 int fullscreen; 82 int fade; 83 int fps; /* frames per second: 0 - no limit, 1 - 50, 2 - 100, 3 - 200 */ 84 int bkgnd; 85 int block_by_block; 86 /* lbreakout2 event data */ 87 int motion_mod; 88 int rel_motion; 89 int grab; 90 int invert; 91 /* various */ 92 int quick_help; 93 int visualize; /* compute stats hidden? */ 94 int keep_bkgnd; 95 int center_preview; 96 } Config; 97 98 /* config directory name in home directory */ 99 #define CONFIG_DIR_NAME ".lgames" 100 101 /* set config to default */ 102 void config_reset(); 103 104 /* load config */ 105 void config_load( ); 106 107 /* save config */ 108 void config_save( ); 109 110 #endif 111