- Added actor replacement for DECORATE. This works at a higher level than
using duplicate DoomEdNums and will affect all attempts to spawn the
replaced actor. However, because this happens for all spawns and not just
at map load, the replacing actor must be compatible with the replaced
actor, which means that an actor can only serve as a replacement for one
of its baseclasses. For example, if you want to use a modified imp, you can
use this DECORATE:
actor MyImp : DoomImp replaces DoompImp
{
// Put changed properties here
}
- New: The IWAD dialog now remembers the last IWAD you picked and
automatically highlights it the next time you run the game. This also
applies if you check "Don't ask me this again": The IWAD selected will be
the one that gets automatically loaded, not the one located first. (Using
the -iwad parameter will not change the default IWAD.) In addition, you
can now bring the dialog up even if you disable it by holding down SHIFT
during startup.
- Changed ExtractFilePath() and ExtractFileBase() to return FStrings instead
of writing to a provided output buffer. ExtractFileBase() can also
optionally keep the file's extension in the result.
- Removed the -heapsize parameter entirely. The informational message should
no longer be needed.
- Removed -maxdemo parameter. There's no point to having it around since
the demo buffer grows automatically.
SVN r238 (trunk)
This commit is contained in:
parent
43c1ec4a74
commit
6695e255ce
20 changed files with 449 additions and 307 deletions
|
|
@ -569,7 +569,11 @@ void I_PrintStr (const char *cp, bool lineBreak)
|
|||
char buf[256];
|
||||
int bpos = 0;
|
||||
|
||||
SendMessage (edit, EM_SETSEL, (WPARAM)-1, 0);
|
||||
int selstart, selend;
|
||||
SendMessage (edit, EM_GETSEL, (WPARAM)&selstart, (LPARAM)&selend);
|
||||
|
||||
// SendMessage (edit, EM_SETSEL, (WPARAM)-1, 0);
|
||||
SendMessage (edit, EM_SETSEL, INT_MAX, INT_MAX);
|
||||
|
||||
if (lineBreak && !newLine)
|
||||
{
|
||||
|
|
@ -608,23 +612,35 @@ void I_PrintStr (const char *cp, bool lineBreak)
|
|||
SendMessage (edit, EM_REPLACESEL, FALSE, (LPARAM)buf);
|
||||
newLine = buf[bpos-1] == '\n';
|
||||
}
|
||||
SendMessage (edit, EM_SETSEL, selstart, selend);
|
||||
}
|
||||
|
||||
EXTERN_CVAR (Bool, queryiwad);
|
||||
static WadStuff *WadList;
|
||||
static int NumWads;
|
||||
static int DefaultWad;
|
||||
|
||||
static void SetQueryIWad (HWND dialog)
|
||||
{
|
||||
HWND checkbox = GetDlgItem (dialog, IDC_DONTASKIWAD);
|
||||
int state = SendMessage (checkbox, BM_GETCHECK, 0, 0);
|
||||
bool query = (state != BST_CHECKED);
|
||||
|
||||
queryiwad = (state != BST_CHECKED);
|
||||
if (!query && queryiwad)
|
||||
{
|
||||
MessageBox (dialog,
|
||||
"You have chosen not to show this dialog box in the future.\n"
|
||||
"If you wish to see it again, hold down SHIFT while starting " GAMENAME ".",
|
||||
"Don't ask me this again",
|
||||
MB_OK | MB_ICONINFORMATION);
|
||||
}
|
||||
|
||||
queryiwad = query;
|
||||
}
|
||||
|
||||
BOOL CALLBACK IWADBoxCallback (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
HWND list;
|
||||
HWND ctrl;
|
||||
int i;
|
||||
|
||||
switch (message)
|
||||
|
|
@ -640,7 +656,7 @@ BOOL CALLBACK IWADBoxCallback (HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
|
|||
SetWindowText (hDlg, newlabel.GetChars());
|
||||
}
|
||||
// Populate the list with all the IWADs found
|
||||
list = GetDlgItem (hDlg, IDC_IWADLIST);
|
||||
ctrl = GetDlgItem (hDlg, IDC_IWADLIST);
|
||||
for (i = 0; i < NumWads; i++)
|
||||
{
|
||||
FString work;
|
||||
|
|
@ -650,11 +666,17 @@ BOOL CALLBACK IWADBoxCallback (HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
|
|||
else
|
||||
filepart++;
|
||||
work.Format ("%s (%s)", IWADTypeNames[WadList[i].Type], filepart);
|
||||
SendMessage (list, LB_ADDSTRING, 0, (LPARAM)work.GetChars());
|
||||
SendMessage (list, LB_SETITEMDATA, i, (LPARAM)i);
|
||||
SendMessage (ctrl, LB_ADDSTRING, 0, (LPARAM)work.GetChars());
|
||||
SendMessage (ctrl, LB_SETITEMDATA, i, (LPARAM)i);
|
||||
}
|
||||
SendMessage (list, LB_SETCURSEL, 0, 0);
|
||||
SetFocus (list);
|
||||
SendMessage (ctrl, LB_SETCURSEL, DefaultWad, 0);
|
||||
SetFocus (ctrl);
|
||||
// Set the state of the "Don't ask me again" checkbox
|
||||
ctrl = GetDlgItem (hDlg, IDC_DONTASKIWAD);
|
||||
SendMessage (ctrl, BM_SETCHECK, queryiwad ? BST_UNCHECKED : BST_CHECKED, 0);
|
||||
// Make sure the dialog is in front. If SHIFT was pressed to force it visible,
|
||||
// then the other window will normally be on top.
|
||||
SetForegroundWindow (hDlg);
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
|
|
@ -666,21 +688,26 @@ BOOL CALLBACK IWADBoxCallback (HWND hDlg, UINT message, WPARAM wParam, LPARAM lP
|
|||
(LOWORD(wParam) == IDC_IWADLIST && HIWORD(wParam) == LBN_DBLCLK))
|
||||
{
|
||||
SetQueryIWad (hDlg);
|
||||
list = GetDlgItem (hDlg, IDC_IWADLIST);
|
||||
EndDialog (hDlg, SendMessage (list, LB_GETCURSEL, 0, 0));
|
||||
ctrl = GetDlgItem (hDlg, IDC_IWADLIST);
|
||||
EndDialog (hDlg, SendMessage (ctrl, LB_GETCURSEL, 0, 0));
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int I_PickIWad (WadStuff *wads, int numwads)
|
||||
int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
|
||||
{
|
||||
WadList = wads;
|
||||
NumWads = numwads;
|
||||
if (showwin || GetAsyncKeyState(VK_SHIFT))
|
||||
{
|
||||
WadList = wads;
|
||||
NumWads = numwads;
|
||||
DefaultWad = defaultiwad;
|
||||
|
||||
return DialogBox (g_hInst, MAKEINTRESOURCE(IDD_IWADDIALOG),
|
||||
(HWND)Window, (DLGPROC)IWADBoxCallback);
|
||||
return DialogBox (g_hInst, MAKEINTRESOURCE(IDD_IWADDIALOG),
|
||||
(HWND)Window, (DLGPROC)IWADBoxCallback);
|
||||
}
|
||||
return defaultiwad;
|
||||
}
|
||||
|
||||
void *I_FindFirst (const char *filespec, findstate_t *fileinfo)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue