31
|
1 /* system_config.h
|
|
2 * gameexe.ini ¥Õ¥¡¥¤¥ë¤ÎÆɤ߹þ¤ß
|
|
3 */
|
|
4
|
|
5 /*
|
|
6 *
|
|
7 * Copyright (C) 2000- Kazunori Ueno(JAGARL) <jagarl@creator.club.ne.jp>
|
|
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 by
|
|
11 * the Free Software Foundation; either version 2 of the License, or
|
|
12 * (at your option) any later version.
|
|
13 *
|
|
14 * This program is distributed in the hope that it will be useful,
|
|
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17 * GNU General 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 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
22 *
|
|
23 */
|
|
24
|
0
|
25 #include<string>
|
|
26
|
|
27 /* CD Track ̾ <-> Track ÈÖ¹æ¤ÎÊÑ´¹¤ò¹Ô¤¦ */
|
|
28 class TrackName {
|
|
29 char** track;
|
|
30 int* track_num;
|
|
31 char** track_wave;
|
|
32 int* track_start;
|
|
33 int deal;
|
|
34 void Expand(void);
|
|
35 char** se_track;
|
|
36 int se_deal;
|
|
37 void ExpandSE(int num);
|
|
38 public:
|
|
39 TrackName(void);
|
|
40 ~TrackName(void);
|
|
41 void AddCDROM(char* name, int track);
|
|
42 void AddWave(char* name, char* wave, int start_pt);
|
|
43 void AddSE(int num, char* se);
|
|
44 int CDTrack(char* name);
|
|
45 int TrackStart(char* name);
|
|
46 const char* WaveTrack(char* name);
|
|
47 const char* SETrack(int num);
|
|
48 };
|
|
49 /* gameexe.ini ¤ÇÀßÄꤵ¤ì¤ë¥Ñ¥é¥á¡¼¥¿ */
|
|
50 /* ¤Þ¤º½é¤á¤Ë¡¢ÀßÄê¹àÌܤò SetOrigPara* ¤Ç¥»¥Ã¥È¤¹¤ë
|
|
51 ** ¤¿¤À¤·¡¢ÀßÄê̾¤Ï255ʸ»ú°Ê²¼¤Ç¤¢¤ëɬÍפ¬¤¢¤ë¡£
|
|
52 **
|
|
53 ** SetPara* ¤ÇÀßÄê¹àÌܤÏÊѹ¹¤Ç¤¤ë
|
|
54 ** ¤Þ¤¿¡¢GetPara* ¤ÇÀßÄê¹àÌܤòÆÀ¤é¤ì¤ë¡£
|
|
55 */
|
|
56
|
|
57 class AyuSysConfig {
|
|
58 friend class Conf2; /* ¥Æ¥¹¥ÈÍѤΥ¯¥é¥¹ */
|
|
59 int change_flag;
|
|
60 int dirty_flag;
|
|
61 class AyuSysConfigString* str_config;
|
|
62 class AyuSysConfigIntlist* int_config;
|
|
63
|
|
64 public:
|
|
65 TrackName track_name;
|
|
66
|
|
67 public:
|
|
68 AyuSysConfig(void);
|
9
|
69 ~AyuSysConfig();
|
0
|
70 bool LoadInitFile(void);
|
|
71 /* ¥Ñ¥é¥á¡¼¥¿¤ò¸¡º÷¤¹¤ë */
|
|
72 /* str ¤Ê¤é 1, int ¤Ê¤é 2, ¸«¤Ä¤«¤é¤Ê¤¤¤Ê¤é 0 */
|
|
73 int SearchParam(const char* name) const;
|
|
74 /* ¥Ñ¥é¥á¡¼¥¿¤òÆÀ¤ë */
|
|
75 const char* GetParaStr(const char* name) const; /* str */
|
|
76 int GetParam(const char* name, int deal, ...) const; /* int, error -> return -1, no error -> return 0 */
|
|
77 int GetOriginalParam(const char* name, int deal, ...) const; /* int, error -> return -1, no error -> return 0 */
|
|
78 int GetParaInt(const char* name) const {
|
|
79 int n;
|
|
80 if (GetParam(name,1,&n)) return 0;
|
|
81 return n;
|
|
82 }
|
|
83 const int* GetParamArray(const char* name, int& deal) const;
|
|
84 /* ¥Ñ¥é¥á¡¼¥¿¤òÊѹ¹¤¹¤ë */
|
|
85 void SetParaStr(const char* name, const char* var); /* str */
|
|
86 void SetParam(const char* name, int deal, ...); /* int */
|
|
87 private:
|
|
88 friend class AyuSys;
|
|
89 /* ¸µÀßÄê¤ò¹Ô¤¦ */
|
|
90 /* AyuSys ¤«¤é¤Î¤ß²Äǽ */
|
|
91 void SetOrigParaStr(const char* name, const char* var); /* str */
|
|
92 void SetOrigParam(const char* name, int para_deal, ...); /* int */
|
|
93 void SetOrigParamArray(const char* name, int deal, int* array); /* ¾å¤È¤ª¤Ê¤¸ */
|
|
94 public:
|
|
95
|
|
96 /* ¥ª¥ê¥¸¥Ê¥ë¤ÎÀßÄê´Ø·¸
|
|
97 ** SetOriginal : Á´¤Æ¤ÎÀßÄê¤ò½é¤á¤Î¾õÂÖ¤ËÌ᤹
|
|
98 ** DiffOriginal : ½é¤á¤Î¾õÂ֤ȸ½ºß¤Î¾õÂÖ¤ÎÊѹ¹Ê¬¤òÆÀ¤ë
|
|
99 ** PatchOriginal: DiffOriginal ¤ÇÆÀ¤¿Ê¸»úÎó¤ò°ú¿ô¤Ë
|
|
100 ** ÅϤ¹¡£DiffOriginal ¸Æ¤Ó½Ð¤·»þ¤Î¾õÂÖ¤ËÌ᤹
|
|
101 */
|
|
102 void SetOriginal(void);
|
|
103 void DiffOriginal(std::string&);
|
|
104 const char* PatchOriginal(const char*);
|
|
105 /* config ¤ÎÆâÍƤòɽ¼¨¤¹¤ë */
|
|
106 void Dump(FILE* f) const;
|
|
107 };
|
|
108
|