summaryrefslogtreecommitdiff
path: root/src/T2CtrlPalette.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/T2CtrlPalette.cpp')
-rw-r--r--src/T2CtrlPalette.cpp66
1 files changed, 35 insertions, 31 deletions
diff --git a/src/T2CtrlPalette.cpp b/src/T2CtrlPalette.cpp
index ee01d9a..d751a9c 100644
--- a/src/T2CtrlPalette.cpp
+++ b/src/T2CtrlPalette.cpp
@@ -4,19 +4,25 @@
#include "T2TowerDoc.h"
#include "T2WorldDef.h"
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
// T2.exe 44795C
/*static*/ int T2CtrlPalette::sUnknown = 0;
T2CtrlPalette::T2CtrlPalette() {
#line 19
- mPauseControl = DEBUG_NEW T2MWControl;
- mInViewControl = DEBUG_NEW T2MWControl;
- mOutViewControl = DEBUG_NEW T2MWControl;
- mMaintControl = DEBUG_NEW T2MWControl;
- mEvalControl = DEBUG_NEW T2MWControl;
- mTransControl = DEBUG_NEW T2MWControl;
- mPriceControl = DEBUG_NEW T2MWControl;
- mSliderControl = DEBUG_NEW T2MWControl;
+ mPauseControl = new T2MWControl;
+ mInViewControl = new T2MWControl;
+ mOutViewControl = new T2MWControl;
+ mMaintControl = new T2MWControl;
+ mEvalControl = new T2MWControl;
+ mTransControl = new T2MWControl;
+ mPriceControl = new T2MWControl;
+ mSliderControl = new T2MWControl;
mDocument = NULL;
mWorldDef = NULL;
@@ -42,7 +48,7 @@ BEGIN_MESSAGE_MAP(T2CtrlPalette, CFrameWnd)
ON_WM_CLOSE()
END_MESSAGE_MAP()
-/*virtual*/ void T2CtrlPalette::Setup(T2TowerDoc *inDoc) {
+/*virtual*/ void T2CtrlPalette::SetDocument(T2TowerDoc *inDoc) {
mDocument = inDoc;
mWorldDef = inDoc->mWorldDef;
@@ -87,7 +93,7 @@ END_MESSAGE_MAP()
InvalidateRect(NULL);
}
-/*virtual*/ void T2CtrlPalette::vf100(int which) {
+/*virtual*/ void T2CtrlPalette::vf100(int inViewMode) {
mInViewControl->SetData(0);
mOutViewControl->SetData(0);
mMaintControl->SetData(0);
@@ -95,30 +101,30 @@ END_MESSAGE_MAP()
mTransControl->SetData(0);
mPriceControl->SetData(0);
- int walkRate = mDocument->towerDoc_vf148();
+ int walkRate = mDocument->GetWalkRate();
if (walkRate == -1)
walkRate = 0;
else
walkRate = 7 - walkRate;
mSliderControl->SetData(walkRate);
- switch (which) {
- case 0:
+ switch (inViewMode) {
+ case kInView:
mInViewControl->SetData(100);
break;
- case 1:
+ case kOutView:
mOutViewControl->SetData(100);
break;
- case 4:
+ case kMaintView:
mMaintControl->SetData(100);
break;
- case 2:
+ case kEvalView:
mEvalControl->SetData(100);
break;
- case 5:
+ case kTransView:
mTransControl->SetData(100);
break;
- case 3:
+ case kPriceView:
mPriceControl->SetData(100);
break;
}
@@ -126,34 +132,35 @@ END_MESSAGE_MAP()
InvalidateRect(NULL);
}
-/*virtual*/ void T2CtrlPalette::vf104(int which) {
+/*virtual*/ void T2CtrlPalette::vf104(int inViewMode) {
+#pragma var_order(windowRect, y, clientRect, flag)
RECT windowRect;
RECT clientRect;
int flag = 0;
int y;
- switch (which) {
- case 0:
- case 6:
+ switch (inViewMode) {
+ case kInView:
+ case ViewMode_6:
y = 0;
break;
- case 1:
+ case kOutView:
y = 0;
flag = 1;
break;
- case 4:
+ case kMaintView:
y = 21;
mE0 = "Maint";
break;
- case 2:
+ case kEvalView:
y = 21;
mE0 = "Eval";
break;
- case 5:
+ case kTransView:
y = 21;
mE0 = "Trans";
break;
- case 3:
+ case kPriceView:
y = 21;
mE0 = "Price";
break;
@@ -226,8 +233,5 @@ afx_msg void T2CtrlPalette::OnClose() {
if (!mDocument)
return;
- mDocument->towerDoc_vf198(kTowerDocWindowType0);
-}
-
-/*virtual*/ void T2CtrlPalette::vf108() {
+ mDocument->towerDoc_vf198(kControlWindow);
}