mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Replaced Windows console with freeware console implementation. Activate in windowed mode with \ Added error and quit if JA2 started in window mode in >16bpp color depth Fix to enemy sector investigation: Was deducting from redshirts when elites investigated Fix AWOL militia (need additional fix to prevent them from being redistributed during after reinforcements) Fix to tanks to add them in their original spot when a new one cannot be found. Should modify to remove old wreckage in this case. AI no longer tries to fire mortar when no room for it Tanks no longer try to throw knives git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1030 3b4a5df2-a311-0410-b5c6-a8a6f20db521
134 lines
3.3 KiB
C++
134 lines
3.3 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Copyright (C) 2001-2004 by Marko Bozikovic
|
|
// All rights reserved
|
|
//
|
|
// 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 2 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, write to the Free Software
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
//
|
|
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
|
// I'll try to keep a version up to date. I can be reached as follows:
|
|
// marko.bozikovic@alterbox.net
|
|
// bozho@kset.org
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// Dialogs.h - dialog classes
|
|
//
|
|
// About dialog class, etc...
|
|
|
|
//#include "stdafx.h"
|
|
#include <Windows.h>
|
|
|
|
#include "resource.h"
|
|
#include "Console.h"
|
|
#include "Dialogs.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
extern HINSTANCE ghInstance;
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// About dialog class
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// Ctor/Dtor
|
|
|
|
CAboutDlg::CAboutDlg(HWND hwndParent)
|
|
: m_hWndParent(hwndParent)
|
|
{
|
|
}
|
|
|
|
|
|
CAboutDlg::~CAboutDlg()
|
|
{
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// public methods
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// DoModal - shows About dialog
|
|
|
|
BOOL CAboutDlg::DoModal()
|
|
{
|
|
::DialogBox(
|
|
ghInstance,
|
|
MAKEINTRESOURCE(IDD_ABOUT),
|
|
m_hWndParent,
|
|
CAboutDlg::DialogProc);
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// message handlers
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// DialogProc - dialog window procedure
|
|
|
|
int CALLBACK CAboutDlg::DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|
{
|
|
switch (uMsg) {
|
|
case WM_INITDIALOG:
|
|
return TRUE;
|
|
|
|
case WM_COMMAND:
|
|
switch (LOWORD(wParam)) {
|
|
case IDOK:
|
|
case IDCANCEL:
|
|
if (HIWORD(wParam) == BN_CLICKED) {
|
|
::EndDialog(hwndDlg, MB_OK);
|
|
return TRUE;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|