mirror of
https://github.com/rvtr/ctr_Repair.git
synced 2025-10-31 13:51:08 -04:00
上画面の文字を行単位で変えられるように
BMS操作指示画面の文字とキーアサイン変更 git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@620 385bec56-5757-e545-9c3a-d8741f4650f1
This commit is contained in:
parent
0da5fedbb0
commit
82587cc013
@ -52,6 +52,7 @@
|
||||
#include "Util.h"
|
||||
#include "ResFont.h"
|
||||
#include "HardwareStateManager.h"
|
||||
#include "OperationMessage.h"
|
||||
|
||||
// バージョン表示用
|
||||
#include "version.h"
|
||||
@ -223,7 +224,7 @@ extern "C" void nnMain(void)
|
||||
|
||||
// 操作用メッセージ
|
||||
// 進捗確認メッセージを兼ねる?
|
||||
::std::vector<std::string> operationMessage;
|
||||
common::OperationMessage operationMessage;
|
||||
|
||||
ControlState(manager, operationMessage, nextStep, continueBackup, forceDelete);
|
||||
|
||||
|
||||
@ -63,25 +63,25 @@ bool s_PlayedFailSound = false;
|
||||
|
||||
} // namespace <unnamed>
|
||||
|
||||
void PutAliveMessage(::std::vector<std::string>& operationMessage, const char* str)
|
||||
void PutAliveMessage(common::OperationMessage& operationMessage, const char* str)
|
||||
{
|
||||
std::string message = std::string(str);
|
||||
static u8 i = 0;
|
||||
if (i < 0xff / 4)
|
||||
{
|
||||
operationMessage.push_back(message + std::string(" /"));
|
||||
operationMessage.Add((message + std::string(" /")).c_str());
|
||||
}
|
||||
else if (i < 0xff * 2 / 4)
|
||||
{
|
||||
operationMessage.push_back(message + std::string(" |"));
|
||||
operationMessage.Add((message + std::string(" |")).c_str());
|
||||
}
|
||||
else if (i < 0xff * 3 / 4)
|
||||
{
|
||||
operationMessage.push_back(message + std::string(" \\"));
|
||||
operationMessage.Add((message + std::string(" \\")).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
operationMessage.push_back(message + std::string(" -"));
|
||||
operationMessage.Add((message + std::string(" -")).c_str());
|
||||
}
|
||||
i += 4;
|
||||
}
|
||||
@ -91,7 +91,7 @@ bool NeedsAcAdapter(common::HardwareStateManager& manager)
|
||||
return manager.IsBatteryLower() && !manager.IsAdapterConnected();
|
||||
}
|
||||
|
||||
void ControlState(common::HardwareStateManager& manager, ::std::vector<std::string>& operationMessage, bool& nextStep,
|
||||
void ControlState(common::HardwareStateManager& manager, common::OperationMessage& operationMessage, bool& nextStep,
|
||||
bool& continueBackup, bool forceDelete)
|
||||
{
|
||||
// 状態遷移Controller
|
||||
@ -116,7 +116,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
s_SdWriteProetctAnnotation = true;
|
||||
common::PlaySound(common::SOUND_ANNOTATION);
|
||||
}
|
||||
operationMessage.push_back(::std::string("Can*t Write SD Card!!\n"));
|
||||
operationMessage.Add("Can*t Write SD Card!!\n");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -142,32 +142,32 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
s_ExistAPSettingAnnotation = true;
|
||||
common::PlaySound(common::SOUND_ANNOTATION);
|
||||
}
|
||||
operationMessage.push_back(::std::string("Accsess_Point_Setting does not exist!"));
|
||||
operationMessage.Add("Accsess_Point_Setting does not exist!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
error = true;
|
||||
operationMessage.push_back(::std::string("Insert SD Card!!"));
|
||||
operationMessage.Add("Insert SD Card!!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
error = true;
|
||||
operationMessage.push_back(::std::string("Can't Read SDCI!!"));
|
||||
operationMessage.Add("Can't Read SDCI!!");
|
||||
}
|
||||
|
||||
// ACアダプタが必要か?
|
||||
if (NeedsAcAdapter(manager))
|
||||
{
|
||||
error = true;
|
||||
operationMessage.push_back(::std::string("Connect AC Adapter!!"));
|
||||
operationMessage.Add("Connect AC Adapter!!");
|
||||
}
|
||||
|
||||
// エラーが無ければ進行用メッセージ表示
|
||||
if (!error)
|
||||
{
|
||||
operationMessage.push_back(::std::string("Push A or START Button"));
|
||||
operationMessage.Add("Push A or START Button");
|
||||
if (!s_PlayedStartCursor)
|
||||
{
|
||||
common::PlaySound(common::SOUND_CURSOR);
|
||||
@ -330,7 +330,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
if (NeedsAcAdapter(manager))
|
||||
{
|
||||
continueBackup = false;
|
||||
operationMessage.push_back(::std::string("Connect AC Adapter!!"));
|
||||
operationMessage.Add("Connect AC Adapter!!");
|
||||
}
|
||||
|
||||
PutAliveMessage(operationMessage, "Exporting Nand Data");
|
||||
@ -387,7 +387,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
// 吸出し完了
|
||||
case DONE:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Backup Done. Pull Out SD Card."));
|
||||
operationMessage.Add("Backup Done. Pull Out SD Card.");
|
||||
if (!s_PlayedSdPullOutCursor)
|
||||
{
|
||||
common::PlaySound(common::SOUND_CURSOR);
|
||||
@ -399,7 +399,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
// SDカード抜き完了
|
||||
case FINISHED:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Backup Succeeded!!\n"));
|
||||
operationMessage.Add("Backup Succeeded!!\n");
|
||||
if (!s_PlayedFinishedSound)
|
||||
{
|
||||
common::PlaySound(common::SOUND_OK);
|
||||
@ -411,7 +411,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
// 吸出し失敗
|
||||
case FAIL:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Backup Failed."));
|
||||
operationMessage.Add("Backup Failed.");
|
||||
if (!s_PlayedFailSound)
|
||||
{
|
||||
common::PlaySound(common::SOUND_NG);
|
||||
@ -422,7 +422,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
|
||||
case FAIL_CHECK:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Check Error."));
|
||||
operationMessage.Add("Check Error.");
|
||||
if (!s_PlayedFailSound)
|
||||
{
|
||||
common::PlaySound(common::SOUND_NG);
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "HardwareStateManager.h"
|
||||
#include "OperationMessage.h"
|
||||
|
||||
namespace ConsoleBackup
|
||||
{
|
||||
@ -36,7 +37,7 @@ typedef enum BackupMode
|
||||
//! @param[in] nextStep 次の状態に遷移してもよいかどうか
|
||||
//! @param[in] continueBackup 処理を続けてもよいかどうか
|
||||
//! @param[in] forceDelete チェックエラー発生時に削除を実行してもよいかどうか
|
||||
void ControlState(common::HardwareStateManager& manager, ::std::vector<std::string>& operationMessage, bool& nextStep,
|
||||
void ControlState(common::HardwareStateManager& manager, common::OperationMessage& operationMessage, bool& nextStep,
|
||||
bool& continueBackup, bool forceDelete);
|
||||
|
||||
// バックアップ処理中かどうか
|
||||
|
||||
@ -44,6 +44,7 @@ SOURCES[] =
|
||||
../common/ResFont.cpp
|
||||
../common/HardwareStateManager.cpp
|
||||
../common/SaveDataMover.cpp
|
||||
../common/OperationMessage.cpp
|
||||
|
||||
include $(ROOT)/common/BuildSwitch.om
|
||||
|
||||
|
||||
@ -47,6 +47,7 @@
|
||||
#include "Util.h"
|
||||
#include "ResFont.h"
|
||||
#include "HardwareStateManager.h"
|
||||
#include "OperationMessage.h"
|
||||
|
||||
// バージョン表示用
|
||||
#include "version.h"
|
||||
@ -183,6 +184,7 @@ extern "C" void nnMain(void)
|
||||
for(;;)
|
||||
{
|
||||
bool nextStep = false;
|
||||
bool operateBmsDone = false;
|
||||
|
||||
s_PadReader.ReadLatest(&padStatus);
|
||||
|
||||
@ -192,6 +194,11 @@ extern "C" void nnMain(void)
|
||||
{
|
||||
nextStep = true;
|
||||
}
|
||||
// YボタンでBMS操作完了
|
||||
if(padStatus.trigger & nn::hid::BUTTON_Y)
|
||||
{
|
||||
operateBmsDone = true;
|
||||
}
|
||||
|
||||
// LまたはRボタンで上下画面フリップ
|
||||
if(padStatus.trigger & nn::hid::BUTTON_R ||
|
||||
@ -236,9 +243,10 @@ extern "C" void nnMain(void)
|
||||
|
||||
// 操作用メッセージ
|
||||
// 進捗確認メッセージを兼ねる?
|
||||
::std::vector<std::string> operationMessage;
|
||||
|
||||
ControlState(manager, operationMessage, nextStep);
|
||||
common::OperationMessage operationMessage;
|
||||
|
||||
ControlState(manager, operationMessage, nextStep, operateBmsDone);
|
||||
|
||||
nn::util::FloatColor titleColor;
|
||||
|
||||
|
||||
@ -88,8 +88,8 @@ bool s_ShopOperationExecuted[SHOP_OPERATION_NUM_MAX];
|
||||
// ショップ処理を何回リトライしたか
|
||||
u32 s_ShopOperationRetryCount[SHOP_OPERATION_NUM_MAX];
|
||||
|
||||
void PutAliveMessage(::std::vector<std::string>& operationMessage, const char* str);
|
||||
bool CheckAndReadAPSetting(::std::vector<std::string>& operationMessage);
|
||||
void PutAliveMessage(common::OperationMessage& operationMessage, const char* str);
|
||||
bool CheckAndReadAPSetting(common::OperationMessage& operationMessage);
|
||||
|
||||
bool NeedsAcAdater(common::HardwareStateManager& manager)
|
||||
{
|
||||
@ -215,23 +215,23 @@ RestoreState s_RestoreState = STARTUP;
|
||||
// Restoreモード管理
|
||||
RestoreMode s_RestoreMode = RESTORE_MODE_RESTORE;
|
||||
|
||||
void CheckSdInserted(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep);
|
||||
void CheckAcAdapter(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep);
|
||||
void CheckSdWritable(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep);
|
||||
void CheckApSetting(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep);
|
||||
void CheckNupExecuted(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep);
|
||||
void CheckDownloadIvs(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep);
|
||||
void CheckAccountDeleted(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep);
|
||||
void CheckAccountTransfered(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep);
|
||||
void CheckWriteFinished(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep);
|
||||
void CheckReadIvs(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep);
|
||||
void CheckConsoleInitialized(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep);
|
||||
void CheckExistsSerialNumber(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep);
|
||||
void CheckIvsinSd(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep);
|
||||
void CheckRegioinSd(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep);
|
||||
void CheckSdInserted(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
void CheckAcAdapter(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
void CheckSdWritable(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
void CheckApSetting(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
void CheckNupExecuted(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
void CheckDownloadIvs(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
void CheckAccountDeleted(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
void CheckAccountTransfered(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
void CheckWriteFinished(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
void CheckReadIvs(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
void CheckConsoleInitialized(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
void CheckExistsSerialNumber(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
void CheckIvsinSd(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
void CheckRegioinSd(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep);
|
||||
|
||||
// SDカード挿入チェック
|
||||
void CheckSdInserted(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep)
|
||||
void CheckSdInserted(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
if (nn::fs::IsSdmcInserted())
|
||||
{
|
||||
@ -239,18 +239,18 @@ void CheckSdInserted(common::HardwareStateManager& manager, ::std::vector<std::s
|
||||
}
|
||||
else
|
||||
{
|
||||
message.push_back(::std::string("Insert SD Card!!"));
|
||||
message.Add("Insert SD Card!!");
|
||||
s_RestoreState = STARTUP;
|
||||
}
|
||||
}
|
||||
|
||||
// ACアダプタが必要かどうかチェック
|
||||
void CheckAcAdapter(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep)
|
||||
void CheckAcAdapter(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
// ACアダプタが必要か?
|
||||
if (NeedsAcAdater(manager))
|
||||
{
|
||||
message.push_back(::std::string("Connect AC Adapter!!"));
|
||||
message.Add("Connect AC Adapter!!");
|
||||
s_RestoreState = STARTUP;
|
||||
}
|
||||
else
|
||||
@ -260,7 +260,7 @@ void CheckAcAdapter(common::HardwareStateManager& manager, ::std::vector<std::st
|
||||
}
|
||||
|
||||
// SDカード書き込みチェック
|
||||
void CheckSdWritable(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep)
|
||||
void CheckSdWritable(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
// SDカードに書き込みできるか?
|
||||
if (nn::fs::IsSdmcWritable())
|
||||
@ -270,14 +270,14 @@ void CheckSdWritable(common::HardwareStateManager& manager, ::std::vector<std::s
|
||||
else
|
||||
{
|
||||
PlayAnnotationSound(ANNOTATION_SD_WRITE_PROTECT);
|
||||
message.push_back(::std::string("Can't Write SD Card!!\n"));
|
||||
message.Add("Can't Write SD Card!!\n");
|
||||
s_RestoreState = STARTUP;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 設定ファイル書式チェック
|
||||
void CheckApSetting(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep)
|
||||
void CheckApSetting(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
NN_UNUSED_VAR(manager);
|
||||
NN_UNUSED_VAR(goNextStep);
|
||||
@ -293,7 +293,7 @@ void CheckApSetting(common::HardwareStateManager& manager, ::std::vector<std::st
|
||||
}
|
||||
|
||||
// NUP済みかどうかチェック
|
||||
void CheckNupExecuted(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep)
|
||||
void CheckNupExecuted(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
if (common::ExistsUpdateCheckedFile())
|
||||
{
|
||||
@ -323,7 +323,7 @@ void CheckNupExecuted(common::HardwareStateManager& manager, ::std::vector<std::
|
||||
else
|
||||
{
|
||||
PlayAnnotationSound(ANNOTATION_WIFI_OFF);
|
||||
message.push_back(::std::string("Wireless is Off\n"));
|
||||
message.Add("Wireless is Off\n");
|
||||
s_RestoreState = STARTUP;
|
||||
}
|
||||
}
|
||||
@ -331,7 +331,7 @@ void CheckNupExecuted(common::HardwareStateManager& manager, ::std::vector<std::
|
||||
}
|
||||
|
||||
// インフラからIVS取得済みかチェック
|
||||
void CheckDownloadIvs(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep)
|
||||
void CheckDownloadIvs(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
NN_UNUSED_VAR(message);
|
||||
NN_UNUSED_VAR(goNextStep);
|
||||
@ -357,7 +357,7 @@ void CheckDownloadIvs(common::HardwareStateManager& manager, ::std::vector<std::
|
||||
}
|
||||
|
||||
// アカウント削除済みかチェック
|
||||
void CheckAccountDeleted(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep)
|
||||
void CheckAccountDeleted(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
// アカウント削除確認ファイルがあるか?
|
||||
if (common::ExistsDeleteAccountChecked())
|
||||
@ -387,7 +387,7 @@ void CheckAccountDeleted(common::HardwareStateManager& manager, ::std::vector<st
|
||||
}
|
||||
|
||||
// アカウント移行済みかチェック
|
||||
void CheckAccountTransfered(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep)
|
||||
void CheckAccountTransfered(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
// アカウント移行確認ファイルがあるか?
|
||||
if (common::ExistsTransferAccountChecked())
|
||||
@ -401,7 +401,7 @@ void CheckAccountTransfered(common::HardwareStateManager& manager, ::std::vector
|
||||
}
|
||||
|
||||
// 書き込み完了かどうかチェック
|
||||
void CheckWriteFinished(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep)
|
||||
void CheckWriteFinished(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
NN_UNUSED_VAR(goNextStep);
|
||||
|
||||
@ -418,7 +418,7 @@ void CheckWriteFinished(common::HardwareStateManager& manager, ::std::vector<std
|
||||
else
|
||||
{
|
||||
PlayAnnotationSound(ANNOTATION_WIFI_OFF);
|
||||
message.push_back(::std::string("Wireless is Off\n"));
|
||||
message.Add("Wireless is Off\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -429,7 +429,7 @@ void CheckWriteFinished(common::HardwareStateManager& manager, ::std::vector<std
|
||||
}
|
||||
|
||||
// IVSを読めるかどうかチェック
|
||||
void CheckReadIvs(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep)
|
||||
void CheckReadIvs(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
// IVSを読めるか?
|
||||
if (manager.CanReadIvs())
|
||||
@ -444,7 +444,7 @@ void CheckReadIvs(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
}
|
||||
|
||||
// 本体初期化済みかどうかチェック
|
||||
void CheckConsoleInitialized(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep)
|
||||
void CheckConsoleInitialized(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
// 本体初期化完了ファイルがあるか?
|
||||
if (common::ExistsConsoleInitializedFile())
|
||||
@ -458,7 +458,7 @@ void CheckConsoleInitialized(common::HardwareStateManager& manager, ::std::vecto
|
||||
}
|
||||
|
||||
// シリアルナンバーがあるかどうかチェック
|
||||
void CheckExistsSerialNumber(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep)
|
||||
void CheckExistsSerialNumber(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
NN_UNUSED_VAR(manager);
|
||||
NN_UNUSED_VAR(message);
|
||||
@ -487,7 +487,7 @@ void CheckExistsSerialNumber(common::HardwareStateManager& manager, ::std::vecto
|
||||
}
|
||||
|
||||
// SDカードにIVSがあるかどうかチェック
|
||||
void CheckIvsinSd(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep)
|
||||
void CheckIvsinSd(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
NN_UNUSED_VAR(manager);
|
||||
NN_UNUSED_VAR(message);
|
||||
@ -506,7 +506,7 @@ void CheckIvsinSd(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
}
|
||||
|
||||
// SDカードにリージョンデータがあるかどうかチェック
|
||||
void CheckRegioinSd(common::HardwareStateManager& manager, ::std::vector<std::string>& message, bool& goNextStep)
|
||||
void CheckRegioinSd(common::HardwareStateManager& manager, common::OperationMessage& message, bool& goNextStep)
|
||||
{
|
||||
NN_UNUSED_VAR(message);
|
||||
NN_UNUSED_VAR(goNextStep);
|
||||
@ -553,7 +553,7 @@ void ShopOperationSuccess(ShopOperation op, const char* logMessage, RestoreState
|
||||
|
||||
void ShopOperationSingleTemplate(
|
||||
common::HardwareStateManager& manager,
|
||||
std::vector<std::string>& message,
|
||||
common::OperationMessage& message,
|
||||
ShopOperation op,
|
||||
const char* aliveMessage,
|
||||
const char* logMessage,
|
||||
@ -564,7 +564,7 @@ void ShopOperationSingleTemplate(
|
||||
// ACアダプタが必要か?
|
||||
if (NeedsAcAdater(manager))
|
||||
{
|
||||
message.push_back(::std::string("Connect AC Adapter!!"));
|
||||
message.Add("Connect AC Adapter!!");
|
||||
}
|
||||
|
||||
// アップデートを行う
|
||||
@ -646,12 +646,12 @@ void ShopOperationSingleTemplate(
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateOperation(common::HardwareStateManager& manager, ::std::vector<std::string>& message, RestoreState nextState)
|
||||
void UpdateOperation(common::HardwareStateManager& manager, common::OperationMessage& message, RestoreState nextState)
|
||||
{
|
||||
// ACアダプタが必要か?
|
||||
if (NeedsAcAdater(manager))
|
||||
{
|
||||
message.push_back(::std::string("Connect AC Adapter!!"));
|
||||
message.Add("Connect AC Adapter!!");
|
||||
}
|
||||
|
||||
// アップデートを行う
|
||||
@ -717,14 +717,14 @@ void UpdateOperation(common::HardwareStateManager& manager, ::std::vector<std::s
|
||||
}
|
||||
}
|
||||
|
||||
bool CheckAndReadAPSetting(::std::vector<std::string>& operationMessage)
|
||||
bool CheckAndReadAPSetting(common::OperationMessage& operationMessage)
|
||||
{
|
||||
using namespace common;
|
||||
|
||||
if (!ExistsAPSetting())
|
||||
{
|
||||
PlayAnnotationSound(ANNOTATION_SETTING_NOT_FOUND);
|
||||
operationMessage.push_back(::std::string("Accsess_Point_Setting does not exist!"));
|
||||
operationMessage.Add("Accsess_Point_Setting does not exist!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -739,12 +739,12 @@ bool CheckAndReadAPSetting(::std::vector<std::string>& operationMessage)
|
||||
|| s_GetIvsOnlyMode && s_CheckSdOnlyMode
|
||||
|| s_CheckSdOnlyMode && s_NupOnlyMode)
|
||||
{
|
||||
operationMessage.push_back("Only one special mode setting is valid!!");
|
||||
operationMessage.Add("Only one special mode setting is valid!!");
|
||||
s_ReadSettingIsSuccess = false;
|
||||
}
|
||||
else if(s_NupOnlyMode && s_SkipNupMode)
|
||||
{
|
||||
operationMessage.push_back("Both NUP_ONLY and SKIP_NUP are described!!");
|
||||
operationMessage.Add("Both NUP_ONLY and SKIP_NUP are described!!");
|
||||
s_ReadSettingIsSuccess = false;
|
||||
}
|
||||
else
|
||||
@ -772,32 +772,32 @@ bool CheckAndReadAPSetting(::std::vector<std::string>& operationMessage)
|
||||
|
||||
if (!s_ReadSettingIsSuccess)
|
||||
{
|
||||
operationMessage.push_back(::std::string("Invalid Accsess_Point_Setting format!"));
|
||||
operationMessage.Add("Invalid Accsess_Point_Setting format!");
|
||||
PlayAnnotationSound(ANNOTATION_INVALID_SETTING);
|
||||
}
|
||||
|
||||
return s_ReadSettingIsSuccess;
|
||||
}
|
||||
|
||||
void PutAliveMessage(::std::vector<std::string>& operationMessage, const char* str)
|
||||
void PutAliveMessage(common::OperationMessage& operationMessage, const char* str)
|
||||
{
|
||||
std::string message = std::string(str);
|
||||
static u8 i = 0;
|
||||
if (i < 0xff / 4)
|
||||
{
|
||||
operationMessage.push_back(message + std::string(" /"));
|
||||
operationMessage.Add((message + std::string(" /")).c_str());
|
||||
}
|
||||
else if (i < 0xff * 2 / 4)
|
||||
{
|
||||
operationMessage.push_back(message + std::string(" |"));
|
||||
operationMessage.Add((message + std::string(" |")).c_str());
|
||||
}
|
||||
else if (i < 0xff * 3 / 4)
|
||||
{
|
||||
operationMessage.push_back(message + std::string(" \\"));
|
||||
operationMessage.Add((message + std::string(" \\")).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
operationMessage.push_back(message + std::string(" -"));
|
||||
operationMessage.Add((message + std::string(" -")).c_str());
|
||||
}
|
||||
i += 4;
|
||||
}
|
||||
@ -820,7 +820,7 @@ nn::Result ExecSyncMcuRtc(common::HardwareStateManager& manager)
|
||||
|
||||
} // namespace <unnamed>
|
||||
|
||||
void ControlState(common::HardwareStateManager& manager, ::std::vector<std::string>& operationMessage, bool& nextStep)
|
||||
void ControlState(common::HardwareStateManager& manager, common::OperationMessage& operationMessage, bool& nextStep, bool operateBmsDone)
|
||||
{
|
||||
using namespace common;
|
||||
nn::Result result;
|
||||
@ -858,8 +858,8 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
|
||||
case WAIT_START_UPDATE:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Push A or START Button"));
|
||||
operationMessage.push_back(::std::string("Network Update Mode"));
|
||||
operationMessage.Add("Push A or START Button");
|
||||
operationMessage.Add("Network Update Mode");
|
||||
PlayCursorSound(WAIT_START_UPDATE);
|
||||
|
||||
if (nextStep)
|
||||
@ -880,15 +880,15 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
if (result.IsSuccess())
|
||||
{
|
||||
::std::string serialStr(reinterpret_cast<char*> (serial));
|
||||
operationMessage.push_back(::std::string("Serial Number in SD : ") + serialStr);
|
||||
operationMessage.Add((::std::string("Serial Number in SD : ") + serialStr).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
s_RestoreState = FAIL;
|
||||
}
|
||||
|
||||
operationMessage.push_back(::std::string("Push A or START Button"));
|
||||
operationMessage.push_back(::std::string("Import Data Mode"));
|
||||
operationMessage.Add("Push A or START Button");
|
||||
operationMessage.Add("Import Data Mode");
|
||||
PlayCursorSound(WAIT_START_IMPORT);
|
||||
|
||||
if (nextStep)
|
||||
@ -900,8 +900,8 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
|
||||
case WAIT_START_SYNC_CLOCK:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Push A or START Button"));
|
||||
operationMessage.push_back(::std::string("DownLoad Twl Title and Clock Sync Mode"));
|
||||
operationMessage.Add("Push A or START Button");
|
||||
operationMessage.Add("DownLoad Twl Title and Clock Sync Mode");
|
||||
PlayCursorSound(WAIT_START_SYNC_CLOCK);
|
||||
|
||||
if (nextStep)
|
||||
@ -956,9 +956,9 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
// シリアルナンバーがSDカードにないこと警告
|
||||
case SERIAL_IS_NOT_IN_SD:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Serial Number Is Not In SD Card"));
|
||||
operationMessage.push_back(::std::string("Push A or START Button"));
|
||||
operationMessage.push_back(::std::string("Import Data Mode"));
|
||||
operationMessage.Add("Serial Number Is Not In SD Card");
|
||||
operationMessage.Add("Push A or START Button");
|
||||
operationMessage.Add("Import Data Mode");
|
||||
|
||||
PlayAnnotationSound(ANNOTATION_SERIAL_NUMBER_NOT_IN_SD);
|
||||
|
||||
@ -979,8 +979,8 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
// アップデート完了
|
||||
case UPDATE_DONE:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Network Update Done."));
|
||||
operationMessage.push_back(::std::string("Press A or START Button to Reboot"));
|
||||
operationMessage.Add("Network Update Done.");
|
||||
operationMessage.Add("Press A or START Button to Reboot");
|
||||
PlayCursorSound(UPDATE_DONE);
|
||||
|
||||
if (nextStep)
|
||||
@ -1000,8 +1000,8 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
|
||||
case DOWNLOAD_IVS_DONE:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Get SDCI Done."));
|
||||
operationMessage.push_back(::std::string("Press A or START Button to Reboot"));
|
||||
operationMessage.Add("Get SDCI Done.");
|
||||
operationMessage.Add("Press A or START Button to Reboot");
|
||||
PlayCursorSound(DOWNLOAD_IVS_DONE);
|
||||
|
||||
if (nextStep)
|
||||
@ -1013,7 +1013,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
|
||||
case CHECK_IVS:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Insert User's SD Card"));
|
||||
operationMessage.Add("Insert User's SD Card");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1048,15 +1048,15 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
|
||||
case CHECK_SD_DIRECTORY_SUCCESS:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Check User's SD Card Succeeded."));
|
||||
operationMessage.push_back(::std::string("Pull Out SD Card"));
|
||||
operationMessage.Add("Check User's SD Card Succeeded.");
|
||||
operationMessage.Add("Pull Out SD Card");
|
||||
}
|
||||
break;
|
||||
|
||||
case CHECK_SD_DIRECTORY_FAIL:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Check User's SD Card Failed."));
|
||||
operationMessage.push_back(::std::string("Pull Out SD Card"));
|
||||
operationMessage.Add("Check User's SD Card Failed.");
|
||||
operationMessage.Add("Pull Out SD Card");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1064,11 +1064,11 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
{
|
||||
if(s_SkipNupMode)
|
||||
{
|
||||
operationMessage.push_back(::std::string("After Operating BMS Account Transfer,"));
|
||||
operationMessage.Add("After Operating BMS Account Transfer,");
|
||||
}
|
||||
|
||||
operationMessage.push_back(::std::string("Push A or START Button"));
|
||||
operationMessage.push_back(::std::string("Transfer Account Mode"));
|
||||
operationMessage.Add("Push A or START Button");
|
||||
operationMessage.Add("Transfer Account Mode");
|
||||
PlayCursorSound(WAIT_START_TRANSFER_ACCOUNT);
|
||||
|
||||
if (nextStep)
|
||||
@ -1088,8 +1088,8 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
|
||||
case WAIT_START_DELETE_ACCOUNT:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Push A or START Button"));
|
||||
operationMessage.push_back(::std::string("Delete Account Mode"));
|
||||
operationMessage.Add("Push A or START Button");
|
||||
operationMessage.Add("Delete Account Mode");
|
||||
PlayCursorSound(WAIT_START_DELETE_ACCOUNT);
|
||||
|
||||
if (nextStep)
|
||||
@ -1127,13 +1127,13 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
}
|
||||
else
|
||||
{
|
||||
operationMessage.push_back(::std::string("Delete Account Done."));
|
||||
operationMessage.push_back(::std::string("Operate BMS."));
|
||||
operationMessage.push_back(::std::string(""));
|
||||
operationMessage.push_back(::std::string("Press A or START Button to Continue"));
|
||||
operationMessage.Add("Delete Account Done.");
|
||||
operationMessage.Add("Operate BMS.", nn::util::Color8(0, 255, 255, 255));
|
||||
operationMessage.Add("");
|
||||
operationMessage.Add("Press Y Button to Continue");
|
||||
PlayCursorSound(DELETE_ACCOUNT_DONE);
|
||||
|
||||
if (nextStep)
|
||||
if (operateBmsDone)
|
||||
{
|
||||
s_RestoreState = STARTUP;
|
||||
}
|
||||
@ -1231,7 +1231,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
// ACアダプタが必要か?
|
||||
if (NeedsAcAdater(manager))
|
||||
{
|
||||
operationMessage.push_back(::std::string("Connect AC Adapter!!"));
|
||||
operationMessage.Add("Connect AC Adapter!!");
|
||||
}
|
||||
|
||||
// データを読み込む
|
||||
@ -1300,7 +1300,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
// 書き込み後の処理
|
||||
case POST_RESTORE:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Post Process..."));
|
||||
operationMessage.Add("Post Process...");
|
||||
|
||||
// SDカードのIVSファイルを書き込む
|
||||
if(ImportIvsData())
|
||||
@ -1320,8 +1320,8 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
// 書き込み完了
|
||||
case RESTORE_DONE:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Restore Done."));
|
||||
operationMessage.push_back(::std::string("Press A or START Button to Reboot"));
|
||||
operationMessage.Add("Restore Done.");
|
||||
operationMessage.Add("Press A or START Button to Reboot");
|
||||
PlayCursorSound(RESTORE_DONE);
|
||||
|
||||
if (nextStep)
|
||||
@ -1505,7 +1505,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
// すべて完了
|
||||
case WAIT_SD_EJECT:
|
||||
{
|
||||
operationMessage.push_back(::std::string("ALL Done. Pull Out SD Card."));
|
||||
operationMessage.Add("ALL Done. Pull Out SD Card.");
|
||||
// SDカード抜けのみで次の状態に遷移する
|
||||
PlayCursorSound(WAIT_SD_EJECT);
|
||||
|
||||
@ -1515,7 +1515,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
// すべて完了
|
||||
case ALL_DONE:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Restore Succeeded!!"));
|
||||
operationMessage.Add("Restore Succeeded!!");
|
||||
static bool init = true;
|
||||
if (init)
|
||||
{
|
||||
@ -1536,7 +1536,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
init = false;
|
||||
}
|
||||
|
||||
operationMessage.push_back(::std::string("Failed."));
|
||||
operationMessage.Add("Failed.");
|
||||
if (!s_PlayedFailSound)
|
||||
{
|
||||
PlaySound(SOUND_NG);
|
||||
@ -1547,14 +1547,14 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
|
||||
case NUP_ONLY_WAIT_SD_EJECT:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Update Done. Pull Out SD Card."));
|
||||
operationMessage.Add("Update Done. Pull Out SD Card.");
|
||||
PlayCursorSound(NUP_ONLY_WAIT_SD_EJECT);
|
||||
}
|
||||
break;
|
||||
|
||||
case DOWNLOAD_IVS_WAIT_NEXT:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Press A or START Button to Continue."));
|
||||
operationMessage.Add("Press A or START Button to Continue.");
|
||||
if(nextStep)
|
||||
{
|
||||
s_RestoreState = SYNC_TICKET;
|
||||
@ -1565,7 +1565,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
|
||||
case NUP_ONLY_WAIT_NEXT:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Press A or START Button to Shutdown."));
|
||||
operationMessage.Add("Press A or START Button to Shutdown.");
|
||||
|
||||
if (nextStep)
|
||||
{
|
||||
@ -1589,7 +1589,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
|
||||
case PREINSTALL_WAIT_SYNC_TICKET:
|
||||
{
|
||||
operationMessage.push_back(::std::string("Press A or START Button to Continue."));
|
||||
operationMessage.Add("Press A or START Button to Continue.");
|
||||
PlayCursorSound(PREINSTALL_WAIT_SYNC_TICKET);
|
||||
if(nextStep)
|
||||
{
|
||||
@ -1601,7 +1601,7 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
case PREINSTALL_WAIT_USER_SD_INSERT:
|
||||
{
|
||||
PlayCursorSound(PREINSTALL_WAIT_USER_SD_INSERT);
|
||||
operationMessage.push_back(::std::string("Insert User's SD Card"));
|
||||
operationMessage.Add("Insert User's SD Card");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1705,9 +1705,9 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
case PREINSTALL_CHECK_SD_FAIL:
|
||||
{
|
||||
PlayCursorSound(PREINSTALL_CHECK_SD_FAIL);
|
||||
operationMessage.push_back(::std::string("Check User's SD Card Failed."));
|
||||
operationMessage.push_back(::std::string("Pull Out User's SD Card"));
|
||||
operationMessage.push_back(::std::string("and Insert Repairing SD Card"));
|
||||
operationMessage.Add("Check User's SD Card Failed.");
|
||||
operationMessage.Add("Pull Out User's SD Card");
|
||||
operationMessage.Add("and Insert Repairing SD Card");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1792,17 +1792,17 @@ void ControlState(common::HardwareStateManager& manager, ::std::vector<std::stri
|
||||
case PREINSTALL_DOWNLOAD_APP_NOT_ENOUGH_SPACE:
|
||||
{
|
||||
PlayCursorSound(PREINSTALL_DOWNLOAD_APP_NOT_ENOUGH_SPACE);
|
||||
operationMessage.push_back(::std::string("Not enough space on User's SD Card"));
|
||||
operationMessage.push_back(::std::string("Pull out User's SD Card"));
|
||||
operationMessage.push_back(::std::string("and Insert Repairing SD Card"));
|
||||
operationMessage.Add("Not enough space on User's SD Card");
|
||||
operationMessage.Add("Pull out User's SD Card");
|
||||
operationMessage.Add("and Insert Repairing SD Card");
|
||||
}
|
||||
break;
|
||||
|
||||
case PREINSTALL_WAIT_USER_SD_EJECT:
|
||||
{
|
||||
PlayCursorSound(PREINSTALL_WAIT_USER_SD_EJECT);
|
||||
operationMessage.push_back(::std::string("Pull out User's SD Card"));
|
||||
operationMessage.push_back(::std::string("and Insert Repairing SD Card"));
|
||||
operationMessage.Add("Pull out User's SD Card");
|
||||
operationMessage.Add("and Insert Repairing SD Card");
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "HardwareStateManager.h"
|
||||
#include "OperationMessage.h"
|
||||
|
||||
namespace ConsoleRestore
|
||||
{
|
||||
@ -41,8 +42,8 @@ const u32 RETRY_MAX = 3;
|
||||
// manager ハードウェア情報を取得するためのラッパ
|
||||
// operationMessage 操作情報として表示したい文字列
|
||||
// nextStep 次の状態に遷移してもよいかどうか
|
||||
// continueBackup 処理を続けてもよいかどうか
|
||||
void ControlState(common::HardwareStateManager& manager, ::std::vector<std::string>& operationMessage, bool& nextStep);
|
||||
// operateBmsDone BMS操作を完了したかどうか
|
||||
void ControlState(common::HardwareStateManager& manager, common::OperationMessage& operationMessage, bool& nextStep, bool operateBmsDone);
|
||||
|
||||
// リストア処理中かどうか
|
||||
bool InProgress();
|
||||
|
||||
@ -52,6 +52,7 @@ SOURCES[] =
|
||||
../common/ResFont.cpp
|
||||
../common/HardwareStateManager.cpp
|
||||
../common/SaveDataMover.cpp
|
||||
../common/OperationMessage.cpp
|
||||
|
||||
include $(ROOT)/common/BuildSwitch.om
|
||||
|
||||
|
||||
@ -17,17 +17,18 @@ if $(and $(defined PROD_BUILD), $(defined TEST_BUILD))
|
||||
echo Both PROD_BUILD and TEST_BUILD defined!!
|
||||
exit
|
||||
|
||||
if $(defined PROD_BUILD)
|
||||
CCFLAGS += -DUSE_PROD_KEY -DBUILD_FOR_PROD_BGS
|
||||
TARGET_NAME = $(TARGET_PROGRAM)
|
||||
TARGET_PROGRAM = $(TARGET_PROGRAM)_prod
|
||||
export
|
||||
|
||||
elseif $(defined TEST_BUILD)
|
||||
CCFLAGS += -DUSE_PROD_KEY -DBUILD_FOR_TEST_BGS
|
||||
TARGET_NAME = $(TARGET_PROGRAM)
|
||||
TARGET_PROGRAM = $(TARGET_PROGRAM)_test
|
||||
export
|
||||
else
|
||||
TARGET_NAME = $(TARGET_PROGRAM)
|
||||
if $(defined TARGET_PROGRAM)
|
||||
if $(defined PROD_BUILD)
|
||||
CCFLAGS += -DUSE_PROD_KEY -DBUILD_FOR_PROD_BGS
|
||||
TARGET_NAME = $(TARGET_PROGRAM)
|
||||
TARGET_PROGRAM = $(TARGET_PROGRAM)_prod
|
||||
export
|
||||
elseif $(defined TEST_BUILD)
|
||||
CCFLAGS += -DUSE_PROD_KEY -DBUILD_FOR_TEST_BGS
|
||||
TARGET_NAME = $(TARGET_PROGRAM)
|
||||
TARGET_PROGRAM = $(TARGET_PROGRAM)_test
|
||||
export
|
||||
else
|
||||
TARGET_NAME = $(TARGET_PROGRAM)
|
||||
export
|
||||
export
|
||||
@ -38,7 +38,7 @@ u64 s_FriendCode;
|
||||
u8 s_BatteryRemain;
|
||||
std::string s_AdapterState;
|
||||
u8 s_Progress;
|
||||
::std::vector<std::string>* s_OperationMessage;
|
||||
OperationMessage* s_OperationMessage;
|
||||
bool s_ReadFriendCode;
|
||||
|
||||
}
|
||||
@ -64,6 +64,7 @@ u32 GetRenderTarget(u32 target, bool flip)
|
||||
|
||||
void SetTextWriterCore()
|
||||
{
|
||||
GetTextWriter()->SetTextColor(nn::util::Color8(255, 255, 255, 255));
|
||||
GetTextWriter()->Print("\n");
|
||||
|
||||
GetTextWriter()->Printf("System Ver. %d.%d.%d-%d\n", s_CupMajor, s_CupMinor, s_CupMicro, s_NupMajor);
|
||||
@ -83,10 +84,10 @@ void SetTextWriterCore()
|
||||
GetTextWriter()->Printf("Progress %02d%%\n", s_Progress);
|
||||
GetTextWriter()->Print("\n");
|
||||
|
||||
::std::vector<std::string>::iterator it;
|
||||
for (it = s_OperationMessage->begin(); it != s_OperationMessage->end(); it++)
|
||||
for (u32 i = 0; i < s_OperationMessage->GetSize(); i++)
|
||||
{
|
||||
GetTextWriter()->Printf("%s\n", it->c_str());
|
||||
GetTextWriter()->SetTextColor(s_OperationMessage->At(i).color);
|
||||
GetTextWriter()->Printf("%s\n", s_OperationMessage->At(i).str.c_str());
|
||||
}
|
||||
|
||||
|
||||
@ -111,7 +112,7 @@ void DrawSystemState
|
||||
bool isProcessSucceeded,
|
||||
bool isProcessWarning,
|
||||
char8* macAddress,
|
||||
::std::vector<std::string>& operationMessage,
|
||||
OperationMessage& operationMessage,
|
||||
nn::cfg::CTR::CfgRegionCode region,
|
||||
u8* serialNo,
|
||||
bool readFriendCode
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "common_Types.h"
|
||||
#include "OperationMessage.h"
|
||||
|
||||
// 描画色の定義
|
||||
#define WHITE_COLOR 1.f, 1.f, 1.f, 1.f
|
||||
@ -70,7 +71,7 @@ void DrawSystemState
|
||||
bool isProcessSucceeded,
|
||||
bool isProcessWarning,
|
||||
char8* macAddress,
|
||||
::std::vector<std::string>& operationMessage,
|
||||
OperationMessage& operationMessage,
|
||||
nn::cfg::CTR::CfgRegionCode region,
|
||||
u8* s_SerialNo,
|
||||
bool readFriendCode
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: Horizon
|
||||
File: OperationMessage.cpp
|
||||
|
||||
Copyright 2009-2011 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Rev$
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "OperationMessage.h"
|
||||
|
||||
namespace common
|
||||
{
|
||||
|
||||
OperationMessage::OperationMessage()
|
||||
{
|
||||
// TODO 自動生成されたコンストラクター・スタブ
|
||||
|
||||
}
|
||||
|
||||
OperationMessage::~OperationMessage()
|
||||
{
|
||||
// TODO Auto-generated destructor stub
|
||||
}
|
||||
|
||||
void OperationMessage::Add(const char *message)
|
||||
{
|
||||
ColorString cs;
|
||||
cs.str = std::string(message);
|
||||
m_ColorString.push_back(cs);
|
||||
}
|
||||
|
||||
|
||||
void OperationMessage::Add(const char *message, nn::util::Color8 color)
|
||||
{
|
||||
ColorString cs;
|
||||
cs.str = std::string(message);
|
||||
cs.color = color;
|
||||
m_ColorString.push_back(cs);
|
||||
}
|
||||
|
||||
|
||||
size_t OperationMessage::GetSize()
|
||||
{
|
||||
return m_ColorString.size();
|
||||
}
|
||||
|
||||
|
||||
ColorString OperationMessage::At(size_t index)
|
||||
{
|
||||
return m_ColorString.at(index);
|
||||
}
|
||||
|
||||
|
||||
} /* namespace common */
|
||||
51
trunk/ConsoleDataMigration/sources/common/OperationMessage.h
Normal file
51
trunk/ConsoleDataMigration/sources/common/OperationMessage.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
Project: Horizon
|
||||
File: OperationMessage.h
|
||||
|
||||
Copyright 2009-2011 Nintendo. All rights reserved.
|
||||
|
||||
These coded instructions, statements, and computer programs contain
|
||||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||
Company Ltd., and are protected by Federal copyright law. They may
|
||||
not be disclosed to third parties or copied or duplicated in any form,
|
||||
in whole or in part, without the prior written consent of Nintendo.
|
||||
|
||||
$Rev$
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef OPERATIONMESSAGE_H_
|
||||
#define OPERATIONMESSAGE_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <nn/util/util_Color.h>
|
||||
|
||||
namespace common
|
||||
{
|
||||
|
||||
struct ColorString
|
||||
{
|
||||
std::string str;
|
||||
nn::util::Color8 color;
|
||||
};
|
||||
|
||||
class OperationMessage
|
||||
{
|
||||
public:
|
||||
OperationMessage();
|
||||
virtual ~OperationMessage();
|
||||
|
||||
void Add(const char* message);
|
||||
void Add(const char* message, nn::util::Color8 color);
|
||||
|
||||
size_t GetSize();
|
||||
ColorString At(size_t index);
|
||||
|
||||
private:
|
||||
std::vector<ColorString> m_ColorString;
|
||||
|
||||
|
||||
};
|
||||
|
||||
} /* namespace common */
|
||||
#endif /* OPERATIONMESSAGE_H_ */
|
||||
@ -324,9 +324,6 @@ DrawAscii(
|
||||
pDrawer->BuildTextCommand(&s_TextWriter);
|
||||
|
||||
|
||||
// 文字の色は、文字列の描画コマンドを再作成しなくても変更できます。
|
||||
s_TextWriter.SetTextColor(nn::util::Color8(s_Color, s_Color, s_Color, s_Color));
|
||||
|
||||
pDrawer->DrawBegin();
|
||||
|
||||
SetupTextCamera(pDrawer, width, height);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user