Translated all strings to English

Hopefully I got everything...
This commit is contained in:
oldmud0 2015-11-20 22:18:05 -06:00
parent f954827a14
commit 78b46615ab
7 changed files with 588 additions and 578 deletions

View file

@ -99,7 +99,7 @@ void MainForm::Begin()
SonarThread = gcnew Thread(gcnew ThreadStart(this, &MainForm::RunSonar)); SonarThread = gcnew Thread(gcnew ThreadStart(this, &MainForm::RunSonar));
SonarThread->Start(); SonarThread->Start();
this->Text += String::Format(L" [{0}] [Server Port:{1}]", ServerName, MTOPTION.OPEN_PORT); this->Text += String::Format(L" ({0}) (Server Port: {1})", ServerName, MTOPTION.OPEN_PORT);
WriteTime(0, SystemMessageColor); WriteTime(0, SystemMessageColor);
WriteMessage(L"Server initialization complete.\n[MOTD]-------------------\n", SystemMessageColor); WriteMessage(L"Server initialization complete.\n[MOTD]-------------------\n", SystemMessageColor);
@ -301,14 +301,14 @@ void MainForm::Begin()
if(MTINFO.VERSION_CHECKED) { if(MTINFO.VERSION_CHECKED) {
WriteMessage(String::Format(L"Server version: v{0}\n", ServerVersion), SystemMessageColor); WriteMessage(String::Format(L"Server version: v{0}\n", ServerVersion), SystemMessageColor);
if(LP_VERSION > ServerVersion){ if(LP_VERSION > ServerVersion){
WriteMessage(L"Your client is newer than the server. Some functions may be incompatible.\n", ErrorMessageColor); WriteMessage(L"WARNING: Your client is newer than the server. Some functions may be incompatible.\n", ErrorMessageColor);
} }
else if(LP_VERSION < ServerVersion) { else if(LP_VERSION < ServerVersion) {
WriteMessage(L"LilithPortのバージョンがサーバより低いため、一部機能の互換性が取れない場合があります。\n最新バージョンを確認してください。\n", ErrorMessageColor); WriteMessage(L"WARNING: Your client is older than the server. Some functions may be incompatible.\n", ErrorMessageColor);
} }
} }
else{ else{
WriteMessage(L"MTSP, または古いバージョンのLilithPortサーバです。一部機能の互換性が取れない場合があります。\n", ErrorMessageColor); WriteMessage(L"WARNING: You are connecting to an MTSP server or a very old LilithPort server. Some functions will be incompatible.\n", ErrorMessageColor);
} }
// 蔵受信開始 // 蔵受信開始
@ -316,28 +316,28 @@ void MainForm::Begin()
if(MTOPTION.CONNECTION_TYPE == CT_HOST){ if(MTOPTION.CONNECTION_TYPE == CT_HOST){
this->Text += String::Format(L" [{0}] [Host Port:{1}]", ServerName, MTOPTION.OPEN_PORT); this->Text += String::Format(L" ({0}) (Host Port: {1})", ServerName, MTOPTION.OPEN_PORT);
} }
else{ else{
this->Text += String::Format(L" [{0}] [Client]", ServerName); this->Text += String::Format(L" ({0}) (Client)", ServerName);
} }
WriteMessage(String::Format(L"{0}に接続しました。 (ID = {1})\n", ServerName, me->ID), SystemMessageColor); WriteMessage(String::Format(L"Connected to {0}. (ID = {1})\n", ServerName, me->ID), SystemMessageColor);
if(ServerName->Length > 0){ if(ServerName->Length > 0){
if(ServerName[0] == '+'){ if(ServerName[0] == '+'){
ServerMode = SM_MIX; ServerMode = SM_MIX;
WriteMessage(L"混在サーバです。\n", SystemMessageColor); WriteMessage(L"Server is in mixed mode.\n", SystemMessageColor);
} }
if(ServerName[0] == '@'){ if(ServerName[0] == '@'){
ServerMode = SM_MATCH; ServerMode = SM_MATCH;
WriteMessage(L"チャット禁止サーバです。\n", SystemMessageColor); WriteMessage(L"Chat is disabled on this server.\n", SystemMessageColor);
} }
else if(ServerName[0] == '#'){ else if(ServerName[0] == '#'){
ServerMode = SM_NORA; ServerMode = SM_NORA;
WriteMessage(L"おおっと! 野良サーバ\n", SystemMessageColor); WriteMessage(L"Whoa! A Nora server!\n", SystemMessageColor); //fixme: hard translation (野良サーバ)
ListView = LV_BLIND; ListView = LV_BLIND;
listBoxMember->Items[0] = gcnew String(L"野試合会場"); listBoxMember->Items[0] = gcnew String(L"Open Match"); //fixme: hard translation (野試合会場)
} }
} }
@ -362,27 +362,27 @@ void MainForm::Begin()
if(e->ErrorCode == 0){ if(e->ErrorCode == 0){
if(me->ID == 0xFFFF){ if(me->ID == 0xFFFF){
WriteMessage(String::Format(L"{0}は満室です。\n", ServerName), ErrorMessageColor); WriteMessage(String::Format(L"ERROR: {0} is full!\n", ServerName), ErrorMessageColor);
} }
else if(me->ID == 0xFFFE){ else if(me->ID == 0xFFFE){
WriteMessage(L"本体のバージョンが違います。\n", ErrorMessageColor); WriteMessage(L"ERROR: Program version is different.\n", ErrorMessageColor);
} }
else if(me->ID > MAX_ID){ else if(me->ID > MAX_ID){
WriteMessage(String::Format(L"{0}はこれ以上IDを発行できません。\n", ServerName), ErrorMessageColor); WriteMessage(String::Format(L"ERROR: {0} could not issue any more player IDs.\n", ServerName), ErrorMessageColor);
} }
else if(address != 0){ else if(address != 0){
WriteMessage(L"サーバに接続できませんでした。\n回線が混雑している可能性があります。\n", ErrorMessageColor); WriteMessage(L"ERROR: Could not connect to the server.\nThe connection may be busy.\n", ErrorMessageColor);
} }
} }
else{ else{
if(e->ErrorCode == WSAECONNRESET){ if(e->ErrorCode == WSAECONNRESET){
WriteMessage(L"サーバのポートが開いていません。\n", ErrorMessageColor); WriteMessage(L"ERROR: The connection was reset. \n", ErrorMessageColor);
} }
else if(e->ErrorCode == WSAETIMEDOUT){ else if(e->ErrorCode == WSAETIMEDOUT){
WriteMessage(L"サーバからの応答がありませんでした。\nサーバが稼働していないか、アドレスが間違っている可能性があります。\n", ErrorMessageColor); WriteMessage(L"ERROR: The connection timed out.\nThis could be due to many reasons: the server is not running, or the address may be incorrect.\n", ErrorMessageColor);
} }
else if(e->ErrorCode != WSAHOST_NOT_FOUND){ else if(e->ErrorCode != WSAHOST_NOT_FOUND){
WriteMessage(String::Format(L"ソケットエラー > {0}\n", e->ErrorCode), ErrorMessageColor); WriteMessage(String::Format(L"Unknown socket error: {0}\n", e->ErrorCode), ErrorMessageColor);
} }
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
WriteMessage(e->ToString() + L"\n", DebugMessageColor); WriteMessage(e->ToString() + L"\n", DebugMessageColor);
@ -440,7 +440,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
if(rcv->Length > MAX_PACKET){ if(rcv->Length > MAX_PACKET){
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
form->WriteMessage(String::Format(L"Large Packet > {0} from {1}\n", rcv[0], ep->ToString()), DebugMessageColor); form->WriteMessage(String::Format(L"Got very large packet > {0} from {1}\n", rcv[0], ep->ToString()), DebugMessageColor);
} }
return; return;
} }
@ -453,7 +453,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
case PH_PONG: case PH_PONG:
if(rcv->Length == 1 && Ping > 0){ if(rcv->Length == 1 && Ping > 0){
form->WriteMessage(String::Format(L"Ping : {0}ms\n", timeGetTime() - Ping), SystemMessageColor); form->WriteMessage(String::Format(L"Ping: {0}ms\n", timeGetTime() - Ping), SystemMessageColor);
Ping = 0; Ping = 0;
} }
break; break;
@ -497,7 +497,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
if(IDCounter <= MAX_ID){ if(IDCounter <= MAX_ID){
if(IDCounter == MAX_ID){ if(IDCounter == MAX_ID){
form->WriteMessage(L"発行IDが限界に達しました。\n", ErrorMessageColor); form->WriteMessage(L"ERROR: issued ID is above the max ID!\n", ErrorMessageColor);
} }
// メンバー登録 // メンバー登録
@ -643,7 +643,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
case PH_NOTICE: case PH_NOTICE:
if(UDP != nullptr){ if(UDP != nullptr){
form->WriteMessage(L"[サーバー告知]-------------------\n", SystemMessageColor); form->WriteMessage(L"[Message of the Day]-------------------\n", SystemMessageColor);
form->WriteNotice(Encoding::Unicode->GetString(rcv, 2, (rcv->Length)-2)); form->WriteNotice(Encoding::Unicode->GetString(rcv, 2, (rcv->Length)-2));
form->WriteMessage(L"-------------------------------\n", SystemMessageColor); form->WriteMessage(L"-------------------------------\n", SystemMessageColor);
} }
@ -702,14 +702,14 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
} }
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
if(id == 0){ if(id == 0){
form->WriteMessage(L"メンバーリストの要求を返信しました。\n", DebugMessageColor); form->WriteMessage(L"Replied to player list request.\n", DebugMessageColor);
} }
} }
if(id > 0 && i >= MemberList->Count){ if(id > 0 && i >= MemberList->Count){
// サーバでもクラでも見えない状態 // サーバでもクラでも見えない状態
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
form->WriteMessage(String::Format(L"Unknown({0})の検索\n", id), ErrorMessageColor); form->WriteMessage(String::Format(L"Unknown ({0}) search!\n", id), ErrorMessageColor);
} }
// バックアップ検索 // バックアップ検索
@ -718,16 +718,16 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
// Unknown通知 // Unknown通知
array<BYTE>^ send = gcnew array<BYTE>(3){ PH_LOST, 0xFF, 0xFF }; array<BYTE>^ send = gcnew array<BYTE>(3){ PH_LOST, 0xFF, 0xFF };
UDP->BeginSend(send, send->Length, MemberListBackUp[id]->IP_EP, gcnew AsyncCallback(SendPackets), UDP); UDP->BeginSend(send, send->Length, MemberListBackUp[id]->IP_EP, gcnew AsyncCallback(SendPackets), UDP);
form->WriteMessage(String::Format(L"Unknown({0})に通知をしました。\n", id), SystemMessageColor); form->WriteMessage(String::Format(L"Sent notice to Unknown ({0}).\n", id), SystemMessageColor);
} }
catch(Exception^){ catch(Exception^){
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
form->WriteMessage(String::Format(L"Unknown({0})への通知に失敗しました。\n", id), ErrorMessageColor); form->WriteMessage(String::Format(L"Failed to send notice to Unknown ({0})!\n", id), ErrorMessageColor);
} }
} }
}else{ }else{
// バックアップリスト以上のID // バックアップリスト以上のID
form->WriteMessage(String::Format(L"履歴に存在しない接続IDです。\nサーバをシャットダウン後、しばらくしてからサーバを起動してください。\n", id), ErrorMessageColor); form->WriteMessage(String::Format(L"This ID is not present in the log. Shut down and restart the server after waiting a while.\n", id), ErrorMessageColor);
} }
} }
} }
@ -819,7 +819,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
if(member > 0){ if(member > 0){
if(ListView != LV_BLIND){ if(ListView != LV_BLIND){
form->WriteTime(0, SystemMessageColor); form->WriteTime(0, SystemMessageColor);
form->WriteMessage(MemberList[member]->NAME + L"が退室しました。\n", SystemMessageColor); form->WriteMessage(MemberList[member]->NAME + L" has left.\n", SystemMessageColor);
} }
// 観戦中止 // 観戦中止
@ -835,11 +835,11 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
else{ else{
if(id == 0){ if(id == 0){
form->WriteTime(0, SystemMessageColor); form->WriteTime(0, SystemMessageColor);
form->WriteMessage(ServerName + L"がシャットダウンしました。\n", SystemMessageColor); form->WriteMessage(ServerName + L" was shut down.\n", SystemMessageColor);
MemberList[0]->STATE = 0xFF; MemberList[0]->STATE = 0xFF;
} }
else if(id == 0xFFFF){ else if(id == 0xFFFF){
form->WriteMessage(ServerName + L"には登録されていません。\n時間を置いて再接続してみてください。\n", ErrorMessageColor); form->WriteMessage(ServerName + L" is not registered. Please try to connect at a later time.\n", ErrorMessageColor);
MemberList[0]->STATE = 0xFF; MemberList[0]->STATE = 0xFF;
} }
else{ else{
@ -847,18 +847,18 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
if(id == MemberList[i]->ID){ if(id == MemberList[i]->ID){
if(i == 0){ if(i == 0){
form->WriteTime(0, SystemMessageColor); form->WriteTime(0, SystemMessageColor);
form->WriteMessage(L"サーバとの接続が切断されました。\n", ErrorMessageColor); form->WriteMessage(L"ERROR: Connection to the server lost.\n", ErrorMessageColor);
MemberList[0]->STATE = 0xFF; MemberList[0]->STATE = 0xFF;
} }
else{ else{
if(ListView != LV_BLIND){ if(ListView != LV_BLIND){
if(rcv[0] == PH_QUIT){ if(rcv[0] == PH_QUIT){
form->WriteTime(0, SystemMessageColor); form->WriteTime(0, SystemMessageColor);
form->WriteMessage(MemberList[i]->NAME + L"が退室しました。\n", SystemMessageColor); form->WriteMessage(MemberList[i]->NAME + L" has left.\n", SystemMessageColor);
} }
else{ else{
form->WriteTime(0, SystemMessageColor); form->WriteTime(0, SystemMessageColor);
form->WriteMessage(MemberList[i]->NAME + L"の回線が途切れました。\n", ErrorMessageColor); form->WriteMessage(L"Connection with "+ MemberList[i]->NAME + L" was interrupted.\n", ErrorMessageColor);
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
form->WriteMessage(String::Format(L"ID = {0}\n", MemberList[i]->ID), DebugMessageColor); form->WriteMessage(String::Format(L"ID = {0}\n", MemberList[i]->ID), DebugMessageColor);
form->WriteMessage(String::Format(L"IP_EP = {0}\n", MemberList[i]->IP_EP), DebugMessageColor); form->WriteMessage(String::Format(L"IP_EP = {0}\n", MemberList[i]->IP_EP), DebugMessageColor);
@ -902,7 +902,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
if(MemberList[i]->STATE == MS_SEEK && rcv[3] != MS_SEEK){ if(MemberList[i]->STATE == MS_SEEK && rcv[3] != MS_SEEK){
form->WriteTime(0, SystemMessageColor); form->WriteTime(0, SystemMessageColor);
form->WriteMessage(String::Format(L"{0}が対戦募集を締め切りました。\n", MemberList[i]->NAME), SystemMessageColor); form->WriteMessage(String::Format(L"{0} is now in seek mode.\n", MemberList[i]->NAME), SystemMessageColor);
} }
MemberList[i]->STATE = rcv[3]; MemberList[i]->STATE = rcv[3];
@ -910,7 +910,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
if(MemberList[i]->STATE == MS_SEEK){ if(MemberList[i]->STATE == MS_SEEK){
form->WriteTime(0, SystemMessageColor); form->WriteTime(0, SystemMessageColor);
form->WriteMessage(String::Format(L"{0}が対戦募集状態になりました。\n", MemberList[i]->NAME), SystemMessageColor); form->WriteMessage(String::Format(L"{0} is now in seek mode.\n", MemberList[i]->NAME), SystemMessageColor);
if(MTOPTION.SEEK_SOUND_ENABLE){ if(MTOPTION.SEEK_SOUND_ENABLE){
try{ try{
Media::SoundPlayer^ wav = gcnew Media::SoundPlayer(gcnew String(MTOPTION.SEEK_SOUND)); Media::SoundPlayer^ wav = gcnew Media::SoundPlayer(gcnew String(MTOPTION.SEEK_SOUND));
@ -986,7 +986,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
if(rcv[3] == 0xFF){ if(rcv[3] == 0xFF){
// そんな人いなかった // そんな人いなかった
form->WriteTime(0, SystemMessageColor); form->WriteTime(0, SystemMessageColor);
form->WriteMessage(MemberList[i]->NAME + L"は既にいませんでした。\n", SystemMessageColor); form->WriteMessage(L"We didn't have "+MemberList[i]->NAME + L" before.\n", SystemMessageColor);
if(MTOPTION.CONNECTION_TYPE == CT_SERVER){ if(MTOPTION.CONNECTION_TYPE == CT_SERVER){
// 全員に通達 // 全員に通達
@ -1016,9 +1016,9 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
form->WriteMessage(String::Format(MemberList[i]->NAME + L" > state:{0}\n", rcv[3]), DebugMessageColor); form->WriteMessage(String::Format(MemberList[i]->NAME + L" > state:{0}\n", rcv[3]), DebugMessageColor);
} }
form->WriteTime(0, SystemMessageColor); form->WriteTime(0, SystemMessageColor);
form->WriteMessage(MemberList[i]->NAME + L"の状態を更新しました。\n", SystemMessageColor); form->WriteMessage(L"Updated state for " + MemberList[i]->NAME + L".\n", SystemMessageColor);
if(MTOPTION.CONNECTION_TYPE != CT_SERVER && MemberList[i]->ID == 0){ if(MTOPTION.CONNECTION_TYPE != CT_SERVER && MemberList[i]->ID == 0){
form->WriteMessage(L"サーバーとの通信が途切れた可能性があります。再接続をしてみてください。\n", ErrorMessageColor); form->WriteMessage(L"Connection to the server may have been lost. Please try to reconnect.\n", ErrorMessageColor);
} }
MemberList[i]->STATE = rcv[3]; MemberList[i]->STATE = rcv[3];
form->listBoxMember->Refresh(); form->listBoxMember->Refresh();
@ -1113,6 +1113,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
// 格ツクじゃないよ // 格ツクじゃないよ
try{ try{
//TODO: change FM exe check
String^ exe = gcnew String(MTOPTION.GAME_EXE); String^ exe = gcnew String(MTOPTION.GAME_EXE);
FileVersionInfo^ info = FileVersionInfo::GetVersionInfo(exe); FileVersionInfo^ info = FileVersionInfo::GetVersionInfo(exe);
@ -1141,8 +1142,8 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
} }
catch(Exception^){ catch(Exception^){
send[1] = 0xFF; send[1] = 0xFF;
form->WriteMessage(L"格闘ツクールの実行ファイルではありません。\n", ErrorMessageColor); form->WriteMessage(L"ERROR: This is not a valid 2D Fighter Maker executable.\n", ErrorMessageColor);
form->WriteMessage(L"オプションで実行ファイルのパスを設定してください。\n", ErrorMessageColor); form->WriteMessage(L"Please go to the settings menu and set it.\n", ErrorMessageColor);
} }
UDP->BeginSend(send, send->Length, ep, gcnew AsyncCallback(SendPackets), UDP); UDP->BeginSend(send, send->Length, ep, gcnew AsyncCallback(SendPackets), UDP);
@ -1159,7 +1160,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
} }
if(i >= MemberList->Count){ if(i >= MemberList->Count){
form->WriteMessage(L"リストにいない人物からの対戦要求がありました。\n", ErrorMessageColor); form->WriteMessage(L"ERROR: A match request was received from someone not on the list.\n", ErrorMessageColor);
MemberList[0]->STATE = MS_FREE; MemberList[0]->STATE = MS_FREE;
if(MTOPTION.CONNECTION_TYPE != CT_SERVER){ if(MTOPTION.CONNECTION_TYPE != CT_SERVER){
@ -1207,7 +1208,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
if(ListView != LV_BLIND){ if(ListView != LV_BLIND){
form->WriteTime(0, SystemMessageColor); form->WriteTime(0, SystemMessageColor);
form->WriteMessage(MemberList[i]->NAME, NameColor[MemberList[i]->TYPE]); form->WriteMessage(MemberList[i]->NAME, NameColor[MemberList[i]->TYPE]);
form->WriteMessage(L"から対戦の申し込みです。\n", SystemMessageColor); form->WriteMessage(L"A new challenger!\n", SystemMessageColor);
} }
} }
finally{ finally{
@ -1220,25 +1221,25 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
if((rcv[1] != MS_FREE)&&(rcv[1] != MS_SEEK)){ if((rcv[1] != MS_FREE)&&(rcv[1] != MS_SEEK)){
switch(rcv[1]){ switch(rcv[1]){
case MS_REST: case MS_REST:
form->WriteMessage(L"挑戦相手は休憩中です。\n", SystemMessageColor); form->WriteMessage(L"Challenger is currently on break.\n", SystemMessageColor);
break; break;
case MS_VS: case MS_VS:
form->WriteMessage(L"挑戦相手は対戦中です。\n", SystemMessageColor); form->WriteMessage(L"Challenger is currently playing.\n", SystemMessageColor);
break; break;
case MS_WATCH: case MS_WATCH:
case MS_COUCH: case MS_COUCH:
form->WriteMessage(L"挑戦相手は観戦中です。\n", SystemMessageColor); form->WriteMessage(L"Challenger is currently spectating.\n", SystemMessageColor);
break; break;
case MS_SEEK: case MS_SEEK:
break; break;
case MS_READY: case MS_READY:
form->WriteMessage(L"挑戦相手は他の人と対戦準備中です。\n", SystemMessageColor); form->WriteMessage(L"Challenger is currently preparing for battle against another person.\n", SystemMessageColor);
break; break;
case 0xFE: case 0xFE:
form->WriteMessage(L"挑戦相手とプレイするゲームが違います。\n", ErrorMessageColor); form->WriteMessage(L"ERROR: You and your challenger have a different game or game version.\n", ErrorMessageColor);
break; break;
default: default:
form->WriteMessage(L"挑戦相手が対戦出来る状態ではありません。\n", SystemMessageColor); form->WriteMessage(L"Challenger is currently not in a state for matchmaking.\n", SystemMessageColor);
break; break;
} }
@ -1331,7 +1332,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
// 対戦開始 // 対戦開始
form->WriteTime(0, SystemMessageColor); form->WriteTime(0, SystemMessageColor);
form->WriteMessage(String::Format(L"対戦を開始します。(delay:{0})\n", NetVS->DELAY), SystemMessageColor); form->WriteMessage(String::Format(L"Starting match... (Delay: {0})\n", NetVS->DELAY), SystemMessageColor);
// 音でお知らせ // 音でお知らせ
if(MTOPTION.VS_SOUND_ENABLE){ if(MTOPTION.VS_SOUND_ENABLE){
@ -1381,7 +1382,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
} }
catch(Exception^){ catch(Exception^){
MTINFO.TEAM_ROUND_HP = false; MTINFO.TEAM_ROUND_HP = false;
form->WriteMessage(L"対戦相手が古いバージョンのLilithPortか、MTSPです。\n", ErrorMessageColor); form->WriteMessage(L"ERROR: Opponent is using an old version of LilithPort or MTSP!\n", ErrorMessageColor);
} }
@ -1394,7 +1395,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
case PH_VS_END: case PH_VS_END:
if(NetVS != nullptr){ if(NetVS != nullptr){
form->WriteMessage(L"対戦終了のお知らせです。\n", SystemMessageColor); form->WriteMessage(L"The match was ended.\n", SystemMessageColor);
NetVS->SEQUENCE = VS_END; NetVS->SEQUENCE = VS_END;
form->QuitGame(); form->QuitGame();
@ -1424,14 +1425,14 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
try{ try{
if(NetVS->R_FRAME > f + NetVS->DELAY){ if(NetVS->R_FRAME > f + NetVS->DELAY){
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
form->WriteMessage(String::Format(L"無効なパケット(遅延) > {0} / {1}\n", f, NetVS->R_FRAME), DebugMessageColor); form->WriteMessage(String::Format(L"Invalid packet (delay): {0}/{1}\n", f, NetVS->R_FRAME), DebugMessageColor);
} }
break; break;
} }
else if(f > NetVS->R_FRAME + NetVS->DELAY){ else if(f > NetVS->R_FRAME + NetVS->DELAY){
// まずこない // まずこない
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
form->WriteMessage(String::Format(L"無効なパケット(先行) > {0} / {1}\n", f, NetVS->R_FRAME), DebugMessageColor); form->WriteMessage(String::Format(L"Invalid packet (preceding): {0}/{1}\n", f, NetVS->R_FRAME), DebugMessageColor);
} }
break; break;
} }
@ -1469,7 +1470,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
try{ try{
if(f >= NetVS->L_FRAME + NetVS->DELAY){ if(f >= NetVS->L_FRAME + NetVS->DELAY){
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
form->WriteMessage(String::Format(L"無効なパケット(先行要求) > {0} / {1}\n", f, NetVS->L_FRAME), DebugMessageColor); form->WriteMessage(String::Format(L"Invalid packet (prior request): {0}/{1}\n", f, NetVS->L_FRAME), DebugMessageColor);
} }
UDP->BeginSend(send, send->Length, ep, gcnew AsyncCallback(SendPackets), UDP); UDP->BeginSend(send, send->Length, ep, gcnew AsyncCallback(SendPackets), UDP);
break; break;
@ -1477,13 +1478,13 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
else if(NetVS->L_FRAME > f + NetVS->DELAY*2){ else if(NetVS->L_FRAME > f + NetVS->DELAY*2){
// 既にデータがないのでこれがくるとゲームにならない // 既にデータがないのでこれがくるとゲームにならない
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
form->WriteMessage(String::Format(L"無効なパケット(遅延要求) > {0} / {1}\n", f, NetVS->L_FRAME), DebugMessageColor); form->WriteMessage(String::Format(L"Invalid packet (delayed request): {0}/{1}\n", f, NetVS->L_FRAME), DebugMessageColor);
} }
break; break;
} }
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
form->WriteMessage(String::Format(L"要求パケット > {0} / {1}\n", f, NetVS->L_FRAME), DebugMessageColor); form->WriteMessage(String::Format(L"Request packet: {0}/{1}\n", f, NetVS->L_FRAME), DebugMessageColor);
} }
Array::Copy(BitConverter::GetBytes(NetVS->LOCAL[f % NetVS->LOCAL->Length]), 0, send, 5, 2); Array::Copy(BitConverter::GetBytes(NetVS->LOCAL[f % NetVS->LOCAL->Length]), 0, send, 5, 2);
@ -1508,7 +1509,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
NetVS->REMOTE[NetVS->R_READ] = w; NetVS->REMOTE[NetVS->R_READ] = w;
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
form->WriteMessage(String::Format(L"返信パケット > {0} : {1}\n", f, w), DebugMessageColor); form->WriteMessage(String::Format(L"Reply packet: {0} : {1}\n", f, w), DebugMessageColor);
} }
if(NetVS->WAITING == 2){ if(NetVS->WAITING == 2){
@ -1594,10 +1595,10 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
if(i >= MemberList->Count){ if(i >= MemberList->Count){
// 外来客 // 外来客
form->WriteMessage(L"観戦者が来ました。\n", SystemMessageColor); form->WriteMessage(L"A spectator has joined.\n", SystemMessageColor);
} }
else{ else{
form->WriteMessage(MemberList[i]->NAME + L"が観戦に来ました。\n", SystemMessageColor); form->WriteMessage(MemberList[i]->NAME + L" has joined the match as a spectator.\n", SystemMessageColor);
} }
} }
finally{ finally{
@ -1611,19 +1612,19 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
if(rcv[1] > 0){ if(rcv[1] > 0){
switch(rcv[1]){ switch(rcv[1]){
case 1: case 1:
form->WriteMessage(L"観戦が許可されていませんでした。\n", SystemMessageColor); form->WriteMessage(L"Spectating is disabled for this match.\n", SystemMessageColor);
break; break;
case 2: case 2:
form->WriteMessage(L"観戦席は満席でした。\n", SystemMessageColor); form->WriteMessage(L"All spectator seats are taken!\n", SystemMessageColor);
break; break;
case 3: case 3:
form->WriteMessage(L"観戦に間に合いませんでした。\n", SystemMessageColor); form->WriteMessage(L"You did not join in time to spectate.\n", SystemMessageColor);
break; break;
case 4: case 4:
form->WriteMessage(L"既に相手がこちらを観戦対象にしていました。\n", SystemMessageColor); form->WriteMessage(L"You are already watching the opponent!\n", SystemMessageColor); //fixme: hard translation: 既に相手がこちらを観戦対象にしていました。
break; break;
} }
@ -1682,7 +1683,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
GameThread = gcnew Thread(gcnew ParameterizedThreadStart(form, &MainForm::RunGame)); GameThread = gcnew Thread(gcnew ParameterizedThreadStart(form, &MainForm::RunGame));
GameThread->Start((UINT)RT_WATCH); GameThread->Start((UINT)RT_WATCH);
form->WriteMessage(L"観戦を開始します。\n", SystemMessageColor); form->WriteMessage(L"Now spectating. Starting game...\n", SystemMessageColor);
} }
} }
break; break;
@ -1692,7 +1693,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
UINT32 f = BitConverter::ToUInt32(rcv, 1); UINT32 f = BitConverter::ToUInt32(rcv, 1);
if(f > WatchFrame + WatchHistory->Length - 20){ if(f > WatchFrame + WatchHistory->Length - 20){
form->WriteMessage(L"同期が取れなくなったため観戦を中止します。\n", ErrorMessageColor); form->WriteMessage(L"ERROR: Could not synchronize; leaving spectator mode...\n", ErrorMessageColor); //fixme: hard translation: 同期が取れなくなったため観戦を中止します。
form->QuitWatch(true); form->QuitWatch(true);
} }
@ -1700,7 +1701,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
try{ try{
if(WatchFrame > f + 20){ if(WatchFrame > f + 20){
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
form->WriteMessage(String::Format(L"観戦パケット(遅延) > {0} / {1}\n", f, WatchFrame), DebugMessageColor); form->WriteMessage(String::Format(L"Spectator packet (delay): {0}/{1}\n", f, WatchFrame), DebugMessageColor);
} }
break; break;
} }
@ -1729,7 +1730,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
if(id == MemberList[0]->ID){ if(id == MemberList[0]->ID){
// 閉幕のお知らせ // 閉幕のお知らせ
form->WriteMessage(L"観戦終了のお知らせです。\n", SystemMessageColor); form->WriteMessage(L"The match was ended. Leaving spectator mode...\n", SystemMessageColor);
form->QuitWatch(false); form->QuitWatch(false);
} }
else{ else{
@ -1737,7 +1738,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
Monitor::Enter(InputHistory); Monitor::Enter(InputHistory);
try{ try{
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
form->WriteMessage(String::Format(L"観戦中止 > {0}\n", id), DebugMessageColor); form->WriteMessage(String::Format(L"Spectator end: {0}\n", id), DebugMessageColor);
} }
for(i = 0; i < SpectatorList->Count; i++){ for(i = 0; i < SpectatorList->Count; i++){
@ -1774,17 +1775,20 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
try{ try{
form->richTextBoxLog->SelectionStart = form->richTextBoxLog->Text->Length; form->richTextBoxLog->SelectionStart = form->richTextBoxLog->Text->Length;
form->richTextBoxLog->SelectionColor = SecretColor;
form->richTextBoxLog->AppendText(L"Inflicted DAMAGE on ");
form->richTextBoxLog->SelectionColor = NameColor[MemberList[i]->TYPE]; form->richTextBoxLog->SelectionColor = NameColor[MemberList[i]->TYPE];
form->richTextBoxLog->AppendText(MemberList[i]->NAME); form->richTextBoxLog->AppendText(MemberList[i]->NAME);
form->richTextBoxLog->SelectionColor = SecretColor; form->richTextBoxLog->SelectionColor = SecretColor;
form->richTextBoxLog->AppendText(L" "); form->richTextBoxLog->AppendText(L" at ");
form->richTextBoxLog->SelectionColor = TalkMessageColor; form->richTextBoxLog->SelectionColor = TalkMessageColor;
form->richTextBoxLog->AppendText(UInt32(time).ToString()); form->richTextBoxLog->AppendText(UInt32(time).ToString());
form->richTextBoxLog->SelectionColor = SecretColor; form->richTextBoxLog->SelectionColor = SecretColor;
form->richTextBoxLog->AppendText(L"の ダメージ!!\n"); form->richTextBoxLog->AppendText(L"!!\n");
form->richTextBoxLog->SelectionStart = form->richTextBoxLog->Text->Length; form->richTextBoxLog->SelectionStart = form->richTextBoxLog->Text->Length;
if(!MTOPTION.LOG_LOCK) { if(!MTOPTION.LOG_LOCK) {
@ -1823,7 +1827,7 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
// UDP接続終了 // UDP接続終了
if(UDP != nullptr){ if(UDP != nullptr){
UDP = nullptr; UDP = nullptr;
form->WriteMessage(L"回線を切断しました。\n", SystemMessageColor); form->WriteMessage(L"Connection was interrupted!\n", SystemMessageColor);
} }
} }
catch(SocketException^ e){ catch(SocketException^ e){
@ -1832,11 +1836,11 @@ void MainForm::ReceivePackets(IAsyncResult^ asyncResult)
if(e->ErrorCode == WSAECONNRESET){ if(e->ErrorCode == WSAECONNRESET){
// パケットが弾かれた // パケットが弾かれた
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
form->WriteMessage(L"ERROR > WSAECONNRESET\n", DebugMessageColor); form->WriteMessage(L"ERROR: WSAECONNRESET\n", DebugMessageColor);
} }
} }
else{ else{
form->WriteMessage(String::Format(L"ソケットエラー({0})\n", e->ErrorCode), ErrorMessageColor); form->WriteMessage(String::Format(L"SOCKET ERROR: {0}\n", e->ErrorCode), ErrorMessageColor);
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
form->WriteMessage(e->ToString() + L"\n", DebugMessageColor); form->WriteMessage(e->ToString() + L"\n", DebugMessageColor);
} }
@ -1871,8 +1875,8 @@ void MainForm::TimerGetIP()
// HP持ち越しタイマー // HP持ち越しタイマー
void MainForm::SetTeamHP(){ void MainForm::SetTeamHP(){
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
WriteMessage(L"EVENT:SET_TEAM_HP\n", DebugMessageColor); WriteMessage(L"EVENT: SET_TEAM_HP\n", DebugMessageColor);
WriteMessage(String::Format(L"PROCESS:{0}, WINNER:P{1}, HP:{2}\n", (UINT)MTINFO.PROCESS, ((UINT)MTINFO.WINNER)+1, MTINFO.P_HP), DebugMessageColor); WriteMessage(String::Format(L"PROCESS: {0}, WINNER: P{1}, HP: {2}\n", (UINT)MTINFO.PROCESS, ((UINT)MTINFO.WINNER)+1, MTINFO.P_HP), DebugMessageColor);
} }
Thread::Sleep(1000); Thread::Sleep(1000);
try { try {
@ -1939,7 +1943,7 @@ void MainForm::RunSonar()
if((timeGetTime() - MemberList[i]->RESPONSE) > 100*1000){ if((timeGetTime() - MemberList[i]->RESPONSE) > 100*1000){
WriteTime(0, SystemMessageColor); WriteTime(0, SystemMessageColor);
WriteMessage(MemberList[i]->NAME + L"との通信が途絶えました。\n", ErrorMessageColor); WriteMessage("Connection with " + MemberList[i]->NAME + L" was interrupted.\n", ErrorMessageColor);
send[0] = PH_LOST; send[0] = PH_LOST;
@ -1963,7 +1967,7 @@ void MainForm::RunSonar()
} }
else{ else{
if((timeGetTime() - MemberList[1]->RESPONSE) > 100*1000){ if((timeGetTime() - MemberList[1]->RESPONSE) > 100*1000){
WriteMessage(L"サーバとの通信が途絶えました。\n", ErrorMessageColor); WriteMessage(L"Connection with the server timed out.\n", ErrorMessageColor);
leave = true; leave = true;
Ranging = false; Ranging = false;
} }
@ -1973,7 +1977,7 @@ void MainForm::RunSonar()
} }
} }
catch(Exception^){ catch(Exception^){
WriteMessage(L"ソナースレッドでエラーが発生しました。\n", ErrorMessageColor); WriteMessage(L"An exception was thrown in the sonar thread.\n", ErrorMessageColor);
} }
finally{ finally{
Monitor::Exit(MemberList); Monitor::Exit(MemberList);
@ -2151,7 +2155,7 @@ void MainForm::RunGame(Object^ obj)
path += "\\" + file; path += "\\" + file;
bw = gcnew BinaryWriter(File::Create(path)); bw = gcnew BinaryWriter(File::Create(path));
WriteMessage(String::Format(L"\"{0}\"にリプレイファイルを作成します。\n", file), SystemMessageColor); WriteMessage(String::Format(L"Replay file will be created: \"{0}\"\n", file), SystemMessageColor);
// ヘッダ // ヘッダ
bw->Write(header); bw->Write(header);
@ -2194,7 +2198,7 @@ void MainForm::RunGame(Object^ obj)
} }
} }
catch(IOException^ e){ catch(IOException^ e){
WriteMessage(String::Format(L"ERROR > リプレイファイル\n{0}\n", e->ToString()), ErrorMessageColor); WriteMessage(String::Format(L"Error writing to replay file:\n{0}\n", e->ToString()), ErrorMessageColor);
if(bw != nullptr){ if(bw != nullptr){
bw->Close(); bw->Close();
@ -2242,24 +2246,24 @@ void MainForm::RunGame(Object^ obj)
if(CreateProcess(MTOPTION.GAME_EXE, NULL, NULL, NULL, false, DEBUG_PROCESS, NULL, wdir, &si, &pi)){ if(CreateProcess(MTOPTION.GAME_EXE, NULL, NULL, NULL, false, DEBUG_PROCESS, NULL, wdir, &si, &pi)){
if(run_type == RT_PLAYBACK){ if(run_type == RT_PLAYBACK){
WriteMessage(String::Format(L"\"{0}\"を再生します。\n", Path::GetFileName(ReplayFilePath)), SystemMessageColor); WriteMessage(String::Format(L"Opening \"{0}\" for playback...\n", Path::GetFileName(ReplayFilePath)), SystemMessageColor);
} }
else{ else{
WriteMessage(String::Format(L"\"{0}\"を起動します。\n", Path::GetFileNameWithoutExtension(gcnew String(MTOPTION.GAME_EXE))), SystemMessageColor); WriteMessage(String::Format(L"Starting \"{0}\"...\n", Path::GetFileNameWithoutExtension(gcnew String(MTOPTION.GAME_EXE))), SystemMessageColor);
} }
} }
else{ else{
WriteMessage(String::Format(L"ERROR({0}) > \"{1}\"が開けませんでした。\n", GetLastError(), gcnew String(MTOPTION.GAME_EXE)), ErrorMessageColor); WriteMessage(String::Format(L"ERROR ({0}): Could not run \"{1}\".\n", GetLastError(), gcnew String(MTOPTION.GAME_EXE)), ErrorMessageColor);
return; return;
} }
if(MTOPTION.SHOW_GAME_OPTION){ if(MTOPTION.SHOW_GAME_OPTION){
WriteMessage(String::Format(L"[対戦設定]----------------------\n" WriteMessage(String::Format(L"[Current settings]----------------------\n"
L"最大ステージ数: {0} / " L"Max stages: {0} / "
L"ランダムステージ: {1} / " L"Random stage: {1} / "
L"ラウンド数: {2} / " L"# of rounds: {2} / "
L"ゲームタイマー: {3}\n" L"Round timer: {3}\n"
L"ラウンドHP持ち越し: {4}\n" L"Carry over HP between rounds: {4}\n"
L"-------------------------------\n" L"-------------------------------\n"
, MTINFO.MAX_STAGE, MTINFO.STAGE_SELECT, MTINFO.ROUND, MTINFO.TIMER, MTINFO.TEAM_ROUND_HP == true ? "ON" : "OFF"), SystemMessageColor); , MTINFO.MAX_STAGE, MTINFO.STAGE_SELECT, MTINFO.ROUND, MTINFO.TIMER, MTINFO.TEAM_ROUND_HP == true ? "ON" : "OFF"), SystemMessageColor);
} }
@ -2510,7 +2514,7 @@ void MainForm::RunGame(Object^ obj)
c.Eax = WatchHistory[WatchFrame % WatchHistory->Length]; c.Eax = WatchHistory[WatchFrame % WatchHistory->Length];
if(c.Eax == 0xFFFF && WaitingWatch == 2){ if(c.Eax == 0xFFFF && WaitingWatch == 2){
WriteMessage(L"タイムアウトしたため観戦を終了します。\n", ErrorMessageColor); WriteMessage(L"Stopped spectating due to timeout.\n", ErrorMessageColor);
QuitWatch(true); QuitWatch(true);
} }
} }
@ -2607,7 +2611,7 @@ void MainForm::RunGame(Object^ obj)
c.Eax = WatchHistory[WatchFrame % WatchHistory->Length]; c.Eax = WatchHistory[WatchFrame % WatchHistory->Length];
if(c.Eax == 0xFFFF && WaitingWatch == 2){ if(c.Eax == 0xFFFF && WaitingWatch == 2){
WriteMessage(L"タイムアウトしたため観戦を終了します。\n", ErrorMessageColor); WriteMessage(L"Stopped spectating due to timeout.\n", ErrorMessageColor);
QuitWatch(true); QuitWatch(true);
} }
} }
@ -2667,7 +2671,7 @@ void MainForm::RunGame(Object^ obj)
if(MTOPTION.DISPLAY_NAME){ if(MTOPTION.DISPLAY_NAME){
if(is_p1 == 0 && is_p2 == 0){ if(is_p1 == 0 && is_p2 == 0){
append_cap = _stprintf_s(MTINFO.TITLE, _T("%s [野試合中]"), MTINFO.TITLE); append_cap = _stprintf_s(MTINFO.TITLE, _T("%s [Free Play]"), MTINFO.TITLE); //fixme: hard translation: 野試合中
} }
else if(is_p2 == 0){ else if(is_p2 == 0){
append_cap = _stprintf_s(MTINFO.TITLE, _T("%s [%s]"), MTINFO.TITLE, MTINFO.P1_NAME); append_cap = _stprintf_s(MTINFO.TITLE, _T("%s [%s]"), MTINFO.TITLE, MTINFO.P1_NAME);
@ -2678,16 +2682,16 @@ void MainForm::RunGame(Object^ obj)
} }
if(MTOPTION.DISPLAY_VERSUS){ if(MTOPTION.DISPLAY_VERSUS){
if(MTOPTION.SHOW_RESULT){ if(MTOPTION.SHOW_RESULT){
append_cap = _stprintf_s(MTINFO.TITLE, _T("%s 対戦数:%d (%d - %d)"), MTINFO.TITLE, num_vs, p1_win, p2_win); append_cap = _stprintf_s(MTINFO.TITLE, _T("%s Match: %d (%d - %d)"), MTINFO.TITLE, num_vs, p1_win, p2_win);
}else{ }else{
append_cap = _stprintf_s(MTINFO.TITLE, _T("%s 対戦数:%d"), MTINFO.TITLE, num_vs); append_cap = _stprintf_s(MTINFO.TITLE, _T("%s Match: %d"), MTINFO.TITLE, num_vs);
} }
} }
if(MTOPTION.DISPLAY_FRAMERATE){ if(MTOPTION.DISPLAY_FRAMERATE){
append_cap = _stprintf_s(MTINFO.TITLE, _T("%s fps:%3d(%d)"), MTINFO.TITLE, blt_count, input_count); append_cap = _stprintf_s(MTINFO.TITLE, _T("%s FPS: %3d(%d)"), MTINFO.TITLE, blt_count, input_count);
} }
if(MTOPTION.DISPLAY_RAND){ if(MTOPTION.DISPLAY_RAND){
append_cap = _stprintf_s(MTINFO.TITLE, _T("%s 乱数:%d"), MTINFO.TITLE, rand_count); append_cap = _stprintf_s(MTINFO.TITLE, _T("%s Rand: %d"), MTINFO.TITLE, rand_count);
} }
blt_count = 0; blt_count = 0;
@ -2738,7 +2742,7 @@ void MainForm::RunGame(Object^ obj)
int nValue = e_address; int nValue = e_address;
char pszText[32]; char pszText[32];
_itoa_s(nValue, pszText, 32 * sizeof(char), 16); _itoa_s(nValue, pszText, 32 * sizeof(char), 16);
WriteMessage(String::Format(L"EVENT:{0}\n", gcnew String(pszText)), DebugMessageColor); WriteMessage(String::Format(L"EVENT: {0}\n", gcnew String(pszText)), DebugMessageColor);
} }
} }
@ -2941,10 +2945,10 @@ void MainForm::RunGame(Object^ obj)
if(MTINFO.INITIALIZED){ if(MTINFO.INITIALIZED){
if(WaitingWatch > 0){ if(WaitingWatch > 0){
WaitingWatch = 0; WaitingWatch = 0;
WriteMessage(L"観戦を中止します。\n", SystemMessageColor); WriteMessage(L"Stopped watching.\n", SystemMessageColor);
} }
else if(_tcslen(MTINFO.ORIGINAL_TITLE) > 0){ else if(_tcslen(MTINFO.ORIGINAL_TITLE) > 0){
WriteMessage(String::Format(L"\"{0}\"を終了しました。\n", gcnew String(MTINFO.ORIGINAL_TITLE)), SystemMessageColor); WriteMessage(String::Format(L"Ended \"{0}\".\n", gcnew String(MTINFO.ORIGINAL_TITLE)), SystemMessageColor);
if(run_type == RT_VS){ if(run_type == RT_VS){
if(MTINFO.CONTROL == 1){ if(MTINFO.CONTROL == 1){
@ -2953,11 +2957,11 @@ void MainForm::RunGame(Object^ obj)
p2_win = i; p2_win = i;
} }
WriteTime(0, SystemMessageColor); WriteTime(0, SystemMessageColor);
WriteMessage(String::Format(L"対戦成績 {0}戦 {1}勝 {2}敗\n", num_vs, p1_win, p2_win), SecretColor); WriteMessage(String::Format(L"Score {0} matches, {1} wins (P1) {2} wins (P2)\n", num_vs, p1_win, p2_win), SecretColor);
} }
} }
else{ else{
WriteMessage(L"ゲームを終了しました。\n", SystemMessageColor); WriteMessage(L"Ended the game.\n", SystemMessageColor);
} }
} }
@ -3032,7 +3036,7 @@ void MainForm::RunVersus()
if(NetVS->SEQUENCE != VS_PING){ if(NetVS->SEQUENCE != VS_PING){
if(NetVS->SEQUENCE != VS_ERROR){ if(NetVS->SEQUENCE != VS_ERROR){
WriteMessage(L"挑戦相手からの応答がありませんでした。\n", ErrorMessageColor); WriteMessage(L"ERROR: There was no response from the opponent.\n", ErrorMessageColor);
} }
return; return;
} }
@ -3060,7 +3064,7 @@ void MainForm::RunVersus()
} }
if(NetVS->SEQUENCE != VS_SETTING){ if(NetVS->SEQUENCE != VS_SETTING){
WriteMessage(L"挑戦相手との回線が不安定です。\n", ErrorMessageColor); WriteMessage(L"ERROR: The connection to the opponent is unstable.\n", ErrorMessageColor);
return; return;
} }
@ -3081,7 +3085,7 @@ void MainForm::RunVersus()
} }
if(c < 4){ if(c < 4){
WriteMessage(L"ディレイ値の計算が正常に行われませんでした。\n", ErrorMessageColor); WriteMessage(L"ERROR: Could not determine the delay from the opponent's ping.\n", ErrorMessageColor);
return; return;
} }
@ -3107,14 +3111,14 @@ void MainForm::RunVersus()
NetVS->SLEEPING = false; NetVS->SLEEPING = false;
if(NetVS->SEQUENCE != VS_STANDBY){ if(NetVS->SEQUENCE != VS_STANDBY){
WriteMessage(L"対戦準備が完了しませんでした。\n", ErrorMessageColor); WriteMessage(L"ERROR: The match initialization process could not be completed.\n", ErrorMessageColor);
return; return;
} }
NetVS->SEQUENCE = VS_DATA; NetVS->SEQUENCE = VS_DATA;
// 対戦開始 // 対戦開始
WriteMessage(String::Format(L"対戦を開始します。(delay:{0})\n", NetVS->DELAY), SystemMessageColor); WriteMessage(String::Format(L"Match starting! (Delay: {0})\n", NetVS->DELAY), SystemMessageColor);
GameThread = gcnew Thread(gcnew ParameterizedThreadStart(this, &MainForm::RunGame)); GameThread = gcnew Thread(gcnew ParameterizedThreadStart(this, &MainForm::RunGame));
GameThread->Start((UINT)RT_VS); GameThread->Start((UINT)RT_VS);
@ -3349,9 +3353,9 @@ UINT16 MainForm::RemoteInput()
} }
if(eax == 0xFFFF && NetVS->SEQUENCE == VS_TIMEOUT){ if(eax == 0xFFFF && NetVS->SEQUENCE == VS_TIMEOUT){
WriteMessage(L"タイムアウトしたため対戦を終了します。\n", ErrorMessageColor); WriteMessage(L"The match ended due to a timeout.\n", ErrorMessageColor);
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
WriteMessage(String::Format(L"Frame > L:{0} / R:{1} (delay:{2})\n", NetVS->L_FRAME, NetVS->R_FRAME, NetVS->DELAY), DebugMessageColor); WriteMessage(String::Format(L"Frame > L: {0} / R: {1} (delay: {2})\n", NetVS->L_FRAME, NetVS->R_FRAME, NetVS->DELAY), DebugMessageColor);
} }
QuitGame(); QuitGame();
@ -3364,9 +3368,9 @@ UINT16 MainForm::RemoteInput()
if(NetVS->SEQUENCE != VS_DATA) return 0; if(NetVS->SEQUENCE != VS_DATA) return 0;
if((eax & 0x0003) == 0x0003){ if((eax & 0x0003) == 0x0003){
WriteMessage(L"不正パケットの受信 > 左右同時押し\n", ErrorMessageColor); WriteMessage(L"Received illegal packet: press left and right simultaneously\n", ErrorMessageColor); //fixme: dubious translation: 不正パケットの受信 > 左右同時押し
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
WriteMessage(String::Format(L"IP = {0}\n", NetVS->IP_EP->Address), DebugMessageColor); WriteMessage(String::Format(L"IP: {0}\n", NetVS->IP_EP->Address), DebugMessageColor);
} }
QuitGame(); QuitGame();
@ -3440,7 +3444,7 @@ UINT16 MainForm::ReadReplayData(BinaryReader^ br, REPLAY_INFO& ri)
} }
} }
catch(EndOfStreamException^){ catch(EndOfStreamException^){
WriteMessage(L"リプレイファイルの再生が終了しました。\n", SystemMessageColor); WriteMessage(L"End of replay file.\n", SystemMessageColor);
br->Close(); br->Close();
br = nullptr; br = nullptr;
@ -3516,7 +3520,7 @@ void MainForm::RunAutoRest() {
int to = MTOPTION.AUTO_REST_TIME; // タイムアウト指定時間 int to = MTOPTION.AUTO_REST_TIME; // タイムアウト指定時間
AutoRestRanging = true; AutoRestRanging = true;
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
WriteMessage(String::Format(L"自動休憩スレッド開始 {0}分\n", to), DebugMessageColor); WriteMessage(String::Format(L"Auto rest thread starts in {0} minute(s)!\n", to), DebugMessageColor);
} }
while(AutoRestRanging){ while(AutoRestRanging){
AutoRestSleeping = true; AutoRestSleeping = true;
@ -3537,7 +3541,7 @@ void MainForm::RunAutoRest() {
// フリー状態なら休憩状態にする // フリー状態なら休憩状態にする
if(UDP != nullptr && MemberList[0]->STATE == MS_FREE){ if(UDP != nullptr && MemberList[0]->STATE == MS_FREE){
ChangeState((BYTE)MS_REST); ChangeState((BYTE)MS_REST);
WriteMessage(L"休憩状態を変更しました。 > オン\n", SystemMessageColor); WriteMessage(L"Rest mode set to ON.\n", SystemMessageColor);
} }
AutoRestRanging = false; AutoRestRanging = false;
AutoRestThread = nullptr; AutoRestThread = nullptr;
@ -3549,9 +3553,9 @@ void MainForm::ChangeSeek() {
if(MemberList[0]->STATE == MS_FREE){ if(MemberList[0]->STATE == MS_FREE){
ChangeState((BYTE)MS_SEEK); ChangeState((BYTE)MS_SEEK);
WriteMessage(L"対戦募集状態を変更しました。 > オン\n", SystemMessageColor); WriteMessage(L"Seek mode set to ON.\n", SystemMessageColor);
WriteTime(0, SystemMessageColor); WriteTime(0, SystemMessageColor);
WriteMessage(String::Format(L"{0}が対戦募集状態になりました。\n", MemberList[0]->NAME), SystemMessageColor); WriteMessage(String::Format(L"{0} is now accepting new matches.\n", MemberList[0]->NAME), SystemMessageColor);
} }
else if(MemberList[0]->STATE == MS_SEEK){ else if(MemberList[0]->STATE == MS_SEEK){
if(GameThread != nullptr && GameThread->IsAlive){ if(GameThread != nullptr && GameThread->IsAlive){
@ -3560,9 +3564,9 @@ void MainForm::ChangeSeek() {
ChangeState((BYTE)MS_FREE); ChangeState((BYTE)MS_FREE);
} }
WriteMessage(L"対戦募集状態を変更しました。 > オフ\n", SystemMessageColor); WriteMessage(L"Seek mode set to OFF.\n", SystemMessageColor);
WriteTime(0, SystemMessageColor); WriteTime(0, SystemMessageColor);
WriteMessage(String::Format(L"{0}が対戦募集を締め切りました。\n", MemberList[0]->NAME), SystemMessageColor); WriteMessage(String::Format(L"{0} has stopped accepting new matches.\n", MemberList[0]->NAME), SystemMessageColor);
} }
} }
void MainForm::ChangeLogWordWrap() { void MainForm::ChangeLogWordWrap() {
@ -3570,13 +3574,13 @@ void MainForm::ChangeLogWordWrap() {
richTextBoxLog->WordWrap = MTOPTION.LOG_WORDWRAP; richTextBoxLog->WordWrap = MTOPTION.LOG_WORDWRAP;
toolStripMenuItemWordWrap->Checked = MTOPTION.LOG_WORDWRAP; toolStripMenuItemWordWrap->Checked = MTOPTION.LOG_WORDWRAP;
if(MTOPTION.LOG_WORDWRAP){ if(MTOPTION.LOG_WORDWRAP){
WriteMessage(L"テキスト折り返し > オン\n", SystemMessageColor); WriteMessage(L"Text wrap set to ON.\n", SystemMessageColor);
}else{ }else{
WriteMessage(L"テキスト折り返し > オフ\n", SystemMessageColor); WriteMessage(L"Text wrap set to OFF.\n", SystemMessageColor);
} }
} }
void MainForm::ClearLog(){ void MainForm::ClearLog(){
if(MessageBox::Show(L"ログを10行残して削除します。\nよろしいですか?", L"ログの削除", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){ if(MessageBox::Show(L"This will remove all but the last 10 lines of the log.\nAre you sure you want to clear the log?", L"Clear Log", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){
}else{ }else{
return; return;
} }
@ -3587,7 +3591,7 @@ void MainForm::ClearLog(){
int index = richTextBoxLog->GetFirstCharIndexFromLine(len-11); int index = richTextBoxLog->GetFirstCharIndexFromLine(len-11);
richTextBoxLog->SelectionStart=0; richTextBoxLog->SelectionStart=0;
richTextBoxLog->Select(0, index); richTextBoxLog->Select(0, index);
richTextBoxLog->SelectedText= L"[削除されました]\n"; richTextBoxLog->SelectedText= L"[Deleted]\n";
} }
} }
catch(Exception ^e){ catch(Exception ^e){

View file

@ -32,9 +32,6 @@ namespace LilithPort {
MainForm(void) MainForm(void)
{ {
InitializeComponent(); InitializeComponent();
//
//TODO: ここにコンストラクタ コードを追加します
//
// ブックマークをメニューに登録 // ブックマークをメニューに登録
String^ tmpName; String^ tmpName;
@ -51,7 +48,7 @@ namespace LilithPort {
toolStripMenuItemDelBookMark = (gcnew System::Windows::Forms::ToolStripMenuItem()); toolStripMenuItemDelBookMark = (gcnew System::Windows::Forms::ToolStripMenuItem());
toolStripMenuItemBookMark->DropDownItems->Add(toolStripMenuItemDelBookMark); toolStripMenuItemBookMark->DropDownItems->Add(toolStripMenuItemDelBookMark);
toolStripMenuItemDelBookMark->Text = L"削除(&D)"; toolStripMenuItemDelBookMark->Text = L"&Delete";
toolStripMenuItemDelBookMark->Tag = L"toolStripMenuItemBookMark" + i; toolStripMenuItemDelBookMark->Tag = L"toolStripMenuItemBookMark" + i;
toolStripMenuItemDelBookMark->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemDelBookMark_Click); toolStripMenuItemDelBookMark->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemDelBookMark_Click);
} }
@ -293,7 +290,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
ReloadListToolStripMenuItem->Name = L"ReloadListToolStripMenuItem"; ReloadListToolStripMenuItem->Name = L"ReloadListToolStripMenuItem";
ReloadListToolStripMenuItem->ShortcutKeys = System::Windows::Forms::Keys::F5; ReloadListToolStripMenuItem->ShortcutKeys = System::Windows::Forms::Keys::F5;
ReloadListToolStripMenuItem->Size = System::Drawing::Size(228, 22); ReloadListToolStripMenuItem->Size = System::Drawing::Size(228, 22);
ReloadListToolStripMenuItem->Text = L"&Refresh member list"; ReloadListToolStripMenuItem->Text = L"&Refresh player list";
ReloadListToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainForm::ReloadListToolStripMenuItem_Click); ReloadListToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainForm::ReloadListToolStripMenuItem_Click);
// //
// menuStrip1 // menuStrip1
@ -801,28 +798,28 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
// //
this->toolStripMenuItemVS->Name = L"toolStripMenuItemVS"; this->toolStripMenuItemVS->Name = L"toolStripMenuItemVS";
this->toolStripMenuItemVS->Size = System::Drawing::Size(121, 22); this->toolStripMenuItemVS->Size = System::Drawing::Size(121, 22);
this->toolStripMenuItemVS->Text = L"対戦する"; this->toolStripMenuItemVS->Text = L"Fight";
this->toolStripMenuItemVS->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemVS_Click); this->toolStripMenuItemVS->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemVS_Click);
// //
// toolStripMenuItemWatch // toolStripMenuItemWatch
// //
this->toolStripMenuItemWatch->Name = L"toolStripMenuItemWatch"; this->toolStripMenuItemWatch->Name = L"toolStripMenuItemWatch";
this->toolStripMenuItemWatch->Size = System::Drawing::Size(121, 22); this->toolStripMenuItemWatch->Size = System::Drawing::Size(121, 22);
this->toolStripMenuItemWatch->Text = L"観戦する"; this->toolStripMenuItemWatch->Text = L"Spectate";
this->toolStripMenuItemWatch->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemWatch_Click); this->toolStripMenuItemWatch->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemWatch_Click);
// //
// toolStripMenuItemSeek // toolStripMenuItemSeek
// //
this->toolStripMenuItemSeek->Name = L"toolStripMenuItemSeek"; this->toolStripMenuItemSeek->Name = L"toolStripMenuItemSeek";
this->toolStripMenuItemSeek->Size = System::Drawing::Size(121, 22); this->toolStripMenuItemSeek->Size = System::Drawing::Size(121, 22);
this->toolStripMenuItemSeek->Text = L"対戦募集する"; this->toolStripMenuItemSeek->Text = L"Seek/Challenge"; //対戦募集する
this->toolStripMenuItemSeek->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemSeek_Click); this->toolStripMenuItemSeek->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemSeek_Click);
// //
// toolStripMenuItemPing // toolStripMenuItemPing
// //
this->toolStripMenuItemPing->Name = L"toolStripMenuItemPing"; this->toolStripMenuItemPing->Name = L"toolStripMenuItemPing";
this->toolStripMenuItemPing->Size = System::Drawing::Size(121, 22); this->toolStripMenuItemPing->Size = System::Drawing::Size(121, 22);
this->toolStripMenuItemPing->Text = L"PING"; this->toolStripMenuItemPing->Text = L"Ping";
this->toolStripMenuItemPing->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemPing_Click); this->toolStripMenuItemPing->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemPing_Click);
// //
// toolStripSeparator12 // toolStripSeparator12
@ -834,7 +831,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
// //
this->toolStripMenuItemKick->Name = L"toolStripMenuItemKick"; this->toolStripMenuItemKick->Name = L"toolStripMenuItemKick";
this->toolStripMenuItemKick->Size = System::Drawing::Size(121, 22); this->toolStripMenuItemKick->Size = System::Drawing::Size(121, 22);
this->toolStripMenuItemKick->Text = L"KICK"; this->toolStripMenuItemKick->Text = L"Kick";
this->toolStripMenuItemKick->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemKick_Click); this->toolStripMenuItemKick->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemKick_Click);
// //
// richTextBoxLog // richTextBoxLog
@ -868,7 +865,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
this->contextMenuItemCopy->Name = L"contextMenuItemCopy"; this->contextMenuItemCopy->Name = L"contextMenuItemCopy";
this->contextMenuItemCopy->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::C)); this->contextMenuItemCopy->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::C));
this->contextMenuItemCopy->Size = System::Drawing::Size(163, 22); this->contextMenuItemCopy->Size = System::Drawing::Size(163, 22);
this->contextMenuItemCopy->Text = L"コピー(&C)"; this->contextMenuItemCopy->Text = L"&Copy";
this->contextMenuItemCopy->Click += gcnew System::EventHandler(this, &MainForm::contextMenuItemCopy_Click); this->contextMenuItemCopy->Click += gcnew System::EventHandler(this, &MainForm::contextMenuItemCopy_Click);
// //
// toolStripSeparator6 // toolStripSeparator6
@ -881,7 +878,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
this->contxtMenuItemSaveLog->Name = L"contxtMenuItemSaveLog"; this->contxtMenuItemSaveLog->Name = L"contxtMenuItemSaveLog";
this->contxtMenuItemSaveLog->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::S)); this->contxtMenuItemSaveLog->ShortcutKeys = static_cast<System::Windows::Forms::Keys>((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::S));
this->contxtMenuItemSaveLog->Size = System::Drawing::Size(163, 22); this->contxtMenuItemSaveLog->Size = System::Drawing::Size(163, 22);
this->contxtMenuItemSaveLog->Text = L"ログの保存(&S)"; this->contxtMenuItemSaveLog->Text = L"&Save log";
this->contxtMenuItemSaveLog->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemSaveLog_Click); this->contxtMenuItemSaveLog->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemSaveLog_Click);
// //
// textBoxInput // textBoxInput
@ -897,8 +894,8 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
// //
// openFileDialog1 // openFileDialog1
// //
this->openFileDialog1->Filter = L"MT Replay file (*.mtr)|*.mtr"; this->openFileDialog1->Filter = L"MT replay file (*.mtr)|*.mtr";
this->openFileDialog1->Title = L"LilithPort用のリプレイファイル"; this->openFileDialog1->Title = L"Open LilithPort replay";
// //
// statusStrip1 // statusStrip1
// //
@ -997,7 +994,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
delegate void WriteMessageDelegate(String^ msg, Color color); delegate void WriteMessageDelegate(String^ msg, Color color);
// MemberInfoさんはstdafx.hにお引越ししました // MemberInfoはstdafx.hにお引越ししました
static Generic::List<MemberInfo^>^ MemberList; static Generic::List<MemberInfo^>^ MemberList;
static Generic::List<MemberInfoBackUp^>^ MemberListBackUp; static Generic::List<MemberInfoBackUp^>^ MemberListBackUp;
static UINT16 IDCounter; // Max 3FFF(16383) static UINT16 IDCounter; // Max 3FFF(16383)
@ -1011,7 +1008,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
// IP取得用 // IP取得用
static WebClient^ GetIPClient; static WebClient^ GetIPClient;
static Uri^ GetIPUri = gcnew Uri("http://checkip.dyndns.org/"); static Uri^ GetIPUri = gcnew Uri("http://checkip.dyndns.org/"); //TODO: change checkip.dyndns.org to something more futureproof
static Thread^ TimerGetIPThread; static Thread^ TimerGetIPThread;
static bool GetIPCancelled; static bool GetIPCancelled;
static bool GetIPSleeping; static bool GetIPSleeping;
@ -1101,6 +1098,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
void StartGame(UINT type){ void StartGame(UINT type){
// 格ツクじゃないよ // 格ツクじゃないよ
try{ try{
//TODO: Quite frankly, I think this is a really bad way of detecting "supported" FM files. Case in point: FM15.
FileVersionInfo^ info = FileVersionInfo::GetVersionInfo(gcnew String(MTOPTION.GAME_EXE)); FileVersionInfo^ info = FileVersionInfo::GetVersionInfo(gcnew String(MTOPTION.GAME_EXE));
if(info->FileDescription != L"格闘ツクール2nd." && info->FileDescription != L"2D格闘ツクール95"){ if(info->FileDescription != L"格闘ツクール2nd." && info->FileDescription != L"2D格闘ツクール95"){
@ -1116,8 +1114,8 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
} }
} }
catch(Exception^){ catch(Exception^){
WriteMessage(L"格闘ツクールの実行ファイルではありません。\n", ErrorMessageColor); WriteMessage(L"ERROR: This is not a valid or supported Fighter Maker executable.\n", ErrorMessageColor);
WriteMessage(L"オプションで実行ファイルのパスを設定してください。\n", ErrorMessageColor); WriteMessage(L"Please go to the Options menu and set the path to a supported FM executable.\n", ErrorMessageColor);
return; return;
} }
@ -1231,7 +1229,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
array<TCHAR>^ h = br->ReadChars(header->Length); array<TCHAR>^ h = br->ReadChars(header->Length);
for(int i = 0; i < h->Length; i++){ for(int i = 0; i < h->Length; i++){
if(h[i] != header[i]){ if(h[i] != header[i]){
WriteMessage(L"有効なリプレイファイルではありません。\n", ErrorMessageColor); WriteMessage(L"ERROR: This is not a valid replay file. The header was not recognized.\n", ErrorMessageColor);
return; return;
} }
} }
@ -1239,7 +1237,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
ver = br->ReadChar(); ver = br->ReadChar();
if(ver < _T('1') || ver > _T('4')){ if(ver < _T('1') || ver > _T('4')){
WriteMessage(L"有効なリプレイのバージョンではありません。\n", ErrorMessageColor); WriteMessage(L"ERROR: This replay is not supported. Only replays between versions 1 and 4 are supported.\n", ErrorMessageColor);
return; return;
} }
} }
@ -1253,10 +1251,10 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
} }
else{ else{
if(_tcslen(MTINFO.ORIGINAL_TITLE) > 0){ if(_tcslen(MTINFO.ORIGINAL_TITLE) > 0){
WriteMessage(String::Format(L"{0}が起動中です。\n", gcnew String(MTINFO.ORIGINAL_TITLE)), SystemMessageColor); WriteMessage(String::Format(L"{0} is starting.\n", gcnew String(MTINFO.ORIGINAL_TITLE)), SystemMessageColor);
} }
else{ else{
WriteMessage(L"他のゲームが起動中です。\n", SystemMessageColor); WriteMessage(L"Another game is already starting.\n", SystemMessageColor);
} }
} }
} }
@ -1264,14 +1262,14 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
void QuitGame(){ void QuitGame(){
if(GameThread != nullptr && GameThread->IsAlive){ if(GameThread != nullptr && GameThread->IsAlive){
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
WriteMessage(L"ゲームプロセスを停止します。\n", DebugMessageColor); WriteMessage(L"Closing game process...\n", DebugMessageColor);
} }
try{ try{
Process::GetProcessById(MTINFO.PROCESS_ID)->CloseMainWindow(); Process::GetProcessById(MTINFO.PROCESS_ID)->CloseMainWindow();
} }
catch(ArgumentException^){ catch(ArgumentException^){
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
WriteMessage(L"例外 > ArgumentException\n", DebugMessageColor); WriteMessage(L"Caught an ArgumentException trying to close the game! Abandoning game thread.\n", DebugMessageColor);
} }
GameThread->Abort(); GameThread->Abort();
GameThread = nullptr; GameThread = nullptr;
@ -1338,7 +1336,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
if(state == MS_WATCH) ChangeState((BYTE)MS_FREE); if(state == MS_WATCH) ChangeState((BYTE)MS_FREE);
if(state == MS_COUCH) ChangeState((BYTE)MS_REST); if(state == MS_COUCH) ChangeState((BYTE)MS_REST);
toolStripMenuItemWatch->Text = gcnew String(L"観戦する"); toolStripMenuItemWatch->Text = gcnew String(L"Spectate");
} }
void Restart(){ void Restart(){
@ -1392,7 +1390,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
MTOPTION.CONNECTION_TYPE = CT_FREE; MTOPTION.CONNECTION_TYPE = CT_FREE;
MemberList[0]->TYPE = CT_FREE; MemberList[0]->TYPE = CT_FREE;
MemberList[0]->STATE = MS_FREE; MemberList[0]->STATE = MS_FREE;
this->Text = gcnew String(L"LilithPort [Free Play]"); this->Text = gcnew String(L"LilithPort (Free Play)");
listBoxMember->Refresh(); listBoxMember->Refresh();
} }
@ -1507,7 +1505,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
} }
if(i >= MemberList->Count && MTOPTION.CONNECTION_TYPE != CT_SERVER){ if(i >= MemberList->Count && MTOPTION.CONNECTION_TYPE != CT_SERVER){
name = gcnew String(String::Format(L"Unknown(ID:{0})", id)); name = gcnew String(String::Format(L"Unknown (ID: {0})", id));
col = ErrorMessageColor; col = ErrorMessageColor;
// メンバーリスト外のIDがいたので問い合わせ // メンバーリスト外のIDがいたので問い合わせ
@ -1584,7 +1582,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
WriteTime(1, SystemMessageColor); WriteTime(1, SystemMessageColor);
} }
// 表示 // 表示
WriteMessage(String::Format(L"[ {0} ] ", name), col); WriteMessage(String::Format(L"<{0}> ", name), col);
WriteMessage(String::Format(L"{0}\n", tmpMsg), TalkMessageColor); WriteMessage(String::Format(L"{0}\n", tmpMsg), TalkMessageColor);
} }
@ -1682,7 +1680,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
richTextBoxLog->SelectionStart = richTextBoxLog->Text->Length; richTextBoxLog->SelectionStart = richTextBoxLog->Text->Length;
richTextBoxLog->SelectionColor = NameColor[type]; richTextBoxLog->SelectionColor = NameColor[type];
richTextBoxLog->SelectionBackColor = CommentBackColor; richTextBoxLog->SelectionBackColor = CommentBackColor;
richTextBoxLog->AppendText(String::Format(L"[ {0} ] ", name)); richTextBoxLog->AppendText(String::Format(L"<{0}> ", name));
richTextBoxLog->SelectionColor = TalkMessageColor; richTextBoxLog->SelectionColor = TalkMessageColor;
richTextBoxLog->SelectionBackColor = CommentBackColor; richTextBoxLog->SelectionBackColor = CommentBackColor;
@ -1702,27 +1700,28 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
} }
else{ else{
WriteTime(0, SystemMessageColor); WriteTime(0, SystemMessageColor);
WriteMessage(String::Format(L"{0}が入室しました。\n", name), SystemMessageColor); WriteMessage(String::Format(L"{0} has joined.\n", name), SystemMessageColor);
} }
} }
void WriteCommandList(){ void WriteCommandList(){
WriteMessage( WriteMessage(
L"/help コマンド一覧の表示\n" L"/help: Displays a full list of available commands.\n"
L"/clear ログの削除\n" L"/clear: Clears the chat log.\n"
L"/log RTF形式でログの保存\n" L"/log: Saves the log to an RTF file.\n"
L"/debug デバッグモードの切り替え\n" L"/debug: Toggles debug mode.\n"
L"/vs ランダムに対戦を挑む\n" L"/vs: Challenge a random opponent!\n"
L"/game ゲームの起動\n" L"/game: Starts the game.\n"
L"/replay リプレイファイルの再生\n" L"/replay: Opens a replay file.\n"
L"/quit 起動中のゲームを終了\n" L"/quit: Closes the game during battle.\n"
L"/reload メンバーリストの更新\n" L"/reload: Reloads player list.\n"
L"/restart フリープレイから新規に回線接続\n" L"/restart: Reconnects to the last known server.\n"
L"/rest 休憩状態の切り替え\n" L"/rest: Toggles rest mode.\n"
L"/seek 対戦募集状態の切り替え\n" L"/seek: Toggles seek mode.\n"
L"/list リストの表示を切り替え\n" L"/list: Displays the player list.\n"
L"/leave 退室&フリープレイに移行\n" L"/leave: Exits the server and enters Free Play mode.\n"
L"/exit プログラムの終了\n", SystemMessageColor); L"/exit: Exits the program.\n"
L"LilithPort also supports drag-and-drop for replay files and for locating the FM executable.", SystemMessageColor);
} }
void RandomVersus(){ void RandomVersus(){
@ -1755,7 +1754,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
StartGame(RT_VS); StartGame(RT_VS);
} }
else{ else{
WriteMessage(L"対戦できる相手がいませんでした。\n", SystemMessageColor); WriteMessage(L"Could not find the opponent in the player list.\n", SystemMessageColor);
} }
} }
} }
@ -1783,15 +1782,15 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
Monitor::Exit(richTextBoxLog); Monitor::Exit(richTextBoxLog);
} }
WriteMessage(String::Format(L"\"{0}\"にログを保存しました。\n", file), SystemMessageColor); WriteMessage(String::Format(L"Log saved to \"{0}\".\n", file), SystemMessageColor);
} }
else if(textBoxInput->Text->StartsWith("/debug", StringComparison::OrdinalIgnoreCase)){ else if(textBoxInput->Text->StartsWith("/debug", StringComparison::OrdinalIgnoreCase)){
MTINFO.DEBUG ^= 1; MTINFO.DEBUG ^= 1;
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
WriteMessage(L"デバッグモード > オン\n", SystemMessageColor); WriteMessage(L"Debug mode is now ON!\n", SystemMessageColor);
} }
else{ else{
WriteMessage(L"デバッグモード > オフ\n", SystemMessageColor); WriteMessage(L"Debug mode is now OFF.\n", SystemMessageColor);
} }
} }
else if(textBoxInput->Text->StartsWith("/vs", StringComparison::OrdinalIgnoreCase)){ else if(textBoxInput->Text->StartsWith("/vs", StringComparison::OrdinalIgnoreCase)){
@ -1815,11 +1814,11 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
if(MemberList[0]->STATE == MS_FREE){ if(MemberList[0]->STATE == MS_FREE){
ChangeState((BYTE)MS_REST); ChangeState((BYTE)MS_REST);
WriteMessage(L"休憩状態を変更しました。 > オン\n", SystemMessageColor); WriteMessage(L"Rest mode set to ON.\n", SystemMessageColor);
} }
else if(MemberList[0]->STATE == MS_REST){ else if(MemberList[0]->STATE == MS_REST){
ChangeState((BYTE)MS_FREE); ChangeState((BYTE)MS_FREE);
WriteMessage(L"休憩状態を変更しました。 > オフ\n", SystemMessageColor); WriteMessage(L"Rest mode set to OFF.\n", SystemMessageColor);
} }
} }
else if(textBoxInput->Text->StartsWith("/seek", StringComparison::OrdinalIgnoreCase)){ else if(textBoxInput->Text->StartsWith("/seek", StringComparison::OrdinalIgnoreCase)){
@ -1844,7 +1843,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
richTextBoxLog->SelectionColor = TalkMessageColor; richTextBoxLog->SelectionColor = TalkMessageColor;
richTextBoxLog->SelectionBackColor = NoticeBackColor; richTextBoxLog->SelectionBackColor = NoticeBackColor;
richTextBoxLog->AppendText(Byte(dice).ToString() + L"\n"); richTextBoxLog->AppendText("Rolled a "+Byte(dice).ToString() + L"\n");
richTextBoxLog->SelectionStart = richTextBoxLog->Text->Length; richTextBoxLog->SelectionStart = richTextBoxLog->Text->Length;
if(!MTOPTION.LOG_LOCK) { if(!MTOPTION.LOG_LOCK) {
@ -1876,7 +1875,10 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
// TYPE 0:Server 1:Host 2:Client // TYPE 0:Server 1:Host 2:Client
WriteMessage(String::Format(L"{0} / {1} / {2} / {3}\n", MemberList[i]->NAME, MemberList[i]->ID, MemberList[i]->IP_EP, MemberList[i]->TYPE), DebugMessageColor); WriteMessage(String::Format(L"{0} / {1} / {2} / {3}\n", MemberList[i]->NAME, MemberList[i]->ID, MemberList[i]->IP_EP, MemberList[i]->TYPE), DebugMessageColor);
} }
} }
else {
WriteMessage("/memberlist can only be performed when debug mode is enabled.", ErrorMessageColor);
}
} }
else if(textBoxInput->Text->StartsWith("/memberhistory", StringComparison::OrdinalIgnoreCase)){ else if(textBoxInput->Text->StartsWith("/memberhistory", StringComparison::OrdinalIgnoreCase)){
// デバッグ用コマンド // デバッグ用コマンド
@ -2109,7 +2111,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
Array::Copy(BitConverter::GetBytes(0), 0, send, 1, 2); Array::Copy(BitConverter::GetBytes(0), 0, send, 1, 2);
UDP->Send(send, 3, MemberList[1]->IP_EP); UDP->Send(send, 3, MemberList[1]->IP_EP);
WriteMessage(L"メンバーリストを更新しました。(連続しての更新はサーバーに負荷がかかるため、注意してください。)\n", SystemMessageColor); WriteMessage(L"Manually updated the players list. (The list is usually updated continuously as manual requests place a load on the server.)\n", SystemMessageColor);
} }
void WriteStatus(String^ msg){ void WriteStatus(String^ msg){
toolStripStatusLabel->Text = msg; toolStripStatusLabel->Text = msg;
@ -2127,7 +2129,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
} }
// TimerGetIPタイムアウト // TimerGetIPタイムアウト
if(e->Cancelled) { if(e->Cancelled) {
WriteMessage(L"IPアドレス取得の要求がタイムアウトによりキャンセルされました。\n", ErrorMessageColor); WriteMessage(L"IP address acquisition request failed due to a timeout.\n", ErrorMessageColor);
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
WriteMessage(e->ToString() + L"\n", DebugMessageColor); WriteMessage(e->ToString() + L"\n", DebugMessageColor);
} }
@ -2151,7 +2153,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
} }
catch(Exception^ e) { catch(Exception^ e) {
Global_address = 0; Global_address = 0;
WriteMessage(L"IPアドレス情報の抽出に失敗しました。\nLilithPortのバージョンが古い可能性があります。\n", ErrorMessageColor); WriteMessage(L"ERROR: Failed to extract IP address information. This version of LilithPort may be outdated.\n", ErrorMessageColor);
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
WriteMessage(e->ToString() + L"\n", DebugMessageColor); WriteMessage(e->ToString() + L"\n", DebugMessageColor);
@ -2163,14 +2165,14 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
if(reply != nullptr) reply->Close(); if(reply != nullptr) reply->Close();
} }
if(Global_address > 0) { if(Global_address > 0) {
WriteMessage(String::Format(L"IPアドレスを取得しました。 > {0}\n", s3[1]), SystemMessageColor); WriteMessage(String::Format(L"IP address acquired: {0}\n", s3[1]), SystemMessageColor);
WriteMessage(L"[変換アドレス:ポート]\nLilithPort用 > ", SystemMessageColor); WriteMessage(L"[Converted address]\nLilithPort: ", SystemMessageColor);
richTextBoxLog->SelectionColor = TalkMessageColor; richTextBoxLog->SelectionColor = TalkMessageColor;
richTextBoxLog->SelectionBackColor = NoticeBackColor; richTextBoxLog->SelectionBackColor = NoticeBackColor;
richTextBoxLog->AppendText(String::Format(L"{0}:{1}\n", EncryptionIP(s3[1]), MTOPTION.OPEN_PORT)); richTextBoxLog->AppendText(String::Format(L"{0}:{1}\n", EncryptionIP(s3[1]), MTOPTION.OPEN_PORT));
WriteMessage(L"MTSP用 > ", SystemMessageColor); WriteMessage(L"MTSP: ", SystemMessageColor);
richTextBoxLog->SelectionColor = TalkMessageColor; richTextBoxLog->SelectionColor = TalkMessageColor;
richTextBoxLog->SelectionBackColor = NoticeBackColor; richTextBoxLog->SelectionBackColor = NoticeBackColor;
richTextBoxLog->AppendText(String::Format(L"{0}:{1}\n", MTEncryptionIP(s3[1]), MTOPTION.OPEN_PORT)); richTextBoxLog->AppendText(String::Format(L"{0}:{1}\n", MTEncryptionIP(s3[1]), MTOPTION.OPEN_PORT));
@ -2244,14 +2246,14 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
GetIPClient->OpenReadCompleted += gcnew OpenReadCompletedEventHandler(this, &MainForm::GetIPOpenReadCompleted); GetIPClient->OpenReadCompleted += gcnew OpenReadCompletedEventHandler(this, &MainForm::GetIPOpenReadCompleted);
// タイムアウトタイマー // タイムアウトタイマー
WriteMessage(L"IPアドレスを取得中です...\n", SystemMessageColor); WriteMessage(L"Obtaining IP address from "+GetIPUri->ToString()+"...\n", SystemMessageColor);
TimerGetIPThread = gcnew Thread(gcnew ThreadStart(this, &MainForm::TimerGetIP)); TimerGetIPThread = gcnew Thread(gcnew ThreadStart(this, &MainForm::TimerGetIP));
TimerGetIPThread->Start(); TimerGetIPThread->Start();
try{ try{
GetIPClient->OpenReadAsync(GetIPUri); GetIPClient->OpenReadAsync(GetIPUri);
} }
catch(WebException^ e) { catch(WebException^ e) {
WriteMessage(L"IPアドレスの取得に失敗しました。\n", ErrorMessageColor); WriteMessage(L"ERROR: Could not obtain IP address.\n", ErrorMessageColor);
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
WriteMessage(e->ToString() + L"\n", DebugMessageColor); WriteMessage(e->ToString() + L"\n", DebugMessageColor);
@ -2373,7 +2375,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
s->ShowDialog(this); s->ShowDialog(this);
if(!File::Exists(gcnew String(MTOPTION.GAME_EXE))){ if(!File::Exists(gcnew String(MTOPTION.GAME_EXE))){
MessageBox::Show(L"実行ファイルのパスを設定してください。", L"ゲームがありません"); MessageBox::Show(L"Please set the path to the Fighter Maker executable file.", L"No game file found");
OptionForm^ o = gcnew OptionForm; OptionForm^ o = gcnew OptionForm;
o->GameExePathError = true; o->GameExePathError = true;
@ -2395,7 +2397,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
} }
if(MTOPTION.CONNECTION_TYPE == CT_SERVER && MTINFO.ERRORED == false){ if(MTOPTION.CONNECTION_TYPE == CT_SERVER && MTINFO.ERRORED == false){
if(MessageBox::Show(L"サーバを落としますか?", L"終了の確認", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::No){ if(MessageBox::Show(L"If you close LilithPort, the server will be closed and all players will be kicked.\nShut down the server?", L"Confirm Server Shutdown", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::No){
IsFormClosing = false; IsFormClosing = false;
e->Cancel = true; e->Cancel = true;
return; return;
@ -2503,7 +2505,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
PacketSendAllMember(msg, 0); PacketSendAllMember(msg, 0);
WriteMessage(L"[サーバー告知]-------------------\n", SystemMessageColor); WriteMessage(L"[Message of the Day]-------------------\n", SystemMessageColor);
WriteNotice(textBoxInput->Text); WriteNotice(textBoxInput->Text);
WriteMessage(L"-------------------------------\n", SystemMessageColor); WriteMessage(L"-------------------------------\n", SystemMessageColor);
} }
@ -2511,7 +2513,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
AnalyzeCommand(); AnalyzeCommand();
} }
else if(UDP != nullptr && ServerMode >= SM_MATCH){ else if(UDP != nullptr && ServerMode >= SM_MATCH){
WriteMessage(L"チャットは禁止されています。\n", SystemMessageColor); WriteMessage(L"Chat is disabled on this server.\n", SystemMessageColor);
} }
else if(UDP != nullptr){ else if(UDP != nullptr){
// チャット発言 // チャット発言
@ -2590,18 +2592,18 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
// 休憩状態の変更 // 休憩状態の変更
if(state == MS_FREE){ if(state == MS_FREE){
ChangeState((BYTE)MS_REST); ChangeState((BYTE)MS_REST);
WriteMessage(L"休憩状態を変更しました。 > オン\n", SystemMessageColor); WriteMessage(L"Rest mode is now ON.\n", SystemMessageColor);
} }
else if(state == MS_REST){ else if(state == MS_REST){
ChangeState((BYTE)MS_FREE); ChangeState((BYTE)MS_FREE);
WriteMessage(L"休憩状態を変更しました。 > オフ\n", SystemMessageColor); WriteMessage(L"Rest mode is now OFF.\n", SystemMessageColor);
} }
else if(state == MS_VS){ else if(state == MS_VS){
WriteMessage(L"対戦を中止します。\n", SystemMessageColor); WriteMessage(L"Ending match...\n", SystemMessageColor);
QuitGame(); QuitGame();
} }
else if(state == MS_WATCH || state == MS_COUCH){ else if(state == MS_WATCH || state == MS_COUCH){
WriteMessage(L"観戦を中止します。\n", SystemMessageColor); WriteMessage(L"Ending spectate...\n", SystemMessageColor);
QuitWatch(true); QuitWatch(true);
} }
} }
@ -2666,7 +2668,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
} }
System::Void toolStripMenuItemVersion_Click(System::Object^ sender, System::EventArgs^ e) { System::Void toolStripMenuItemVersion_Click(System::Object^ sender, System::EventArgs^ e) {
WriteMessage(L"LilithPort v1.07\n", SystemMessageColor); WriteMessage(L"LilithPort v1.07\nEnglish translation by longbyte1\n", SystemMessageColor);
} }
System::Void toolStripMenuItemExit_Click(System::Object^ sender, System::EventArgs^ e) { System::Void toolStripMenuItemExit_Click(System::Object^ sender, System::EventArgs^ e) {
@ -2676,11 +2678,11 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
// ブックマーク追加 // ブックマーク追加
System::Void toolStripMenuItemAddBookMark_Click(System::Object^ sender, System::EventArgs^ e) { System::Void toolStripMenuItemAddBookMark_Click(System::Object^ sender, System::EventArgs^ e) {
if((MTOPTION.BOOKMARK_COUNT - MTOPTION.BOOKMARK_DELETED_COUNT) > 9) { if((MTOPTION.BOOKMARK_COUNT - MTOPTION.BOOKMARK_DELETED_COUNT) > 9) {
MessageBox::Show(L"これ以上ブックマークを追加できません。\nブックマークは最大10個まで登録できます。\n\n追加するには、ブックマークの削除を行ってください。", L"ブックマークの追加", MessageBoxButtons::OK, MessageBoxIcon::Exclamation); MessageBox::Show(L"You can only have up to 10 bookmarks. Please free up some space by deleting some bookmarks.", L"Add Bookmark", MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
return; return;
} }
if(MTOPTION.CONNECTION_TYPE == CT_SERVER || MTOPTION.CONNECTION_TYPE == CT_FREE ){ if(MTOPTION.CONNECTION_TYPE == CT_SERVER || MTOPTION.CONNECTION_TYPE == CT_FREE ){
MessageBox::Show(L"SERVERモード、\nFREEモードはブックマークに追加できません。", L"ブックマークの追加", MessageBoxButtons::OK, MessageBoxIcon::Exclamation); MessageBox::Show(L"You can't add anything to the bookmarks list while in Free Play mode or in Server mode!", L"Add Bookmark", MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
return; return;
} }
@ -2698,7 +2700,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
// 削除メニュー // 削除メニュー
toolStripMenuItemDelBookMark = (gcnew System::Windows::Forms::ToolStripMenuItem()); toolStripMenuItemDelBookMark = (gcnew System::Windows::Forms::ToolStripMenuItem());
toolStripMenuItemBookMark->DropDownItems->Add(toolStripMenuItemDelBookMark); toolStripMenuItemBookMark->DropDownItems->Add(toolStripMenuItemDelBookMark);
toolStripMenuItemDelBookMark->Text = L"削除(&D)"; toolStripMenuItemDelBookMark->Text = L"&Delete";
toolStripMenuItemDelBookMark->Tag = L"toolStripMenuItemBookMark" + MTOPTION.BOOKMARK_COUNT; toolStripMenuItemDelBookMark->Tag = L"toolStripMenuItemBookMark" + MTOPTION.BOOKMARK_COUNT;
toolStripMenuItemDelBookMark->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemDelBookMark_Click); toolStripMenuItemDelBookMark->Click += gcnew System::EventHandler(this, &MainForm::toolStripMenuItemDelBookMark_Click);
@ -2721,7 +2723,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
System::Void toolStripMenuItemBookMark_Click(System::Object^ sender, System::EventArgs^ e) { System::Void toolStripMenuItemBookMark_Click(System::Object^ sender, System::EventArgs^ e) {
UINT tmpInt = (UINT)((ToolStripMenuItem^)sender)->Tag; UINT tmpInt = (UINT)((ToolStripMenuItem^)sender)->Tag;
if(MessageBox::Show(((ToolStripMenuItem^)sender)->Text+ L" に接続します。\nよろしいですか?", L"ブックマーク接続", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){ if(MessageBox::Show(L"Connect to "+((ToolStripMenuItem^)sender)->Text+ L"?\n", L"Connect from Bookmark", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){
}else{ }else{
return; return;
} }
@ -2737,7 +2739,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
Object^ tmpTag; Object^ tmpTag;
tmpTag = ((ToolStripMenuItem^)sender)->Tag; tmpTag = ((ToolStripMenuItem^)sender)->Tag;
UINT tmpInt = (UINT)toolStripMenuItemBookMarkMenu->DropDownItems[(String^)tmpTag]->Tag; UINT tmpInt = (UINT)toolStripMenuItemBookMarkMenu->DropDownItems[(String^)tmpTag]->Tag;
if(MessageBox::Show((String^)toolStripMenuItemBookMarkMenu->DropDownItems[(String^)tmpTag]->Text+ L" をブックマークから削除します。\nよろしいですか?", L"ブックマークの削除", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){ if(MessageBox::Show((String^)toolStripMenuItemBookMarkMenu->DropDownItems[(String^)tmpTag]->Text+ L" will be deleted.\nContinue?", L"Delete Bookmark", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){
toolStripMenuItemBookMarkMenu->DropDownItems->Remove(toolStripMenuItemBookMarkMenu->DropDownItems[(String^)tmpTag]); toolStripMenuItemBookMarkMenu->DropDownItems->Remove(toolStripMenuItemBookMarkMenu->DropDownItems[(String^)tmpTag]);
MTOPTION.BOOKMARK_DELETED_COUNT++; MTOPTION.BOOKMARK_DELETED_COUNT++;
@ -2774,14 +2776,14 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
// 再起動 // 再起動
System::Void RestartToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) { System::Void RestartToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
if(MTOPTION.CONNECTION_TYPE == CT_SERVER) { if(MTOPTION.CONNECTION_TYPE == CT_SERVER) {
if(MessageBox::Show(L"サーバを落とします。\nよろしいですか?", L"再起動", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){ if(MessageBox::Show(L"This will shut down the server and drop all players.\nAre you sure you want to do this?", L"Restart", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){
}else{ }else{
return; return;
} }
} }
if(MTOPTION.CONNECTION_TYPE == CT_HOST || MTOPTION.CONNECTION_TYPE == CT_CLIENT){ if(MTOPTION.CONNECTION_TYPE == CT_HOST || MTOPTION.CONNECTION_TYPE == CT_CLIENT){
if(MessageBox::Show(L"回線を切断します。\nよろしいですか?", L"再起動", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){ if(MessageBox::Show(L"This will disconnect you from the server.\nContinue?", L"Restart", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){
}else{ }else{
return; return;
} }
@ -2793,14 +2795,14 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
// 退室 // 退室
System::Void LeaveToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) { System::Void LeaveToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
if(MTOPTION.CONNECTION_TYPE == CT_SERVER) { if(MTOPTION.CONNECTION_TYPE == CT_SERVER) {
if(MessageBox::Show(L"サーバを落とします。\nよろしいですか?", L"退室", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){ if(MessageBox::Show(L"This will shut down the server and drop all players.\nAre you sure you want to do this?", L"Leave", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){
}else{ }else{
return; return;
} }
} }
if(MTOPTION.CONNECTION_TYPE == CT_HOST || MTOPTION.CONNECTION_TYPE == CT_CLIENT){ if(MTOPTION.CONNECTION_TYPE == CT_HOST || MTOPTION.CONNECTION_TYPE == CT_CLIENT){
if(MessageBox::Show(L"回線を切断します。\nよろしいですか?", L"退室", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){ if(MessageBox::Show(L"This will disconnect you from the server.\nContinue?", L"Leave", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){
}else{ }else{
return; return;
} }
@ -2815,11 +2817,11 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
if(MemberList[0]->STATE == MS_FREE){ if(MemberList[0]->STATE == MS_FREE){
ChangeState((BYTE)MS_REST); ChangeState((BYTE)MS_REST);
WriteMessage(L"休憩状態を変更しました。 > オン\n", SystemMessageColor); WriteMessage(L"Rest mode is now ON.\n", SystemMessageColor);
} }
else if(MemberList[0]->STATE == MS_REST){ else if(MemberList[0]->STATE == MS_REST){
ChangeState((BYTE)MS_FREE); ChangeState((BYTE)MS_FREE);
WriteMessage(L"休憩状態を変更しました。 > オフ\n", SystemMessageColor); WriteMessage(L"Rest mode is now OFF.\n", SystemMessageColor);
} }
} }
@ -2865,7 +2867,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
Monitor::Exit(richTextBoxLog); Monitor::Exit(richTextBoxLog);
} }
WriteMessage(String::Format(L"\"{0}\"にログを保存しました。\n", file), SystemMessageColor); WriteMessage(String::Format(L"Saved log to \"{0}\".\n", file), SystemMessageColor);
} }
System::Void toolStripMenuItemReplay_Click(System::Object^ sender, System::EventArgs^ e) { System::Void toolStripMenuItemReplay_Click(System::Object^ sender, System::EventArgs^ e) {
@ -2975,11 +2977,12 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
System::Void richTextBoxLog_LinkClicked(System::Object^ sender, System::Windows::Forms::LinkClickedEventArgs^ e) { System::Void richTextBoxLog_LinkClicked(System::Object^ sender, System::Windows::Forms::LinkClickedEventArgs^ e) {
// 強制終了対策 // 強制終了対策
//XXX this is really insecure. Are you seriously going to trust a random link on the chat?
try{ try{
Process::Start(e->LinkText); Process::Start(e->LinkText);
} }
catch(Exception^){ catch(Exception^){
WriteMessage(L"不正な文字列リンクです。\n", ErrorMessageColor); WriteMessage(L"Invalid link.\n", ErrorMessageColor);
} }
} }
@ -3034,7 +3037,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
Array::Copy(BitConverter::GetBytes(MemberList[0]->ID), 0, send, 1, 2); Array::Copy(BitConverter::GetBytes(MemberList[0]->ID), 0, send, 1, 2);
UDP->BeginSend(send, send->Length, WatchTarget, gcnew AsyncCallback(SendPackets), UDP); UDP->BeginSend(send, send->Length, WatchTarget, gcnew AsyncCallback(SendPackets), UDP);
toolStripMenuItemWatch->Text = gcnew String(L"観戦をやめる"); toolStripMenuItemWatch->Text = gcnew String(L"Stop spectating");
} }
else{ else{
QuitWatch(true); QuitWatch(true);
@ -3062,7 +3065,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
int index = listBoxMember->SelectedIndex; int index = listBoxMember->SelectedIndex;
int id = MemberList[index]->ID; int id = MemberList[index]->ID;
if(MessageBox::Show(String::Format(L"[ {0} ](ID:{1})をキックします。\nよろしいですか?", MemberList[index]->NAME, MemberList[index]->ID), "KICK", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){ if(MessageBox::Show(String::Format(L"{0} (ID: {1}) will be kicked.\nAre you sure you want to be kicked?", MemberList[index]->NAME, MemberList[index]->ID), "Kick Player", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){
}else{ }else{
return; return;
} }
@ -3074,7 +3077,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
if(ListView != LV_BLIND){ if(ListView != LV_BLIND){
WriteTime(0, SystemMessageColor); WriteTime(0, SystemMessageColor);
WriteMessage(String::Format(L"{0}(ID:{1})をキックしました。\n", MemberList[index]->NAME, MemberList[index]->ID), SystemMessageColor); WriteMessage(String::Format(L"{0} (ID: {1}) was kicked.\n", MemberList[index]->NAME, MemberList[index]->ID), SystemMessageColor);
} }
if(MemberList[0]->STATE == MS_WATCH || MemberList[0]->STATE == MS_COUCH){ if(MemberList[0]->STATE == MS_WATCH || MemberList[0]->STATE == MS_COUCH){
if(TargetID == MemberList[index]->ID){ if(TargetID == MemberList[index]->ID){
@ -3093,7 +3096,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
for(int i = 1; i < MemberList->Count; i++){ for(int i = 1; i < MemberList->Count; i++){
UDP->BeginSend(quit, quit->Length, MemberList[i]->IP_EP, gcnew AsyncCallback(SendPackets), UDP); UDP->BeginSend(quit, quit->Length, MemberList[i]->IP_EP, gcnew AsyncCallback(SendPackets), UDP);
if(MTINFO.DEBUG){ if(MTINFO.DEBUG){
WriteMessage(String::Format(L"{0}に通知\n", MemberList[i]->ID), DebugMessageColor); WriteMessage(String::Format(L"Notified {0}\n", MemberList[i]->ID), DebugMessageColor);
} }
} }
} }
@ -3142,6 +3145,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
System::Void MainForm_DragEnter(System::Object^ sender, System::Windows::Forms::DragEventArgs^ e) { System::Void MainForm_DragEnter(System::Object^ sender, System::Windows::Forms::DragEventArgs^ e) {
e->Effect = DragDropEffects::None; e->Effect = DragDropEffects::None;
//TODO: change FM exe check
if(e->Data->GetDataPresent(DataFormats::FileDrop)){ if(e->Data->GetDataPresent(DataFormats::FileDrop)){
array<String^>^ file = safe_cast<array<String^>^>(e->Data->GetData(DataFormats::FileDrop, false)); array<String^>^ file = safe_cast<array<String^>^>(e->Data->GetData(DataFormats::FileDrop, false));
String^ extension = Path::GetExtension(file[0])->ToLower(); String^ extension = Path::GetExtension(file[0])->ToLower();
@ -3200,7 +3204,7 @@ private: System::Windows::Forms::ToolStripMenuItem^ toolStripMenuItemWordWrap;
MTOPTION.STAGE_SELECT = MTOPTION.MAX_STAGE == 1 ? 1 : 0; MTOPTION.STAGE_SELECT = MTOPTION.MAX_STAGE == 1 ? 1 : 0;
} }
WriteMessage(String::Format(L"プレイするゲームを\"{0}\"に変更しました。\n", Path::GetFileNameWithoutExtension(file[0])), SystemMessageColor); WriteMessage(String::Format(L"Game file changed to \"{0}\".\n", Path::GetFileNameWithoutExtension(file[0])), SystemMessageColor);
} }
else{ else{
Option->SetGameExePath(file[0]); Option->SetGameExePath(file[0]);

View file

@ -5,6 +5,7 @@
using namespace LilithPort; using namespace LilithPort;
void OptionForm::SaveOption(bool apply){ void OptionForm::SaveOption(bool apply){
//TODO: change FM exe check
MainForm^ parent = safe_cast<MainForm^>(this->Owner); MainForm^ parent = safe_cast<MainForm^>(this->Owner);
try{ try{

View file

@ -28,9 +28,6 @@ namespace LilithPort {
OptionForm(void) OptionForm(void)
{ {
InitializeComponent(); InitializeComponent();
//
//TODO: ここにコンストラクタ コードを追加します
//
} }
protected: protected:
@ -444,7 +441,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
// //
// folderBrowserDialog1 // folderBrowserDialog1
// //
this->folderBrowserDialog1->Description = L"リプレイ保存フォルダ"; this->folderBrowserDialog1->Description = L"Select replay folder";
// //
// colorDialog1 // colorDialog1
// //
@ -531,9 +528,9 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
this->labelKeywordSound->AutoSize = true; this->labelKeywordSound->AutoSize = true;
this->labelKeywordSound->Location = System::Drawing::Point(10, 17); this->labelKeywordSound->Location = System::Drawing::Point(10, 17);
this->labelKeywordSound->Name = L"labelKeywordSound"; this->labelKeywordSound->Name = L"labelKeywordSound";
this->labelKeywordSound->Size = System::Drawing::Size(174, 13); this->labelKeywordSound->Size = System::Drawing::Size(177, 13);
this->labelKeywordSound->TabIndex = 1; this->labelKeywordSound->TabIndex = 1;
this->labelKeywordSound->Text = L"Separate keywords with commas (,)"; this->labelKeywordSound->Text = L"Separate keywords with commas (,).";
// //
// textBoxKeyword // textBoxKeyword
// //
@ -609,7 +606,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
this->groupBoxTalkSound->Size = System::Drawing::Size(336, 56); this->groupBoxTalkSound->Size = System::Drawing::Size(336, 56);
this->groupBoxTalkSound->TabIndex = 5; this->groupBoxTalkSound->TabIndex = 5;
this->groupBoxTalkSound->TabStop = false; this->groupBoxTalkSound->TabStop = false;
this->groupBoxTalkSound->Text = L"Remarks"; this->groupBoxTalkSound->Text = L"Chat";
// //
// buttonTalkSoundPlay // buttonTalkSoundPlay
// //
@ -1106,7 +1103,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
this->groupBoxSave->Controls->Add(this->radioButtonReplayVersion2); this->groupBoxSave->Controls->Add(this->radioButtonReplayVersion2);
this->groupBoxSave->Location = System::Drawing::Point(195, 216); this->groupBoxSave->Location = System::Drawing::Point(195, 216);
this->groupBoxSave->Name = L"groupBoxSave"; this->groupBoxSave->Name = L"groupBoxSave";
this->groupBoxSave->Size = System::Drawing::Size(154, 46); this->groupBoxSave->Size = System::Drawing::Size(166, 46);
this->groupBoxSave->TabIndex = 4; this->groupBoxSave->TabIndex = 4;
this->groupBoxSave->TabStop = false; this->groupBoxSave->TabStop = false;
this->groupBoxSave->Text = L"Replay file compression"; this->groupBoxSave->Text = L"Replay file compression";
@ -1174,7 +1171,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
this->groupBoxTeamOption->Controls->Add(this->checkBoxTeamRoundHP); this->groupBoxTeamOption->Controls->Add(this->checkBoxTeamRoundHP);
this->groupBoxTeamOption->Location = System::Drawing::Point(9, 268); this->groupBoxTeamOption->Location = System::Drawing::Point(9, 268);
this->groupBoxTeamOption->Name = L"groupBoxTeamOption"; this->groupBoxTeamOption->Name = L"groupBoxTeamOption";
this->groupBoxTeamOption->Size = System::Drawing::Size(341, 65); this->groupBoxTeamOption->Size = System::Drawing::Size(353, 65);
this->groupBoxTeamOption->TabIndex = 6; this->groupBoxTeamOption->TabIndex = 6;
this->groupBoxTeamOption->TabStop = false; this->groupBoxTeamOption->TabStop = false;
this->groupBoxTeamOption->Text = L"Team play"; this->groupBoxTeamOption->Text = L"Team play";
@ -1205,7 +1202,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
this->groupBoxSimulate->Controls->Add(this->labelSimDelay); this->groupBoxSimulate->Controls->Add(this->labelSimDelay);
this->groupBoxSimulate->Location = System::Drawing::Point(195, 161); this->groupBoxSimulate->Location = System::Drawing::Point(195, 161);
this->groupBoxSimulate->Name = L"groupBoxSimulate"; this->groupBoxSimulate->Name = L"groupBoxSimulate";
this->groupBoxSimulate->Size = System::Drawing::Size(154, 48); this->groupBoxSimulate->Size = System::Drawing::Size(166, 48);
this->groupBoxSimulate->TabIndex = 5; this->groupBoxSimulate->TabIndex = 5;
this->groupBoxSimulate->TabStop = false; this->groupBoxSimulate->TabStop = false;
this->groupBoxSimulate->Text = L"Simulation"; this->groupBoxSimulate->Text = L"Simulation";
@ -1269,7 +1266,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
this->groupBoxView->Controls->Add(this->checkBoxRand); this->groupBoxView->Controls->Add(this->checkBoxRand);
this->groupBoxView->Location = System::Drawing::Point(195, 9); this->groupBoxView->Location = System::Drawing::Point(195, 9);
this->groupBoxView->Name = L"groupBoxView"; this->groupBoxView->Name = L"groupBoxView";
this->groupBoxView->Size = System::Drawing::Size(154, 145); this->groupBoxView->Size = System::Drawing::Size(166, 145);
this->groupBoxView->TabIndex = 4; this->groupBoxView->TabIndex = 4;
this->groupBoxView->TabStop = false; this->groupBoxView->TabStop = false;
this->groupBoxView->Text = L"Title bar"; this->groupBoxView->Text = L"Title bar";
@ -1323,9 +1320,9 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
this->checkBoxRand->AutoSize = true; this->checkBoxRand->AutoSize = true;
this->checkBoxRand->Location = System::Drawing::Point(16, 117); this->checkBoxRand->Location = System::Drawing::Point(16, 117);
this->checkBoxRand->Name = L"checkBoxRand"; this->checkBoxRand->Name = L"checkBoxRand";
this->checkBoxRand->Size = System::Drawing::Size(139, 17); this->checkBoxRand->Size = System::Drawing::Size(104, 17);
this->checkBoxRand->TabIndex = 4; this->checkBoxRand->TabIndex = 4;
this->checkBoxRand->Text = L"Random number display"; this->checkBoxRand->Text = L"Random number";
this->checkBoxRand->UseVisualStyleBackColor = true; this->checkBoxRand->UseVisualStyleBackColor = true;
this->checkBoxRand->CheckedChanged += gcnew System::EventHandler(this, &OptionForm::ApplyButtonEnable); this->checkBoxRand->CheckedChanged += gcnew System::EventHandler(this, &OptionForm::ApplyButtonEnable);
// //
@ -1408,9 +1405,9 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
this->labelStageSelect->AutoSize = true; this->labelStageSelect->AutoSize = true;
this->labelStageSelect->Location = System::Drawing::Point(16, 52); this->labelStageSelect->Location = System::Drawing::Point(16, 52);
this->labelStageSelect->Name = L"labelStageSelect"; this->labelStageSelect->Name = L"labelStageSelect";
this->labelStageSelect->Size = System::Drawing::Size(63, 13); this->labelStageSelect->Size = System::Drawing::Size(76, 13);
this->labelStageSelect->TabIndex = 0; this->labelStageSelect->TabIndex = 0;
this->labelStageSelect->Text = L"Battle stage"; this->labelStageSelect->Text = L"Random stage";
// //
// numericUpDownStageSelect // numericUpDownStageSelect
// //
@ -1778,13 +1775,13 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
// discriptionlabel // discriptionlabel
// //
this->discriptionlabel->AutoSize = true; this->discriptionlabel->AutoSize = true;
this->discriptionlabel->Location = System::Drawing::Point(8, 9); this->discriptionlabel->Location = System::Drawing::Point(6, 11);
this->discriptionlabel->Name = L"discriptionlabel"; this->discriptionlabel->Name = L"discriptionlabel";
this->discriptionlabel->Size = System::Drawing::Size(281, 52); this->discriptionlabel->Size = System::Drawing::Size(350, 39);
this->discriptionlabel->TabIndex = 3; this->discriptionlabel->TabIndex = 3;
this->discriptionlabel->Text = L"By obfuscating your IP address, you can\r\nreduce security risks associated with pu" this->discriptionlabel->Text = L"By obfuscating your IP address, you can reduce security risks associated\r\nwith pu"
L"blishing a server.\r\nWhen you create a server, you should use your converted\r\nIP " L"blishing a server. When you create a server, you should use your\r\nconverted IP a"
L"address rather than your real one."; L"ddress rather than your real one.";
// //
// Convertbutton // Convertbutton
// //
@ -1872,7 +1869,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
this->tabPageDetails->Padding = System::Windows::Forms::Padding(3); this->tabPageDetails->Padding = System::Windows::Forms::Padding(3);
this->tabPageDetails->Size = System::Drawing::Size(369, 339); this->tabPageDetails->Size = System::Drawing::Size(369, 339);
this->tabPageDetails->TabIndex = 8; this->tabPageDetails->TabIndex = 8;
this->tabPageDetails->Text = L"Misc."; this->tabPageDetails->Text = L"Miscellaneous";
this->tabPageDetails->UseVisualStyleBackColor = true; this->tabPageDetails->UseVisualStyleBackColor = true;
// //
// groupBoxDetails // groupBoxDetails
@ -2029,22 +2026,22 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
DWORD MixerVolumeMin, MixerVolumeMax; DWORD MixerVolumeMin, MixerVolumeMax;
void AdviceGameExe(){ void AdviceGameExe(){
textBoxGameExe->Text = gcnew String(L"右のボタンを押してパスを設定してください"); textBoxGameExe->Text = gcnew String(L"You should set the path to your game file.");
textBoxGameExe->Focus(); textBoxGameExe->Focus();
} }
void CheckStageValue(){ void CheckStageValue(){
if(numericUpDownStageSelect->Value > numericUpDownMaxStage->Value){ if(numericUpDownStageSelect->Value > numericUpDownMaxStage->Value){
labelMaxStage->Text = gcnew String(L"開始ステージ"); labelMaxStage->Text = gcnew String(L"Start stage:");
labelStageSelect->Text = gcnew String(L"終端ステージ"); labelStageSelect->Text = gcnew String(L"End stage:");
} }
else{ else{
labelMaxStage->Text = gcnew String(L"最大ステージ数"); labelMaxStage->Text = gcnew String(L"Max stages:");
labelStageSelect->Text = gcnew String(L"対戦ステージ"); labelStageSelect->Text = gcnew String(L"Match stage:");
} }
if(numericUpDownStageSelect->Value == 0){ if(numericUpDownStageSelect->Value == 0){
labelStageSelect->Text = gcnew String(L"ランダムステージ"); labelStageSelect->Text = gcnew String(L"Random stage:");
} }
} }
@ -2284,9 +2281,10 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
} }
System::Void buttonGameExe_Click(System::Object^ sender, System::EventArgs^ e) { System::Void buttonGameExe_Click(System::Object^ sender, System::EventArgs^ e) {
openFileDialog1->Title = gcnew String(L"格闘ツクールの実行ファイル"); openFileDialog1->Title = gcnew String(L"Select a Fighter Maker executable file");
openFileDialog1->Filter = gcnew String(L"exe file (*.exe)|*.exe"); openFileDialog1->Filter = gcnew String(L"Executable file (*.exe)|*.exe");
//TODO: Again, detecting whether it is supported should NOT be dependent on the file description.
if(openFileDialog1->ShowDialog() == ::DialogResult::OK){ if(openFileDialog1->ShowDialog() == ::DialogResult::OK){
FileVersionInfo^ info = FileVersionInfo::GetVersionInfo(openFileDialog1->FileName); FileVersionInfo^ info = FileVersionInfo::GetVersionInfo(openFileDialog1->FileName);
@ -2294,7 +2292,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
textBoxGameExe->Text = openFileDialog1->FileName; textBoxGameExe->Text = openFileDialog1->FileName;
} }
else{ else{
textBoxGameExe->Text = L"格闘ツクールの実行ファイルではありません"; textBoxGameExe->Text = L"Invalid or unrecognized Fighter Maker executable";
textBoxGameExe->SelectAll(); textBoxGameExe->SelectAll();
textBoxGameExe->Focus(); textBoxGameExe->Focus();
} }
@ -2308,7 +2306,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
} }
System::Void buttonVSSound_Click(System::Object^ sender, System::EventArgs^ e) { System::Void buttonVSSound_Click(System::Object^ sender, System::EventArgs^ e) {
openFileDialog1->Title = gcnew String(L"対戦時に鳴らす音声ファイル"); openFileDialog1->Title = gcnew String(L"Sound to be played on start of match");
openFileDialog1->Filter = gcnew String(L"wav file (*.wav)|*.wav"); openFileDialog1->Filter = gcnew String(L"wav file (*.wav)|*.wav");
if(openFileDialog1->ShowDialog() == ::DialogResult::OK){ if(openFileDialog1->ShowDialog() == ::DialogResult::OK){
@ -2317,7 +2315,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
} }
System::Void buttonNoticeSound_Click(System::Object^ sender, System::EventArgs^ e) { System::Void buttonNoticeSound_Click(System::Object^ sender, System::EventArgs^ e) {
openFileDialog1->Title = gcnew String(L"告知受信時に鳴らす音声ファイル"); openFileDialog1->Title = gcnew String(L"Sound to be played on announcement");
openFileDialog1->Filter = gcnew String(L"wav file (*.wav)|*.wav"); openFileDialog1->Filter = gcnew String(L"wav file (*.wav)|*.wav");
if(openFileDialog1->ShowDialog() == ::DialogResult::OK){ if(openFileDialog1->ShowDialog() == ::DialogResult::OK){
@ -2326,7 +2324,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
} }
System::Void buttonEnterSound_Click(System::Object^ sender, System::EventArgs^ e) { System::Void buttonEnterSound_Click(System::Object^ sender, System::EventArgs^ e) {
openFileDialog1->Title = gcnew String(L"メンバー入室時に鳴らす音声ファイル"); openFileDialog1->Title = gcnew String(L"Sound to be played on player join");
openFileDialog1->Filter = gcnew String(L"wav file (*.wav)|*.wav"); openFileDialog1->Filter = gcnew String(L"wav file (*.wav)|*.wav");
if(openFileDialog1->ShowDialog() == ::DialogResult::OK){ if(openFileDialog1->ShowDialog() == ::DialogResult::OK){
@ -2335,7 +2333,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
} }
System::Void buttonNameSound_Click(System::Object^ sender, System::EventArgs^ e) { System::Void buttonNameSound_Click(System::Object^ sender, System::EventArgs^ e) {
openFileDialog1->Title = gcnew String(L"ニックネームが呼ばれたら鳴らす音声ファイル"); openFileDialog1->Title = gcnew String(L"Sound to be played when nickname is mentioned");
openFileDialog1->Filter = gcnew String(L"wav file (*.wav)|*.wav"); openFileDialog1->Filter = gcnew String(L"wav file (*.wav)|*.wav");
if(openFileDialog1->ShowDialog() == ::DialogResult::OK){ if(openFileDialog1->ShowDialog() == ::DialogResult::OK){
@ -2344,7 +2342,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
} }
System::Void buttonTalkSound_Click(System::Object^ sender, System::EventArgs^ e) { System::Void buttonTalkSound_Click(System::Object^ sender, System::EventArgs^ e) {
openFileDialog1->Title = gcnew String(L"発言で鳴らす音声ファイル"); openFileDialog1->Title = gcnew String(L"Sound to be played on chat message");
openFileDialog1->Filter = gcnew String(L"wav file (*.wav)|*.wav"); openFileDialog1->Filter = gcnew String(L"wav file (*.wav)|*.wav");
if(openFileDialog1->ShowDialog() == ::DialogResult::OK){ if(openFileDialog1->ShowDialog() == ::DialogResult::OK){
@ -2353,7 +2351,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
} }
System::Void buttonSeekSound_Click(System::Object^ sender, System::EventArgs^ e) { System::Void buttonSeekSound_Click(System::Object^ sender, System::EventArgs^ e) {
openFileDialog1->Title = gcnew String(L"対戦募集で鳴らす音声ファイル"); openFileDialog1->Title = gcnew String(L"Sound to be played when invited to a match");
openFileDialog1->Filter = gcnew String(L"wav file (*.wav)|*.wav"); openFileDialog1->Filter = gcnew String(L"wav file (*.wav)|*.wav");
if(openFileDialog1->ShowDialog() == ::DialogResult::OK){ if(openFileDialog1->ShowDialog() == ::DialogResult::OK){
@ -2362,7 +2360,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
} }
System::Void buttonKeywordSound_Click(System::Object^ sender, System::EventArgs^ e) { System::Void buttonKeywordSound_Click(System::Object^ sender, System::EventArgs^ e) {
openFileDialog1->Title = gcnew String(L"キーワードで鳴らす音声ファイル"); openFileDialog1->Title = gcnew String(L"Sound to be played when keyword is mentioned (stalk)");
openFileDialog1->Filter = gcnew String(L"wav file (*.wav)|*.wav"); openFileDialog1->Filter = gcnew String(L"wav file (*.wav)|*.wav");
if(openFileDialog1->ShowDialog() == ::DialogResult::OK){ if(openFileDialog1->ShowDialog() == ::DialogResult::OK){
@ -2504,6 +2502,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
String^ extension = Path::GetExtension(file[0])->ToLower(); String^ extension = Path::GetExtension(file[0])->ToLower();
FileVersionInfo^ info = FileVersionInfo::GetVersionInfo(file[0]); FileVersionInfo^ info = FileVersionInfo::GetVersionInfo(file[0]);
//TODO: game file detection
if(extension == ".exe" && (info->FileDescription == L"格闘ツクール2nd." || info->FileDescription == L"2D格闘ツクール95")){ if(extension == ".exe" && (info->FileDescription == L"格闘ツクール2nd." || info->FileDescription == L"2D格闘ツクール95")){
e->Effect = DragDropEffects::All; e->Effect = DragDropEffects::All;
} }
@ -2719,19 +2718,19 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
String^ buf = comboBoxProfile->Items[comboBoxProfile->SelectedIndex]->ToString(); String^ buf = comboBoxProfile->Items[comboBoxProfile->SelectedIndex]->ToString();
String^ bufClone = String::Format(L"{0}{1}", buf, "_"); String^ bufClone = String::Format(L"{0}{1}", buf, "_");
if(buf->Length > MAX_ARRAY-1){ if(buf->Length > MAX_ARRAY-1){
mes = L"プロファイル名が長すぎます。\n複製を行うには、プロファイル名を短くしてください。"; mes = L"The profile name is too long.\nPlease shorten it in order to copy the profile correctly.";
} }
for(int i=0; i < Profile::ProfileList->Count; i++){ for(int i=0; i < Profile::ProfileList->Count; i++){
if(Profile::ProfileList[i] == bufClone){ if(Profile::ProfileList[i] == bufClone){
mes = L"既に複製されたプロファイルが存在します。"; mes = L"This profile already exists.";
} }
} }
if(Profile::ProfileList->Count > 31){ if(Profile::ProfileList->Count > 31){
mes = L"これ以上プロファイルを作成できません。"; mes = L"There are too many profiles! You cannot have more than 31 profiles.";
return; return;
} }
if(mes != nullptr){ if(mes != nullptr){
MessageBox::Show(mes, L"プロファイル複製", MessageBoxButtons::OK, MessageBoxIcon::Exclamation); MessageBox::Show(mes, L"Copy Profile", MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
return; return;
} }
Profile::ProfileList->Add(bufClone); Profile::ProfileList->Add(bufClone);
@ -2751,7 +2750,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
// プロファイル削除 // プロファイル削除
int index = comboBoxProfile->SelectedIndex; int index = comboBoxProfile->SelectedIndex;
String^ buf = comboBoxProfile->Items[index]->ToString(); String^ buf = comboBoxProfile->Items[index]->ToString();
if(MessageBox::Show(String::Format(L"{0}を削除します。\nよろしいですか?", buf), L"プロファイル削除", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){ if(MessageBox::Show(String::Format(L"Are you sure you want to delete the profile \"{0}\"?", buf), L"Delete Profile", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == ::DialogResult::Yes){
Profile::ProfileList->RemoveAt(index); Profile::ProfileList->RemoveAt(index);
comboBoxProfile->Items->RemoveAt(index); comboBoxProfile->Items->RemoveAt(index);
@ -2769,7 +2768,7 @@ private: System::Windows::Forms::CheckBox^ checkBoxShowResult;
return; return;
} }
if(Profile::ProfileList->Count > 31){ if(Profile::ProfileList->Count > 31){
MessageBox::Show(L"これ以上プロファイルを作成できません。", L"プロファイル追加", MessageBoxButtons::OK, MessageBoxIcon::Exclamation); MessageBox::Show(L"There are too many profiles! You cannot have more than 31 profiles.", L"Add Profile", MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
return; return;
} }

View file

@ -27,9 +27,6 @@ namespace LilithPort {
StartupForm(void) StartupForm(void)
{ {
InitializeComponent(); InitializeComponent();
//
//TODO: ここにコンストラクタ コードを追加します
//
} }
protected: protected:
@ -80,313 +77,313 @@ namespace LilithPort {
/// </summary> /// </summary>
void InitializeComponent(void) void InitializeComponent(void)
{ {
System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(StartupForm::typeid)); System::ComponentModel::ComponentResourceManager^ resources = (gcnew System::ComponentModel::ComponentResourceManager(StartupForm::typeid));
this->radioButtonServer = (gcnew System::Windows::Forms::RadioButton()); this->radioButtonServer = (gcnew System::Windows::Forms::RadioButton());
this->radioButtonHost = (gcnew System::Windows::Forms::RadioButton()); this->radioButtonHost = (gcnew System::Windows::Forms::RadioButton());
this->radioButtonClient = (gcnew System::Windows::Forms::RadioButton()); this->radioButtonClient = (gcnew System::Windows::Forms::RadioButton());
this->labelServerName = (gcnew System::Windows::Forms::Label()); this->labelServerName = (gcnew System::Windows::Forms::Label());
this->textBoxIP = (gcnew System::Windows::Forms::TextBox()); this->textBoxIP = (gcnew System::Windows::Forms::TextBox());
this->labelOpenPort = (gcnew System::Windows::Forms::Label()); this->labelOpenPort = (gcnew System::Windows::Forms::Label());
this->numericUpDownOpenPort = (gcnew System::Windows::Forms::NumericUpDown()); this->numericUpDownOpenPort = (gcnew System::Windows::Forms::NumericUpDown());
this->buttonOK = (gcnew System::Windows::Forms::Button()); this->buttonOK = (gcnew System::Windows::Forms::Button());
this->buttonCancel = (gcnew System::Windows::Forms::Button()); this->buttonCancel = (gcnew System::Windows::Forms::Button());
this->textBoxComment = (gcnew System::Windows::Forms::TextBox()); this->textBoxComment = (gcnew System::Windows::Forms::TextBox());
this->labelComment = (gcnew System::Windows::Forms::Label()); this->labelComment = (gcnew System::Windows::Forms::Label());
this->textBoxName = (gcnew System::Windows::Forms::TextBox()); this->textBoxName = (gcnew System::Windows::Forms::TextBox());
this->labelName = (gcnew System::Windows::Forms::Label()); this->labelName = (gcnew System::Windows::Forms::Label());
this->numericUpDownPort = (gcnew System::Windows::Forms::NumericUpDown()); this->numericUpDownPort = (gcnew System::Windows::Forms::NumericUpDown());
this->numericUpDownMaxConnection = (gcnew System::Windows::Forms::NumericUpDown()); this->numericUpDownMaxConnection = (gcnew System::Windows::Forms::NumericUpDown());
this->labelMaxConnection = (gcnew System::Windows::Forms::Label()); this->labelMaxConnection = (gcnew System::Windows::Forms::Label());
this->groupBoxStartMode = (gcnew System::Windows::Forms::GroupBox()); this->groupBoxStartMode = (gcnew System::Windows::Forms::GroupBox());
this->textBoxServerName = (gcnew System::Windows::Forms::TextBox()); this->textBoxServerName = (gcnew System::Windows::Forms::TextBox());
this->groupBoxConnection = (gcnew System::Windows::Forms::GroupBox()); this->groupBoxConnection = (gcnew System::Windows::Forms::GroupBox());
this->labelAccessPort = (gcnew System::Windows::Forms::Label()); this->labelAccessPort = (gcnew System::Windows::Forms::Label());
this->labelIP = (gcnew System::Windows::Forms::Label()); this->labelIP = (gcnew System::Windows::Forms::Label());
this->groupBoxProfile = (gcnew System::Windows::Forms::GroupBox()); this->groupBoxProfile = (gcnew System::Windows::Forms::GroupBox());
this->groupBoxWelcome = (gcnew System::Windows::Forms::GroupBox()); this->groupBoxWelcome = (gcnew System::Windows::Forms::GroupBox());
this->textBoxWelcome = (gcnew System::Windows::Forms::RichTextBox()); this->textBoxWelcome = (gcnew System::Windows::Forms::RichTextBox());
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->numericUpDownOpenPort))->BeginInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->numericUpDownOpenPort))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->numericUpDownPort))->BeginInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->numericUpDownPort))->BeginInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->numericUpDownMaxConnection))->BeginInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->numericUpDownMaxConnection))->BeginInit();
this->groupBoxStartMode->SuspendLayout(); this->groupBoxStartMode->SuspendLayout();
this->groupBoxConnection->SuspendLayout(); this->groupBoxConnection->SuspendLayout();
this->groupBoxProfile->SuspendLayout(); this->groupBoxProfile->SuspendLayout();
this->groupBoxWelcome->SuspendLayout(); this->groupBoxWelcome->SuspendLayout();
this->SuspendLayout(); this->SuspendLayout();
// //
// radioButtonServer // radioButtonServer
// //
this->radioButtonServer->AutoSize = true; this->radioButtonServer->AutoSize = true;
this->radioButtonServer->Location = System::Drawing::Point(8, 18); this->radioButtonServer->Location = System::Drawing::Point(15, 19);
this->radioButtonServer->Name = L"radioButtonServer"; this->radioButtonServer->Name = L"radioButtonServer";
this->radioButtonServer->Size = System::Drawing::Size(56, 16); this->radioButtonServer->Size = System::Drawing::Size(56, 17);
this->radioButtonServer->TabIndex = 1; this->radioButtonServer->TabIndex = 0;
this->radioButtonServer->Text = L"Server"; this->radioButtonServer->Text = L"Server";
this->radioButtonServer->UseVisualStyleBackColor = true; this->radioButtonServer->UseVisualStyleBackColor = true;
this->radioButtonServer->CheckedChanged += gcnew System::EventHandler(this, &StartupForm::radioButtonServer_CheckedChanged); this->radioButtonServer->CheckedChanged += gcnew System::EventHandler(this, &StartupForm::radioButtonServer_CheckedChanged);
// //
// radioButtonHost // radioButtonHost
// //
this->radioButtonHost->AutoSize = true; this->radioButtonHost->AutoSize = true;
this->radioButtonHost->Location = System::Drawing::Point(70, 18); this->radioButtonHost->Location = System::Drawing::Point(101, 19);
this->radioButtonHost->Name = L"radioButtonHost"; this->radioButtonHost->Name = L"radioButtonHost";
this->radioButtonHost->Size = System::Drawing::Size(47, 16); this->radioButtonHost->Size = System::Drawing::Size(47, 17);
this->radioButtonHost->TabIndex = 1; this->radioButtonHost->TabIndex = 1;
this->radioButtonHost->Text = L"Host"; this->radioButtonHost->Text = L"Host";
this->radioButtonHost->UseVisualStyleBackColor = true; this->radioButtonHost->UseVisualStyleBackColor = true;
this->radioButtonHost->CheckedChanged += gcnew System::EventHandler(this, &StartupForm::radioButtonHost_CheckedChanged); this->radioButtonHost->CheckedChanged += gcnew System::EventHandler(this, &StartupForm::radioButtonHost_CheckedChanged);
// //
// radioButtonClient // radioButtonClient
// //
this->radioButtonClient->AutoSize = true; this->radioButtonClient->AutoSize = true;
this->radioButtonClient->Location = System::Drawing::Point(123, 18); this->radioButtonClient->Location = System::Drawing::Point(178, 19);
this->radioButtonClient->Name = L"radioButtonClient"; this->radioButtonClient->Name = L"radioButtonClient";
this->radioButtonClient->Size = System::Drawing::Size(53, 16); this->radioButtonClient->Size = System::Drawing::Size(51, 17);
this->radioButtonClient->TabIndex = 1; this->radioButtonClient->TabIndex = 2;
this->radioButtonClient->Text = L"Client"; this->radioButtonClient->Text = L"Client";
this->radioButtonClient->UseVisualStyleBackColor = true; this->radioButtonClient->UseVisualStyleBackColor = true;
this->radioButtonClient->CheckedChanged += gcnew System::EventHandler(this, &StartupForm::radioButtonClient_CheckedChanged); this->radioButtonClient->CheckedChanged += gcnew System::EventHandler(this, &StartupForm::radioButtonClient_CheckedChanged);
// //
// labelServerName // labelServerName
// //
this->labelServerName->AutoSize = true; this->labelServerName->AutoSize = true;
this->labelServerName->Location = System::Drawing::Point(6, 41); this->labelServerName->Location = System::Drawing::Point(6, 44);
this->labelServerName->Name = L"labelServerName"; this->labelServerName->Name = L"labelServerName";
this->labelServerName->Size = System::Drawing::Size(49, 12); this->labelServerName->Size = System::Drawing::Size(70, 13);
this->labelServerName->TabIndex = 0; this->labelServerName->TabIndex = 0;
this->labelServerName->Text = L"サーバ名:"; this->labelServerName->Text = L"Server name:";
// //
// textBoxIP // textBoxIP
// //
this->textBoxIP->Location = System::Drawing::Point(70, 18); this->textBoxIP->Location = System::Drawing::Point(113, 19);
this->textBoxIP->Name = L"textBoxIP"; this->textBoxIP->Name = L"textBoxIP";
this->textBoxIP->Size = System::Drawing::Size(116, 19); this->textBoxIP->Size = System::Drawing::Size(116, 20);
this->textBoxIP->TabIndex = 2; this->textBoxIP->TabIndex = 0;
// //
// labelOpenPort // labelOpenPort
// //
this->labelOpenPort->AutoSize = true; this->labelOpenPort->AutoSize = true;
this->labelOpenPort->Location = System::Drawing::Point(7, 65); this->labelOpenPort->Location = System::Drawing::Point(7, 71);
this->labelOpenPort->Name = L"labelOpenPort"; this->labelOpenPort->Name = L"labelOpenPort";
this->labelOpenPort->Size = System::Drawing::Size(59, 12); this->labelOpenPort->Size = System::Drawing::Size(59, 13);
this->labelOpenPort->TabIndex = 0; this->labelOpenPort->TabIndex = 0;
this->labelOpenPort->Text = L"待受ポート:"; this->labelOpenPort->Text = L"Listen port:";
// //
// numericUpDownOpenPort // numericUpDownOpenPort
// //
this->numericUpDownOpenPort->Location = System::Drawing::Point(133, 63); this->numericUpDownOpenPort->Location = System::Drawing::Point(176, 68);
this->numericUpDownOpenPort->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {65535, 0, 0, 0}); this->numericUpDownOpenPort->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 65535, 0, 0, 0 });
this->numericUpDownOpenPort->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1024, 0, 0, 0}); this->numericUpDownOpenPort->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 1024, 0, 0, 0 });
this->numericUpDownOpenPort->Name = L"numericUpDownOpenPort"; this->numericUpDownOpenPort->Name = L"numericUpDownOpenPort";
this->numericUpDownOpenPort->Size = System::Drawing::Size(53, 19); this->numericUpDownOpenPort->Size = System::Drawing::Size(53, 20);
this->numericUpDownOpenPort->TabIndex = 4; this->numericUpDownOpenPort->TabIndex = 4;
this->numericUpDownOpenPort->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {7500, 0, 0, 0}); this->numericUpDownOpenPort->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) { 7500, 0, 0, 0 });
// //
// buttonOK // buttonOK
// //
this->buttonOK->Location = System::Drawing::Point(274, 205); this->buttonOK->Location = System::Drawing::Point(233, 223);
this->buttonOK->Name = L"buttonOK"; this->buttonOK->Name = L"buttonOK";
this->buttonOK->Size = System::Drawing::Size(58, 24); this->buttonOK->Size = System::Drawing::Size(99, 26);
this->buttonOK->TabIndex = 6; this->buttonOK->TabIndex = 4;
this->buttonOK->Text = L"起動"; this->buttonOK->Text = L"OK";
this->buttonOK->UseVisualStyleBackColor = true; this->buttonOK->UseVisualStyleBackColor = true;
this->buttonOK->Click += gcnew System::EventHandler(this, &StartupForm::buttonOK_Click); this->buttonOK->Click += gcnew System::EventHandler(this, &StartupForm::buttonOK_Click);
// //
// buttonCancel // buttonCancel
// //
this->buttonCancel->DialogResult = System::Windows::Forms::DialogResult::Cancel; this->buttonCancel->DialogResult = System::Windows::Forms::DialogResult::Cancel;
this->buttonCancel->Location = System::Drawing::Point(338, 205); this->buttonCancel->Location = System::Drawing::Point(338, 223);
this->buttonCancel->Name = L"buttonCancel"; this->buttonCancel->Name = L"buttonCancel";
this->buttonCancel->Size = System::Drawing::Size(57, 24); this->buttonCancel->Size = System::Drawing::Size(98, 26);
this->buttonCancel->TabIndex = 7; this->buttonCancel->TabIndex = 5;
this->buttonCancel->Text = L"閉じる"; this->buttonCancel->Text = L"Cancel";
this->buttonCancel->UseVisualStyleBackColor = true; this->buttonCancel->UseVisualStyleBackColor = true;
this->buttonCancel->Click += gcnew System::EventHandler(this, &StartupForm::buttonCancel_Click); this->buttonCancel->Click += gcnew System::EventHandler(this, &StartupForm::buttonCancel_Click);
// //
// textBoxComment // textBoxComment
// //
this->textBoxComment->Location = System::Drawing::Point(80, 43); this->textBoxComment->Location = System::Drawing::Point(80, 47);
this->textBoxComment->Name = L"textBoxComment"; this->textBoxComment->Name = L"textBoxComment";
this->textBoxComment->Size = System::Drawing::Size(94, 19); this->textBoxComment->Size = System::Drawing::Size(94, 20);
this->textBoxComment->TabIndex = 2; this->textBoxComment->TabIndex = 1;
// //
// labelComment // labelComment
// //
this->labelComment->AutoSize = true; this->labelComment->AutoSize = true;
this->labelComment->Location = System::Drawing::Point(7, 46); this->labelComment->Location = System::Drawing::Point(7, 50);
this->labelComment->Name = L"labelComment"; this->labelComment->Name = L"labelComment";
this->labelComment->Size = System::Drawing::Size(40, 12); this->labelComment->Size = System::Drawing::Size(63, 13);
this->labelComment->TabIndex = 4; this->labelComment->TabIndex = 4;
this->labelComment->Text = L"コメント:"; this->labelComment->Text = L"Description:";
// //
// textBoxName // textBoxName
// //
this->textBoxName->Location = System::Drawing::Point(80, 18); this->textBoxName->Location = System::Drawing::Point(80, 20);
this->textBoxName->Name = L"textBoxName"; this->textBoxName->Name = L"textBoxName";
this->textBoxName->Size = System::Drawing::Size(94, 19); this->textBoxName->Size = System::Drawing::Size(94, 20);
this->textBoxName->TabIndex = 1; this->textBoxName->TabIndex = 0;
// //
// labelName // labelName
// //
this->labelName->AutoSize = true; this->labelName->AutoSize = true;
this->labelName->Location = System::Drawing::Point(6, 21); this->labelName->Location = System::Drawing::Point(6, 23);
this->labelName->Name = L"labelName"; this->labelName->Name = L"labelName";
this->labelName->Size = System::Drawing::Size(61, 12); this->labelName->Size = System::Drawing::Size(58, 13);
this->labelName->TabIndex = 0; this->labelName->TabIndex = 0;
this->labelName->Text = L"ニックネーム:"; this->labelName->Text = L"Nickname:";
// //
// numericUpDownPort // numericUpDownPort
// //
this->numericUpDownPort->Location = System::Drawing::Point(133, 40); this->numericUpDownPort->Location = System::Drawing::Point(176, 44);
this->numericUpDownPort->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) {65535, 0, 0, 0}); this->numericUpDownPort->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 65535, 0, 0, 0 });
this->numericUpDownPort->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1024, 0, 0, 0}); this->numericUpDownPort->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 1024, 0, 0, 0 });
this->numericUpDownPort->Name = L"numericUpDownPort"; this->numericUpDownPort->Name = L"numericUpDownPort";
this->numericUpDownPort->Size = System::Drawing::Size(53, 19); this->numericUpDownPort->Size = System::Drawing::Size(53, 20);
this->numericUpDownPort->TabIndex = 4; this->numericUpDownPort->TabIndex = 1;
this->numericUpDownPort->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {7500, 0, 0, 0}); this->numericUpDownPort->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) { 7500, 0, 0, 0 });
// //
// numericUpDownMaxConnection // numericUpDownMaxConnection
// //
this->numericUpDownMaxConnection->Location = System::Drawing::Point(146, 88); this->numericUpDownMaxConnection->Location = System::Drawing::Point(189, 95);
this->numericUpDownMaxConnection->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0}); this->numericUpDownMaxConnection->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 1, 0, 0, 0 });
this->numericUpDownMaxConnection->Name = L"numericUpDownMaxConnection"; this->numericUpDownMaxConnection->Name = L"numericUpDownMaxConnection";
this->numericUpDownMaxConnection->Size = System::Drawing::Size(40, 19); this->numericUpDownMaxConnection->Size = System::Drawing::Size(40, 20);
this->numericUpDownMaxConnection->TabIndex = 3; this->numericUpDownMaxConnection->TabIndex = 5;
this->numericUpDownMaxConnection->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {1, 0, 0, 0}); this->numericUpDownMaxConnection->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) { 1, 0, 0, 0 });
// //
// labelMaxConnection // labelMaxConnection
// //
this->labelMaxConnection->AutoSize = true; this->labelMaxConnection->AutoSize = true;
this->labelMaxConnection->Location = System::Drawing::Point(7, 90); this->labelMaxConnection->Location = System::Drawing::Point(7, 98);
this->labelMaxConnection->Name = L"labelMaxConnection"; this->labelMaxConnection->Name = L"labelMaxConnection";
this->labelMaxConnection->Size = System::Drawing::Size(79, 12); this->labelMaxConnection->Size = System::Drawing::Size(140, 13);
this->labelMaxConnection->TabIndex = 0; this->labelMaxConnection->TabIndex = 0;
this->labelMaxConnection->Text = L"最大接続者数:"; this->labelMaxConnection->Text = L"Maximum number of players:";
// //
// groupBoxStartMode // groupBoxStartMode
// //
this->groupBoxStartMode->Controls->Add(this->textBoxServerName); this->groupBoxStartMode->Controls->Add(this->textBoxServerName);
this->groupBoxStartMode->Controls->Add(this->radioButtonServer); this->groupBoxStartMode->Controls->Add(this->radioButtonServer);
this->groupBoxStartMode->Controls->Add(this->labelOpenPort); this->groupBoxStartMode->Controls->Add(this->labelOpenPort);
this->groupBoxStartMode->Controls->Add(this->labelServerName); this->groupBoxStartMode->Controls->Add(this->labelServerName);
this->groupBoxStartMode->Controls->Add(this->labelMaxConnection); this->groupBoxStartMode->Controls->Add(this->labelMaxConnection);
this->groupBoxStartMode->Controls->Add(this->numericUpDownMaxConnection); this->groupBoxStartMode->Controls->Add(this->numericUpDownMaxConnection);
this->groupBoxStartMode->Controls->Add(this->numericUpDownOpenPort); this->groupBoxStartMode->Controls->Add(this->numericUpDownOpenPort);
this->groupBoxStartMode->Controls->Add(this->radioButtonHost); this->groupBoxStartMode->Controls->Add(this->radioButtonHost);
this->groupBoxStartMode->Controls->Add(this->radioButtonClient); this->groupBoxStartMode->Controls->Add(this->radioButtonClient);
this->groupBoxStartMode->Location = System::Drawing::Point(201, 12); this->groupBoxStartMode->Location = System::Drawing::Point(201, 14);
this->groupBoxStartMode->Name = L"groupBoxStartMode"; this->groupBoxStartMode->Name = L"groupBoxStartMode";
this->groupBoxStartMode->Size = System::Drawing::Size(194, 115); this->groupBoxStartMode->Size = System::Drawing::Size(235, 125);
this->groupBoxStartMode->TabIndex = 8; this->groupBoxStartMode->TabIndex = 0;
this->groupBoxStartMode->TabStop = false; this->groupBoxStartMode->TabStop = false;
this->groupBoxStartMode->Text = L"起動モード"; this->groupBoxStartMode->Text = L"Mode";
// //
// textBoxServerName // textBoxServerName
// //
this->textBoxServerName->Location = System::Drawing::Point(70, 38); this->textBoxServerName->Location = System::Drawing::Point(85, 41);
this->textBoxServerName->Name = L"textBoxServerName"; this->textBoxServerName->Name = L"textBoxServerName";
this->textBoxServerName->Size = System::Drawing::Size(116, 19); this->textBoxServerName->Size = System::Drawing::Size(144, 20);
this->textBoxServerName->TabIndex = 5; this->textBoxServerName->TabIndex = 3;
// //
// groupBoxConnection // groupBoxConnection
// //
this->groupBoxConnection->Controls->Add(this->labelAccessPort); this->groupBoxConnection->Controls->Add(this->labelAccessPort);
this->groupBoxConnection->Controls->Add(this->labelIP); this->groupBoxConnection->Controls->Add(this->labelIP);
this->groupBoxConnection->Controls->Add(this->textBoxIP); this->groupBoxConnection->Controls->Add(this->textBoxIP);
this->groupBoxConnection->Controls->Add(this->numericUpDownPort); this->groupBoxConnection->Controls->Add(this->numericUpDownPort);
this->groupBoxConnection->Location = System::Drawing::Point(201, 133); this->groupBoxConnection->Location = System::Drawing::Point(201, 145);
this->groupBoxConnection->Name = L"groupBoxConnection"; this->groupBoxConnection->Name = L"groupBoxConnection";
this->groupBoxConnection->Size = System::Drawing::Size(194, 66); this->groupBoxConnection->Size = System::Drawing::Size(235, 72);
this->groupBoxConnection->TabIndex = 9; this->groupBoxConnection->TabIndex = 2;
this->groupBoxConnection->TabStop = false; this->groupBoxConnection->TabStop = false;
this->groupBoxConnection->Text = L"接続先"; this->groupBoxConnection->Text = L"Destination";
// //
// labelAccessPort // labelAccessPort
// //
this->labelAccessPort->AutoSize = true; this->labelAccessPort->AutoSize = true;
this->labelAccessPort->Location = System::Drawing::Point(7, 42); this->labelAccessPort->Location = System::Drawing::Point(7, 46);
this->labelAccessPort->Name = L"labelAccessPort"; this->labelAccessPort->Name = L"labelAccessPort";
this->labelAccessPort->Size = System::Drawing::Size(71, 12); this->labelAccessPort->Size = System::Drawing::Size(29, 13);
this->labelAccessPort->TabIndex = 5; this->labelAccessPort->TabIndex = 5;
this->labelAccessPort->Text = L"接続先ポート:"; this->labelAccessPort->Text = L"Port:";
// //
// labelIP // labelIP
// //
this->labelIP->AutoSize = true; this->labelIP->AutoSize = true;
this->labelIP->Location = System::Drawing::Point(7, 21); this->labelIP->Location = System::Drawing::Point(7, 23);
this->labelIP->Name = L"labelIP"; this->labelIP->Name = L"labelIP";
this->labelIP->Size = System::Drawing::Size(43, 12); this->labelIP->Size = System::Drawing::Size(48, 13);
this->labelIP->TabIndex = 3; this->labelIP->TabIndex = 3;
this->labelIP->Text = L"アドレス:"; this->labelIP->Text = L"Address:";
// //
// groupBoxProfile // groupBoxProfile
// //
this->groupBoxProfile->Controls->Add(this->labelComment); this->groupBoxProfile->Controls->Add(this->labelComment);
this->groupBoxProfile->Controls->Add(this->textBoxComment); this->groupBoxProfile->Controls->Add(this->textBoxComment);
this->groupBoxProfile->Controls->Add(this->textBoxName); this->groupBoxProfile->Controls->Add(this->textBoxName);
this->groupBoxProfile->Controls->Add(this->labelName); this->groupBoxProfile->Controls->Add(this->labelName);
this->groupBoxProfile->Location = System::Drawing::Point(12, 12); this->groupBoxProfile->Location = System::Drawing::Point(12, 13);
this->groupBoxProfile->Name = L"groupBoxProfile"; this->groupBoxProfile->Name = L"groupBoxProfile";
this->groupBoxProfile->Size = System::Drawing::Size(183, 67); this->groupBoxProfile->Size = System::Drawing::Size(183, 73);
this->groupBoxProfile->TabIndex = 10; this->groupBoxProfile->TabIndex = 1;
this->groupBoxProfile->TabStop = false; this->groupBoxProfile->TabStop = false;
this->groupBoxProfile->Text = L"プロフィール"; this->groupBoxProfile->Text = L"Profile";
// //
// groupBoxWelcome // groupBoxWelcome
// //
this->groupBoxWelcome->Controls->Add(this->textBoxWelcome); this->groupBoxWelcome->Controls->Add(this->textBoxWelcome);
this->groupBoxWelcome->Location = System::Drawing::Point(12, 85); this->groupBoxWelcome->Location = System::Drawing::Point(12, 92);
this->groupBoxWelcome->Name = L"groupBoxWelcome"; this->groupBoxWelcome->Name = L"groupBoxWelcome";
this->groupBoxWelcome->Size = System::Drawing::Size(183, 113); this->groupBoxWelcome->Size = System::Drawing::Size(183, 122);
this->groupBoxWelcome->TabIndex = 11; this->groupBoxWelcome->TabIndex = 3;
this->groupBoxWelcome->TabStop = false; this->groupBoxWelcome->TabStop = false;
this->groupBoxWelcome->Text = L"サーバメッセージ"; this->groupBoxWelcome->Text = L"Server message";
// //
// textBoxWelcome // textBoxWelcome
// //
this->textBoxWelcome->Location = System::Drawing::Point(8, 19); this->textBoxWelcome->Location = System::Drawing::Point(8, 21);
this->textBoxWelcome->MaxLength = 254; this->textBoxWelcome->MaxLength = 254;
this->textBoxWelcome->Name = L"textBoxWelcome"; this->textBoxWelcome->Name = L"textBoxWelcome";
this->textBoxWelcome->Size = System::Drawing::Size(167, 86); this->textBoxWelcome->Size = System::Drawing::Size(167, 93);
this->textBoxWelcome->TabIndex = 0; this->textBoxWelcome->TabIndex = 0;
this->textBoxWelcome->Text = L""; this->textBoxWelcome->Text = L"";
this->textBoxWelcome->WordWrap = false; this->textBoxWelcome->WordWrap = false;
// //
// StartupForm // StartupForm
// //
this->AutoScaleDimensions = System::Drawing::SizeF(6, 12); this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->CancelButton = this->buttonCancel; this->CancelButton = this->buttonCancel;
this->ClientSize = System::Drawing::Size(407, 241); this->ClientSize = System::Drawing::Size(448, 261);
this->ControlBox = false; this->ControlBox = false;
this->Controls->Add(this->groupBoxWelcome); this->Controls->Add(this->groupBoxWelcome);
this->Controls->Add(this->groupBoxProfile); this->Controls->Add(this->groupBoxProfile);
this->Controls->Add(this->groupBoxConnection); this->Controls->Add(this->groupBoxConnection);
this->Controls->Add(this->groupBoxStartMode); this->Controls->Add(this->groupBoxStartMode);
this->Controls->Add(this->buttonOK); this->Controls->Add(this->buttonOK);
this->Controls->Add(this->buttonCancel); this->Controls->Add(this->buttonCancel);
this->Icon = (cli::safe_cast<System::Drawing::Icon^ >(resources->GetObject(L"$this.Icon"))); this->Icon = (cli::safe_cast<System::Drawing::Icon^>(resources->GetObject(L"$this.Icon")));
this->MaximizeBox = false; this->MaximizeBox = false;
this->MinimizeBox = false; this->MinimizeBox = false;
this->Name = L"StartupForm"; this->Name = L"StartupForm";
this->ShowInTaskbar = false; this->ShowInTaskbar = false;
this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent; this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
this->Text = L"スタートアップ"; this->Text = L"Welcome";
this->Load += gcnew System::EventHandler(this, &StartupForm::StartupForm_Load); this->Load += gcnew System::EventHandler(this, &StartupForm::StartupForm_Load);
this->Shown += gcnew System::EventHandler(this, &StartupForm::StartupForm_Shown); this->Shown += gcnew System::EventHandler(this, &StartupForm::StartupForm_Shown);
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->numericUpDownOpenPort))->EndInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->numericUpDownOpenPort))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->numericUpDownPort))->EndInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->numericUpDownPort))->EndInit();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->numericUpDownMaxConnection))->EndInit(); (cli::safe_cast<System::ComponentModel::ISupportInitialize^>(this->numericUpDownMaxConnection))->EndInit();
this->groupBoxStartMode->ResumeLayout(false); this->groupBoxStartMode->ResumeLayout(false);
this->groupBoxStartMode->PerformLayout(); this->groupBoxStartMode->PerformLayout();
this->groupBoxConnection->ResumeLayout(false); this->groupBoxConnection->ResumeLayout(false);
this->groupBoxConnection->PerformLayout(); this->groupBoxConnection->PerformLayout();
this->groupBoxProfile->ResumeLayout(false); this->groupBoxProfile->ResumeLayout(false);
this->groupBoxProfile->PerformLayout(); this->groupBoxProfile->PerformLayout();
this->groupBoxWelcome->ResumeLayout(false); this->groupBoxWelcome->ResumeLayout(false);
this->ResumeLayout(false); this->ResumeLayout(false);
} }
#pragma endregion #pragma endregion
private: private:
System::Void StartupForm_Load(System::Object^ sender, System::EventArgs^ e) { System::Void StartupForm_Load(System::Object^ sender, System::EventArgs^ e) {
@ -441,7 +438,7 @@ namespace LilithPort {
// サーバ名チェック // サーバ名チェック
if(textBoxServerName->Text->Length == 0){ if(textBoxServerName->Text->Length == 0){
MessageBox::Show(L"サーバ名を入力してください。\n\nSERVERモードで起動するには、\nサーバ名を入力する必要があります。", L"SERVERモードエラー", MessageBoxButtons::OK, MessageBoxIcon::Exclamation); MessageBox::Show(L"Please enter a server name.", L"Server Mode Error", MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
return; return;
} }
mp = Runtime::InteropServices::Marshal::StringToHGlobalAuto(textBoxServerName->Text); mp = Runtime::InteropServices::Marshal::StringToHGlobalAuto(textBoxServerName->Text);
@ -449,7 +446,7 @@ namespace LilithPort {
Runtime::InteropServices::Marshal::FreeHGlobal(mp); Runtime::InteropServices::Marshal::FreeHGlobal(mp);
p2 = _tcschr(p1, _T(',')); p2 = _tcschr(p1, _T(','));
if (p2 != NULL){ if (p2 != NULL){
MessageBox::Show(L"サーバ名に使用できない文字(,)があります。\nサーバ名を確認してください。", L"SERVERモードエラー", MessageBoxButtons::OK, MessageBoxIcon::Exclamation); MessageBox::Show(L"The server name cannot contain illegal characters such as the comma.\n", L"Server Mode Error", MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
return; return;
} }
} }
@ -472,14 +469,14 @@ namespace LilithPort {
// IPチェック // IPチェック
if(MTOPTION.CONNECTION_TYPE == CT_HOST || MTOPTION.CONNECTION_TYPE == CT_CLIENT) { if(MTOPTION.CONNECTION_TYPE == CT_HOST || MTOPTION.CONNECTION_TYPE == CT_CLIENT) {
if(textBoxIP->Text->Length == 0){ if(textBoxIP->Text->Length == 0){
MessageBox::Show(L"接続先アドレスを入力してください。\n\nHOST, CLIENTモードで起動するには、\n接続先のアドレスを入力する必要があります。", L"HOST, CLIENTモードエラー", MessageBoxButtons::OK, MessageBoxIcon::Exclamation); MessageBox::Show(L"Please enter a destination address.\nThe destination address is the server you are connecting to.", L"Host/Client Mode Error", MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
return; return;
} }
mp = Runtime::InteropServices::Marshal::StringToHGlobalAuto(textBoxIP->Text); mp = Runtime::InteropServices::Marshal::StringToHGlobalAuto(textBoxIP->Text);
_tcscpy_s(p1, static_cast<PTCHAR>(mp.ToPointer())); _tcscpy_s(p1, static_cast<PTCHAR>(mp.ToPointer()));
p2 = _tcschr(p1, _T(',')); p2 = _tcschr(p1, _T(','));
if (p2 != NULL){ if (p2 != NULL){
MessageBox::Show(L"接続先アドレスに使用できない文字(,)があります。\n接続先アドレスを確認してください。", L"HOST, CLIENTモードエラー", MessageBoxButtons::OK, MessageBoxIcon::Exclamation); MessageBox::Show(L"The destination address cannot contain illegal characters such as the comma.\n", L"Host/Client Mode Error", MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
return; return;
} }
} }
@ -493,7 +490,7 @@ namespace LilithPort {
textBoxName->Text = gcnew String(MTOPTION.NAME); textBoxName->Text = gcnew String(MTOPTION.NAME);
if(textBoxName->Text->Length == 0){ if(textBoxName->Text->Length == 0){
textBoxName->Text = gcnew String(L"名無しさん"); textBoxName->Text = gcnew String(L"NamelessDude"); //Default name
} }
} }

View file

@ -112,12 +112,12 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAQAMAAAAAAAAAAAAAAAAAAAAA AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAQAMAAAAAAAAAAAAAAAAAAAAA

View file

@ -96,7 +96,7 @@ void LoadMTOption()
GetPrivateProfileString(iniSystem, _T("SeekSound"), _T("seek.wav"), MTOPTION.SEEK_SOUND, _MAX_PATH, ini); GetPrivateProfileString(iniSystem, _T("SeekSound"), _T("seek.wav"), MTOPTION.SEEK_SOUND, _MAX_PATH, ini);
GetPrivateProfileString(iniSystem, _T("KeywordSound"), _T("name.wav"), MTOPTION.KEYWORD_SOUND, _MAX_PATH, ini); GetPrivateProfileString(iniSystem, _T("KeywordSound"), _T("name.wav"), MTOPTION.KEYWORD_SOUND, _MAX_PATH, ini);
GetPrivateProfileString(iniSystem, _T("Keyword"), _T(""), MTOPTION.KEYWORD, MAX_KEYWORD, ini); GetPrivateProfileString(iniSystem, _T("Keyword"), _T(""), MTOPTION.KEYWORD, MAX_KEYWORD, ini);
GetPrivateProfileString(iniSystem, _T("Name"), _T("NamelessDude"), MTOPTION.NAME, MAX_NAME, ini); GetPrivateProfileString(iniSystem, _T("Name"), _T("NamelessDude"),MTOPTION.NAME, MAX_NAME, ini);
GetPrivateProfileString(iniSystem, _T("Comment"), _T(""), MTOPTION.COMMENT, MAX_NAME, ini); GetPrivateProfileString(iniSystem, _T("Comment"), _T(""), MTOPTION.COMMENT, MAX_NAME, ini);
MTOPTION.CONNECTION_TYPE = GetPrivateProfileInt(iniSystem, _T("ConnectType"), 0, ini); MTOPTION.CONNECTION_TYPE = GetPrivateProfileInt(iniSystem, _T("ConnectType"), 0, ini);
MTOPTION.PORT = GetPrivateProfileInt(iniSystem, _T("Port"), 7500, ini); MTOPTION.PORT = GetPrivateProfileInt(iniSystem, _T("Port"), 7500, ini);
@ -675,10 +675,10 @@ String^ EncryptionIP(String^ ip)
ipString = Int64(Net::IPAddress::Parse(ip)->Address).ToString(); ipString = Int64(Net::IPAddress::Parse(ip)->Address).ToString();
} }
catch (ArgumentNullException^) { catch (ArgumentNullException^) {
return L"変換失敗。IPぬるぽエラー"; return L"IP conversion failed due to an ArgumentNullException.";
} }
catch (FormatException^) { catch (FormatException^) {
return L"変換失敗。IP形式エラー"; return L"IP conversion failed due to a FormatException.";
} }
array<Byte> ^binaryData = gcnew array<Byte>(11); array<Byte> ^binaryData = gcnew array<Byte>(11);
@ -689,10 +689,10 @@ String^ EncryptionIP(String^ ip)
ipBase64 = Convert::ToBase64String(binaryData); ipBase64 = Convert::ToBase64String(binaryData);
} }
catch (ArgumentNullException^) { catch (ArgumentNullException^) {
return L"変換失敗。Base64ぬるぽエラー"; return L"Null pointer trying to convert IP to Base64.";
} }
catch (FormatException^) { catch (FormatException^) {
return L"変換失敗。Base64形式エラー"; return L"Base64 conversion failed due to a FormattingException.";
} }
return ipBase64; return ipBase64;
} }
@ -700,6 +700,9 @@ String^ EncryptionIP(String^ ip)
String^ MTEncryptionIP(String^ ip) String^ MTEncryptionIP(String^ ip)
{ {
String^ result, ^buf, ^part; String^ result, ^buf, ^part;
//DO NOT CHANGE DO NOT CHANGE
//Strange that the dictionary is missing ひ through ん.
String^ dic = L"そぞただちぢっつづてでとどなにぬねのはばabcdefghijklmnopqrstuvwxyz" String^ dic = L"そぞただちぢっつづてでとどなにぬねのはばabcdefghijklmnopqrstuvwxyz"
L"ABCDEFGHIJKLMNOPQRSTUVWXYGぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜ"; L"ABCDEFGHIJKLMNOPQRSTUVWXYGぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜ";
@ -719,7 +722,7 @@ String^ MTEncryptionIP(String^ ip)
return result; return result;
} }
catch(Exception^){ catch(Exception^){
return L"IPアドレスのMTSP変換に失敗しました。"; return L"MTSP conversion of the IP address failed.";
} }
} }
@ -752,6 +755,8 @@ _int64 MTDecryptionIP(String^ cipher_ip)
String^ buf; String^ buf;
TCHAR part; TCHAR part;
int index; int index;
//DO NOT CHANGE DO NOT CHANGE
String^ dic = L"そぞただちぢっつづてでとどなにぬねのはばabcdefghijklmnopqrstuvwxyz" String^ dic = L"そぞただちぢっつづてでとどなにぬねのはばabcdefghijklmnopqrstuvwxyz"
L"ABCDEFGHIJKLMNOPQRSTUVWXYGぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜ"; L"ABCDEFGHIJKLMNOPQRSTUVWXYGぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜ";