annotate scn2k/scn2k.h @ 52:15a18fbe6f21

* Known bugs added to the README * Code cleaning (0 -> NULL when needed, indentation, spaces, ...)
author thib
date Sat, 18 Apr 2009 18:35:39 +0000
parents f1fbe5b37a1e
children ddbcbd000206
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
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
31 #include <vector>
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
32 #include <string>
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
33 #include <map>
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
34 #include <set>
0
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 */
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
46 class WidText;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
47 class WidButton;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
48 class WidTextButton;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
49 class WidLabel;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
50 class WidDialog;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
51 class WidAnmTime;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
52
0
223b71206888 Initial import
thib
parents:
diff changeset
53 namespace Event {
223b71206888 Initial import
thib
parents:
diff changeset
54 class Container;
223b71206888 Initial import
thib
parents:
diff changeset
55 }
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
56
0
223b71206888 Initial import
thib
parents:
diff changeset
57 class PicBase;
223b71206888 Initial import
thib
parents:
diff changeset
58 class PicContainer;
223b71206888 Initial import
thib
parents:
diff changeset
59 class AyuSysConfig;
223b71206888 Initial import
thib
parents:
diff changeset
60 class Surface;
223b71206888 Initial import
thib
parents:
diff changeset
61
223b71206888 Initial import
thib
parents:
diff changeset
62 void dprintf(const char* fmt, ...);
223b71206888 Initial import
thib
parents:
diff changeset
63 void eprintf(const char* fmt, ...);
223b71206888 Initial import
thib
parents:
diff changeset
64
223b71206888 Initial import
thib
parents:
diff changeset
65 struct VarInfo {
223b71206888 Initial import
thib
parents:
diff changeset
66 #define TYPE_NONSYSVARMAX 5
223b71206888 Initial import
thib
parents:
diff changeset
67 #define TYPE_VARMAX 9
223b71206888 Initial import
thib
parents:
diff changeset
68 #define TYPE_VARLOCSTR 10
223b71206888 Initial import
thib
parents:
diff changeset
69 #define TYPE_VARSYSSTR 12
223b71206888 Initial import
thib
parents:
diff changeset
70 #define TYPE_VARSTR 18
223b71206888 Initial import
thib
parents:
diff changeset
71 #define TYPE_STR 58
223b71206888 Initial import
thib
parents:
diff changeset
72 #define TYPE_VAL 68
223b71206888 Initial import
thib
parents:
diff changeset
73 #define TYPE_SYS 0xc8
223b71206888 Initial import
thib
parents:
diff changeset
74 #define TYPE_END 0x7f
223b71206888 Initial import
thib
parents:
diff changeset
75
223b71206888 Initial import
thib
parents:
diff changeset
76 #define TYPE_SYS_SYS 0
223b71206888 Initial import
thib
parents:
diff changeset
77 #define TYPE_SYS_SKIPMODE 1
223b71206888 Initial import
thib
parents:
diff changeset
78 int type;
223b71206888 Initial import
thib
parents:
diff changeset
79 int number;
223b71206888 Initial import
thib
parents:
diff changeset
80 int value;
223b71206888 Initial import
thib
parents:
diff changeset
81 VarInfo() { type = TYPE_VAL; value = 0;}
223b71206888 Initial import
thib
parents:
diff changeset
82 VarInfo(int n) { type = TYPE_VAL; value = n;}
223b71206888 Initial import
thib
parents:
diff changeset
83 VarInfo(const VarInfo& i) { type = i.type; number = i.number; value = i.value;}
223b71206888 Initial import
thib
parents:
diff changeset
84 };
223b71206888 Initial import
thib
parents:
diff changeset
85 class Flags {
223b71206888 Initial import
thib
parents:
diff changeset
86 /* flag:
223b71206888 Initial import
thib
parents:
diff changeset
87 ** type 0-5 : ローカル整数、各2000個
223b71206888 Initial import
thib
parents:
diff changeset
88 ** type 6, 25 : グローバル整数、2000個
223b71206888 Initial import
thib
parents:
diff changeset
89 ** type 10,11: ローカル整数??、各2000個
223b71206888 Initial import
thib
parents:
diff changeset
90 ** type 12 : グローバル文字列、2000個 (今は無視しても良いが)
223b71206888 Initial import
thib
parents:
diff changeset
91 ** type 18 : ローカル文字列、2000個
223b71206888 Initial import
thib
parents:
diff changeset
92 ** type 25: システム変数(マウス座標など?) 1000 個?
223b71206888 Initial import
thib
parents:
diff changeset
93 ** type 26-32, 51 : 1-bit access to 0-6, 25
223b71206888 Initial import
thib
parents:
diff changeset
94 ** type 52-58, 77 : 2-bit access to 0-6, 25
223b71206888 Initial import
thib
parents:
diff changeset
95 ** type 78-84, 103 : 4-bit access to 0-6, 25
223b71206888 Initial import
thib
parents:
diff changeset
96 ** type 104-110, 129 : 8-bit access to 0-6, 25
223b71206888 Initial import
thib
parents:
diff changeset
97 */
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
98 private:
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
99 typedef unsigned int uint;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
100 int sys;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
101 int var[TYPE_VARMAX+1][2000];
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
102 std::string str[2000];
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
103 std::string sys_str[2000];
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
104 std::string loc_str[3];
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
105 public:
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
106 Flags(void);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
107 int operator () () const;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
108 int operator () (VarInfo info) const;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
109 void Str(int type, unsigned int number, char* buf, int sz) const;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
110 std::string Str(int type, unsigned int number) const;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
111 std::set<int> cgm_data;
0
223b71206888 Initial import
thib
parents:
diff changeset
112
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
113 bool IsInt(int type) const;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
114 int MaxIndex(int type) const;
0
223b71206888 Initial import
thib
parents:
diff changeset
115
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
116 void Set(VarInfo info, int value);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
117 int Get(int type, int number) const;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
118 void SetSys(int value);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
119 void SetStr(VarInfo info, std::string val);
0
223b71206888 Initial import
thib
parents:
diff changeset
120
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
121 bool Exec(class Cmd& cmd);
0
223b71206888 Initial import
thib
parents:
diff changeset
122
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
123 void Save(std::string& str);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
124 void Load(const char* str);
0
223b71206888 Initial import
thib
parents:
diff changeset
125
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
126 void SaveSys(std::string& str);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
127 void LoadSys(const char* str);
0
223b71206888 Initial import
thib
parents:
diff changeset
128 };
223b71206888 Initial import
thib
parents:
diff changeset
129
223b71206888 Initial import
thib
parents:
diff changeset
130 /* commands */
223b71206888 Initial import
thib
parents:
diff changeset
131 #define STRHEAP_SIZE 10000
223b71206888 Initial import
thib
parents:
diff changeset
132 enum Cmdtype {
223b71206888 Initial import
thib
parents:
diff changeset
133 CMD_NOP, CMD_FLAGS, CMD_JMP, CMD_TEXT, CMD_OTHER, CMD_SYSVAR,
223b71206888 Initial import
thib
parents:
diff changeset
134 CMD_TEXTEND,
223b71206888 Initial import
thib
parents:
diff changeset
135 CMD_SAVECMDGRP, CMD_SAVECMDGRP_START, CMD_SAVECMDGRP_ONCE, CMD_SAVECMD_ONCE, CMD_WAITFRAMEUPDATE,CMD_SAVEPOINT, CMD_ROLLBACKPOINT,
223b71206888 Initial import
thib
parents:
diff changeset
136 CMD_SAVEREQ, CMD_SAVE,
223b71206888 Initial import
thib
parents:
diff changeset
137 CMD_LOADREQ, CMD_LOAD,
223b71206888 Initial import
thib
parents:
diff changeset
138 CMD_MENUREQ,
223b71206888 Initial import
thib
parents:
diff changeset
139 CMD_BACKLOGREQ, CMD_BACKLOGREQ_FWD,
223b71206888 Initial import
thib
parents:
diff changeset
140 CMD_END};
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
141
0
223b71206888 Initial import
thib
parents:
diff changeset
142 struct CmdSimplified { // Cmd 保存用
223b71206888 Initial import
thib
parents:
diff changeset
143 int type, cmd1, cmd2, cmd3, cmd4, argc;
223b71206888 Initial import
thib
parents:
diff changeset
144 char* args;
223b71206888 Initial import
thib
parents:
diff changeset
145 void Save(std::string& save);
223b71206888 Initial import
thib
parents:
diff changeset
146 void Load(const char* save, char*& args_buffer);
223b71206888 Initial import
thib
parents:
diff changeset
147 void copy(const CmdSimplified& from, char*& args_buffer);
223b71206888 Initial import
thib
parents:
diff changeset
148 };
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
149
0
223b71206888 Initial import
thib
parents:
diff changeset
150 class Cmd {
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
151 public:
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
152 Cmdtype cmd_type;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
153 int cmd1, cmd2, cmd3, cmd4;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
154 int argc;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
155 int pos, scn;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
156 const char* rawdata;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
157 char cmdstr[1024];
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
158 std::vector<VarInfo> args;
0
223b71206888 Initial import
thib
parents:
diff changeset
159
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
160 private:
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
161 const Flags& flags;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
162 bool errorflag;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
163 int system_version;
0
223b71206888 Initial import
thib
parents:
diff changeset
164
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
165 int GetArgs(const char*& d);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
166 int GetArgsSpecial(int normal_args,const char*& d);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
167 void GetSelection(const char*& d);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
168 int GetSwitch(const char*& d);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
169 int GetSimpleSwitch(const char*& d);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
170 int GetExpression(const char*& d, struct VarInfo* info = 0);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
171 int GetExpressionCond(const char*& d);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
172 int GetLeftToken(const char*& d, struct VarInfo& info);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
173 int GetString(const char*& d);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
174 int CopyString(const char* d);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
175 int StrVar(int type, int number);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
176 static char strtype[256];
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
177 static int StrType(const char* d) { return strtype[*(unsigned const char*)d];}
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
178
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
179 public:
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
180 const char* Str(const VarInfo& info) const;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
181 int AddStr(char* s);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
182 private:
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
183 char strheap[STRHEAP_SIZE];
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
184 int strend;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
185 void SetError(void) { errorflag = true;}
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
186 void ResetString(void) {
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
187 strend = 0;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
188 }
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
189 public:
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
190 void GetCmd(Flags& f, const char*& d);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
191 void SetSysvar(int n, int v);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
192 void SetSysvar(int v) { SetSysvar(TYPE_SYS_SYS, v); }
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
193 void SetFlagvar(VarInfo info, int v);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
194 void SetStrvar(VarInfo info, const std::string& s);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
195 bool IsError() { return errorflag;}
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
196 void clear(void);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
197 virtual const char * CmdDescr(int, int, int, int) { return "Not supported"; }
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
198 Cmd(const Flags& f, int _sys_ver);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
199 void read(const CmdSimplified& cmd);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
200 void write(CmdSimplified& cmd, char*& args_buffer) const;
0
223b71206888 Initial import
thib
parents:
diff changeset
201 };
223b71206888 Initial import
thib
parents:
diff changeset
202
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
203 enum SkipMode {
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
204 SKIP_NO=0, SKIP_TEXT=1, SKIP_GRP_FAST=16, SKIP_GRP_NOEFFEC=32,
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
205 SKIP_GRP_NODRAW=64, SKIPEND_TEXT=256, SKIPEND_KEY=512, SKIP_IN_MENU=1024
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
206 };
0
223b71206888 Initial import
thib
parents:
diff changeset
207
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
208 #include "font/text.h"
0
223b71206888 Initial import
thib
parents:
diff changeset
209
223b71206888 Initial import
thib
parents:
diff changeset
210 struct BacklogItem {
223b71206888 Initial import
thib
parents:
diff changeset
211 enum {SaveSelect = -2};
223b71206888 Initial import
thib
parents:
diff changeset
212 int scn, pos;
223b71206888 Initial import
thib
parents:
diff changeset
213 int koe;
223b71206888 Initial import
thib
parents:
diff changeset
214 std::string face;
223b71206888 Initial import
thib
parents:
diff changeset
215 struct TextStream text;
223b71206888 Initial import
thib
parents:
diff changeset
216 BacklogItem(void);
223b71206888 Initial import
thib
parents:
diff changeset
217 void Clear(void);
223b71206888 Initial import
thib
parents:
diff changeset
218 void AddTextPos(Cmd&);
223b71206888 Initial import
thib
parents:
diff changeset
219 void DeleteTextPos();
223b71206888 Initial import
thib
parents:
diff changeset
220 void SetSavepos(int pos);
223b71206888 Initial import
thib
parents:
diff changeset
221 BacklogItem& operator =(const BacklogItem&);
223b71206888 Initial import
thib
parents:
diff changeset
222 };
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
223
0
223b71206888 Initial import
thib
parents:
diff changeset
224 class Text {
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
225 private:
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
226 class TextImpl* pimpl;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
227 public:
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
228 std::vector<BacklogItem> backlog;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
229 BacklogItem backlog_item;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
230 Text(Event::Container& _event, PicContainer& _parent, AyuSysConfig& config);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
231 ~Text();
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
232 void InitWindow(void);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
233 void Exec(Cmd& cmd);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
234 bool Wait(unsigned int current_time, Cmd& cmd);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
235 void SetSkipMode(SkipMode mode);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
236 void hide(void);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
237 void show(void);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
238 void show(int num);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
239 void Save(std::string& str, bool rollback_save);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
240 void Load(const char* str);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
241 void DrawBacklog(BacklogItem& item, Cmd& cmd);
0
223b71206888 Initial import
thib
parents:
diff changeset
242 };
223b71206888 Initial import
thib
parents:
diff changeset
243
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
244 #include "../window/rect.h"
0
223b71206888 Initial import
thib
parents:
diff changeset
245
223b71206888 Initial import
thib
parents:
diff changeset
246 class Grp {
52
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
247 private:
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
248 class GrpImpl* pimpl;
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
249 public:
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
250 Grp(Event::Container& _event, PicContainer& _parent, const Flags& f, std::set<int>& _cgm_data, class MuSys& mu, AyuSysConfig& config);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
251 ~Grp();
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
252 bool Wait(unsigned int current_time, Cmd& cmd);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
253 void Exec(Cmd& cmd);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
254 void SetSkipMode(SkipMode mode);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
255 void InitSel(AyuSysConfig& config);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
256 void Save(std::string& str);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
257 void Load(const char* str);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
258 void SaveSys(std::string& str);
15a18fbe6f21 * Known bugs added to the README
thib
parents: 33
diff changeset
259 void LoadSys(const char* str);
0
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