Convert all Shift_JIS files to UTF-8

This commit is contained in:
kichikuou
2020-02-24 18:06:38 +09:00
parent 9f09c0c2de
commit 7a1cc2a483
27 changed files with 824 additions and 824 deletions
+21 -21
View File
@@ -125,7 +125,7 @@ std::vector<uint8> MAKOMidi::generate_smf(int current_max)
}
bool mute_flag = false;
// 再生情報の初期化
// 再生情報の初期化
for(int i = 0; i < 9; i++) {
play[i].timbre = 255;
play[i].timbre_type = 128;
@@ -161,7 +161,7 @@ std::vector<uint8> MAKOMidi::generate_smf(int current_max)
play[i + 3].pan = mda[i + 256].pan;
}
// システムリセット、ボリュームリセット
// システムリセット、ボリュームリセット
for(int i = 0; i < 10; i++) {
w.send_3bytes(0xb0 + i, 0x79, 0x00);
}
@@ -169,7 +169,7 @@ std::vector<uint8> MAKOMidi::generate_smf(int current_max)
w.send_3bytes(0xb0 + i, 0x07, 0x64);
}
// SSG 1-3 の音色
// SSG 1-3 の音色
for(int i = 0; i < 3; i++) {
if(mda[i + 256].bank_select < 128) {
w.send_3bytes(0xb3 + i, 0x00, mda[i + 256].bank_select);
@@ -192,11 +192,11 @@ std::vector<uint8> MAKOMidi::generate_smf(int current_max)
int current_mark = 0;
while (w.tick()) {
play_time += 10; // elapse 10ms
// 各パートの更新
// 各パートの更新
while((play[0].loop_flag || play[1].loop_flag || play[2].loop_flag ||
play[3].loop_flag || play[4].loop_flag || play[5].loop_flag ||
play[6].loop_flag || play[7].loop_flag || play[8].loop_flag) && play_time > 0.0) {
// 1単位時間だけ経過時間を更新する
// 1単位時間だけ経過時間を更新する
for(int i = 0; i < 9; i++) {
if(play[i].loop_flag && play[i].wait_time) {
play[i].wait_time--;
@@ -204,7 +204,7 @@ std::vector<uint8> MAKOMidi::generate_smf(int current_max)
}
play_time -= (float)(545455.0 / 480.0 / (float)(tempo + 0x40 - tempo_dif));
// 1単位時間だけ各パートを更新
// 1単位時間だけ各パートを更新
for(int i = 0; i < 9; i++) {
if(!play[i].loop_flag) {
play[i].wait_time = 1;
@@ -217,12 +217,12 @@ std::vector<uint8> MAKOMidi::generate_smf(int current_max)
d3 = next_mml(i);
mml[i].addr = d1 | (d2 << 8) | (d3 << 16);
if(!play[i].note_flag || mute_flag) {
// 再生停止または未使用
// 再生停止または未使用
play[i].loop_flag = false;
if(!play[0].loop_flag && !play[1].loop_flag && !play[2].loop_flag &&
!play[3].loop_flag && !play[4].loop_flag && !play[5].loop_flag &&
!play[6].loop_flag && !play[7].loop_flag && !play[8].loop_flag) {
// 全チャンネルが再生停止 (ループしない曲)
// 全チャンネルが再生停止 (ループしない曲)
for(int j = 0; j < 10; j++) {
w.send_3bytes(0xb0 + j, 0x78, 0x00);
}
@@ -233,7 +233,7 @@ std::vector<uint8> MAKOMidi::generate_smf(int current_max)
}
play[i].wait_time = 1;
} else {
// 全体としてのループ数を取得
// 全体としてのループ数を取得
int loop = ++play[i].loop_cnt;
for(int j = 0; j < 9; j++) {
if(loop > play[j].loop_cnt && play[j].loop_flag) {
@@ -242,7 +242,7 @@ std::vector<uint8> MAKOMidi::generate_smf(int current_max)
}
current_loop = loop;
if(current_loop >= current_max && current_max) {
// 指定回数だけ再生完了
// 指定回数だけ再生完了
for(int j = 0; j < 10; j++) {
w.send_3bytes(0xb0 + j, 0x78, 0x00);
}
@@ -288,14 +288,14 @@ std::vector<uint8> MAKOMidi::generate_smf(int current_max)
int n = next_mml(i);
if(n != play[i].timbre) {
if(mda[n].bank_select < 128) {
// 通常のパート
// 通常のパート
play[i].timbre_type = 128;
play[i].channel = i;
w.send_3bytes(0xb0 + play[i].channel, 0x00, mda[n].bank_select);
w.send_3bytes(0xb0 + play[i].channel, 0x20, 0x00);
w.send_2bytes(0xc0 + play[i].channel, mda[n].program_change);
} else {
// ドラムパート (ch.10)
// ドラムパート (ch.10)
play[i].timbre_type = 255 - mda[n].bank_select;
play[i].channel = 9;
}
@@ -342,7 +342,7 @@ std::vector<uint8> MAKOMidi::generate_smf(int current_max)
bool MAKOMidi::load_mml(int page)
{
// データ読み込み
// データ読み込み
DRI* dri = new DRI();
int size;
uint8* data = dri->load(amus, page, &size);
@@ -351,7 +351,7 @@ bool MAKOMidi::load_mml(int page)
return false;
}
// FM音源データの判定
// FM音源データの判定
int p, d0, d1, d2;
p = data[0] + 1;
@@ -361,7 +361,7 @@ bool MAKOMidi::load_mml(int page)
return false;
}
// MML部 読み込み&変換
// MML部 読み込み&変換
for(int i = 0; i < 9; i++) {
p = 4 * (i + 1);
int block_offset_top = data[p++];
@@ -370,7 +370,7 @@ bool MAKOMidi::load_mml(int page)
mml[i].addr = 0;
if(block_offset_top) {
// ブロックの探索
// ブロックの探索
int last_block = 0;
p = block_offset_top;
d0 = data[p++];
@@ -512,7 +512,7 @@ bool MAKOMidi::load_mml(int page)
void MAKOMidi::load_mda(int page)
{
// 未設定時の音色設定 (Piano, Acoustic Bass Drum)
// 未設定時の音色設定 (Piano, Acoustic Bass Drum)
for(int i = 0; i < 256 + 3; i++) {
mda[i].bank_select = 0;
mda[i].program_change = 0;
@@ -529,7 +529,7 @@ void MAKOMidi::load_mda(int page)
}
tempo_dif = 0x40;
// MDAデータの読み込み
// MDAデータの読み込み
char path[16];
strcpy_s(path, 16, amus);
int p = strlen(path);
@@ -550,7 +550,7 @@ void MAKOMidi::load_mda(int page)
int inst_num = data[25];
int drum_format = data[26];
// SSGパートの音色設定
// SSGパートの音色設定
for(int i = 0; i < 3; i++) {
uint8* buf = &data[map_wide * i + 27];
mda[i + 256].bank_select = buf[0];
@@ -562,7 +562,7 @@ void MAKOMidi::load_mda(int page)
mda[i + 256].pan = buf[6];
}
// 通常の音色設定
// 通常の音色設定
for(int i = 0; i < inst_num; i++) {
uint8* buf = &data[27 + map_wide * 3 + (map_wide + 1) * i];
int n = buf[0];
@@ -575,7 +575,7 @@ void MAKOMidi::load_mda(int page)
mda[n].pan = buf[7];
}
// ドラムパートの音色設定
// ドラムパートの音色設定
if(drum_format) {
uint8* buf = &data[27 + map_wide * 3 + (map_wide + 1) * inst_num];
int drum_num = buf[0];