annotate system/system_config.h @ 47:5f548e5957a8

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