annotate scn2k/scn2k.h @ 50:35ce1a30f3f9

* Added va_end where there is a va_start * Used NULL instead of 0 (so it works on 64b)
author thib
date Fri, 17 Apr 2009 18:38:06 +0000
parents f1fbe5b37a1e
children 15a18fbe6f21
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
33
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
1 /*
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
2 * Copyright (c) 2004-2006 Kazunori "jagarl" Ueno
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
3 * All rights reserved.
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
4 *
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
5 * Redistribution and use in source and binary forms, with or without
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
6 * modification, are permitted provided that the following conditions
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
7 * are met:
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
8 * 1. Redistributions of source code must retain the above copyright
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
9 * notice, this list of conditions and the following disclaimer.
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
10 * 2. Redistributions in binary form must reproduce the above copyright
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
11 * notice, this list of conditions and the following disclaimer in the
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
12 * documentation and/or other materials provided with the distribution.
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
13 * 3. The name of the author may not be used to endorse or promote products
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
14 * derived from this software without specific prior written permission.
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
15 *
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
26 */
f1fbe5b37a1e * Added license headers/informations
thib
parents: 29
diff changeset
27
0
223b71206888 Initial import
thib
parents:
diff changeset
28 #ifndef __SCN2k_H__
223b71206888 Initial import
thib
parents:
diff changeset
29 #define __SCN2k_H__
223b71206888 Initial import
thib
parents:
diff changeset
30
223b71206888 Initial import
thib
parents:
diff changeset
31 #include<vector>
223b71206888 Initial import
thib
parents:
diff changeset
32 #include<string>
223b71206888 Initial import
thib
parents:
diff changeset
33 #include<map>
223b71206888 Initial import
thib
parents:
diff changeset
34 #include<set>
223b71206888 Initial import
thib
parents:
diff changeset
35
223b71206888 Initial import
thib
parents:
diff changeset
36 /*
223b71206888 Initial import
thib
parents:
diff changeset
37 namespace Widget {
223b71206888 Initial import
thib
parents:
diff changeset
38 class Text;
223b71206888 Initial import
thib
parents:
diff changeset
39 class Button;
223b71206888 Initial import
thib
parents:
diff changeset
40 class TextButton;
223b71206888 Initial import
thib
parents:
diff changeset
41 class Label;
223b71206888 Initial import
thib
parents:
diff changeset
42 class Dialog;
223b71206888 Initial import
thib
parents:
diff changeset
43 class AnmTime;
223b71206888 Initial import
thib
parents:
diff changeset
44 }
223b71206888 Initial import
thib
parents:
diff changeset
45 */
223b71206888 Initial import
thib
parents:
diff changeset
46 class WidText;
223b71206888 Initial import
thib
parents:
diff changeset
47 class WidButton;
223b71206888 Initial import
thib
parents:
diff changeset
48 class WidTextButton;
223b71206888 Initial import
thib
parents:
diff changeset
49 class WidLabel;
223b71206888 Initial import
thib
parents:
diff changeset
50 class WidDialog;
223b71206888 Initial import
thib
parents:
diff changeset
51 class WidAnmTime;
223b71206888 Initial import
thib
parents:
diff changeset
52 namespace Event {
223b71206888 Initial import
thib
parents:
diff changeset
53 class Container;
223b71206888 Initial import
thib
parents:
diff changeset
54 }
223b71206888 Initial import
thib
parents:
diff changeset
55 class PicBase;
223b71206888 Initial import
thib
parents:
diff changeset
56 class PicContainer;
223b71206888 Initial import
thib
parents:
diff changeset
57 class AyuSysConfig;
223b71206888 Initial import
thib
parents:
diff changeset
58 class Surface;
223b71206888 Initial import
thib
parents:
diff changeset
59
223b71206888 Initial import
thib
parents:
diff changeset
60 void dprintf(const char* fmt, ...);
223b71206888 Initial import
thib
parents:
diff changeset
61 void eprintf(const char* fmt, ...);
223b71206888 Initial import
thib
parents:
diff changeset
62
223b71206888 Initial import
thib
parents:
diff changeset
63 struct VarInfo {
223b71206888 Initial import
thib
parents:
diff changeset
64 #define TYPE_NONSYSVARMAX 5
223b71206888 Initial import
thib
parents:
diff changeset
65 #define TYPE_VARMAX 9
223b71206888 Initial import
thib
parents:
diff changeset
66 #define TYPE_VARLOCSTR 10
223b71206888 Initial import
thib
parents:
diff changeset
67 #define TYPE_VARSYSSTR 12
223b71206888 Initial import
thib
parents:
diff changeset
68 #define TYPE_VARSTR 18
223b71206888 Initial import
thib
parents:
diff changeset
69 #define TYPE_STR 58
223b71206888 Initial import
thib
parents:
diff changeset
70 #define TYPE_VAL 68
223b71206888 Initial import
thib
parents:
diff changeset
71 #define TYPE_SYS 0xc8
223b71206888 Initial import
thib
parents:
diff changeset
72 #define TYPE_END 0x7f
223b71206888 Initial import
thib
parents:
diff changeset
73
223b71206888 Initial import
thib
parents:
diff changeset
74 #define TYPE_SYS_SYS 0
223b71206888 Initial import
thib
parents:
diff changeset
75 #define TYPE_SYS_SKIPMODE 1
223b71206888 Initial import
thib
parents:
diff changeset
76 int type;
223b71206888 Initial import
thib
parents:
diff changeset
77 int number;
223b71206888 Initial import
thib
parents:
diff changeset
78 int value;
223b71206888 Initial import
thib
parents:
diff changeset
79 VarInfo() { type = TYPE_VAL; value = 0;}
223b71206888 Initial import
thib
parents:
diff changeset
80 VarInfo(int n) { type = TYPE_VAL; value = n;}
223b71206888 Initial import
thib
parents:
diff changeset
81 VarInfo(const VarInfo& i) { type = i.type; number = i.number; value = i.value;}
223b71206888 Initial import
thib
parents:
diff changeset
82 };
223b71206888 Initial import
thib
parents:
diff changeset
83 class Flags {
223b71206888 Initial import
thib
parents:
diff changeset
84 /* flag:
223b71206888 Initial import
thib
parents:
diff changeset
85 ** type 0-5 : ローカル整数、各2000個
223b71206888 Initial import
thib
parents:
diff changeset
86 ** type 6, 25 : グローバル整数、2000個
223b71206888 Initial import
thib
parents:
diff changeset
87 ** type 10,11: ローカル整数??、各2000個
223b71206888 Initial import
thib
parents:
diff changeset
88 ** type 12 : グローバル文字列、2000個 (今は無視しても良いが)
223b71206888 Initial import
thib
parents:
diff changeset
89 ** type 18 : ローカル文字列、2000個
223b71206888 Initial import
thib
parents:
diff changeset
90 ** type 25: システム変数(マウス座標など?) 1000 個?
223b71206888 Initial import
thib
parents:
diff changeset
91 ** type 26-32, 51 : 1-bit access to 0-6, 25
223b71206888 Initial import
thib
parents:
diff changeset
92 ** type 52-58, 77 : 2-bit access to 0-6, 25
223b71206888 Initial import
thib
parents:
diff changeset
93 ** type 78-84, 103 : 4-bit access to 0-6, 25
223b71206888 Initial import
thib
parents:
diff changeset
94 ** type 104-110, 129 : 8-bit access to 0-6, 25
223b71206888 Initial import
thib
parents:
diff changeset
95 */
223b71206888 Initial import
thib
parents:
diff changeset
96 typedef unsigned int uint;
223b71206888 Initial import
thib
parents:
diff changeset
97 int sys;
223b71206888 Initial import
thib
parents:
diff changeset
98 int var[TYPE_VARMAX+1][2000];
223b71206888 Initial import
thib
parents:
diff changeset
99 std::string str[2000];
223b71206888 Initial import
thib
parents:
diff changeset
100 std::string sys_str[2000];
223b71206888 Initial import
thib
parents:
diff changeset
101 std::string loc_str[3];
223b71206888 Initial import
thib
parents:
diff changeset
102 public:
223b71206888 Initial import
thib
parents:
diff changeset
103 Flags(void);
223b71206888 Initial import
thib
parents:
diff changeset
104 int operator () () const;
223b71206888 Initial import
thib
parents:
diff changeset
105 int operator () (VarInfo info) const;
223b71206888 Initial import
thib
parents:
diff changeset
106 void Str(int type, unsigned int number, char* buf, int sz) const;
223b71206888 Initial import
thib
parents:
diff changeset
107 std::string Str(int type, unsigned int number) const;
223b71206888 Initial import
thib
parents:
diff changeset
108 std::set<int> cgm_data;
223b71206888 Initial import
thib
parents:
diff changeset
109
223b71206888 Initial import
thib
parents:
diff changeset
110 bool IsInt(int type) const;
223b71206888 Initial import
thib
parents:
diff changeset
111 int MaxIndex(int type) const;
223b71206888 Initial import
thib
parents:
diff changeset
112
223b71206888 Initial import
thib
parents:
diff changeset
113 void Set(VarInfo info, int value);
223b71206888 Initial import
thib
parents:
diff changeset
114 int Get(int type, int number) const;
223b71206888 Initial import
thib
parents:
diff changeset
115 void SetSys(int value);
223b71206888 Initial import
thib
parents:
diff changeset
116 void SetStr(VarInfo info, std::string val);
223b71206888 Initial import
thib
parents:
diff changeset
117
223b71206888 Initial import
thib
parents:
diff changeset
118 bool Exec(class Cmd& cmd);
223b71206888 Initial import
thib
parents:
diff changeset
119
223b71206888 Initial import
thib
parents:
diff changeset
120 void Save(std::string& str);
223b71206888 Initial import
thib
parents:
diff changeset
121 void Load(const char* str);
223b71206888 Initial import
thib
parents:
diff changeset
122
223b71206888 Initial import
thib
parents:
diff changeset
123 void SaveSys(std::string& str);
223b71206888 Initial import
thib
parents:
diff changeset
124 void LoadSys(const char* str);
223b71206888 Initial import
thib
parents:
diff changeset
125 };
223b71206888 Initial import
thib
parents:
diff changeset
126
223b71206888 Initial import
thib
parents:
diff changeset
127 /* commands */
223b71206888 Initial import
thib
parents:
diff changeset
128 #define STRHEAP_SIZE 10000
223b71206888 Initial import
thib
parents:
diff changeset
129 enum Cmdtype {
223b71206888 Initial import
thib
parents:
diff changeset
130 CMD_NOP, CMD_FLAGS, CMD_JMP, CMD_TEXT, CMD_OTHER, CMD_SYSVAR,
223b71206888 Initial import
thib
parents:
diff changeset
131 CMD_TEXTEND,
223b71206888 Initial import
thib
parents:
diff changeset
132 CMD_SAVECMDGRP, CMD_SAVECMDGRP_START, CMD_SAVECMDGRP_ONCE, CMD_SAVECMD_ONCE, CMD_WAITFRAMEUPDATE,CMD_SAVEPOINT, CMD_ROLLBACKPOINT,
223b71206888 Initial import
thib
parents:
diff changeset
133 CMD_SAVEREQ, CMD_SAVE,
223b71206888 Initial import
thib
parents:
diff changeset
134 CMD_LOADREQ, CMD_LOAD,
223b71206888 Initial import
thib
parents:
diff changeset
135 CMD_MENUREQ,
223b71206888 Initial import
thib
parents:
diff changeset
136 CMD_BACKLOGREQ, CMD_BACKLOGREQ_FWD,
223b71206888 Initial import
thib
parents:
diff changeset
137 CMD_END};
223b71206888 Initial import
thib
parents:
diff changeset
138 struct CmdSimplified { // Cmd 保存用
223b71206888 Initial import
thib
parents:
diff changeset
139 int type, cmd1, cmd2, cmd3, cmd4, argc;
223b71206888 Initial import
thib
parents:
diff changeset
140 char* args;
223b71206888 Initial import
thib
parents:
diff changeset
141 void Save(std::string& save);
223b71206888 Initial import
thib
parents:
diff changeset
142 void Load(const char* save, char*& args_buffer);
223b71206888 Initial import
thib
parents:
diff changeset
143 void copy(const CmdSimplified& from, char*& args_buffer);
223b71206888 Initial import
thib
parents:
diff changeset
144 };
223b71206888 Initial import
thib
parents:
diff changeset
145 class Cmd {
223b71206888 Initial import
thib
parents:
diff changeset
146 public:
223b71206888 Initial import
thib
parents:
diff changeset
147 Cmdtype cmd_type;
223b71206888 Initial import
thib
parents:
diff changeset
148 int cmd1, cmd2, cmd3, cmd4;
223b71206888 Initial import
thib
parents:
diff changeset
149 int argc;
223b71206888 Initial import
thib
parents:
diff changeset
150 int pos, scn;
223b71206888 Initial import
thib
parents:
diff changeset
151 const char* rawdata;
223b71206888 Initial import
thib
parents:
diff changeset
152 char cmdstr[1024];
223b71206888 Initial import
thib
parents:
diff changeset
153 std::vector<VarInfo> args;
223b71206888 Initial import
thib
parents:
diff changeset
154
223b71206888 Initial import
thib
parents:
diff changeset
155 private:
223b71206888 Initial import
thib
parents:
diff changeset
156 const Flags& flags;
223b71206888 Initial import
thib
parents:
diff changeset
157 bool errorflag;
223b71206888 Initial import
thib
parents:
diff changeset
158 int system_version;
223b71206888 Initial import
thib
parents:
diff changeset
159
223b71206888 Initial import
thib
parents:
diff changeset
160 int GetArgs(const char*& d);
223b71206888 Initial import
thib
parents:
diff changeset
161 int GetArgsSpecial(int normal_args,const char*& d);
223b71206888 Initial import
thib
parents:
diff changeset
162 void GetSelection(const char*& d);
223b71206888 Initial import
thib
parents:
diff changeset
163 int GetSwitch(const char*& d);
223b71206888 Initial import
thib
parents:
diff changeset
164 int GetSimpleSwitch(const char*& d);
223b71206888 Initial import
thib
parents:
diff changeset
165 int GetExpression(const char*& d, struct VarInfo* info = 0);
223b71206888 Initial import
thib
parents:
diff changeset
166 int GetExpressionCond(const char*& d);
223b71206888 Initial import
thib
parents:
diff changeset
167 int GetLeftToken(const char*& d, struct VarInfo& info);
223b71206888 Initial import
thib
parents:
diff changeset
168 int GetString(const char*& d);
223b71206888 Initial import
thib
parents:
diff changeset
169 int CopyString(const char* d);
223b71206888 Initial import
thib
parents:
diff changeset
170 int StrVar(int type, int number);
223b71206888 Initial import
thib
parents:
diff changeset
171 static char strtype[256];
223b71206888 Initial import
thib
parents:
diff changeset
172 static int StrType(const char* d) { return strtype[*(unsigned const char*)d];}
223b71206888 Initial import
thib
parents:
diff changeset
173 public:
223b71206888 Initial import
thib
parents:
diff changeset
174 const char* Str(const VarInfo& info) const {
223b71206888 Initial import
thib
parents:
diff changeset
175 if (info.type != TYPE_STR && info.type != TYPE_VARSTR && info.type != TYPE_VARLOCSTR && info.type != TYPE_VARSYSSTR) return "";
223b71206888 Initial import
thib
parents:
diff changeset
176 int pt = info.value;
223b71206888 Initial import
thib
parents:
diff changeset
177 if (pt < 0 || pt >= STRHEAP_SIZE) return "";
223b71206888 Initial import
thib
parents:
diff changeset
178 return strheap + pt;
223b71206888 Initial import
thib
parents:
diff changeset
179 }
223b71206888 Initial import
thib
parents:
diff changeset
180 int AddStr(char* s) {
223b71206888 Initial import
thib
parents:
diff changeset
181 // 1-0a-0064 はこういうものが必要らしい
223b71206888 Initial import
thib
parents:
diff changeset
182 int start = strend;
223b71206888 Initial import
thib
parents:
diff changeset
183 while (*s) strheap[strend++] = *s++;
223b71206888 Initial import
thib
parents:
diff changeset
184 strheap[strend++] = 0;
223b71206888 Initial import
thib
parents:
diff changeset
185 return start;
223b71206888 Initial import
thib
parents:
diff changeset
186 }
223b71206888 Initial import
thib
parents:
diff changeset
187 private:
223b71206888 Initial import
thib
parents:
diff changeset
188 char strheap[STRHEAP_SIZE];
223b71206888 Initial import
thib
parents:
diff changeset
189 int strend;
223b71206888 Initial import
thib
parents:
diff changeset
190 void SetError(void) { errorflag = true;}
223b71206888 Initial import
thib
parents:
diff changeset
191 void ResetString(void) {
223b71206888 Initial import
thib
parents:
diff changeset
192 strend = 0;
223b71206888 Initial import
thib
parents:
diff changeset
193 }
223b71206888 Initial import
thib
parents:
diff changeset
194 public:
223b71206888 Initial import
thib
parents:
diff changeset
195 void GetCmd(Flags& f, const char*& d);
223b71206888 Initial import
thib
parents:
diff changeset
196 void SetSysvar(int n, int v);
223b71206888 Initial import
thib
parents:
diff changeset
197 void SetSysvar(int v) { SetSysvar(TYPE_SYS_SYS, v); }
223b71206888 Initial import
thib
parents:
diff changeset
198 void SetFlagvar(VarInfo info, int v);
223b71206888 Initial import
thib
parents:
diff changeset
199 void SetStrvar(VarInfo info, const std::string& s);
223b71206888 Initial import
thib
parents:
diff changeset
200 bool IsError() { return errorflag;}
223b71206888 Initial import
thib
parents:
diff changeset
201 void clear(void);
29
d229cce98f50 * no more (or, at least, less) duplicate code between scn2kdump and the rest
thib
parents: 0
diff changeset
202 virtual const char * CmdDescr(int, int, int, int) { return "Not supported"; }
0
223b71206888 Initial import
thib
parents:
diff changeset
203 Cmd(const Flags& f, int _sys_ver) : flags(f), system_version(_sys_ver) { cmd_type = CMD_NOP; argc = 0; errorflag = false; cmdstr[0] = 0; strend = 0; pos = -1;}
223b71206888 Initial import
thib
parents:
diff changeset
204 void read(const CmdSimplified& cmd);
223b71206888 Initial import
thib
parents:
diff changeset
205 void write(CmdSimplified& cmd, char*& args_buffer) const;
223b71206888 Initial import
thib
parents:
diff changeset
206 };
223b71206888 Initial import
thib
parents:
diff changeset
207
223b71206888 Initial import
thib
parents:
diff changeset
208 enum SkipMode {SKIP_NO=0, SKIP_TEXT=1, SKIP_GRP_FAST=16, SKIP_GRP_NOEFFEC=32, SKIP_GRP_NODRAW=64, SKIPEND_TEXT=256, SKIPEND_KEY=512,
223b71206888 Initial import
thib
parents:
diff changeset
209 SKIP_IN_MENU=1024};
223b71206888 Initial import
thib
parents:
diff changeset
210
223b71206888 Initial import
thib
parents:
diff changeset
211 #include"font/text.h"
223b71206888 Initial import
thib
parents:
diff changeset
212
223b71206888 Initial import
thib
parents:
diff changeset
213 struct BacklogItem {
223b71206888 Initial import
thib
parents:
diff changeset
214 enum {SaveSelect = -2};
223b71206888 Initial import
thib
parents:
diff changeset
215 int scn, pos;
223b71206888 Initial import
thib
parents:
diff changeset
216 int koe;
223b71206888 Initial import
thib
parents:
diff changeset
217 std::string face;
223b71206888 Initial import
thib
parents:
diff changeset
218 struct TextStream text;
223b71206888 Initial import
thib
parents:
diff changeset
219 BacklogItem(void);
223b71206888 Initial import
thib
parents:
diff changeset
220 void Clear(void);
223b71206888 Initial import
thib
parents:
diff changeset
221 void AddTextPos(Cmd&);
223b71206888 Initial import
thib
parents:
diff changeset
222 void DeleteTextPos();
223b71206888 Initial import
thib
parents:
diff changeset
223 void SetSavepos(int pos);
223b71206888 Initial import
thib
parents:
diff changeset
224 BacklogItem& operator =(const BacklogItem&);
223b71206888 Initial import
thib
parents:
diff changeset
225 };
223b71206888 Initial import
thib
parents:
diff changeset
226 class Text {
223b71206888 Initial import
thib
parents:
diff changeset
227 class TextImpl* pimpl;
223b71206888 Initial import
thib
parents:
diff changeset
228 public:
223b71206888 Initial import
thib
parents:
diff changeset
229 std::vector<BacklogItem> backlog;
223b71206888 Initial import
thib
parents:
diff changeset
230 BacklogItem backlog_item;
223b71206888 Initial import
thib
parents:
diff changeset
231 Text(Event::Container& _event, PicContainer& _parent, AyuSysConfig& config);
223b71206888 Initial import
thib
parents:
diff changeset
232 ~Text();
223b71206888 Initial import
thib
parents:
diff changeset
233 void InitWindow(void);
223b71206888 Initial import
thib
parents:
diff changeset
234 void Exec(Cmd& cmd);
223b71206888 Initial import
thib
parents:
diff changeset
235 bool Wait(unsigned int current_time, Cmd& cmd);
223b71206888 Initial import
thib
parents:
diff changeset
236 void SetSkipMode(SkipMode mode);
223b71206888 Initial import
thib
parents:
diff changeset
237 void hide(void);
223b71206888 Initial import
thib
parents:
diff changeset
238 void show(void);
223b71206888 Initial import
thib
parents:
diff changeset
239 void show(int num);
223b71206888 Initial import
thib
parents:
diff changeset
240 void Save(std::string& str, bool rollback_save);
223b71206888 Initial import
thib
parents:
diff changeset
241 void Load(const char* str);
223b71206888 Initial import
thib
parents:
diff changeset
242 void DrawBacklog(BacklogItem& item, Cmd& cmd);
223b71206888 Initial import
thib
parents:
diff changeset
243 };
223b71206888 Initial import
thib
parents:
diff changeset
244
223b71206888 Initial import
thib
parents:
diff changeset
245 #include"../window/rect.h"
223b71206888 Initial import
thib
parents:
diff changeset
246
223b71206888 Initial import
thib
parents:
diff changeset
247 class Grp {
223b71206888 Initial import
thib
parents:
diff changeset
248 class GrpImpl* pimpl;
223b71206888 Initial import
thib
parents:
diff changeset
249 public:
223b71206888 Initial import
thib
parents:
diff changeset
250 Grp(Event::Container& _event, PicContainer& _parent, const Flags& f, std::set<int>& _cgm_data, class MuSys& mu, AyuSysConfig& config);
223b71206888 Initial import
thib
parents:
diff changeset
251 ~Grp();
223b71206888 Initial import
thib
parents:
diff changeset
252 bool Wait(unsigned int current_time, Cmd& cmd);
223b71206888 Initial import
thib
parents:
diff changeset
253 void Exec(Cmd& cmd);
223b71206888 Initial import
thib
parents:
diff changeset
254 void SetSkipMode(SkipMode mode);
223b71206888 Initial import
thib
parents:
diff changeset
255 void InitSel(AyuSysConfig& config);
223b71206888 Initial import
thib
parents:
diff changeset
256 void Save(std::string& str);
223b71206888 Initial import
thib
parents:
diff changeset
257 void Load(const char* str);
223b71206888 Initial import
thib
parents:
diff changeset
258 void SaveSys(std::string& str);
223b71206888 Initial import
thib
parents:
diff changeset
259 void LoadSys(const char* str);
223b71206888 Initial import
thib
parents:
diff changeset
260 };
223b71206888 Initial import
thib
parents:
diff changeset
261
223b71206888 Initial import
thib
parents:
diff changeset
262 void dprintf(const char* fmt, ...); // debug 用
223b71206888 Initial import
thib
parents:
diff changeset
263 void eprintf(const char* fmt, ...); // コマンド実行(XXXexec)追跡用
223b71206888 Initial import
thib
parents:
diff changeset
264 #endif