summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2ToolWindow.cpp
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-07-05 19:04:06 +0100
committerAsh Wolf <ninji@wuffs.org>2023-07-05 19:04:06 +0100
commit5e61c1280c15ab9969b94cd360cafd4a11b2dd30 (patch)
tree1fdb60d771c4351b5aa5dcf1a43376c0558625a4 /src/T2DLL/T2ToolWindow.cpp
parentc2efba6907fab934a04959b9bb644cf7141cc955 (diff)
downloadt2win-5e61c1280c15ab9969b94cd360cafd4a11b2dd30.tar.gz
t2win-5e61c1280c15ab9969b94cd360cafd4a11b2dd30.zip
matched T2.exe
Diffstat (limited to '')
-rw-r--r--src/T2DLL/T2ToolWindow.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/T2DLL/T2ToolWindow.cpp b/src/T2DLL/T2ToolWindow.cpp
index 346f1e8..7e65ac6 100644
--- a/src/T2DLL/T2ToolWindow.cpp
+++ b/src/T2DLL/T2ToolWindow.cpp
@@ -1,4 +1,4 @@
-#include "CT2App.h"
+#include "T2.h"
#include "T2DLL.h"
#include "T2ImageObj.h"
#include "T2MainWindow.h"
@@ -140,7 +140,7 @@ afx_msg int T2ToolWindow::OnCreate(LPCREATESTRUCT lpCreateStruct) {
theItem->mToolDef = inToolDef;
unsigned short mask = 1;
- if (mDocument->mViewMode == ViewMode_1)
+ if (mDocument->mViewMode == kOutView)
mask = 2;
if (inSomeMask & mask)
@@ -158,7 +158,7 @@ afx_msg int T2ToolWindow::OnCreate(LPCREATESTRUCT lpCreateStruct) {
}
/*virtual*/ void T2ToolWindow::AddIcon(const char* inName, unsigned short inSomeMask, char* inStr2, T2ToolCallback* inToolCallback) {
- AddIcon(inName, inStr2, 0, 0, NULL, 0, inSomeMask, inToolCallback);
+ AddIcon(inName, inStr2, 0, kToolOption0, NULL, 0, inSomeMask, inToolCallback);
}
/*virtual*/ void T2ToolWindow::RemoveIcon(const char* inName, unsigned int inValiation) {
@@ -377,7 +377,7 @@ afx_msg int T2ToolWindow::OnCreate(LPCREATESTRUCT lpCreateStruct) {
theToolIconItem->m30 = flag;
if (theToolIconItem->m24) {
- if (theToolIconItem->mOption == 4 || theToolIconItem->mOption == 0) {
+ if (theToolIconItem->mOption == kToolOption4 || theToolIconItem->mOption == kToolOption0) {
_D8[_118] = theToolIconItem;
if (!flag)
oldSelectedItem = theToolIconItem;
@@ -388,7 +388,7 @@ afx_msg int T2ToolWindow::OnCreate(LPCREATESTRUCT lpCreateStruct) {
for (unsigned short what = 1; what < 16; what++) {
if ((what & inMask) && _D8[what]) {
theToolIconItem = _D8[what];
- if (theToolIconItem->mOption == 4 || theToolIconItem->mOption == 0) {
+ if (theToolIconItem->mOption == kToolOption4 || theToolIconItem->mOption == kToolOption0) {
if (theToolIconItem->m30 && !theToolIconItem->m18) {
theToolIconItem->m24 = true;
selectedItem = theToolIconItem;
@@ -401,12 +401,12 @@ afx_msg int T2ToolWindow::OnCreate(LPCREATESTRUCT lpCreateStruct) {
}
}
- if (oldSelectedItem && oldSelectedItem->mOption == 4) {
+ if (oldSelectedItem && oldSelectedItem->mOption == kToolOption4) {
pos = mToolIconList->GetHeadPosition();
while (pos) {
theToolIconItem = mToolIconList->GetNext(pos);
- if (theToolIconItem->m30 && theToolIconItem->mOption == 4 && !theToolIconItem->m18) {
+ if (theToolIconItem->m30 && theToolIconItem->mOption == kToolOption4 && !theToolIconItem->m18) {
theToolIconItem->m24 = true;
selectedItem = theToolIconItem;
oldSelectedItem->m24 = false;
@@ -421,7 +421,7 @@ afx_msg int T2ToolWindow::OnCreate(LPCREATESTRUCT lpCreateStruct) {
while (pos) {
theToolIconItem = mToolIconList->GetNext(pos);
- if (theToolIconItem->m30 && theToolIconItem->mOption == 0) {
+ if (theToolIconItem->m30 && theToolIconItem->mOption == kToolOption0) {
theToolIconItem->m24 = true;
selectedItem = theToolIconItem;
oldSelectedItem->m24 = false;
@@ -608,7 +608,7 @@ afx_msg void T2ToolWindow::OnClose() {
if (!mDocument)
return;
- mDocument->towerDoc_vf198(2);
+ mDocument->towerDoc_vf198(kToolWindow);
}
/*virtual*/ BOOL T2ToolWindow::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) {
@@ -633,7 +633,7 @@ T2ToolIconItem::T2ToolIconItem() {
mPlugin = NULL;
mName = "";
mValiation = 0;
- mOption = 0;
+ mOption = kToolOption0;
mID = -1;
m24 = false;
mEnableCount = 0;