comparison scn2k/scn2kdump.cc @ 65:4416cfac86ae

Convert EUC-JP files to UTF8
author Thibaut Girka <thib@sitedethib.com>
date Fri, 26 Nov 2010 10:53:15 +0100
parents 15a18fbe6f21
children 281dcd7217df
comparison
equal deleted inserted replaced
64:045ca45f9610 65:4416cfac86ae
121 ARCINFO* info = archive.Find(fname, ""); 121 ARCINFO* info = archive.Find(fname, "");
122 if (info == NULL) continue; 122 if (info == NULL) continue;
123 char* data = info->CopyRead(); 123 char* data = info->CopyRead();
124 char* d = data; 124 char* d = data;
125 char* dend = d + info->Size(); 125 char* dend = d + info->Size();
126 /* version ǧ */ 126 /* version 確認 */
127 if (read_little_endian_int(d) == 0x1cc) { 127 if (read_little_endian_int(d) == 0x1cc) {
128 system_version = 0; 128 system_version = 0;
129 } else if (read_little_endian_int(d) == 0x1d0) { 129 } else if (read_little_endian_int(d) == 0x1d0) {
130 system_version = 1; 130 system_version = 1;
131 } else { 131 } else {
148 { int i; for (i=0; i<100; i++) { 148 { int i; for (i=0; i<100; i++) {
149 int n = read_little_endian_int(data + 0x34 + i*4); 149 int n = read_little_endian_int(data + 0x34 + i*4);
150 if (n != 6) fprintf(stdout,"subroutine table %2d: %6d\n",i,n); 150 if (n != 6) fprintf(stdout,"subroutine table %2d: %6d\n",i,n);
151 }} 151 }}
152 Flags flags; 152 Flags flags;
153 /* ǽ餫Ǹޤǥޥɼ -> Ϥ򷫤֤ */ 153 /* 最初から最後までコマンド取得 -> 出力を繰り返す */
154 while(dcur<dend) { 154 while(dcur<dend) {
155 const char* dprev = dcur; 155 const char* dprev = dcur;
156 CmdD cmd(flags, system_version); cmd.ClearError(); 156 CmdD cmd(flags, system_version); cmd.ClearError();
157 157
158 /* end? */ 158 /* end? */
208 DeleteFaceGraphics 208 DeleteFaceGraphics
209 0x23 - cmd 00-03:03e9:01[ 0] 209 0x23 - cmd 00-03:03e9:01[ 0]
210 KoePlay 210 KoePlay
211 0x23 - cmd 01-17:0000:01[ 2] 211 0x23 - cmd 01-17:0000:01[ 2]
212 args:100000026,5 212 args:100000026,5
213 DrawGraphics(ʲ褢 213 DrawGraphics(前景画あり)
214 0x23 - cmd 01-21:004b:00[ 1] 214 0x23 - cmd 01-21:004b:00[ 1]
215 args:V<18>[1],10,kasane. #1 <args:V<18>[17],11> 215 args:V<18>[1],10,kasane. #1 <args:V<18>[17],11>
216 216
217 DrawGraphics(طʤΤ) 217 DrawGraphics(背景のみ)
218 0x23 - cmd 01-21:0049:00[ 2] 218 0x23 - cmd 01-21:0049:00[ 2]
219 args:V<18>[1],10 219 args:V<18>[1],10
220 220
221 Ruby 221 Ruby
222 0x23 - cmd 00-03:0078:01[ 0] 222 0x23 - cmd 00-03:0078:01[ 0]
223 "ͳ" 223 "理由"
224 0x23 - cmd 00-03:0078:00[ 1] 224 0x23 - cmd 00-03:0078:00[ 1]
225 "櫓" 225 "わけ"
226 SetTitle 226 SetTitle
227 0x23 - cmd 01-04:0000:00[ 1] 227 0x23 - cmd 01-04:0000:00[ 1]
228 args:"Long Long Time Ago..." 228 args:"Long Long Time Ago..."
229 WaitTime 229 WaitTime
230 0x23 - cmd 01-14:0069:00[ 1] 230 0x23 - cmd 01-14:0069:00[ 1]
231 args:3000 231 args:3000
232 ChangeBGM Ͱϥեɥȡλ֤ȿ¬ 232 ChangeBGM 数値引数はフェードアウト、インの時間と推測
233 0x23 - cmd 01-14:0000:02[ 3] 233 0x23 - cmd 01-14:0000:02[ 3]
234 args:"BGM18",700,700 234 args:"BGM18",700,700
235 */ 235 */
236 236
237 struct CmdDescrItem { 237 struct CmdDescrItem {