summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2BlackOut.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/T2DLL/T2BlackOut.cpp')
-rw-r--r--src/T2DLL/T2BlackOut.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/T2DLL/T2BlackOut.cpp b/src/T2DLL/T2BlackOut.cpp
index c3b69a8..25868ea 100644
--- a/src/T2DLL/T2BlackOut.cpp
+++ b/src/T2DLL/T2BlackOut.cpp
@@ -38,7 +38,7 @@ static int anims[] = {2, 8400, 8401};
if (mConsumptionPower > mSupplyPower) {
mStatus = kBlackOutStatus1;
- T2TowerMainView *theView = inDoc->GetTowerMainView();
+ T2TowerMainView *theView = inDoc->GetMainView();
if (theView) {
inDoc->towerDoc_vf284();
@@ -82,7 +82,7 @@ static int anims[] = {2, 8400, 8401};
/*virtual*/ int T2BlackOut::Exec(T2TowerDoc* inDoc) {
int resultCode = IsExclusive() ? 1 : 0;
- T2DateTime *theNow = inDoc->towerDoc_vf120();
+ T2DateTime *theNow = inDoc->GetNow();
unsigned int theNowMinutes = theNow->GetRawMinutes();
T2TowerMainView *theMainView;
T2TowerMessage *theTowerMsg;
@@ -116,7 +116,7 @@ static int anims[] = {2, 8400, 8401};
case kBlackOutStatus4:
mStatus = kBlackOutStatus0;
- theMainView = inDoc->GetTowerMainView();
+ theMainView = inDoc->GetMainView();
if (theMainView) {
inDoc->towerDoc_vf284();
if (mAttach) {
@@ -152,7 +152,7 @@ void T2BlackOut::AddConsumptionPower(int inPower) {
// "変圧器を増設" - Add a transformer
text += "\x95\xCF\x88\xB3\x8A\xED\x82\xF0\x91\x9D\x90\xDD";
} else {
- CFilePlugin *plugin = theDoc->mTenantPluginsListOther->GetItem('HEND');
+ CFilePlugin *plugin = theDoc->mTenantPlugins->GetItem('HEND');
if (plugin) {
// "変電室を設置" - Install substation room
text += "\x95\xCF\x93\x64\x8E\xBA\x82\xF0\x90\xDD\x92\x75";
@@ -245,15 +245,15 @@ T2BlackOutAttach::~T2BlackOutAttach() {
void T2BlackOutAttach::ExecuteSelf(unsigned int inMessage, void *ioData) {
BOOL newExecuteHost = true;
- if (inMessage == 0x201) {
- int sel = ((T2MainWindow *) AfxGetMainWnd())->mToolWindow->GetSel();
- CString *theToolName = ((T2MainWindow *) AfxGetMainWnd())->mToolWindow->GetIconName(sel);
- T2TemplatePlugin *theDef = ((T2MainWindow *) AfxGetMainWnd())->mToolWindow->GetIconPlugin(sel);
+ if (inMessage == WM_LBUTTONDOWN) {
+ int sel = T2_MAIN_WINDOW->mToolWindow->GetSel();
+ CString *theToolName = T2_MAIN_WINDOW->mToolWindow->GetIconName(sel);
+ T2TemplatePlugin *theDef = T2_MAIN_WINDOW->mToolWindow->GetIconPlugin(sel);
CProgramPlugin *thePlugin = theDef->GetPlugin();
- unsigned int theValiation = ((T2MainWindow *) AfxGetMainWnd())->mToolWindow->GetIconValiation(sel);
- DWORD theOption = ((T2MainWindow *) AfxGetMainWnd())->mToolWindow->GetIconOption(sel);
+ unsigned int theValiation = T2_MAIN_WINDOW->mToolWindow->GetIconValiation(sel);
+ DWORD theOption = T2_MAIN_WINDOW->mToolWindow->GetIconOption(sel);
- if (theOption == 0)
+ if (theOption == kToolOption0)
newExecuteHost = true;
else
newExecuteHost = (thePlugin && thePlugin->GetID() == 'HEND');