| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685 |
- /*
- ** Command & Conquer Generals(tm)
- ** Copyright 2025 Electronic Arts Inc.
- **
- ** This program is free software: you can redistribute it and/or modify
- ** it under the terms of the GNU General Public License as published by
- ** the Free Software Foundation, either version 3 of the License, or
- ** (at your option) any later version.
- **
- ** This program is distributed in the hope that it will be useful,
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ** GNU General Public License for more details.
- **
- ** You should have received a copy of the GNU General Public License
- ** along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- /***********************************************************************************************
- *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
- ***********************************************************************************************
- * *
- * Project Name : Max2W3d *
- * *
- * $Archive:: /Commando/Code/Tools/max2w3d/GameMtlDlg.cpp $*
- * *
- * Author:: Greg Hjelstrom *
- * *
- * $Modtime:: 12/07/00 5:52p $*
- * *
- * $Revision:: 12 $*
- * *
- *---------------------------------------------------------------------------------------------*
- * Functions: *
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
- #include <Max.h>
- #include <gport.h>
- #include <hsv.h>
- #include <bmmlib.h>
- #include "GameMtlDlg.h"
- #include "GameMtl.h"
- #include "GameMtlPassDlg.h"
- #include "dllmain.h"
- #include "resource.h"
- #include "w3d_file.h"
- static BOOL CALLBACK DisplacementMapDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara,LPARAM lParam);
- static BOOL CALLBACK SurfaceTypePanelDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara,LPARAM lParam);
- static BOOL CALLBACK PassCountPanelDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara,LPARAM lParam);
- static BOOL CALLBACK PassCountDialogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,LPARAM lParam);
- static int _Pass_Index_To_Flag[] =
- {
- GAMEMTL_PASS0_ROLLUP_OPEN,
- GAMEMTL_PASS1_ROLLUP_OPEN,
- GAMEMTL_PASS2_ROLLUP_OPEN,
- GAMEMTL_PASS3_ROLLUP_OPEN,
- };
- /***********************************************************************************************
- * GameMtlDlg::GameMtlDlg -- constructor *
- * *
- * INPUT: *
- * hwMtlEdit - windows handle of the MAX material editor *
- * imp - Interface object for MAX materials and textures *
- * m - pointer to a GameMtl to be edited *
- * *
- * OUTPUT: *
- * *
- * WARNINGS: *
- * *
- * HISTORY: *
- * 06/26/1997 GH : Created. *
- *=============================================================================================*/
- GameMtlDlg::GameMtlDlg(HWND hwMtlEdit, IMtlParams *imp, GameMtl *m)
- {
- HwndEdit = hwMtlEdit;
- HwndPassCount = NULL;
- HwndSurfaceType = NULL;
- HwndDisplacementMap = NULL;
- HpalOld = NULL;
- for (int i=0; i<MAX_PASSES; i++) {
- PassDialog[i] = NULL;
- }
- TheMtl = m;
- IParams = imp;
- IsActive = 0;
- Build_Dialog();
- }
- /***********************************************************************************************
- * GameMtlDlg::~GameMtlDlg -- destructor! *
- * *
- * INPUT: *
- * *
- * OUTPUT: *
- * *
- * WARNINGS: *
- * *
- * HISTORY: *
- * 06/26/1997 GH : Created. *
- *=============================================================================================*/
- GameMtlDlg::~GameMtlDlg()
- {
-
- if (HwndPassCount) {
- HDC hdc = GetDC(HwndPassCount);
- GetGPort()->RestorePalette(hdc, HpalOld);
- ReleaseDC(HwndPassCount,hdc);
- }
-
- #ifdef WANT_DISPLACEMENT_MAPS
- TheMtl->Set_Flag(GAMEMTL_DISPLACEMENT_ROLLUP_OPEN,IParams->IsRollupPanelOpen(HwndDisplacementMap));
- #endif //WANT_DISPLACEMENT_MAPS
- TheMtl->Set_Flag(GAMEMTL_SURFACE_ROLLUP_OPEN,IParams->IsRollupPanelOpen(HwndSurfaceType));
- TheMtl->Set_Flag(GAMEMTL_PASSCOUNT_ROLLUP_OPEN,IParams->IsRollupPanelOpen(HwndPassCount));
- TheMtl->RollScroll = IParams->GetRollupScrollPos();
- IParams->UnRegisterDlgWnd(HwndSurfaceType);
- IParams->DeleteRollupPage(HwndSurfaceType);
- HwndSurfaceType = NULL;
- #ifdef WANT_DISPLACEMENT_MAPS
- IParams->UnRegisterDlgWnd(HwndDisplacementMap);
- IParams->DeleteRollupPage(HwndDisplacementMap);
- HwndDisplacementMap = NULL;
- #endif //#ifdef WANT_DISPLACEMENT_MAPS
- IParams->UnRegisterDlgWnd(HwndPassCount);
- IParams->DeleteRollupPage(HwndPassCount);
- HwndPassCount = NULL;
- for (int i=0; i<MAX_PASSES; i++) {
- if (PassDialog[i]) {
- delete PassDialog[i];
- }
- }
- TheMtl->SetParamDlg(NULL);
- }
- /***********************************************************************************************
- * GameMtlDlg::ClassID -- Returns the ClassID of GameMtl *
- * *
- * INPUT: *
- * *
- * OUTPUT: *
- * *
- * WARNINGS: *
- * *
- * HISTORY: *
- * 06/26/1997 GH : Created. *
- *=============================================================================================*/
- Class_ID GameMtlDlg::ClassID()
- {
- return GameMaterialClassID;
- }
- /***********************************************************************************************
- * GameMtlDlg::SetThing -- Sets the material to be edited *
- * *
- * INPUT: *
- * *
- * OUTPUT: *
- * *
- * WARNINGS: *
- * *
- * HISTORY: *
- * 06/26/1997 GH : Created. *
- *=============================================================================================*/
- void GameMtlDlg::SetThing(ReferenceTarget *m)
- {
- assert (m);
- assert (m->SuperClassID()==MATERIAL_CLASS_ID);
- assert ((m->ClassID()==GameMaterialClassID) || (m->ClassID()==PS2GameMaterialClassID));
- assert (TheMtl);
- int pass;
- // destroy our old pass dialogs
- for (pass=0; pass<TheMtl->Get_Pass_Count();pass++) {
- delete PassDialog[pass];
- PassDialog[pass] = NULL;
- }
- // install the new material
- TheMtl->SetParamDlg(NULL);
- TheMtl = (GameMtl *)m;
- TheMtl->SetParamDlg(this);
- // build a new set of pass dialogs
- for (pass=0; pass<TheMtl->Get_Pass_Count(); pass++) {
- PassDialog[pass] = new GameMtlPassDlg(HwndEdit, IParams, TheMtl, pass);
- }
- // refresh the contents of the dialogs
- ReloadDialog();
- }
- /***********************************************************************************************
- * GameMtlDlg::SetTime -- Sets the time value, updates the material and the dialog *
- * *
- * INPUT: *
- * *
- * OUTPUT: *
- * *
- * WARNINGS: *
- * *
- * HISTORY: *
- * 06/26/1997 GH : Created. *
- *=============================================================================================*/
- void GameMtlDlg::SetTime(TimeValue t)
- {
- if (t!=CurTime) {
- CurTime = t;
- // TheMtl->Update(IParams->GetTime(),Valid);
- ReloadDialog();
- }
- }
-
- /***********************************************************************************************
- * GameMtlDlg::ReloadDialog -- Updates the values in all of the dialog's controls *
- * *
- * INPUT: *
- * *
- * OUTPUT: *
- * *
- * WARNINGS: *
- * *
- * HISTORY: *
- * 06/26/1997 GH : Created. *
- *=============================================================================================*/
- void GameMtlDlg::ReloadDialog()
- {
- /*
- ** Init the pass count panel
- */
- assert(TheMtl && HwndPassCount && HwndSurfaceType);
- /*
- ** Init the surface count panel
- */
- ::SendMessage (HwndSurfaceType, WM_USER+101, 0, 0L);
-
- #ifdef WANT_DISPLACEMENT_MAPS
- ::SendMessage (HwndDisplacementMap, WM_USER+101, 0, 0L);
- #endif //WANT_DISPLACEMENT_MAPS
- /*
- ** Init the pass count panel
- */
- char a[10];
- sprintf(a, "%d", TheMtl->Get_Pass_Count());
- SetWindowText(GetDlgItem(HwndPassCount, IDC_GAMEMTL_PASSCOUNT_STATIC), a);
- /*
- ** Init each pass panel
- */
- for(int i = 0; i < TheMtl->Get_Pass_Count(); i++)
- {
- PassDialog[i]->ReloadDialog();
- }
- }
- /***********************************************************************************************
- * GameMtlDlg::ActivateDlg -- Activates and deactivates the dialog *
- * *
- * INPUT: *
- * *
- * OUTPUT: *
- * *
- * WARNINGS: *
- * *
- * HISTORY: *
- * 06/26/1997 GH : Created. *
- *=============================================================================================*/
- void GameMtlDlg::ActivateDlg(BOOL onoff)
- {
- for(int i = 0; i < TheMtl->Get_Pass_Count(); i++)
- {
- assert(PassDialog[i]);
- PassDialog[i]->ActivateDlg(onoff);
- }
- }
- /***********************************************************************************************
- * GameMtlDlg::Invalidate -- causes the dialog to be redrawn *
- * *
- * INPUT: *
- * *
- * OUTPUT: *
- * *
- * WARNINGS: *
- * *
- * HISTORY: *
- * 06/26/1997 GH : Created. *
- *=============================================================================================*/
- void GameMtlDlg::Invalidate()
- {
- InvalidateRect(HwndSurfaceType,NULL,0);
- #ifdef WANT_DISPLACEMENT_MAPS
- InvalidateRect(HwndDisplacementMap,NULL,0);
- #endif //WANT_DISPLACEMENT_MAPS
- InvalidateRect(HwndPassCount,NULL,0);
- }
- BOOL GameMtlDlg::DisplacementMapProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
- {
- switch (message)
- {
-
- case WM_INITDIALOG:
- //SetupIntSpinner(hDlg, IDC_AMOUNT_SPIN, IDC_AMOUNT_EDIT, -999, 999, 0);
- /* no break */
-
- case WM_USER + 101:
- {
- SetDlgItemInt (hDlg, IDC_AMOUNT_EDIT, TheMtl->Get_Displacement_Amount () * 100, TRUE);
- SetupIntSpinner(hDlg, IDC_AMOUNT_SPIN, IDC_AMOUNT_EDIT, -999, 999, TheMtl->Get_Displacement_Amount () * 100);
- Texmap *map = TheMtl->Get_Displacement_Map ();
- if (map != NULL) {
- SetDlgItemText (hDlg, IDC_TEXTURE_BUTTON, map->GetFullName ());
- }
- }
- break;
- case CC_SPINNER_CHANGE:
- {
- ISpinnerControl *control = (ISpinnerControl *)lParam;
- TheMtl->Set_Displacement_Amount (((float)control->GetIVal ()) / 100.0F);
- }
- break;
- case WM_COMMAND:
- switch(LOWORD(wParam))
- {
- case IDC_TEXTURE_BUTTON:
- if(HIWORD(wParam) == BN_CLICKED)
- {
- PostMessage(HwndEdit, WM_TEXMAP_BUTTON, TheMtl->Get_Displacement_Map_Index (), (LPARAM)TheMtl);
- }
- }
- break;
- }
- return FALSE;
- }
- BOOL GameMtlDlg::SurfaceTypeProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
- {
- switch (message)
- {
-
- case WM_INITDIALOG:
- {
- //
- // Fill the combobox with the names of the different surface types
- //
- for (int index = 0; index < SURFACE_TYPE_MAX; index ++) {
- ::SendDlgItemMessage ( hDlg,
- IDC_SURFACE_TYPE_COMBO,
- CB_ADDSTRING,
- 0,
- (LPARAM)SURFACE_TYPE_STRINGS[index]);
- }
- //
- // Limit the range of the static sort level spinner to 0 - MAX_SORT_LEVEL.
- //
- int sort_level = TheMtl->Get_Sort_Level();
- SetupIntSpinner(hDlg, IDC_SORT_LEVEL_SPIN, IDC_SORT_LEVEL, 0, MAX_SORT_LEVEL, sort_level);
- // Check the checkbox if sort_level is not SORT_LEVEL_NONE.
- ::SendDlgItemMessage(hDlg, IDC_ENABLE_SORT_LEVEL, BM_SETCHECK,
- sort_level == SORT_LEVEL_NONE ? BST_UNCHECKED : BST_CHECKED, 0);
- }
-
- case WM_USER + 101:
- {
- //
- // Select the current surface type
- //
- ::SendDlgItemMessage ( hDlg,
- IDC_SURFACE_TYPE_COMBO,
- CB_SETCURSEL,
- (WPARAM)TheMtl->Get_Surface_Type (),
- 0L);
- //
- // Set the correct sort level
- //
- int sort_level = TheMtl->Get_Sort_Level();
- ISpinnerControl *spinner = GetISpinner(::GetDlgItem(hDlg, IDC_SORT_LEVEL_SPIN));
- assert(spinner);
- spinner->SetValue(sort_level, FALSE);
- ::SendDlgItemMessage(hDlg, IDC_ENABLE_SORT_LEVEL, BM_SETCHECK,
- sort_level == SORT_LEVEL_NONE ? BST_UNCHECKED : BST_CHECKED, 0);
- break;
- }
- case WM_COMMAND:
- {
- switch(LOWORD(wParam))
- {
- case IDC_SURFACE_TYPE_COMBO:
- if(HIWORD(wParam) == CBN_SELCHANGE)
- {
- unsigned int type = ::SendDlgItemMessage (hDlg, IDC_SURFACE_TYPE_COMBO, CB_GETCURSEL, 0, 0L);
- TheMtl->Set_Surface_Type (type);
- }
- break;
- case IDC_ENABLE_SORT_LEVEL:
- if (HIWORD(wParam) == BN_CLICKED)
- {
- // If the 'enable' checkbox was unchecked, set the sort level to NONE.
- int state = ::IsDlgButtonChecked(hDlg, IDC_ENABLE_SORT_LEVEL);
- ISpinnerControl *spinner = GetISpinner(::GetDlgItem(hDlg, IDC_SORT_LEVEL_SPIN));
- assert(spinner);
- if (state == BST_UNCHECKED)
- {
- spinner->SetValue(SORT_LEVEL_NONE, FALSE);
- TheMtl->Set_Sort_Level(SORT_LEVEL_NONE);
- }
- else if (state == BST_CHECKED)
- {
- // Sort level was enabled, so set it's level to 1 if it was NONE before.
- if (spinner->GetIVal() == SORT_LEVEL_NONE)
- {
- spinner->SetValue(1, FALSE);
- TheMtl->Set_Sort_Level(1);
- }
- }
- }
- }
- break;
- }
- case CC_SPINNER_CHANGE:
- {
- ISpinnerControl *spinner = (ISpinnerControl*)lParam;
- switch(LOWORD(wParam))
- {
- case IDC_SORT_LEVEL_SPIN:
- // Check the 'enabled' checkbox if sort level != SORT_LEVEL_NONE, uncheck it otherwise.
- ::SendDlgItemMessage(hDlg, IDC_ENABLE_SORT_LEVEL, BM_SETCHECK,
- spinner->GetIVal() == SORT_LEVEL_NONE ? BST_UNCHECKED : BST_CHECKED, 0);
- TheMtl->Set_Sort_Level(spinner->GetIVal());
- break;
- }
- break;
- }
- }
- return FALSE;
- }
- BOOL GameMtlDlg::PassCountProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
- {
- switch (message)
- {
- case WM_INITDIALOG:
- break;
- case WM_COMMAND:
- switch(LOWORD(wParam))
- {
- case IDC_SETPASSCOUNT:
- if(HIWORD(wParam) == BN_CLICKED)
- {
- Set_Pass_Count_Dialog();
- }
- }
- break;
- }
- return FALSE;
- }
- static BOOL CALLBACK DisplacementMapDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,LPARAM lParam)
- {
- GameMtlDlg * theDlg;
- if (msg == WM_INITDIALOG) {
- theDlg = (GameMtlDlg*)lParam;
- theDlg->HwndDisplacementMap = hwndDlg;
- SetWindowLong(hwndDlg, GWL_USERDATA,lParam);
- } else {
- if ((theDlg = (GameMtlDlg *)GetWindowLong(hwndDlg, GWL_USERDATA) ) == NULL) {
- return FALSE;
- }
- }
- theDlg->IsActive = 1;
- BOOL res = theDlg->DisplacementMapProc(hwndDlg,msg,wParam,lParam);
- theDlg->IsActive = 0;
- return res;
- }
- static BOOL CALLBACK SurfaceTypePanelDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,LPARAM lParam)
- {
- GameMtlDlg * theDlg;
- if (msg == WM_INITDIALOG) {
- theDlg = (GameMtlDlg*)lParam;
- theDlg->HwndSurfaceType = hwndDlg;
- SetWindowLong(hwndDlg, GWL_USERDATA,lParam);
- } else {
- if ((theDlg = (GameMtlDlg *)GetWindowLong(hwndDlg, GWL_USERDATA) ) == NULL) {
- return FALSE;
- }
- }
- theDlg->IsActive = 1;
- BOOL res = theDlg->SurfaceTypeProc(hwndDlg,msg,wParam,lParam);
- theDlg->IsActive = 0;
- return res;
- }
- static BOOL CALLBACK PassCountPanelDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,LPARAM lParam)
- {
- GameMtlDlg * theDlg;
- if (msg == WM_INITDIALOG) {
- theDlg = (GameMtlDlg*)lParam;
- theDlg->HwndPassCount = hwndDlg;
- SetWindowLong(hwndDlg, GWL_USERDATA,lParam);
- } else {
- if ((theDlg = (GameMtlDlg *)GetWindowLong(hwndDlg, GWL_USERDATA) ) == NULL) {
- return FALSE;
- }
- }
- theDlg->IsActive = 1;
- BOOL res = theDlg->PassCountProc(hwndDlg,msg,wParam,lParam);
- theDlg->IsActive = 0;
- return res;
- }
- void GameMtlDlg::Set_Pass_Count_Dialog(void)
- {
- int res = DialogBoxParam(
- AppInstance,
- MAKEINTRESOURCE(IDD_GAMEMTL_PASS_COUNT_DIALOG),
- HwndPassCount,
- PassCountDialogDlgProc,
- (LPARAM)TheMtl->Get_Pass_Count());
- if (res>=0)
- {
- if (res<=0) res = 1;
- if (res>4) res = 4;
- char a[10];
- sprintf(a, "%d", res);
- SetWindowText(GetDlgItem(HwndPassCount, IDC_GAMEMTL_PASSCOUNT_STATIC), a);
- if(TheMtl->Get_Pass_Count() != res)
- {
- for(int i = 0; i < TheMtl->Get_Pass_Count(); i++)
- {
- delete PassDialog[i];
- PassDialog[i] = NULL;
- }
- TheMtl->Set_Pass_Count(res);
- for(i = 0; i < TheMtl->Get_Pass_Count(); i++)
- {
- PassDialog[i] = new GameMtlPassDlg(HwndEdit, IParams, TheMtl, i);
- }
- ReloadDialog();
- }
- }
- }
- static BOOL CALLBACK PassCountDialogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,LPARAM lParam)
- {
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- ISpinnerControl *spin = SetupIntSpinner(
- hwndDlg,IDC_PASSCOUNT_SPIN, IDC_PASSCOUNT_EDIT,
- 1,4,(int)lParam);
- ReleaseISpinner(spin);
- CenterWindow(hwndDlg,GetParent(hwndDlg));
- break;
- }
- case WM_COMMAND:
- switch (LOWORD(wParam))
- {
- case IDOK:
- {
- ISpinnerControl *spin = GetISpinner(GetDlgItem(hwndDlg,IDC_PASSCOUNT_SPIN));
- EndDialog(hwndDlg,spin->GetIVal());
- ReleaseISpinner(spin);
- break;
- }
- case IDCANCEL:
- EndDialog(hwndDlg,-1);
- break;
- }
- break;
- default:
- return FALSE;
- }
- return TRUE;
- }
- /***********************************************************************************************
- * GameMtlDlg::Build_Dialog -- Adds the dialog to the material editor *
- * *
- * INPUT: *
- * *
- * OUTPUT: *
- * *
- * WARNINGS: *
- * *
- * HISTORY: *
- * 06/26/1997 GH : Created. *
- *=============================================================================================*/
- void GameMtlDlg::Build_Dialog()
- {
- if ((TheMtl->Flags&(GAMEMTL_ROLLUP_FLAGS))==0) {
- TheMtl->Set_Flag(GAMEMTL_PASS0_ROLLUP_OPEN,TRUE);
- }
- HwndSurfaceType = IParams->AddRollupPage(
- AppInstance,
- MAKEINTRESOURCE(IDD_GAMEMTL_SURFACE_TYPE),
- SurfaceTypePanelDlgProc,
- Get_String(IDS_SURFACE_TYPE),
- (LPARAM)this,
- TheMtl->Get_Flag(GAMEMTL_SURFACE_ROLLUP_OPEN) ? 0:APPENDROLL_CLOSED
- );
- #ifdef WANT_DISPLACEMENT_MAPS
- HwndDisplacementMap = IParams->AddRollupPage(
- AppInstance,
- MAKEINTRESOURCE(IDD_GAMEMTL_DISPLACEMENT_MAP),
- DisplacementMapDlgProc,
- Get_String(IDS_DISPLACEMENT_MAP),
- (LPARAM)this,
- TheMtl->Get_Flag(GAMEMTL_DISPLACEMENT_ROLLUP_OPEN) ? 0:APPENDROLL_CLOSED
- );
- #endif //WANT_DISPLACEMENT_MAPS
- HwndPassCount = IParams->AddRollupPage(
- AppInstance,
- MAKEINTRESOURCE(IDD_GAMEMTL_PASS_COUNT),
- PassCountPanelDlgProc,
- Get_String(IDS_PASS_COUNT),
- (LPARAM)this,
- TheMtl->Get_Flag(GAMEMTL_PASSCOUNT_ROLLUP_OPEN) ? 0:APPENDROLL_CLOSED
- );
- for (int i=0; i<TheMtl->Get_Pass_Count(); i++) {
- PassDialog[i] = new GameMtlPassDlg(HwndEdit, IParams, TheMtl, i);
- }
- IParams->SetRollupScrollPos(TheMtl->RollScroll);
- ReloadDialog();
- }
|