Mercurial > otakunoraifu
comparison scn2k/scn2k_grp.cc @ 20:824b89018ea8
* CG completion percentage (maybe not working properly?)
* Removed unneeded files from the SVN
author | thib |
---|---|
date | Fri, 24 Oct 2008 16:59:14 +0000 |
parents | 4d7486cb20a9 |
children | f45da03ca631 |
comparison
equal
deleted
inserted
replaced
19:94fe9153efa5 | 20:824b89018ea8 |
---|---|
177 | 177 |
178 // cgmode 用画像処理関連 | 178 // cgmode 用画像処理関連 |
179 void LoadCgm(AyuSysConfig& config); | 179 void LoadCgm(AyuSysConfig& config); |
180 std::map<std::string, int> cgm_info; | 180 std::map<std::string, int> cgm_info; |
181 set<int>& cgm_data; | 181 set<int>& cgm_data; |
182 int cgm_size; | |
182 | 183 |
183 class MuSys& music; | 184 class MuSys& music; |
184 | 185 |
185 public: | 186 public: |
186 AyuSysConfig& config; | 187 AyuSysConfig& config; |
1276 | 1277 |
1277 if ( strncmp(data, "CGTABLE", 7) != 0) { | 1278 if ( strncmp(data, "CGTABLE", 7) != 0) { |
1278 delete[] data; | 1279 delete[] data; |
1279 return; | 1280 return; |
1280 } | 1281 } |
1281 int cgm_size = read_little_endian_int(data+0x10); | 1282 cgm_size = read_little_endian_int(data+0x10); |
1282 | 1283 |
1283 int i,j; | 1284 int i,j; |
1284 // xor 解除 | 1285 // xor 解除 |
1285 for (i=0;i<sz-0x20; i++) { | 1286 for (i=0;i<sz-0x20; i++) { |
1286 data[i+0x20]^=decode_char[i&0xff]; | 1287 data[i+0x20]^=decode_char[i&0xff]; |
1738 } | 1739 } |
1739 new_anm->CalcTotal(); | 1740 new_anm->CalcTotal(); |
1740 cmd.clear(); | 1741 cmd.clear(); |
1741 } | 1742 } |
1742 } | 1743 } |
1743 if (cmd.cmd1 == 1 && cmd.cmd2 == 4) { | 1744 if (cmd.cmd1 == 1 && cmd.cmd2 == 4) { // Percentage... maybe not working? |
1745 if (cmd.cmd3 == 0x5de) { | |
1746 cmd.SetSysvar(cgm_data.size() * 100 / cgm_size); | |
1747 } | |
1744 if (cmd.cmd3 == 0xd8 || cmd.cmd3 == 0xd3 || cmd.cmd3 == 0xd2 || cmd.cmd3 == 0xd7) { | 1748 if (cmd.cmd3 == 0xd8 || cmd.cmd3 == 0xd3 || cmd.cmd3 == 0xd2 || cmd.cmd3 == 0xd7) { |
1745 cmd.clear(); // いつも 0xd8 / 0xd7 と組で出てくる | 1749 cmd.clear(); // いつも 0xd8 / 0xd7 と組で出てくる |
1746 } | 1750 } |
1747 if (cmd.cmd3 == 0x5e0) { // 画像既視フラグを得る | 1751 if (cmd.cmd3 == 0x5e0) { // 画像既視フラグを得る |
1748 string s = cmd.Str(cmd.args[0]); | 1752 string s = cmd.Str(cmd.args[0]); |