mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Merged New Inventory Project into main branch
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -32,30 +32,30 @@ extern UINT8 gubCheatLevel;
|
|||||||
|
|
||||||
#ifdef GERMAN
|
#ifdef GERMAN
|
||||||
|
|
||||||
// ATE: remove cheats unless we're doing a debug build
|
// ATE: remove cheats unless we're doing a debug build
|
||||||
//#ifdef JA2TESTVERSION
|
//#ifdef JA2TESTVERSION
|
||||||
#define INFORMATION_CHEAT_LEVEL( ) ( gubCheatLevel >= 5 )
|
#define INFORMATION_CHEAT_LEVEL( ) ( gubCheatLevel >= 5 )
|
||||||
#define CHEATER_CHEAT_LEVEL( ) ( gubCheatLevel >= 6 )
|
#define CHEATER_CHEAT_LEVEL( ) ( gubCheatLevel >= 6 )
|
||||||
#define DEBUG_CHEAT_LEVEL( ) ( gubCheatLevel >= 7 )
|
#define DEBUG_CHEAT_LEVEL( ) ( gubCheatLevel >= 7 )
|
||||||
//#else
|
//#else
|
||||||
// #define INFORMATION_CHEAT_LEVEL( ) ( FALSE )
|
// #define INFORMATION_CHEAT_LEVEL( ) ( FALSE )
|
||||||
// #define CHEATER_CHEAT_LEVEL( ) ( FALSE )
|
// #define CHEATER_CHEAT_LEVEL( ) ( FALSE )
|
||||||
// #define DEBUG_CHEAT_LEVEL( ) ( FALSE )
|
// #define DEBUG_CHEAT_LEVEL( ) ( FALSE )
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
#define RESET_CHEAT_LEVEL( ) ( gubCheatLevel = 0 )
|
#define RESET_CHEAT_LEVEL( ) ( gubCheatLevel = 0 )
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
// ATE: remove cheats unless we're doing a debug build
|
// ATE: remove cheats unless we're doing a debug build
|
||||||
//#ifdef JA2TESTVERSION
|
//#ifdef JA2TESTVERSION
|
||||||
#define INFORMATION_CHEAT_LEVEL( ) ( gubCheatLevel >= 3 )
|
#define INFORMATION_CHEAT_LEVEL( ) ( gubCheatLevel >= 3 )
|
||||||
#define CHEATER_CHEAT_LEVEL( ) ( gubCheatLevel >= 5 )
|
#define CHEATER_CHEAT_LEVEL( ) ( gubCheatLevel >= 5 )
|
||||||
#define DEBUG_CHEAT_LEVEL( ) ( gubCheatLevel >= 6 )
|
#define DEBUG_CHEAT_LEVEL( ) ( gubCheatLevel >= 6 )
|
||||||
//#else
|
//#else
|
||||||
// #define INFORMATION_CHEAT_LEVEL( ) ( FALSE )
|
// #define INFORMATION_CHEAT_LEVEL( ) ( FALSE )
|
||||||
// #define CHEATER_CHEAT_LEVEL( ) ( FALSE )
|
// #define CHEATER_CHEAT_LEVEL( ) ( FALSE )
|
||||||
// #define DEBUG_CHEAT_LEVEL( ) ( FALSE )
|
// #define DEBUG_CHEAT_LEVEL( ) ( FALSE )
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
#define RESET_CHEAT_LEVEL( ) ( gubCheatLevel = 0 )
|
#define RESET_CHEAT_LEVEL( ) ( gubCheatLevel = 0 )
|
||||||
|
|||||||
@@ -9,26 +9,26 @@
|
|||||||
//
|
//
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program; if not, write to the Free Software
|
// along with this program; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
// 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:
|
// I'll try to keep a version up to date. I can be reached as follows:
|
||||||
// marko.bozikovic@alterbox.net
|
// marko.bozikovic@alterbox.net
|
||||||
// bozho@kset.org
|
// bozho@kset.org
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _COMBSTROUT_H_
|
#ifndef _COMBSTROUT_H_
|
||||||
#define _COMBSTROUT_H_
|
#define _COMBSTROUT_H_
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// CComBSTROut - a class that inherits from CComBSTR and adds Out() method
|
// CComBSTROut - a class that inherits from CComBSTR and adds Out() method
|
||||||
// that should be used instead of & operator for 'out'
|
// that should be used instead of & operator for 'out'
|
||||||
// function parameters
|
// function parameters
|
||||||
|
|
||||||
class CComBSTROut : public CComBSTR
|
class CComBSTROut : public CComBSTR
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,17 +9,17 @@
|
|||||||
//
|
//
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program; if not, write to the Free Software
|
// along with this program; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
// 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:
|
// I'll try to keep a version up to date. I can be reached as follows:
|
||||||
// marko.bozikovic@alterbox.net
|
// marko.bozikovic@alterbox.net
|
||||||
// bozho@kset.org
|
// bozho@kset.org
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef _COMVARIANTOUT_H_
|
#ifndef _COMVARIANTOUT_H_
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// CComVariantOut - a class that inherits from CComVariant and adds Out()
|
// CComVariantOut - a class that inherits from CComVariant and adds Out()
|
||||||
// method that should be used instead of & operator for
|
// method that should be used instead of & operator for
|
||||||
// 'out' function parameters
|
// 'out' function parameters
|
||||||
|
|
||||||
class CComVariantOut : public CComVariant
|
class CComVariantOut : public CComVariant
|
||||||
{
|
{
|
||||||
|
|||||||
+29
-28
@@ -9,17 +9,17 @@
|
|||||||
//
|
//
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program; if not, write to the Free Software
|
// along with this program; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
// 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:
|
// I'll try to keep a version up to date. I can be reached as follows:
|
||||||
// marko.bozikovic@alterbox.net
|
// marko.bozikovic@alterbox.net
|
||||||
// bozho@kset.org
|
// bozho@kset.org
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
@@ -658,8 +658,8 @@ void Console::OnVScroll(WPARAM wParam) {
|
|||||||
|
|
||||||
SCROLLINFO si;
|
SCROLLINFO si;
|
||||||
si.cbSize = sizeof(si);
|
si.cbSize = sizeof(si);
|
||||||
si.fMask = SIF_POS;
|
si.fMask = SIF_POS;
|
||||||
si.nPos = nCurrentPos;
|
si.nPos = nCurrentPos;
|
||||||
::FlatSB_SetScrollInfo(m_hWnd, SB_VERT, &si, TRUE);
|
::FlatSB_SetScrollInfo(m_hWnd, SB_VERT, &si, TRUE);
|
||||||
|
|
||||||
// this seems to work/look much better than direct repainting...
|
// this seems to work/look much better than direct repainting...
|
||||||
@@ -1078,7 +1078,7 @@ void Console::OnTrayNotify(WPARAM wParam, LPARAM lParam) {
|
|||||||
::PostMessage(m_hWnd, WM_NULL, 0, 0);
|
::PostMessage(m_hWnd, WM_NULL, 0, 0);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case WM_LBUTTONDOWN:
|
case WM_LBUTTONDOWN:
|
||||||
m_bHideWindow = false;
|
m_bHideWindow = false;
|
||||||
@@ -1882,7 +1882,7 @@ BOOL Console::RegisterWindowClasses() {
|
|||||||
wcx.hIcon = ::LoadIcon(ghInstance, MAKEINTRESOURCE(IDI_ICON2));
|
wcx.hIcon = ::LoadIcon(ghInstance, MAKEINTRESOURCE(IDI_ICON2));
|
||||||
wcx.hCursor = ::LoadCursor(NULL, IDC_ARROW);
|
wcx.hCursor = ::LoadCursor(NULL, IDC_ARROW);
|
||||||
wcx.hbrBackground = ::CreateSolidBrush(RGB(0, 0, 0));
|
wcx.hbrBackground = ::CreateSolidBrush(RGB(0, 0, 0));
|
||||||
wcx.lpszMenuName = NULL;
|
wcx.lpszMenuName = NULL;
|
||||||
wcx.lpszClassName = Console::m_szConsoleClass;
|
wcx.lpszClassName = Console::m_szConsoleClass;
|
||||||
wcx.hIconSm = NULL;
|
wcx.hIconSm = NULL;
|
||||||
|
|
||||||
@@ -2089,7 +2089,6 @@ void Console::CreateNewBrush() {
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void Console::CreateCursor() {
|
void Console::CreateCursor() {
|
||||||
|
|
||||||
switch (m_dwCursorStyle) {
|
switch (m_dwCursorStyle) {
|
||||||
case CURSOR_STYLE_XTERM :
|
case CURSOR_STYLE_XTERM :
|
||||||
m_pCursor = (Cursor*)new XTermCursor(m_hWnd, m_hdcConsole, m_crCursorColor);
|
m_pCursor = (Cursor*)new XTermCursor(m_hWnd, m_hdcConsole, m_crCursorColor);
|
||||||
@@ -2234,7 +2233,7 @@ void Console::CreateBackgroundBitmap() {
|
|||||||
if (m_bTintSet) {
|
if (m_bTintSet) {
|
||||||
|
|
||||||
BYTE* pPixels = image.accessPixels();
|
BYTE* pPixels = image.accessPixels();
|
||||||
BYTE* pPixelsEnd = pPixels + 3*image.getWidth()*image.getHeight();
|
BYTE* pPixelsEnd = pPixels + 3*image.getWidth()*image.getHeight();
|
||||||
BYTE* pPixelSubel = pPixels;
|
BYTE* pPixelSubel = pPixels;
|
||||||
|
|
||||||
while (pPixelSubel < pPixelsEnd) {
|
while (pPixelSubel < pPixelsEnd) {
|
||||||
@@ -2528,7 +2527,7 @@ void Console::CalcWindowSize() {
|
|||||||
m_nWindowWidth = m_nClientWidth + 2 * m_nXBorderSize;
|
m_nWindowWidth = m_nClientWidth + 2 * m_nXBorderSize;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case BORDER_THIN :
|
case BORDER_THIN :
|
||||||
|
|
||||||
@@ -2662,15 +2661,15 @@ void Console::SetWindowSizeAndPosition() {
|
|||||||
|
|
||||||
// set window position
|
// set window position
|
||||||
#if 0
|
#if 0
|
||||||
DWORD dwScreenWidth = ::GetSystemMetrics(g_bWin2000 ? SM_CXVIRTUALSCREEN : SM_CXSCREEN);
|
DWORD dwScreenWidth = ::GetSystemMetrics(g_bWin2000 ? SM_CXVIRTUALSCREEN : SM_CXSCREEN);
|
||||||
DWORD dwScreenHeight = ::GetSystemMetrics(g_bWin2000 ? SM_CYVIRTUALSCREEN : SM_CYSCREEN);
|
DWORD dwScreenHeight = ::GetSystemMetrics(g_bWin2000 ? SM_CYVIRTUALSCREEN : SM_CYSCREEN);
|
||||||
DWORD dwTop = ::GetSystemMetrics(g_bWin2000 ? SM_YVIRTUALSCREEN : 0);
|
DWORD dwTop = ::GetSystemMetrics(g_bWin2000 ? SM_YVIRTUALSCREEN : 0);
|
||||||
DWORD dwLeft = ::GetSystemMetrics(g_bWin2000 ? SM_XVIRTUALSCREEN : 0);
|
DWORD dwLeft = ::GetSystemMetrics(g_bWin2000 ? SM_XVIRTUALSCREEN : 0);
|
||||||
#else
|
#else
|
||||||
DWORD dwScreenWidth = ::GetSystemMetrics(SM_CXSCREEN);
|
DWORD dwScreenWidth = ::GetSystemMetrics(SM_CXSCREEN);
|
||||||
DWORD dwScreenHeight = ::GetSystemMetrics(SM_CYSCREEN);
|
DWORD dwScreenHeight = ::GetSystemMetrics(SM_CYSCREEN);
|
||||||
DWORD dwTop = ::GetSystemMetrics(0);
|
DWORD dwTop = ::GetSystemMetrics(0);
|
||||||
DWORD dwLeft = ::GetSystemMetrics(0);
|
DWORD dwLeft = ::GetSystemMetrics(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch (m_dwDocked) {
|
switch (m_dwDocked) {
|
||||||
@@ -3088,8 +3087,8 @@ void Console::RefreshScreenBuffer() {
|
|||||||
|
|
||||||
SCROLLINFO si;
|
SCROLLINFO si;
|
||||||
si.cbSize = sizeof(si);
|
si.cbSize = sizeof(si);
|
||||||
si.fMask = SIF_POS;
|
si.fMask = SIF_POS;
|
||||||
si.nPos = (int)m_csbiConsole.srWindow.Top;
|
si.nPos = (int)m_csbiConsole.srWindow.Top;
|
||||||
::FlatSB_SetScrollInfo(m_hWnd, SB_VERT, &si, TRUE);
|
::FlatSB_SetScrollInfo(m_hWnd, SB_VERT, &si, TRUE);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@@ -3133,8 +3132,8 @@ void Console::RefreshScreenBuffer() {
|
|||||||
|
|
||||||
if (m_strWinConsoleTitle.compare(0, m_strWinConsoleTitle.length(), strWinConsoleTitle, 0, m_strWinConsoleTitle.length()) == 0) {
|
if (m_strWinConsoleTitle.compare(0, m_strWinConsoleTitle.length(), strWinConsoleTitle, 0, m_strWinConsoleTitle.length()) == 0) {
|
||||||
// 1. Windows console title starts with the original title, just see if
|
// 1. Windows console title starts with the original title, just see if
|
||||||
// windows titles differ, and if they do, update it.
|
// windows titles differ, and if they do, update it.
|
||||||
if ((m_strWindowTitle.length() == 0) &&
|
if ((m_strWindowTitle.length() == 0) &&
|
||||||
(strWinConsoleTitle[m_strWinConsoleTitle.length()] == ' ') &&
|
(strWinConsoleTitle[m_strWinConsoleTitle.length()] == ' ') &&
|
||||||
(strWinConsoleTitle[m_strWinConsoleTitle.length()+1] == '-')) {
|
(strWinConsoleTitle[m_strWinConsoleTitle.length()+1] == '-')) {
|
||||||
|
|
||||||
@@ -3145,8 +3144,8 @@ void Console::RefreshScreenBuffer() {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
// 2. Windows console title is completely changed. To set Console title,
|
// 2. Windows console title is completely changed. To set Console title,
|
||||||
// we need to get Windows console title and concatenate it to our
|
// we need to get Windows console title and concatenate it to our
|
||||||
// original Console title (if it changed since the last update)
|
// original Console title (if it changed since the last update)
|
||||||
if (m_strWindowTitle.length() == 0) {
|
if (m_strWindowTitle.length() == 0) {
|
||||||
strConsoleTitle = strWinConsoleTitle;
|
strConsoleTitle = strWinConsoleTitle;
|
||||||
} else {
|
} else {
|
||||||
@@ -4135,7 +4134,8 @@ void Console::About()
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void Console::SendTextToConsole(const wchar_t *pszText) {
|
void Console::SendTextToConsole(const wchar_t *pszText)
|
||||||
|
{
|
||||||
|
|
||||||
if (!pszText || (wcslen(pszText) == 0)) return;
|
if (!pszText || (wcslen(pszText) == 0)) return;
|
||||||
|
|
||||||
@@ -4357,7 +4357,7 @@ LRESULT CALLBACK Console::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
|
|||||||
|
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
// ::DestroyWindow(myself->m_hWnd);
|
// ::DestroyWindow(myself->m_hWnd);
|
||||||
// Probably want to just hide the window if the X is hit. That way it can continue
|
// Probably want to just hide the window if the X is hit. That way it can continue
|
||||||
// to update on script output
|
// to update on script output
|
||||||
ShowWindow( hwnd, FALSE);
|
ShowWindow( hwnd, FALSE);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -4572,3 +4572,4 @@ BOOL WINAPI Console::CtrlHandler(DWORD dwCtrlType) {
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+6
-6
@@ -9,17 +9,17 @@
|
|||||||
//
|
//
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program; if not, write to the Free Software
|
// along with this program; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
// 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:
|
// I'll try to keep a version up to date. I can be reached as follows:
|
||||||
// marko.bozikovic@alterbox.net
|
// marko.bozikovic@alterbox.net
|
||||||
// bozho@kset.org
|
// bozho@kset.org
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
@@ -441,7 +441,7 @@ class Console {
|
|||||||
// Console window handle
|
// Console window handle
|
||||||
HWND m_hWnd;
|
HWND m_hWnd;
|
||||||
|
|
||||||
HWND m_notifyhWnd;
|
HWND m_notifyhWnd;
|
||||||
|
|
||||||
// console colors
|
// console colors
|
||||||
COLORREF m_arrConsoleColors[16];
|
COLORREF m_arrConsoleColors[16];
|
||||||
|
|||||||
+66
-66
@@ -26,17 +26,17 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||||||
// Dialog
|
// Dialog
|
||||||
//
|
//
|
||||||
|
|
||||||
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 146, 87
|
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 146, 87
|
||||||
STYLE DS_MODALFRAME | DS_NOIDLEMSG | DS_SETFOREGROUND | DS_CENTER | WS_POPUP |
|
STYLE DS_MODALFRAME | DS_NOIDLEMSG | DS_SETFOREGROUND | DS_CENTER | WS_POPUP |
|
||||||
WS_CAPTION | WS_SYSMENU
|
WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "About Console"
|
CAPTION "About Console"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,48,66,50,14
|
DEFPUSHBUTTON "OK",IDOK,48,66,50,14
|
||||||
LTEXT "Console v1.5",IDC_STATIC,51,11,42,8
|
LTEXT "Console v1.5",IDC_STATIC,51,11,42,8
|
||||||
LTEXT "Copyright© 2001-2005 Marko Bozikovic",IDC_STATIC,9,30,
|
LTEXT "Copyright© 2001-2005 Marko Bozikovic",IDC_STATIC,9,30,
|
||||||
127,8
|
127,8
|
||||||
LTEXT "bozho@kset.org",IDC_STATIC,46,45,53,8
|
LTEXT "bozho@kset.org",IDC_STATIC,46,45,53,8
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
@@ -48,17 +48,17 @@ END
|
|||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
GUIDELINES DESIGNINFO DISCARDABLE
|
GUIDELINES DESIGNINFO DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
IDD_ABOUT, DIALOG
|
IDD_ABOUT, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
LEFTMARGIN, 7
|
LEFTMARGIN, 7
|
||||||
RIGHTMARGIN, 139
|
RIGHTMARGIN, 139
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 80
|
BOTTOMMARGIN, 80
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
#endif // Neutral resources
|
#endif // Neutral resources
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT
|
|||||||
|
|
||||||
// Icon with lowest ID value placed first to ensure application icon
|
// Icon with lowest ID value placed first to ensure application icon
|
||||||
// remains consistent on all systems.
|
// remains consistent on all systems.
|
||||||
//IDI_ICON2 ICON DISCARDABLE "Console.ico"
|
//IDI_ICON2 ICON DISCARDABLE "Console.ico"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
@@ -87,26 +87,26 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT
|
|||||||
|
|
||||||
IDR_POPUP_MENU MENU DISCARDABLE
|
IDR_POPUP_MENU MENU DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
POPUP " "
|
POPUP " "
|
||||||
BEGIN
|
BEGIN
|
||||||
// MENUITEM "Read&me", ID_SHOW_README_FILE
|
// MENUITEM "Read&me", ID_SHOW_README_FILE
|
||||||
MENUITEM "&About Console", ID_ABOUT
|
MENUITEM "&About Console", ID_ABOUT
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "&Copy", ID_COPY
|
MENUITEM "&Copy", ID_COPY
|
||||||
MENUITEM "&Paste", ID_PASTE
|
MENUITEM "&Paste", ID_PASTE
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
// MENUITEM "Always on &top", ID_TOGGLE_ONTOP
|
// MENUITEM "Always on &top", ID_TOGGLE_ONTOP
|
||||||
// MENUITEM "&Hide console", ID_HIDE_CONSOLE
|
// MENUITEM "&Hide console", ID_HIDE_CONSOLE
|
||||||
// MENUITEM SEPARATOR
|
// MENUITEM SEPARATOR
|
||||||
// MENUITEM "&Select configuration file", ID_SEL_CONFIG_FILE
|
// MENUITEM "&Select configuration file", ID_SEL_CONFIG_FILE
|
||||||
// MENUITEM "&Edit configuration file", ID_EDIT_CONFIG_FILE
|
// MENUITEM "&Edit configuration file", ID_EDIT_CONFIG_FILE
|
||||||
// MENUITEM "&Reload settings", ID_RELOAD_SETTINGS
|
// MENUITEM "&Reload settings", ID_RELOAD_SETTINGS
|
||||||
// MENUITEM SEPARATOR
|
// MENUITEM SEPARATOR
|
||||||
MENUITEM "E&xit", ID_EXIT_CONSOLE
|
MENUITEM "E&xit", ID_EXIT_CONSOLE
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // Neutral (Default) resources
|
#endif // Neutral (Default) resources
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
@@ -127,22 +127,22 @@ LANGUAGE LANG_CROATIAN, SUBLANG_DEFAULT
|
|||||||
|
|
||||||
1 TEXTINCLUDE DISCARDABLE
|
1 TEXTINCLUDE DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
"resource.h\0"
|
"resource.h\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
2 TEXTINCLUDE DISCARDABLE
|
2 TEXTINCLUDE DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
"#include ""afxres.h""\r\n"
|
"#include ""afxres.h""\r\n"
|
||||||
"\0"
|
"\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
3 TEXTINCLUDE DISCARDABLE
|
3 TEXTINCLUDE DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
"\r\n"
|
"\r\n"
|
||||||
"\0"
|
"\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
#ifndef _MAC
|
#ifndef _MAC
|
||||||
@@ -164,33 +164,33 @@ VS_VERSION_INFO VERSIONINFO
|
|||||||
FILETYPE 0x1L
|
FILETYPE 0x1L
|
||||||
FILESUBTYPE 0x0L
|
FILESUBTYPE 0x0L
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "StringFileInfo"
|
BLOCK "StringFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "000004b0"
|
BLOCK "000004b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Comments", "A cool console window :-)\0"
|
VALUE "Comments", "A cool console window :-)\0"
|
||||||
VALUE "CompanyName", "Ingenuity Unlimited Ltd.\0"
|
VALUE "CompanyName", "Ingenuity Unlimited Ltd.\0"
|
||||||
VALUE "FileDescription", "Console\0"
|
VALUE "FileDescription", "Console\0"
|
||||||
VALUE "FileVersion", "1.5, Build 351 2005.09.22\0"
|
VALUE "FileVersion", "1.5, Build 351 2005.09.22\0"
|
||||||
VALUE "InternalName", "Console\0"
|
VALUE "InternalName", "Console\0"
|
||||||
VALUE "LegalCopyright", "Copyright © 2001-2004 Marko Bozikovic\0"
|
VALUE "LegalCopyright", "Copyright © 2001-2004 Marko Bozikovic\0"
|
||||||
VALUE "LegalTrademarks", "Copyright © 2001-2004 Marko Bozikovic\0"
|
VALUE "LegalTrademarks", "Copyright © 2001-2004 Marko Bozikovic\0"
|
||||||
VALUE "OriginalFilename", "Console.exe\0"
|
VALUE "OriginalFilename", "Console.exe\0"
|
||||||
VALUE "PrivateBuild", "\0"
|
VALUE "PrivateBuild", "\0"
|
||||||
VALUE "ProductName", "Console\0"
|
VALUE "ProductName", "Console\0"
|
||||||
VALUE "ProductVersion", "1.5.00.351\0"
|
VALUE "ProductVersion", "1.5.00.351\0"
|
||||||
VALUE "SpecialBuild", "\0"
|
VALUE "SpecialBuild", "\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "Translation", 0x0, 1200
|
VALUE "Translation", 0x0, 1200
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // !_MAC
|
#endif // !_MAC
|
||||||
|
|
||||||
#endif // Croatian resources
|
#endif // Croatian resources
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
@@ -203,5 +203,5 @@ END
|
|||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#endif // not APSTUDIO_INVOKED
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8,00"
|
Version="8.00"
|
||||||
Name="Console_2005Express"
|
Name="Console_2005Express"
|
||||||
ProjectGUID="{F962CFA1-2215-4124-938F-253973A27591}"
|
ProjectGUID="{F962CFA1-2215-4124-938F-253973A27591}"
|
||||||
RootNamespace="Console"
|
RootNamespace="Console"
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
<Configurations>
|
<Configurations>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory=".\Debug"
|
OutputDirectory="Debug"
|
||||||
IntermediateDirectory=".\Debug"
|
IntermediateDirectory="Debug"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;..\ja2_2005Express.vsprops;..\ja2_2005ExpressDebug.vsprops"
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;..\ja2_2005Express.vsprops;..\ja2_2005ExpressDebug.vsprops"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE"
"
|
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
FavorSizeOrSpeed="0"
|
FavorSizeOrSpeed="0"
|
||||||
AdditionalIncludeDirectories=""
|
AdditionalIncludeDirectories=""
|
||||||
@@ -102,8 +102,8 @@
|
|||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory=".\Release"
|
OutputDirectory="Release"
|
||||||
IntermediateDirectory=".\Release"
|
IntermediateDirectory="Release"
|
||||||
ConfigurationType="4"
|
ConfigurationType="4"
|
||||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;..\ja2_2005Express.vsprops"
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;..\ja2_2005Express.vsprops"
|
||||||
UseOfMFC="0"
|
UseOfMFC="0"
|
||||||
@@ -133,7 +133,6 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
InlineFunctionExpansion="1"
|
InlineFunctionExpansion="1"
|
||||||
AdditionalIncludeDirectories="c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\src\mfc"
|
AdditionalIncludeDirectories="c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\src\mfc"
|
||||||
@@ -185,6 +184,91 @@
|
|||||||
CommandLine=""
|
CommandLine=""
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="MapEditor|Win32"
|
||||||
|
OutputDirectory="MapEditor"
|
||||||
|
IntermediateDirectory="MapEditor"
|
||||||
|
ConfigurationType="4"
|
||||||
|
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;..\ja2_2005Express.vsprops;..\ja2_2005ExpressEditor.vsprops"
|
||||||
|
UseOfMFC="0"
|
||||||
|
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||||
|
CharacterSet="0"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
PreprocessorDefinitions="_DEBUG"
|
||||||
|
MkTypLibCompatible="true"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
TargetEnvironment="1"
|
||||||
|
TypeLibraryName=".\Debug/Console.tlb"
|
||||||
|
HeaderFileName=""
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
FavorSizeOrSpeed="0"
|
||||||
|
AdditionalIncludeDirectories=""
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
PrecompiledHeaderThrough="stdafx.h"
|
||||||
|
PrecompiledHeaderFile=".\Debug/Console.pch"
|
||||||
|
AssemblerListingLocation=".\Debug/"
|
||||||
|
ObjectFile=".\Debug/"
|
||||||
|
ProgramDataBaseFileName=".\Debug/"
|
||||||
|
WarningLevel="3"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
DisableSpecificWarnings="4100"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
PreprocessorDefinitions="_DEBUG"
|
||||||
|
Culture="1050"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
AdditionalDependencies="comctl32.lib"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
SuppressStartupBanner="true"
|
||||||
|
OutputFile=".\Debug/Console.bsc"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
</Configurations>
|
</Configurations>
|
||||||
<References>
|
<References>
|
||||||
</References>
|
</References>
|
||||||
|
|||||||
+6
-5
@@ -9,17 +9,17 @@
|
|||||||
//
|
//
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program; if not, write to the Free Software
|
// along with this program; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
// 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:
|
// I'll try to keep a version up to date. I can be reached as follows:
|
||||||
// marko.bozikovic@alterbox.net
|
// marko.bozikovic@alterbox.net
|
||||||
// bozho@kset.org
|
// bozho@kset.org
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
@@ -840,3 +840,4 @@ void FadeBlockCursor::FakeBlend() {
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -9,17 +9,17 @@
|
|||||||
//
|
//
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program; if not, write to the Free Software
|
// along with this program; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
// 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:
|
// I'll try to keep a version up to date. I can be reached as follows:
|
||||||
// marko.bozikovic@alterbox.net
|
// marko.bozikovic@alterbox.net
|
||||||
// bozho@kset.org
|
// bozho@kset.org
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+6
-5
@@ -9,17 +9,17 @@
|
|||||||
//
|
//
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program; if not, write to the Free Software
|
// along with this program; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
// 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:
|
// I'll try to keep a version up to date. I can be reached as follows:
|
||||||
// marko.bozikovic@alterbox.net
|
// marko.bozikovic@alterbox.net
|
||||||
// bozho@kset.org
|
// bozho@kset.org
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
@@ -131,3 +131,4 @@ int CALLBACK CAboutDlg::DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -9,17 +9,17 @@
|
|||||||
//
|
//
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program; if not, write to the Free Software
|
// along with this program; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
// 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:
|
// I'll try to keep a version up to date. I can be reached as follows:
|
||||||
// marko.bozikovic@alterbox.net
|
// marko.bozikovic@alterbox.net
|
||||||
// bozho@kset.org
|
// bozho@kset.org
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+18
-18
@@ -9,23 +9,23 @@
|
|||||||
//
|
//
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program; if not, write to the Free Software
|
// along with this program; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
// 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:
|
// I'll try to keep a version up to date. I can be reached as follows:
|
||||||
// marko.bozikovic@alterbox.net
|
// marko.bozikovic@alterbox.net
|
||||||
// bozho@kset.org
|
// bozho@kset.org
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// FileStream.cpp - implementation of IStream interface on any file
|
// FileStream.cpp - implementation of IStream interface on any file
|
||||||
// (not strictly COM, I'm faking it here a bit :-)
|
// (not strictly COM, I'm faking it here a bit :-)
|
||||||
//
|
//
|
||||||
|
|
||||||
#undef CINTERFACE
|
#undef CINTERFACE
|
||||||
@@ -47,14 +47,14 @@ static char THIS_FILE[] = __FILE__;
|
|||||||
// CreateFileStream - opens/creates a file and returns an IStream interface
|
// CreateFileStream - opens/creates a file and returns an IStream interface
|
||||||
|
|
||||||
HRESULT CreateFileStream(
|
HRESULT CreateFileStream(
|
||||||
LPCTSTR lpFileName, // file name
|
LPCTSTR lpFileName, // file name
|
||||||
DWORD dwDesiredAccess, // access mode
|
DWORD dwDesiredAccess, // access mode
|
||||||
DWORD dwShareMode, // share mode
|
DWORD dwShareMode, // share mode
|
||||||
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // SD
|
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // SD
|
||||||
DWORD dwCreationDisposition, // how to create
|
DWORD dwCreationDisposition, // how to create
|
||||||
DWORD dwFlagsAndAttributes, // file attributes
|
DWORD dwFlagsAndAttributes, // file attributes
|
||||||
HANDLE hTemplateFile, // handle to template file
|
HANDLE hTemplateFile, // handle to template file
|
||||||
IStream** ppStream // pointer to IStream interface
|
IStream** ppStream // pointer to IStream interface
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ FileStream::~FileStream()
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Read - reads a specified number of bytes from the stream object into memory
|
// Read - reads a specified number of bytes from the stream object into memory
|
||||||
// starting at the current seek pointer
|
// starting at the current seek pointer
|
||||||
|
|
||||||
STDMETHODIMP FileStream::Read(void *pv, ULONG cb, ULONG *pcbRead)
|
STDMETHODIMP FileStream::Read(void *pv, ULONG cb, ULONG *pcbRead)
|
||||||
{
|
{
|
||||||
@@ -126,7 +126,7 @@ STDMETHODIMP FileStream::Read(void *pv, ULONG cb, ULONG *pcbRead)
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Write - writes a specified number of bytes into the stream object starting
|
// Write - writes a specified number of bytes into the stream object starting
|
||||||
// at the current seek pointer
|
// at the current seek pointer
|
||||||
|
|
||||||
STDMETHODIMP FileStream::Write(void const *pv, ULONG cb, ULONG *pcbWritten)
|
STDMETHODIMP FileStream::Write(void const *pv, ULONG cb, ULONG *pcbWritten)
|
||||||
{
|
{
|
||||||
@@ -140,7 +140,7 @@ STDMETHODIMP FileStream::Write(void const *pv, ULONG cb, ULONG *pcbWritten)
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Seek - changes the seek pointer to a new location relative to the beginning
|
// Seek - changes the seek pointer to a new location relative to the beginning
|
||||||
// of the stream, to the end of the stream, or to the current seek pointer
|
// of the stream, to the end of the stream, or to the current seek pointer
|
||||||
|
|
||||||
STDMETHODIMP FileStream::Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
|
STDMETHODIMP FileStream::Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
|
||||||
{
|
{
|
||||||
@@ -182,7 +182,7 @@ STDMETHODIMP FileStream::SetSize(ULARGE_INTEGER libNewSize)
|
|||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// CopyTo - copies a specified number of bytes from the current seek pointer
|
// CopyTo - copies a specified number of bytes from the current seek pointer
|
||||||
// in the stream to the current seek pointer in another stream
|
// in the stream to the current seek pointer in another stream
|
||||||
|
|
||||||
STDMETHODIMP FileStream::CopyTo(IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
|
STDMETHODIMP FileStream::CopyTo(IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
|
||||||
{
|
{
|
||||||
|
|||||||
+14
-14
@@ -9,23 +9,23 @@
|
|||||||
//
|
//
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program; if not, write to the Free Software
|
// along with this program; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
|
// 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:
|
// I'll try to keep a version up to date. I can be reached as follows:
|
||||||
// marko.bozikovic@alterbox.net
|
// marko.bozikovic@alterbox.net
|
||||||
// bozho@kset.org
|
// bozho@kset.org
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// FileStream.h - implementation of IStream interface on any file
|
// FileStream.h - implementation of IStream interface on any file
|
||||||
// (not really COM, I'm faking it here a bit :-)
|
// (not really COM, I'm faking it here a bit :-)
|
||||||
//
|
//
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
@@ -35,14 +35,14 @@
|
|||||||
// CreateFileStream - opens/creates a file and returns an IStream interface
|
// CreateFileStream - opens/creates a file and returns an IStream interface
|
||||||
|
|
||||||
HRESULT CreateFileStream(
|
HRESULT CreateFileStream(
|
||||||
LPCTSTR lpFileName, // file name
|
LPCTSTR lpFileName, // file name
|
||||||
DWORD dwDesiredAccess, // access mode
|
DWORD dwDesiredAccess, // access mode
|
||||||
DWORD dwShareMode, // share mode
|
DWORD dwShareMode, // share mode
|
||||||
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // SD
|
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // SD
|
||||||
DWORD dwCreationDisposition, // how to create
|
DWORD dwCreationDisposition, // how to create
|
||||||
DWORD dwFlagsAndAttributes, // file attributes
|
DWORD dwFlagsAndAttributes, // file attributes
|
||||||
HANDLE hTemplateFile, // handle to template file
|
HANDLE hTemplateFile, // handle to template file
|
||||||
IStream** ppStream // pointer to IStream interface
|
IStream** ppStream // pointer to IStream interface
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+9
-17
@@ -2,12 +2,10 @@
|
|||||||
#include "JA2 All.h"
|
#include "JA2 All.h"
|
||||||
#include "Credits.h"
|
#include "Credits.h"
|
||||||
#include "Encrypted File.h"
|
#include "Encrypted File.h"
|
||||||
//#include "Utils All.h"
|
|
||||||
#include "Language Defines.h"
|
#include "Language Defines.h"
|
||||||
#else
|
#else
|
||||||
#include "Types.h"
|
#include "Types.h"
|
||||||
#include "Credits.h"
|
#include "Credits.h"
|
||||||
//#include "Utils All.h"
|
|
||||||
#include "Language Defines.h"
|
#include "Language Defines.h"
|
||||||
#include "vsurface.h"
|
#include "vsurface.h"
|
||||||
#include "mousesystem.h"
|
#include "mousesystem.h"
|
||||||
@@ -188,7 +186,7 @@ typedef struct
|
|||||||
|
|
||||||
CDRT_FACE gCreditFaces[] =
|
CDRT_FACE gCreditFaces[] =
|
||||||
{
|
{
|
||||||
// x y w h
|
// x y w h
|
||||||
298, 137, 37, 49, 310, 157, 304, 170, 2500, 0, 0, //Camfield
|
298, 137, 37, 49, 310, 157, 304, 170, 2500, 0, 0, //Camfield
|
||||||
348, 137, 43, 47, 354, 153, 354, 153, 3700, 0, 0, //Shawn
|
348, 137, 43, 47, 354, 153, 354, 153, 3700, 0, 0, //Shawn
|
||||||
407, 132, 30, 50, 408, 151, 410, 164, 3000, 0, 0, //Kris
|
407, 132, 30, 50, 408, 151, 410, 164, 3000, 0, 0, //Kris
|
||||||
@@ -465,7 +463,7 @@ UINT32 CreditScreenShutdown( void )
|
|||||||
BOOLEAN EnterCreditsScreen()
|
BOOLEAN EnterCreditsScreen()
|
||||||
{
|
{
|
||||||
UINT32 uiCnt;
|
UINT32 uiCnt;
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
/*
|
/*
|
||||||
|
|
||||||
VSURFACE_DESC vs_desc;
|
VSURFACE_DESC vs_desc;
|
||||||
@@ -480,7 +478,7 @@ BOOLEAN EnterCreditsScreen()
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
gfModCredits = TRUE;
|
gfModCredits = TRUE;
|
||||||
|
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0 );
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0 );
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
@@ -540,7 +538,7 @@ BOOLEAN EnterCreditsScreen()
|
|||||||
{
|
{
|
||||||
// Make a mouse region
|
// Make a mouse region
|
||||||
MSYS_DefineRegion( &gCrdtMouseRegions[uiCnt], gCreditFaces[uiCnt].sX, gCreditFaces[uiCnt].sY, (INT16)(gCreditFaces[uiCnt].sX + gCreditFaces[uiCnt].sWidth), (INT16)(gCreditFaces[uiCnt].sY + gCreditFaces[uiCnt].sHeight), MSYS_PRIORITY_NORMAL,
|
MSYS_DefineRegion( &gCrdtMouseRegions[uiCnt], gCreditFaces[uiCnt].sX, gCreditFaces[uiCnt].sY, (INT16)(gCreditFaces[uiCnt].sX + gCreditFaces[uiCnt].sWidth), (INT16)(gCreditFaces[uiCnt].sY + gCreditFaces[uiCnt].sHeight), MSYS_PRIORITY_NORMAL,
|
||||||
CURSOR_WWW, SelectCreditFaceMovementRegionCallBack, SelectCreditFaceRegionCallBack );
|
CURSOR_WWW, SelectCreditFaceMovementRegionCallBack, SelectCreditFaceRegionCallBack );
|
||||||
|
|
||||||
// Add region
|
// Add region
|
||||||
MSYS_AddRegion( &gCrdtMouseRegions[uiCnt] );
|
MSYS_AddRegion( &gCrdtMouseRegions[uiCnt] );
|
||||||
@@ -644,10 +642,10 @@ void HandleCreditScreen()
|
|||||||
BOOLEAN RenderCreditScreen()
|
BOOLEAN RenderCreditScreen()
|
||||||
{
|
{
|
||||||
|
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
|
|
||||||
GetVideoObject(&hPixHandle, guiCreditBackGroundImage );
|
GetVideoObject(&hPixHandle, guiCreditBackGroundImage );
|
||||||
BltVideoObject( FRAME_BUFFER, hPixHandle, 0, 0, 0, VO_BLT_SRCTRANSPARENCY, NULL);
|
BltVideoObject( FRAME_BUFFER, hPixHandle, 0, 0, 0, VO_BLT_SRCTRANSPARENCY, NULL);
|
||||||
/*
|
/*
|
||||||
HVSURFACE hVSurface;
|
HVSURFACE hVSurface;
|
||||||
|
|
||||||
@@ -960,7 +958,6 @@ BOOLEAN AddCreditNode( UINT32 uiType, UINT32 uiFlags, STR16 pString )
|
|||||||
|
|
||||||
void HandleCreditNodes()
|
void HandleCreditNodes()
|
||||||
{
|
{
|
||||||
UINT32 uiCurrentTime =GetJA2Clock();
|
|
||||||
CRDT_NODE *pCurrent=NULL;
|
CRDT_NODE *pCurrent=NULL;
|
||||||
CRDT_NODE *pTemp=NULL;
|
CRDT_NODE *pTemp=NULL;
|
||||||
|
|
||||||
@@ -1018,8 +1015,6 @@ void HandleCurrentCreditNode( CRDT_NODE *pCurrent )
|
|||||||
|
|
||||||
void HandleNode_Default( CRDT_NODE *pCurrent )
|
void HandleNode_Default( CRDT_NODE *pCurrent )
|
||||||
{
|
{
|
||||||
UINT32 uiCurrentTime =GetJA2Clock();
|
|
||||||
|
|
||||||
//if it is time to update the current node
|
//if it is time to update the current node
|
||||||
// if( ( uiCurrentTime - pCurrent->uiLastTime ) > guiCrdtNodeScrollSpeed )
|
// if( ( uiCurrentTime - pCurrent->uiLastTime ) > guiCrdtNodeScrollSpeed )
|
||||||
{
|
{
|
||||||
@@ -1105,13 +1100,10 @@ BOOLEAN DisplayCreditNode( CRDT_NODE *pCurrent )
|
|||||||
//return false from this function when there are no more items in the text file
|
//return false from this function when there are no more items in the text file
|
||||||
BOOLEAN GetNextCreditFromTextFile()
|
BOOLEAN GetNextCreditFromTextFile()
|
||||||
{
|
{
|
||||||
BOOLEAN fDone = FALSE;
|
|
||||||
UINT32 uiStringWidth = 20;
|
|
||||||
CHAR16 zOriginalString[512];
|
CHAR16 zOriginalString[512];
|
||||||
CHAR16 zString[512];
|
CHAR16 zString[512];
|
||||||
CHAR16 zCodes[512];
|
CHAR16 zCodes[512];
|
||||||
STR16 pzNewCode=NULL;
|
STR16 pzNewCode=NULL;
|
||||||
UINT32 uiCodeType = 0;
|
|
||||||
UINT32 uiNodeType = 0;
|
UINT32 uiNodeType = 0;
|
||||||
UINT32 uiStartLoc = 0;
|
UINT32 uiStartLoc = 0;
|
||||||
UINT32 uiFlags=0;
|
UINT32 uiFlags=0;
|
||||||
@@ -1261,7 +1253,7 @@ BOOLEAN GetNextCreditFromTextFile()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 28:
|
case 28:
|
||||||
wcscpy(zOriginalString, L"Starwalker");
|
wcscpy(zOriginalString, L"Starwalker");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 29:
|
case 29:
|
||||||
@@ -1465,7 +1457,7 @@ UINT32 GetAndHandleCreditCodeFromCodeString( STR16 pzCode )
|
|||||||
swscanf( &pzCode[1], L"%d%*s", &uiNewDelay );
|
swscanf( &pzCode[1], L"%d%*s", &uiNewDelay );
|
||||||
|
|
||||||
// guiCrdtDelayBetweenNodes = uiNewDelay;
|
// guiCrdtDelayBetweenNodes = uiNewDelay;
|
||||||
guiGapBetweenCreditNodes = uiNewDelay;
|
guiGapBetweenCreditNodes = uiNewDelay;
|
||||||
|
|
||||||
return( CRDT_NODE_NONE );
|
return( CRDT_NODE_NONE );
|
||||||
}
|
}
|
||||||
@@ -1678,7 +1670,7 @@ void InitCreditEyeBlinking()
|
|||||||
|
|
||||||
void HandleCreditEyeBlinking()
|
void HandleCreditEyeBlinking()
|
||||||
{
|
{
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
UINT8 ubCnt;
|
UINT8 ubCnt;
|
||||||
|
|
||||||
GetVideoObject(&hPixHandle, guiCreditFaces );
|
GetVideoObject(&hPixHandle, guiCreditFaces );
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ enum
|
|||||||
ITEMS_WEAPONS, FIRST_ITEMS_BUTTON = ITEMS_WEAPONS,
|
ITEMS_WEAPONS, FIRST_ITEMS_BUTTON = ITEMS_WEAPONS,
|
||||||
ITEMS_AMMO,
|
ITEMS_AMMO,
|
||||||
ITEMS_ARMOUR,
|
ITEMS_ARMOUR,
|
||||||
|
ITEMS_LBEGEAR,
|
||||||
ITEMS_EXPLOSIVES,
|
ITEMS_EXPLOSIVES,
|
||||||
ITEMS_EQUIPMENT1,
|
ITEMS_EQUIPMENT1,
|
||||||
ITEMS_EQUIPMENT2,
|
ITEMS_EQUIPMENT2,
|
||||||
@@ -249,9 +250,9 @@ enum
|
|||||||
|
|
||||||
#define FIRST_MERCS_COLORMODE_BUTTON MERCS_TOGGLECOLOR_BUTTON
|
#define FIRST_MERCS_COLORMODE_BUTTON MERCS_TOGGLECOLOR_BUTTON
|
||||||
#define LAST_MERCS_COLORMODE_BUTTON MERCS_BODYTYPE_UP
|
#define LAST_MERCS_COLORMODE_BUTTON MERCS_BODYTYPE_UP
|
||||||
#define FIRST_MERCS_COLOR_BUTTON MERCS_HAIRCOLOR_DOWN
|
#define FIRST_MERCS_COLOR_BUTTON MERCS_HAIRCOLOR_DOWN
|
||||||
#define LAST_MERCS_COLOR_BUTTON MERCS_PANTCOLOR_UP
|
#define LAST_MERCS_COLOR_BUTTON MERCS_PANTCOLOR_UP
|
||||||
#define FIRST_MERCS_BODYTYPE_BUTTON MERCS_BODYTYPE_DOWN
|
#define FIRST_MERCS_BODYTYPE_BUTTON MERCS_BODYTYPE_DOWN
|
||||||
#define LAST_MERCS_BODYTYPE_BUTTON MERCS_BODYTYPE_UP
|
#define LAST_MERCS_BODYTYPE_BUTTON MERCS_BODYTYPE_UP
|
||||||
|
|
||||||
#define FIRST_MERCS_INVENTORY_BUTTON MERCS_HEAD_SLOT
|
#define FIRST_MERCS_INVENTORY_BUTTON MERCS_HEAD_SLOT
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ void EnsureSelectionType();
|
|||||||
|
|
||||||
//Used for offseting cursor to show that it is on the roof rather than on the ground.
|
//Used for offseting cursor to show that it is on the roof rather than on the ground.
|
||||||
//This can be conveniently executed by moving the cursor up and right 3 gridnos for a
|
//This can be conveniently executed by moving the cursor up and right 3 gridnos for a
|
||||||
//total of -483 -(160*3)-(1*3)
|
//total of -483 -(160*3)-(1*3)
|
||||||
#define ROOF_OFFSET (-483)
|
#define ROOF_OFFSET (-483)
|
||||||
BOOLEAN gfUsingOffset;
|
BOOLEAN gfUsingOffset;
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ void UpdateCursorAreas()
|
|||||||
{
|
{
|
||||||
iMapIndex = gSelectRegion.iTop * WORLD_COLS + gSelectRegion.iLeft;
|
iMapIndex = gSelectRegion.iTop * WORLD_COLS + gSelectRegion.iLeft;
|
||||||
if( !IsLocationSittable( iMapIndex, gfRoofPlacement ) && iDrawMode != DRAW_MODE_SCHEDULEACTION ||
|
if( !IsLocationSittable( iMapIndex, gfRoofPlacement ) && iDrawMode != DRAW_MODE_SCHEDULEACTION ||
|
||||||
!IsLocationSittableExcludingPeople( iMapIndex, gfRoofPlacement ) && iDrawMode == DRAW_MODE_SCHEDULEACTION )
|
!IsLocationSittableExcludingPeople( iMapIndex, gfRoofPlacement ) && iDrawMode == DRAW_MODE_SCHEDULEACTION )
|
||||||
{
|
{
|
||||||
if( sBadMarker != iMapIndex )
|
if( sBadMarker != iMapIndex )
|
||||||
{
|
{
|
||||||
@@ -280,8 +280,8 @@ BOOLEAN HandleAreaSelection()
|
|||||||
//When the user releases the left button, then clear and process the area.
|
//When the user releases the left button, then clear and process the area.
|
||||||
if( fAnchored )
|
if( fAnchored )
|
||||||
{
|
{
|
||||||
if( !gfLeftButtonState && !gfCurrentSelectionWithRightButton ||
|
if( !gfLeftButtonState && !gfCurrentSelectionWithRightButton ||
|
||||||
!gfRightButtonState && gfCurrentSelectionWithRightButton )
|
!gfRightButtonState && gfCurrentSelectionWithRightButton )
|
||||||
{
|
{
|
||||||
fAnchored = FALSE;
|
fAnchored = FALSE;
|
||||||
ProcessAreaSelection( (BOOLEAN)!gfCurrentSelectionWithRightButton );
|
ProcessAreaSelection( (BOOLEAN)!gfCurrentSelectionWithRightButton );
|
||||||
@@ -341,8 +341,8 @@ BOOLEAN HandleAreaSelection()
|
|||||||
void ValidateSelectionRegionBoundaries()
|
void ValidateSelectionRegionBoundaries()
|
||||||
{
|
{
|
||||||
gSelectRegion.iLeft = max( min( 159, gSelectRegion.iLeft ) , 0 );
|
gSelectRegion.iLeft = max( min( 159, gSelectRegion.iLeft ) , 0 );
|
||||||
gSelectRegion.iRight = max( min( 159, gSelectRegion.iRight ), 0 );
|
gSelectRegion.iRight = max( min( 159, gSelectRegion.iRight ), 0 );
|
||||||
gSelectRegion.iTop = max( min( 159, gSelectRegion.iTop ) , 0 );
|
gSelectRegion.iTop = max( min( 159, gSelectRegion.iTop ) , 0 );
|
||||||
gSelectRegion.iBottom = max( min( 159, gSelectRegion.iBottom ), 0 );
|
gSelectRegion.iBottom = max( min( 159, gSelectRegion.iBottom ), 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ void TerrainTileButtonRegionCallback(MOUSE_REGION *reg,INT32 reason);
|
|||||||
void ItemsWeaponsCallback(GUI_BUTTON *btn,INT32 reason);
|
void ItemsWeaponsCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
void ItemsAmmoCallback(GUI_BUTTON *btn,INT32 reason);
|
void ItemsAmmoCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
void ItemsArmourCallback(GUI_BUTTON *btn,INT32 reason);
|
void ItemsArmourCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
|
void ItemsLBECallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
void ItemsExplosivesCallback(GUI_BUTTON *btn,INT32 reason);
|
void ItemsExplosivesCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
void ItemsEquipment1Callback(GUI_BUTTON *btn,INT32 reason);
|
void ItemsEquipment1Callback(GUI_BUTTON *btn,INT32 reason);
|
||||||
void ItemsEquipment2Callback(GUI_BUTTON *btn,INT32 reason);
|
void ItemsEquipment2Callback(GUI_BUTTON *btn,INT32 reason);
|
||||||
|
|||||||
@@ -401,10 +401,10 @@ void BuildingSawRoomCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
|
|
||||||
void BuildingKillBuildingCallback(GUI_BUTTON *btn, INT32 reason)
|
void BuildingKillBuildingCallback(GUI_BUTTON *btn, INT32 reason)
|
||||||
{
|
{
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||||
{
|
{
|
||||||
SetEditorBuildingTaskbarMode( BUILDING_KILL_BUILDING );
|
SetEditorBuildingTaskbarMode( BUILDING_KILL_BUILDING );
|
||||||
iDrawMode = DRAW_MODE_KILL_BUILDING;
|
iDrawMode = DRAW_MODE_KILL_BUILDING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -428,10 +428,10 @@ void BuildingMoveBuildingCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
|
|
||||||
void BuildingDrawRoomNumCallback(GUI_BUTTON *btn, INT32 reason)
|
void BuildingDrawRoomNumCallback(GUI_BUTTON *btn, INT32 reason)
|
||||||
{
|
{
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||||
{
|
{
|
||||||
SetEditorBuildingTaskbarMode( BUILDING_DRAW_ROOMNUM );
|
SetEditorBuildingTaskbarMode( BUILDING_DRAW_ROOMNUM );
|
||||||
iDrawMode = DRAW_MODE_ROOMNUM;
|
iDrawMode = DRAW_MODE_ROOMNUM;
|
||||||
gubCurrRoomNumber = gubMaxRoomNumber;
|
gubCurrRoomNumber = gubMaxRoomNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -457,7 +457,7 @@ void BuildingToggleRoofViewCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
{
|
{
|
||||||
UnclickEditorButton( BUILDING_TOGGLE_ROOF_VIEW );
|
UnclickEditorButton( BUILDING_TOGGLE_ROOF_VIEW );
|
||||||
}
|
}
|
||||||
//Name could be a bit misleading. It'll hide or show the roofs based on the
|
//Name could be a bit misleading. It'll hide or show the roofs based on the
|
||||||
//fBuildingShowRoofs value.
|
//fBuildingShowRoofs value.
|
||||||
UpdateRoofsView();
|
UpdateRoofsView();
|
||||||
}
|
}
|
||||||
@@ -475,7 +475,7 @@ void BuildingToggleWallViewCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
{
|
{
|
||||||
UnclickEditorButton( BUILDING_TOGGLE_WALL_VIEW );
|
UnclickEditorButton( BUILDING_TOGGLE_WALL_VIEW );
|
||||||
}
|
}
|
||||||
//Name could be a bit misleading. It'll hide or show the walls based on the
|
//Name could be a bit misleading. It'll hide or show the walls based on the
|
||||||
//fBuildingShowWalls value.
|
//fBuildingShowWalls value.
|
||||||
UpdateWallsView();
|
UpdateWallsView();
|
||||||
}
|
}
|
||||||
@@ -701,6 +701,12 @@ void ItemsArmourCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
SetEditorItemsTaskbarMode( ITEMS_ARMOUR );
|
SetEditorItemsTaskbarMode( ITEMS_ARMOUR );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ItemsLBECallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
|
{
|
||||||
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||||
|
SetEditorItemsTaskbarMode( ITEMS_LBEGEAR );
|
||||||
|
}
|
||||||
|
|
||||||
void ItemsExplosivesCallback(GUI_BUTTON *btn,INT32 reason)
|
void ItemsExplosivesCallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
{
|
{
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP)
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ void SetEditorItemsTaskbarMode( UINT16 usNewMode )
|
|||||||
ClickEditorButton( ITEMS_ARMOUR );
|
ClickEditorButton( ITEMS_ARMOUR );
|
||||||
iEditorToolbarState = TBAR_MODE_ITEM_ARMOUR;
|
iEditorToolbarState = TBAR_MODE_ITEM_ARMOUR;
|
||||||
break;
|
break;
|
||||||
|
case ITEMS_LBEGEAR:
|
||||||
|
ClickEditorButton( ITEMS_LBEGEAR );
|
||||||
|
iEditorToolbarState = TBAR_MODE_ITEM_LBEGEAR;
|
||||||
|
break;
|
||||||
case ITEMS_EXPLOSIVES:
|
case ITEMS_EXPLOSIVES:
|
||||||
ClickEditorButton( ITEMS_EXPLOSIVES );
|
ClickEditorButton( ITEMS_EXPLOSIVES );
|
||||||
iEditorToolbarState = TBAR_MODE_ITEM_EXPLOSIVES;
|
iEditorToolbarState = TBAR_MODE_ITEM_EXPLOSIVES;
|
||||||
@@ -75,7 +79,6 @@ void SetEditorItemsTaskbarMode( UINT16 usNewMode )
|
|||||||
|
|
||||||
void SetEditorBuildingTaskbarMode( UINT16 usNewMode )
|
void SetEditorBuildingTaskbarMode( UINT16 usNewMode )
|
||||||
{
|
{
|
||||||
BOOLEAN fNewGroup = FALSE;
|
|
||||||
BOOLEAN fNewRoofs, fNewWalls, fNewRoomInfo;
|
BOOLEAN fNewRoofs, fNewWalls, fNewRoomInfo;
|
||||||
if( usNewMode == usCurrentMode )
|
if( usNewMode == usCurrentMode )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -565,9 +565,13 @@ void InitEditorItemsToolbar()
|
|||||||
CreateTextButton(L"Armour",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton(L"Armour",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 199, 2 * iScreenHeightOffset + 440, 52, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
|
iScreenWidthOffset + 199, 2 * iScreenHeightOffset + 440, 52, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
|
||||||
ItemsArmourCallback);
|
ItemsArmourCallback);
|
||||||
|
iEditorButton[ITEMS_LBEGEAR] =
|
||||||
|
CreateTextButton(L"LBE",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
|
iScreenWidthOffset + 251, 2 * iScreenHeightOffset + 440, 30, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
|
||||||
|
ItemsLBECallback);
|
||||||
iEditorButton[ITEMS_EXPLOSIVES] =
|
iEditorButton[ITEMS_EXPLOSIVES] =
|
||||||
CreateTextButton(L"Explosives",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton(L"Exp",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 251, 2 * iScreenHeightOffset + 440, 69, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
|
iScreenWidthOffset + 281, 2 * iScreenHeightOffset + 440, 39, 20, BUTTON_TOGGLE,MSYS_PRIORITY_NORMAL,DEFAULT_MOVE_CALLBACK,
|
||||||
ItemsExplosivesCallback);
|
ItemsExplosivesCallback);
|
||||||
iEditorButton[ITEMS_EQUIPMENT1] =
|
iEditorButton[ITEMS_EQUIPMENT1] =
|
||||||
CreateTextButton(L"E1",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton(L"E1",(UINT16)BLOCKFONT, FONT_MCOLOR_DKWHITE, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
@@ -671,11 +675,11 @@ void InitEditorMapInfoToolbar()
|
|||||||
void InitEditorOptionsToolbar()
|
void InitEditorOptionsToolbar()
|
||||||
{
|
{
|
||||||
iEditorButton[OPTIONS_NEW_MAP] =
|
iEditorButton[OPTIONS_NEW_MAP] =
|
||||||
CreateEasyNoToggleButton( iScreenWidthOffset + 71,SCREEN_HEIGHT - 79,"EDITOR//new.sti", BtnNewMapCallback);
|
CreateEasyNoToggleButton( iScreenWidthOffset + 71,SCREEN_HEIGHT - 79,"EDITOR//new.sti", BtnNewMapCallback);
|
||||||
SetButtonFastHelpText(iEditorButton[OPTIONS_NEW_MAP],L"New map");
|
SetButtonFastHelpText(iEditorButton[OPTIONS_NEW_MAP],L"New map");
|
||||||
|
|
||||||
iEditorButton[OPTIONS_NEW_BASEMENT] =
|
iEditorButton[OPTIONS_NEW_BASEMENT] =
|
||||||
CreateEasyNoToggleButton( iScreenWidthOffset + 101,SCREEN_HEIGHT - 79,"EDITOR//new.sti", BtnNewBasementCallback);
|
CreateEasyNoToggleButton( iScreenWidthOffset + 101,SCREEN_HEIGHT - 79,"EDITOR//new.sti", BtnNewBasementCallback);
|
||||||
SetButtonFastHelpText(iEditorButton[OPTIONS_NEW_BASEMENT],L"New basement");
|
SetButtonFastHelpText(iEditorButton[OPTIONS_NEW_BASEMENT],L"New basement");
|
||||||
|
|
||||||
iEditorButton[OPTIONS_NEW_CAVES] =
|
iEditorButton[OPTIONS_NEW_CAVES] =
|
||||||
@@ -683,11 +687,11 @@ void InitEditorOptionsToolbar()
|
|||||||
SetButtonFastHelpText(iEditorButton[OPTIONS_NEW_CAVES],L"New cave level");
|
SetButtonFastHelpText(iEditorButton[OPTIONS_NEW_CAVES],L"New cave level");
|
||||||
|
|
||||||
iEditorButton[OPTIONS_SAVE_MAP] =
|
iEditorButton[OPTIONS_SAVE_MAP] =
|
||||||
CreateEasyNoToggleButton( iScreenWidthOffset + 161,SCREEN_HEIGHT - 79,"EDITOR//save.sti", BtnSaveCallback);
|
CreateEasyNoToggleButton( iScreenWidthOffset + 161,SCREEN_HEIGHT - 79,"EDITOR//save.sti", BtnSaveCallback);
|
||||||
SetButtonFastHelpText(iEditorButton[OPTIONS_SAVE_MAP],L"Save map");
|
SetButtonFastHelpText(iEditorButton[OPTIONS_SAVE_MAP],L"Save map");
|
||||||
|
|
||||||
iEditorButton[OPTIONS_LOAD_MAP] =
|
iEditorButton[OPTIONS_LOAD_MAP] =
|
||||||
CreateEasyNoToggleButton( iScreenWidthOffset + 191,SCREEN_HEIGHT - 79,"EDITOR//load.sti", BtnLoadCallback);
|
CreateEasyNoToggleButton( iScreenWidthOffset + 191,SCREEN_HEIGHT - 79,"EDITOR//load.sti", BtnLoadCallback);
|
||||||
SetButtonFastHelpText(iEditorButton[OPTIONS_LOAD_MAP],L"Load map");
|
SetButtonFastHelpText(iEditorButton[OPTIONS_LOAD_MAP],L"Load map");
|
||||||
|
|
||||||
iEditorButton[OPTIONS_CHANGE_TILESET] =
|
iEditorButton[OPTIONS_CHANGE_TILESET] =
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ void InitEditorRegions()
|
|||||||
INT32 x;
|
INT32 x;
|
||||||
|
|
||||||
//By doing this, all of the buttons underneath are blanketed and can't be used anymore.
|
//By doing this, all of the buttons underneath are blanketed and can't be used anymore.
|
||||||
//Any new buttons will cover this up as well. Think of it as a barrier between the editor buttons,
|
//Any new buttons will cover this up as well. Think of it as a barrier between the editor buttons,
|
||||||
//and the game's interface panel buttons and regions.
|
//and the game's interface panel buttons and regions.
|
||||||
MSYS_DefineRegion( &EditorRegion, 0, SCREEN_HEIGHT - 120, SCREEN_WIDTH, SCREEN_HEIGHT, MSYS_PRIORITY_NORMAL, 0, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
MSYS_DefineRegion( &EditorRegion, 0, SCREEN_HEIGHT - 120, SCREEN_WIDTH, SCREEN_HEIGHT, MSYS_PRIORITY_NORMAL, 0, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ void InitEditorRegions()
|
|||||||
|
|
||||||
void LoadEditorImages()
|
void LoadEditorImages()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
//Set up the merc inventory panel
|
//Set up the merc inventory panel
|
||||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
@@ -192,8 +192,8 @@ void CreateEditorBuffers()
|
|||||||
UINT16 usUselessWidth, usUselessHeight;
|
UINT16 usUselessWidth, usUselessHeight;
|
||||||
UINT8 ubBitDepth;
|
UINT8 ubBitDepth;
|
||||||
|
|
||||||
//create buffer for the transition slot for merc items. This slot contains the newly
|
//create buffer for the transition slot for merc items. This slot contains the newly
|
||||||
//selected item graphic in it's inventory size version. This buffer is then scaled down
|
//selected item graphic in it's inventory size version. This buffer is then scaled down
|
||||||
//into the associated merc inventory panel slot buffer which is approximately 20% smaller.
|
//into the associated merc inventory panel slot buffer which is approximately 20% smaller.
|
||||||
GetCurrentVideoSettings( &usUselessWidth, &usUselessHeight, &ubBitDepth );
|
GetCurrentVideoSettings( &usUselessWidth, &usUselessHeight, &ubBitDepth );
|
||||||
vs_desc.fCreateFlags = VSURFACE_CREATE_DEFAULT | VSURFACE_SYSTEM_MEM_USAGE;
|
vs_desc.fCreateFlags = VSURFACE_CREATE_DEFAULT | VSURFACE_SYSTEM_MEM_USAGE;
|
||||||
@@ -425,7 +425,7 @@ void EnableEditorTaskbar(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//A specialized mprint function that'll restore the editor panel underneath the
|
//A specialized mprint function that'll restore the editor panel underneath the
|
||||||
//string before rendering the string. This is obviously only useful for drawing text
|
//string before rendering the string. This is obviously only useful for drawing text
|
||||||
//in the editor taskbar.
|
//in the editor taskbar.
|
||||||
void mprintfEditor(INT16 x, INT16 y, STR16 pFontString, ...)
|
void mprintfEditor(INT16 x, INT16 y, STR16 pFontString, ...)
|
||||||
{
|
{
|
||||||
@@ -435,7 +435,7 @@ void mprintfEditor(INT16 x, INT16 y, STR16 pFontString, ...)
|
|||||||
|
|
||||||
Assert( pFontString != NULL );
|
Assert( pFontString != NULL );
|
||||||
|
|
||||||
va_start( argptr, pFontString ); // Set up variable argument pointer
|
va_start( argptr, pFontString ); // Set up variable argument pointer
|
||||||
vswprintf( string, pFontString, argptr); // process gprintf string (get output str)
|
vswprintf( string, pFontString, argptr); // process gprintf string (get output str)
|
||||||
va_end( argptr );
|
va_end( argptr );
|
||||||
|
|
||||||
@@ -471,7 +471,7 @@ void ClearTaskbarRegion( INT16 sLeft, INT16 sTop, INT16 sRight, INT16 sBottom )
|
|||||||
|
|
||||||
//Kris:
|
//Kris:
|
||||||
//This is a new function which duplicates the older "yellow info boxes" that
|
//This is a new function which duplicates the older "yellow info boxes" that
|
||||||
//are common throughout the editor. This draws the yellow box with the indentation
|
//are common throughout the editor. This draws the yellow box with the indentation
|
||||||
//look.
|
//look.
|
||||||
void DrawEditorInfoBox( STR16 str, UINT32 uiFont, UINT16 x, UINT16 y, UINT16 w, UINT16 h )
|
void DrawEditorInfoBox( STR16 str, UINT32 uiFont, UINT16 x, UINT16 y, UINT16 w, UINT16 h )
|
||||||
{
|
{
|
||||||
@@ -621,7 +621,7 @@ void RenderMapEntryPointsAndLights()
|
|||||||
if( sGridNo != -1 )
|
if( sGridNo != -1 )
|
||||||
{
|
{
|
||||||
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
|
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
|
||||||
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
|
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
|
||||||
{
|
{
|
||||||
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"North Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"North Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||||
}
|
}
|
||||||
@@ -630,7 +630,7 @@ void RenderMapEntryPointsAndLights()
|
|||||||
if( sGridNo != -1 )
|
if( sGridNo != -1 )
|
||||||
{
|
{
|
||||||
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
|
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
|
||||||
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
|
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
|
||||||
{
|
{
|
||||||
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"West Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"West Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||||
}
|
}
|
||||||
@@ -639,7 +639,7 @@ void RenderMapEntryPointsAndLights()
|
|||||||
if( sGridNo != -1 )
|
if( sGridNo != -1 )
|
||||||
{
|
{
|
||||||
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
|
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
|
||||||
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
|
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
|
||||||
{
|
{
|
||||||
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"East Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"East Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||||
}
|
}
|
||||||
@@ -648,7 +648,7 @@ void RenderMapEntryPointsAndLights()
|
|||||||
if( sGridNo != -1 )
|
if( sGridNo != -1 )
|
||||||
{
|
{
|
||||||
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
|
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
|
||||||
if( sScreenY >= ( - 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
|
if( sScreenY >= ( - 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
|
||||||
{
|
{
|
||||||
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"South Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"South Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||||
}
|
}
|
||||||
@@ -657,7 +657,7 @@ void RenderMapEntryPointsAndLights()
|
|||||||
if( sGridNo != -1 )
|
if( sGridNo != -1 )
|
||||||
{
|
{
|
||||||
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
|
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
|
||||||
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
|
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
|
||||||
{
|
{
|
||||||
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"Center Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"Center Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||||
}
|
}
|
||||||
@@ -666,7 +666,7 @@ void RenderMapEntryPointsAndLights()
|
|||||||
if( sGridNo != -1 )
|
if( sGridNo != -1 )
|
||||||
{
|
{
|
||||||
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
|
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
|
||||||
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
|
if( sScreenY >= (- 20) && sScreenY < (2 * iScreenHeightOffset + 340) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
|
||||||
{
|
{
|
||||||
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"Isolated Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 40, 2, FONT10ARIAL, FONT_YELLOW, L"Isolated Entry Point", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||||
}
|
}
|
||||||
@@ -677,7 +677,7 @@ void RenderMapEntryPointsAndLights()
|
|||||||
{
|
{
|
||||||
if( LightSprites[ i ].uiFlags & LIGHT_SPR_ACTIVE )
|
if( LightSprites[ i ].uiFlags & LIGHT_SPR_ACTIVE )
|
||||||
{
|
{
|
||||||
// Check for light out of bounds. This actually happens in Drassen.
|
// Check for light out of bounds. This actually happens in Drassen.
|
||||||
if (LightSprites[ i ].iY < 0 || LightSprites[ i ].iY > WORLD_ROWS ||
|
if (LightSprites[ i ].iY < 0 || LightSprites[ i ].iY > WORLD_ROWS ||
|
||||||
LightSprites[ i ].iX < 0 || LightSprites[ i ].iX > WORLD_COLS)
|
LightSprites[ i ].iX < 0 || LightSprites[ i ].iX > WORLD_COLS)
|
||||||
{
|
{
|
||||||
@@ -687,7 +687,7 @@ void RenderMapEntryPointsAndLights()
|
|||||||
|
|
||||||
sGridNo = LightSprites[ i ].iY * WORLD_COLS + LightSprites[ i ].iX;
|
sGridNo = LightSprites[ i ].iY * WORLD_COLS + LightSprites[ i ].iX;
|
||||||
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
|
GetGridNoScreenPos( sGridNo, 0, &sScreenX, &sScreenY );
|
||||||
if( sScreenY >= (- 50) && sScreenY < (2 * iScreenHeightOffset + 300) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
|
if( sScreenY >= (- 50) && sScreenY < (2 * iScreenHeightOffset + 300) && sScreenX >= (- 40) && sScreenX < SCREEN_WIDTH )
|
||||||
{
|
{
|
||||||
if( LightSprites[ i ].uiFlags & LIGHT_PRIMETIME )
|
if( LightSprites[ i ].uiFlags & LIGHT_PRIMETIME )
|
||||||
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 50, 2, FONT10ARIAL, FONT_ORANGE, L"Prime", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
DisplayWrappedString( sScreenX, (INT16)(sScreenY-5), 50, 2, FONT10ARIAL, FONT_ORANGE, L"Prime", FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||||
@@ -704,27 +704,27 @@ void BuildTriggerName( OBJECTTYPE *pItem, STR16 szItemName )
|
|||||||
{
|
{
|
||||||
if( pItem->usItem == SWITCH )
|
if( pItem->usItem == SWITCH )
|
||||||
{
|
{
|
||||||
if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY )
|
if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY )
|
||||||
swprintf( szItemName, L"Panic Trigger1" );
|
swprintf( szItemName, L"Panic Trigger1" );
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_2 )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_2 )
|
||||||
swprintf( szItemName, L"Panic Trigger2" );
|
swprintf( szItemName, L"Panic Trigger2" );
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_3 )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_3 )
|
||||||
swprintf( szItemName, L"Panic Trigger3" );
|
swprintf( szItemName, L"Panic Trigger3" );
|
||||||
else
|
else
|
||||||
swprintf( szItemName, L"Trigger%d", pItem->ItemData.Trigger.BombTrigger.bFrequency - 50 );
|
swprintf( szItemName, L"Trigger%d", (*pItem)[0]->data.misc.bFrequency - 50 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //action item
|
{ //action item
|
||||||
if( pItem->ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
if( (*pItem)[0]->data.misc.bDetonatorType == BOMB_PRESSURE )
|
||||||
swprintf( szItemName, L"Pressure Action" );
|
swprintf( szItemName, L"Pressure Action" );
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY )
|
||||||
swprintf( szItemName, L"Panic Action1" );
|
swprintf( szItemName, L"Panic Action1" );
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_2 )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_2 )
|
||||||
swprintf( szItemName, L"Panic Action2" );
|
swprintf( szItemName, L"Panic Action2" );
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_3 )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_3 )
|
||||||
swprintf( szItemName, L"Panic Action3" );
|
swprintf( szItemName, L"Panic Action3" );
|
||||||
else
|
else
|
||||||
swprintf( szItemName, L"Action%d", pItem->ItemData.Trigger.BombTrigger.bFrequency - 50 );
|
swprintf( szItemName, L"Action%d", (*pItem)[0]->data.misc.bFrequency - 50 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -818,7 +818,7 @@ void RenderSelectedItemBlownUp()
|
|||||||
}
|
}
|
||||||
else if( Item[ gpItem->usItem ].usItemClass == IC_KEY )
|
else if( Item[ gpItem->usItem ].usItemClass == IC_KEY )
|
||||||
{
|
{
|
||||||
swprintf( szItemName, L"%S", LockTable[ gpItem->ItemData.Key.ubKeyID ].ubEditorName );
|
swprintf( szItemName, L"%S", LockTable[ (*gpItem)[0]->data.key.ubKeyID ].ubEditorName );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -842,7 +842,7 @@ void RenderSelectedItemBlownUp()
|
|||||||
|
|
||||||
//Count the number of items in the current pool, and display that.
|
//Count the number of items in the current pool, and display that.
|
||||||
i = 0;
|
i = 0;
|
||||||
GetItemPool( gsItemGridNo, &pItemPool, 0 );
|
GetItemPoolFromGround( gsItemGridNo, &pItemPool );
|
||||||
Assert( pItemPool );
|
Assert( pItemPool );
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
@@ -871,17 +871,17 @@ void RenderEditorInfo( )
|
|||||||
{
|
{
|
||||||
CHAR16 FPSText[ 50 ];
|
CHAR16 FPSText[ 50 ];
|
||||||
static INT32 iSpewWarning = 0;
|
static INT32 iSpewWarning = 0;
|
||||||
UINT16 uiMapIndex;
|
INT16 iMapIndex;
|
||||||
|
|
||||||
SetFont( FONT12POINT1 );
|
SetFont( FONT12POINT1 );
|
||||||
SetFontForeground( FONT_BLACK );
|
SetFontForeground( FONT_BLACK );
|
||||||
SetFontBackground( FONT_BLACK );
|
SetFontBackground( FONT_BLACK );
|
||||||
|
|
||||||
//Display the mapindex position
|
//Display the mapindex position
|
||||||
if( GetMouseMapPos( &uiMapIndex ) )
|
if( GetMouseMapPos( &iMapIndex ) )
|
||||||
swprintf( FPSText, L" (%d) ", uiMapIndex );
|
swprintf( FPSText, L" (%d) ", iMapIndex );
|
||||||
else
|
else
|
||||||
swprintf( FPSText, L" " );
|
swprintf( FPSText, L" " );
|
||||||
mprintfEditor( (UINT16)(iScreenWidthOffset + 50-StringPixLength( FPSText, FONT12POINT1 )/2), 2 * iScreenHeightOffset + 463, FPSText );
|
mprintfEditor( (UINT16)(iScreenWidthOffset + 50-StringPixLength( FPSText, FONT12POINT1 )/2), 2 * iScreenHeightOffset + 463, FPSText );
|
||||||
|
|
||||||
switch( iCurrentTaskbar )
|
switch( iCurrentTaskbar )
|
||||||
@@ -931,8 +931,8 @@ void RenderEditorInfo( )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//This is in ButtonSystem.c as a hack. Because we need to save the buffer whenever we do a full
|
//This is in ButtonSystem.c as a hack. Because we need to save the buffer whenever we do a full
|
||||||
//taskbar render, we need to draw the buttons without hilites, hence this flag. This flag is
|
//taskbar render, we need to draw the buttons without hilites, hence this flag. This flag is
|
||||||
//always true in ButtonSystem.c, so it won't effect anything else.
|
//always true in ButtonSystem.c, so it won't effect anything else.
|
||||||
extern BOOLEAN gfGotoGridNoUI;
|
extern BOOLEAN gfGotoGridNoUI;
|
||||||
|
|
||||||
@@ -952,7 +952,7 @@ void ProcessEditorRendering()
|
|||||||
}
|
}
|
||||||
if( gfRenderDrawingMode )
|
if( gfRenderDrawingMode )
|
||||||
{
|
{
|
||||||
if( iCurrentTaskbar == TASK_BUILDINGS || iCurrentTaskbar == TASK_TERRAIN || iCurrentTaskbar == TASK_ITEMS )
|
if( iCurrentTaskbar == TASK_BUILDINGS || iCurrentTaskbar == TASK_TERRAIN || iCurrentTaskbar == TASK_ITEMS )
|
||||||
{
|
{
|
||||||
ShowCurrentDrawingMode();
|
ShowCurrentDrawingMode();
|
||||||
gfRenderDrawingMode = FALSE;
|
gfRenderDrawingMode = FALSE;
|
||||||
@@ -980,7 +980,7 @@ void ProcessEditorRendering()
|
|||||||
if( iCurrentTaskbar == TASK_MAPINFO )
|
if( iCurrentTaskbar == TASK_MAPINFO )
|
||||||
RenderMapEntryPointsAndLights();
|
RenderMapEntryPointsAndLights();
|
||||||
if( iDrawMode == DRAW_MODE_PLACE_ITEM && eInfo.uiItemType == TBAR_MODE_ITEM_KEYS ||
|
if( iDrawMode == DRAW_MODE_PLACE_ITEM && eInfo.uiItemType == TBAR_MODE_ITEM_KEYS ||
|
||||||
iDrawMode == DRAW_MODE_DOORKEYS )
|
iDrawMode == DRAW_MODE_DOORKEYS )
|
||||||
RenderDoorLockInfo();
|
RenderDoorLockInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#ifndef __EDITOR_TASKBAR_UTILS_H
|
#ifndef __EDITOR_TASKBAR_UTILS_H
|
||||||
#define __EDITOR_TASKBAR_UTILS_H
|
#define __EDITOR_TASKBAR_UTILS_H
|
||||||
|
|
||||||
//These are utilities that are used within the editor. This function absorbs the expensive
|
//These are utilities that are used within the editor. This function absorbs the expensive
|
||||||
//compile time of the SGP dependencies, while allowing the other editor files to hook into it
|
//compile time of the SGP dependencies, while allowing the other editor files to hook into it
|
||||||
//without paying, so to speak.
|
//without paying, so to speak.
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ extern UINT32 guiExclamation;
|
|||||||
extern UINT32 guiKeyImage;
|
extern UINT32 guiKeyImage;
|
||||||
extern UINT32 guiMercInvPanelBuffers[9];
|
extern UINT32 guiMercInvPanelBuffers[9];
|
||||||
extern UINT32 guiMercTempBuffer;
|
extern UINT32 guiMercTempBuffer;
|
||||||
extern INT32 giEditMercImage[2];
|
extern INT32 giEditMercImage[2];
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
+58
-58
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#include "Editor Undo.h"
|
#include "Editor Undo.h"
|
||||||
#include "Render Fun.h" //for access to gubWorldRoomInfo;
|
#include "Render Fun.h" //for access to gubWorldRoomInfo;
|
||||||
#include "Cursor Modes.h"
|
#include "Cursor Modes.h"
|
||||||
#include "Exit Grids.h"
|
#include "Exit Grids.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -24,35 +24,35 @@
|
|||||||
/*
|
/*
|
||||||
Kris -- Notes on how the undo code works:
|
Kris -- Notes on how the undo code works:
|
||||||
|
|
||||||
At the bottom of the hierarchy, we need to determine the state of the undo command. The idea
|
At the bottom of the hierarchy, we need to determine the state of the undo command. The idea
|
||||||
is that we want to separate undo commands by separating them by new mouse clicks. By holding a mouse
|
is that we want to separate undo commands by separating them by new mouse clicks. By holding a mouse
|
||||||
down and painting various objects in the world would all constitute a single undo command. As soon as
|
down and painting various objects in the world would all constitute a single undo command. As soon as
|
||||||
the mouse is release, then a new undo command is setup. So, to automate this, there is a call every
|
the mouse is release, then a new undo command is setup. So, to automate this, there is a call every
|
||||||
frame to DetermineUndoState().
|
frame to DetermineUndoState().
|
||||||
|
|
||||||
At the next level, there is a binary tree that keeps track of what map indices have been backup up in
|
At the next level, there is a binary tree that keeps track of what map indices have been backup up in
|
||||||
the current undo command. The whole reason to maintain this list, is to avoid multiple map elements of
|
the current undo command. The whole reason to maintain this list, is to avoid multiple map elements of
|
||||||
the same map index from being saved. In the outer code, everytime something is changed, a call to
|
the same map index from being saved. In the outer code, everytime something is changed, a call to
|
||||||
AddToUndoList() is called, so there are many cases (especially with building/terrain smoothing) that the
|
AddToUndoList() is called, so there are many cases (especially with building/terrain smoothing) that the
|
||||||
same mapindex is added to the undo list. This is also completely transparent, and doesn't need to be
|
same mapindex is added to the undo list. This is also completely transparent, and doesn't need to be
|
||||||
maintained.
|
maintained.
|
||||||
|
|
||||||
In the outer code, there are several calls to AddToUndoList( iMapIndex ). This function basically looks
|
In the outer code, there are several calls to AddToUndoList( iMapIndex ). This function basically looks
|
||||||
in the binary tree for an existing entry, and if there isn't, then the entire mapelement is saved (with
|
in the binary tree for an existing entry, and if there isn't, then the entire mapelement is saved (with
|
||||||
the exception of the merc level ). Lights are also supported, but there is a totally different methodology
|
the exception of the merc level ). Lights are also supported, but there is a totally different methodology
|
||||||
for accomplishing this. The equivalent function is AddLightToUndoList( iMapIndex ). In this case, only the
|
for accomplishing this. The equivalent function is AddLightToUndoList( iMapIndex ). In this case, only the
|
||||||
light is saved, along with internal maintanance of several flags.
|
light is saved, along with internal maintanance of several flags.
|
||||||
|
|
||||||
The actual mapelement copy code, is very complex. The mapelement is copied in parallel with a new one which
|
The actual mapelement copy code, is very complex. The mapelement is copied in parallel with a new one which
|
||||||
has to allocate several nodes of several types because a mapelement contains over a dozen separate lists, and
|
has to allocate several nodes of several types because a mapelement contains over a dozen separate lists, and
|
||||||
all of them need to be saved. The structure information of certain mapelements may be multitiled and must
|
all of them need to be saved. The structure information of certain mapelements may be multitiled and must
|
||||||
also save the affected gridno's as well. This is also done internally. Basically, your call to
|
also save the affected gridno's as well. This is also done internally. Basically, your call to
|
||||||
AddToUndoList() for any particular gridno, may actually save several entries (like for a car which could be 6+
|
AddToUndoList() for any particular gridno, may actually save several entries (like for a car which could be 6+
|
||||||
tiles)
|
tiles)
|
||||||
|
|
||||||
MERCS
|
MERCS
|
||||||
Mercs are not supported in the undo code. Because they are so dynamic, and stats could change, they could
|
Mercs are not supported in the undo code. Because they are so dynamic, and stats could change, they could
|
||||||
move, etc., it doesn't need to be in the undo code. The editor has its own way of dealing with mercs which
|
move, etc., it doesn't need to be in the undo code. The editor has its own way of dealing with mercs which
|
||||||
doesn't use the undo methodology.
|
doesn't use the undo methodology.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@@ -75,9 +75,9 @@ typedef struct
|
|||||||
{
|
{
|
||||||
INT32 iMapIndex;
|
INT32 iMapIndex;
|
||||||
MAP_ELEMENT *pMapTile;
|
MAP_ELEMENT *pMapTile;
|
||||||
BOOLEAN fLightSaved; //determines that a light has been saved
|
BOOLEAN fLightSaved; //determines that a light has been saved
|
||||||
UINT8 ubLightRadius; //the radius of the light to build if undo is called
|
UINT8 ubLightRadius; //the radius of the light to build if undo is called
|
||||||
UINT8 ubLightID; //only applies if a light was saved.
|
UINT8 ubLightID; //only applies if a light was saved.
|
||||||
UINT8 ubRoomNum;
|
UINT8 ubRoomNum;
|
||||||
} undo_struct;
|
} undo_struct;
|
||||||
|
|
||||||
@@ -108,18 +108,18 @@ BOOLEAN fNewUndoCmd = TRUE;
|
|||||||
BOOLEAN gfIgnoreUndoCmdsForLights = FALSE;
|
BOOLEAN gfIgnoreUndoCmdsForLights = FALSE;
|
||||||
|
|
||||||
//New pre-undo binary tree stuff
|
//New pre-undo binary tree stuff
|
||||||
//With this, new undo commands will not duplicate saves in the same command. This will
|
//With this, new undo commands will not duplicate saves in the same command. This will
|
||||||
//increase speed, and save memory.
|
//increase speed, and save memory.
|
||||||
typedef struct MapIndexBinaryTree
|
typedef struct MapIndexBinaryTree
|
||||||
{
|
{
|
||||||
struct MapIndexBinaryTree *left, *right;
|
struct MapIndexBinaryTree *left, *right;
|
||||||
UINT16 usMapIndex;
|
INT16 sMapIndex;
|
||||||
}MapIndexBinaryTree;
|
}MapIndexBinaryTree;
|
||||||
|
|
||||||
MapIndexBinaryTree *top = NULL;
|
MapIndexBinaryTree *top = NULL;
|
||||||
void ClearUndoMapIndexTree();
|
void ClearUndoMapIndexTree();
|
||||||
BOOLEAN AddMapIndexToTree( UINT16 usMapIndex );
|
BOOLEAN AddMapIndexToTree( INT16 sMapIndex );
|
||||||
void CheckMapIndexForMultiTileStructures( UINT16 usMapIndex );
|
void CheckMapIndexForMultiTileStructures( INT16 sMapIndex );
|
||||||
void CheckForMultiTilesInTreeAndAddToUndoList( MapIndexBinaryTree *node );
|
void CheckForMultiTilesInTreeAndAddToUndoList( MapIndexBinaryTree *node );
|
||||||
|
|
||||||
|
|
||||||
@@ -141,14 +141,14 @@ void ClearUndoMapIndexTree()
|
|||||||
DeleteTreeNode( &top );
|
DeleteTreeNode( &top );
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN AddMapIndexToTree( UINT16 usMapIndex )
|
BOOLEAN AddMapIndexToTree( INT16 sMapIndex )
|
||||||
{
|
{
|
||||||
MapIndexBinaryTree *curr, *parent;
|
MapIndexBinaryTree *curr, *parent;
|
||||||
if( !top )
|
if( !top )
|
||||||
{
|
{
|
||||||
top = (MapIndexBinaryTree*)MemAlloc( sizeof( MapIndexBinaryTree ) );
|
top = (MapIndexBinaryTree*)MemAlloc( sizeof( MapIndexBinaryTree ) );
|
||||||
Assert( top );
|
Assert( top );
|
||||||
top->usMapIndex = usMapIndex;
|
top->sMapIndex = sMapIndex;
|
||||||
top->left = NULL;
|
top->left = NULL;
|
||||||
top->right = NULL;
|
top->right = NULL;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -161,21 +161,21 @@ BOOLEAN AddMapIndexToTree( UINT16 usMapIndex )
|
|||||||
while( curr )
|
while( curr )
|
||||||
{
|
{
|
||||||
parent = curr;
|
parent = curr;
|
||||||
if( curr->usMapIndex == usMapIndex ) //found a match, so stop
|
if( curr->sMapIndex == sMapIndex ) //found a match, so stop
|
||||||
return FALSE;
|
return FALSE;
|
||||||
//if the mapIndex is < node's mapIndex, then go left, else right
|
//if the mapIndex is < node's mapIndex, then go left, else right
|
||||||
curr = ( usMapIndex < curr->usMapIndex ) ? curr->left : curr->right;
|
curr = ( sMapIndex < curr->sMapIndex ) ? curr->left : curr->right;
|
||||||
}
|
}
|
||||||
//if we made it this far, then curr is null and parent is pointing
|
//if we made it this far, then curr is null and parent is pointing
|
||||||
//directly above.
|
//directly above.
|
||||||
//Create the new node and fill in the information.
|
//Create the new node and fill in the information.
|
||||||
curr = (MapIndexBinaryTree*)MemAlloc( sizeof( MapIndexBinaryTree ) );
|
curr = (MapIndexBinaryTree*)MemAlloc( sizeof( MapIndexBinaryTree ) );
|
||||||
Assert( curr );
|
Assert( curr );
|
||||||
curr->usMapIndex = usMapIndex;
|
curr->sMapIndex = sMapIndex;
|
||||||
curr->left = NULL;
|
curr->left = NULL;
|
||||||
curr->right = NULL;
|
curr->right = NULL;
|
||||||
//Now link the new node to the parent.
|
//Now link the new node to the parent.
|
||||||
if( curr->usMapIndex < parent->usMapIndex )
|
if( curr->sMapIndex < parent->sMapIndex )
|
||||||
parent->left = curr;
|
parent->left = curr;
|
||||||
else
|
else
|
||||||
parent->right = curr;
|
parent->right = curr;
|
||||||
@@ -356,10 +356,10 @@ void CropStackToMaxLength( INT32 iMaxCmds )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//We are adding a light to the undo list. We won't save the mapelement, nor will
|
//We are adding a light to the undo list. We won't save the mapelement, nor will
|
||||||
//we validate the gridno in the binary tree. This works differently than a mapelement,
|
//we validate the gridno in the binary tree. This works differently than a mapelement,
|
||||||
//because lights work on a different system. By setting the fLightSaved flag to TRUE,
|
//because lights work on a different system. By setting the fLightSaved flag to TRUE,
|
||||||
//this will handle the way the undo command is handled. If there is no lightradius in
|
//this will handle the way the undo command is handled. If there is no lightradius in
|
||||||
//our saved light, then we intend on erasing the light upon undo execution, otherwise, we
|
//our saved light, then we intend on erasing the light upon undo execution, otherwise, we
|
||||||
//save the light radius and light ID, so that we place it during undo execution.
|
//save the light radius and light ID, so that we place it during undo execution.
|
||||||
void AddLightToUndoList( INT32 iMapIndex, INT32 iLightRadius, UINT8 ubLightID )
|
void AddLightToUndoList( INT32 iMapIndex, INT32 iLightRadius, UINT8 ubLightID )
|
||||||
@@ -370,9 +370,9 @@ void AddLightToUndoList( INT32 iMapIndex, INT32 iLightRadius, UINT8 ubLightID )
|
|||||||
if( !gfUndoEnabled )
|
if( !gfUndoEnabled )
|
||||||
return;
|
return;
|
||||||
//When executing an undo command (by adding a light or removing one), that command
|
//When executing an undo command (by adding a light or removing one), that command
|
||||||
//actually tries to add it to the undo list. So we wrap the execution of the undo
|
//actually tries to add it to the undo list. So we wrap the execution of the undo
|
||||||
//command by temporarily setting this flag, so it'll ignore, and not place a new undo
|
//command by temporarily setting this flag, so it'll ignore, and not place a new undo
|
||||||
//command. When finished, the flag is cleared, and lights are again allowed to be saved
|
//command. When finished, the flag is cleared, and lights are again allowed to be saved
|
||||||
//in the undo list.
|
//in the undo list.
|
||||||
if( gfIgnoreUndoCmdsForLights )
|
if( gfIgnoreUndoCmdsForLights )
|
||||||
return;
|
return;
|
||||||
@@ -420,7 +420,7 @@ BOOLEAN AddToUndoList( INT32 iMapIndex )
|
|||||||
//Check to see if the tile in question is even on the visible map, then
|
//Check to see if the tile in question is even on the visible map, then
|
||||||
//if that is true, then check to make sure we don't already have the mapindex
|
//if that is true, then check to make sure we don't already have the mapindex
|
||||||
//saved in the new binary tree (which only holds unique mapindex values).
|
//saved in the new binary tree (which only holds unique mapindex values).
|
||||||
if( GridNoOnVisibleWorldTile( (INT16)iMapIndex ) && AddMapIndexToTree( (UINT16)iMapIndex ) )
|
if( GridNoOnVisibleWorldTile( (INT16)iMapIndex ) && AddMapIndexToTree( (INT16)iMapIndex ) )
|
||||||
|
|
||||||
{
|
{
|
||||||
if( AddToUndoListCmd( iMapIndex, ++iCount ) )
|
if( AddToUndoListCmd( iMapIndex, ++iCount ) )
|
||||||
@@ -496,10 +496,10 @@ BOOLEAN AddToUndoListCmd( INT32 iMapIndex, INT32 iCmdCount )
|
|||||||
|
|
||||||
// loop through pData->pStructureHead list
|
// loop through pData->pStructureHead list
|
||||||
// for each structure
|
// for each structure
|
||||||
// find the base tile
|
// find the base tile
|
||||||
// reference the db structure
|
// reference the db structure
|
||||||
// if number of tiles > 1
|
// if number of tiles > 1
|
||||||
// add all covered tiles to undo list
|
// add all covered tiles to undo list
|
||||||
pStructure = pData->pStructureHead;
|
pStructure = pData->pStructureHead;
|
||||||
while (pStructure)
|
while (pStructure)
|
||||||
{
|
{
|
||||||
@@ -519,13 +519,13 @@ BOOLEAN AddToUndoListCmd( INT32 iMapIndex, INT32 iCmdCount )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CheckMapIndexForMultiTileStructures( UINT16 usMapIndex )
|
void CheckMapIndexForMultiTileStructures( INT16 sMapIndex )
|
||||||
{
|
{
|
||||||
STRUCTURE * pStructure;
|
STRUCTURE * pStructure;
|
||||||
UINT8 ubLoop;
|
UINT8 ubLoop;
|
||||||
INT32 iCoveredMapIndex;
|
INT32 iCoveredMapIndex;
|
||||||
|
|
||||||
pStructure = gpWorldLevelData[usMapIndex].pStructureHead;
|
pStructure = gpWorldLevelData[sMapIndex].pStructureHead;
|
||||||
while (pStructure)
|
while (pStructure)
|
||||||
{
|
{
|
||||||
if (pStructure->pDBStructureRef->pDBStructure->ubNumberOfTiles > 1)
|
if (pStructure->pDBStructureRef->pDBStructure->ubNumberOfTiles > 1)
|
||||||
@@ -535,7 +535,7 @@ void CheckMapIndexForMultiTileStructures( UINT16 usMapIndex )
|
|||||||
// for multi-tile structures we have to add, to the undo list, all the other tiles covered by the structure
|
// for multi-tile structures we have to add, to the undo list, all the other tiles covered by the structure
|
||||||
if (pStructure->fFlags & STRUCTURE_BASE_TILE)
|
if (pStructure->fFlags & STRUCTURE_BASE_TILE)
|
||||||
{
|
{
|
||||||
iCoveredMapIndex = usMapIndex + pStructure->pDBStructureRef->ppTile[ubLoop]->sPosRelToBase;
|
iCoveredMapIndex = sMapIndex + pStructure->pDBStructureRef->ppTile[ubLoop]->sPosRelToBase;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -550,7 +550,7 @@ void CheckMapIndexForMultiTileStructures( UINT16 usMapIndex )
|
|||||||
|
|
||||||
void CheckForMultiTilesInTreeAndAddToUndoList( MapIndexBinaryTree *node )
|
void CheckForMultiTilesInTreeAndAddToUndoList( MapIndexBinaryTree *node )
|
||||||
{
|
{
|
||||||
CheckMapIndexForMultiTileStructures( node->usMapIndex );
|
CheckMapIndexForMultiTileStructures( node->sMapIndex );
|
||||||
if( node->left )
|
if( node->left )
|
||||||
CheckForMultiTilesInTreeAndAddToUndoList( node->left );
|
CheckForMultiTilesInTreeAndAddToUndoList( node->left );
|
||||||
if( node->right )
|
if( node->right )
|
||||||
@@ -590,14 +590,14 @@ BOOLEAN ExecuteUndoList( void )
|
|||||||
{
|
{
|
||||||
iUndoMapIndex = gpTileUndoStack->pData->iMapIndex;
|
iUndoMapIndex = gpTileUndoStack->pData->iMapIndex;
|
||||||
|
|
||||||
fExitGrid = ExitGridAtGridNo( (UINT16)iUndoMapIndex );
|
fExitGrid = ExitGridAtGridNo( (INT16)iUndoMapIndex );
|
||||||
|
|
||||||
// Find which map tile we are to "undo"
|
// Find which map tile we are to "undo"
|
||||||
if( gpTileUndoStack->pData->fLightSaved )
|
if( gpTileUndoStack->pData->fLightSaved )
|
||||||
{ //We saved a light, so delete that light
|
{ //We saved a light, so delete that light
|
||||||
INT16 sX, sY;
|
INT16 sX, sY;
|
||||||
//Turn on this flag so that the following code, when executed, doesn't attempt to
|
//Turn on this flag so that the following code, when executed, doesn't attempt to
|
||||||
//add lights to the undo list. That would cause problems...
|
//add lights to the undo list. That would cause problems...
|
||||||
gfIgnoreUndoCmdsForLights = TRUE;
|
gfIgnoreUndoCmdsForLights = TRUE;
|
||||||
ConvertGridNoToXY( (INT16)iUndoMapIndex, &sX, &sY );
|
ConvertGridNoToXY( (INT16)iUndoMapIndex, &sX, &sY );
|
||||||
if( !gpTileUndoStack->pData->ubLightRadius )
|
if( !gpTileUndoStack->pData->ubLightRadius )
|
||||||
@@ -627,16 +627,16 @@ BOOLEAN ExecuteUndoList( void )
|
|||||||
iCurCount++;
|
iCurCount++;
|
||||||
|
|
||||||
//Kris:
|
//Kris:
|
||||||
//The new cursor system is somehow interfering with the undo stuff. When
|
//The new cursor system is somehow interfering with the undo stuff. When
|
||||||
//an undo is called, the item is erased, but a cursor is added! I'm quickly
|
//an undo is called, the item is erased, but a cursor is added! I'm quickly
|
||||||
//hacking around this by erasing all cursors here.
|
//hacking around this by erasing all cursors here.
|
||||||
RemoveAllTopmostsOfTypeRange( iUndoMapIndex, FIRSTPOINTERS, FIRSTPOINTERS );
|
RemoveAllTopmostsOfTypeRange( iUndoMapIndex, FIRSTPOINTERS, FIRSTPOINTERS );
|
||||||
|
|
||||||
if( fExitGrid && !ExitGridAtGridNo( (UINT16)iUndoMapIndex ) )
|
if( fExitGrid && !ExitGridAtGridNo( (INT16)iUndoMapIndex ) )
|
||||||
{ //An exitgrid has been removed, so get rid of the associated indicator.
|
{ //An exitgrid has been removed, so get rid of the associated indicator.
|
||||||
RemoveTopmost( (UINT16)iUndoMapIndex, FIRSTPOINTERS8 );
|
RemoveTopmost( (UINT16)iUndoMapIndex, FIRSTPOINTERS8 );
|
||||||
}
|
}
|
||||||
else if( !fExitGrid && ExitGridAtGridNo( (UINT16)iUndoMapIndex ) )
|
else if( !fExitGrid && ExitGridAtGridNo( (INT16)iUndoMapIndex ) )
|
||||||
{ //An exitgrid has been added, so add the associated indicator
|
{ //An exitgrid has been added, so add the associated indicator
|
||||||
AddTopmostToTail( (UINT16)iUndoMapIndex, FIRSTPOINTERS8 );
|
AddTopmostToTail( (UINT16)iUndoMapIndex, FIRSTPOINTERS8 );
|
||||||
}
|
}
|
||||||
@@ -731,7 +731,7 @@ void SmoothUndoMapTileTerrain( INT32 iWorldTile, MAP_ELEMENT *pUndoTile )
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Because of the potentially huge amounts of memory that can be allocated due to the inefficient
|
//Because of the potentially huge amounts of memory that can be allocated due to the inefficient
|
||||||
//undo methods coded by Bret, it is feasible that it could fail. Instead of using assertions to
|
//undo methods coded by Bret, it is feasible that it could fail. Instead of using assertions to
|
||||||
//terminate the program, destroy the memory allocated thusfar.
|
//terminate the program, destroy the memory allocated thusfar.
|
||||||
void DeleteMapElementContentsAfterCreationFail( MAP_ELEMENT *pNewMapElement )
|
void DeleteMapElementContentsAfterCreationFail( MAP_ELEMENT *pNewMapElement )
|
||||||
{
|
{
|
||||||
@@ -787,7 +787,7 @@ BOOLEAN CopyMapElementFromWorld( MAP_ELEMENT *pNewMapElement, INT32 iMapIndex )
|
|||||||
{
|
{
|
||||||
MAP_ELEMENT *pOldMapElement;
|
MAP_ELEMENT *pOldMapElement;
|
||||||
LEVELNODE *pOldLevelNode;
|
LEVELNODE *pOldLevelNode;
|
||||||
LEVELNODE *pLevelNode;
|
LEVELNODE *pLevelNode;
|
||||||
LEVELNODE *pNewLevelNode;
|
LEVELNODE *pNewLevelNode;
|
||||||
LEVELNODE *tail;
|
LEVELNODE *tail;
|
||||||
INT32 x;
|
INT32 x;
|
||||||
@@ -832,7 +832,7 @@ BOOLEAN CopyMapElementFromWorld( MAP_ELEMENT *pNewMapElement, INT32 iMapIndex )
|
|||||||
//place the new node inside of the new map element
|
//place the new node inside of the new map element
|
||||||
if( !pNewStructure )
|
if( !pNewStructure )
|
||||||
{
|
{
|
||||||
pNewMapElement->pStructureHead = pStructure;
|
pNewMapElement->pStructureHead = pStructure;
|
||||||
pNewStructure = pStructure;
|
pNewStructure = pStructure;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -886,7 +886,7 @@ BOOLEAN CopyMapElementFromWorld( MAP_ELEMENT *pNewMapElement, INT32 iMapIndex )
|
|||||||
//place the new node inside of the new map element
|
//place the new node inside of the new map element
|
||||||
if( !pNewLevelNode )
|
if( !pNewLevelNode )
|
||||||
{
|
{
|
||||||
pNewMapElement->pLevelNodes[ x ] = pLevelNode;
|
pNewMapElement->pLevelNodes[ x ] = pLevelNode;
|
||||||
pNewLevelNode = pLevelNode;
|
pNewLevelNode = pLevelNode;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -916,7 +916,7 @@ BOOLEAN CopyMapElementFromWorld( MAP_ELEMENT *pNewMapElement, INT32 iMapIndex )
|
|||||||
{ //make sure the structuredata pointer points to the parallel structure
|
{ //make sure the structuredata pointer points to the parallel structure
|
||||||
STRUCTURE *pOld, *pNew;
|
STRUCTURE *pOld, *pNew;
|
||||||
//both lists are exactly the same size and contain the same information,
|
//both lists are exactly the same size and contain the same information,
|
||||||
//but the addresses are different. We will traverse the old list until
|
//but the addresses are different. We will traverse the old list until
|
||||||
//we find the match, then
|
//we find the match, then
|
||||||
pOld = pOldMapElement->pStructureHead;
|
pOld = pOldMapElement->pStructureHead;
|
||||||
pNew = pNewMapElement->pStructureHead;
|
pNew = pNewMapElement->pStructureHead;
|
||||||
@@ -936,7 +936,7 @@ BOOLEAN CopyMapElementFromWorld( MAP_ELEMENT *pNewMapElement, INT32 iMapIndex )
|
|||||||
//the preservation of the structure data within the mapelement.
|
//the preservation of the structure data within the mapelement.
|
||||||
if( pOld != pOldLevelNode->pStructureData )
|
if( pOld != pOldLevelNode->pStructureData )
|
||||||
{
|
{
|
||||||
//OUCH!!! THIS IS HAPPENING. DISABLED IT FOR LINDA'S SAKE
|
//OUCH!!! THIS IS HAPPENING. DISABLED IT FOR LINDA'S SAKE
|
||||||
Assert( 1 );
|
Assert( 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -968,7 +968,7 @@ BOOLEAN SwapMapElementWithWorld( INT32 iMapIndex, MAP_ELEMENT *pUndoMapElement )
|
|||||||
pCurrentMapElement = &gpWorldLevelData[ iMapIndex ];
|
pCurrentMapElement = &gpWorldLevelData[ iMapIndex ];
|
||||||
|
|
||||||
//Transfer the merc level node from the current world to the undo mapelement
|
//Transfer the merc level node from the current world to the undo mapelement
|
||||||
//that will replace it. We do this, because mercs aren't associated with
|
//that will replace it. We do this, because mercs aren't associated with
|
||||||
//undo commands.
|
//undo commands.
|
||||||
pUndoMapElement->pMercHead = gpWorldLevelData[ iMapIndex ].pMercHead;
|
pUndoMapElement->pMercHead = gpWorldLevelData[ iMapIndex ].pMercHead;
|
||||||
gpWorldLevelData[ iMapIndex ].pMercHead = NULL;
|
gpWorldLevelData[ iMapIndex ].pMercHead = NULL;
|
||||||
@@ -986,8 +986,8 @@ void DetermineUndoState()
|
|||||||
// Reset the undo command mode if we released the left button.
|
// Reset the undo command mode if we released the left button.
|
||||||
if( !fNewUndoCmd )
|
if( !fNewUndoCmd )
|
||||||
{
|
{
|
||||||
if( !gfLeftButtonState && !gfCurrentSelectionWithRightButton ||
|
if( !gfLeftButtonState && !gfCurrentSelectionWithRightButton ||
|
||||||
!gfRightButtonState && gfCurrentSelectionWithRightButton )
|
!gfRightButtonState && gfCurrentSelectionWithRightButton )
|
||||||
{
|
{
|
||||||
//Clear the mapindex binary tree list, and set up flag for new undo command.
|
//Clear the mapindex binary tree list, and set up flag for new undo command.
|
||||||
fNewUndoCmd = TRUE;
|
fNewUndoCmd = TRUE;
|
||||||
|
|||||||
+16
-15
@@ -99,9 +99,9 @@ void UpdateBuildingsInfo()
|
|||||||
//1) if there isn't structure info here, return.
|
//1) if there isn't structure info here, return.
|
||||||
//2) if there is structure info here, delete it now.
|
//2) if there is structure info here, delete it now.
|
||||||
//3) KillBuilding at x-1, y.
|
//3) KillBuilding at x-1, y.
|
||||||
//4) KillBuilding at x , y-1.
|
//4) KillBuilding at x , y-1.
|
||||||
//5) KillBuilding at x+1, y.
|
//5) KillBuilding at x+1, y.
|
||||||
//6) KillBuilding at x , y+1.
|
//6) KillBuilding at x , y+1.
|
||||||
void KillBuilding( UINT32 iMapIndex )
|
void KillBuilding( UINT32 iMapIndex )
|
||||||
{
|
{
|
||||||
BOOLEAN fFound = FALSE;
|
BOOLEAN fFound = FALSE;
|
||||||
@@ -120,13 +120,13 @@ void KillBuilding( UINT32 iMapIndex )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( GridNoOnVisibleWorldTile( (UINT16)( iMapIndex - WORLD_COLS ) ) )
|
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex - WORLD_COLS ) ) )
|
||||||
KillBuilding( iMapIndex - WORLD_COLS );
|
KillBuilding( iMapIndex - WORLD_COLS );
|
||||||
if( GridNoOnVisibleWorldTile( (UINT16)( iMapIndex + WORLD_COLS ) ) )
|
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex + WORLD_COLS ) ) )
|
||||||
KillBuilding( iMapIndex + WORLD_COLS );
|
KillBuilding( iMapIndex + WORLD_COLS );
|
||||||
if( GridNoOnVisibleWorldTile( (UINT16)( iMapIndex + 1 ) ) )
|
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex + 1 ) ) )
|
||||||
KillBuilding( iMapIndex + 1 );
|
KillBuilding( iMapIndex + 1 );
|
||||||
if( GridNoOnVisibleWorldTile( (UINT16)( iMapIndex - 1 ) ) )
|
if( GridNoOnVisibleWorldTile( (INT16)( iMapIndex - 1 ) ) )
|
||||||
KillBuilding( iMapIndex - 1 );
|
KillBuilding( iMapIndex - 1 );
|
||||||
|
|
||||||
if( gfBasement )
|
if( gfBasement )
|
||||||
@@ -193,16 +193,16 @@ void BuildLayout( INT32 iMapIndex, INT32 iOffset )
|
|||||||
BuildLayout( iMapIndex, WORLD_COLS );
|
BuildLayout( iMapIndex, WORLD_COLS );
|
||||||
}
|
}
|
||||||
|
|
||||||
//The first step is copying a building. After that, it either must be pasted or moved.
|
//The first step is copying a building. After that, it either must be pasted or moved.
|
||||||
void CopyBuilding( INT32 iMapIndex )
|
void CopyBuilding( INT32 iMapIndex )
|
||||||
{
|
{
|
||||||
AssertMsg( !gpBuildingLayoutList, "Error: Attempting to copy building multiple times." );
|
AssertMsg( !gpBuildingLayoutList, "Error: Attempting to copy building multiple times." );
|
||||||
|
|
||||||
//First step is to determine if we have a building in the area that we click. If not, do nothing.
|
//First step is to determine if we have a building in the area that we click. If not, do nothing.
|
||||||
if( !BuildingAtGridNo( iMapIndex ) )
|
if( !BuildingAtGridNo( iMapIndex ) )
|
||||||
return;
|
return;
|
||||||
//Okay, a building does exist here to some undetermined capacity.
|
//Okay, a building does exist here to some undetermined capacity.
|
||||||
//Allocate the basic structure, then calculate the layout. The head node is
|
//Allocate the basic structure, then calculate the layout. The head node is
|
||||||
gpBuildingLayoutList = (BUILDINGLAYOUTNODE*)MemAlloc( sizeof( BUILDINGLAYOUTNODE ) );
|
gpBuildingLayoutList = (BUILDINGLAYOUTNODE*)MemAlloc( sizeof( BUILDINGLAYOUTNODE ) );
|
||||||
Assert( gpBuildingLayoutList );
|
Assert( gpBuildingLayoutList );
|
||||||
gpBuildingLayoutList->sGridNo = (INT16)iMapIndex;
|
gpBuildingLayoutList->sGridNo = (INT16)iMapIndex;
|
||||||
@@ -211,15 +211,15 @@ void CopyBuilding( INT32 iMapIndex )
|
|||||||
//Set the anchor point for this building -- this is where the user clicked.
|
//Set the anchor point for this building -- this is where the user clicked.
|
||||||
gsBuildingLayoutAnchorGridNo = (INT16)iMapIndex;
|
gsBuildingLayoutAnchorGridNo = (INT16)iMapIndex;
|
||||||
|
|
||||||
//Now, recursively expand out while adding unique gridnos to our list. The recursion will
|
//Now, recursively expand out while adding unique gridnos to our list. The recursion will
|
||||||
//terminate when complete.
|
//terminate when complete.
|
||||||
BuildLayout( iMapIndex, -WORLD_COLS );
|
BuildLayout( iMapIndex, -WORLD_COLS );
|
||||||
BuildLayout( iMapIndex, -1 );
|
BuildLayout( iMapIndex, -1 );
|
||||||
BuildLayout( iMapIndex, 1 );
|
BuildLayout( iMapIndex, 1 );
|
||||||
BuildLayout( iMapIndex, WORLD_COLS );
|
BuildLayout( iMapIndex, WORLD_COLS );
|
||||||
|
|
||||||
//We have our layout. Now depending on the mode, we will either move the building or
|
//We have our layout. Now depending on the mode, we will either move the building or
|
||||||
//copy it. The layout automatically gets deleted as soon as the user releases the mouse
|
//copy it. The layout automatically gets deleted as soon as the user releases the mouse
|
||||||
//button.
|
//button.
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -574,7 +574,7 @@ void ExtractAndUpdateDoorInfo()
|
|||||||
|
|
||||||
num = min( max( GetNumericStrictValueFromField( 2 ), 0 ), 20 );
|
num = min( max( GetNumericStrictValueFromField( 2 ), 0 ), 20 );
|
||||||
if( door.ubTrapID && !num )
|
if( door.ubTrapID && !num )
|
||||||
num = 1; //Can't have a trap without a traplevel!
|
num = 1; //Can't have a trap without a traplevel!
|
||||||
door.ubTrapLevel = (UINT8)num;
|
door.ubTrapLevel = (UINT8)num;
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, num );
|
SetInputFieldStringWithNumericStrictValue( 2, num );
|
||||||
if( num )
|
if( num )
|
||||||
@@ -730,7 +730,7 @@ void SetupTextInputForBuildings()
|
|||||||
{
|
{
|
||||||
CHAR16 str[4];
|
CHAR16 str[4];
|
||||||
InitTextInputModeWithScheme( DEFAULT_SCHEME );
|
InitTextInputModeWithScheme( DEFAULT_SCHEME );
|
||||||
AddUserInputField( NULL ); //just so we can use short cut keys while not typing.
|
AddUserInputField( NULL ); //just so we can use short cut keys while not typing.
|
||||||
swprintf( str, L"%d", gubMaxRoomNumber );
|
swprintf( str, L"%d", gubMaxRoomNumber );
|
||||||
AddTextInputField( iScreenWidthOffset + 410, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 410, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
}
|
}
|
||||||
@@ -763,3 +763,4 @@ void ExtractAndUpdateBuildingInfo()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ typedef struct BUILDINGLAYOUTNODE
|
|||||||
extern BUILDINGLAYOUTNODE *gpBuildingLayoutList;
|
extern BUILDINGLAYOUTNODE *gpBuildingLayoutList;
|
||||||
extern INT16 gsBuildingLayoutAnchorGridNo;
|
extern INT16 gsBuildingLayoutAnchorGridNo;
|
||||||
|
|
||||||
//The first step is copying a building. After that, it either must be pasted or moved.
|
//The first step is copying a building. After that, it either must be pasted or moved.
|
||||||
void CopyBuilding( INT32 iMapIndex );
|
void CopyBuilding( INT32 iMapIndex );
|
||||||
void MoveBuilding( INT32 iMapIndex );
|
void MoveBuilding( INT32 iMapIndex );
|
||||||
void PasteBuilding( INT32 iMapIndex );
|
void PasteBuilding( INT32 iMapIndex );
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ enum
|
|||||||
TBAR_MODE_ITEM_WEAPONS,
|
TBAR_MODE_ITEM_WEAPONS,
|
||||||
TBAR_MODE_ITEM_AMMO,
|
TBAR_MODE_ITEM_AMMO,
|
||||||
TBAR_MODE_ITEM_ARMOUR,
|
TBAR_MODE_ITEM_ARMOUR,
|
||||||
|
TBAR_MODE_ITEM_LBEGEAR,
|
||||||
TBAR_MODE_ITEM_EXPLOSIVES,
|
TBAR_MODE_ITEM_EXPLOSIVES,
|
||||||
TBAR_MODE_ITEM_EQUIPMENT1,
|
TBAR_MODE_ITEM_EQUIPMENT1,
|
||||||
TBAR_MODE_ITEM_EQUIPMENT2,
|
TBAR_MODE_ITEM_EQUIPMENT2,
|
||||||
@@ -221,7 +222,7 @@ enum
|
|||||||
DRAW_MODE_SELECT_BRUSH = 200,
|
DRAW_MODE_SELECT_BRUSH = 200,
|
||||||
DRAW_MODE_FILL_AREA,
|
DRAW_MODE_FILL_AREA,
|
||||||
DRAW_MODE_UNDO,
|
DRAW_MODE_UNDO,
|
||||||
DRAW_MODE_ERASE = 1000
|
DRAW_MODE_ERASE = 1000
|
||||||
};
|
};
|
||||||
|
|
||||||
extern INT32 iEditorButton[NUMBER_EDITOR_BUTTONS];
|
extern INT32 iEditorButton[NUMBER_EDITOR_BUTTONS];
|
||||||
@@ -244,7 +245,7 @@ extern BOOLEAN gfPendingBasement;
|
|||||||
extern BOOLEAN gfPendingCaves;
|
extern BOOLEAN gfPendingCaves;
|
||||||
|
|
||||||
//When in merc-inventory mode, this flag is set when the user wishes to get an item, which requires hooking
|
//When in merc-inventory mode, this flag is set when the user wishes to get an item, which requires hooking
|
||||||
//into the item editing features. It is defined here, so editoritems can get access to this mode which makes
|
//into the item editing features. It is defined here, so editoritems can get access to this mode which makes
|
||||||
//certain special cases.
|
//certain special cases.
|
||||||
extern BOOLEAN gfMercGetItem;
|
extern BOOLEAN gfMercGetItem;
|
||||||
|
|
||||||
@@ -262,3 +263,5 @@ extern BOOLEAN gfShowItemStatsPanel;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+132
-117
@@ -49,14 +49,14 @@
|
|||||||
|
|
||||||
extern ITEM_POOL *gpEditingItemPool;
|
extern ITEM_POOL *gpEditingItemPool;
|
||||||
|
|
||||||
//Simply counts the number of items in the world. This is used for display purposes.
|
//Simply counts the number of items in the world. This is used for display purposes.
|
||||||
UINT16 CountNumberOfEditorPlacementsInWorld( UINT16 usEInfoIndex, UINT16 *pusQuantity ); //wrapper for the next three
|
UINT16 CountNumberOfEditorPlacementsInWorld( UINT16 usEInfoIndex, UINT16 *pusQuantity ); //wrapper for the next three
|
||||||
UINT16 CountNumberOfItemPlacementsInWorld( UINT16 usItem, UINT16 *pusQuantity );
|
UINT16 CountNumberOfItemPlacementsInWorld( UINT16 usItem, UINT16 *pusQuantity );
|
||||||
UINT16 CountNumberOfItemsWithFrequency( UINT16 usItem, INT8 bFrequency );
|
UINT16 CountNumberOfItemsWithFrequency( UINT16 usItem, INT8 bFrequency );
|
||||||
UINT16 CountNumberOfPressureActionsInWorld();
|
UINT16 CountNumberOfPressureActionsInWorld();
|
||||||
UINT16 CountNumberOfKeysOfTypeInWorld( UINT8 ubKeyID );
|
UINT16 CountNumberOfKeysOfTypeInWorld( UINT8 ubKeyID );
|
||||||
|
|
||||||
//Finds and selects the next item when right clicking on an item type. Only works if the
|
//Finds and selects the next item when right clicking on an item type. Only works if the
|
||||||
//item actually exists in the world.
|
//item actually exists in the world.
|
||||||
void FindNextItemOfSelectedType(); //wrapper for the next four
|
void FindNextItemOfSelectedType(); //wrapper for the next four
|
||||||
void SelectNextTriggerWithFrequency( UINT16 usItem, INT8 bFrequency );
|
void SelectNextTriggerWithFrequency( UINT16 usItem, INT8 bFrequency );
|
||||||
@@ -85,7 +85,7 @@ void BuildItemPoolList()
|
|||||||
KillItemPoolList();
|
KillItemPoolList();
|
||||||
for( i = 0; i < WORLD_MAX; i++ )
|
for( i = 0; i < WORLD_MAX; i++ )
|
||||||
{
|
{
|
||||||
if( GetItemPool( i, &temp , 0) )
|
if( GetItemPoolFromGround( i, &temp ) )
|
||||||
{
|
{
|
||||||
if( !pIPHead )
|
if( !pIPHead )
|
||||||
{
|
{
|
||||||
@@ -151,7 +151,7 @@ void EntryInitEditorItemsInfo()
|
|||||||
eInfo.sNumTriggers = NUMBER_TRIGGERS;
|
eInfo.sNumTriggers = NUMBER_TRIGGERS;
|
||||||
for( i=0; i < MAXITEMS; i++ )
|
for( i=0; i < MAXITEMS; i++ )
|
||||||
{
|
{
|
||||||
if ( Item[i].usItemClass == 0 )
|
if ( Item[i].usItemClass == 0 )
|
||||||
break;
|
break;
|
||||||
item = &Item[i];
|
item = &Item[i];
|
||||||
//if( Item[i].fFlags & ITEM_NOT_EDITOR )
|
//if( Item[i].fFlags & ITEM_NOT_EDITOR )
|
||||||
@@ -181,6 +181,9 @@ void EntryInitEditorItemsInfo()
|
|||||||
case IC_ARMOUR:
|
case IC_ARMOUR:
|
||||||
eInfo.sNumArmour++;
|
eInfo.sNumArmour++;
|
||||||
break;
|
break;
|
||||||
|
case IC_LBEGEAR:
|
||||||
|
eInfo.sLBEGear++;
|
||||||
|
break;
|
||||||
case IC_GRENADE:
|
case IC_GRENADE:
|
||||||
case IC_BOMB:
|
case IC_BOMB:
|
||||||
eInfo.sNumExplosives++;
|
eInfo.sNumExplosives++;
|
||||||
@@ -188,11 +191,11 @@ void EntryInitEditorItemsInfo()
|
|||||||
case IC_MEDKIT:
|
case IC_MEDKIT:
|
||||||
case IC_KIT:
|
case IC_KIT:
|
||||||
case IC_FACE:
|
case IC_FACE:
|
||||||
case IC_MISC:
|
|
||||||
case IC_MONEY:
|
case IC_MONEY:
|
||||||
if( eInfo.sNumEquipment1 < 30 )
|
eInfo.sNumEquipment1++;
|
||||||
eInfo.sNumEquipment1++;
|
break;
|
||||||
else if( eInfo.sNumEquipment2 < 30 )
|
case IC_MISC:
|
||||||
|
if( eInfo.sNumEquipment2 < eInfo.sNumEquipment3 )
|
||||||
eInfo.sNumEquipment2++;
|
eInfo.sNumEquipment2++;
|
||||||
else
|
else
|
||||||
eInfo.sNumEquipment3++;
|
eInfo.sNumEquipment3++;
|
||||||
@@ -209,7 +212,7 @@ void EntryInitEditorItemsInfo()
|
|||||||
void InitEditorItemsInfo(UINT32 uiItemType)
|
void InitEditorItemsInfo(UINT32 uiItemType)
|
||||||
{
|
{
|
||||||
VSURFACE_DESC vs_desc;
|
VSURFACE_DESC vs_desc;
|
||||||
UINT8 *pDestBuf, *pSrcBuf;
|
UINT8 *pDestBuf, *pSrcBuf;
|
||||||
UINT32 uiSrcPitchBYTES, uiDestPitchBYTES;
|
UINT32 uiSrcPitchBYTES, uiDestPitchBYTES;
|
||||||
INVTYPE *item;
|
INVTYPE *item;
|
||||||
SGPRect SaveRect, NewRect;
|
SGPRect SaveRect, NewRect;
|
||||||
@@ -265,6 +268,11 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
|||||||
eInfo.sScrollIndex = eInfo.sSaveArmourScrollIndex;
|
eInfo.sScrollIndex = eInfo.sSaveArmourScrollIndex;
|
||||||
eInfo.sSelItemIndex = eInfo.sSaveSelArmourIndex;
|
eInfo.sSelItemIndex = eInfo.sSaveSelArmourIndex;
|
||||||
break;
|
break;
|
||||||
|
case TBAR_MODE_ITEM_LBEGEAR:
|
||||||
|
eInfo.sNumItems = eInfo.sLBEGear;
|
||||||
|
eInfo.sScrollIndex = eInfo.sSaveLBEScrollIndex;
|
||||||
|
eInfo.sSelItemIndex = eInfo.sSaveSelLBEIndex;
|
||||||
|
break;
|
||||||
case TBAR_MODE_ITEM_EXPLOSIVES:
|
case TBAR_MODE_ITEM_EXPLOSIVES:
|
||||||
eInfo.sNumItems = eInfo.sNumExplosives;
|
eInfo.sNumItems = eInfo.sNumExplosives;
|
||||||
eInfo.sScrollIndex = eInfo.sSaveExplosivesScrollIndex;
|
eInfo.sScrollIndex = eInfo.sSaveExplosivesScrollIndex;
|
||||||
@@ -307,7 +315,7 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
|||||||
DetermineItemsScrolling();
|
DetermineItemsScrolling();
|
||||||
//calculate the width of the buffer based on the number of items.
|
//calculate the width of the buffer based on the number of items.
|
||||||
//every pair of items (odd rounded up) requires 60 pixels for width.
|
//every pair of items (odd rounded up) requires 60 pixels for width.
|
||||||
//the minimum buffer size is 420. Height is always 80 pixels.
|
//the minimum buffer size is 420. Height is always 80 pixels.
|
||||||
|
|
||||||
eInfo.sWidth = (eInfo.sNumItems > 12) ? ((eInfo.sNumItems+1)/2)*60 : SCREEN_HEIGHT - 120;
|
eInfo.sWidth = (eInfo.sNumItems > 12) ? ((eInfo.sNumItems+1)/2)*60 : SCREEN_HEIGHT - 120;
|
||||||
eInfo.sHeight = 80;
|
eInfo.sHeight = 80;
|
||||||
@@ -318,7 +326,7 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
|||||||
vs_desc.usHeight = eInfo.sHeight;
|
vs_desc.usHeight = eInfo.sHeight;
|
||||||
vs_desc.ubBitDepth = ubBitDepth;
|
vs_desc.ubBitDepth = ubBitDepth;
|
||||||
|
|
||||||
//!!!Memory check. Create the item buffer
|
//!!!Memory check. Create the item buffer
|
||||||
if(!AddVideoSurface( &vs_desc, &eInfo.uiBuffer ))
|
if(!AddVideoSurface( &vs_desc, &eInfo.uiBuffer ))
|
||||||
{
|
{
|
||||||
eInfo.fKill = TRUE;
|
eInfo.fKill = TRUE;
|
||||||
@@ -364,7 +372,7 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
|||||||
SetFontDestBuffer( eInfo.uiBuffer, 0, 0, eInfo.sWidth, eInfo.sHeight, FALSE );
|
SetFontDestBuffer( eInfo.uiBuffer, 0, 0, eInfo.sWidth, eInfo.sHeight, FALSE );
|
||||||
|
|
||||||
swprintf( pStr, L"%S", LockTable[ i ].ubEditorName );
|
swprintf( pStr, L"%S", LockTable[ i ].ubEditorName );
|
||||||
DisplayWrappedString(x, (UINT16)(y+25), 60, 2, SMALLCOMPFONT, FONT_WHITE, pStr, FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
DisplayWrappedString(x, (UINT16)(y+25), 60, 2, SMALLCOMPFONT, FONT_WHITE, pStr, FONT_BLACK, TRUE, CENTER_JUSTIFIED );
|
||||||
|
|
||||||
//Calculate the center position of the graphic in a 60 pixel wide area.
|
//Calculate the center position of the graphic in a 60 pixel wide area.
|
||||||
sWidth = hVObject->pETRLEObject[item->ubGraphicNum].usWidth;
|
sWidth = hVObject->pETRLEObject[item->ubGraphicNum].usWidth;
|
||||||
@@ -391,7 +399,7 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
|||||||
fTypeMatch = FALSE;
|
fTypeMatch = FALSE;
|
||||||
while( usCounter<MAXITEMS && !fTypeMatch )
|
while( usCounter<MAXITEMS && !fTypeMatch )
|
||||||
{
|
{
|
||||||
if ( Item[usCounter].usItemClass == 0 )
|
if ( Item[usCounter].usItemClass == 0 )
|
||||||
break;
|
break;
|
||||||
item = &Item[usCounter];
|
item = &Item[usCounter];
|
||||||
//if( Item[usCounter].fFlags & ITEM_NOT_EDITOR )
|
//if( Item[usCounter].fFlags & ITEM_NOT_EDITOR )
|
||||||
@@ -433,6 +441,9 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
|||||||
case IC_ARMOUR:
|
case IC_ARMOUR:
|
||||||
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_ARMOUR;
|
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_ARMOUR;
|
||||||
break;
|
break;
|
||||||
|
case IC_LBEGEAR:
|
||||||
|
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_LBEGEAR;
|
||||||
|
break;
|
||||||
case IC_GRENADE:
|
case IC_GRENADE:
|
||||||
case IC_BOMB:
|
case IC_BOMB:
|
||||||
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EXPLOSIVES;
|
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EXPLOSIVES;
|
||||||
@@ -440,13 +451,13 @@ void InitEditorItemsInfo(UINT32 uiItemType)
|
|||||||
case IC_MEDKIT:
|
case IC_MEDKIT:
|
||||||
case IC_KIT:
|
case IC_KIT:
|
||||||
case IC_FACE:
|
case IC_FACE:
|
||||||
case IC_MISC:
|
|
||||||
case IC_MONEY:
|
case IC_MONEY:
|
||||||
|
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EQUIPMENT1;
|
||||||
|
break;
|
||||||
|
case IC_MISC:
|
||||||
if( usCounter == ACTION_ITEM || usCounter == SWITCH )
|
if( usCounter == ACTION_ITEM || usCounter == SWITCH )
|
||||||
break;
|
break;
|
||||||
if( iEquipCount < 30 )
|
if( iEquipCount < eInfo.sNumEquipment2 )
|
||||||
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EQUIPMENT1;
|
|
||||||
else if( iEquipCount < 60 )
|
|
||||||
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EQUIPMENT2;
|
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EQUIPMENT2;
|
||||||
else
|
else
|
||||||
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EQUIPMENT3;
|
fTypeMatch = eInfo.uiItemType == TBAR_MODE_ITEM_EQUIPMENT3;
|
||||||
@@ -545,7 +556,7 @@ void DetermineItemsScrolling()
|
|||||||
DisableEditorButton( ITEMS_LEFTSCROLL );
|
DisableEditorButton( ITEMS_LEFTSCROLL );
|
||||||
else
|
else
|
||||||
EnableEditorButton( ITEMS_LEFTSCROLL );
|
EnableEditorButton( ITEMS_LEFTSCROLL );
|
||||||
//Right most scroll position. Calculated by taking every pair of numItems rounded up,
|
//Right most scroll position. Calculated by taking every pair of numItems rounded up,
|
||||||
//and subtracting 7 (because a scroll index 0 is disabled if there are <=12 items,
|
//and subtracting 7 (because a scroll index 0 is disabled if there are <=12 items,
|
||||||
//index 1 for <=14 items, index 2 for <=16 items...
|
//index 1 for <=14 items, index 2 for <=16 items...
|
||||||
if( eInfo.sScrollIndex == max( ((eInfo.sNumItems+1)/2)-6, 0 ) )
|
if( eInfo.sScrollIndex == max( ((eInfo.sNumItems+1)/2)-6, 0 ) )
|
||||||
@@ -556,7 +567,7 @@ void DetermineItemsScrolling()
|
|||||||
|
|
||||||
void RenderEditorItemsInfo()
|
void RenderEditorItemsInfo()
|
||||||
{
|
{
|
||||||
UINT8 *pDestBuf, *pSrcBuf;
|
UINT8 *pDestBuf, *pSrcBuf;
|
||||||
UINT32 uiSrcPitchBYTES, uiDestPitchBYTES;
|
UINT32 uiSrcPitchBYTES, uiDestPitchBYTES;
|
||||||
INVTYPE *item;
|
INVTYPE *item;
|
||||||
HVOBJECT hVObject;
|
HVOBJECT hVObject;
|
||||||
@@ -585,7 +596,7 @@ void RenderEditorItemsInfo()
|
|||||||
UnLockVideoSurface(eInfo.uiBuffer);
|
UnLockVideoSurface(eInfo.uiBuffer);
|
||||||
UnLockVideoSurface(FRAME_BUFFER);
|
UnLockVideoSurface(FRAME_BUFFER);
|
||||||
|
|
||||||
//calculate the min and max index that is currently shown. This determines
|
//calculate the min and max index that is currently shown. This determines
|
||||||
//if the highlighted and/or selected items are drawn with the outlines.
|
//if the highlighted and/or selected items are drawn with the outlines.
|
||||||
minIndex = eInfo.sScrollIndex * 2;
|
minIndex = eInfo.sScrollIndex * 2;
|
||||||
maxIndex = minIndex + 11;
|
maxIndex = minIndex + 11;
|
||||||
@@ -683,6 +694,10 @@ void ClearEditorItemsInfo()
|
|||||||
eInfo.sSaveSelArmourIndex = eInfo.sSelItemIndex;
|
eInfo.sSaveSelArmourIndex = eInfo.sSelItemIndex;
|
||||||
eInfo.sSaveArmourScrollIndex = eInfo.sScrollIndex;
|
eInfo.sSaveArmourScrollIndex = eInfo.sScrollIndex;
|
||||||
break;
|
break;
|
||||||
|
case TBAR_MODE_ITEM_LBEGEAR:
|
||||||
|
eInfo.sSaveSelLBEIndex = eInfo.sSelItemIndex;
|
||||||
|
eInfo.sSaveLBEScrollIndex = eInfo.sScrollIndex;
|
||||||
|
break;
|
||||||
case TBAR_MODE_ITEM_EXPLOSIVES:
|
case TBAR_MODE_ITEM_EXPLOSIVES:
|
||||||
eInfo.sSaveSelExplosivesIndex = eInfo.sSelItemIndex;
|
eInfo.sSaveSelExplosivesIndex = eInfo.sSelItemIndex;
|
||||||
eInfo.sSaveExplosivesScrollIndex = eInfo.sScrollIndex;
|
eInfo.sSaveExplosivesScrollIndex = eInfo.sScrollIndex;
|
||||||
@@ -720,7 +735,7 @@ void HandleItemsPanel( UINT16 usScreenX, UINT16 usScreenY, INT8 bEvent )
|
|||||||
if( usScreenY >= (2 * iScreenHeightOffset + 400) )
|
if( usScreenY >= (2 * iScreenHeightOffset + 400) )
|
||||||
sIndex++;
|
sIndex++;
|
||||||
//Add the converted mouse's XPos into a relative index;
|
//Add the converted mouse's XPos into a relative index;
|
||||||
//Calc: starting from 110, for every 60 pixels, add 2 to the index
|
//Calc: starting from 110, for every 60 pixels, add 2 to the index
|
||||||
|
|
||||||
sIndex += ((usScreenX-110-iScreenWidthOffset)/60) * 2;
|
sIndex += ((usScreenX-110-iScreenWidthOffset)/60) * 2;
|
||||||
switch( bEvent )
|
switch( bEvent )
|
||||||
@@ -792,13 +807,13 @@ void HideItemCursor( INT32 iMapIndex )
|
|||||||
BOOLEAN TriggerAtGridNo( INT16 sGridNo )
|
BOOLEAN TriggerAtGridNo( INT16 sGridNo )
|
||||||
{
|
{
|
||||||
ITEM_POOL *pItemPool;
|
ITEM_POOL *pItemPool;
|
||||||
if( !GetItemPool( sGridNo, &pItemPool, 0 ) )
|
if( !GetItemPoolFromGround( sGridNo, &pItemPool ) )
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
if( gWorldItems[ pItemPool->iItemIndex ].o.usItem == SWITCH )
|
if( gWorldItems[ pItemPool->iItemIndex ].object.usItem == SWITCH )
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -810,7 +825,6 @@ BOOLEAN TriggerAtGridNo( INT16 sGridNo )
|
|||||||
|
|
||||||
void AddSelectedItemToWorld( INT16 sGridNo )
|
void AddSelectedItemToWorld( INT16 sGridNo )
|
||||||
{
|
{
|
||||||
OBJECTTYPE tempObject;
|
|
||||||
OBJECTTYPE *pObject;
|
OBJECTTYPE *pObject;
|
||||||
INVTYPE *pItem;
|
INVTYPE *pItem;
|
||||||
ITEM_POOL *pItemPool;
|
ITEM_POOL *pItemPool;
|
||||||
@@ -823,17 +837,16 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
|||||||
//Extract the currently selected item.
|
//Extract the currently selected item.
|
||||||
SpecifyItemToEdit( NULL, -1 );
|
SpecifyItemToEdit( NULL, -1 );
|
||||||
|
|
||||||
//memset( &tempObject, 0, sizeof( OBJECTTYPE ) );
|
|
||||||
if( eInfo.uiItemType == TBAR_MODE_ITEM_KEYS )
|
if( eInfo.uiItemType == TBAR_MODE_ITEM_KEYS )
|
||||||
{
|
{
|
||||||
CreateKeyObject( &tempObject, 1, (UINT8)eInfo.sSelItemIndex );
|
CreateKeyObject( &gTempObject, 1, (UINT8)eInfo.sSelItemIndex );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CreateItem( eInfo.pusItemIndex[eInfo.sSelItemIndex], 100, &tempObject );
|
CreateItem( eInfo.pusItemIndex[eInfo.sSelItemIndex], 100, &gTempObject );
|
||||||
}
|
}
|
||||||
usFlags = 0;
|
usFlags = 0;
|
||||||
switch( tempObject.usItem )
|
switch( gTempObject.usItem )
|
||||||
{
|
{
|
||||||
case MINE:
|
case MINE:
|
||||||
if ( bVisibility == BURIED )
|
if ( bVisibility == BURIED )
|
||||||
@@ -844,11 +857,11 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
|||||||
case MONEY:
|
case MONEY:
|
||||||
case SILVER:
|
case SILVER:
|
||||||
case GOLD:
|
case GOLD:
|
||||||
tempObject.ItemData.Money.bMoneyStatus = 100;
|
gTempObject[0]->data.objectStatus = 100;
|
||||||
tempObject.ItemData.Money.uiMoneyAmount = 100 + Random( 19901 );
|
gTempObject[0]->data.money.uiMoneyAmount = 100 + Random( 19901 );
|
||||||
break;
|
break;
|
||||||
case OWNERSHIP:
|
case OWNERSHIP:
|
||||||
tempObject.ItemData.Owner.ubOwnerProfile = NO_PROFILE;
|
gTempObject[0]->data.owner.ubOwnerProfile = NO_PROFILE;
|
||||||
bVisibility = BURIED;
|
bVisibility = BURIED;
|
||||||
break;
|
break;
|
||||||
case SWITCH:
|
case SWITCH:
|
||||||
@@ -857,42 +870,42 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bVisibility = BURIED;
|
bVisibility = BURIED;
|
||||||
tempObject.ItemData.Trigger.bBombStatus = 100;
|
gTempObject[0]->data.objectStatus = 100;
|
||||||
tempObject.ItemData.Trigger.ubBombOwner = 1;
|
gTempObject[0]->data.misc.ubBombOwner = 1;
|
||||||
if( eInfo.sSelItemIndex < 2 )
|
if( eInfo.sSelItemIndex < 2 )
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY;
|
gTempObject[0]->data.misc.bFrequency = PANIC_FREQUENCY;
|
||||||
else if( eInfo.sSelItemIndex < 4 )
|
else if( eInfo.sSelItemIndex < 4 )
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY_2;
|
gTempObject[0]->data.misc.bFrequency = PANIC_FREQUENCY_2;
|
||||||
else if( eInfo.sSelItemIndex < 6 )
|
else if( eInfo.sSelItemIndex < 6 )
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY_3;
|
gTempObject[0]->data.misc.bFrequency = PANIC_FREQUENCY_3;
|
||||||
else
|
else
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = (INT8)(FIRST_MAP_PLACED_FREQUENCY + (eInfo.sSelItemIndex-4) / 2);
|
gTempObject[0]->data.misc.bFrequency = (INT8)(FIRST_MAP_PLACED_FREQUENCY + (eInfo.sSelItemIndex-4) / 2);
|
||||||
usFlags |= WORLD_ITEM_ARMED_BOMB;
|
usFlags |= WORLD_ITEM_ARMED_BOMB;
|
||||||
break;
|
break;
|
||||||
case ACTION_ITEM:
|
case ACTION_ITEM:
|
||||||
bVisibility = BURIED;
|
bVisibility = BURIED;
|
||||||
tempObject.ItemData.Trigger.bBombStatus = 100;
|
gTempObject[0]->data.objectStatus = 100;
|
||||||
tempObject.ItemData.Trigger.ubBombOwner = 1;
|
gTempObject[0]->data.misc.ubBombOwner = 1;
|
||||||
tempObject.bTrap = gbDefaultBombTrapLevel;
|
gTempObject[0]->data.bTrap = gbDefaultBombTrapLevel;
|
||||||
if( eInfo.sSelItemIndex < PRESSURE_ACTION_ID )
|
if( eInfo.sSelItemIndex < PRESSURE_ACTION_ID )
|
||||||
{
|
{
|
||||||
tempObject.ItemData.Trigger.bDetonatorType = BOMB_REMOTE;
|
gTempObject[0]->data.misc.bDetonatorType = BOMB_REMOTE;
|
||||||
if( eInfo.sSelItemIndex < 2 )
|
if( eInfo.sSelItemIndex < 2 )
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY;
|
gTempObject[0]->data.misc.bFrequency = PANIC_FREQUENCY;
|
||||||
else if( eInfo.sSelItemIndex < 4 )
|
else if( eInfo.sSelItemIndex < 4 )
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY_2;
|
gTempObject[0]->data.misc.bFrequency = PANIC_FREQUENCY_2;
|
||||||
else if( eInfo.sSelItemIndex < 6 )
|
else if( eInfo.sSelItemIndex < 6 )
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY_3;
|
gTempObject[0]->data.misc.bFrequency = PANIC_FREQUENCY_3;
|
||||||
else
|
else
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = (INT8)(FIRST_MAP_PLACED_FREQUENCY + (eInfo.sSelItemIndex-4) / 2);
|
gTempObject[0]->data.misc.bFrequency = (INT8)(FIRST_MAP_PLACED_FREQUENCY + (eInfo.sSelItemIndex-4) / 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tempObject.ItemData.Trigger.bDetonatorType = BOMB_PRESSURE;
|
gTempObject[0]->data.misc.bDetonatorType = BOMB_PRESSURE;
|
||||||
tempObject.ItemData.Trigger.BombTrigger.bDelay = 0;
|
gTempObject[0]->data.misc.bDelay = 0;
|
||||||
}
|
}
|
||||||
ChangeActionItem( &tempObject, gbActionItemIndex );
|
ChangeActionItem( &gTempObject, gbActionItemIndex );
|
||||||
tempObject.fFlags |= OBJECT_ARMED_BOMB;
|
gTempObject.fFlags |= OBJECT_ARMED_BOMB;
|
||||||
if( gbActionItemIndex == ACTIONITEM_SMPIT )
|
if( gbActionItemIndex == ACTIONITEM_SMPIT )
|
||||||
Add3X3Pit( sGridNo );
|
Add3X3Pit( sGridNo );
|
||||||
else if( gbActionItemIndex == ACTIONITEM_LGPIT )
|
else if( gbActionItemIndex == ACTIONITEM_LGPIT )
|
||||||
@@ -901,8 +914,8 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pObject = InternalAddItemToPool( &sGridNo, &tempObject, bVisibility, 0, usFlags, 0, &iItemIndex );
|
pObject = InternalAddItemToPool( &sGridNo, &gTempObject, bVisibility, 0, usFlags, 0, -1, &iItemIndex );
|
||||||
if( tempObject.usItem != OWNERSHIP )
|
if( gTempObject.usItem != OWNERSHIP )
|
||||||
{
|
{
|
||||||
gWorldItems[ iItemIndex ].ubNonExistChance = (UINT8)(100 - giDefaultExistChance);
|
gWorldItems[ iItemIndex ].ubNonExistChance = (UINT8)(100 - giDefaultExistChance);
|
||||||
}
|
}
|
||||||
@@ -916,34 +929,34 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
|||||||
{
|
{
|
||||||
if (Random( 2 ))
|
if (Random( 2 ))
|
||||||
{
|
{
|
||||||
pObject->ItemData.Ammo.ubShotsLeft[0] = Magazine[ pItem->ubClassIndex ].ubMagSize;
|
(*pObject)[0]->data.ubShotsLeft = Magazine[ pItem->ubClassIndex ].ubMagSize;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pObject->ItemData.Ammo.ubShotsLeft[0] = (UINT8) Random( Magazine[ pItem->ubClassIndex ].ubMagSize );
|
(*pObject)[0]->data.ubShotsLeft = (UINT8) Random( Magazine[ pItem->ubClassIndex ].ubMagSize );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pObject->ItemData.Generic.bStatus[0] = (INT8)(70 + Random( 26 ));
|
(*pObject)[0]->data.objectStatus = (INT8)(70 + Random( 26 ));
|
||||||
}
|
}
|
||||||
if( pItem->usItemClass & IC_GUN )
|
if( pItem->usItemClass & IC_GUN )
|
||||||
{
|
{
|
||||||
if ( pObject->usItem == ROCKET_LAUNCHER )
|
if ( pObject->usItem == ROCKET_LAUNCHER )
|
||||||
{
|
{
|
||||||
pObject->ItemData.Gun.ubGunShotsLeft = 1;
|
(*pObject)[0]->data.gun.ubGunShotsLeft = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pObject->ItemData.Gun.ubGunShotsLeft = (UINT8)(Random( Weapon[ pObject->usItem ].ubMagSize ));
|
(*pObject)[0]->data.gun.ubGunShotsLeft = (UINT8)(Random( Weapon[ pObject->usItem ].ubMagSize ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !GetItemPool( sGridNo, &pItemPool, 0 ) )
|
if( !GetItemPoolFromGround( sGridNo, &pItemPool ) )
|
||||||
Assert( 0 );
|
Assert( 0 );
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
if( &(gWorldItems[ pItemPool->iItemIndex ].o) == pObject )
|
if( &(gWorldItems[ pItemPool->iItemIndex ].object) == pObject )
|
||||||
{
|
{
|
||||||
fFound = TRUE;
|
fFound = TRUE;
|
||||||
//ShowSelectedItem();
|
//ShowSelectedItem();
|
||||||
@@ -959,7 +972,7 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
|||||||
|
|
||||||
//Get access to the itempool.
|
//Get access to the itempool.
|
||||||
//search for a current node in list containing same mapindex
|
//search for a current node in list containing same mapindex
|
||||||
pIPCurr = pIPHead;
|
pIPCurr = pIPHead;
|
||||||
pIPPrev = NULL;
|
pIPPrev = NULL;
|
||||||
while( pIPCurr )
|
while( pIPCurr )
|
||||||
{
|
{
|
||||||
@@ -999,15 +1012,15 @@ void HandleRightClickOnItem( INT16 sGridNo )
|
|||||||
IPListNode *pIPCurr;
|
IPListNode *pIPCurr;
|
||||||
|
|
||||||
if( gsItemGridNo == sGridNo )
|
if( gsItemGridNo == sGridNo )
|
||||||
{ //Clicked on the same gridno as the selected item. Automatically select the next
|
{ //Clicked on the same gridno as the selected item. Automatically select the next
|
||||||
//item in the same pool.
|
//item in the same pool.
|
||||||
pItemPool = gpItemPool->pNext;
|
pItemPool = gpItemPool->pNext;
|
||||||
if( !pItemPool )
|
if( !pItemPool )
|
||||||
{ //currently selected item was last node, so select the head node even if it is the same.
|
{ //currently selected item was last node, so select the head node even if it is the same.
|
||||||
GetItemPool( sGridNo, &pItemPool, 0 );
|
GetItemPoolFromGround( sGridNo, &pItemPool );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( !GetItemPool( sGridNo, &pItemPool, 0 ) )
|
else if( !GetItemPoolFromGround( sGridNo, &pItemPool ) )
|
||||||
{
|
{
|
||||||
//possibly relocate selected item to this gridno?
|
//possibly relocate selected item to this gridno?
|
||||||
return;
|
return;
|
||||||
@@ -1028,7 +1041,7 @@ void HandleRightClickOnItem( INT16 sGridNo )
|
|||||||
pIPCurr = pIPCurr->next;
|
pIPCurr = pIPCurr->next;
|
||||||
}
|
}
|
||||||
Assert( gpCurrItemPoolNode );
|
Assert( gpCurrItemPoolNode );
|
||||||
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].o, gpItemPool->sGridNo );
|
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].object, gpItemPool->sGridNo );
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void DeleteSelectedMercsItem();
|
extern void DeleteSelectedMercsItem();
|
||||||
@@ -1048,15 +1061,15 @@ void DeleteSelectedItem()
|
|||||||
//save the mapindex
|
//save the mapindex
|
||||||
if( gpItemPool->pNext )
|
if( gpItemPool->pNext )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( &gWorldItems[ gpItemPool->pNext->iItemIndex ].o, gpItemPool->sGridNo );
|
SpecifyItemToEdit( &gWorldItems[ gpItemPool->pNext->iItemIndex ].object, gpItemPool->sGridNo );
|
||||||
}
|
}
|
||||||
sGridNo = gpItemPool->sGridNo;
|
sGridNo = gpItemPool->sGridNo;
|
||||||
//remove the item
|
//remove the item
|
||||||
if( gWorldItems[ gpItemPool->iItemIndex ].o.usItem == ACTION_ITEM )
|
if( gWorldItems[ gpItemPool->iItemIndex ].object.usItem == ACTION_ITEM )
|
||||||
{
|
{
|
||||||
if( gWorldItems[ gpItemPool->iItemIndex ].o.ItemData.Trigger.bActionValue == ACTION_ITEM_SMALL_PIT )
|
if( gWorldItems[ gpItemPool->iItemIndex ].object[0]->data.misc.bActionValue == ACTION_ITEM_SMALL_PIT )
|
||||||
Remove3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
Remove3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
else if( gWorldItems[ gpItemPool->iItemIndex ].o.ItemData.Trigger.bActionValue == ACTION_ITEM_LARGE_PIT )
|
else if( gWorldItems[ gpItemPool->iItemIndex ].object[0]->data.misc.bActionValue == ACTION_ITEM_LARGE_PIT )
|
||||||
Remove5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
Remove5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
}
|
}
|
||||||
if( gpEditingItemPool == gpItemPool )
|
if( gpEditingItemPool == gpItemPool )
|
||||||
@@ -1064,7 +1077,7 @@ void DeleteSelectedItem()
|
|||||||
RemoveItemFromPool( sGridNo, gpItemPool->iItemIndex, 0 );
|
RemoveItemFromPool( sGridNo, gpItemPool->iItemIndex, 0 );
|
||||||
gpItemPool = NULL;
|
gpItemPool = NULL;
|
||||||
//determine if there are still any items at this location
|
//determine if there are still any items at this location
|
||||||
if( !GetItemPool( sGridNo, &gpItemPool , 0 ) )
|
if( !GetItemPoolFromGround( sGridNo, &gpItemPool ) )
|
||||||
{ //no items left, so remove the node from the list.
|
{ //no items left, so remove the node from the list.
|
||||||
IPListNode *pIPPrev, *pIPCurr;
|
IPListNode *pIPPrev, *pIPCurr;
|
||||||
pIPCurr = pIPHead;
|
pIPCurr = pIPHead;
|
||||||
@@ -1084,7 +1097,7 @@ void DeleteSelectedItem()
|
|||||||
gpCurrItemPoolNode = pIPHead;
|
gpCurrItemPoolNode = pIPHead;
|
||||||
if( gpCurrItemPoolNode )
|
if( gpCurrItemPoolNode )
|
||||||
{
|
{
|
||||||
GetItemPool( gpCurrItemPoolNode->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( gpCurrItemPoolNode->sGridNo, &gpItemPool );
|
||||||
Assert( gpItemPool );
|
Assert( gpItemPool );
|
||||||
}
|
}
|
||||||
//remove node
|
//remove node
|
||||||
@@ -1128,15 +1141,15 @@ void SelectNextItemPool()
|
|||||||
MarkMapIndexDirty( gpItemPool->sGridNo );
|
MarkMapIndexDirty( gpItemPool->sGridNo );
|
||||||
}
|
}
|
||||||
|
|
||||||
//go to the next node. If at end of list, choose pIPHead
|
//go to the next node. If at end of list, choose pIPHead
|
||||||
if( gpCurrItemPoolNode->next )
|
if( gpCurrItemPoolNode->next )
|
||||||
gpCurrItemPoolNode = gpCurrItemPoolNode->next;
|
gpCurrItemPoolNode = gpCurrItemPoolNode->next;
|
||||||
else
|
else
|
||||||
gpCurrItemPoolNode = pIPHead;
|
gpCurrItemPoolNode = pIPHead;
|
||||||
//get the item pool at this node's gridno.
|
//get the item pool at this node's gridno.
|
||||||
GetItemPool( gpCurrItemPoolNode->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( gpCurrItemPoolNode->sGridNo, &gpItemPool );
|
||||||
MarkMapIndexDirty( gpItemPool->sGridNo );
|
MarkMapIndexDirty( gpItemPool->sGridNo );
|
||||||
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].o, gpItemPool->sGridNo );
|
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].object, gpItemPool->sGridNo );
|
||||||
if( gsItemGridNo != -1 )
|
if( gsItemGridNo != -1 )
|
||||||
{
|
{
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1153,9 +1166,9 @@ void SelectNextItemInPool()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GetItemPool( gpItemPool->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( gpItemPool->sGridNo, &gpItemPool );
|
||||||
}
|
}
|
||||||
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].o, gpItemPool->sGridNo );
|
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].object, gpItemPool->sGridNo );
|
||||||
MarkWorldDirty();
|
MarkWorldDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1170,13 +1183,13 @@ void SelectPrevItemInPool()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GetItemPool( gpItemPool->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( gpItemPool->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool->pNext )
|
while( gpItemPool->pNext )
|
||||||
{
|
{
|
||||||
gpItemPool = gpItemPool->pNext;
|
gpItemPool = gpItemPool->pNext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].o, gpItemPool->sGridNo );
|
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].object, gpItemPool->sGridNo );
|
||||||
MarkWorldDirty();
|
MarkWorldDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1230,7 +1243,7 @@ void SelectNextItemOfType( UINT16 usItem )
|
|||||||
gpItemPool = gpItemPool->pNext;
|
gpItemPool = gpItemPool->pNext;
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == usItem )
|
if( pObject->usItem == usItem )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
@@ -1246,10 +1259,10 @@ void SelectNextItemOfType( UINT16 usItem )
|
|||||||
}
|
}
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == usItem )
|
if( pObject->usItem == usItem )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
@@ -1264,10 +1277,10 @@ void SelectNextItemOfType( UINT16 usItem )
|
|||||||
curr = pIPHead;
|
curr = pIPHead;
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == usItem )
|
if( pObject->usItem == usItem )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
@@ -1294,8 +1307,8 @@ void SelectNextKeyOfType( UINT8 ubKeyID )
|
|||||||
gpItemPool = gpItemPool->pNext;
|
gpItemPool = gpItemPool->pNext;
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( Item[ pObject->usItem ].usItemClass == IC_KEY && pObject->ItemData.Key.ubKeyID == ubKeyID )
|
if( Item[ pObject->usItem ].usItemClass == IC_KEY && (*pObject)[0]->data.key.ubKeyID == ubKeyID )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1310,11 +1323,11 @@ void SelectNextKeyOfType( UINT8 ubKeyID )
|
|||||||
}
|
}
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( Item[ pObject->usItem ].usItemClass == IC_KEY && pObject->ItemData.Key.ubKeyID == ubKeyID )
|
if( Item[ pObject->usItem ].usItemClass == IC_KEY && (*pObject)[0]->data.key.ubKeyID == ubKeyID )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1328,11 +1341,11 @@ void SelectNextKeyOfType( UINT8 ubKeyID )
|
|||||||
curr = pIPHead;
|
curr = pIPHead;
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( Item[ pObject->usItem ].usItemClass == IC_KEY && pObject->ItemData.Key.ubKeyID == ubKeyID )
|
if( Item[ pObject->usItem ].usItemClass == IC_KEY && (*pObject)[0]->data.key.ubKeyID == ubKeyID )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1358,8 +1371,8 @@ void SelectNextTriggerWithFrequency( UINT16 usItem, INT8 bFrequency )
|
|||||||
gpItemPool = gpItemPool->pNext;
|
gpItemPool = gpItemPool->pNext;
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == usItem && pObject->ItemData.Trigger.BombTrigger.bFrequency == bFrequency )
|
if( pObject->usItem == usItem && (*pObject)[0]->data.misc.bFrequency == bFrequency )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1374,11 +1387,11 @@ void SelectNextTriggerWithFrequency( UINT16 usItem, INT8 bFrequency )
|
|||||||
}
|
}
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == usItem && pObject->ItemData.Trigger.BombTrigger.bFrequency == bFrequency )
|
if( pObject->usItem == usItem && (*pObject)[0]->data.misc.bFrequency == bFrequency )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1392,11 +1405,11 @@ void SelectNextTriggerWithFrequency( UINT16 usItem, INT8 bFrequency )
|
|||||||
curr = pIPHead;
|
curr = pIPHead;
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == usItem && pObject->ItemData.Trigger.BombTrigger.bFrequency == bFrequency )
|
if( pObject->usItem == usItem && (*pObject)[0]->data.misc.bFrequency == bFrequency )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1422,8 +1435,8 @@ void SelectNextPressureAction()
|
|||||||
gpItemPool = gpItemPool->pNext;
|
gpItemPool = gpItemPool->pNext;
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == ACTION_ITEM && pObject->ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
if( pObject->usItem == ACTION_ITEM && (*pObject)[0]->data.misc.bDetonatorType == BOMB_PRESSURE )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1438,11 +1451,11 @@ void SelectNextPressureAction()
|
|||||||
}
|
}
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == ACTION_ITEM && pObject->ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
if( pObject->usItem == ACTION_ITEM && (*pObject)[0]->data.misc.bDetonatorType == BOMB_PRESSURE )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1456,11 +1469,11 @@ void SelectNextPressureAction()
|
|||||||
curr = pIPHead;
|
curr = pIPHead;
|
||||||
while( curr )
|
while( curr )
|
||||||
{ //search to the end of the list
|
{ //search to the end of the list
|
||||||
GetItemPool( curr->sGridNo, &gpItemPool, 0 );
|
GetItemPoolFromGround( curr->sGridNo, &gpItemPool );
|
||||||
while( gpItemPool )
|
while( gpItemPool )
|
||||||
{
|
{
|
||||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
pObject = &gWorldItems[ gpItemPool->iItemIndex ].object;
|
||||||
if( pObject->usItem == ACTION_ITEM && pObject->ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
if( pObject->usItem == ACTION_ITEM && (*pObject)[0]->data.misc.bDetonatorType == BOMB_PRESSURE )
|
||||||
{
|
{
|
||||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
CenterScreenAtMapIndex( gsItemGridNo );
|
CenterScreenAtMapIndex( gsItemGridNo );
|
||||||
@@ -1481,13 +1494,13 @@ UINT16 CountNumberOfItemPlacementsInWorld( UINT16 usItem, UINT16 *pusQuantity )
|
|||||||
pIPCurr = pIPHead;
|
pIPCurr = pIPHead;
|
||||||
while( pIPCurr )
|
while( pIPCurr )
|
||||||
{
|
{
|
||||||
GetItemPool( pIPCurr->sGridNo, &pItemPool, 0 );
|
GetItemPoolFromGround( pIPCurr->sGridNo, &pItemPool );
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
if( gWorldItems[ pItemPool->iItemIndex ].o.usItem == usItem )
|
if( gWorldItems[ pItemPool->iItemIndex ].object.usItem == usItem )
|
||||||
{
|
{
|
||||||
num++;
|
num++;
|
||||||
*pusQuantity += gWorldItems[ pItemPool->iItemIndex ].o.ubNumberOfObjects;
|
*pusQuantity += gWorldItems[ pItemPool->iItemIndex ].object.ubNumberOfObjects;
|
||||||
}
|
}
|
||||||
pItemPool = pItemPool->pNext;
|
pItemPool = pItemPool->pNext;
|
||||||
}
|
}
|
||||||
@@ -1504,11 +1517,11 @@ UINT16 CountNumberOfItemsWithFrequency( UINT16 usItem, INT8 bFrequency )
|
|||||||
pIPCurr = pIPHead;
|
pIPCurr = pIPHead;
|
||||||
while( pIPCurr )
|
while( pIPCurr )
|
||||||
{
|
{
|
||||||
GetItemPool( pIPCurr->sGridNo, &pItemPool, 0 );
|
GetItemPoolFromGround( pIPCurr->sGridNo, &pItemPool );
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
if( gWorldItems[ pItemPool->iItemIndex ].o.usItem == usItem &&
|
if( gWorldItems[ pItemPool->iItemIndex ].object.usItem == usItem &&
|
||||||
gWorldItems[ pItemPool->iItemIndex ].o.ItemData.Trigger.BombTrigger.bFrequency == bFrequency )
|
gWorldItems[ pItemPool->iItemIndex ].object[0]->data.misc.bFrequency == bFrequency )
|
||||||
{
|
{
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
@@ -1527,11 +1540,11 @@ UINT16 CountNumberOfPressureActionsInWorld()
|
|||||||
pIPCurr = pIPHead;
|
pIPCurr = pIPHead;
|
||||||
while( pIPCurr )
|
while( pIPCurr )
|
||||||
{
|
{
|
||||||
GetItemPool( pIPCurr->sGridNo, &pItemPool, 0 );
|
GetItemPoolFromGround( pIPCurr->sGridNo, &pItemPool );
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
if( gWorldItems[ pItemPool->iItemIndex ].o.usItem == ACTION_ITEM &&
|
if( gWorldItems[ pItemPool->iItemIndex ].object.usItem == ACTION_ITEM &&
|
||||||
gWorldItems[ pItemPool->iItemIndex ].o.ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
gWorldItems[ pItemPool->iItemIndex ].object[0]->data.misc.bDetonatorType == BOMB_PRESSURE )
|
||||||
{
|
{
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
@@ -1587,12 +1600,12 @@ UINT16 CountNumberOfKeysOfTypeInWorld( UINT8 ubKeyID )
|
|||||||
pIPCurr = pIPHead;
|
pIPCurr = pIPHead;
|
||||||
while( pIPCurr )
|
while( pIPCurr )
|
||||||
{
|
{
|
||||||
GetItemPool( pIPCurr->sGridNo, &pItemPool, 0 );
|
GetItemPoolFromGround( pIPCurr->sGridNo, &pItemPool );
|
||||||
while( pItemPool )
|
while( pItemPool )
|
||||||
{
|
{
|
||||||
if( Item[ gWorldItems[ pItemPool->iItemIndex ].o.usItem ].usItemClass == IC_KEY )
|
if( Item[ gWorldItems[ pItemPool->iItemIndex ].object.usItem ].usItemClass == IC_KEY )
|
||||||
{
|
{
|
||||||
if( gWorldItems[ pItemPool->iItemIndex ].o.ItemData.Key.ubKeyID == ubKeyID )
|
if( gWorldItems[ pItemPool->iItemIndex ].object[0]->data.key.ubKeyID == ubKeyID )
|
||||||
{
|
{
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
@@ -1646,3 +1659,5 @@ void DisplayItemStatistics()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+12
-9
@@ -12,18 +12,19 @@ typedef struct{
|
|||||||
UINT16 *pusItemIndex; //a dynamic array of Item indices
|
UINT16 *pusItemIndex; //a dynamic array of Item indices
|
||||||
UINT32 uiBuffer; //index of buffer
|
UINT32 uiBuffer; //index of buffer
|
||||||
UINT32 uiItemType; //Weapons, ammo, armour, explosives, equipment
|
UINT32 uiItemType; //Weapons, ammo, armour, explosives, equipment
|
||||||
INT16 sWidth, sHeight; //width and height of buffer
|
INT32 sWidth, sHeight; //width and height of buffer
|
||||||
INT16 sNumItems; //total number of items in the current class of item.
|
//Kaiden: was previously INT16 - Fix for number of items capped by class
|
||||||
|
INT16 sNumItems; //total number of items in the current class of item.
|
||||||
INT16 sSelItemIndex; //currently selected item index.
|
INT16 sSelItemIndex; //currently selected item index.
|
||||||
INT16 sHilitedItemIndex;
|
INT16 sHilitedItemIndex;
|
||||||
INT16 sScrollIndex; //current scroll index (0 is far left, 1 is next tile to the right, ...)
|
INT16 sScrollIndex; //current scroll index (0 is far left, 1 is next tile to the right, ...)
|
||||||
INT16 sSaveSelWeaponsIndex, sSaveSelAmmoIndex, sSaveSelArmourIndex, sSaveSelExplosivesIndex,
|
INT16 sSaveSelWeaponsIndex, sSaveSelAmmoIndex, sSaveSelArmourIndex, sSaveSelLBEIndex, sSaveSelExplosivesIndex,
|
||||||
sSaveSelEquipment1Index, sSaveSelEquipment2Index, sSaveSelEquipment3Index,
|
sSaveSelEquipment1Index, sSaveSelEquipment2Index, sSaveSelEquipment3Index,
|
||||||
sSaveSelTriggersIndex, sSaveSelKeysIndex;
|
sSaveSelTriggersIndex, sSaveSelKeysIndex;
|
||||||
INT16 sSaveWeaponsScrollIndex, sSaveAmmoScrollIndex, sSaveArmourScrollIndex, sSaveExplosivesScrollIndex,
|
INT16 sSaveWeaponsScrollIndex, sSaveAmmoScrollIndex, sSaveArmourScrollIndex, sSaveLBEScrollIndex,
|
||||||
sSaveEquipment1ScrollIndex, sSaveEquipment2ScrollIndex, sSaveEquipment3ScrollIndex,
|
sSaveExplosivesScrollIndex, sSaveEquipment1ScrollIndex, sSaveEquipment2ScrollIndex,
|
||||||
sSaveTriggersScrollIndex, sSaveKeysScrollIndex;
|
sSaveEquipment3ScrollIndex, sSaveTriggersScrollIndex, sSaveKeysScrollIndex;
|
||||||
INT16 sNumWeapons, sNumAmmo, sNumArmour, sNumExplosives, sNumEquipment1, sNumEquipment2, sNumEquipment3,
|
INT16 sNumWeapons, sNumAmmo, sNumArmour, sLBEGear, sNumExplosives, sNumEquipment1, sNumEquipment2, sNumEquipment3,
|
||||||
sNumTriggers, sNumKeys;
|
sNumTriggers, sNumKeys;
|
||||||
}EditorItemsInfo;
|
}EditorItemsInfo;
|
||||||
|
|
||||||
@@ -67,3 +68,5 @@ extern INT32 giDefaultExistChance;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,6 @@
|
|||||||
#include "Soldier Init List.h"
|
#include "Soldier Init List.h"
|
||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
#include "Soldier Add.h"
|
#include "Soldier Add.h"
|
||||||
#include "Soldier Control.h"
|
|
||||||
#include "Soldier Profile Type.h"
|
#include "Soldier Profile Type.h"
|
||||||
#include "Soldier Profile.h"
|
#include "Soldier Profile.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
@@ -59,6 +58,10 @@
|
|||||||
#include "Simple Render Utils.h"
|
#include "Simple Render Utils.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//forward declarations of common classes to eliminate includes
|
||||||
|
class OBJECTTYPE;
|
||||||
|
class SOLDIERTYPE;
|
||||||
|
|
||||||
INT8 gbDefaultLightType = PRIMETIME_LIGHT;
|
INT8 gbDefaultLightType = PRIMETIME_LIGHT;
|
||||||
|
|
||||||
SGPPaletteEntry gEditorLightColor;
|
SGPPaletteEntry gEditorLightColor;
|
||||||
@@ -71,7 +74,7 @@ void SetupTextInputForMapInfo()
|
|||||||
|
|
||||||
InitTextInputModeWithScheme( DEFAULT_SCHEME );
|
InitTextInputModeWithScheme( DEFAULT_SCHEME );
|
||||||
|
|
||||||
AddUserInputField( NULL ); //just so we can use short cut keys while not typing.
|
AddUserInputField( NULL ); //just so we can use short cut keys while not typing.
|
||||||
|
|
||||||
//light rgb fields
|
//light rgb fields
|
||||||
swprintf( str, L"%d", gEditorLightColor.peRed );
|
swprintf( str, L"%d", gEditorLightColor.peRed );
|
||||||
@@ -98,7 +101,7 @@ void SetupTextInputForMapInfo()
|
|||||||
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 363, 30, 18, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_EXCLUSIVE_COORDINATE );
|
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 363, 30, 18, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_EXCLUSIVE_COORDINATE );
|
||||||
swprintf( str, L"%d", gExitGrid.ubGotoSectorZ );
|
swprintf( str, L"%d", gExitGrid.ubGotoSectorZ );
|
||||||
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 383, 30, 18, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 383, 30, 18, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gExitGrid.usGridNo );
|
swprintf( str, L"%d", gExitGrid.sGridNo );
|
||||||
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 403, 40, 18, MSYS_PRIORITY_NORMAL, str, 5, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 338, 2 * iScreenHeightOffset + 403, 40, 18, MSYS_PRIORITY_NORMAL, str, 5, INPUTTYPE_NUMERICSTRICT );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,7 +231,7 @@ void ExtractAndUpdateMapInfo()
|
|||||||
if( str[0] >= 'a' && str[0] <= 'z' )
|
if( str[0] >= 'a' && str[0] <= 'z' )
|
||||||
str[0] -= 32; //uppercase it!
|
str[0] -= 32; //uppercase it!
|
||||||
if( str[0] >= 'A' && str[0] <= 'Z' &&
|
if( str[0] >= 'A' && str[0] <= 'Z' &&
|
||||||
str[1] >= '0' && str[1] <= '9' )
|
str[1] >= '0' && str[1] <= '9' )
|
||||||
{ //only update, if coordinate is valid.
|
{ //only update, if coordinate is valid.
|
||||||
gExitGrid.ubGotoSectorY = (UINT8)(str[0] - 'A' + 1);
|
gExitGrid.ubGotoSectorY = (UINT8)(str[0] - 'A' + 1);
|
||||||
gExitGrid.ubGotoSectorX = (UINT8)(str[1] - '0');
|
gExitGrid.ubGotoSectorX = (UINT8)(str[1] - '0');
|
||||||
@@ -237,8 +240,8 @@ void ExtractAndUpdateMapInfo()
|
|||||||
gExitGrid.ubGotoSectorX = (UINT8)max( min( gExitGrid.ubGotoSectorX, 16 ), 1 );
|
gExitGrid.ubGotoSectorX = (UINT8)max( min( gExitGrid.ubGotoSectorX, 16 ), 1 );
|
||||||
gExitGrid.ubGotoSectorY = (UINT8)max( min( gExitGrid.ubGotoSectorY, 16 ), 1 );
|
gExitGrid.ubGotoSectorY = (UINT8)max( min( gExitGrid.ubGotoSectorY, 16 ), 1 );
|
||||||
}
|
}
|
||||||
gExitGrid.ubGotoSectorZ = (UINT8)max( min( GetNumericStrictValueFromField( 8 ), 3 ), 0 );
|
gExitGrid.ubGotoSectorZ = (UINT8)max( min( GetNumericStrictValueFromField( 8 ), 3 ), 0 );
|
||||||
gExitGrid.usGridNo = (UINT16)max( min( GetNumericStrictValueFromField( 9 ), 25600 ), 0 );
|
gExitGrid.sGridNo = (INT16)max( min( GetNumericStrictValueFromField( 9 ), 25600 ), 0 );
|
||||||
|
|
||||||
UpdateMapInfoFields();
|
UpdateMapInfoFields();
|
||||||
}
|
}
|
||||||
@@ -253,13 +256,13 @@ BOOLEAN ApplyNewExitGridValuesToTextFields()
|
|||||||
SetInputFieldStringWith16BitString( 7, str );
|
SetInputFieldStringWith16BitString( 7, str );
|
||||||
swprintf( str, L"%d", gExitGrid.ubGotoSectorZ );
|
swprintf( str, L"%d", gExitGrid.ubGotoSectorZ );
|
||||||
SetInputFieldStringWith16BitString( 8, str );
|
SetInputFieldStringWith16BitString( 8, str );
|
||||||
swprintf( str, L"%d", gExitGrid.usGridNo );
|
swprintf( str, L"%d", gExitGrid.sGridNo );
|
||||||
SetInputFieldStringWith16BitString( 9, str );
|
SetInputFieldStringWith16BitString( 9, str );
|
||||||
SetActiveField( 0 );
|
SetActiveField( 0 );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT16 usCurrentExitGridNo = 0;
|
INT16 usCurrentExitGridNo = 0;
|
||||||
void LocateNextExitGrid()
|
void LocateNextExitGrid()
|
||||||
{
|
{
|
||||||
EXITGRID ExitGrid;
|
EXITGRID ExitGrid;
|
||||||
@@ -298,3 +301,4 @@ void ChangeLightDefault( INT8 bLightType )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+177
-189
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
|||||||
#ifndef __EDITORMERCS_H
|
#ifndef __EDITORMERCS_H
|
||||||
#define __EDITORMERCS_H
|
#define __EDITORMERCS_H
|
||||||
|
|
||||||
//Merc editing modes. These are used to determine which buttons to show and hide.
|
//Merc editing modes. These are used to determine which buttons to show and hide.
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
MERC_NOMODE, //used for shutting down mercs tab, to extract any changed information
|
MERC_NOMODE, //used for shutting down mercs tab, to extract any changed information
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ void RenderTerrainTileButtons()
|
|||||||
|
|
||||||
SetObjectShade( gTileDatabase[gTileTypeStartIndex[x]].hTileSurface, DEFAULT_SHADE_LEVEL );
|
SetObjectShade( gTileDatabase[gTileTypeStartIndex[x]].hTileSurface, DEFAULT_SHADE_LEVEL );
|
||||||
BltVideoObject(ButtonDestBuffer, gTileDatabase[gTileTypeStartIndex[x]].hTileSurface, 0, (usX + 1), (usY + 1),
|
BltVideoObject(ButtonDestBuffer, gTileDatabase[gTileTypeStartIndex[x]].hTileSurface, 0, (usX + 1), (usY + 1),
|
||||||
VO_BLT_SRCTRANSPARENCY, NULL);
|
VO_BLT_SRCTRANSPARENCY, NULL);
|
||||||
|
|
||||||
if( fUseTerrainWeights )
|
if( fUseTerrainWeights )
|
||||||
{
|
{
|
||||||
@@ -135,7 +135,7 @@ void RenderTerrainTileButtons()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//This callback is used for each of the terrain tile buttons. The userData[0] field
|
//This callback is used for each of the terrain tile buttons. The userData[0] field
|
||||||
//contains the terrain button's index value.
|
//contains the terrain button's index value.
|
||||||
void TerrainTileButtonRegionCallback(MOUSE_REGION *reg,INT32 reason)
|
void TerrainTileButtonRegionCallback(MOUSE_REGION *reg,INT32 reason)
|
||||||
{
|
{
|
||||||
@@ -195,7 +195,7 @@ void ChooseWeightedTerrainTile()
|
|||||||
UINT16 x, usWeight;
|
UINT16 x, usWeight;
|
||||||
INT16 sRandomNum;
|
INT16 sRandomNum;
|
||||||
if(!usTotalWeight)
|
if(!usTotalWeight)
|
||||||
{ //Not in the weighted mode. CurrentPaste will already contain the selected tile.
|
{ //Not in the weighted mode. CurrentPaste will already contain the selected tile.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
sRandomNum = rand() % usTotalWeight;
|
sRandomNum = rand() % usTotalWeight;
|
||||||
@@ -282,3 +282,4 @@ void TerrainFill( UINT32 iMapIndex )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
//Soon to be added to an editor struct
|
//Soon to be added to an editor struct
|
||||||
extern UINT16 usTotalWeight;
|
extern UINT16 usTotalWeight;
|
||||||
extern BOOLEAN fPrevShowTerrainTileButtons;
|
extern BOOLEAN fPrevShowTerrainTileButtons;
|
||||||
extern BOOLEAN fUseTerrainWeights;
|
extern BOOLEAN fUseTerrainWeights;
|
||||||
extern INT32 TerrainTileSelected, TerrainForegroundTile,TerrainBackgroundTile;
|
extern INT32 TerrainTileSelected, TerrainForegroundTile,TerrainBackgroundTile;
|
||||||
extern INT32 TerrainTileDrawMode;
|
extern INT32 TerrainTileDrawMode;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8,00"
|
Version="8.00"
|
||||||
Name="Editor_2005Express"
|
Name="Editor_2005Express"
|
||||||
ProjectGUID="{60D793F2-90B4-43C9-83B5-221EE11B37E6}"
|
ProjectGUID="{60D793F2-90B4-43C9-83B5-221EE11B37E6}"
|
||||||
RootNamespace="Editor_2005Express"
|
RootNamespace="Editor_2005Express"
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE"
"
|
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
@@ -103,7 +103,6 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/D "_CRT_SECURE_NO_DEPRECATE""
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
|
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
RuntimeTypeInfo="false"
|
RuntimeTypeInfo="false"
|
||||||
@@ -139,6 +138,69 @@
|
|||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
|
<Configuration
|
||||||
|
Name="MapEditor|Win32"
|
||||||
|
OutputDirectory="MapEditor"
|
||||||
|
IntermediateDirectory="MapEditor"
|
||||||
|
ConfigurationType="4"
|
||||||
|
InheritedPropertySheets="..\ja2_2005Express.vsprops;..\ja2_2005ExpressEditor.vsprops"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreBuildEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCustomBuildTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXMLDataGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCMIDLTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
Optimization="0"
|
||||||
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
|
||||||
|
MinimalRebuild="true"
|
||||||
|
BasicRuntimeChecks="3"
|
||||||
|
RuntimeLibrary="1"
|
||||||
|
RuntimeTypeInfo="false"
|
||||||
|
UsePrecompiledHeader="0"
|
||||||
|
WarningLevel="3"
|
||||||
|
DebugInformationFormat="4"
|
||||||
|
DisableSpecificWarnings="4100"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCResourceCompilerTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPreLinkEventTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCLibrarianTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCALinkTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCXDCMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCBscMakeTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCFxCopTool"
|
||||||
|
/>
|
||||||
|
<Tool
|
||||||
|
Name="VCPostBuildEventTool"
|
||||||
|
/>
|
||||||
|
</Configuration>
|
||||||
</Configurations>
|
</Configurations>
|
||||||
<References>
|
<References>
|
||||||
</References>
|
</References>
|
||||||
|
|||||||
+198
-151
@@ -20,7 +20,6 @@
|
|||||||
#include "Item Statistics.h"
|
#include "Item Statistics.h"
|
||||||
#include "Text Input.h"
|
#include "Text Input.h"
|
||||||
#include "Action Items.h"
|
#include "Action Items.h"
|
||||||
#include "Item types.h"
|
|
||||||
#include "video.h"
|
#include "video.h"
|
||||||
#include "Simple Render Utils.h"
|
#include "Simple Render Utils.h"
|
||||||
#include "Weapons.h"
|
#include "Weapons.h"
|
||||||
@@ -81,9 +80,9 @@ const STR16 GetActionItemName( OBJECTTYPE *pItem )
|
|||||||
{
|
{
|
||||||
if( !pItem || pItem->usItem != ACTION_ITEM )
|
if( !pItem || pItem->usItem != ACTION_ITEM )
|
||||||
return NULL;
|
return NULL;
|
||||||
if( pItem->ItemData.Trigger.bActionValue != ACTION_ITEM_BLOW_UP )
|
if( (*pItem)[0]->data.misc.bActionValue != ACTION_ITEM_BLOW_UP )
|
||||||
{
|
{
|
||||||
switch( pItem->ItemData.Trigger.bActionValue )
|
switch( (*pItem)[0]->data.misc.bActionValue )
|
||||||
{
|
{
|
||||||
case ACTION_ITEM_OPEN_DOOR: return gszActionItemDesc[ ACTIONITEM_OPEN ];
|
case ACTION_ITEM_OPEN_DOOR: return gszActionItemDesc[ ACTIONITEM_OPEN ];
|
||||||
case ACTION_ITEM_CLOSE_DOOR: return gszActionItemDesc[ ACTIONITEM_CLOSE ];
|
case ACTION_ITEM_CLOSE_DOOR: return gszActionItemDesc[ ACTIONITEM_CLOSE ];
|
||||||
@@ -111,7 +110,7 @@ const STR16 GetActionItemName( OBJECTTYPE *pItem )
|
|||||||
default: return NULL;
|
default: return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else switch( pItem->ItemData.Trigger.usBombItem )
|
else switch( (*pItem)[0]->data.misc.usBombItem )
|
||||||
{
|
{
|
||||||
case STUN_GRENADE: return gszActionItemDesc[ ACTIONITEM_STUN ];
|
case STUN_GRENADE: return gszActionItemDesc[ ACTIONITEM_STUN ];
|
||||||
case SMOKE_GRENADE: return gszActionItemDesc[ ACTIONITEM_SMOKE ];
|
case SMOKE_GRENADE: return gszActionItemDesc[ ACTIONITEM_SMOKE ];
|
||||||
@@ -165,6 +164,7 @@ enum
|
|||||||
EDITING_GUNS,
|
EDITING_GUNS,
|
||||||
EDITING_AMMO,
|
EDITING_AMMO,
|
||||||
EDITING_ARMOUR,
|
EDITING_ARMOUR,
|
||||||
|
EDITING_LBEGEAR,
|
||||||
EDITING_EQUIPMENT,
|
EDITING_EQUIPMENT,
|
||||||
EDITING_EXPLOSIVES,
|
EDITING_EXPLOSIVES,
|
||||||
EDITING_MONEY,
|
EDITING_MONEY,
|
||||||
@@ -198,6 +198,10 @@ void SetupArmourGUI();
|
|||||||
void ExtractAndUpdateArmourGUI();
|
void ExtractAndUpdateArmourGUI();
|
||||||
void RemoveArmourGUI();
|
void RemoveArmourGUI();
|
||||||
|
|
||||||
|
void SetupLBEGUI();
|
||||||
|
void ExtractAndUpdateLBEGUI();
|
||||||
|
void RemoveLBEGUI();
|
||||||
|
|
||||||
void SetupEquipGUI();
|
void SetupEquipGUI();
|
||||||
void ExtractAndUpdateEquipGUI();
|
void ExtractAndUpdateEquipGUI();
|
||||||
void RemoveEquipGUI();
|
void RemoveEquipGUI();
|
||||||
@@ -277,6 +281,7 @@ void ExecuteItemStatsCmd( UINT8 ubAction )
|
|||||||
case EDITING_GUNS: ExtractAndUpdateGunGUI(); break;
|
case EDITING_GUNS: ExtractAndUpdateGunGUI(); break;
|
||||||
case EDITING_AMMO: ExtractAndUpdateAmmoGUI(); break;
|
case EDITING_AMMO: ExtractAndUpdateAmmoGUI(); break;
|
||||||
case EDITING_ARMOUR: ExtractAndUpdateArmourGUI(); break;
|
case EDITING_ARMOUR: ExtractAndUpdateArmourGUI(); break;
|
||||||
|
case EDITING_LBEGEAR: ExtractAndUpdateLBEGUI(); break;
|
||||||
case EDITING_EQUIPMENT: ExtractAndUpdateEquipGUI(); break;
|
case EDITING_EQUIPMENT: ExtractAndUpdateEquipGUI(); break;
|
||||||
case EDITING_EXPLOSIVES: ExtractAndUpdateExplosivesGUI(); break;
|
case EDITING_EXPLOSIVES: ExtractAndUpdateExplosivesGUI(); break;
|
||||||
case EDITING_MONEY: ExtractAndUpdateMoneyGUI(); break;
|
case EDITING_MONEY: ExtractAndUpdateMoneyGUI(); break;
|
||||||
@@ -328,6 +333,7 @@ void RemoveItemGUI()
|
|||||||
case EDITING_GUNS: RemoveGunGUI(); break;
|
case EDITING_GUNS: RemoveGunGUI(); break;
|
||||||
case EDITING_AMMO: RemoveAmmoGUI(); break;
|
case EDITING_AMMO: RemoveAmmoGUI(); break;
|
||||||
case EDITING_ARMOUR: RemoveArmourGUI(); break;
|
case EDITING_ARMOUR: RemoveArmourGUI(); break;
|
||||||
|
case EDITING_LBEGEAR: RemoveLBEGUI(); break;
|
||||||
case EDITING_EQUIPMENT: RemoveEquipGUI(); break;
|
case EDITING_EQUIPMENT: RemoveEquipGUI(); break;
|
||||||
case EDITING_EXPLOSIVES: RemoveExplosivesGUI(); break;
|
case EDITING_EXPLOSIVES: RemoveExplosivesGUI(); break;
|
||||||
case EDITING_MONEY: RemoveMoneyGUI(); break;
|
case EDITING_MONEY: RemoveMoneyGUI(); break;
|
||||||
@@ -412,6 +418,10 @@ void SpecifyItemToEdit( OBJECTTYPE *pItem, INT32 iMapIndex )
|
|||||||
gbEditingMode = EDITING_ARMOUR;
|
gbEditingMode = EDITING_ARMOUR;
|
||||||
SetupArmourGUI();
|
SetupArmourGUI();
|
||||||
break;
|
break;
|
||||||
|
case IC_LBEGEAR:
|
||||||
|
gbEditingMode = EDITING_LBEGEAR;
|
||||||
|
SetupLBEGUI();
|
||||||
|
break;
|
||||||
case IC_MEDKIT:
|
case IC_MEDKIT:
|
||||||
case IC_KIT:
|
case IC_KIT:
|
||||||
case IC_MISC:
|
case IC_MISC:
|
||||||
@@ -435,7 +445,7 @@ void SpecifyItemToEdit( OBJECTTYPE *pItem, INT32 iMapIndex )
|
|||||||
SetupKeysGUI();
|
SetupKeysGUI();
|
||||||
break;
|
break;
|
||||||
case IC_PUNCH:
|
case IC_PUNCH:
|
||||||
if ( gpItem->usItem != NOTHING)
|
if ( gpItem->exists() == true)
|
||||||
{
|
{
|
||||||
gbEditingMode = EDITING_EQUIPMENT;
|
gbEditingMode = EDITING_EQUIPMENT;
|
||||||
SetupEquipGUI();
|
SetupEquipGUI();
|
||||||
@@ -444,7 +454,7 @@ void SpecifyItemToEdit( OBJECTTYPE *pItem, INT32 iMapIndex )
|
|||||||
// else fall through and act as nothing
|
// else fall through and act as nothing
|
||||||
case IC_NONE:
|
case IC_NONE:
|
||||||
gbEditingMode = EDITING_NOTHING;
|
gbEditingMode = EDITING_NOTHING;
|
||||||
if( !(gpItem->fFlags & OBJECT_UNDROPPABLE) )
|
if( !((*gpItem).fFlags & OBJECT_UNDROPPABLE) )
|
||||||
gbEditingMode = EDITING_DROPPABLE;
|
gbEditingMode = EDITING_DROPPABLE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -516,6 +526,7 @@ void UpdateItemStatsPanel()
|
|||||||
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, L"Trap Level" );
|
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, L"Trap Level" );
|
||||||
break;
|
break;
|
||||||
case EDITING_ARMOUR:
|
case EDITING_ARMOUR:
|
||||||
|
case EDITING_LBEGEAR:
|
||||||
case EDITING_EQUIPMENT:
|
case EDITING_EQUIPMENT:
|
||||||
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 384, L"Status" );
|
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 384, L"Status" );
|
||||||
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, L"Trap Level" );
|
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 404, L"Trap Level" );
|
||||||
@@ -535,7 +546,7 @@ void UpdateItemStatsPanel()
|
|||||||
case EDITING_TRIGGERS:
|
case EDITING_TRIGGERS:
|
||||||
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 369, L"Trap Level");
|
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 369, L"Trap Level");
|
||||||
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 389, L"Tolerance" );
|
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 389, L"Tolerance" );
|
||||||
if( gpEditingItemPool && gpItem->ItemData.Trigger.BombTrigger.bFrequency >= PANIC_FREQUENCY_3 && gpItem->ItemData.Trigger.BombTrigger.bFrequency <= PANIC_FREQUENCY )
|
if( gpEditingItemPool && (*gpItem)[0]->data.misc.bFrequency >= PANIC_FREQUENCY_3 && (*gpItem)[0]->data.misc.bFrequency <= PANIC_FREQUENCY )
|
||||||
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 407, L"Alarm Trigger" );
|
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 407, L"Alarm Trigger" );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -644,19 +655,19 @@ void SetupGunGUI()
|
|||||||
CHAR16 str[20];
|
CHAR16 str[20];
|
||||||
INT16 yp;
|
INT16 yp;
|
||||||
memset( gfAttachment, 0, NUM_ATTACHMENT_BUTTONS );
|
memset( gfAttachment, 0, NUM_ATTACHMENT_BUTTONS );
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Gun.bGunStatus );
|
swprintf( str, L"%d", (*gpItem)[0]->data.gun.bGunStatus );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Gun.ubGunShotsLeft );
|
swprintf( str, L"%d", (*gpItem)[0]->data.gun.ubGunShotsLeft );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->bTrap );
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 420, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 420, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
swprintf( str, L"%d", 100 - gWorldItems[ gpEditingItemPool->iItemIndex ].ubNonExistChance );
|
swprintf( str, L"%d", 100 - gWorldItems[ gpEditingItemPool->iItemIndex ].ubNonExistChance );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 440, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 440, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
}
|
}
|
||||||
//Attachments are a dynamic part of guns. None, some, or all attachments could be available
|
//Attachments are a dynamic part of guns. None, some, or all attachments could be available
|
||||||
//for a particular weapon. Show only the ones that we can apply to this gun.
|
//for a particular weapon. Show only the ones that we can apply to this gun.
|
||||||
yp = 2 * iScreenHeightOffset + 383;
|
yp = 2 * iScreenHeightOffset + 383;
|
||||||
guiAttachmentButton[ SILENCER_ATTACHMENT_BUTTON ] = -1;
|
guiAttachmentButton[ SILENCER_ATTACHMENT_BUTTON ] = -1;
|
||||||
if( ValidAttachment( SILENCER, gpItem->usItem ) )
|
if( ValidAttachment( SILENCER, gpItem->usItem ) )
|
||||||
@@ -665,7 +676,7 @@ void SetupGunGUI()
|
|||||||
CreateTextButton( L"SILENCER", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"SILENCER", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
||||||
yp += 14;
|
yp += 14;
|
||||||
if( FindAttachment( gpItem, SILENCER ) != -1 )
|
if( FindAttachment( gpItem, SILENCER ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiAttachmentButton[ SILENCER_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiAttachmentButton[ SILENCER_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfAttachment[0] = TRUE;
|
gfAttachment[0] = TRUE;
|
||||||
@@ -678,7 +689,7 @@ void SetupGunGUI()
|
|||||||
CreateTextButton( L"SNIPERSCOPE", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"SNIPERSCOPE", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
||||||
yp += 14;
|
yp += 14;
|
||||||
if( FindAttachment( gpItem, SNIPERSCOPE ) != -1 )
|
if( FindAttachment( gpItem, SNIPERSCOPE ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiAttachmentButton[ SNIPERSCOPE_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiAttachmentButton[ SNIPERSCOPE_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfAttachment[1] = TRUE;
|
gfAttachment[1] = TRUE;
|
||||||
@@ -691,7 +702,7 @@ void SetupGunGUI()
|
|||||||
CreateTextButton( L"LASERSCOPE", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"LASERSCOPE", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
||||||
yp += 14;
|
yp += 14;
|
||||||
if( FindAttachment( gpItem, LASERSCOPE ) != -1 )
|
if( FindAttachment( gpItem, LASERSCOPE ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiAttachmentButton[ LASERSCOPE_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiAttachmentButton[ LASERSCOPE_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfAttachment[2] = TRUE;
|
gfAttachment[2] = TRUE;
|
||||||
@@ -704,7 +715,7 @@ void SetupGunGUI()
|
|||||||
CreateTextButton( L"BIPOD", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"BIPOD", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
||||||
yp += 14;
|
yp += 14;
|
||||||
if( FindAttachment( gpItem, BIPOD ) != -1 )
|
if( FindAttachment( gpItem, BIPOD ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiAttachmentButton[ BIPOD_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiAttachmentButton[ BIPOD_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfAttachment[3] = TRUE;
|
gfAttachment[3] = TRUE;
|
||||||
@@ -717,7 +728,7 @@ void SetupGunGUI()
|
|||||||
CreateTextButton( L"DUCKBILL", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"DUCKBILL", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
||||||
yp += 14;
|
yp += 14;
|
||||||
if( FindAttachment( gpItem, DUCKBILL ) != -1 )
|
if( FindAttachment( gpItem, DUCKBILL ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiAttachmentButton[ DUCKBILL_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiAttachmentButton[ DUCKBILL_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfAttachment[4] = TRUE;
|
gfAttachment[4] = TRUE;
|
||||||
@@ -730,7 +741,7 @@ void SetupGunGUI()
|
|||||||
CreateTextButton( L"G-LAUNCHER", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"G-LAUNCHER", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleAttachment );
|
||||||
yp += 14;
|
yp += 14;
|
||||||
if( FindAttachment( gpItem, UNDER_GLAUNCHER ) != -1 )
|
if( FindAttachment( gpItem, UNDER_GLAUNCHER ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiAttachmentButton[ GLAUNCHER_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiAttachmentButton[ GLAUNCHER_ATTACHMENT_BUTTON ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfAttachment[5] = TRUE;
|
gfAttachment[5] = TRUE;
|
||||||
@@ -761,7 +772,7 @@ void ExtractAndUpdateGunGUI()
|
|||||||
i = 20 + Random( 81 );
|
i = 20 + Random( 81 );
|
||||||
else
|
else
|
||||||
i = min( i, 100 );
|
i = min( i, 100 );
|
||||||
gpItem->ItemData.Gun.bGunStatus = (INT8)i;
|
(*gpItem)[0]->data.gun.bGunStatus = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
//Update the ammo
|
//Update the ammo
|
||||||
i = GetNumericStrictValueFromField( 2 );
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
@@ -769,12 +780,12 @@ void ExtractAndUpdateGunGUI()
|
|||||||
i = Random( 1 + Weapon[ gpItem->usItem ].ubMagSize );
|
i = Random( 1 + Weapon[ gpItem->usItem ].ubMagSize );
|
||||||
else
|
else
|
||||||
i = min( i, Weapon[ gpItem->usItem ].ubMagSize );
|
i = min( i, Weapon[ gpItem->usItem ].ubMagSize );
|
||||||
gpItem->ItemData.Gun.ubGunShotsLeft = (UINT8)i;
|
(*gpItem)[0]->data.gun.ubGunShotsLeft = (UINT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
//Update the trap level
|
//Update the trap level
|
||||||
i = GetNumericStrictValueFromField( 3 );
|
i = GetNumericStrictValueFromField( 3 );
|
||||||
i = ( i == -1 ) ? 0 : min( i, 20 );
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
gpItem->bTrap = (INT8)i;
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 3, i );
|
SetInputFieldStringWithNumericStrictValue( 3, i );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -790,7 +801,7 @@ void SetupAmmoGUI()
|
|||||||
CHAR16 str[20];
|
CHAR16 str[20];
|
||||||
swprintf( str, L"%d", gpItem->ubNumberOfObjects );
|
swprintf( str, L"%d", gpItem->ubNumberOfObjects );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->bTrap );
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -810,16 +821,15 @@ void ExtractAndUpdateAmmoGUI()
|
|||||||
//Update the number of clips
|
//Update the number of clips
|
||||||
i = GetNumericStrictValueFromField( 1 );
|
i = GetNumericStrictValueFromField( 1 );
|
||||||
if( i == -1 )
|
if( i == -1 )
|
||||||
i = 1 + Random( Item[ gpItem->usItem ].ubPerPocket );
|
i = 1 + Random( ItemSlotLimit(gpItem, STACK_SIZE_LIMIT) );
|
||||||
else
|
else
|
||||||
i = max( 1, min( i, Item[ gpItem->usItem ].ubPerPocket ) );
|
i = max( 1, min( i, ItemSlotLimit(gpItem, STACK_SIZE_LIMIT) ) );
|
||||||
gpItem->ubNumberOfObjects = (UINT8)i;
|
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
CreateItems( gpItem->usItem, 100, gpItem->ubNumberOfObjects, gpItem );
|
CreateItems( gpItem->usItem, 100, i, gpItem );
|
||||||
//Update the trap level
|
//Update the trap level
|
||||||
i = GetNumericStrictValueFromField( 2 );
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
i = ( i == -1 ) ? 0 : min( i, 20 );
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
gpItem->bTrap = (INT8)i;
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -833,9 +843,9 @@ void ExtractAndUpdateAmmoGUI()
|
|||||||
void SetupArmourGUI()
|
void SetupArmourGUI()
|
||||||
{
|
{
|
||||||
CHAR16 str[20];
|
CHAR16 str[20];
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Generic.bStatus[0] );
|
swprintf( str, L"%d", (*gpItem)[0]->data.objectStatus );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->bTrap );
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -849,7 +859,7 @@ void SetupArmourGUI()
|
|||||||
guiCeramicPlatesButton =
|
guiCeramicPlatesButton =
|
||||||
CreateTextButton( L"CERAMIC PLATES", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"CERAMIC PLATES", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 558, 2 * iScreenHeightOffset + 375, 72, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleCeramicPlates );
|
iScreenWidthOffset + 558, 2 * iScreenHeightOffset + 375, 72, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleCeramicPlates );
|
||||||
if( FindAttachment( gpItem, CERAMIC_PLATES ) != -1 )
|
if( FindAttachment( gpItem, CERAMIC_PLATES ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiCeramicPlatesButton ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiCeramicPlatesButton ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfCeramicPlates = TRUE;
|
gfCeramicPlates = TRUE;
|
||||||
@@ -875,12 +885,56 @@ void ExtractAndUpdateArmourGUI()
|
|||||||
i = 20 + Random( 81 );
|
i = 20 + Random( 81 );
|
||||||
else
|
else
|
||||||
i = min( i, 100 );
|
i = min( i, 100 );
|
||||||
gpItem->ItemData.Generic.bStatus[0] = (INT8)i;
|
(*gpItem)[0]->data.objectStatus = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
//Update the trap level
|
//Update the trap level
|
||||||
i = GetNumericStrictValueFromField( 2 );
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
i = ( i == -1 ) ? 0 : min( i, 20 );
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
gpItem->bTrap = (INT8)i;
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
|
if( gpEditingItemPool )
|
||||||
|
{
|
||||||
|
giDefaultExistChance = GetNumericStrictValueFromField( 3 );
|
||||||
|
giDefaultExistChance = ( giDefaultExistChance == -1 ) ? 100 : max( 1, min( giDefaultExistChance, 100 ) );
|
||||||
|
gWorldItems[ gpEditingItemPool->iItemIndex ].ubNonExistChance = (UINT8)(100 - giDefaultExistChance );
|
||||||
|
SetInputFieldStringWithNumericStrictValue( 3, giDefaultExistChance );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetupLBEGUI()
|
||||||
|
{
|
||||||
|
CHAR16 str[20];
|
||||||
|
swprintf( str, L"%d", (*gpItem)[0]->data.objectStatus );
|
||||||
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||||
|
if( gpEditingItemPool )
|
||||||
|
{
|
||||||
|
swprintf( str, L"%d", 100 - gWorldItems[ gpEditingItemPool->iItemIndex ].ubNonExistChance );
|
||||||
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 440, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void RemoveLBEGUI()
|
||||||
|
{
|
||||||
|
//nothing to remove
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExtractAndUpdateLBEGUI()
|
||||||
|
{
|
||||||
|
INT32 i;
|
||||||
|
//Update the equipment status
|
||||||
|
i = GetNumericStrictValueFromField( 1 );
|
||||||
|
if( i == -1 )
|
||||||
|
i = 20 + Random( 81 );
|
||||||
|
else
|
||||||
|
i = min( i, 100 );
|
||||||
|
(*gpItem)[0]->data.objectStatus = (INT8)i;
|
||||||
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
|
//Update the trap level
|
||||||
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -894,9 +948,9 @@ void ExtractAndUpdateArmourGUI()
|
|||||||
void SetupEquipGUI()
|
void SetupEquipGUI()
|
||||||
{
|
{
|
||||||
CHAR16 str[20];
|
CHAR16 str[20];
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Generic.bStatus[0] );
|
swprintf( str, L"%d", (*gpItem)[0]->data.objectStatus );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->bTrap );
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -919,12 +973,12 @@ void ExtractAndUpdateEquipGUI()
|
|||||||
i = 20 + Random( 81 );
|
i = 20 + Random( 81 );
|
||||||
else
|
else
|
||||||
i = min( i, 100 );
|
i = min( i, 100 );
|
||||||
gpItem->ItemData.Generic.bStatus[0] = (INT8)i;
|
(*gpItem)[0]->data.objectStatus = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
//Update the trap level
|
//Update the trap level
|
||||||
i = GetNumericStrictValueFromField( 2 );
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
i = ( i == -1 ) ? 0 : min( i, 20 );
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
gpItem->bTrap = (INT8)i;
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -939,15 +993,15 @@ void SetupExplosivesGUI()
|
|||||||
{
|
{
|
||||||
CHAR16 str[20];
|
CHAR16 str[20];
|
||||||
INT16 yp;
|
INT16 yp;
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Generic.bStatus[0] );
|
swprintf( str, L"%d", (*gpItem)[0]->data.objectStatus );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->ubNumberOfObjects );
|
swprintf( str, L"%d", gpItem->ubNumberOfObjects );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( Item[ gpItem->usItem ].ubPerPocket == 1 )
|
if( ItemSlotLimit(gpItem, STACK_SIZE_LIMIT)== 1 )
|
||||||
{
|
{
|
||||||
DisableTextField( 2 );
|
DisableTextField( 2 );
|
||||||
}
|
}
|
||||||
swprintf( str, L"%d", gpItem->bTrap );
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 420, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 420, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -963,7 +1017,7 @@ void SetupExplosivesGUI()
|
|||||||
CreateTextButton( L"DETONATOR", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( L"DETONATOR", SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleDetonator );
|
iScreenWidthOffset + 570, yp, 60, 12, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, ToggleDetonator );
|
||||||
yp += 14;
|
yp += 14;
|
||||||
if( FindAttachment( gpItem, DETONATOR ) != -1 )
|
if( FindAttachment( gpItem, DETONATOR ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiDetonatorButton ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ guiDetonatorButton ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
gfDetonator = TRUE;
|
gfDetonator = TRUE;
|
||||||
@@ -989,24 +1043,23 @@ void ExtractAndUpdateExplosivesGUI()
|
|||||||
i = 20 + Random( 81 );
|
i = 20 + Random( 81 );
|
||||||
else
|
else
|
||||||
i = min( i, 100 );
|
i = min( i, 100 );
|
||||||
gpItem->ItemData.Generic.bStatus[0] = (INT8)i;
|
(*gpItem)[0]->data.objectStatus = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
//Update the quantity
|
//Update the quantity
|
||||||
if( Item[ gpItem->usItem ].ubPerPocket > 1 )
|
if( ItemSlotLimit(gpItem, STACK_SIZE_LIMIT) > 1 )
|
||||||
{
|
{
|
||||||
i = GetNumericStrictValueFromField( 2 );
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
if( i == -1 )
|
if( i == -1 )
|
||||||
i = 1 + Random( Item[ gpItem->usItem ].ubPerPocket );
|
i = 1 + Random( ItemSlotLimit(gpItem, STACK_SIZE_LIMIT) );
|
||||||
else
|
else
|
||||||
i = max( 1, min( i, Item[ gpItem->usItem ].ubPerPocket ) );
|
i = max( 1, min( i, ItemSlotLimit(gpItem, STACK_SIZE_LIMIT) ) );
|
||||||
gpItem->ubNumberOfObjects = (UINT8)i;
|
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
CreateItems( gpItem->usItem, gpItem->ItemData.Generic.bStatus[0], gpItem->ubNumberOfObjects, gpItem );
|
CreateItems( gpItem->usItem, (INT8)(*gpItem)[0]->data.objectStatus, i, gpItem );
|
||||||
}
|
}
|
||||||
//Update the trap level
|
//Update the trap level
|
||||||
i = GetNumericStrictValueFromField( 3 );
|
i = GetNumericStrictValueFromField( 3 );
|
||||||
i = ( i == -1 ) ? 0 : min( i, 20 );
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
gpItem->bTrap = (INT8)i;
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 3, i );
|
SetInputFieldStringWithNumericStrictValue( 3, i );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -1020,7 +1073,7 @@ void ExtractAndUpdateExplosivesGUI()
|
|||||||
void SetupMoneyGUI()
|
void SetupMoneyGUI()
|
||||||
{
|
{
|
||||||
CHAR16 str[20];
|
CHAR16 str[20];
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Money.uiMoneyAmount );
|
swprintf( str, L"%d", (*gpItem)[0]->data.money.uiMoneyAmount );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 45, 15, MSYS_PRIORITY_NORMAL, str, 5, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 45, 15, MSYS_PRIORITY_NORMAL, str, 5, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -1038,8 +1091,8 @@ void ExtractAndUpdateMoneyGUI()
|
|||||||
i = Random( 20000 );
|
i = Random( 20000 );
|
||||||
else
|
else
|
||||||
i = max( 1, min( i, 20000 ) );
|
i = max( 1, min( i, 20000 ) );
|
||||||
gpItem->ItemData.Money.uiMoneyAmount = i;
|
(*gpItem)[0]->data.money.uiMoneyAmount = i;
|
||||||
gpItem->ItemData.Money.bMoneyStatus = 100;
|
(*gpItem)[0]->data.objectStatus = 100;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -1058,10 +1111,10 @@ void RemoveMoneyGUI()
|
|||||||
void SetupOwnershipGUI()
|
void SetupOwnershipGUI()
|
||||||
{
|
{
|
||||||
CHAR16 str[20];
|
CHAR16 str[20];
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Owner.ubOwnerProfile );
|
swprintf( str, L"%d", (*gpItem)[0]->data.owner.ubOwnerProfile );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
giOwnershipGroupButton =
|
giOwnershipGroupButton =
|
||||||
CreateTextButton( gszCivGroupNames[ gpItem->ItemData.Owner.ubOwnerCivGroup ], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
CreateTextButton( gszCivGroupNames[ (*gpItem)[0]->data.owner.ubOwnerCivGroup ], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||||
iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 415, 80, 25, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, OwnershipGroupButtonCallback );
|
iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 415, 80, 25, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, OwnershipGroupButtonCallback );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1075,7 +1128,7 @@ void OwnershipGroupButtonCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
|
|
||||||
void SetOwnershipGroup( UINT8 ubNewGroup )
|
void SetOwnershipGroup( UINT8 ubNewGroup )
|
||||||
{
|
{
|
||||||
gpItem->ItemData.Owner.ubOwnerCivGroup = ubNewGroup;
|
(*gpItem)[0]->data.owner.ubOwnerCivGroup = ubNewGroup;
|
||||||
SpecifyButtonText( giOwnershipGroupButton, gszCivGroupNames[ ubNewGroup ] );
|
SpecifyButtonText( giOwnershipGroupButton, gszCivGroupNames[ ubNewGroup ] );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1088,7 +1141,7 @@ void ExtractAndUpdateOwnershipGUI()
|
|||||||
i = Random( 0 );
|
i = Random( 0 );
|
||||||
else
|
else
|
||||||
i = max( 0, min( i, 255 ) );
|
i = max( 0, min( i, 255 ) );
|
||||||
gpItem->ItemData.Owner.ubOwnerProfile = (UINT8)i;
|
(*gpItem)[0]->data.owner.ubOwnerProfile = (UINT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1131,9 +1184,9 @@ void SetupActionItemsGUI()
|
|||||||
{
|
{
|
||||||
CHAR16 str[4];
|
CHAR16 str[4];
|
||||||
STR16 pStr;
|
STR16 pStr;
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Generic.bStatus[0] );
|
swprintf( str, L"%d", (*gpItem)[0]->data.objectStatus );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 365, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 365, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->bTrap );
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 385, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 385, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
@@ -1155,14 +1208,14 @@ void ExtractAndUpdateActionItemsGUI()
|
|||||||
i = 20 + Random( 81 );
|
i = 20 + Random( 81 );
|
||||||
else
|
else
|
||||||
i = min( i, 100 );
|
i = min( i, 100 );
|
||||||
gpItem->ItemData.Generic.bStatus[0] = (INT8)i;
|
(*gpItem)[0]->data.objectStatus = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
//Update the trap level
|
//Update the trap level
|
||||||
i = GetNumericStrictValueFromField( 2 );
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
i = ( i == -1 ) ? 0 : min( i, 20 );
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
if( i != gpItem->bTrap )
|
if( i != (*gpItem)[0]->data.bTrap )
|
||||||
gbDefaultBombTrapLevel = (INT8)i;
|
gbDefaultBombTrapLevel = (INT8)i;
|
||||||
gpItem->bTrap = (INT8)i;
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
|
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
@@ -1188,29 +1241,29 @@ void AlarmTriggerCheckboxCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||||
gpItem->fFlags |= OBJECT_ALARM_TRIGGER;
|
(*gpItem).fFlags |= OBJECT_ALARM_TRIGGER;
|
||||||
else
|
else
|
||||||
gpItem->fFlags &= ~OBJECT_ALARM_TRIGGER;
|
(*gpItem).fFlags &= ~OBJECT_ALARM_TRIGGER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupTriggersGUI()
|
void SetupTriggersGUI()
|
||||||
{
|
{
|
||||||
CHAR16 str[4];
|
CHAR16 str[4];
|
||||||
swprintf( str, L"%d", gpItem->bTrap );
|
swprintf( str, L"%d", (*gpItem)[0]->data.bTrap );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 365, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 365, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
swprintf( str, L"%d", gpItem->ItemData.Trigger.Area.ubTolerance );
|
swprintf( str, L"%d", (*gpItem)[0]->data.misc.ubTolerance );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 385, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 385, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
{
|
{
|
||||||
swprintf( str, L"%d", 100 - gWorldItems[ gpEditingItemPool->iItemIndex ].ubNonExistChance );
|
swprintf( str, L"%d", 100 - gWorldItems[ gpEditingItemPool->iItemIndex ].ubNonExistChance );
|
||||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 440, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 440, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||||
if( gpItem->ItemData.Trigger.BombTrigger.bFrequency <= PANIC_FREQUENCY && gpItem->ItemData.Trigger.BombTrigger.bFrequency >= PANIC_FREQUENCY_3 )
|
if( (*gpItem)[0]->data.misc.bFrequency <= PANIC_FREQUENCY && (*gpItem)[0]->data.misc.bFrequency >= PANIC_FREQUENCY_3 )
|
||||||
{
|
{
|
||||||
giAlarmTriggerButton =
|
giAlarmTriggerButton =
|
||||||
CreateCheckBoxButton( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 405, "EDITOR//smCheckBox.sti", MSYS_PRIORITY_NORMAL, AlarmTriggerCheckboxCallback );
|
CreateCheckBoxButton( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 405, "EDITOR//smCheckBox.sti", MSYS_PRIORITY_NORMAL, AlarmTriggerCheckboxCallback );
|
||||||
SetButtonFastHelpText( giAlarmTriggerButton, L"If the panic trigger is an alarm trigger,\nenemies won't attempt to use it if they\nare already aware of your presence.");
|
SetButtonFastHelpText( giAlarmTriggerButton, L"If the panic trigger is an alarm trigger,\nenemies won't attempt to use it if they\nare already aware of your presence.");
|
||||||
if( gpItem->fFlags & OBJECT_ALARM_TRIGGER )
|
if( (*gpItem).fFlags & OBJECT_ALARM_TRIGGER )
|
||||||
ButtonList[ giAlarmTriggerButton ]->uiFlags |= BUTTON_CLICKED_ON;
|
ButtonList[ giAlarmTriggerButton ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1222,12 +1275,12 @@ void ExtractAndUpdateTriggersGUI()
|
|||||||
//Update the trap level
|
//Update the trap level
|
||||||
i = GetNumericStrictValueFromField( 1 );
|
i = GetNumericStrictValueFromField( 1 );
|
||||||
i = ( i == -1 ) ? 0 : min( i, 20 );
|
i = ( i == -1 ) ? 0 : min( i, 20 );
|
||||||
gpItem->bTrap = (INT8)i;
|
(*gpItem)[0]->data.bTrap = (INT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||||
|
|
||||||
i = GetNumericStrictValueFromField( 2 );
|
i = GetNumericStrictValueFromField( 2 );
|
||||||
i = ( i == -1 ) ? 0 : max( 0, min( i, 99 ) );
|
i = ( i == -1 ) ? 0 : max( 0, min( i, 99 ) );
|
||||||
gpItem->ItemData.Trigger.Area.ubTolerance = (UINT8)i;
|
(*gpItem)[0]->data.misc.ubTolerance = (UINT8)i;
|
||||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||||
|
|
||||||
if( gpEditingItemPool )
|
if( gpEditingItemPool )
|
||||||
@@ -1241,7 +1294,7 @@ void ExtractAndUpdateTriggersGUI()
|
|||||||
|
|
||||||
void RemoveTriggersGUI()
|
void RemoveTriggersGUI()
|
||||||
{
|
{
|
||||||
if( gpEditingItemPool && gpItem->ItemData.Trigger.BombTrigger.bFrequency <= PANIC_FREQUENCY && gpItem->ItemData.Trigger.BombTrigger.bFrequency >= PANIC_FREQUENCY_3 )
|
if( gpEditingItemPool && (*gpItem)[0]->data.misc.bFrequency <= PANIC_FREQUENCY && (*gpItem)[0]->data.misc.bFrequency >= PANIC_FREQUENCY_3 )
|
||||||
{
|
{
|
||||||
if( giAlarmTriggerButton != -1 )
|
if( giAlarmTriggerButton != -1 )
|
||||||
{
|
{
|
||||||
@@ -1257,7 +1310,6 @@ void ToggleAttachment( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
UINT16 usAttachment = 0;
|
UINT16 usAttachment = 0;
|
||||||
OBJECTTYPE temp;
|
|
||||||
for( i = 0; i < NUM_ATTACHMENT_BUTTONS; i++ )
|
for( i = 0; i < NUM_ATTACHMENT_BUTTONS; i++ )
|
||||||
{ //Loop through and find the button that was just modified
|
{ //Loop through and find the button that was just modified
|
||||||
switch( i )
|
switch( i )
|
||||||
@@ -1276,17 +1328,16 @@ void ToggleAttachment( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
gfAttachment[ i ] = TRUE;
|
gfAttachment[ i ] = TRUE;
|
||||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
CreateItem( usAttachment, gpItem->ItemData.Gun.bGunStatus, &temp );
|
CreateItem( usAttachment, (*gpItem)[0]->data.gun.bGunStatus, &gTempObject );
|
||||||
AttachObject( NULL, gpItem, &temp );
|
gpItem->AttachObject( NULL, &gTempObject );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //Button is out, so remove the attachment
|
{ //Button is out, so remove the attachment
|
||||||
INT8 slot;
|
|
||||||
gfAttachment[ i ] = FALSE;
|
gfAttachment[ i ] = FALSE;
|
||||||
btn->uiFlags &= ~BUTTON_CLICKED_ON;
|
btn->uiFlags &= ~BUTTON_CLICKED_ON;
|
||||||
slot = FindAttachment( gpItem, usAttachment );
|
OBJECTTYPE* pAttachment = FindAttachment( gpItem, usAttachment );
|
||||||
if( slot != -1 )
|
if( pAttachment )
|
||||||
RemoveAttachment( gpItem, slot, &temp );
|
gpItem->RemoveAttachment( pAttachment );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1298,21 +1349,19 @@ void ToggleCeramicPlates( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
OBJECTTYPE temp;
|
|
||||||
gfCeramicPlates ^= TRUE;
|
gfCeramicPlates ^= TRUE;
|
||||||
if( gfCeramicPlates )
|
if( gfCeramicPlates )
|
||||||
{
|
{
|
||||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
CreateItem( CERAMIC_PLATES, gpItem->ItemData.Generic.bStatus[0], &temp );
|
CreateItem( CERAMIC_PLATES, (*gpItem)[0]->data.objectStatus, &gTempObject );
|
||||||
AttachObject( NULL, gpItem, &temp );
|
gpItem->AttachObject( NULL, &gTempObject );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
INT8 slot;
|
|
||||||
btn->uiFlags &= ~BUTTON_CLICKED_ON;
|
btn->uiFlags &= ~BUTTON_CLICKED_ON;
|
||||||
slot = FindAttachment( gpItem, CERAMIC_PLATES );
|
OBJECTTYPE* pAttachment = FindAttachment( gpItem, CERAMIC_PLATES );
|
||||||
if( slot != -1 )
|
if( pAttachment )
|
||||||
RemoveAttachment( gpItem, slot, &temp );
|
gpItem->RemoveAttachment( pAttachment );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1321,22 +1370,20 @@ void ToggleDetonator( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
OBJECTTYPE temp;
|
|
||||||
if( !gfDetonator )
|
if( !gfDetonator )
|
||||||
{
|
{
|
||||||
gfDetonator = TRUE;
|
gfDetonator = TRUE;
|
||||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
CreateItem( DETONATOR, gpItem->ItemData.Generic.bStatus[0], &temp );
|
CreateItem( DETONATOR, (*gpItem)[0]->data.objectStatus, &gTempObject );
|
||||||
AttachObject( NULL, gpItem, &temp );
|
gpItem->AttachObject( NULL, &gTempObject );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //Button is out, so remove the attachment
|
{ //Button is out, so remove the attachment
|
||||||
INT8 slot;
|
|
||||||
gfDetonator = FALSE;
|
gfDetonator = FALSE;
|
||||||
btn->uiFlags &= ~BUTTON_CLICKED_ON;
|
btn->uiFlags &= ~BUTTON_CLICKED_ON;
|
||||||
slot = FindAttachment( gpItem, DETONATOR );
|
OBJECTTYPE* pAttachment = FindAttachment( gpItem, DETONATOR );
|
||||||
if( slot != -1 )
|
if( pAttachment )
|
||||||
RemoveAttachment( gpItem, slot, &temp );
|
gpItem->RemoveAttachment( pAttachment );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1352,133 +1399,133 @@ void ActionItemCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
void ChangeActionItem( OBJECTTYPE *pItem, INT8 bActionItemIndex )
|
void ChangeActionItem( OBJECTTYPE *pItem, INT8 bActionItemIndex )
|
||||||
{
|
{
|
||||||
pItem->usItem = ACTION_ITEM;
|
pItem->usItem = ACTION_ITEM;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_BLOW_UP;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_BLOW_UP;
|
||||||
switch( bActionItemIndex )
|
switch( bActionItemIndex )
|
||||||
{
|
{
|
||||||
case ACTIONITEM_TRIP_KLAXON:
|
case ACTIONITEM_TRIP_KLAXON:
|
||||||
pItem->ItemData.Trigger.usBombItem = TRIP_KLAXON;
|
(*pItem)[0]->data.misc.usBombItem = TRIP_KLAXON;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_FLARE:
|
case ACTIONITEM_FLARE:
|
||||||
pItem->ItemData.Trigger.usBombItem = TRIP_FLARE;
|
(*pItem)[0]->data.misc.usBombItem = TRIP_FLARE;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TEARGAS:
|
case ACTIONITEM_TEARGAS:
|
||||||
pItem->ItemData.Trigger.usBombItem = TEARGAS_GRENADE;
|
(*pItem)[0]->data.misc.usBombItem = TEARGAS_GRENADE;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_STUN:
|
case ACTIONITEM_STUN:
|
||||||
pItem->ItemData.Trigger.usBombItem = STUN_GRENADE;
|
(*pItem)[0]->data.misc.usBombItem = STUN_GRENADE;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_SMOKE:
|
case ACTIONITEM_SMOKE:
|
||||||
pItem->ItemData.Trigger.usBombItem = SMOKE_GRENADE;
|
(*pItem)[0]->data.misc.usBombItem = SMOKE_GRENADE;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_MUSTARD:
|
case ACTIONITEM_MUSTARD:
|
||||||
pItem->ItemData.Trigger.usBombItem = MUSTARD_GRENADE;
|
(*pItem)[0]->data.misc.usBombItem = MUSTARD_GRENADE;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_MINE:
|
case ACTIONITEM_MINE:
|
||||||
pItem->ItemData.Trigger.usBombItem = MINE;
|
(*pItem)[0]->data.misc.usBombItem = MINE;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_OPEN:
|
case ACTIONITEM_OPEN:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_OPEN_DOOR;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_OPEN_DOOR;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_CLOSE:
|
case ACTIONITEM_CLOSE:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_CLOSE_DOOR;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_CLOSE_DOOR;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_UNLOCK_DOOR:
|
case ACTIONITEM_UNLOCK_DOOR:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_UNLOCK_DOOR;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_UNLOCK_DOOR;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TOGGLE_LOCK:
|
case ACTIONITEM_TOGGLE_LOCK:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_LOCK;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_TOGGLE_LOCK;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_UNTRAP_DOOR:
|
case ACTIONITEM_UNTRAP_DOOR:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_UNTRAP_DOOR;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_UNTRAP_DOOR;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TOGGLE_PRESSURE_ITEMS:
|
case ACTIONITEM_TOGGLE_PRESSURE_ITEMS:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_PRESSURE_ITEMS;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_TOGGLE_PRESSURE_ITEMS;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_SMPIT:
|
case ACTIONITEM_SMPIT:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_SMALL_PIT;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_SMALL_PIT;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_LGPIT:
|
case ACTIONITEM_LGPIT:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_LARGE_PIT;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_LARGE_PIT;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TOGGLE_DOOR:
|
case ACTIONITEM_TOGGLE_DOOR:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_DOOR;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_TOGGLE_DOOR;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TOGGLE_ACTION1:
|
case ACTIONITEM_TOGGLE_ACTION1:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_ACTION1;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_TOGGLE_ACTION1;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TOGGLE_ACTION2:
|
case ACTIONITEM_TOGGLE_ACTION2:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_ACTION2;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_TOGGLE_ACTION2;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TOGGLE_ACTION3:
|
case ACTIONITEM_TOGGLE_ACTION3:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_ACTION3;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_TOGGLE_ACTION3;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_TOGGLE_ACTION4:
|
case ACTIONITEM_TOGGLE_ACTION4:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_ACTION4;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_TOGGLE_ACTION4;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_ENTER_BROTHEL:
|
case ACTIONITEM_ENTER_BROTHEL:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_ENTER_BROTHEL;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_ENTER_BROTHEL;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_EXIT_BROTHEL:
|
case ACTIONITEM_EXIT_BROTHEL:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_EXIT_BROTHEL;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_EXIT_BROTHEL;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_KINGPIN_ALARM:
|
case ACTIONITEM_KINGPIN_ALARM:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_KINGPIN_ALARM;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_KINGPIN_ALARM;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_SEX:
|
case ACTIONITEM_SEX:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_SEX;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_SEX;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_REVEAL_ROOM:
|
case ACTIONITEM_REVEAL_ROOM:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_REVEAL_ROOM;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_REVEAL_ROOM;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_LOCAL_ALARM:
|
case ACTIONITEM_LOCAL_ALARM:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_LOCAL_ALARM;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_LOCAL_ALARM;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_GLOBAL_ALARM:
|
case ACTIONITEM_GLOBAL_ALARM:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_GLOBAL_ALARM;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_GLOBAL_ALARM;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_KLAXON:
|
case ACTIONITEM_KLAXON:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_KLAXON;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_KLAXON;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_SMALL:
|
case ACTIONITEM_SMALL:
|
||||||
pItem->ItemData.Trigger.usBombItem = HAND_GRENADE;
|
(*pItem)[0]->data.misc.usBombItem = HAND_GRENADE;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_MEDIUM:
|
case ACTIONITEM_MEDIUM:
|
||||||
pItem->ItemData.Trigger.usBombItem = TNT;
|
(*pItem)[0]->data.misc.usBombItem = TNT;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_LARGE:
|
case ACTIONITEM_LARGE:
|
||||||
pItem->ItemData.Trigger.usBombItem = C4;
|
(*pItem)[0]->data.misc.usBombItem = C4;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_MUSEUM_ALARM:
|
case ACTIONITEM_MUSEUM_ALARM:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_MUSEUM_ALARM;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_MUSEUM_ALARM;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_BLOODCAT_ALARM:
|
case ACTIONITEM_BLOODCAT_ALARM:
|
||||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
(*pItem)[0]->data.misc.usBombItem = NOTHING;
|
||||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_BLOODCAT_ALARM;
|
(*pItem)[0]->data.misc.bActionValue = ACTION_ITEM_BLOODCAT_ALARM;
|
||||||
break;
|
break;
|
||||||
case ACTIONITEM_BIG_TEAR_GAS:
|
case ACTIONITEM_BIG_TEAR_GAS:
|
||||||
pItem->ItemData.Trigger.usBombItem = BIG_TEAR_GAS;
|
(*pItem)[0]->data.misc.usBombItem = BIG_TEAR_GAS;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1494,9 +1541,9 @@ void UpdateActionItem( INT8 bActionItemIndex )
|
|||||||
//If the previous item was a pit, remove it before changing it
|
//If the previous item was a pit, remove it before changing it
|
||||||
if( gpItem->usItem == ACTION_ITEM )
|
if( gpItem->usItem == ACTION_ITEM )
|
||||||
{
|
{
|
||||||
if( gpItem->ItemData.Trigger.bActionValue == ACTION_ITEM_SMALL_PIT )
|
if( (*gpItem)[0]->data.misc.bActionValue == ACTION_ITEM_SMALL_PIT )
|
||||||
Remove3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
Remove3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
else if( gpItem->ItemData.Trigger.bActionValue == ACTION_ITEM_LARGE_PIT )
|
else if( (*gpItem)[0]->data.misc.bActionValue == ACTION_ITEM_LARGE_PIT )
|
||||||
Remove5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
Remove5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1506,9 +1553,9 @@ void UpdateActionItem( INT8 bActionItemIndex )
|
|||||||
//If the new item is a pit, add it so we can see how it looks.
|
//If the new item is a pit, add it so we can see how it looks.
|
||||||
if( gpItem->usItem == ACTION_ITEM )
|
if( gpItem->usItem == ACTION_ITEM )
|
||||||
{
|
{
|
||||||
if( gpItem->ItemData.Trigger.bActionValue == ACTION_ITEM_SMALL_PIT )
|
if( (*gpItem)[0]->data.misc.bActionValue == ACTION_ITEM_SMALL_PIT )
|
||||||
Add3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
Add3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
else if( gpItem->ItemData.Trigger.bActionValue == ACTION_ITEM_LARGE_PIT )
|
else if( (*gpItem)[0]->data.misc.bActionValue == ACTION_ITEM_LARGE_PIT )
|
||||||
Add5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
Add5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,17 @@
|
|||||||
#ifndef __ITEM_STATISTICS_H
|
#ifndef __ITEM_STATISTICS_H
|
||||||
#define __ITEM_STATISTICS_H
|
#define __ITEM_STATISTICS_H
|
||||||
|
|
||||||
#include "Item Types.h"
|
//#include "Item Types.h"
|
||||||
|
|
||||||
|
//forward declarations of common classes to eliminate includes
|
||||||
|
class OBJECTTYPE;
|
||||||
|
class SOLDIERTYPE;
|
||||||
|
|
||||||
|
|
||||||
//Handles the dynamic changing of text input fields and button modes depending on the currently edited
|
//Handles the dynamic changing of text input fields and button modes depending on the currently edited
|
||||||
//item. Both the merc's inventory panel, and the items tab use the same code to accomplish this.
|
//item. Both the merc's inventory panel, and the items tab use the same code to accomplish this.
|
||||||
|
|
||||||
//Set if we are editing items from the items tab. Otherwise, it is assumed that we are
|
//Set if we are editing items from the items tab. Otherwise, it is assumed that we are
|
||||||
//editing items from the merc's inventory panel.
|
//editing items from the merc's inventory panel.
|
||||||
extern BOOLEAN gfItemEditingMode;
|
extern BOOLEAN gfItemEditingMode;
|
||||||
|
|
||||||
@@ -40,8 +45,8 @@ void ExecuteItemStatsCmd( UINT8 ubAction );
|
|||||||
extern OBJECTTYPE *gpItem;
|
extern OBJECTTYPE *gpItem;
|
||||||
extern INT16 gsItemGridNo;
|
extern INT16 gsItemGridNo;
|
||||||
|
|
||||||
//enumerations for all of the different action items. Used by the popup menu for
|
//enumerations for all of the different action items. Used by the popup menu for
|
||||||
//changing the type of action item. When modified, an equivalent text array must be
|
//changing the type of action item. When modified, an equivalent text array must be
|
||||||
//changed as well.
|
//changed as well.
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -948,6 +948,8 @@ UINT32 ProcessFileIO()
|
|||||||
CreateMessageBox( L" Error loading file. Try another filename?" );
|
CreateMessageBox( L" Error loading file. Try another filename?" );
|
||||||
return LOADSAVE_SCREEN;
|
return LOADSAVE_SCREEN;
|
||||||
}
|
}
|
||||||
|
//ADB these are NOT set yet! but they need to be, duh
|
||||||
|
CompileWorldMovementCosts();
|
||||||
SetGlobalSectorValues( gzFilename );
|
SetGlobalSectorValues( gzFilename );
|
||||||
|
|
||||||
RestoreFontSettings();
|
RestoreFontSettings();
|
||||||
@@ -958,9 +960,9 @@ UINT32 ProcessFileIO()
|
|||||||
//UpdateMercsInSector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
//UpdateMercsInSector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||||
|
|
||||||
AddSoldierInitListTeamToWorld( ENEMY_TEAM, 255 );
|
AddSoldierInitListTeamToWorld( ENEMY_TEAM, 255 );
|
||||||
AddSoldierInitListTeamToWorld( CREATURE_TEAM, 255 );
|
AddSoldierInitListTeamToWorld( CREATURE_TEAM, 255 );
|
||||||
AddSoldierInitListTeamToWorld( MILITIA_TEAM, 255 );
|
AddSoldierInitListTeamToWorld( MILITIA_TEAM, 255 );
|
||||||
AddSoldierInitListTeamToWorld( CIV_TEAM, 255 );
|
AddSoldierInitListTeamToWorld( CIV_TEAM, 255 );
|
||||||
iCurrentAction = ACTION_NULL;
|
iCurrentAction = ACTION_NULL;
|
||||||
gbCurrentFileIOStatus = IOSTATUS_NONE;
|
gbCurrentFileIOStatus = IOSTATUS_NONE;
|
||||||
if( !gfCaves && !gfBasement )
|
if( !gfCaves && !gfBasement )
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ typedef struct MACROSTRUCT
|
|||||||
}MACROSTRUCT;
|
}MACROSTRUCT;
|
||||||
//road macros
|
//road macros
|
||||||
|
|
||||||
//These define the macros for the 32 road pieces. The column contains the macro ID and
|
//These define the macros for the 32 road pieces. The column contains the macro ID and
|
||||||
//the second contains the gridno offset from the anchor position (where the user clicks in the world to
|
//the second contains the gridno offset from the anchor position (where the user clicks in the world to
|
||||||
//place the road). The actual index of the array refers to the offset from ROADPIECE001.
|
//place the road). The actual index of the array refers to the offset from ROADPIECE001.
|
||||||
MACROSTRUCT gRoadMacros[] =
|
MACROSTRUCT gRoadMacros[] =
|
||||||
{
|
{
|
||||||
//left 1
|
//left 1
|
||||||
@@ -148,19 +148,19 @@ MACROSTRUCT gRoadMacros[] =
|
|||||||
{RTL, -322 },
|
{RTL, -322 },
|
||||||
{RTL, -482 },
|
{RTL, -482 },
|
||||||
{RTL, -642 },
|
{RTL, -642 },
|
||||||
{RTL, -802 },
|
{RTL, -802 },
|
||||||
{RTL, -1 },
|
{RTL, -1 },
|
||||||
{RTL, -161 },
|
{RTL, -161 },
|
||||||
{RTL, -321 },
|
{RTL, -321 },
|
||||||
{RTL, -481 },
|
{RTL, -481 },
|
||||||
{RTL, -641 },
|
{RTL, -641 },
|
||||||
{RTL, -801 },
|
{RTL, -801 },
|
||||||
{RTL, 0 },
|
{RTL, 0 },
|
||||||
{RTL, -160 },
|
{RTL, -160 },
|
||||||
{RTL, -320 },
|
{RTL, -320 },
|
||||||
{RTL, -480 },
|
{RTL, -480 },
|
||||||
{RTL, -640 },
|
{RTL, -640 },
|
||||||
{RTL, -800 },
|
{RTL, -800 },
|
||||||
//right half of top-left corner
|
//right half of top-left corner
|
||||||
{RBR, 159 },
|
{RBR, 159 },
|
||||||
{RBR, -1 },
|
{RBR, -1 },
|
||||||
@@ -398,7 +398,7 @@ void InitializeRoadMacros()
|
|||||||
// i = ROADPIECES001;
|
// i = ROADPIECES001;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Road macros vary in size from 3 gridnos to 18 gridnos. Using the anchor gridno based off of the original
|
//Road macros vary in size from 3 gridnos to 18 gridnos. Using the anchor gridno based off of the original
|
||||||
//road system, this function will place the new macro (consisting of multiple road pieces in multiple
|
//road system, this function will place the new macro (consisting of multiple road pieces in multiple
|
||||||
//gridnos).
|
//gridnos).
|
||||||
void PlaceRoadMacroAtGridNo( INT32 iMapIndex, INT32 iMacroID )
|
void PlaceRoadMacroAtGridNo( INT32 iMapIndex, INT32 iMacroID )
|
||||||
@@ -416,9 +416,9 @@ void PlaceRoadMacroAtGridNo( INT32 iMapIndex, INT32 iMacroID )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//The old road system used multi-tiled roads as a single image. The new road system has taken these large
|
//The old road system used multi-tiled roads as a single image. The new road system has taken these large
|
||||||
//pieces and chopped them up into single tiled images (to mitigate lighting problems). Some of the larger
|
//pieces and chopped them up into single tiled images (to mitigate lighting problems). Some of the larger
|
||||||
//road pieces turned into 18 smaller pieces. So this function will go analyse the world, and replaces any
|
//road pieces turned into 18 smaller pieces. So this function will go analyse the world, and replaces any
|
||||||
//locations containing the original road tile information, delete it, and replace it by inserting it's
|
//locations containing the original road tile information, delete it, and replace it by inserting it's
|
||||||
//equivalent macro.
|
//equivalent macro.
|
||||||
void ReplaceObsoleteRoads()
|
void ReplaceObsoleteRoads()
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#ifndef __ROAD_SMOOTHING_H
|
#ifndef __ROAD_SMOOTHING_H
|
||||||
#define __ROAD_SMOOTHING_H
|
#define __ROAD_SMOOTHING_H
|
||||||
|
|
||||||
//There are the 32 macro definitions that make up all of the road pieces. These enumerations
|
//There are the 32 macro definitions that make up all of the road pieces. These enumerations
|
||||||
//match up exactly to the previous road system order of graphics (FIRSTROAD1 - FIRSTROAD32)
|
//match up exactly to the previous road system order of graphics (FIRSTROAD1 - FIRSTROAD32)
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@@ -21,7 +21,7 @@ enum
|
|||||||
RTL, //right top-left corner piece
|
RTL, //right top-left corner piece
|
||||||
RBR, //right bottom-right corner piece
|
RBR, //right bottom-right corner piece
|
||||||
LBR, //left bottom-right corner piece
|
LBR, //left bottom-right corner piece
|
||||||
L2, //left 2 (variation of the left 1)
|
L2, //left 2 (variation of the left 1)
|
||||||
R2, //right 2
|
R2, //right 2
|
||||||
L3, //left 3
|
L3, //left 3
|
||||||
R3, //right 3
|
R3, //right 3
|
||||||
@@ -32,7 +32,7 @@ enum
|
|||||||
BI, //bottom intersection (piece connecting bottom to right)
|
BI, //bottom intersection (piece connecting bottom to right)
|
||||||
LI, //left intersection (piece connecting left to bottom )
|
LI, //left intersection (piece connecting left to bottom )
|
||||||
TI, //top intersection (piece connecting top to left)
|
TI, //top intersection (piece connecting top to left)
|
||||||
RI, //right intersection (piece connection right to top)
|
RI, //right intersection (piece connection right to top)
|
||||||
L4, //left 4
|
L4, //left 4
|
||||||
R4, //right 4
|
R4, //right 4
|
||||||
B4, //bottom 4
|
B4, //bottom 4
|
||||||
@@ -44,14 +44,14 @@ enum
|
|||||||
NUM_ROAD_MACROS
|
NUM_ROAD_MACROS
|
||||||
};
|
};
|
||||||
|
|
||||||
//The old road system used multi-tiled roads as a single image. The new road system has taken these large
|
//The old road system used multi-tiled roads as a single image. The new road system has taken these large
|
||||||
//pieces and chopped them up into single tiled images (to mitigate lighting problems). Some of the larger
|
//pieces and chopped them up into single tiled images (to mitigate lighting problems). Some of the larger
|
||||||
//road pieces turned into 18 smaller pieces. So this function will go analyse the world, and replaces any
|
//road pieces turned into 18 smaller pieces. So this function will go analyse the world, and replaces any
|
||||||
//locations containing the original road tile information, delete it, and replace it by inserting it's
|
//locations containing the original road tile information, delete it, and replace it by inserting it's
|
||||||
//equivalent macro.
|
//equivalent macro.
|
||||||
void ReplaceObsoleteRoads();
|
void ReplaceObsoleteRoads();
|
||||||
|
|
||||||
//Road macros vary in size from 3 gridnos to 18 gridnos. Using the anchor gridno based off of the original
|
//Road macros vary in size from 3 gridnos to 18 gridnos. Using the anchor gridno based off of the original
|
||||||
//road system, this function will place the new macro (consisting of multiple road pieces in multiple
|
//road system, this function will place the new macro (consisting of multiple road pieces in multiple
|
||||||
//gridnos).
|
//gridnos).
|
||||||
void PlaceRoadMacroAtGridNo( INT32 iMapIndex, INT32 iMacroID );
|
void PlaceRoadMacroAtGridNo( INT32 iMapIndex, INT32 iMacroID );
|
||||||
|
|||||||
+44
-42
@@ -37,6 +37,8 @@
|
|||||||
#include "World Items.h"
|
#include "World Items.h"
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "Soldier Create.h"
|
#include "Soldier Create.h"
|
||||||
|
#include "GameVersion.h"
|
||||||
|
#include "Campaign Types.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern BOOLEAN gfOverheadMapDirty;
|
extern BOOLEAN gfOverheadMapDirty;
|
||||||
@@ -475,19 +477,19 @@ void DestroySummaryWindow()
|
|||||||
|
|
||||||
if( gpWorldItemsSummaryArray )
|
if( gpWorldItemsSummaryArray )
|
||||||
{
|
{
|
||||||
MemFree( gpWorldItemsSummaryArray );
|
delete[]( gpWorldItemsSummaryArray );
|
||||||
gpWorldItemsSummaryArray = NULL;
|
gpWorldItemsSummaryArray = NULL;
|
||||||
gusWorldItemsSummaryArraySize = 0;
|
gusWorldItemsSummaryArraySize = 0;
|
||||||
}
|
}
|
||||||
if( gpPEnemyItemsSummaryArray )
|
if( gpPEnemyItemsSummaryArray )
|
||||||
{
|
{
|
||||||
MemFree( gpPEnemyItemsSummaryArray );
|
delete[]( gpPEnemyItemsSummaryArray );
|
||||||
gpPEnemyItemsSummaryArray = NULL;
|
gpPEnemyItemsSummaryArray = NULL;
|
||||||
gusPEnemyItemsSummaryArraySize = 0;
|
gusPEnemyItemsSummaryArraySize = 0;
|
||||||
}
|
}
|
||||||
if( gpNEnemyItemsSummaryArray )
|
if( gpNEnemyItemsSummaryArray )
|
||||||
{
|
{
|
||||||
MemFree( gpNEnemyItemsSummaryArray );
|
delete[]( gpNEnemyItemsSummaryArray );
|
||||||
gpNEnemyItemsSummaryArray = NULL;
|
gpNEnemyItemsSummaryArray = NULL;
|
||||||
gusNEnemyItemsSummaryArraySize = 0;
|
gusNEnemyItemsSummaryArraySize = 0;
|
||||||
}
|
}
|
||||||
@@ -709,27 +711,27 @@ void RenderItemDetails()
|
|||||||
{
|
{
|
||||||
if( index == SWITCH || index == ACTION_ITEM )
|
if( index == SWITCH || index == ACTION_ITEM )
|
||||||
{
|
{
|
||||||
if( gpWorldItemsSummaryArray[ i ].o.usItem == index )
|
if( gpWorldItemsSummaryArray[ i ].object.usItem == index )
|
||||||
{
|
{
|
||||||
if( gubSummaryItemMode == ITEMMODE_SCIFI && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_REALISTIC_ONLY) ||
|
if( gubSummaryItemMode == ITEMMODE_SCIFI && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_REALISTIC_ONLY) ||
|
||||||
gubSummaryItemMode == ITEMMODE_REAL && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_SCIFI_ONLY) )
|
gubSummaryItemMode == ITEMMODE_REAL && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_SCIFI_ONLY) )
|
||||||
{
|
{
|
||||||
pItem = &gpWorldItemsSummaryArray[ i ].o;
|
pItem = &gpWorldItemsSummaryArray[ i ].object;
|
||||||
if( !pItem->ItemData.Trigger.BombTrigger.bFrequency )
|
if( !(*pItem)[0]->data.misc.bFrequency )
|
||||||
bFreqIndex = 7;
|
bFreqIndex = 7;
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY )
|
||||||
bFreqIndex = 0;
|
bFreqIndex = 0;
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_2 )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_2 )
|
||||||
bFreqIndex = 1;
|
bFreqIndex = 1;
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_3 )
|
else if( (*pItem)[0]->data.misc.bFrequency == PANIC_FREQUENCY_3 )
|
||||||
bFreqIndex = 2;
|
bFreqIndex = 2;
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 1 )
|
else if( (*pItem)[0]->data.misc.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 1 )
|
||||||
bFreqIndex = 3;
|
bFreqIndex = 3;
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 2 )
|
else if( (*pItem)[0]->data.misc.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 2 )
|
||||||
bFreqIndex = 4;
|
bFreqIndex = 4;
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 3 )
|
else if( (*pItem)[0]->data.misc.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 3 )
|
||||||
bFreqIndex = 5;
|
bFreqIndex = 5;
|
||||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 4 )
|
else if( (*pItem)[0]->data.misc.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 4 )
|
||||||
bFreqIndex = 6;
|
bFreqIndex = 6;
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
@@ -747,15 +749,14 @@ void RenderItemDetails()
|
|||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if( gpWorldItemsSummaryArray[ i ].o.usItem == index )
|
if( gpWorldItemsSummaryArray[ i ].object.usItem == index )
|
||||||
{
|
{
|
||||||
if( gubSummaryItemMode == ITEMMODE_SCIFI && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_REALISTIC_ONLY) ||
|
if( gubSummaryItemMode == ITEMMODE_SCIFI && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_REALISTIC_ONLY) ||
|
||||||
gubSummaryItemMode == ITEMMODE_REAL && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_SCIFI_ONLY) )
|
gubSummaryItemMode == ITEMMODE_REAL && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_SCIFI_ONLY) )
|
||||||
{
|
{
|
||||||
pItem = &gpWorldItemsSummaryArray[ i ].o;
|
pItem = &gpWorldItemsSummaryArray[ i ].object;
|
||||||
uiExistChance += (100 - gpWorldItemsSummaryArray[ i ].ubNonExistChance) * pItem->ubNumberOfObjects;
|
uiExistChance += (100 - gpWorldItemsSummaryArray[ i ].ubNonExistChance) * pItem->ubNumberOfObjects;
|
||||||
uiStatus += pItem->ItemData.Generic.bStatus[0];
|
uiStatus += (*pItem)[0]->data.objectStatus;
|
||||||
uiQuantity += pItem->ubNumberOfObjects;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -862,7 +863,7 @@ void RenderItemDetails()
|
|||||||
{
|
{
|
||||||
pItem = &gpPEnemyItemsSummaryArray[ i ];
|
pItem = &gpPEnemyItemsSummaryArray[ i ];
|
||||||
uiExistChance += 100 * pItem->ubNumberOfObjects;
|
uiExistChance += 100 * pItem->ubNumberOfObjects;
|
||||||
uiStatus += pItem->ItemData.Generic.bStatus[0];
|
uiStatus += (*pItem)[0]->data.objectStatus;
|
||||||
uiQuantity += pItem->ubNumberOfObjects;
|
uiQuantity += pItem->ubNumberOfObjects;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -934,7 +935,7 @@ void RenderItemDetails()
|
|||||||
{
|
{
|
||||||
pItem = &gpNEnemyItemsSummaryArray[ i ];
|
pItem = &gpNEnemyItemsSummaryArray[ i ];
|
||||||
uiExistChance += 100 * pItem->ubNumberOfObjects;
|
uiExistChance += 100 * pItem->ubNumberOfObjects;
|
||||||
uiStatus += pItem->ItemData.Generic.bStatus[0];
|
uiStatus += (*pItem)[0]->data.objectStatus;
|
||||||
uiQuantity += pItem->ubNumberOfObjects;
|
uiQuantity += pItem->ubNumberOfObjects;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2014,7 +2015,7 @@ void MapClickCallback( MOUSE_REGION *reg, INT32 reason )
|
|||||||
}
|
}
|
||||||
if( gpWorldItemsSummaryArray )
|
if( gpWorldItemsSummaryArray )
|
||||||
{
|
{
|
||||||
MemFree( gpWorldItemsSummaryArray );
|
delete[]( gpWorldItemsSummaryArray );
|
||||||
gpWorldItemsSummaryArray = NULL;
|
gpWorldItemsSummaryArray = NULL;
|
||||||
gusWorldItemsSummaryArraySize = 0;
|
gusWorldItemsSummaryArraySize = 0;
|
||||||
}
|
}
|
||||||
@@ -2230,7 +2231,7 @@ void LoadGlobalSummary()
|
|||||||
STRING512 MapsDir;
|
STRING512 MapsDir;
|
||||||
UINT32 uiNumBytesRead;
|
UINT32 uiNumBytesRead;
|
||||||
FLOAT dMajorVersion;
|
FLOAT dMajorVersion;
|
||||||
INT32 x,y;
|
INT32 x,y;
|
||||||
CHAR8 szFilename[40];
|
CHAR8 szFilename[40];
|
||||||
CHAR8 szSector[6];
|
CHAR8 szSector[6];
|
||||||
|
|
||||||
@@ -2913,6 +2914,9 @@ void ApologizeOverrideAndForceUpdateEverything()
|
|||||||
gusNumberOfMapsToBeForceUpdated = 0;
|
gusNumberOfMapsToBeForceUpdated = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//CHRISL: ADB changed the way this load file is handled
|
||||||
|
extern int gEnemyPreservedTempFileVersion[256];
|
||||||
|
extern int gCivPreservedTempFileVersion[256];
|
||||||
void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
||||||
{
|
{
|
||||||
HWFILE hfile;
|
HWFILE hfile;
|
||||||
@@ -2929,19 +2933,19 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
|||||||
//Clear memory for all the item summaries loaded
|
//Clear memory for all the item summaries loaded
|
||||||
if( gpWorldItemsSummaryArray )
|
if( gpWorldItemsSummaryArray )
|
||||||
{
|
{
|
||||||
MemFree( gpWorldItemsSummaryArray );
|
delete[]( gpWorldItemsSummaryArray );
|
||||||
gpWorldItemsSummaryArray = NULL;
|
gpWorldItemsSummaryArray = NULL;
|
||||||
gusWorldItemsSummaryArraySize = 0;
|
gusWorldItemsSummaryArraySize = 0;
|
||||||
}
|
}
|
||||||
if( gpPEnemyItemsSummaryArray )
|
if( gpPEnemyItemsSummaryArray )
|
||||||
{
|
{
|
||||||
MemFree( gpPEnemyItemsSummaryArray );
|
delete[]( gpPEnemyItemsSummaryArray );
|
||||||
gpPEnemyItemsSummaryArray = NULL;
|
gpPEnemyItemsSummaryArray = NULL;
|
||||||
gusPEnemyItemsSummaryArraySize = 0;
|
gusPEnemyItemsSummaryArraySize = 0;
|
||||||
}
|
}
|
||||||
if( gpNEnemyItemsSummaryArray )
|
if( gpNEnemyItemsSummaryArray )
|
||||||
{
|
{
|
||||||
MemFree( gpNEnemyItemsSummaryArray );
|
delete[]( gpNEnemyItemsSummaryArray );
|
||||||
gpNEnemyItemsSummaryArray = NULL;
|
gpNEnemyItemsSummaryArray = NULL;
|
||||||
gusNEnemyItemsSummaryArraySize = 0;
|
gusNEnemyItemsSummaryArraySize = 0;
|
||||||
}
|
}
|
||||||
@@ -2993,9 +2997,12 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
|||||||
ShowButton( iSummaryButton[ SUMMARY_SCIFI ] );
|
ShowButton( iSummaryButton[ SUMMARY_SCIFI ] );
|
||||||
ShowButton( iSummaryButton[ SUMMARY_REAL ] );
|
ShowButton( iSummaryButton[ SUMMARY_REAL ] );
|
||||||
ShowButton( iSummaryButton[ SUMMARY_ENEMY ] );
|
ShowButton( iSummaryButton[ SUMMARY_ENEMY ] );
|
||||||
gpWorldItemsSummaryArray = (WORLDITEM*)MemAlloc( sizeof( WORLDITEM ) * uiNumItems );
|
gpWorldItemsSummaryArray = new WORLDITEM[ uiNumItems ];
|
||||||
gusWorldItemsSummaryArraySize = gpCurrentSectorSummary->usNumItems;
|
gusWorldItemsSummaryArraySize = gpCurrentSectorSummary->usNumItems;
|
||||||
FileRead( hfile, gpWorldItemsSummaryArray, sizeof( WORLDITEM ) * uiNumItems, &uiNumBytesRead );
|
for (unsigned int x = 0; x < uiNumItems; ++x)
|
||||||
|
{
|
||||||
|
gpWorldItemsSummaryArray[x].Load(hfile);
|
||||||
|
}
|
||||||
|
|
||||||
//NOW, do the enemy's items!
|
//NOW, do the enemy's items!
|
||||||
//We need to do two passes. The first pass simply processes all the enemies and counts all the droppable items
|
//We need to do two passes. The first pass simply processes all the enemies and counts all the droppable items
|
||||||
@@ -3020,9 +3027,7 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
|||||||
}
|
}
|
||||||
if( basic.fDetailedPlacement )
|
if( basic.fDetailedPlacement )
|
||||||
{ //skip static priority placement
|
{ //skip static priority placement
|
||||||
// WDS - Clean up inventory handling
|
if ( !priority.Load(hfile, SAVE_GAME_VERSION, false) )
|
||||||
FileRead( hfile, &priority, SIZEOF_SOLDIERCREATE_STRUCT, &uiNumBytesRead );
|
|
||||||
if( uiNumBytesRead != SIZEOF_SOLDIERCREATE_STRUCT )
|
|
||||||
{ //Invalid situation.
|
{ //Invalid situation.
|
||||||
FileClose( hfile );
|
FileClose( hfile );
|
||||||
return;
|
return;
|
||||||
@@ -3039,7 +3044,7 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
|||||||
for( j = 0; j < 9; j++ )
|
for( j = 0; j < 9; j++ )
|
||||||
{
|
{
|
||||||
pItem = &priority.Inv[ gbMercSlotTypes[ j ] ];
|
pItem = &priority.Inv[ gbMercSlotTypes[ j ] ];
|
||||||
if( pItem->usItem != NOTHING && !( pItem->fFlags & OBJECT_UNDROPPABLE ) )
|
if( pItem->exists() == true && !( (*pItem).fFlags & OBJECT_UNDROPPABLE ) )
|
||||||
{
|
{
|
||||||
usNumItems++;
|
usNumItems++;
|
||||||
}
|
}
|
||||||
@@ -3058,13 +3063,11 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
|||||||
//Pass 1 completed, so now allocate enough space to hold all the items
|
//Pass 1 completed, so now allocate enough space to hold all the items
|
||||||
if( gusPEnemyItemsSummaryArraySize )
|
if( gusPEnemyItemsSummaryArraySize )
|
||||||
{
|
{
|
||||||
gpPEnemyItemsSummaryArray = (OBJECTTYPE*)MemAlloc( sizeof( OBJECTTYPE ) * gusPEnemyItemsSummaryArraySize );
|
gpPEnemyItemsSummaryArray = new OBJECTTYPE[ gusPEnemyItemsSummaryArraySize ];
|
||||||
memset( gpPEnemyItemsSummaryArray, 0, sizeof( OBJECTTYPE ) * gusPEnemyItemsSummaryArraySize );
|
|
||||||
}
|
}
|
||||||
if( gusNEnemyItemsSummaryArraySize )
|
if( gusNEnemyItemsSummaryArraySize )
|
||||||
{
|
{
|
||||||
gpNEnemyItemsSummaryArray = (OBJECTTYPE*)MemAlloc( sizeof( OBJECTTYPE ) * gusNEnemyItemsSummaryArraySize );
|
gpNEnemyItemsSummaryArray = new OBJECTTYPE[ gusNEnemyItemsSummaryArraySize ];
|
||||||
memset( gpNEnemyItemsSummaryArray, 0, sizeof( OBJECTTYPE ) * gusNEnemyItemsSummaryArraySize );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//PASS #2
|
//PASS #2
|
||||||
@@ -3085,9 +3088,7 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
|||||||
}
|
}
|
||||||
if( basic.fDetailedPlacement )
|
if( basic.fDetailedPlacement )
|
||||||
{ //skip static priority placement
|
{ //skip static priority placement
|
||||||
// WDS - Clean up inventory handling
|
if ( !priority.Load(hfile, SAVE_GAME_VERSION, false) )
|
||||||
FileRead( hfile, &priority, SIZEOF_SOLDIERCREATE_STRUCT, &uiNumBytesRead );
|
|
||||||
if( uiNumBytesRead != SIZEOF_SOLDIERCREATE_STRUCT )
|
|
||||||
{ //Invalid situation.
|
{ //Invalid situation.
|
||||||
FileClose( hfile );
|
FileClose( hfile );
|
||||||
return;
|
return;
|
||||||
@@ -3104,16 +3105,16 @@ void SetupItemDetailsMode( BOOLEAN fAllowRecursion )
|
|||||||
for( j = 0; j < 9; j++ )
|
for( j = 0; j < 9; j++ )
|
||||||
{
|
{
|
||||||
pItem = &priority.Inv[ gbMercSlotTypes[ j ] ];
|
pItem = &priority.Inv[ gbMercSlotTypes[ j ] ];
|
||||||
if( pItem->usItem != NOTHING && !( pItem->fFlags & OBJECT_UNDROPPABLE ) )
|
if( pItem->exists() == true && !( (*pItem).fFlags & OBJECT_UNDROPPABLE ) )
|
||||||
{
|
{
|
||||||
if( basic.fPriorityExistance )
|
if( basic.fPriorityExistance )
|
||||||
{
|
{
|
||||||
memcpy( &(gpPEnemyItemsSummaryArray[ usPEnemyIndex ]), pItem, sizeof( OBJECTTYPE ) );
|
gpPEnemyItemsSummaryArray[ usPEnemyIndex ] = *pItem;
|
||||||
usPEnemyIndex++;
|
usPEnemyIndex++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
memcpy( &(gpNEnemyItemsSummaryArray[ usNEnemyIndex ]), pItem, sizeof( OBJECTTYPE ) );
|
gpNEnemyItemsSummaryArray[ usNEnemyIndex ] = *pItem;
|
||||||
usNEnemyIndex++;
|
usNEnemyIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3151,3 +3152,4 @@ void ClearSummaryInfo()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+34
-33
@@ -42,8 +42,8 @@ void CalcSmartBrokenWallDefault( UINT16 *pusObjIndex, UINT16 *pusUseIndex )
|
|||||||
switch( gubBrokenWallUIValue )
|
switch( gubBrokenWallUIValue )
|
||||||
{
|
{
|
||||||
case 0:case 1: *pusUseIndex = 49 + gubBrokenWallUIValue; break;
|
case 0:case 1: *pusUseIndex = 49 + gubBrokenWallUIValue; break;
|
||||||
case 3: *pusUseIndex = 62; break;
|
case 3: *pusUseIndex = 62; break;
|
||||||
case 4: *pusUseIndex = 64; break;
|
case 4: *pusUseIndex = 64; break;
|
||||||
}
|
}
|
||||||
*pusObjIndex = FIRSTWALL;
|
*pusObjIndex = FIRSTWALL;
|
||||||
}
|
}
|
||||||
@@ -56,7 +56,7 @@ UINT16 CalcSmartWindowIndex( UINT16 usWallOrientation )
|
|||||||
UINT16 CalcSmartDoorIndex( UINT16 usWallOrientation )
|
UINT16 CalcSmartDoorIndex( UINT16 usWallOrientation )
|
||||||
{
|
{
|
||||||
//convert the orientation values as the graphics are in reverse order
|
//convert the orientation values as the graphics are in reverse order
|
||||||
//orientation values: INSIDE_TOP_LEFT=1, INSIDE_TOP_RIGHT=2, OUTSIDE_TOP_LEFT=3, OUTSIDE_TOP_RIGHT=4
|
//orientation values: INSIDE_TOP_LEFT=1, INSIDE_TOP_RIGHT=2, OUTSIDE_TOP_LEFT=3, OUTSIDE_TOP_RIGHT=4
|
||||||
//door graphics order: INSIDE_TOP_LEFT=15, INSIDE_TOP_RIGHT=10, OUTSIDE_TOP_LEFT=5, OUTSIDE_TOP_RIGHT=0
|
//door graphics order: INSIDE_TOP_LEFT=15, INSIDE_TOP_RIGHT=10, OUTSIDE_TOP_LEFT=5, OUTSIDE_TOP_RIGHT=0
|
||||||
usWallOrientation = (4 - usWallOrientation) * 5;
|
usWallOrientation = (4 - usWallOrientation) * 5;
|
||||||
//4 * (gubDoorUIValue%2) evaluates to +4 if the door is open, 0 if closed
|
//4 * (gubDoorUIValue%2) evaluates to +4 if the door is open, 0 if closed
|
||||||
@@ -75,9 +75,9 @@ UINT16 CalcSmartBrokenWallIndex( UINT16 usWallOrientation )
|
|||||||
if( gubBrokenWallUIValue < 2 ) //broken walls
|
if( gubBrokenWallUIValue < 2 ) //broken walls
|
||||||
{
|
{
|
||||||
//convert the orientation value as the graphics are in a different order.
|
//convert the orientation value as the graphics are in a different order.
|
||||||
//orientation values: INSIDE_TOP_LEFT=1, INSIDE_TOP_RIGHT=2, OUTSIDE_TOP_LEFT=3, OUTSIDE_TOP_RIGHT=4
|
//orientation values: INSIDE_TOP_LEFT=1, INSIDE_TOP_RIGHT=2, OUTSIDE_TOP_LEFT=3, OUTSIDE_TOP_RIGHT=4
|
||||||
// 4 6 8 10
|
// 4 6 8 10
|
||||||
//door graphics order: INSIDE_TOP_LEFT=4, INSIDE_TOP_RIGHT=6, OUTSIDE_TOP_LEFT=0, OUTSIDE_TOP_RIGHT=2
|
//door graphics order: INSIDE_TOP_LEFT=4, INSIDE_TOP_RIGHT=6, OUTSIDE_TOP_LEFT=0, OUTSIDE_TOP_RIGHT=2
|
||||||
usWallOrientation = usWallOrientation * 2 + 2;
|
usWallOrientation = usWallOrientation * 2 + 2;
|
||||||
usWallOrientation -= usWallOrientation > 6 ? 8 : 0;
|
usWallOrientation -= usWallOrientation > 6 ? 8 : 0;
|
||||||
return (UINT16)( usWallOrientation + 48 + gubBrokenWallUIValue );
|
return (UINT16)( usWallOrientation + 48 + gubBrokenWallUIValue );
|
||||||
@@ -86,8 +86,8 @@ UINT16 CalcSmartBrokenWallIndex( UINT16 usWallOrientation )
|
|||||||
//cracked and smudged walls
|
//cracked and smudged walls
|
||||||
|
|
||||||
//convert the orientation value as the graphics are in a different order.
|
//convert the orientation value as the graphics are in a different order.
|
||||||
//orientation values: INSIDE_TOP_LEFT=1, INSIDE_TOP_RIGHT=2, OUTSIDE_TOP_LEFT=3, OUTSIDE_TOP_RIGHT=4
|
//orientation values: INSIDE_TOP_LEFT=1, INSIDE_TOP_RIGHT=2, OUTSIDE_TOP_LEFT=3, OUTSIDE_TOP_RIGHT=4
|
||||||
//door graphics order: INSIDE_TOP_LEFT=1, INSIDE_TOP_RIGHT=2, OUTSIDE_TOP_LEFT=5, OUTSIDE_TOP_RIGHT=6
|
//door graphics order: INSIDE_TOP_LEFT=1, INSIDE_TOP_RIGHT=2, OUTSIDE_TOP_LEFT=5, OUTSIDE_TOP_RIGHT=6
|
||||||
usWallOrientation += usWallOrientation > 1 ? 2 : 0;
|
usWallOrientation += usWallOrientation > 1 ? 2 : 0;
|
||||||
usWallOrientation += gubBrokenWallUIValue == 4 ? 2 : 0; //smudged type which is 2 index values higher.
|
usWallOrientation += gubBrokenWallUIValue == 4 ? 2 : 0; //smudged type which is 2 index values higher.
|
||||||
return (UINT16)( usWallOrientation + 57 );
|
return (UINT16)( usWallOrientation + 57 );
|
||||||
@@ -135,7 +135,7 @@ void DecSmartBrokenWallUIValue()
|
|||||||
|
|
||||||
BOOLEAN CalcWallInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusWallType, UINT16 *pusIndex )
|
BOOLEAN CalcWallInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusWallType, UINT16 *pusIndex )
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN CalcDoorInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusDoorType, UINT16 *pusIndex )
|
BOOLEAN CalcDoorInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusDoorType, UINT16 *pusIndex )
|
||||||
@@ -247,25 +247,25 @@ BOOLEAN CalcBrokenWallInfoUsingSmartMethod( UINT32 iMapIndex, UINT16 *pusWallTyp
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//This is a very difficult function to document properly. The reason being is that it is sooo
|
//This is a very difficult function to document properly. The reason being is that it is sooo
|
||||||
//subliminal by nature. I have thought up of priorities and choose the best piece to draw based
|
//subliminal by nature. I have thought up of priorities and choose the best piece to draw based
|
||||||
//on the surrounding conditions. Here are the priorities which are referenced below via comments:
|
//on the surrounding conditions. Here are the priorities which are referenced below via comments:
|
||||||
//A) If there is currently a bottom piece and a right piece, immediately exit.
|
//A) If there is currently a bottom piece and a right piece, immediately exit.
|
||||||
//B) We are currently over a bottom piece. Now, we don't automatically want to draw a right piece here
|
//B) We are currently over a bottom piece. Now, we don't automatically want to draw a right piece here
|
||||||
// for multiple reasons. First, the UI will be too quick and place bottom and right pieces for every
|
// for multiple reasons. First, the UI will be too quick and place bottom and right pieces for every
|
||||||
// place the user clicks, which isn't what we want. Therefore, we look to see if there is a right
|
// place the user clicks, which isn't what we want. Therefore, we look to see if there is a right
|
||||||
// piece in the y-1 gridno. It would then make sense to place a right piece down here. Regardless,
|
// piece in the y-1 gridno. It would then make sense to place a right piece down here. Regardless,
|
||||||
// if we encounter a bottom piece here, we will exit.
|
// if we encounter a bottom piece here, we will exit.
|
||||||
//C) This is the counterpart to B, but we are looking at a current right piece, and are determining if
|
//C) This is the counterpart to B, but we are looking at a current right piece, and are determining if
|
||||||
// we should place a bottom piece based on another bottom piece existing in the x-1 gridno.
|
// we should place a bottom piece based on another bottom piece existing in the x-1 gridno.
|
||||||
//D) Now, we analyse the neighboring tiles and determine the orientations that would add weight to the
|
//D) Now, we analyse the neighboring tiles and determine the orientations that would add weight to the
|
||||||
// current tile either towards drawing a horizontal piece or a vertical piece.
|
// current tile either towards drawing a horizontal piece or a vertical piece.
|
||||||
//E) Now that we have the information, we give the highest priority to any weights that match the current
|
//E) Now that we have the information, we give the highest priority to any weights that match the current
|
||||||
// wall piece type selected by the user. Based on that, we will only consider the best match of the
|
// wall piece type selected by the user. Based on that, we will only consider the best match of the
|
||||||
// type and use it. If there are no matches on type, we continue.
|
// type and use it. If there are no matches on type, we continue.
|
||||||
//F) We failed to find weights matching the current wall type, but before we give up using the user's wall
|
//F) We failed to find weights matching the current wall type, but before we give up using the user's wall
|
||||||
// type, there are two more cases. When there is a bottom wall in the y+1 position or a right wall in
|
// type, there are two more cases. When there is a bottom wall in the y+1 position or a right wall in
|
||||||
// the x+1 position. If there are matching walls, there, then we draw two pieces to connect the current
|
// the x+1 position. If there are matching walls, there, then we draw two pieces to connect the current
|
||||||
// gridno with the respective position.
|
// gridno with the respective position.
|
||||||
void PasteSmartWall( UINT32 iMapIndex )
|
void PasteSmartWall( UINT32 iMapIndex )
|
||||||
{
|
{
|
||||||
@@ -361,7 +361,7 @@ void PasteSmartWall( UINT32 iMapIndex )
|
|||||||
&& !GetVerticalWall( iMapIndex - WORLD_COLS ) )
|
&& !GetVerticalWall( iMapIndex - WORLD_COLS ) )
|
||||||
ChangeVerticalWall( iMapIndex, INTERIOR_EXTENDED );
|
ChangeVerticalWall( iMapIndex, INTERIOR_EXTENDED );
|
||||||
else if( GetHorizontalWall( iMapIndex - WORLD_COLS ) && !GetHorizontalWall( iMapIndex - WORLD_COLS - 1 )
|
else if( GetHorizontalWall( iMapIndex - WORLD_COLS ) && !GetHorizontalWall( iMapIndex - WORLD_COLS - 1 )
|
||||||
&& !GetVerticalWall( iMapIndex - WORLD_COLS - 1 ) )
|
&& !GetVerticalWall( iMapIndex - WORLD_COLS - 1 ) )
|
||||||
{
|
{
|
||||||
ChangeVerticalWall( iMapIndex, INTERIOR_EXTENDED );
|
ChangeVerticalWall( iMapIndex, INTERIOR_EXTENDED );
|
||||||
EraseHorizontalWall( iMapIndex - WORLD_COLS );
|
EraseHorizontalWall( iMapIndex - WORLD_COLS );
|
||||||
@@ -374,7 +374,7 @@ void PasteSmartWall( UINT32 iMapIndex )
|
|||||||
&& !GetVerticalWall( iMapIndex - WORLD_COLS ) )
|
&& !GetVerticalWall( iMapIndex - WORLD_COLS ) )
|
||||||
ChangeVerticalWall( iMapIndex, EXTERIOR_EXTENDED );
|
ChangeVerticalWall( iMapIndex, EXTERIOR_EXTENDED );
|
||||||
else if( GetHorizontalWall( iMapIndex - WORLD_COLS ) && !GetHorizontalWall( iMapIndex - WORLD_COLS - 1 )
|
else if( GetHorizontalWall( iMapIndex - WORLD_COLS ) && !GetHorizontalWall( iMapIndex - WORLD_COLS - 1 )
|
||||||
&& !GetVerticalWall( iMapIndex - WORLD_COLS - 1 ) )
|
&& !GetVerticalWall( iMapIndex - WORLD_COLS - 1 ) )
|
||||||
{
|
{
|
||||||
ChangeVerticalWall( iMapIndex, EXTERIOR_EXTENDED );
|
ChangeVerticalWall( iMapIndex, EXTERIOR_EXTENDED );
|
||||||
EraseHorizontalWall( iMapIndex - WORLD_COLS );
|
EraseHorizontalWall( iMapIndex - WORLD_COLS );
|
||||||
@@ -384,7 +384,7 @@ void PasteSmartWall( UINT32 iMapIndex )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( GetVerticalWall( iMapIndex - 1 ) && !GetVerticalWall( iMapIndex - WORLD_COLS - 1 )
|
if( GetVerticalWall( iMapIndex - 1 ) && !GetVerticalWall( iMapIndex - WORLD_COLS - 1 )
|
||||||
&& !GetHorizontalWall( iMapIndex - WORLD_COLS - 1 ) )
|
&& !GetHorizontalWall( iMapIndex - WORLD_COLS - 1 ) )
|
||||||
EraseVerticalWall( iMapIndex - 1);
|
EraseVerticalWall( iMapIndex - 1);
|
||||||
if( FloorAtGridNo( iMapIndex + WORLD_COLS ) )
|
if( FloorAtGridNo( iMapIndex + WORLD_COLS ) )
|
||||||
{ //inside
|
{ //inside
|
||||||
@@ -392,9 +392,9 @@ void PasteSmartWall( UINT32 iMapIndex )
|
|||||||
if( GetVerticalWall( iMapIndex + WORLD_COLS ) )
|
if( GetVerticalWall( iMapIndex + WORLD_COLS ) )
|
||||||
ChangeVerticalWall( iMapIndex + WORLD_COLS, INTERIOR_EXTENDED );
|
ChangeVerticalWall( iMapIndex + WORLD_COLS, INTERIOR_EXTENDED );
|
||||||
if( GetVerticalWall( iMapIndex + WORLD_COLS - 1 ) && !GetVerticalWall( iMapIndex - 1 ) )
|
if( GetVerticalWall( iMapIndex + WORLD_COLS - 1 ) && !GetVerticalWall( iMapIndex - 1 ) )
|
||||||
ChangeVerticalWall( iMapIndex + WORLD_COLS - 1, INTERIOR_EXTENDED );
|
ChangeVerticalWall( iMapIndex + WORLD_COLS - 1, INTERIOR_EXTENDED );
|
||||||
else if( GetVerticalWall( iMapIndex - 1 ) && !GetVerticalWall( iMapIndex + WORLD_COLS - 1 )
|
else if( GetVerticalWall( iMapIndex - 1 ) && !GetVerticalWall( iMapIndex + WORLD_COLS - 1 )
|
||||||
&& FloorAtGridNo( iMapIndex ) )
|
&& FloorAtGridNo( iMapIndex ) )
|
||||||
ChangeVerticalWall( iMapIndex - 1, INTERIOR_BOTTOMEND );
|
ChangeVerticalWall( iMapIndex - 1, INTERIOR_BOTTOMEND );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -403,9 +403,9 @@ void PasteSmartWall( UINT32 iMapIndex )
|
|||||||
if( GetVerticalWall( iMapIndex + WORLD_COLS ) )
|
if( GetVerticalWall( iMapIndex + WORLD_COLS ) )
|
||||||
ChangeVerticalWall( iMapIndex + WORLD_COLS, EXTERIOR_EXTENDED );
|
ChangeVerticalWall( iMapIndex + WORLD_COLS, EXTERIOR_EXTENDED );
|
||||||
if( GetVerticalWall( iMapIndex + WORLD_COLS - 1 ) && !GetVerticalWall( iMapIndex - 1 ) )
|
if( GetVerticalWall( iMapIndex + WORLD_COLS - 1 ) && !GetVerticalWall( iMapIndex - 1 ) )
|
||||||
ChangeVerticalWall( iMapIndex + WORLD_COLS - 1, EXTERIOR_EXTENDED );
|
ChangeVerticalWall( iMapIndex + WORLD_COLS - 1, EXTERIOR_EXTENDED );
|
||||||
else if( GetVerticalWall( iMapIndex - 1 ) && !GetVerticalWall( iMapIndex + WORLD_COLS - 1 )
|
else if( GetVerticalWall( iMapIndex - 1 ) && !GetVerticalWall( iMapIndex + WORLD_COLS - 1 )
|
||||||
&& FloorAtGridNo( iMapIndex ) )
|
&& FloorAtGridNo( iMapIndex ) )
|
||||||
ChangeVerticalWall( iMapIndex - 1, EXTERIOR_BOTTOMEND );
|
ChangeVerticalWall( iMapIndex - 1, EXTERIOR_BOTTOMEND );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -626,3 +626,4 @@ void PasteSmartBrokenWall( UINT32 iMapIndex )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+10
-10
@@ -22,7 +22,7 @@
|
|||||||
extern UINT16 PickAWallPiece( UINT16 usWallPieceType );
|
extern UINT16 PickAWallPiece( UINT16 usWallPieceType );
|
||||||
|
|
||||||
//This method isn't foolproof, but because erasing large areas of buildings could result in
|
//This method isn't foolproof, but because erasing large areas of buildings could result in
|
||||||
//multiple wall types for each building. When processing the region, it is necessary to
|
//multiple wall types for each building. When processing the region, it is necessary to
|
||||||
//calculate the roof type by searching for the nearest roof tile.
|
//calculate the roof type by searching for the nearest roof tile.
|
||||||
UINT16 SearchForWallType( UINT32 iMapIndex )
|
UINT16 SearchForWallType( UINT32 iMapIndex )
|
||||||
{
|
{
|
||||||
@@ -40,7 +40,7 @@ UINT16 SearchForWallType( UINT32 iMapIndex )
|
|||||||
}
|
}
|
||||||
while( sRadius < 32 )
|
while( sRadius < 32 )
|
||||||
{
|
{
|
||||||
//NOTE: start at the higher y value and go negative because it is possible to have another
|
//NOTE: start at the higher y value and go negative because it is possible to have another
|
||||||
// structure type one tile north, but not one tile south -- so it'll find the correct wall first.
|
// structure type one tile north, but not one tile south -- so it'll find the correct wall first.
|
||||||
for( y = sRadius; y >= -sRadius; y-- ) for( x = -sRadius; x <= sRadius; x++ )
|
for( y = sRadius; y >= -sRadius; y-- ) for( x = -sRadius; x <= sRadius; x++ )
|
||||||
{
|
{
|
||||||
@@ -73,7 +73,7 @@ UINT16 SearchForWallType( UINT32 iMapIndex )
|
|||||||
}
|
}
|
||||||
|
|
||||||
//This method isn't foolproof, but because erasing large areas of buildings could result in
|
//This method isn't foolproof, but because erasing large areas of buildings could result in
|
||||||
//multiple roof types for each building. When processing the region, it is necessary to
|
//multiple roof types for each building. When processing the region, it is necessary to
|
||||||
//calculate the roof type by searching for the nearest roof tile.
|
//calculate the roof type by searching for the nearest roof tile.
|
||||||
UINT16 SearchForRoofType( UINT32 iMapIndex )
|
UINT16 SearchForRoofType( UINT32 iMapIndex )
|
||||||
{
|
{
|
||||||
@@ -157,7 +157,7 @@ LEVELNODE* GetVerticalWall( UINT32 iMapIndex )
|
|||||||
{
|
{
|
||||||
GetTileType( pStruct->usIndex, &uiTileType );
|
GetTileType( pStruct->usIndex, &uiTileType );
|
||||||
if ( uiTileType >= FIRSTWALL && uiTileType <= LASTWALL ||
|
if ( uiTileType >= FIRSTWALL && uiTileType <= LASTWALL ||
|
||||||
uiTileType >= FIRSTDOOR && uiTileType <= LASTDOOR )
|
uiTileType >= FIRSTDOOR && uiTileType <= LASTDOOR )
|
||||||
{
|
{
|
||||||
GetWallOrientation( pStruct->usIndex, &usWallOrientation );
|
GetWallOrientation( pStruct->usIndex, &usWallOrientation );
|
||||||
if( usWallOrientation == INSIDE_TOP_RIGHT || usWallOrientation == OUTSIDE_TOP_RIGHT )
|
if( usWallOrientation == INSIDE_TOP_RIGHT || usWallOrientation == OUTSIDE_TOP_RIGHT )
|
||||||
@@ -183,7 +183,7 @@ LEVELNODE* GetHorizontalWall( UINT32 iMapIndex )
|
|||||||
{
|
{
|
||||||
GetTileType( pStruct->usIndex, &uiTileType );
|
GetTileType( pStruct->usIndex, &uiTileType );
|
||||||
if ( uiTileType >= FIRSTWALL && uiTileType <= LASTWALL ||
|
if ( uiTileType >= FIRSTWALL && uiTileType <= LASTWALL ||
|
||||||
uiTileType >= FIRSTDOOR && uiTileType <= LASTDOOR )
|
uiTileType >= FIRSTDOOR && uiTileType <= LASTDOOR )
|
||||||
{
|
{
|
||||||
GetWallOrientation( pStruct->usIndex, &usWallOrientation );
|
GetWallOrientation( pStruct->usIndex, &usWallOrientation );
|
||||||
if( usWallOrientation == INSIDE_TOP_LEFT || usWallOrientation == OUTSIDE_TOP_LEFT )
|
if( usWallOrientation == INSIDE_TOP_LEFT || usWallOrientation == OUTSIDE_TOP_LEFT )
|
||||||
@@ -398,12 +398,12 @@ void RestoreWalls( UINT32 iMapIndex )
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//we are in a special case here. The user is attempting to restore a wall, though nothing
|
//we are in a special case here. The user is attempting to restore a wall, though nothing
|
||||||
//is here. We will hook into the smart wall method by tricking it into using the local wall
|
//is here. We will hook into the smart wall method by tricking it into using the local wall
|
||||||
//type, but only if we have adjacent walls.
|
//type, but only if we have adjacent walls.
|
||||||
fDone = FALSE;
|
fDone = FALSE;
|
||||||
if( pWall = GetHorizontalWall( iMapIndex - 1 ) )
|
if( pWall = GetHorizontalWall( iMapIndex - 1 ) )
|
||||||
fDone = TRUE;
|
fDone = TRUE;
|
||||||
if( !fDone && (pWall = GetHorizontalWall( iMapIndex + 1 )) )
|
if( !fDone && (pWall = GetHorizontalWall( iMapIndex + 1 )) )
|
||||||
fDone = TRUE;
|
fDone = TRUE;
|
||||||
if( !fDone && (pWall = GetVerticalWall( iMapIndex - WORLD_COLS )) )
|
if( !fDone && (pWall = GetVerticalWall( iMapIndex - WORLD_COLS )) )
|
||||||
@@ -412,7 +412,7 @@ void RestoreWalls( UINT32 iMapIndex )
|
|||||||
fDone = TRUE;
|
fDone = TRUE;
|
||||||
if( !fDone )
|
if( !fDone )
|
||||||
return;
|
return;
|
||||||
//found a wall. Let's back up the current wall value, and restore it after pasting a smart wall.
|
//found a wall. Let's back up the current wall value, and restore it after pasting a smart wall.
|
||||||
if( pWall )
|
if( pWall )
|
||||||
{
|
{
|
||||||
GetTileType( pWall->usIndex, &uiTileType );
|
GetTileType( pWall->usIndex, &uiTileType );
|
||||||
@@ -443,7 +443,7 @@ UINT16 GetWallClass( LEVELNODE *pWall )
|
|||||||
{
|
{
|
||||||
if( usWallIndex == gbWallTileLUT[row][col] )
|
if( usWallIndex == gbWallTileLUT[row][col] )
|
||||||
{
|
{
|
||||||
return row; //row is the wall class
|
return row; //row is the wall class
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,10 +65,10 @@ typedef struct SUMMARYFILE
|
|||||||
// //-----
|
// //-----
|
||||||
// 190
|
// 190
|
||||||
//start version 10
|
//start version 10
|
||||||
EXITGRID ExitGrid[4]; //5*4 // 20
|
EXITGRID ExitGrid[4]; //5*4 // 20
|
||||||
UINT16 usExitGridSize[4]; //2*4 // 8
|
UINT16 usExitGridSize[4]; //2*4 // 8
|
||||||
BOOLEAN fInvalidDest[4]; // 4
|
BOOLEAN fInvalidDest[4]; // 4
|
||||||
UINT8 ubNumExitGridDests; // 1
|
UINT8 ubNumExitGridDests; // 1
|
||||||
BOOLEAN fTooManyExitGridDests; // 1
|
BOOLEAN fTooManyExitGridDests; // 1
|
||||||
// //-----
|
// //-----
|
||||||
// // 224
|
// // 224
|
||||||
@@ -77,7 +77,7 @@ typedef struct SUMMARYFILE
|
|||||||
// //-----
|
// //-----
|
||||||
// 225
|
// 225
|
||||||
//start version 12
|
//start version 12
|
||||||
UINT16 usWarningRoomNums; // 2
|
UINT16 usWarningRoomNums; // 2
|
||||||
// 227
|
// 227
|
||||||
//start version 13
|
//start version 13
|
||||||
UINT8 ubEnemiesHaveWaypoints; // 1
|
UINT8 ubEnemiesHaveWaypoints; // 1
|
||||||
|
|||||||
+114
-117
@@ -122,7 +122,7 @@ void EraseMapTile( UINT32 iMapIndex )
|
|||||||
case DRAW_MODE_EXITGRID:
|
case DRAW_MODE_EXITGRID:
|
||||||
AddToUndoList( iMapIndex );
|
AddToUndoList( iMapIndex );
|
||||||
RemoveExitGridFromWorld( iMapIndex );
|
RemoveExitGridFromWorld( iMapIndex );
|
||||||
RemoveTopmost( (UINT16)iMapIndex, FIRSTPOINTERS8 );
|
RemoveTopmost( (INT16)iMapIndex, FIRSTPOINTERS8 );
|
||||||
break;
|
break;
|
||||||
case DRAW_MODE_GROUND:
|
case DRAW_MODE_GROUND:
|
||||||
// Is there ground on this tile? if not, get out o here
|
// Is there ground on this tile? if not, get out o here
|
||||||
@@ -382,7 +382,7 @@ void PasteSingleWallCommon( UINT32 iMapIndex )
|
|||||||
{
|
{
|
||||||
// PLace shadow for doors
|
// PLace shadow for doors
|
||||||
if( !gfBasement )
|
if( !gfBasement )
|
||||||
AddExclusiveShadow( iMapIndex, (UINT16)(gTileTypeStartIndex[ usUseObjIndex - FIRSTDOOR + FIRSTDOORSHADOW ] + usUseIndex ) );
|
AddExclusiveShadow( iMapIndex, (UINT16)(gTileTypeStartIndex[ usUseObjIndex - FIRSTDOOR + FIRSTDOORSHADOW ] + usUseIndex ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is it a wall?
|
// Is it a wall?
|
||||||
@@ -402,12 +402,12 @@ void PasteSingleWallCommon( UINT32 iMapIndex )
|
|||||||
}
|
}
|
||||||
// Is it a door/window/decoration?
|
// Is it a door/window/decoration?
|
||||||
else if ( ( (usUseObjIndex >= FIRSTDOOR) && (usUseObjIndex <= LASTDOOR)) ||
|
else if ( ( (usUseObjIndex >= FIRSTDOOR) && (usUseObjIndex <= LASTDOOR)) ||
|
||||||
((usUseObjIndex >= FIRSTDECORATIONS) && (usUseObjIndex <= LASTDECORATIONS)) )
|
((usUseObjIndex >= FIRSTDECORATIONS) && (usUseObjIndex <= LASTDECORATIONS)) )
|
||||||
{
|
{
|
||||||
// Slap down wall/window/door/decoration (no smoothing)
|
// Slap down wall/window/door/decoration (no smoothing)
|
||||||
AddWallToStructLayer( iMapIndex, (UINT16)(gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex), TRUE );
|
AddWallToStructLayer( iMapIndex, (UINT16)(gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex), TRUE );
|
||||||
}
|
}
|
||||||
else if ( ((usUseObjIndex >= FIRSTROOF) && (usUseObjIndex <= LASTROOF)) ||
|
else if ( ((usUseObjIndex >= FIRSTROOF) && (usUseObjIndex <= LASTROOF)) ||
|
||||||
((usUseObjIndex >= FIRSTSLANTROOF) && (usUseObjIndex <= LASTSLANTROOF)) )
|
((usUseObjIndex >= FIRSTSLANTROOF) && (usUseObjIndex <= LASTSLANTROOF)) )
|
||||||
{
|
{
|
||||||
// Put a roof on this tile (even if nothing else is here)
|
// Put a roof on this tile (even if nothing else is here)
|
||||||
@@ -423,7 +423,7 @@ void PasteSingleWallCommon( UINT32 iMapIndex )
|
|||||||
AddLandToHead( iMapIndex, (UINT16)(gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex) );
|
AddLandToHead( iMapIndex, (UINT16)(gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex) );
|
||||||
}
|
}
|
||||||
else if( usUseObjIndex >= FIRSTWALLDECAL && usUseObjIndex <= LASTWALLDECAL ||
|
else if( usUseObjIndex >= FIRSTWALLDECAL && usUseObjIndex <= LASTWALLDECAL ||
|
||||||
usUseObjIndex >= FIFTHWALLDECAL && usUseObjIndex <= EIGTHWALLDECAL )
|
usUseObjIndex >= FIFTHWALLDECAL && usUseObjIndex <= EIGTHWALLDECAL )
|
||||||
{
|
{
|
||||||
// Plop a decal here
|
// Plop a decal here
|
||||||
RemoveAllStructsOfTypeRange( iMapIndex, FIRSTWALLDECAL, LASTWALLDECAL );
|
RemoveAllStructsOfTypeRange( iMapIndex, FIRSTWALLDECAL, LASTWALLDECAL );
|
||||||
@@ -476,7 +476,7 @@ UINT16 GetRandomTypeByRange( UINT16 usRangeStart, UINT16 usRangeEnd )
|
|||||||
UINT16 usNumInPickList;
|
UINT16 usNumInPickList;
|
||||||
UINT16 i;
|
UINT16 i;
|
||||||
UINT16 usObject;
|
UINT16 usObject;
|
||||||
UINT32 uiType;
|
UINT32 uiType;
|
||||||
// Get a list of valid object to select from
|
// Get a list of valid object to select from
|
||||||
usNumInPickList = 0;
|
usNumInPickList = 0;
|
||||||
for ( i = 0; i < *pNumSelList; i++ )
|
for ( i = 0; i < *pNumSelList; i++ )
|
||||||
@@ -541,7 +541,6 @@ void PasteStructure2( UINT32 iMapIndex )
|
|||||||
//
|
//
|
||||||
void PasteStructureCommon( UINT32 iMapIndex )
|
void PasteStructureCommon( UINT32 iMapIndex )
|
||||||
{
|
{
|
||||||
// BOOLEAN fDoPaste = FALSE;
|
|
||||||
UINT32 fHeadType;
|
UINT32 fHeadType;
|
||||||
UINT16 usUseIndex;
|
UINT16 usUseIndex;
|
||||||
UINT16 usUseObjIndex;
|
UINT16 usUseObjIndex;
|
||||||
@@ -583,7 +582,7 @@ void PasteStructureCommon( UINT32 iMapIndex )
|
|||||||
// For now, adjust to shadows by a hard-coded amount,
|
// For now, adjust to shadows by a hard-coded amount,
|
||||||
|
|
||||||
// Add mask if in long grass
|
// Add mask if in long grass
|
||||||
GetLandHeadType( iMapIndex, &fHeadType );
|
GetLandHeadType( iMapIndex, &fHeadType );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -617,7 +616,7 @@ void PasteBanks( UINT32 iMapIndex, UINT16 usStructIndex , BOOLEAN fReplace)
|
|||||||
{
|
{
|
||||||
fDoPaste = TRUE;
|
fDoPaste = TRUE;
|
||||||
|
|
||||||
if ( gpWorldLevelData[ iMapIndex ].pStructHead != NULL )
|
if ( gpWorldLevelData[ iMapIndex ].pStructHead != NULL )
|
||||||
{
|
{
|
||||||
// CHECK IF THE SAME TILE IS HERE
|
// CHECK IF THE SAME TILE IS HERE
|
||||||
if ( gpWorldLevelData[ iMapIndex ].pStructHead->usIndex == (UINT16)( gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex ) )
|
if ( gpWorldLevelData[ iMapIndex ].pStructHead->usIndex == (UINT16)( gTileTypeStartIndex[ usUseObjIndex ] + usUseIndex ) )
|
||||||
@@ -691,56 +690,56 @@ void PasteTexture( UINT32 iMapIndex )
|
|||||||
//
|
//
|
||||||
void PasteTextureCommon( UINT32 iMapIndex )
|
void PasteTextureCommon( UINT32 iMapIndex )
|
||||||
{
|
{
|
||||||
UINT8 ubLastHighLevel;
|
UINT8 ubLastHighLevel;
|
||||||
UINT16 usTileIndex;
|
UINT16 usTileIndex;
|
||||||
//UINT16 Dummy;
|
//UINT16 Dummy;
|
||||||
|
|
||||||
if ( CurrentPaste != NO_TILE && iMapIndex < 0x8000 )
|
if ( CurrentPaste != NO_TILE && iMapIndex < 0x8000 )
|
||||||
{
|
{
|
||||||
|
|
||||||
// Set undo, then set new
|
// Set undo, then set new
|
||||||
AddToUndoList( iMapIndex );
|
AddToUndoList( iMapIndex );
|
||||||
|
|
||||||
if ( CurrentPaste == DEEPWATERTEXTURE )
|
if ( CurrentPaste == DEEPWATERTEXTURE )
|
||||||
{
|
{
|
||||||
// IF WE ARE PASTING DEEP WATER AND WE ARE NOT OVER WATER, IGNORE!
|
// IF WE ARE PASTING DEEP WATER AND WE ARE NOT OVER WATER, IGNORE!
|
||||||
if ( TypeExistsInLandLayer( iMapIndex, REGWATERTEXTURE, &usTileIndex ) )
|
if ( TypeExistsInLandLayer( iMapIndex, REGWATERTEXTURE, &usTileIndex ) )
|
||||||
{
|
{
|
||||||
if ( !gTileDatabase[ usTileIndex ].ubFullTile )
|
if ( !gTileDatabase[ usTileIndex ].ubFullTile )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't draw over floors
|
// Don't draw over floors
|
||||||
if ( TypeRangeExistsInLandLayer( iMapIndex, FIRSTFLOOR, FOURTHFLOOR, &usTileIndex ) )
|
if ( TypeRangeExistsInLandLayer( iMapIndex, FIRSTFLOOR, FOURTHFLOOR, &usTileIndex ) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Compare heights and do appropriate action
|
// Compare heights and do appropriate action
|
||||||
if ( AnyHeigherLand( iMapIndex, CurrentPaste, &ubLastHighLevel ) )
|
if ( AnyHeigherLand( iMapIndex, CurrentPaste, &ubLastHighLevel ) )
|
||||||
{
|
{
|
||||||
// Here we do the following:
|
// Here we do the following:
|
||||||
// - Remove old type from layer
|
// - Remove old type from layer
|
||||||
// - Smooth World with old type
|
// - Smooth World with old type
|
||||||
// - Add a 3 by 3 square of new type at head
|
// - Add a 3 by 3 square of new type at head
|
||||||
// - Smooth World with new type
|
// - Smooth World with new type
|
||||||
PasteHigherTexture( iMapIndex, CurrentPaste );
|
PasteHigherTexture( iMapIndex, CurrentPaste );
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PasteTextureEx( (INT16)iMapIndex, CurrentPaste );
|
PasteTextureEx( (INT16)iMapIndex, CurrentPaste );
|
||||||
SmoothTerrainRadius( iMapIndex, CurrentPaste, 1, TRUE );
|
SmoothTerrainRadius( iMapIndex, CurrentPaste, 1, TRUE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -753,17 +752,17 @@ void PasteTextureCommon( UINT32 iMapIndex )
|
|||||||
//
|
//
|
||||||
void PasteHigherTexture( UINT32 iMapIndex, UINT32 fNewType )
|
void PasteHigherTexture( UINT32 iMapIndex, UINT32 fNewType )
|
||||||
{
|
{
|
||||||
UINT16 NewTile;
|
UINT16 NewTile;
|
||||||
UINT8 ubLastHighLevel;
|
UINT8 ubLastHighLevel;
|
||||||
UINT32 *puiDeletedTypes = NULL;
|
UINT32 *puiDeletedTypes = NULL;
|
||||||
UINT8 ubNumTypes;
|
UINT8 ubNumTypes;
|
||||||
UINT8 cnt;
|
UINT8 cnt;
|
||||||
|
|
||||||
// Here we do the following:
|
// Here we do the following:
|
||||||
// - Remove old type from layer
|
// - Remove old type from layer
|
||||||
// - Smooth World with old type
|
// - Smooth World with old type
|
||||||
// - Add a 3 by 3 square of new type at head
|
// - Add a 3 by 3 square of new type at head
|
||||||
// - Smooth World with new type
|
// - Smooth World with new type
|
||||||
|
|
||||||
//if ( iMapIndex < 0x8000 && TypeRangeExistsInLandLayer( iMapIndex, FIRSTFLOOR, LASTFLOOR, &NewTile ) )
|
//if ( iMapIndex < 0x8000 && TypeRangeExistsInLandLayer( iMapIndex, FIRSTFLOOR, LASTFLOOR, &NewTile ) )
|
||||||
//ATE: DONOT DO THIS!!!!!!! - I know what was intended - not to draw over floors - this
|
//ATE: DONOT DO THIS!!!!!!! - I know what was intended - not to draw over floors - this
|
||||||
@@ -771,41 +770,41 @@ void PasteHigherTexture( UINT32 iMapIndex, UINT32 fNewType )
|
|||||||
//return;
|
//return;
|
||||||
|
|
||||||
|
|
||||||
if ( iMapIndex < 0x8000 && AnyHeigherLand( iMapIndex, fNewType, &ubLastHighLevel ))
|
if ( iMapIndex < 0x8000 && AnyHeigherLand( iMapIndex, fNewType, &ubLastHighLevel ))
|
||||||
{
|
{
|
||||||
AddToUndoList( iMapIndex );
|
AddToUndoList( iMapIndex );
|
||||||
|
|
||||||
// - For all heigher level, remove
|
// - For all heigher level, remove
|
||||||
RemoveHigherLandLevels( iMapIndex, fNewType, &puiDeletedTypes, &ubNumTypes );
|
RemoveHigherLandLevels( iMapIndex, fNewType, &puiDeletedTypes, &ubNumTypes );
|
||||||
|
|
||||||
// Set with a radius of 1 and smooth according to height difference
|
// Set with a radius of 1 and smooth according to height difference
|
||||||
SetLowerLandIndexWithRadius( iMapIndex, fNewType, 1 , TRUE );
|
SetLowerLandIndexWithRadius( iMapIndex, fNewType, 1 , TRUE );
|
||||||
|
|
||||||
// Smooth all deleted levels
|
// Smooth all deleted levels
|
||||||
for ( cnt = 0; cnt < ubNumTypes; cnt++ )
|
for ( cnt = 0; cnt < ubNumTypes; cnt++ )
|
||||||
{
|
{
|
||||||
SmoothTerrainRadius( iMapIndex, puiDeletedTypes[ cnt ], 1, TRUE );
|
SmoothTerrainRadius( iMapIndex, puiDeletedTypes[ cnt ], 1, TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
MemFree( puiDeletedTypes );
|
MemFree( puiDeletedTypes );
|
||||||
|
|
||||||
}
|
}
|
||||||
else if ( iMapIndex < 0x8000 )
|
else if ( iMapIndex < 0x8000 )
|
||||||
{
|
{
|
||||||
AddToUndoList( iMapIndex );
|
AddToUndoList( iMapIndex );
|
||||||
|
|
||||||
GetTileIndexFromTypeSubIndex( fNewType, REQUIRES_SMOOTHING_TILE, &NewTile );
|
GetTileIndexFromTypeSubIndex( fNewType, REQUIRES_SMOOTHING_TILE, &NewTile );
|
||||||
SetLandIndex( iMapIndex, NewTile, fNewType, FALSE );
|
SetLandIndex( iMapIndex, NewTile, fNewType, FALSE );
|
||||||
|
|
||||||
// Smooth item then adding here
|
// Smooth item then adding here
|
||||||
SmoothTerrain( iMapIndex, fNewType, &NewTile, FALSE );
|
SmoothTerrain( iMapIndex, fNewType, &NewTile, FALSE );
|
||||||
|
|
||||||
if ( NewTile != NO_TILE )
|
if ( NewTile != NO_TILE )
|
||||||
{
|
{
|
||||||
// Change tile
|
// Change tile
|
||||||
SetLandIndex( iMapIndex, NewTile, fNewType, FALSE );
|
SetLandIndex( iMapIndex, NewTile, fNewType, FALSE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -816,17 +815,17 @@ void PasteHigherTexture( UINT32 iMapIndex, UINT32 fNewType )
|
|||||||
//
|
//
|
||||||
BOOLEAN PasteHigherTextureFromRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 ubRadius )
|
BOOLEAN PasteHigherTextureFromRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 ubRadius )
|
||||||
{
|
{
|
||||||
INT16 sTop, sBottom;
|
INT16 sTop, sBottom;
|
||||||
INT16 sLeft, sRight;
|
INT16 sLeft, sRight;
|
||||||
INT16 cnt1, cnt2;
|
INT16 cnt1, cnt2;
|
||||||
INT32 iNewIndex;
|
INT32 iNewIndex;
|
||||||
INT32 iXPos,iYPos;
|
INT32 iXPos,iYPos;
|
||||||
|
|
||||||
// Determine start and end indicies and num rows
|
// Determine start and end indicies and num rows
|
||||||
sTop = ubRadius;
|
sTop = ubRadius;
|
||||||
sBottom = -ubRadius;
|
sBottom = -ubRadius;
|
||||||
sLeft = -ubRadius;
|
sLeft = -ubRadius;
|
||||||
sRight = ubRadius;
|
sRight = ubRadius;
|
||||||
|
|
||||||
iXPos = (iMapIndex % WORLD_COLS);
|
iXPos = (iMapIndex % WORLD_COLS);
|
||||||
iYPos = (iMapIndex - iXPos) / WORLD_COLS;
|
iYPos = (iMapIndex - iXPos) / WORLD_COLS;
|
||||||
@@ -881,7 +880,7 @@ BOOLEAN PasteExistingTexture( UINT32 iMapIndex, UINT16 usIndex )
|
|||||||
//if ( TypeRangeExistsInLandLayer( iMapIndex, FIRSTFLOOR, LASTFLOOR, &Dummy ) )
|
//if ( TypeRangeExistsInLandLayer( iMapIndex, FIRSTFLOOR, LASTFLOOR, &Dummy ) )
|
||||||
// return( FALSE );
|
// return( FALSE );
|
||||||
|
|
||||||
// Get top tile index
|
// Get top tile index
|
||||||
// Remove all land peices except
|
// Remove all land peices except
|
||||||
GetTileType( usIndex, &uiNewType );
|
GetTileType( usIndex, &uiNewType );
|
||||||
|
|
||||||
@@ -899,7 +898,7 @@ BOOLEAN PasteExistingTexture( UINT32 iMapIndex, UINT16 usIndex )
|
|||||||
SetLandIndex( iMapIndex, usIndex, uiNewType, FALSE );
|
SetLandIndex( iMapIndex, usIndex, uiNewType, FALSE );
|
||||||
|
|
||||||
// ATE: Set this land peice to require smoothing again!
|
// ATE: Set this land peice to require smoothing again!
|
||||||
SmoothAllTerrainTypeRadius( iMapIndex, 2, TRUE );
|
SmoothAllTerrainTypeRadius( iMapIndex, 2, TRUE );
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
@@ -912,17 +911,17 @@ BOOLEAN PasteExistingTexture( UINT32 iMapIndex, UINT16 usIndex )
|
|||||||
//
|
//
|
||||||
BOOLEAN PasteExistingTextureFromRadius( INT32 iMapIndex, UINT16 usIndex, UINT8 ubRadius )
|
BOOLEAN PasteExistingTextureFromRadius( INT32 iMapIndex, UINT16 usIndex, UINT8 ubRadius )
|
||||||
{
|
{
|
||||||
INT16 sTop, sBottom;
|
INT16 sTop, sBottom;
|
||||||
INT16 sLeft, sRight;
|
INT16 sLeft, sRight;
|
||||||
INT16 cnt1, cnt2;
|
INT16 cnt1, cnt2;
|
||||||
INT32 iNewIndex;
|
INT32 iNewIndex;
|
||||||
INT32 leftmost;
|
INT32 leftmost;
|
||||||
|
|
||||||
// Determine start end end indicies and num rows
|
// Determine start end end indicies and num rows
|
||||||
sTop = ubRadius;
|
sTop = ubRadius;
|
||||||
sBottom = -ubRadius;
|
sBottom = -ubRadius;
|
||||||
sLeft = - ubRadius;
|
sLeft = - ubRadius;
|
||||||
sRight = ubRadius;
|
sRight = ubRadius;
|
||||||
|
|
||||||
if ( iMapIndex >= 0x8000 )
|
if ( iMapIndex >= 0x8000 )
|
||||||
return ( FALSE );
|
return ( FALSE );
|
||||||
@@ -937,7 +936,7 @@ BOOLEAN PasteExistingTextureFromRadius( INT32 iMapIndex, UINT16 usIndex, UINT8 u
|
|||||||
iNewIndex = iMapIndex + ( WORLD_COLS * cnt1 ) + cnt2;
|
iNewIndex = iMapIndex + ( WORLD_COLS * cnt1 ) + cnt2;
|
||||||
|
|
||||||
if ( iNewIndex >=0 && iNewIndex < WORLD_MAX &&
|
if ( iNewIndex >=0 && iNewIndex < WORLD_MAX &&
|
||||||
iNewIndex >= leftmost && iNewIndex < ( leftmost + WORLD_COLS ) )
|
iNewIndex >= leftmost && iNewIndex < ( leftmost + WORLD_COLS ) )
|
||||||
{
|
{
|
||||||
AddToUndoList( iMapIndex );
|
AddToUndoList( iMapIndex );
|
||||||
PasteExistingTexture( iNewIndex, usIndex );
|
PasteExistingTexture( iNewIndex, usIndex );
|
||||||
@@ -961,20 +960,20 @@ BOOLEAN SetLowerLandIndexWithRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 ub
|
|||||||
INT16 sTop, sBottom;
|
INT16 sTop, sBottom;
|
||||||
INT16 sLeft, sRight;
|
INT16 sLeft, sRight;
|
||||||
INT16 cnt1, cnt2;
|
INT16 cnt1, cnt2;
|
||||||
INT32 iNewIndex;
|
INT32 iNewIndex;
|
||||||
BOOLEAN fDoPaste = FALSE;
|
BOOLEAN fDoPaste = FALSE;
|
||||||
INT32 leftmost;
|
INT32 leftmost;
|
||||||
UINT8 ubLastHighLevel;
|
UINT8 ubLastHighLevel;
|
||||||
UINT32 *puiSmoothTiles = NULL;
|
UINT32 *puiSmoothTiles = NULL;
|
||||||
INT16 sNumSmoothTiles = 0;
|
INT16 sNumSmoothTiles = 0;
|
||||||
UINT16 usTemp;
|
UINT16 usTemp;
|
||||||
UINT16 NewTile; //,Dummy;
|
UINT16 NewTile; //,Dummy;
|
||||||
|
|
||||||
// Determine start end end indicies and num rows
|
// Determine start end end indicies and num rows
|
||||||
sTop = ubRadius;
|
sTop = ubRadius;
|
||||||
sBottom = -ubRadius;
|
sBottom = -ubRadius;
|
||||||
sLeft = - ubRadius;
|
sLeft = - ubRadius;
|
||||||
sRight = ubRadius;
|
sRight = ubRadius;
|
||||||
|
|
||||||
if ( iMapIndex >= 0x8000 )
|
if ( iMapIndex >= 0x8000 )
|
||||||
return ( FALSE );
|
return ( FALSE );
|
||||||
@@ -989,7 +988,7 @@ BOOLEAN SetLowerLandIndexWithRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 ub
|
|||||||
iNewIndex = iMapIndex + ( WORLD_COLS * cnt1 ) + cnt2;
|
iNewIndex = iMapIndex + ( WORLD_COLS * cnt1 ) + cnt2;
|
||||||
|
|
||||||
if ( iNewIndex >=0 && iNewIndex < WORLD_MAX &&
|
if ( iNewIndex >=0 && iNewIndex < WORLD_MAX &&
|
||||||
iNewIndex >= leftmost && iNewIndex < ( leftmost + WORLD_COLS ) )
|
iNewIndex >= leftmost && iNewIndex < ( leftmost + WORLD_COLS ) )
|
||||||
{
|
{
|
||||||
|
|
||||||
if ( fReplace )
|
if ( fReplace )
|
||||||
@@ -1005,7 +1004,7 @@ BOOLEAN SetLowerLandIndexWithRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 ub
|
|||||||
}
|
}
|
||||||
|
|
||||||
//if ( fDoPaste && !TypeRangeExistsInLandLayer( iMapIndex, FIRSTFLOOR, LASTFLOOR, &Dummy ) )
|
//if ( fDoPaste && !TypeRangeExistsInLandLayer( iMapIndex, FIRSTFLOOR, LASTFLOOR, &Dummy ) )
|
||||||
if ( fDoPaste )
|
if ( fDoPaste )
|
||||||
{
|
{
|
||||||
if ( iMapIndex == iNewIndex )
|
if ( iMapIndex == iNewIndex )
|
||||||
{
|
{
|
||||||
@@ -1046,7 +1045,7 @@ BOOLEAN SetLowerLandIndexWithRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 ub
|
|||||||
// Once here, smooth any tiles that need it
|
// Once here, smooth any tiles that need it
|
||||||
if ( sNumSmoothTiles > 0 )
|
if ( sNumSmoothTiles > 0 )
|
||||||
{
|
{
|
||||||
for ( cnt1 = 0; cnt1 < sNumSmoothTiles; cnt1++ )
|
for ( cnt1 = 0; cnt1 < sNumSmoothTiles; cnt1++ )
|
||||||
{
|
{
|
||||||
|
|
||||||
SmoothTerrainRadius( puiSmoothTiles[ cnt1 ], uiNewType, 10, FALSE );
|
SmoothTerrainRadius( puiSmoothTiles[ cnt1 ], uiNewType, 10, FALSE );
|
||||||
@@ -1062,12 +1061,12 @@ BOOLEAN SetLowerLandIndexWithRadius( INT32 iMapIndex, UINT32 uiNewType, UINT8 ub
|
|||||||
void PasteTextureEx( INT16 sGridNo, UINT16 usType )
|
void PasteTextureEx( INT16 sGridNo, UINT16 usType )
|
||||||
{
|
{
|
||||||
UINT16 usIndex;
|
UINT16 usIndex;
|
||||||
UINT8 ubTypeLevel;
|
UINT8 ubTypeLevel;
|
||||||
UINT16 NewTile;
|
UINT16 NewTile;
|
||||||
|
|
||||||
// CHECK IF THIS TEXTURE EXISTS!
|
// CHECK IF THIS TEXTURE EXISTS!
|
||||||
if ( TypeExistsInLandLayer( sGridNo, usType, &usIndex ) )
|
if ( TypeExistsInLandLayer( sGridNo, usType, &usIndex ) )
|
||||||
{
|
{
|
||||||
if ( GetTypeLandLevel( sGridNo, usType, &ubTypeLevel ) )
|
if ( GetTypeLandLevel( sGridNo, usType, &ubTypeLevel ) )
|
||||||
{
|
{
|
||||||
// If top-land , do not change
|
// If top-land , do not change
|
||||||
@@ -1080,10 +1079,10 @@ void PasteTextureEx( INT16 sGridNo, UINT16 usType )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
// Fill with just first tile, smoothworld() will pick proper piece later
|
// Fill with just first tile, smoothworld() will pick proper piece later
|
||||||
GetTileIndexFromTypeSubIndex( usType, REQUIRES_SMOOTHING_TILE, &NewTile );
|
GetTileIndexFromTypeSubIndex( usType, REQUIRES_SMOOTHING_TILE, &NewTile );
|
||||||
|
|
||||||
SetLandIndex( sGridNo, NewTile, usType, FALSE );
|
SetLandIndex( sGridNo, NewTile, usType, FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1091,17 +1090,17 @@ void PasteTextureEx( INT16 sGridNo, UINT16 usType )
|
|||||||
|
|
||||||
void PasteTextureFromRadiusEx( INT16 sGridNo, UINT16 usType, UINT8 ubRadius )
|
void PasteTextureFromRadiusEx( INT16 sGridNo, UINT16 usType, UINT8 ubRadius )
|
||||||
{
|
{
|
||||||
INT16 sTop, sBottom;
|
INT16 sTop, sBottom;
|
||||||
INT16 sLeft, sRight;
|
INT16 sLeft, sRight;
|
||||||
INT16 cnt1, cnt2;
|
INT16 cnt1, cnt2;
|
||||||
INT32 iNewIndex;
|
INT32 iNewIndex;
|
||||||
INT32 leftmost;
|
INT32 leftmost;
|
||||||
|
|
||||||
// Determine start end end indicies and num rows
|
// Determine start end end indicies and num rows
|
||||||
sTop = ubRadius;
|
sTop = ubRadius;
|
||||||
sBottom = -ubRadius;
|
sBottom = -ubRadius;
|
||||||
sLeft = - ubRadius;
|
sLeft = - ubRadius;
|
||||||
sRight = ubRadius;
|
sRight = ubRadius;
|
||||||
|
|
||||||
if ( sGridNo >= 0x8000 )
|
if ( sGridNo >= 0x8000 )
|
||||||
return;
|
return;
|
||||||
@@ -1116,7 +1115,7 @@ void PasteTextureFromRadiusEx( INT16 sGridNo, UINT16 usType, UINT8 ubRadius )
|
|||||||
iNewIndex = sGridNo + ( WORLD_COLS * cnt1 ) + cnt2;
|
iNewIndex = sGridNo + ( WORLD_COLS * cnt1 ) + cnt2;
|
||||||
|
|
||||||
if ( iNewIndex >=0 && iNewIndex < WORLD_MAX &&
|
if ( iNewIndex >=0 && iNewIndex < WORLD_MAX &&
|
||||||
iNewIndex >= leftmost && iNewIndex < ( leftmost + WORLD_COLS ) )
|
iNewIndex >= leftmost && iNewIndex < ( leftmost + WORLD_COLS ) )
|
||||||
{
|
{
|
||||||
PasteTextureEx( sGridNo, usType );
|
PasteTextureEx( sGridNo, usType );
|
||||||
}
|
}
|
||||||
@@ -1145,8 +1144,6 @@ void RaiseWorldLand( )
|
|||||||
BOOLEAN fSomethingRaised = FALSE;
|
BOOLEAN fSomethingRaised = FALSE;
|
||||||
UINT8 ubLoop;
|
UINT8 ubLoop;
|
||||||
UINT16 usIndex;
|
UINT16 usIndex;
|
||||||
BOOLEAN fStopRaise = FALSE;
|
|
||||||
INT32 iCounterA = 0, iCounterB = 0;
|
|
||||||
INT32 iStartNumberOfRaises = 0;
|
INT32 iStartNumberOfRaises = 0;
|
||||||
INT32 iNumberOfRaises = 0;
|
INT32 iNumberOfRaises = 0;
|
||||||
BOOLEAN fAboutToRaise = FALSE;
|
BOOLEAN fAboutToRaise = FALSE;
|
||||||
@@ -1176,7 +1173,6 @@ void RaiseWorldLand( )
|
|||||||
pStruct = pStruct->pNext;
|
pStruct = pStruct->pNext;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
pTileElement = &(gTileDatabase[ pStruct->usIndex ]);
|
pTileElement = &(gTileDatabase[ pStruct->usIndex ]);
|
||||||
if (pTileElement->fType==FIRSTCLIFF)
|
if (pTileElement->fType==FIRSTCLIFF)
|
||||||
{
|
{
|
||||||
@@ -1322,9 +1318,9 @@ void RaiseWorldLand( )
|
|||||||
// the system uses world_cord=x+y*(row_size)
|
// the system uses world_cord=x+y*(row_size)
|
||||||
|
|
||||||
|
|
||||||
for (cnt=WORLD_MAX-1; cnt >= 0; cnt--)
|
for (cnt=WORLD_MAX-1; cnt >= 0; cnt--)
|
||||||
{
|
{
|
||||||
// reset the RAISE to FALSE
|
// reset the RAISE to FALSE
|
||||||
// End of the row
|
// End of the row
|
||||||
if ( !(cnt % WORLD_ROWS) )
|
if ( !(cnt % WORLD_ROWS) )
|
||||||
{
|
{
|
||||||
@@ -1348,7 +1344,7 @@ void RaiseWorldLand( )
|
|||||||
// raises
|
// raises
|
||||||
if( cnt < WORLD_MAX - 2 )
|
if( cnt < WORLD_MAX - 2 )
|
||||||
{
|
{
|
||||||
if( ( !( gpWorldLevelData[ cnt + 1 ].uiFlags & MAPELEMENT_RAISE_LAND_START) && !( gpWorldLevelData[ cnt + 2 ].uiFlags & MAPELEMENT_RAISE_LAND_START ) ) )
|
if( ( !( gpWorldLevelData[ cnt + 1 ].uiFlags & MAPELEMENT_RAISE_LAND_START) && !( gpWorldLevelData[ cnt + 2 ].uiFlags & MAPELEMENT_RAISE_LAND_START ) ) )
|
||||||
{
|
{
|
||||||
iNumberOfRaises++;
|
iNumberOfRaises++;
|
||||||
}
|
}
|
||||||
@@ -1373,11 +1369,11 @@ void RaiseWorldLand( )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (cnt=WORLD_MAX-1; cnt >= 0; cnt--)
|
for (cnt=WORLD_MAX-1; cnt >= 0; cnt--)
|
||||||
{
|
{
|
||||||
if( ( cnt < WORLD_MAX - WORLD_ROWS ) && ( cnt > WORLD_ROWS ) )
|
if( ( cnt < WORLD_MAX - WORLD_ROWS ) && ( cnt > WORLD_ROWS ) )
|
||||||
{
|
{
|
||||||
if( ( gpWorldLevelData[cnt + WORLD_ROWS ].sHeight == gpWorldLevelData[cnt - WORLD_ROWS ].sHeight ) && ( gpWorldLevelData[ cnt ].sHeight!= gpWorldLevelData[cnt - WORLD_ROWS ].sHeight ) )
|
if( ( gpWorldLevelData[cnt + WORLD_ROWS ].sHeight == gpWorldLevelData[cnt - WORLD_ROWS ].sHeight ) && ( gpWorldLevelData[ cnt ].sHeight!= gpWorldLevelData[cnt - WORLD_ROWS ].sHeight ) )
|
||||||
{
|
{
|
||||||
gpWorldLevelData[cnt].sHeight = gpWorldLevelData[cnt + WORLD_ROWS ].sHeight;
|
gpWorldLevelData[cnt].sHeight = gpWorldLevelData[cnt + WORLD_ROWS ].sHeight;
|
||||||
}
|
}
|
||||||
@@ -1385,7 +1381,7 @@ void RaiseWorldLand( )
|
|||||||
{
|
{
|
||||||
if( gpWorldLevelData[cnt - WORLD_ROWS ].sHeight > gpWorldLevelData[cnt + WORLD_ROWS ].sHeight )
|
if( gpWorldLevelData[cnt - WORLD_ROWS ].sHeight > gpWorldLevelData[cnt + WORLD_ROWS ].sHeight )
|
||||||
{
|
{
|
||||||
gpWorldLevelData[ cnt ].sHeight = gpWorldLevelData[cnt - WORLD_ROWS ].sHeight;
|
gpWorldLevelData[ cnt ].sHeight = gpWorldLevelData[cnt - WORLD_ROWS ].sHeight;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1451,3 +1447,4 @@ void EliminateObjectLayerRedundancy()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+65
-61
@@ -25,7 +25,6 @@
|
|||||||
#include "Interactive Tiles.h"
|
#include "Interactive Tiles.h"
|
||||||
#include "overhead types.h"
|
#include "overhead types.h"
|
||||||
#include "Overhead.h"
|
#include "Overhead.h"
|
||||||
#include "Soldier Control.h"
|
|
||||||
#include "Handle UI.h"
|
#include "Handle UI.h"
|
||||||
#include "Event Pump.h"
|
#include "Event Pump.h"
|
||||||
#include "world items.h"
|
#include "world items.h"
|
||||||
@@ -76,6 +75,9 @@
|
|||||||
#include "Summary Info.h"
|
#include "Summary Info.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//forward declarations of common classes to eliminate includes
|
||||||
|
class OBJECTTYPE;
|
||||||
|
class SOLDIERTYPE;
|
||||||
|
|
||||||
extern CHAR8 *szMusicList[NUM_MUSIC];
|
extern CHAR8 *szMusicList[NUM_MUSIC];
|
||||||
|
|
||||||
@@ -101,7 +103,7 @@ GUI_BUTTON *gpPersistantButton;
|
|||||||
|
|
||||||
// These are global variables used by the main game loop
|
// These are global variables used by the main game loop
|
||||||
|
|
||||||
UINT32 guiSaveTacticalStatusFlags; //saves the tactical status flags when entering the editor.
|
UINT32 guiSaveTacticalStatusFlags; //saves the tactical status flags when entering the editor.
|
||||||
|
|
||||||
BOOLEAN gfAutoLoadA9 = FALSE;
|
BOOLEAN gfAutoLoadA9 = FALSE;
|
||||||
//new vars added by Kris
|
//new vars added by Kris
|
||||||
@@ -162,7 +164,7 @@ INT16 gsCursorGridNo;
|
|||||||
|
|
||||||
INT32 giMusicID = 0;
|
INT32 giMusicID = 0;
|
||||||
|
|
||||||
void EraseWorldData( );
|
void EraseWorldData( );
|
||||||
|
|
||||||
BOOLEAN EditModeInit( void );
|
BOOLEAN EditModeInit( void );
|
||||||
BOOLEAN EditModeShutdown( void );
|
BOOLEAN EditModeShutdown( void );
|
||||||
@@ -235,13 +237,13 @@ UINT32 EditScreenInit(void)
|
|||||||
|
|
||||||
//Set the editor colors.
|
//Set the editor colors.
|
||||||
//gusEditorTaskbarColor = 9581;
|
//gusEditorTaskbarColor = 9581;
|
||||||
//gusEditorTaskbarColor = Get16BPPColor( FROMRGB( 72, 88, 104 ) );
|
//gusEditorTaskbarColor = Get16BPPColor( FROMRGB( 72, 88, 104 ) );
|
||||||
//gusEditorTaskbarHiColor = Get16BPPColor( FROMRGB( 136, 138, 135 ) );
|
//gusEditorTaskbarHiColor = Get16BPPColor( FROMRGB( 136, 138, 135 ) );
|
||||||
//gusEditorTaskbarLoColor = Get16BPPColor( FROMRGB( 24, 61, 81 ) );
|
//gusEditorTaskbarLoColor = Get16BPPColor( FROMRGB( 24, 61, 81 ) );
|
||||||
|
|
||||||
gusEditorTaskbarColor = Get16BPPColor( FROMRGB( 65, 79, 94 ) );
|
gusEditorTaskbarColor = Get16BPPColor( FROMRGB( 65, 79, 94 ) );
|
||||||
gusEditorTaskbarHiColor = Get16BPPColor( FROMRGB( 122, 124, 121 ) );
|
gusEditorTaskbarHiColor = Get16BPPColor( FROMRGB( 122, 124, 121 ) );
|
||||||
gusEditorTaskbarLoColor = Get16BPPColor( FROMRGB( 22, 55, 73 ) );
|
gusEditorTaskbarLoColor = Get16BPPColor( FROMRGB( 22, 55, 73 ) );
|
||||||
|
|
||||||
InitClipboard();
|
InitClipboard();
|
||||||
|
|
||||||
@@ -332,7 +334,7 @@ BOOLEAN EditModeInit( void )
|
|||||||
|
|
||||||
CreateEditorTaskbar();
|
CreateEditorTaskbar();
|
||||||
|
|
||||||
//Hide all of the buttons here. DoTaskbar() will handle the
|
//Hide all of the buttons here. DoTaskbar() will handle the
|
||||||
//showing and hiding of the buttons.
|
//showing and hiding of the buttons.
|
||||||
for( x = LAST_EDITORTAB_BUTTON+1; x < NUMBER_EDITOR_BUTTONS; x++ )
|
for( x = LAST_EDITORTAB_BUTTON+1; x < NUMBER_EDITOR_BUTTONS; x++ )
|
||||||
HideButton( iEditorButton[x] );
|
HideButton( iEditorButton[x] );
|
||||||
@@ -362,7 +364,7 @@ BOOLEAN EditModeInit( void )
|
|||||||
|
|
||||||
gusGameLightLevel = LightGetAmbient();
|
gusGameLightLevel = LightGetAmbient();
|
||||||
if( !gfBasement && !gfCaves )
|
if( !gfBasement && !gfCaves )
|
||||||
gusLightLevel = 12;//EDITOR_LIGHT_MAX - (UINT16)LightGetAmbient();
|
gusLightLevel = 12;//EDITOR_LIGHT_MAX - (UINT16)LightGetAmbient();
|
||||||
else
|
else
|
||||||
gusLightLevel = EDITOR_LIGHT_MAX - (UINT16)LightGetAmbient();
|
gusLightLevel = EDITOR_LIGHT_MAX - (UINT16)LightGetAmbient();
|
||||||
|
|
||||||
@@ -666,7 +668,7 @@ BOOLEAN DrawTempMouseCursorObject(void)
|
|||||||
case DRAW_MODE_ROOM:
|
case DRAW_MODE_ROOM:
|
||||||
pSelList = SelRoom;
|
pSelList = SelRoom;
|
||||||
pNumSelList = &iNumRoomsSelected;
|
pNumSelList = &iNumRoomsSelected;
|
||||||
return FALSE; //a special case where we just want to get the info and not display a cursor.
|
return FALSE; //a special case where we just want to get the info and not display a cursor.
|
||||||
case DRAW_MODE_NEWROOF:
|
case DRAW_MODE_NEWROOF:
|
||||||
pSelList = SelSingleNewRoof;
|
pSelList = SelSingleNewRoof;
|
||||||
pNumSelList = &iNumNewRoofsSelected;
|
pNumSelList = &iNumNewRoofsSelected;
|
||||||
@@ -766,7 +768,7 @@ BOOLEAN DrawTempMouseCursorObject(void)
|
|||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if( usUseObjIndex == 0xffff || usUseIndex == 0xffff )
|
if( usUseObjIndex == 0xffff || usUseIndex == 0xffff )
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -797,7 +799,7 @@ void ShowCurrentDrawingMode( void )
|
|||||||
UINT16 usUseIndex;
|
UINT16 usUseIndex;
|
||||||
UINT16 usObjIndex;
|
UINT16 usObjIndex;
|
||||||
INT32 iStartX = iScreenWidthOffset + 50;
|
INT32 iStartX = iScreenWidthOffset + 50;
|
||||||
INT32 iStartY = 2 * iScreenHeightOffset + 440;
|
INT32 iStartY = 2 * iScreenHeightOffset + 440;
|
||||||
INT32 iPicHeight, iPicWidth;
|
INT32 iPicHeight, iPicWidth;
|
||||||
INT16 sTempOffsetX;
|
INT16 sTempOffsetX;
|
||||||
INT16 sTempOffsetY;
|
INT16 sTempOffsetY;
|
||||||
@@ -1029,8 +1031,8 @@ void ShowCurrentDrawingMode( void )
|
|||||||
|
|
||||||
SetObjectShade( gTileDatabase[gTileTypeStartIndex[usObjIndex]].hTileSurface, DEFAULT_SHADE_LEVEL );
|
SetObjectShade( gTileDatabase[gTileTypeStartIndex[usObjIndex]].hTileSurface, DEFAULT_SHADE_LEVEL );
|
||||||
BltVideoObject( FRAME_BUFFER, gTileDatabase[gTileTypeStartIndex[usObjIndex]].hTileSurface,
|
BltVideoObject( FRAME_BUFFER, gTileDatabase[gTileTypeStartIndex[usObjIndex]].hTileSurface,
|
||||||
usUseIndex, (iScreenWidthOffset + 0 + iStartX), (2 * iScreenHeightOffset + 400 + iStartY),
|
usUseIndex, (iScreenWidthOffset + 0 + iStartX), (2 * iScreenHeightOffset + 400 + iStartY),
|
||||||
VO_BLT_SRCTRANSPARENCY, NULL);
|
VO_BLT_SRCTRANSPARENCY, NULL);
|
||||||
|
|
||||||
pETRLEObject->sOffsetX = sTempOffsetX;
|
pETRLEObject->sOffsetX = sTempOffsetX;
|
||||||
pETRLEObject->sOffsetY = sTempOffsetY;
|
pETRLEObject->sOffsetY = sTempOffsetY;
|
||||||
@@ -1296,6 +1298,7 @@ void HandleJA2ToolbarSelection( void )
|
|||||||
case TBAR_MODE_ITEM_WEAPONS:
|
case TBAR_MODE_ITEM_WEAPONS:
|
||||||
case TBAR_MODE_ITEM_AMMO:
|
case TBAR_MODE_ITEM_AMMO:
|
||||||
case TBAR_MODE_ITEM_ARMOUR:
|
case TBAR_MODE_ITEM_ARMOUR:
|
||||||
|
case TBAR_MODE_ITEM_LBEGEAR:
|
||||||
case TBAR_MODE_ITEM_EXPLOSIVES:
|
case TBAR_MODE_ITEM_EXPLOSIVES:
|
||||||
case TBAR_MODE_ITEM_EQUIPMENT1:
|
case TBAR_MODE_ITEM_EQUIPMENT1:
|
||||||
case TBAR_MODE_ITEM_EQUIPMENT2:
|
case TBAR_MODE_ITEM_EQUIPMENT2:
|
||||||
@@ -1331,7 +1334,7 @@ extern void DeleteSelectedMercsItem();
|
|||||||
void HandleKeyboardShortcuts( )
|
void HandleKeyboardShortcuts( )
|
||||||
{
|
{
|
||||||
static INT32 iSavedMode;
|
static INT32 iSavedMode;
|
||||||
static BOOLEAN fShowTrees = TRUE;
|
static BOOLEAN fShowTrees = TRUE;
|
||||||
while( DequeueEvent( &EditorInputEvent ) )
|
while( DequeueEvent( &EditorInputEvent ) )
|
||||||
{
|
{
|
||||||
if( !HandleSummaryInput( &EditorInputEvent ) && !HandleTextInput( &EditorInputEvent ) && EditorInputEvent.usEvent == KEY_DOWN )
|
if( !HandleSummaryInput( &EditorInputEvent ) && !HandleTextInput( &EditorInputEvent ) && EditorInputEvent.usEvent == KEY_DOWN )
|
||||||
@@ -2403,7 +2406,7 @@ UINT32 ProcessEditscreenMessageBoxResponse()
|
|||||||
//
|
//
|
||||||
UINT32 WaitForHelpScreenResponse( void )
|
UINT32 WaitForHelpScreenResponse( void )
|
||||||
{
|
{
|
||||||
InputAtom DummyEvent;
|
InputAtom DummyEvent;
|
||||||
BOOLEAN fLeaveScreen;
|
BOOLEAN fLeaveScreen;
|
||||||
|
|
||||||
ColorFillVideoSurfaceArea(FRAME_BUFFER, iScreenWidthOffset + 50, iScreenHeightOffset + 50, iScreenWidthOffset + 590, iScreenHeightOffset + 310,
|
ColorFillVideoSurfaceArea(FRAME_BUFFER, iScreenWidthOffset + 50, iScreenHeightOffset + 50, iScreenWidthOffset + 590, iScreenHeightOffset + 310,
|
||||||
@@ -2415,67 +2418,67 @@ UINT32 WaitForHelpScreenResponse( void )
|
|||||||
|
|
||||||
SetFont( gp12PointFont1 );
|
SetFont( gp12PointFont1 );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 55, L"HOME" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 55, L"HOME" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 55, L"Toggle fake editor lighting ON/OFF" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 55, L"Toggle fake editor lighting ON/OFF" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 67, L"INSERT" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 67, L"INSERT" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 67, L"Toggle fill mode ON/OFF" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 67, L"Toggle fill mode ON/OFF" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 79, L"BKSPC" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 79, L"BKSPC" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 79, L"Undo last change" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 79, L"Undo last change" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 91, L"DEL" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 91, L"DEL" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 91, L"Quick erase object under mouse cursor" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 91, L"Quick erase object under mouse cursor" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 103, L"ESC" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 103, L"ESC" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 103, L"Exit editor" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 103, L"Exit editor" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 115, L"PGUP/PGDN" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 115, L"PGUP/PGDN" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 115, L"Change object to be pasted" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 115, L"Change object to be pasted" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 127, L"F1" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 127, L"F1" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 127, L"This help screen" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 127, L"This help screen" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 139, L"F10" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 139, L"F10" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 139, L"Save current map" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 139, L"Save current map" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 151, L"F11" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 151, L"F11" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 151, L"Load map as current" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 151, L"Load map as current" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 163, L"+/-" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 163, L"+/-" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 163, L"Change shadow darkness by .01" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 163, L"Change shadow darkness by .01" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 175, L"SHFT +/-" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 175, L"SHFT +/-" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 175, L"Change shadow darkness by .05" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 175, L"Change shadow darkness by .05" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 187, L"0 - 9" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 187, L"0 - 9" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 187, L"Change map/tileset filename" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 187, L"Change map/tileset filename" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 199, L"b" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 199, L"b" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 199, L"Change brush size" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 199, L"Change brush size" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 211, L"d" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 211, L"d" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 211, L"Draw debris" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 211, L"Draw debris" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 223, L"o" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 223, L"o" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 223, L"Draw obstacle" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 223, L"Draw obstacle" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 235, L"r" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 235, L"r" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 235, L"Draw rocks" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 235, L"Draw rocks" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 247, L"t" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 247, L"t" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 247, L"Toggle trees display ON/OFF" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 247, L"Toggle trees display ON/OFF" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 259, L"g" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 259, L"g" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 259, L"Draw ground textures" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 259, L"Draw ground textures" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 271, L"w" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 271, L"w" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 271, L"Draw building walls" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 271, L"Draw building walls" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 283, L"e" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 283, L"e" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 283, L"Toggle erase mode ON/OFF" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 283, L"Toggle erase mode ON/OFF" );
|
||||||
|
|
||||||
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 295, L"h" );
|
gprintf( iScreenWidthOffset + 55, iScreenHeightOffset + 295, L"h" );
|
||||||
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 295, L"Toggle roofs ON/OFF" );
|
gprintf( iScreenWidthOffset + 205, iScreenHeightOffset + 295, L"Toggle roofs ON/OFF" );
|
||||||
|
|
||||||
|
|
||||||
@@ -2524,7 +2527,7 @@ UINT32 WaitForHelpScreenResponse( void )
|
|||||||
//
|
//
|
||||||
UINT32 WaitForSelectionWindowResponse( void )
|
UINT32 WaitForSelectionWindowResponse( void )
|
||||||
{
|
{
|
||||||
InputAtom DummyEvent;
|
InputAtom DummyEvent;
|
||||||
|
|
||||||
while (DequeueEvent(&DummyEvent) == TRUE)
|
while (DequeueEvent(&DummyEvent) == TRUE)
|
||||||
{
|
{
|
||||||
@@ -2666,8 +2669,8 @@ void ShowCurrentSlotSurface( UINT32 vSurface, INT32 iWindow )
|
|||||||
|
|
||||||
vSfx.SrcRect = ClipRect;
|
vSfx.SrcRect = ClipRect;
|
||||||
BltVideoSurface( FRAME_BUFFER, vSurface, 0,
|
BltVideoSurface( FRAME_BUFFER, vSurface, 0,
|
||||||
iStartX, iStartY,
|
iStartX, iStartY,
|
||||||
VS_BLT_SRCSUBRECT, &vSfx );
|
VS_BLT_SRCSUBRECT, &vSfx );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2717,7 +2720,7 @@ void ShowCurrentSlotImage( HVOBJECT hVObj, INT32 iWindow )
|
|||||||
|
|
||||||
SetObjectShade( hVObj, DEFAULT_SHADE_LEVEL );
|
SetObjectShade( hVObj, DEFAULT_SHADE_LEVEL );
|
||||||
BltVideoObject( FRAME_BUFFER, hVObj, 0, (iStartX), (iStartY),
|
BltVideoObject( FRAME_BUFFER, hVObj, 0, (iStartX), (iStartY),
|
||||||
VO_BLT_SRCTRANSPARENCY, NULL);
|
VO_BLT_SRCTRANSPARENCY, NULL);
|
||||||
|
|
||||||
pETRLEObject->sOffsetX = sTempOffsetX;
|
pETRLEObject->sOffsetX = sTempOffsetX;
|
||||||
pETRLEObject->sOffsetY = sTempOffsetY;
|
pETRLEObject->sOffsetY = sTempOffsetY;
|
||||||
@@ -2852,7 +2855,7 @@ BOOLEAN RemoveLight( INT16 iMapX, INT16 iMapY )
|
|||||||
LightSpritePower( iCount, FALSE );
|
LightSpritePower( iCount, FALSE );
|
||||||
LightSpriteDestroy( iCount );
|
LightSpriteDestroy( iCount );
|
||||||
fRemovedLight = TRUE;
|
fRemovedLight = TRUE;
|
||||||
iMapIndex = ((INT32)iMapY * WORLD_COLS) + (INT32)iMapX;
|
iMapIndex = ((INT32)iMapY * WORLD_COLS) + (INT32)iMapX;
|
||||||
RemoveAllObjectsOfTypeRange( iMapIndex, GOODRING, GOODRING );
|
RemoveAllObjectsOfTypeRange( iMapIndex, GOODRING, GOODRING );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2862,8 +2865,8 @@ BOOLEAN RemoveLight( INT16 iMapX, INT16 iMapY )
|
|||||||
{
|
{
|
||||||
UINT16 usRadius;
|
UINT16 usRadius;
|
||||||
//Assuming that the light naming convention doesn't change, then this following conversion
|
//Assuming that the light naming convention doesn't change, then this following conversion
|
||||||
//should work. Basically, the radius values aren't stored in the lights, so I have pull
|
//should work. Basically, the radius values aren't stored in the lights, so I have pull
|
||||||
//the radius out of the filename. Ex: L-RO5.LHT
|
//the radius out of the filename. Ex: L-RO5.LHT
|
||||||
usRadius = pLastLightName[4] - 0x30;
|
usRadius = pLastLightName[4] - 0x30;
|
||||||
AddLightToUndoList( iMapIndex, usRadius, (UINT8)uiLastLightType );
|
AddLightToUndoList( iMapIndex, usRadius, (UINT8)uiLastLightType );
|
||||||
}
|
}
|
||||||
@@ -3148,7 +3151,6 @@ void EnsureStatusOfEditorButtons()
|
|||||||
|
|
||||||
void HandleMouseClicksInGameScreen()
|
void HandleMouseClicksInGameScreen()
|
||||||
{
|
{
|
||||||
//EXITGRID dummy={0,0,0,0};
|
|
||||||
INT16 sX, sY;
|
INT16 sX, sY;
|
||||||
BOOLEAN fPrevState;
|
BOOLEAN fPrevState;
|
||||||
if( !GetMouseXY( &sGridX, &sGridY ) )
|
if( !GetMouseXY( &sGridX, &sGridY ) )
|
||||||
@@ -3297,7 +3299,7 @@ void HandleMouseClicksInGameScreen()
|
|||||||
case DRAW_MODE_PLACE_ITEM:
|
case DRAW_MODE_PLACE_ITEM:
|
||||||
if( gfFirstPlacement )
|
if( gfFirstPlacement )
|
||||||
{
|
{
|
||||||
AddSelectedItemToWorld( (UINT16)iMapIndex );
|
AddSelectedItemToWorld( (INT16)iMapIndex );
|
||||||
gfFirstPlacement = FALSE;
|
gfFirstPlacement = FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -3319,7 +3321,7 @@ void HandleMouseClicksInGameScreen()
|
|||||||
HandleRightClickOnMerc( iMapIndex );
|
HandleRightClickOnMerc( iMapIndex );
|
||||||
break;
|
break;
|
||||||
case DRAW_MODE_PLACE_ITEM:
|
case DRAW_MODE_PLACE_ITEM:
|
||||||
HandleRightClickOnItem( (UINT16)iMapIndex );
|
HandleRightClickOnItem( (INT16)iMapIndex );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Handle the right clicks in the main window to bring up the appropriate selection window
|
// Handle the right clicks in the main window to bring up the appropriate selection window
|
||||||
@@ -3357,7 +3359,7 @@ void HandleMouseClicksInGameScreen()
|
|||||||
RestoreWalls( iMapIndex );
|
RestoreWalls( iMapIndex );
|
||||||
break;
|
break;
|
||||||
case DRAW_MODE_EXITGRID:
|
case DRAW_MODE_EXITGRID:
|
||||||
if( GetExitGrid( (UINT16)iMapIndex, &gExitGrid ) )
|
if( GetExitGrid( (INT16)iMapIndex, &gExitGrid ) )
|
||||||
ApplyNewExitGridValuesToTextFields();
|
ApplyNewExitGridValuesToTextFields();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -3446,13 +3448,13 @@ void ShowEntryPoints()
|
|||||||
{
|
{
|
||||||
//make entry points visible
|
//make entry points visible
|
||||||
if( gMapInformation.sNorthGridNo != -1 )
|
if( gMapInformation.sNorthGridNo != -1 )
|
||||||
AddTopmostToTail( gMapInformation.sNorthGridNo, FIRSTPOINTERS2 );
|
AddTopmostToTail( gMapInformation.sNorthGridNo, FIRSTPOINTERS2 );
|
||||||
if( gMapInformation.sEastGridNo != -1 )
|
if( gMapInformation.sEastGridNo != -1 )
|
||||||
AddTopmostToTail( gMapInformation.sEastGridNo, FIRSTPOINTERS2 );
|
AddTopmostToTail( gMapInformation.sEastGridNo, FIRSTPOINTERS2 );
|
||||||
if( gMapInformation.sSouthGridNo != -1 )
|
if( gMapInformation.sSouthGridNo != -1 )
|
||||||
AddTopmostToTail( gMapInformation.sSouthGridNo, FIRSTPOINTERS2 );
|
AddTopmostToTail( gMapInformation.sSouthGridNo, FIRSTPOINTERS2 );
|
||||||
if( gMapInformation.sWestGridNo != -1 )
|
if( gMapInformation.sWestGridNo != -1 )
|
||||||
AddTopmostToTail( gMapInformation.sWestGridNo, FIRSTPOINTERS2 );
|
AddTopmostToTail( gMapInformation.sWestGridNo, FIRSTPOINTERS2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void HideEntryPoints()
|
void HideEntryPoints()
|
||||||
@@ -3568,25 +3570,25 @@ void ProcessAreaSelection( BOOLEAN fWithLeftButton )
|
|||||||
}
|
}
|
||||||
|
|
||||||
//For any drawing modes that support large cursors, or even area selection, this function calls the
|
//For any drawing modes that support large cursors, or even area selection, this function calls the
|
||||||
//appropriate paste function for every gridno within the cursor. This is not used for functions that
|
//appropriate paste function for every gridno within the cursor. This is not used for functions that
|
||||||
//rely completely on selection areas, such as buildings.
|
//rely completely on selection areas, such as buildings.
|
||||||
void DrawObjectsBasedOnSelectionRegion()
|
void DrawObjectsBasedOnSelectionRegion()
|
||||||
{
|
{
|
||||||
INT32 x, y, iMapIndex;
|
INT32 x, y, iMapIndex;
|
||||||
BOOLEAN fSkipTest;
|
BOOLEAN fSkipTest;
|
||||||
|
|
||||||
//Certain drawing modes are placed with 100% density. Those cases are checked here,
|
//Certain drawing modes are placed with 100% density. Those cases are checked here,
|
||||||
//so the density test can be skipped.
|
//so the density test can be skipped.
|
||||||
fSkipTest = FALSE;
|
fSkipTest = FALSE;
|
||||||
if( gusSelectionType == SMALLSELECTION ||
|
if( gusSelectionType == SMALLSELECTION ||
|
||||||
iDrawMode == DRAW_MODE_GROUND ||
|
iDrawMode == DRAW_MODE_GROUND ||
|
||||||
iDrawMode == DRAW_MODE_FLOORS ||
|
iDrawMode == DRAW_MODE_FLOORS ||
|
||||||
iDrawMode == DRAW_MODE_ROOMNUM ||
|
iDrawMode == DRAW_MODE_ROOMNUM ||
|
||||||
iDrawMode == DRAW_MODE_EXITGRID )
|
iDrawMode == DRAW_MODE_EXITGRID )
|
||||||
fSkipTest = TRUE;
|
fSkipTest = TRUE;
|
||||||
|
|
||||||
//The reason why I process the region from top to bottom then to the right is
|
//The reason why I process the region from top to bottom then to the right is
|
||||||
//to even out the binary tree undo placements. Otherwise, the placements within
|
//to even out the binary tree undo placements. Otherwise, the placements within
|
||||||
//the undo binary tree would alway choose the right branch because the imapindex is
|
//the undo binary tree would alway choose the right branch because the imapindex is
|
||||||
//always greater than the previously positioned one.
|
//always greater than the previously positioned one.
|
||||||
//Process the cursor area
|
//Process the cursor area
|
||||||
@@ -3603,7 +3605,7 @@ void DrawObjectsBasedOnSelectionRegion()
|
|||||||
case DRAW_MODE_EXITGRID:
|
case DRAW_MODE_EXITGRID:
|
||||||
AddToUndoList( iMapIndex );
|
AddToUndoList( iMapIndex );
|
||||||
AddExitGridToWorld( iMapIndex, &gExitGrid );
|
AddExitGridToWorld( iMapIndex, &gExitGrid );
|
||||||
AddTopmostToTail( (UINT16)iMapIndex, FIRSTPOINTERS8 );
|
AddTopmostToTail( (INT16)iMapIndex, FIRSTPOINTERS8 );
|
||||||
break;
|
break;
|
||||||
case DRAW_MODE_DEBRIS: PasteDebris( iMapIndex ); break;
|
case DRAW_MODE_DEBRIS: PasteDebris( iMapIndex ); break;
|
||||||
case DRAW_MODE_FLOORS: PasteSingleFloor( iMapIndex ); break;
|
case DRAW_MODE_FLOORS: PasteSingleFloor( iMapIndex ); break;
|
||||||
@@ -3611,7 +3613,7 @@ void DrawObjectsBasedOnSelectionRegion()
|
|||||||
case DRAW_MODE_OSTRUCTS: PasteStructure( iMapIndex ); break;
|
case DRAW_MODE_OSTRUCTS: PasteStructure( iMapIndex ); break;
|
||||||
case DRAW_MODE_OSTRUCTS1: PasteStructure1( iMapIndex ); break;
|
case DRAW_MODE_OSTRUCTS1: PasteStructure1( iMapIndex ); break;
|
||||||
case DRAW_MODE_OSTRUCTS2: PasteStructure2( iMapIndex ); break;
|
case DRAW_MODE_OSTRUCTS2: PasteStructure2( iMapIndex ); break;
|
||||||
case DRAW_MODE_ROOMNUM: PasteRoomNumber( iMapIndex, gubCurrRoomNumber ); break;
|
case DRAW_MODE_ROOMNUM: PasteRoomNumber( iMapIndex, gubCurrRoomNumber ); break;
|
||||||
default: return; //no point in continuing...
|
default: return; //no point in continuing...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3622,7 +3624,7 @@ void DrawObjectsBasedOnSelectionRegion()
|
|||||||
extern void AutoLoadMap();
|
extern void AutoLoadMap();
|
||||||
|
|
||||||
//The main loop of the editor.
|
//The main loop of the editor.
|
||||||
UINT32 EditScreenHandle( void )
|
UINT32 EditScreenHandle( void )
|
||||||
{
|
{
|
||||||
UINT32 uiRetVal;
|
UINT32 uiRetVal;
|
||||||
BOOLEAN fShowingCursor;
|
BOOLEAN fShowingCursor;
|
||||||
@@ -3705,7 +3707,7 @@ UINT32 EditScreenHandle( void )
|
|||||||
gfFirstPlacement = TRUE;
|
gfFirstPlacement = TRUE;
|
||||||
|
|
||||||
//If we are copying or moving a building, we process, then delete the building layout immediately
|
//If we are copying or moving a building, we process, then delete the building layout immediately
|
||||||
//after releasing the mouse button. If released in the world, then the building would have been
|
//after releasing the mouse button. If released in the world, then the building would have been
|
||||||
//processed in above function, HandleMouseClicksInGameScreen().
|
//processed in above function, HandleMouseClicksInGameScreen().
|
||||||
if( !_LeftButtonDown && gpBuildingLayoutList )
|
if( !_LeftButtonDown && gpBuildingLayoutList )
|
||||||
DeleteBuildingLayout();
|
DeleteBuildingLayout();
|
||||||
@@ -3762,7 +3764,7 @@ UINT32 EditScreenHandle( void )
|
|||||||
}
|
}
|
||||||
ExecuteVideoOverlays( );
|
ExecuteVideoOverlays( );
|
||||||
|
|
||||||
ScrollString( );
|
ScrollString( );
|
||||||
|
|
||||||
ExecuteBaseDirtyRectQueue();
|
ExecuteBaseDirtyRectQueue();
|
||||||
EndFrameBufferRender( );
|
EndFrameBufferRender( );
|
||||||
@@ -3852,3 +3854,5 @@ UINT32 EditScreenShutdown( )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -36,7 +36,7 @@ void FindTilesetComments(void);
|
|||||||
void GetMasterList(void);
|
void GetMasterList(void);
|
||||||
|
|
||||||
void HandleJA2ToolbarSelection( void );
|
void HandleJA2ToolbarSelection( void );
|
||||||
void HandleKeyboardShortcuts( );
|
void HandleKeyboardShortcuts( );
|
||||||
UINT32 PerformSelectedAction( void );
|
UINT32 PerformSelectedAction( void );
|
||||||
UINT32 WaitForSelectionWindowResponse( void );
|
UINT32 WaitForSelectionWindowResponse( void );
|
||||||
UINT32 WaitForMessageBoxResponse( UINT32 uiCurrentScreen );
|
UINT32 WaitForMessageBoxResponse( UINT32 uiCurrentScreen );
|
||||||
@@ -55,7 +55,7 @@ void MapOptimize(void);
|
|||||||
|
|
||||||
extern UINT16 GenericButtonFillColors[40];
|
extern UINT16 GenericButtonFillColors[40];
|
||||||
|
|
||||||
//These go together. The taskbar has a specific color scheme.
|
//These go together. The taskbar has a specific color scheme.
|
||||||
extern UINT16 gusEditorTaskbarColor;
|
extern UINT16 gusEditorTaskbarColor;
|
||||||
extern UINT16 gusEditorTaskbarHiColor;
|
extern UINT16 gusEditorTaskbarHiColor;
|
||||||
extern UINT16 gusEditorTaskbarLoColor;
|
extern UINT16 gusEditorTaskbarLoColor;
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ void CreateMessageBox( STR16 wzString )
|
|||||||
|
|
||||||
BOOLEAN MessageBoxHandled()
|
BOOLEAN MessageBoxHandled()
|
||||||
{
|
{
|
||||||
InputAtom DummyEvent;
|
InputAtom DummyEvent;
|
||||||
|
|
||||||
while( DequeueEvent( &DummyEvent ) )
|
while( DequeueEvent( &DummyEvent ) )
|
||||||
{
|
{
|
||||||
@@ -165,3 +165,4 @@ void MsgBoxCnclClkCallback( GUI_BUTTON *butn, INT32 reason )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -19,7 +19,7 @@ BOOLEAN MessageBoxHandled();
|
|||||||
void RemoveMessageBox();
|
void RemoveMessageBox();
|
||||||
|
|
||||||
//NOTES:
|
//NOTES:
|
||||||
//Rewrote the damn thing. It is better now because you have less management issues.
|
//Rewrote the damn thing. It is better now because you have less management issues.
|
||||||
//In your screen's main loop, instead of using the previous method, you would use the following syntax:
|
//In your screen's main loop, instead of using the previous method, you would use the following syntax:
|
||||||
//
|
//
|
||||||
// if( gubMessageBoxState )
|
// if( gubMessageBoxState )
|
||||||
@@ -29,9 +29,9 @@ void RemoveMessageBox();
|
|||||||
// return MYCURRENT_SCREEN;
|
// return MYCURRENT_SCREEN;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// UINT32 ProcessMyOwnMessageBoxResultHandlerFunction()
|
// UINT32 ProcessMyOwnMessageBoxResultHandlerFunction()
|
||||||
// {
|
// {
|
||||||
// RemoveMessageBox(); //MUST BE HERE
|
// RemoveMessageBox(); //MUST BE HERE
|
||||||
// if( gfMessageBoxResult ) //user selected yes
|
// if( gfMessageBoxResult ) //user selected yes
|
||||||
// {
|
// {
|
||||||
// ...
|
// ...
|
||||||
|
|||||||
+65
-64
@@ -227,14 +227,14 @@ UINT16 GetCaveTileIndexFromPerimeterValue( UINT8 ubTotal )
|
|||||||
|
|
||||||
// 16 | 1 | 32
|
// 16 | 1 | 32
|
||||||
// ---+---+---
|
// ---+---+---
|
||||||
// 8 | | 2
|
// 8 | | 2
|
||||||
// ---+---+---
|
// ---+---+---
|
||||||
// 128| 4 | 64
|
// 128| 4 | 64
|
||||||
//These values are combined in any possible order ranging in
|
//These values are combined in any possible order ranging in
|
||||||
//values from 0 - 255. If there is a cave existing in any of
|
//values from 0 - 255. If there is a cave existing in any of
|
||||||
//these bordering gridnos, then the corresponding number is added
|
//these bordering gridnos, then the corresponding number is added
|
||||||
//to this total. The lookup table has been precalculated to know
|
//to this total. The lookup table has been precalculated to know
|
||||||
//which piece to use for all of these combinations. In many cases,
|
//which piece to use for all of these combinations. In many cases,
|
||||||
//up to 16 combinations can share the same graphic image, as corners
|
//up to 16 combinations can share the same graphic image, as corners
|
||||||
//may not effect the look of the piece.
|
//may not effect the look of the piece.
|
||||||
UINT8 CalcNewCavePerimeterValue( INT32 iMapIndex )
|
UINT8 CalcNewCavePerimeterValue( INT32 iMapIndex )
|
||||||
@@ -284,21 +284,21 @@ void AddCave( INT32 iMapIndex, UINT16 usIndex )
|
|||||||
INT8 gbWallTileLUT[NUM_WALL_TYPES][7] =
|
INT8 gbWallTileLUT[NUM_WALL_TYPES][7] =
|
||||||
{
|
{
|
||||||
// The number of variants of this tile type.
|
// The number of variants of this tile type.
|
||||||
// | The first relative index of the wall type (FIRSTWALL, SECONDWALL, etc. ) walltype + 10
|
// | The first relative index of the wall type (FIRSTWALL, SECONDWALL, etc. ) walltype + 10
|
||||||
// | | The 2nd relative index ( walltype + 11 )
|
// | | The 2nd relative index ( walltype + 11 )
|
||||||
// | | | 3rd 4th 5th 6th
|
// | | | 3rd 4th 5th 6th
|
||||||
// | | | | | | |
|
// | | | | | | |
|
||||||
6, 10, 11, 12, 27, 28, 29, //INTERIOR_L
|
6, 10, 11, 12, 27, 28, 29, //INTERIOR_L
|
||||||
6, 7, 8, 9, 24, 25, 26, //INTERIOR_R
|
6, 7, 8, 9, 24, 25, 26, //INTERIOR_R
|
||||||
6, 4, 5, 6, 21, 22, 23, //EXTERIOR_L
|
6, 4, 5, 6, 21, 22, 23, //EXTERIOR_L
|
||||||
6, 1, 2, 3, 18, 19, 20, //EXTERIOR_R
|
6, 1, 2, 3, 18, 19, 20, //EXTERIOR_R
|
||||||
1, 14, 0, 0, 0, 0, 0, //INTERIOR_CORNER
|
1, 14, 0, 0, 0, 0, 0, //INTERIOR_CORNER
|
||||||
1, 15, 0, 0, 0, 0, 0, //INTERIOR_BOTTOMEND
|
1, 15, 0, 0, 0, 0, 0, //INTERIOR_BOTTOMEND
|
||||||
1, 13, 0, 0, 0, 0, 0, //EXTERIOR_BOTTOMEND
|
1, 13, 0, 0, 0, 0, 0, //EXTERIOR_BOTTOMEND
|
||||||
1, 16, 0, 0, 0, 0, 0, //INTERIOR_EXTENDED
|
1, 16, 0, 0, 0, 0, 0, //INTERIOR_EXTENDED
|
||||||
1, 57, 0, 0, 0, 0, 0, //EXTERIOR_EXTENDED
|
1, 57, 0, 0, 0, 0, 0, //EXTERIOR_EXTENDED
|
||||||
1, 56, 0, 0, 0, 0, 0, //INTERIOR_EXTENDED_BOTTOMEND
|
1, 56, 0, 0, 0, 0, 0, //INTERIOR_EXTENDED_BOTTOMEND
|
||||||
1, 17, 0, 0, 0, 0, 0, //EXTERIOR_EXTENDED_BOTTOMEND
|
1, 17, 0, 0, 0, 0, 0, //EXTERIOR_EXTENDED_BOTTOMEND
|
||||||
};
|
};
|
||||||
|
|
||||||
//Roof table -- such a small table, using definitions instead.
|
//Roof table -- such a small table, using definitions instead.
|
||||||
@@ -333,8 +333,8 @@ INT8 gbWallTileLUT[NUM_WALL_TYPES][7] =
|
|||||||
//PRIVATELY "ENCAPSULATED" FUNCTIONS
|
//PRIVATELY "ENCAPSULATED" FUNCTIONS
|
||||||
|
|
||||||
//These construction functions do all the smoothing.
|
//These construction functions do all the smoothing.
|
||||||
//NOTE: passing null for wall/roof type will force the function to search for the nearest
|
//NOTE: passing null for wall/roof type will force the function to search for the nearest
|
||||||
// existing respective type.
|
// existing respective type.
|
||||||
void BuildSlantRoof( INT32 iLeft, INT32 iTop, INT32 iRight, INT32 iBottom, UINT16 usWallType, UINT16 usRoofType, BOOLEAN fVertical );
|
void BuildSlantRoof( INT32 iLeft, INT32 iTop, INT32 iRight, INT32 iBottom, UINT16 usWallType, UINT16 usRoofType, BOOLEAN fVertical );
|
||||||
|
|
||||||
void BulldozeNature( UINT32 iMapIndex );
|
void BulldozeNature( UINT32 iMapIndex );
|
||||||
@@ -356,10 +356,10 @@ void BuildSlantRoof( INT32 iLeft, INT32 iTop, INT32 iRight, INT32 iBottom, UINT1
|
|||||||
if( fVertical )
|
if( fVertical )
|
||||||
{
|
{
|
||||||
iMapIndex = iBottom * WORLD_COLS + iLeft;
|
iMapIndex = iBottom * WORLD_COLS + iLeft;
|
||||||
//This happens to be the only mapindex that needs to be backed up. The rest have already been
|
//This happens to be the only mapindex that needs to be backed up. The rest have already been
|
||||||
//done because of the building code before this.
|
//done because of the building code before this.
|
||||||
AddToUndoList( iMapIndex + 8 );
|
AddToUndoList( iMapIndex + 8 );
|
||||||
//Add the closest viewable pieces. There are two aframe walls pieces, and extended aframe roof pieces.
|
//Add the closest viewable pieces. There are two aframe walls pieces, and extended aframe roof pieces.
|
||||||
GetTileIndexFromTypeSubIndex( usWallType, VWALL_LEFT, &usTileIndex );
|
GetTileIndexFromTypeSubIndex( usWallType, VWALL_LEFT, &usTileIndex );
|
||||||
AddRoofToHead( iMapIndex + 4, usTileIndex );
|
AddRoofToHead( iMapIndex + 4, usTileIndex );
|
||||||
GetTileIndexFromTypeSubIndex( usWallType, VWALL_RIGHT, &usTileIndex );
|
GetTileIndexFromTypeSubIndex( usWallType, VWALL_RIGHT, &usTileIndex );
|
||||||
@@ -385,10 +385,10 @@ void BuildSlantRoof( INT32 iLeft, INT32 iTop, INT32 iRight, INT32 iBottom, UINT1
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
iMapIndex = iTop * WORLD_COLS + iRight;
|
iMapIndex = iTop * WORLD_COLS + iRight;
|
||||||
//This happens to be the only mapindex that needs to be backed up. The rest have already been
|
//This happens to be the only mapindex that needs to be backed up. The rest have already been
|
||||||
//done because of the building code before this.
|
//done because of the building code before this.
|
||||||
AddToUndoList( iMapIndex + 8*WORLD_COLS );
|
AddToUndoList( iMapIndex + 8*WORLD_COLS );
|
||||||
//Add the closest viewable pieces. There are two aframe walls pieces, and extended aframe roof pieces.
|
//Add the closest viewable pieces. There are two aframe walls pieces, and extended aframe roof pieces.
|
||||||
GetTileIndexFromTypeSubIndex( usWallType, HWALL_LEFT, &usTileIndex );
|
GetTileIndexFromTypeSubIndex( usWallType, HWALL_LEFT, &usTileIndex );
|
||||||
AddRoofToHead( iMapIndex + 4*WORLD_COLS, usTileIndex );
|
AddRoofToHead( iMapIndex + 4*WORLD_COLS, usTileIndex );
|
||||||
GetTileIndexFromTypeSubIndex( usWallType, HWALL_RIGHT, &usTileIndex );
|
GetTileIndexFromTypeSubIndex( usWallType, HWALL_RIGHT, &usTileIndex );
|
||||||
@@ -429,14 +429,14 @@ UINT16 PickAWallPiece( UINT16 usWallPieceType )
|
|||||||
|
|
||||||
//From a given gridNo and perspective (wallpiece), it will calculate the new piece, and
|
//From a given gridNo and perspective (wallpiece), it will calculate the new piece, and
|
||||||
//where to place it as well as handle the special cases.
|
//where to place it as well as handle the special cases.
|
||||||
//NOTE: Placing top and left pieces are placed relative to the gridno, and the gridNo will
|
//NOTE: Placing top and left pieces are placed relative to the gridno, and the gridNo will
|
||||||
// shift accordingly to place the piece. Pretend you are the floor, and you want to place a piece to
|
// shift accordingly to place the piece. Pretend you are the floor, and you want to place a piece to
|
||||||
// the left. You pass your position, and INTERIOR_LEFT, with interior meaning from the inside of a
|
// the left. You pass your position, and INTERIOR_LEFT, with interior meaning from the inside of a
|
||||||
// building. If you were outside the building, you would call EXTERIOR_LEFT. The left tile will be
|
// building. If you were outside the building, you would call EXTERIOR_LEFT. The left tile will be
|
||||||
// placed on gridNo - 1! Up tiles will be placed on gridNo - 160.
|
// placed on gridNo - 1! Up tiles will be placed on gridNo - 160.
|
||||||
//NOTE: Passing NULL for usWallType will force it to calculate the closest existing wall type, and
|
//NOTE: Passing NULL for usWallType will force it to calculate the closest existing wall type, and
|
||||||
// use that for building this new wall. It is necessary for restructuring a building, but not for
|
// use that for building this new wall. It is necessary for restructuring a building, but not for
|
||||||
// adding on to an existing building, where the type is already known.
|
// adding on to an existing building, where the type is already known.
|
||||||
void BuildWallPiece( UINT32 iMapIndex, UINT8 ubWallPiece, UINT16 usWallType )
|
void BuildWallPiece( UINT32 iMapIndex, UINT8 ubWallPiece, UINT16 usWallType )
|
||||||
{
|
{
|
||||||
INT16 sIndex;
|
INT16 sIndex;
|
||||||
@@ -489,7 +489,7 @@ void BuildWallPiece( UINT32 iMapIndex, UINT8 ubWallPiece, UINT16 usWallType )
|
|||||||
ubWallClass = EXTERIOR_R;
|
ubWallClass = EXTERIOR_R;
|
||||||
iMapIndex--;
|
iMapIndex--;
|
||||||
if( GetHorizontalWall( iMapIndex ) )
|
if( GetHorizontalWall( iMapIndex ) )
|
||||||
{ //Special case where placing the new wall will generate a corner. This piece
|
{ //Special case where placing the new wall will generate a corner. This piece
|
||||||
//becomes an exterior bottomend, but nothing else is effected.
|
//becomes an exterior bottomend, but nothing else is effected.
|
||||||
ubWallClass = EXTERIOR_BOTTOMEND;
|
ubWallClass = EXTERIOR_BOTTOMEND;
|
||||||
}
|
}
|
||||||
@@ -522,7 +522,7 @@ void BuildWallPiece( UINT32 iMapIndex, UINT8 ubWallPiece, UINT16 usWallType )
|
|||||||
AddToUndoList( iMapIndex + WORLD_COLS - 1 );
|
AddToUndoList( iMapIndex + WORLD_COLS - 1 );
|
||||||
GetTileIndexFromTypeSubIndex( usWallType, sIndex, &usTileIndex );
|
GetTileIndexFromTypeSubIndex( usWallType, sIndex, &usTileIndex );
|
||||||
ReplaceStructIndex( iMapIndex + WORLD_COLS - 1, pStruct->usIndex, usTileIndex );
|
ReplaceStructIndex( iMapIndex + WORLD_COLS - 1, pStruct->usIndex, usTileIndex );
|
||||||
//NOTE: Not yet checking for interior extended bottomend!
|
//NOTE: Not yet checking for interior extended bottomend!
|
||||||
}
|
}
|
||||||
if( pStruct = GetVerticalWall( iMapIndex ) )
|
if( pStruct = GetVerticalWall( iMapIndex ) )
|
||||||
{
|
{
|
||||||
@@ -580,7 +580,7 @@ void BuildWallPiece( UINT32 iMapIndex, UINT8 ubWallPiece, UINT16 usWallType )
|
|||||||
case INTERIOR_RIGHT:
|
case INTERIOR_RIGHT:
|
||||||
ubWallClass = EXTERIOR_R;
|
ubWallClass = EXTERIOR_R;
|
||||||
if( GetHorizontalWall( iMapIndex ) )
|
if( GetHorizontalWall( iMapIndex ) )
|
||||||
{ //Special case where placing the new wall will generate a corner. This piece
|
{ //Special case where placing the new wall will generate a corner. This piece
|
||||||
//becomes an exterior bottomend, but nothing else is effected.
|
//becomes an exterior bottomend, but nothing else is effected.
|
||||||
ubWallClass = EXTERIOR_BOTTOMEND;
|
ubWallClass = EXTERIOR_BOTTOMEND;
|
||||||
}
|
}
|
||||||
@@ -592,7 +592,7 @@ void BuildWallPiece( UINT32 iMapIndex, UINT8 ubWallPiece, UINT16 usWallType )
|
|||||||
ubWallClass = EXTERIOR_EXTENDED;
|
ubWallClass = EXTERIOR_EXTENDED;
|
||||||
}
|
}
|
||||||
if( !gfBasement && GetHorizontalWall( iMapIndex + 1 ) && !GetHorizontalWall( iMapIndex )
|
if( !gfBasement && GetHorizontalWall( iMapIndex + 1 ) && !GetHorizontalWall( iMapIndex )
|
||||||
&& !FloorAtGridNo( iMapIndex + WORLD_COLS ) )
|
&& !FloorAtGridNo( iMapIndex + WORLD_COLS ) )
|
||||||
{
|
{
|
||||||
GetTileIndexFromTypeSubIndex( usWallType, INTERIOR_BOTTOMEND_SHADOW_INDEX, &usTileIndex );
|
GetTileIndexFromTypeSubIndex( usWallType, INTERIOR_BOTTOMEND_SHADOW_INDEX, &usTileIndex );
|
||||||
AddExclusiveShadow( iMapIndex, usTileIndex );
|
AddExclusiveShadow( iMapIndex, usTileIndex );
|
||||||
@@ -618,9 +618,9 @@ void RebuildRoofUsingFloorInfo( INT32 iMapIndex, UINT16 usRoofType )
|
|||||||
usRoofType = SearchForRoofType( iMapIndex );
|
usRoofType = SearchForRoofType( iMapIndex );
|
||||||
}
|
}
|
||||||
if( usRoofType == 0xffff )
|
if( usRoofType == 0xffff )
|
||||||
return; //no roof type around, so don't draw one.
|
return; //no roof type around, so don't draw one.
|
||||||
//Analyse the mapindex for walls and set the flags.
|
//Analyse the mapindex for walls and set the flags.
|
||||||
//NOTE: There is no support for more than 2 side on a roof, so if there is, draw TOPLEFT
|
//NOTE: There is no support for more than 2 side on a roof, so if there is, draw TOPLEFT
|
||||||
AddToUndoList( iMapIndex );
|
AddToUndoList( iMapIndex );
|
||||||
EraseRoof( iMapIndex );
|
EraseRoof( iMapIndex );
|
||||||
|
|
||||||
@@ -648,8 +648,8 @@ void RebuildRoofUsingFloorInfo( INT32 iMapIndex, UINT16 usRoofType )
|
|||||||
|
|
||||||
//Given a gridno, it will erase the current roof, and calculate the new roof piece based on the
|
//Given a gridno, it will erase the current roof, and calculate the new roof piece based on the
|
||||||
//wall orientions giving priority to the top and left walls before anything else.
|
//wall orientions giving priority to the top and left walls before anything else.
|
||||||
//NOTE: passing NULL for usRoofType will force the function to calculate the nearest roof type,
|
//NOTE: passing NULL for usRoofType will force the function to calculate the nearest roof type,
|
||||||
// and use that for the new roof. This is needed when erasing parts of multiple buildings simultaneously.
|
// and use that for the new roof. This is needed when erasing parts of multiple buildings simultaneously.
|
||||||
void RebuildRoof( UINT32 iMapIndex, UINT16 usRoofType )
|
void RebuildRoof( UINT32 iMapIndex, UINT16 usRoofType )
|
||||||
{
|
{
|
||||||
UINT16 usRoofIndex, usTileIndex;
|
UINT16 usRoofIndex, usTileIndex;
|
||||||
@@ -659,9 +659,9 @@ void RebuildRoof( UINT32 iMapIndex, UINT16 usRoofType )
|
|||||||
usRoofType = SearchForRoofType( iMapIndex );
|
usRoofType = SearchForRoofType( iMapIndex );
|
||||||
}
|
}
|
||||||
if( usRoofType == 0xffff )
|
if( usRoofType == 0xffff )
|
||||||
return; //no roof type around, so don't draw one.
|
return; //no roof type around, so don't draw one.
|
||||||
//Analyse the mapindex for walls and set the flags.
|
//Analyse the mapindex for walls and set the flags.
|
||||||
//NOTE: There is no support for more than 2 side on a roof, so if there is, draw TOPLEFT
|
//NOTE: There is no support for more than 2 side on a roof, so if there is, draw TOPLEFT
|
||||||
AddToUndoList( iMapIndex );
|
AddToUndoList( iMapIndex );
|
||||||
EraseRoof( iMapIndex );
|
EraseRoof( iMapIndex );
|
||||||
|
|
||||||
@@ -755,7 +755,7 @@ void EraseFloorOwnedBuildingPieces( UINT32 iMapIndex )
|
|||||||
{
|
{
|
||||||
GetTileType( pStruct->usIndex, &uiTileType );
|
GetTileType( pStruct->usIndex, &uiTileType );
|
||||||
if ( uiTileType >= FIRSTWALL && uiTileType <= LASTWALL ||
|
if ( uiTileType >= FIRSTWALL && uiTileType <= LASTWALL ||
|
||||||
uiTileType >= FIRSTDOOR && uiTileType <= LASTDOOR )
|
uiTileType >= FIRSTDOOR && uiTileType <= LASTDOOR )
|
||||||
{
|
{
|
||||||
GetWallOrientation( pStruct->usIndex, &usWallOrientation );
|
GetWallOrientation( pStruct->usIndex, &usWallOrientation );
|
||||||
if( usWallOrientation == INSIDE_TOP_RIGHT || usWallOrientation == OUTSIDE_TOP_RIGHT )
|
if( usWallOrientation == INSIDE_TOP_RIGHT || usWallOrientation == OUTSIDE_TOP_RIGHT )
|
||||||
@@ -777,7 +777,7 @@ void EraseFloorOwnedBuildingPieces( UINT32 iMapIndex )
|
|||||||
{
|
{
|
||||||
GetTileType( pStruct->usIndex, &uiTileType );
|
GetTileType( pStruct->usIndex, &uiTileType );
|
||||||
if ( uiTileType >= FIRSTWALL && uiTileType <= LASTWALL ||
|
if ( uiTileType >= FIRSTWALL && uiTileType <= LASTWALL ||
|
||||||
uiTileType >= FIRSTDOOR && uiTileType <= LASTDOOR )
|
uiTileType >= FIRSTDOOR && uiTileType <= LASTDOOR )
|
||||||
{
|
{
|
||||||
GetWallOrientation( pStruct->usIndex, &usWallOrientation );
|
GetWallOrientation( pStruct->usIndex, &usWallOrientation );
|
||||||
if( usWallOrientation == INSIDE_TOP_LEFT || usWallOrientation == OUTSIDE_TOP_LEFT )
|
if( usWallOrientation == INSIDE_TOP_LEFT || usWallOrientation == OUTSIDE_TOP_LEFT )
|
||||||
@@ -810,20 +810,20 @@ void RemoveCaveSectionFromWorld( SGPRect *pSelectRegion )
|
|||||||
left = pSelectRegion->iLeft;
|
left = pSelectRegion->iLeft;
|
||||||
right = pSelectRegion->iRight;
|
right = pSelectRegion->iRight;
|
||||||
bottom = pSelectRegion->iBottom;
|
bottom = pSelectRegion->iBottom;
|
||||||
//Pass 1: Remove all pieces in area
|
//Pass 1: Remove all pieces in area
|
||||||
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
||||||
{
|
{
|
||||||
iMapIndex = y * WORLD_COLS + x;
|
iMapIndex = y * WORLD_COLS + x;
|
||||||
AddToUndoList( iMapIndex );
|
AddToUndoList( iMapIndex );
|
||||||
RemoveAllStructsOfTypeRange( iMapIndex, FIRSTWALL, LASTWALL );
|
RemoveAllStructsOfTypeRange( iMapIndex, FIRSTWALL, LASTWALL );
|
||||||
}
|
}
|
||||||
//Past 2: Go around outside perimeter and smooth each piece
|
//Past 2: Go around outside perimeter and smooth each piece
|
||||||
for( y = top - 1; y <= bottom + 1; y++ ) for( x = left - 1; x <= right + 1; x++ )
|
for( y = top - 1; y <= bottom + 1; y++ ) for( x = left - 1; x <= right + 1; x++ )
|
||||||
{
|
{
|
||||||
iMapIndex = y * WORLD_COLS + x;
|
iMapIndex = y * WORLD_COLS + x;
|
||||||
if( CaveAtGridNo( iMapIndex ) )
|
if( CaveAtGridNo( iMapIndex ) )
|
||||||
{
|
{
|
||||||
ubPerimeterValue = CalcNewCavePerimeterValue( iMapIndex );
|
ubPerimeterValue = CalcNewCavePerimeterValue( iMapIndex );
|
||||||
usIndex = GetCaveTileIndexFromPerimeterValue( ubPerimeterValue );
|
usIndex = GetCaveTileIndexFromPerimeterValue( ubPerimeterValue );
|
||||||
AddToUndoList( iMapIndex );
|
AddToUndoList( iMapIndex );
|
||||||
if( usIndex != 0xffff )
|
if( usIndex != 0xffff )
|
||||||
@@ -846,7 +846,7 @@ void AddCaveSectionToWorld( SGPRect *pSelectRegion )
|
|||||||
left = pSelectRegion->iLeft;
|
left = pSelectRegion->iLeft;
|
||||||
right = pSelectRegion->iRight;
|
right = pSelectRegion->iRight;
|
||||||
bottom = pSelectRegion->iBottom;
|
bottom = pSelectRegion->iBottom;
|
||||||
//Pass 1: Add bogus piece to each gridno in region
|
//Pass 1: Add bogus piece to each gridno in region
|
||||||
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
||||||
{
|
{
|
||||||
uiMapIndex = y * WORLD_COLS + x;
|
uiMapIndex = y * WORLD_COLS + x;
|
||||||
@@ -857,7 +857,7 @@ void AddCaveSectionToWorld( SGPRect *pSelectRegion )
|
|||||||
AddCave( uiMapIndex, usIndex );
|
AddCave( uiMapIndex, usIndex );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Past 2: Go around outside perimeter and smooth each piece
|
//Past 2: Go around outside perimeter and smooth each piece
|
||||||
for( y = top - 1; y <= bottom + 1; y++ ) for( x = left - 1; x <= right + 1; x++ )
|
for( y = top - 1; y <= bottom + 1; y++ ) for( x = left - 1; x <= right + 1; x++ )
|
||||||
{
|
{
|
||||||
uiMapIndex = y * WORLD_COLS + x;
|
uiMapIndex = y * WORLD_COLS + x;
|
||||||
@@ -905,17 +905,17 @@ void RemoveBuildingSectionFromWorld( SGPRect *pSelectRegion )
|
|||||||
right = pSelectRegion->iRight;
|
right = pSelectRegion->iRight;
|
||||||
bottom = pSelectRegion->iBottom;
|
bottom = pSelectRegion->iBottom;
|
||||||
|
|
||||||
//1ST PASS: Erase all building owned by the floor tile if there is one.
|
//1ST PASS: Erase all building owned by the floor tile if there is one.
|
||||||
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
||||||
{
|
{
|
||||||
iMapIndex = y * WORLD_COLS + x;
|
iMapIndex = y * WORLD_COLS + x;
|
||||||
EraseFloorOwnedBuildingPieces( iMapIndex ); //Erase possible top and left walls in bordering tiles.
|
EraseFloorOwnedBuildingPieces( iMapIndex ); //Erase possible top and left walls in bordering tiles.
|
||||||
}
|
}
|
||||||
//2ND PASS: Build new walls whereever there are neighboring floor tiles.
|
//2ND PASS: Build new walls whereever there are neighboring floor tiles.
|
||||||
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
||||||
{
|
{
|
||||||
iMapIndex = y * WORLD_COLS + x;
|
iMapIndex = y * WORLD_COLS + x;
|
||||||
//NOTE: Top and bottom walls MUST be placed first -- it minimizes the number of special cases.
|
//NOTE: Top and bottom walls MUST be placed first -- it minimizes the number of special cases.
|
||||||
if( y == top )
|
if( y == top )
|
||||||
{
|
{
|
||||||
fFloor = FloorAtGridNo( iMapIndex - WORLD_COLS );
|
fFloor = FloorAtGridNo( iMapIndex - WORLD_COLS );
|
||||||
@@ -941,7 +941,7 @@ void RemoveBuildingSectionFromWorld( SGPRect *pSelectRegion )
|
|||||||
BuildWallPiece( iMapIndex, EXTERIOR_RIGHT, 0 );
|
BuildWallPiece( iMapIndex, EXTERIOR_RIGHT, 0 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//3RD PASS: Go around the outside of the region, and rebuild the roof.
|
//3RD PASS: Go around the outside of the region, and rebuild the roof.
|
||||||
if( gfBasement )
|
if( gfBasement )
|
||||||
{
|
{
|
||||||
usFloorType = GetRandomIndexByRange( FIRSTFLOOR, LASTFLOOR );
|
usFloorType = GetRandomIndexByRange( FIRSTFLOOR, LASTFLOOR );
|
||||||
@@ -1002,10 +1002,10 @@ void AddBuildingSectionToWorld( SGPRect *pSelectRegion )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//1ST PASS: Determine if there are any floor tiles in this region. If there are, then
|
//1ST PASS: Determine if there are any floor tiles in this region. If there are, then
|
||||||
// that signifies that we are concantenating this building to an existing one. Otherwise,
|
// that signifies that we are concantenating this building to an existing one. Otherwise,
|
||||||
// we are just drawing an individual building. If we find a floor, extract the type so
|
// we are just drawing an individual building. If we find a floor, extract the type so
|
||||||
// we know how to draw it later.
|
// we know how to draw it later.
|
||||||
fNewBuilding = TRUE;
|
fNewBuilding = TRUE;
|
||||||
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
||||||
{
|
{
|
||||||
@@ -1016,7 +1016,7 @@ void AddBuildingSectionToWorld( SGPRect *pSelectRegion )
|
|||||||
UINT32 uiTileType;
|
UINT32 uiTileType;
|
||||||
//If a floor is found, then we are adding to an existing structure.
|
//If a floor is found, then we are adding to an existing structure.
|
||||||
fNewBuilding = FALSE;
|
fNewBuilding = FALSE;
|
||||||
//Extract the floor type. We already checked if there was a floor here, so it is assumed.
|
//Extract the floor type. We already checked if there was a floor here, so it is assumed.
|
||||||
pFloor = gpWorldLevelData[ iMapIndex ].pLandHead;
|
pFloor = gpWorldLevelData[ iMapIndex ].pLandHead;
|
||||||
while( pFloor )
|
while( pFloor )
|
||||||
{
|
{
|
||||||
@@ -1060,11 +1060,11 @@ void AddBuildingSectionToWorld( SGPRect *pSelectRegion )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//2ND PASS: Remove all walls in the region that border no floor tile, or simply walls
|
//2ND PASS: Remove all walls in the region that border no floor tile, or simply walls
|
||||||
// that are considered exterior walls. That way, it won't wreck the inside of a building
|
// that are considered exterior walls. That way, it won't wreck the inside of a building
|
||||||
// if you select too much interior. Also, gridnos that delete walls will also delete the
|
// if you select too much interior. Also, gridnos that delete walls will also delete the
|
||||||
// floor and roof tiles there. That signifies that the floorless parts will be resmoothed,
|
// floor and roof tiles there. That signifies that the floorless parts will be resmoothed,
|
||||||
// and rebuilt in the third pass.
|
// and rebuilt in the third pass.
|
||||||
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
||||||
{
|
{
|
||||||
iMapIndex = y * WORLD_COLS + x;
|
iMapIndex = y * WORLD_COLS + x;
|
||||||
@@ -1104,7 +1104,7 @@ void AddBuildingSectionToWorld( SGPRect *pSelectRegion )
|
|||||||
BulldozeNature( iMapIndex );
|
BulldozeNature( iMapIndex );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//3RD PASS: Process the region, and all walls of floorless tiles are rebuilt from interior perspective.
|
//3RD PASS: Process the region, and all walls of floorless tiles are rebuilt from interior perspective.
|
||||||
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
||||||
{
|
{
|
||||||
iMapIndex = y * WORLD_COLS + x;
|
iMapIndex = y * WORLD_COLS + x;
|
||||||
@@ -1145,7 +1145,7 @@ void AddBuildingSectionToWorld( SGPRect *pSelectRegion )
|
|||||||
BuildSlantRoof( left, top, right, bottom, usWallType, usRoofType, fVertical );
|
BuildSlantRoof( left, top, right, bottom, usWallType, usRoofType, fVertical );
|
||||||
}
|
}
|
||||||
|
|
||||||
//4TH PASS: Process the region, and all floorless tiles get new roofs and floors.
|
//4TH PASS: Process the region, and all floorless tiles get new roofs and floors.
|
||||||
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
for( y = top; y <= bottom; y++ ) for( x = left; x <= right; x++ )
|
||||||
{
|
{
|
||||||
iMapIndex = y * WORLD_COLS + x;
|
iMapIndex = y * WORLD_COLS + x;
|
||||||
@@ -1197,3 +1197,4 @@ void AnalyseCaveMapForStructureInfo()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -500,3 +500,4 @@ BOOLEAN ProcessPopupMenuIfActive( )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+17
-17
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
//popupmenu.h
|
//popupmenu.h
|
||||||
//Author: Kris Morness
|
//Author: Kris Morness
|
||||||
//Created: Sept 4, 1997
|
//Created: Sept 4, 1997
|
||||||
|
|
||||||
#ifndef __POPUPMENU_H
|
#ifndef __POPUPMENU_H
|
||||||
#define __POPUPMENU_H
|
#define __POPUPMENU_H
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
POPUP MENU
|
POPUP MENU
|
||||||
|
|
||||||
DESIGN CONSIDERATIONS
|
DESIGN CONSIDERATIONS
|
||||||
There is currently no support for nested popup menus. Let Kris know if
|
There is currently no support for nested popup menus. Let Kris know if
|
||||||
you need this.
|
you need this.
|
||||||
|
|
||||||
USER INSTRUCTIONS
|
USER INSTRUCTIONS
|
||||||
@@ -22,20 +22,20 @@ As soon as you click on a button which activates the popup menu, the user
|
|||||||
will choose a selection in one of three ways:
|
will choose a selection in one of three ways:
|
||||||
|
|
||||||
1) KEYBOARD - at anytime, the user can use the keyboard regardless of mouse
|
1) KEYBOARD - at anytime, the user can use the keyboard regardless of mouse
|
||||||
mode. The up/down arrow keys will cycle through the choices and enter will
|
mode. The up/down arrow keys will cycle through the choices and enter will
|
||||||
accept the choice. ESC will cancel the menu without making a choice.
|
accept the choice. ESC will cancel the menu without making a choice.
|
||||||
2) When the mousedown event activates the menu, the user releases the mouse before
|
2) When the mousedown event activates the menu, the user releases the mouse before
|
||||||
entering the popup menu region. The menu mode will change and become persistant.
|
entering the popup menu region. The menu mode will change and become persistant.
|
||||||
Clicking on the hilighted item will close the popup and activate the choice.
|
Clicking on the hilighted item will close the popup and activate the choice.
|
||||||
Clicking elsewhere, the popup will be closed without making a selection. This
|
Clicking elsewhere, the popup will be closed without making a selection. This
|
||||||
is functionally equivalent to Win95.
|
is functionally equivalent to Win95.
|
||||||
3) When the mousedown event activates the menu, the user holds the mouse down and
|
3) When the mousedown event activates the menu, the user holds the mouse down and
|
||||||
moves the cursor over the popup region. At this moment the menu becomes
|
moves the cursor over the popup region. At this moment the menu becomes
|
||||||
non-persistant and a choice is made by releasing the mouse. If the mouse is
|
non-persistant and a choice is made by releasing the mouse. If the mouse is
|
||||||
released on a highlighted choice, that choice is selected, otherwise the popup
|
released on a highlighted choice, that choice is selected, otherwise the popup
|
||||||
is cancelled. This is functionally equivalent to MacOS. The small diffence is
|
is cancelled. This is functionally equivalent to MacOS. The small diffence is
|
||||||
that under Win95's standard convention, the release of the mouse outside of the
|
that under Win95's standard convention, the release of the mouse outside of the
|
||||||
region doesn't kill the menu, but in MacOS, it does.
|
region doesn't kill the menu, but in MacOS, it does.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ enum popupMenuIDs
|
|||||||
};
|
};
|
||||||
|
|
||||||
//The direction of the popup menu relative to the button
|
//The direction of the popup menu relative to the button
|
||||||
//pressed to activate it or mouse position. In editor mode,
|
//pressed to activate it or mouse position. In editor mode,
|
||||||
//this will attempt to go up and to the right of the button.
|
//this will attempt to go up and to the right of the button.
|
||||||
#define UPMASK 0x00
|
#define UPMASK 0x00
|
||||||
#define DNMASK 0x10
|
#define DNMASK 0x10
|
||||||
@@ -79,7 +79,7 @@ typedef struct currentPopupMenuInformation{
|
|||||||
UINT16 usFont;
|
UINT16 usFont;
|
||||||
BOOLEAN fActive;
|
BOOLEAN fActive;
|
||||||
BOOLEAN fUseKeyboardInfoUntilMouseMoves;
|
BOOLEAN fUseKeyboardInfoUntilMouseMoves;
|
||||||
UINT16 usLeft, usTop, usRight, usBottom; //popup region coords.
|
UINT16 usLeft, usTop, usRight, usBottom; //popup region coords.
|
||||||
UINT16 usLastMouseX, usLastMouseY;
|
UINT16 usLastMouseX, usLastMouseY;
|
||||||
}CurrentPopupMenuInformation;
|
}CurrentPopupMenuInformation;
|
||||||
|
|
||||||
|
|||||||
+30
-30
@@ -49,17 +49,17 @@ SGPPoint SelWinSpacing, SelWinStartPoint, SelWinEndPoint;
|
|||||||
|
|
||||||
//These definitions help define the start and end of the various wall indices.
|
//These definitions help define the start and end of the various wall indices.
|
||||||
//This needs to be maintained if the walls change.
|
//This needs to be maintained if the walls change.
|
||||||
#define WALL_LAST_WALL_OFFSET 30
|
#define WALL_LAST_WALL_OFFSET 30
|
||||||
#define WALL_FIRST_AFRAME_OFFSET 31
|
#define WALL_FIRST_AFRAME_OFFSET 31
|
||||||
#define WALL_LAST_AFRAME_OFFSET 34
|
#define WALL_LAST_AFRAME_OFFSET 34
|
||||||
#define WALL_FIRST_WINDOW_OFFSET 35
|
#define WALL_FIRST_WINDOW_OFFSET 35
|
||||||
#define WALL_LAST_WINDOW_OFFSET 46
|
#define WALL_LAST_WINDOW_OFFSET 46
|
||||||
#define WALL_FIRST_BROKEN_WALL_OFFSET 47
|
#define WALL_FIRST_BROKEN_WALL_OFFSET 47
|
||||||
#define WALL_LAST_BROKEN_WALL_OFFSET 54
|
#define WALL_LAST_BROKEN_WALL_OFFSET 54
|
||||||
#define WALL_FIRST_APPENDED_WALL_OFFSET 55
|
#define WALL_FIRST_APPENDED_WALL_OFFSET 55
|
||||||
#define WALL_LAST_APPENDED_WALL_OFFSET 56
|
#define WALL_LAST_APPENDED_WALL_OFFSET 56
|
||||||
#define WALL_FIRST_WEATHERED_WALL_OFFSET 57
|
#define WALL_FIRST_WEATHERED_WALL_OFFSET 57
|
||||||
#define WALL_LAST_WEATHERED_WALL_OFFSET 64
|
#define WALL_LAST_WEATHERED_WALL_OFFSET 64
|
||||||
|
|
||||||
//I've added these definitions to add readability, and minimize conversion time for changes
|
//I've added these definitions to add readability, and minimize conversion time for changes
|
||||||
//incase there are new values, etc.
|
//incase there are new values, etc.
|
||||||
@@ -87,8 +87,8 @@ SGPPoint SelWinSpacing, SelWinStartPoint, SelWinEndPoint;
|
|||||||
(LASTROOF-FIRSTROOF+1) + (2 ))
|
(LASTROOF-FIRSTROOF+1) + (2 ))
|
||||||
|
|
||||||
|
|
||||||
//This is a special case for trees which may have varying numbers. There was a problem
|
//This is a special case for trees which may have varying numbers. There was a problem
|
||||||
//in which we loaded a new tileset which had one less tree in it. When we called BuildSelectionWindow(),
|
//in which we loaded a new tileset which had one less tree in it. When we called BuildSelectionWindow(),
|
||||||
//it would crash because it thought there was an extra tree which was now invalid.
|
//it would crash because it thought there was an extra tree which was now invalid.
|
||||||
UINT16 gusNumOStructs = 0;
|
UINT16 gusNumOStructs = 0;
|
||||||
|
|
||||||
@@ -111,8 +111,8 @@ DisplaySpec SingleFloor[ SINGLEFLOOR_NUMELEMENTS ];
|
|||||||
DisplaySpec SingleToilet[ SINGLETOILET_NUMELEMENTS ];
|
DisplaySpec SingleToilet[ SINGLETOILET_NUMELEMENTS ];
|
||||||
DisplaySpec Room[ ROOM_NUMELEMENTS ];
|
DisplaySpec Room[ ROOM_NUMELEMENTS ];
|
||||||
|
|
||||||
//These are all of the different selection lists. Changing the max_selections will
|
//These are all of the different selection lists. Changing the max_selections will
|
||||||
//change the number of selections values you can have at a time. This is Bret's gay code,
|
//change the number of selections values you can have at a time. This is Bret's gay code,
|
||||||
//though I've cleaned it up a lot.
|
//though I've cleaned it up a lot.
|
||||||
Selections SelOStructs[MAX_SELECTIONS] = { {FIRSTFULLSTRUCT, 0, 1} }; // Default selections
|
Selections SelOStructs[MAX_SELECTIONS] = { {FIRSTFULLSTRUCT, 0, 1} }; // Default selections
|
||||||
Selections SelOStructs1[MAX_SELECTIONS] = { {FOURTHOSTRUCT, 0, 1} }; // Default selections
|
Selections SelOStructs1[MAX_SELECTIONS] = { {FOURTHOSTRUCT, 0, 1} }; // Default selections
|
||||||
@@ -123,13 +123,13 @@ Selections SelDebris[MAX_SELECTIONS] = { {DEBRISROCKS, 0, 1} };
|
|||||||
Selections SelSingleWall[MAX_SELECTIONS] = { {FIRSTWALL, 0, 1} };
|
Selections SelSingleWall[MAX_SELECTIONS] = { {FIRSTWALL, 0, 1} };
|
||||||
Selections SelSingleDoor[MAX_SELECTIONS] = { {FIRSTDOOR, 0, 1} };
|
Selections SelSingleDoor[MAX_SELECTIONS] = { {FIRSTDOOR, 0, 1} };
|
||||||
Selections SelSingleWindow[MAX_SELECTIONS] = { {FIRSTWALL, 44, 1} };
|
Selections SelSingleWindow[MAX_SELECTIONS] = { {FIRSTWALL, 44, 1} };
|
||||||
Selections SelSingleRoof[MAX_SELECTIONS] = { {FIRSTROOF, 0, 1} };
|
Selections SelSingleRoof[MAX_SELECTIONS] = { {FIRSTROOF, 0, 1} };
|
||||||
Selections SelSingleNewRoof[MAX_SELECTIONS] = { {FIRSTROOF, 0, 1} };
|
Selections SelSingleNewRoof[MAX_SELECTIONS] = { {FIRSTROOF, 0, 1} };
|
||||||
Selections SelSingleBrokenWall[MAX_SELECTIONS] = { {FIRSTDECORATIONS, 0, 1} };
|
Selections SelSingleBrokenWall[MAX_SELECTIONS] = { {FIRSTDECORATIONS, 0, 1} };
|
||||||
Selections SelSingleDecor[MAX_SELECTIONS]= { {FIRSTISTRUCT, 0, 1} };
|
Selections SelSingleDecor[MAX_SELECTIONS]= { {FIRSTISTRUCT, 0, 1} };
|
||||||
Selections SelSingleDecal[MAX_SELECTIONS] = { {FIRSTWALLDECAL, 0, 1} };
|
Selections SelSingleDecal[MAX_SELECTIONS] = { {FIRSTWALLDECAL, 0, 1} };
|
||||||
Selections SelSingleFloor[MAX_SELECTIONS] = { {FIRSTFLOOR, 0, 1} };
|
Selections SelSingleFloor[MAX_SELECTIONS] = { {FIRSTFLOOR, 0, 1} };
|
||||||
Selections SelSingleToilet[MAX_SELECTIONS] = { {FIFTHISTRUCT, 0, 1} };
|
Selections SelSingleToilet[MAX_SELECTIONS] = { {FIFTHISTRUCT, 0, 1} };
|
||||||
Selections SelRoom[MAX_SELECTIONS] = { {FIRSTWALL, 0, 1} };
|
Selections SelRoom[MAX_SELECTIONS] = { {FIRSTWALL, 0, 1} };
|
||||||
|
|
||||||
// Number of objects currently in the selection list
|
// Number of objects currently in the selection list
|
||||||
@@ -147,7 +147,7 @@ INT32 iNumDecorSelected = 1;
|
|||||||
INT32 iNumDecalsSelected = 1;
|
INT32 iNumDecalsSelected = 1;
|
||||||
INT32 iNumBrokenWallsSelected = 1;
|
INT32 iNumBrokenWallsSelected = 1;
|
||||||
INT32 iNumFloorsSelected = 1;
|
INT32 iNumFloorsSelected = 1;
|
||||||
INT32 iNumToiletsSelected = 1;
|
INT32 iNumToiletsSelected = 1;
|
||||||
INT32 iNumRoofsSelected = 1;
|
INT32 iNumRoofsSelected = 1;
|
||||||
INT32 iNumNewRoofsSelected = 1;
|
INT32 iNumNewRoofsSelected = 1;
|
||||||
INT32 iNumRoomsSelected = 1;
|
INT32 iNumRoomsSelected = 1;
|
||||||
@@ -157,7 +157,7 @@ Selections OldSelList[MAX_SELECTIONS];
|
|||||||
INT32 iOldNumSelList;
|
INT32 iOldNumSelList;
|
||||||
|
|
||||||
// Global pointers for selection list
|
// Global pointers for selection list
|
||||||
Selections *pSelList;
|
Selections *pSelList;
|
||||||
INT32 *pNumSelList;
|
INT32 *pNumSelList;
|
||||||
|
|
||||||
// Global used to indicate which selection to use (changes with the PGUP/PGDWN keys in editor)
|
// Global used to indicate which selection to use (changes with the PGUP/PGDWN keys in editor)
|
||||||
@@ -357,9 +357,9 @@ void CreateJA2SelectionWindow( INT16 sWhat )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//The selection window method is initialized here. This is where all the graphics for all
|
//The selection window method is initialized here. This is where all the graphics for all
|
||||||
//the categories are organized and loaded. If you wish to move things around, then this is
|
//the categories are organized and loaded. If you wish to move things around, then this is
|
||||||
//where the initialization part is done. I have also changed this from previously being loaded
|
//where the initialization part is done. I have also changed this from previously being loaded
|
||||||
//every single time you go into a selection window which was redundant and CPU consuming.
|
//every single time you go into a selection window which was redundant and CPU consuming.
|
||||||
void InitJA2SelectionWindow( void )
|
void InitJA2SelectionWindow( void )
|
||||||
{
|
{
|
||||||
@@ -867,7 +867,7 @@ void RenderSelectionWindow( void )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if ( (abs( iStartClickX - button->Area.MouseXPos ) > 9) ||
|
if ( (abs( iStartClickX - button->Area.MouseXPos ) > 9) ||
|
||||||
(abs( iStartClickY - (button->Area.MouseYPos + iTopWinCutOff - (INT16)SelWinStartPoint.iY)) > 9) )
|
(abs( iStartClickY - (button->Area.MouseYPos + iTopWinCutOff - (INT16)SelWinStartPoint.iY)) > 9) )
|
||||||
{
|
{
|
||||||
// iSX = (INT32)iStartClickX;
|
// iSX = (INT32)iStartClickX;
|
||||||
// iEX = (INT32)button->Area.MouseXPos;
|
// iEX = (INT32)button->Area.MouseXPos;
|
||||||
@@ -1079,7 +1079,7 @@ void DisplaySelectionWindowGraphicalInformation()
|
|||||||
pNode->uiIndex, gTileSurfaceName[ pNode->uiObjIndx ] );
|
pNode->uiIndex, gTileSurfaceName[ pNode->uiObjIndx ] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mprintf( 350, 2, L"Current Tileset: %s", gTilesets[ giCurrentTilesetID ].zName );
|
mprintf( 350, 2, L"Current Tileset: %s", gTilesets[ giCurrentTilesetID ].zName );
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------
|
||||||
@@ -1095,7 +1095,7 @@ void AddToSelectionList( DisplayList *pNode )
|
|||||||
for (iIndex = 0; iIndex < (*pNumSelList); iIndex++ )
|
for (iIndex = 0; iIndex < (*pNumSelList); iIndex++ )
|
||||||
{
|
{
|
||||||
if ( pNode->uiObjIndx == pSelList[ iIndex ].uiObject &&
|
if ( pNode->uiObjIndx == pSelList[ iIndex ].uiObject &&
|
||||||
pNode->uiIndex == pSelList[ iIndex ].usIndex )
|
pNode->uiIndex == pSelList[ iIndex ].usIndex )
|
||||||
{
|
{
|
||||||
iUseIndex = iIndex;
|
iUseIndex = iIndex;
|
||||||
break;
|
break;
|
||||||
@@ -1171,7 +1171,7 @@ BOOLEAN RemoveFromSelectionList( DisplayList *pNode )
|
|||||||
for (iIndex = 0; iIndex < (*pNumSelList); iIndex++ )
|
for (iIndex = 0; iIndex < (*pNumSelList); iIndex++ )
|
||||||
{
|
{
|
||||||
if ( pNode->uiObjIndx == pSelList[ iIndex ].uiObject &&
|
if ( pNode->uiObjIndx == pSelList[ iIndex ].uiObject &&
|
||||||
pNode->uiIndex == pSelList[ iIndex ].usIndex )
|
pNode->uiIndex == pSelList[ iIndex ].usIndex )
|
||||||
{
|
{
|
||||||
iUseIndex = iIndex;
|
iUseIndex = iIndex;
|
||||||
break;
|
break;
|
||||||
@@ -1248,7 +1248,7 @@ BOOLEAN IsInSelectionList( DisplayList *pNode )
|
|||||||
for (iIndex = 0; iIndex < (*pNumSelList) && !fFound; iIndex++ )
|
for (iIndex = 0; iIndex < (*pNumSelList) && !fFound; iIndex++ )
|
||||||
{
|
{
|
||||||
if ( pNode->uiObjIndx == pSelList[ iIndex ].uiObject &&
|
if ( pNode->uiObjIndx == pSelList[ iIndex ].uiObject &&
|
||||||
pNode->uiIndex == pSelList[ iIndex ].usIndex )
|
pNode->uiIndex == pSelList[ iIndex ].usIndex )
|
||||||
{
|
{
|
||||||
fFound = TRUE;
|
fFound = TRUE;
|
||||||
}
|
}
|
||||||
@@ -1275,7 +1275,7 @@ INT32 FindInSelectionList( DisplayList *pNode )
|
|||||||
for (iIndex = 0; iIndex < (*pNumSelList) && !fFound; iIndex++ )
|
for (iIndex = 0; iIndex < (*pNumSelList) && !fFound; iIndex++ )
|
||||||
{
|
{
|
||||||
if ( pNode->uiObjIndx == pSelList[ iIndex ].uiObject &&
|
if ( pNode->uiObjIndx == pSelList[ iIndex ].uiObject &&
|
||||||
pNode->uiIndex == pSelList[ iIndex ].usIndex )
|
pNode->uiIndex == pSelList[ iIndex ].usIndex )
|
||||||
{
|
{
|
||||||
fFound = TRUE;
|
fFound = TRUE;
|
||||||
iUseIndex = iIndex;
|
iUseIndex = iIndex;
|
||||||
|
|||||||
+3
-3
@@ -82,7 +82,7 @@ typedef struct
|
|||||||
HVOBJECT hVObject;
|
HVOBJECT hVObject;
|
||||||
UINT16 usStart;
|
UINT16 usStart;
|
||||||
UINT16 usEnd;
|
UINT16 usEnd;
|
||||||
UINT32 uiObjIndx;
|
UINT32 uiObjIndx;
|
||||||
};
|
};
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
@@ -141,11 +141,11 @@ extern Selections SelSingleDoor[ MAX_SELECTIONS ];
|
|||||||
extern Selections SelSingleWindow[ MAX_SELECTIONS ];
|
extern Selections SelSingleWindow[ MAX_SELECTIONS ];
|
||||||
extern Selections SelSingleRoof[ MAX_SELECTIONS ];
|
extern Selections SelSingleRoof[ MAX_SELECTIONS ];
|
||||||
extern Selections SelSingleNewRoof[ MAX_SELECTIONS ];
|
extern Selections SelSingleNewRoof[ MAX_SELECTIONS ];
|
||||||
extern Selections SelSingleBrokenWall[ MAX_SELECTIONS ];
|
extern Selections SelSingleBrokenWall[ MAX_SELECTIONS ];
|
||||||
extern Selections SelSingleDecor[ MAX_SELECTIONS ];
|
extern Selections SelSingleDecor[ MAX_SELECTIONS ];
|
||||||
extern Selections SelSingleDecal[ MAX_SELECTIONS ];
|
extern Selections SelSingleDecal[ MAX_SELECTIONS ];
|
||||||
extern Selections SelSingleFloor[ MAX_SELECTIONS ];
|
extern Selections SelSingleFloor[ MAX_SELECTIONS ];
|
||||||
extern Selections SelSingleToilet[ MAX_SELECTIONS ];
|
extern Selections SelSingleToilet[ MAX_SELECTIONS ];
|
||||||
|
|
||||||
extern Selections SelRoom[ MAX_SELECTIONS ];
|
extern Selections SelRoom[ MAX_SELECTIONS ];
|
||||||
|
|
||||||
|
|||||||
+82
-81
@@ -29,19 +29,19 @@ INT16 gbSmoothStruct[] =
|
|||||||
3, 2, 12, 27, 12, 0,
|
3, 2, 12, 27, 12, 0,
|
||||||
5, 2, 15, 30, 39, 0,
|
5, 2, 15, 30, 39, 0,
|
||||||
7, 2, 17, 32, 41, 0,
|
7, 2, 17, 32, 41, 0,
|
||||||
11, 2, 14, 29, 14, 0,
|
11, 2, 14, 29, 14, 0,
|
||||||
8, 2, 13, 28, 38, 0,
|
8, 2, 13, 28, 38, 0,
|
||||||
15, 1, 19, 0, 43, 0,
|
15, 1, 19, 0, 43, 0,
|
||||||
26, 1, 20, 0, 44, 0,
|
26, 1, 20, 0, 44, 0,
|
||||||
12, 2, 18, 33, 42, 0,
|
12, 2, 18, 33, 42, 0,
|
||||||
23, 1, 21, 0, 45, 0,
|
23, 1, 21, 0, 45, 0,
|
||||||
18, 2, 16, 31, 40, 0,
|
18, 2, 16, 31, 40, 0,
|
||||||
21, 1, 22, 0, 46, 0,
|
21, 1, 22, 0, 46, 0,
|
||||||
14, 2, 11, 26, 11, 0,
|
14, 2, 11, 26, 11, 0,
|
||||||
19, 1, 23, 0, 47, 0,
|
19, 1, 23, 0, 47, 0,
|
||||||
16, 2, 24, 34, 48, 0,
|
16, 2, 24, 34, 48, 0,
|
||||||
10, 2, 25, 35, 49, 0,
|
10, 2, 25, 35, 49, 0,
|
||||||
-1
|
-1
|
||||||
};
|
};
|
||||||
|
|
||||||
// This is a list of smoothed out water/shoreline textures
|
// This is a list of smoothed out water/shoreline textures
|
||||||
@@ -54,18 +54,18 @@ INT16 gbSmoothStruct[] =
|
|||||||
INT16 gbSmoothWaterStruct[] =
|
INT16 gbSmoothWaterStruct[] =
|
||||||
// FIRST ENTRY MAJIC NUMBER CALCULATED
|
// FIRST ENTRY MAJIC NUMBER CALCULATED
|
||||||
// 2nd ENTRY # OF VARIATIONS
|
// 2nd ENTRY # OF VARIATIONS
|
||||||
// 3rd, 4rth ENTRY TILE NUMBERS ( entry 1, entry 2 )
|
// 3rd, 4rth ENTRY TILE NUMBERS ( entry 1, entry 2 )
|
||||||
{
|
{
|
||||||
1020, 1, 11, 0,
|
1020, 1, 11, 0,
|
||||||
1000, 1, 12, 0,
|
1000, 1, 12, 0,
|
||||||
510, 2, 13, 43,
|
510, 2, 13, 43,
|
||||||
190, 1, 14, 0,
|
190, 1, 14, 0,
|
||||||
894, 1, 15, 0,
|
894, 1, 15, 0,
|
||||||
622, 1, 16, 0,
|
622, 1, 16, 0,
|
||||||
1014, 2, 17, 41,
|
1014, 2, 17, 41,
|
||||||
944, 1, 18, 24,
|
944, 1, 18, 24,
|
||||||
872, 1, 19, 0,
|
872, 1, 19, 0,
|
||||||
992, 1, 20, 0,
|
992, 1, 20, 0,
|
||||||
62, 1, 21, 0,
|
62, 1, 21, 0,
|
||||||
190, 2, 22, 14,
|
190, 2, 22, 14,
|
||||||
620, 1, 23, 0,
|
620, 1, 23, 0,
|
||||||
@@ -76,7 +76,7 @@ INT16 gbSmoothWaterStruct[] =
|
|||||||
1010, 1, 30,0,
|
1010, 1, 30,0,
|
||||||
876, 2, 31, 32,
|
876, 2, 31, 32,
|
||||||
878, 2, 32, 31,
|
878, 2, 32, 31,
|
||||||
1004, 2, 32, 31,
|
1004, 2, 32, 31,
|
||||||
1006, 2, 33, 34,
|
1006, 2, 33, 34,
|
||||||
1008, 2, 34, 33,
|
1008, 2, 34, 33,
|
||||||
1016, 2, 33, 34,
|
1016, 2, 33, 34,
|
||||||
@@ -92,33 +92,33 @@ INT16 gbSmoothWaterStruct[] =
|
|||||||
432, 1, 42, 0,
|
432, 1, 42, 0,
|
||||||
510, 1, 43, 13,
|
510, 1, 43, 13,
|
||||||
54, 1, 44, 0,
|
54, 1, 44, 0,
|
||||||
108, 1, 45, 0,
|
108, 1, 45, 0,
|
||||||
-1
|
-1
|
||||||
};
|
};
|
||||||
|
|
||||||
BOOLEAN HigherLevel( UINT32 gridno, UINT8 NewLevel );
|
BOOLEAN HigherLevel( INT32 gridno, UINT8 NewLevel );
|
||||||
BOOLEAN ContainsWater( UINT32 gridno );
|
BOOLEAN ContainsWater( INT32 gridno );
|
||||||
|
|
||||||
void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||||
{
|
{
|
||||||
int temp=0,type=0;
|
int temp=0;
|
||||||
int FullTile = FALSE;
|
int FullTile = FALSE;
|
||||||
UINT16 usOldIndex;
|
UINT16 usOldIndex;
|
||||||
UINT16 usTempIndex;
|
UINT16 usTempIndex;
|
||||||
UINT32 cnt;
|
UINT32 cnt;
|
||||||
BOOLEAN fFound;
|
BOOLEAN fFound;
|
||||||
UINT32 uiTempIndex;
|
UINT32 uiTempIndex;
|
||||||
UINT16 usTileIndex;
|
UINT16 usTileIndex;
|
||||||
UINT16 land=0;
|
UINT16 land=0;
|
||||||
UINT32 uiTopType;
|
UINT32 uiTopType;
|
||||||
BOOLEAN fSameTile;
|
BOOLEAN fSameTile;
|
||||||
|
|
||||||
INT16 *pSmoothStruct;
|
INT16 *pSmoothStruct;
|
||||||
// Check to see if the orginal texture was water, is so, smooth square/hex with
|
// Check to see if the orginal texture was water, is so, smooth square/hex with
|
||||||
// SmoothWaterTerrain rather than the proceeding method
|
// SmoothWaterTerrain rather than the proceeding method
|
||||||
if( origType==REGWATERTEXTURE)
|
if( origType==REGWATERTEXTURE)
|
||||||
{
|
{
|
||||||
SmoothWaterTerrain( gridno, origType, piNewTile, TRUE);
|
SmoothWaterTerrain( gridno, origType, piNewTile, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pSmoothStruct = gbSmoothStruct;
|
pSmoothStruct = gbSmoothStruct;
|
||||||
@@ -210,10 +210,10 @@ void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSm
|
|||||||
}
|
}
|
||||||
if ( pSmoothStruct[ cnt + 3 ] )
|
if ( pSmoothStruct[ cnt + 3 ] )
|
||||||
{
|
{
|
||||||
if ( pSmoothStruct[ cnt + 3 ] == usOldIndex )
|
if ( pSmoothStruct[ cnt + 3 ] == usOldIndex )
|
||||||
{
|
{
|
||||||
fSameTile = TRUE;
|
fSameTile = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( fSameTile )
|
if ( fSameTile )
|
||||||
{
|
{
|
||||||
@@ -277,14 +277,14 @@ void SmoothExitGridRadius( INT16 sMapIndex, UINT8 ubRadius )
|
|||||||
|
|
||||||
void SmoothExitGrid(int gridno, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
void SmoothExitGrid(int gridno, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
||||||
{
|
{
|
||||||
int temp=0,type=0;
|
int temp=0;
|
||||||
int FullTile = FALSE;
|
int FullTile = FALSE;
|
||||||
UINT16 usOldIndex;
|
UINT16 usOldIndex;
|
||||||
UINT16 usTempIndex;
|
UINT16 usTempIndex;
|
||||||
UINT32 cnt;
|
UINT32 cnt;
|
||||||
BOOLEAN fFound;
|
BOOLEAN fFound;
|
||||||
UINT32 uiTempIndex;
|
UINT32 uiTempIndex;
|
||||||
UINT16 usTileIndex;
|
UINT16 usTileIndex;
|
||||||
UINT16 usExitGridIndex=0;
|
UINT16 usExitGridIndex=0;
|
||||||
BOOLEAN fSameTile;
|
BOOLEAN fSameTile;
|
||||||
|
|
||||||
@@ -377,10 +377,10 @@ void SmoothExitGrid(int gridno, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
|||||||
}
|
}
|
||||||
if ( pSmoothStruct[ cnt + 3 ] )
|
if ( pSmoothStruct[ cnt + 3 ] )
|
||||||
{
|
{
|
||||||
if ( pSmoothStruct[ cnt + 3 ] == usOldIndex )
|
if ( pSmoothStruct[ cnt + 3 ] == usOldIndex )
|
||||||
{
|
{
|
||||||
fSameTile = TRUE;
|
fSameTile = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( fSameTile )
|
if ( fSameTile )
|
||||||
{
|
{
|
||||||
@@ -414,23 +414,23 @@ void SmoothExitGrid(int gridno, UINT16 *piNewTile, BOOLEAN fForceSmooth )
|
|||||||
|
|
||||||
void SmoothTerrainWorld( UINT32 uiCheckType )
|
void SmoothTerrainWorld( UINT32 uiCheckType )
|
||||||
{
|
{
|
||||||
int cnt;
|
int cnt;
|
||||||
UINT16 usIndex;
|
UINT16 usIndex;
|
||||||
UINT16 NewTile;
|
UINT16 NewTile;
|
||||||
// Smooth out entire world surrounding tiles
|
// Smooth out entire world surrounding tiles
|
||||||
for ( cnt = 0; cnt < WORLD_MAX; cnt++ )
|
for ( cnt = 0; cnt < WORLD_MAX; cnt++ )
|
||||||
{
|
{
|
||||||
if ( TypeExistsInLandLayer( cnt, uiCheckType, &usIndex ) )
|
if ( TypeExistsInLandLayer( cnt, uiCheckType, &usIndex ) )
|
||||||
{
|
{
|
||||||
SmoothTerrain( cnt, uiCheckType, &NewTile, TRUE );
|
SmoothTerrain( cnt, uiCheckType, &NewTile, TRUE );
|
||||||
|
|
||||||
if ( NewTile != NO_TILE )
|
if ( NewTile != NO_TILE )
|
||||||
{
|
{
|
||||||
// Change tile
|
// Change tile
|
||||||
SetLandIndex( cnt, NewTile, uiCheckType, FALSE );
|
SetLandIndex( cnt, NewTile, uiCheckType, FALSE );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -440,7 +440,7 @@ void SmoothAllTerrainWorld( void )
|
|||||||
UINT16 usIndex;
|
UINT16 usIndex;
|
||||||
UINT16 NewTile;
|
UINT16 NewTile;
|
||||||
UINT32 uiCheckType;
|
UINT32 uiCheckType;
|
||||||
// Smooth out entire world surrounding tiles
|
// Smooth out entire world surrounding tiles
|
||||||
for ( cnt = 0; cnt < WORLD_MAX; cnt++ )
|
for ( cnt = 0; cnt < WORLD_MAX; cnt++ )
|
||||||
{
|
{
|
||||||
for ( uiCheckType = FIRSTTEXTURE; uiCheckType <= SEVENTHTEXTURE; uiCheckType++ )
|
for ( uiCheckType = FIRSTTEXTURE; uiCheckType <= SEVENTHTEXTURE; uiCheckType++ )
|
||||||
@@ -451,8 +451,8 @@ void SmoothAllTerrainWorld( void )
|
|||||||
|
|
||||||
if ( NewTile != NO_TILE )
|
if ( NewTile != NO_TILE )
|
||||||
{
|
{
|
||||||
// Change tile
|
// Change tile
|
||||||
SetLandIndex( cnt, NewTile, uiCheckType, FALSE );
|
SetLandIndex( cnt, NewTile, uiCheckType, FALSE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -461,10 +461,10 @@ void SmoothAllTerrainWorld( void )
|
|||||||
|
|
||||||
void SmoothTerrainRadius( UINT32 iMapIndex, UINT32 uiCheckType, UINT8 ubRadius, BOOLEAN fForceSmooth )
|
void SmoothTerrainRadius( UINT32 iMapIndex, UINT32 uiCheckType, UINT8 ubRadius, BOOLEAN fForceSmooth )
|
||||||
{
|
{
|
||||||
INT16 sTop, sBottom;
|
INT16 sTop, sBottom;
|
||||||
INT16 sLeft, sRight;
|
INT16 sLeft, sRight;
|
||||||
INT16 cnt1, cnt2;
|
INT16 cnt1, cnt2;
|
||||||
INT32 iNewIndex;
|
INT32 iNewIndex;
|
||||||
UINT16 NewTile;
|
UINT16 NewTile;
|
||||||
UINT16 usIndex;
|
UINT16 usIndex;
|
||||||
INT32 leftmost;
|
INT32 leftmost;
|
||||||
@@ -474,8 +474,8 @@ void SmoothTerrainRadius( UINT32 iMapIndex, UINT32 uiCheckType, UINT8 ubRadius,
|
|||||||
// Determine start end end indicies and num rows
|
// Determine start end end indicies and num rows
|
||||||
sTop = ubRadius;
|
sTop = ubRadius;
|
||||||
sBottom = -ubRadius;
|
sBottom = -ubRadius;
|
||||||
sLeft = - ubRadius;
|
sLeft = - ubRadius;
|
||||||
sRight = ubRadius;
|
sRight = ubRadius;
|
||||||
for( cnt1 = sBottom; cnt1 <= sTop; cnt1++ )
|
for( cnt1 = sBottom; cnt1 <= sTop; cnt1++ )
|
||||||
{
|
{
|
||||||
leftmost = ( ( iMapIndex + ( WORLD_COLS * cnt1 ) )/ WORLD_COLS ) * WORLD_COLS;
|
leftmost = ( ( iMapIndex + ( WORLD_COLS * cnt1 ) )/ WORLD_COLS ) * WORLD_COLS;
|
||||||
@@ -483,17 +483,17 @@ void SmoothTerrainRadius( UINT32 iMapIndex, UINT32 uiCheckType, UINT8 ubRadius,
|
|||||||
{
|
{
|
||||||
iNewIndex = iMapIndex + ( WORLD_COLS * cnt1 ) + cnt2;
|
iNewIndex = iMapIndex + ( WORLD_COLS * cnt1 ) + cnt2;
|
||||||
if ( iNewIndex >=0 && iNewIndex < WORLD_MAX &&
|
if ( iNewIndex >=0 && iNewIndex < WORLD_MAX &&
|
||||||
iNewIndex >= leftmost && iNewIndex < ( leftmost + WORLD_COLS ) )
|
iNewIndex >= leftmost && iNewIndex < ( leftmost + WORLD_COLS ) )
|
||||||
{
|
{
|
||||||
if ( TypeExistsInLandLayer( iNewIndex, uiCheckType, &usIndex ) )
|
if ( TypeExistsInLandLayer( iNewIndex, uiCheckType, &usIndex ) )
|
||||||
{
|
{
|
||||||
SmoothTerrain( iNewIndex, uiCheckType, &NewTile, fForceSmooth );
|
SmoothTerrain( iNewIndex, uiCheckType, &NewTile, fForceSmooth );
|
||||||
|
|
||||||
if ( NewTile != NO_TILE )
|
if ( NewTile != NO_TILE )
|
||||||
{
|
{
|
||||||
// Change tile
|
// Change tile
|
||||||
AddToUndoList( iNewIndex );
|
AddToUndoList( iNewIndex );
|
||||||
SetLandIndex( iNewIndex, NewTile, uiCheckType, FALSE );
|
SetLandIndex( iNewIndex, NewTile, uiCheckType, FALSE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -503,18 +503,18 @@ void SmoothTerrainRadius( UINT32 iMapIndex, UINT32 uiCheckType, UINT8 ubRadius,
|
|||||||
|
|
||||||
void SmoothAllTerrainTypeRadius( UINT32 iMapIndex, UINT8 ubRadius, BOOLEAN fForceSmooth )
|
void SmoothAllTerrainTypeRadius( UINT32 iMapIndex, UINT8 ubRadius, BOOLEAN fForceSmooth )
|
||||||
{
|
{
|
||||||
INT16 sTop, sBottom;
|
INT16 sTop, sBottom;
|
||||||
INT16 sLeft, sRight;
|
INT16 sLeft, sRight;
|
||||||
INT16 cnt1, cnt2, cnt3;
|
INT16 cnt1, cnt2, cnt3;
|
||||||
INT32 iNewIndex;
|
INT32 iNewIndex;
|
||||||
UINT16 NewTile;
|
UINT16 NewTile;
|
||||||
UINT16 usIndex;
|
UINT16 usIndex;
|
||||||
INT32 leftmost;
|
INT32 leftmost;
|
||||||
// Determine start end end indicies and num rows
|
// Determine start end end indicies and num rows
|
||||||
sTop = ubRadius;
|
sTop = ubRadius;
|
||||||
sBottom = -ubRadius;
|
sBottom = -ubRadius;
|
||||||
sLeft = - ubRadius;
|
sLeft = - ubRadius;
|
||||||
sRight = ubRadius;
|
sRight = ubRadius;
|
||||||
for( cnt3 = FIRSTTEXTURE; cnt3 <= SEVENTHTEXTURE; cnt3++ )
|
for( cnt3 = FIRSTTEXTURE; cnt3 <= SEVENTHTEXTURE; cnt3++ )
|
||||||
{
|
{
|
||||||
for( cnt1 = sBottom; cnt1 <= sTop; cnt1++ )
|
for( cnt1 = sBottom; cnt1 <= sTop; cnt1++ )
|
||||||
@@ -524,15 +524,15 @@ void SmoothAllTerrainTypeRadius( UINT32 iMapIndex, UINT8 ubRadius, BOOLEAN fForc
|
|||||||
{
|
{
|
||||||
iNewIndex = iMapIndex + ( WORLD_COLS * cnt1 ) + cnt2;
|
iNewIndex = iMapIndex + ( WORLD_COLS * cnt1 ) + cnt2;
|
||||||
if ( iNewIndex >=0 && iNewIndex < WORLD_MAX &&
|
if ( iNewIndex >=0 && iNewIndex < WORLD_MAX &&
|
||||||
iNewIndex >= leftmost && iNewIndex < ( leftmost + WORLD_COLS ) )
|
iNewIndex >= leftmost && iNewIndex < ( leftmost + WORLD_COLS ) )
|
||||||
{
|
{
|
||||||
if ( TypeExistsInLandLayer( iNewIndex, cnt3, &usIndex ) )
|
if ( TypeExistsInLandLayer( iNewIndex, cnt3, &usIndex ) )
|
||||||
{
|
{
|
||||||
SmoothTerrain( iNewIndex, cnt3, &NewTile, fForceSmooth );
|
SmoothTerrain( iNewIndex, cnt3, &NewTile, fForceSmooth );
|
||||||
if ( NewTile != NO_TILE )
|
if ( NewTile != NO_TILE )
|
||||||
{
|
{
|
||||||
// Change tile
|
// Change tile
|
||||||
SetLandIndex( iNewIndex, NewTile, cnt3, FALSE );
|
SetLandIndex( iNewIndex, NewTile, cnt3, FALSE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -546,16 +546,16 @@ void SmoothWaterTerrain( int gridno, int origType, UINT16 *piNewTile, BOOLEAN fF
|
|||||||
// This procedure will calculate the approriate smooth texture for a water texture
|
// This procedure will calculate the approriate smooth texture for a water texture
|
||||||
// based on the surrounding water textures. This is done via masking bits within
|
// based on the surrounding water textures. This is done via masking bits within
|
||||||
// a temp variable, then searching for the right texture and inserting it
|
// a temp variable, then searching for the right texture and inserting it
|
||||||
int temp=0,type=0;
|
int temp=0;
|
||||||
int FullTile = FALSE;
|
int FullTile = FALSE;
|
||||||
UINT16 usOldIndex;
|
UINT16 usOldIndex;
|
||||||
UINT16 usTempIndex;
|
UINT16 usTempIndex;
|
||||||
UINT32 cnt;
|
UINT32 cnt;
|
||||||
BOOLEAN fFound;
|
BOOLEAN fFound;
|
||||||
UINT32 uiTempIndex;
|
UINT32 uiTempIndex;
|
||||||
UINT16 usTileIndex;
|
UINT16 usTileIndex;
|
||||||
UINT16 land=0;
|
UINT16 land=0;
|
||||||
UINT32 uiTopType;
|
UINT32 uiTopType;
|
||||||
BOOLEAN fSameTile;
|
BOOLEAN fSameTile;
|
||||||
INT16 *pSmoothStruct;
|
INT16 *pSmoothStruct;
|
||||||
|
|
||||||
@@ -673,7 +673,7 @@ void SmoothWaterTerrain( int gridno, int origType, UINT16 *piNewTile, BOOLEAN fF
|
|||||||
cnt = 0;
|
cnt = 0;
|
||||||
fFound = FALSE;
|
fFound = FALSE;
|
||||||
GetLandHeadType( gridno, &uiTopType );
|
GetLandHeadType( gridno, &uiTopType );
|
||||||
// Speed up of this while loop using double/quick search will result
|
// Speed up of this while loop using double/quick search will result
|
||||||
// in an incorrect solution due to multiple instances of bitvalues in the list of
|
// in an incorrect solution due to multiple instances of bitvalues in the list of
|
||||||
// smoothed water textures
|
// smoothed water textures
|
||||||
while( pSmoothStruct[ cnt ] != -1 )
|
while( pSmoothStruct[ cnt ] != -1 )
|
||||||
@@ -690,10 +690,10 @@ void SmoothWaterTerrain( int gridno, int origType, UINT16 *piNewTile, BOOLEAN fF
|
|||||||
}
|
}
|
||||||
if ( pSmoothStruct[ cnt + 3 ] )
|
if ( pSmoothStruct[ cnt + 3 ] )
|
||||||
{
|
{
|
||||||
if ( pSmoothStruct[ cnt + 3 ] == usOldIndex )
|
if ( pSmoothStruct[ cnt + 3 ] == usOldIndex )
|
||||||
{
|
{
|
||||||
fSameTile = TRUE;
|
fSameTile = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( fSameTile )
|
if ( fSameTile )
|
||||||
{
|
{
|
||||||
@@ -711,7 +711,7 @@ void SmoothWaterTerrain( int gridno, int origType, UINT16 *piNewTile, BOOLEAN fF
|
|||||||
if ( !fFound )
|
if ( !fFound )
|
||||||
{
|
{
|
||||||
// Check for existance of same tile
|
// Check for existance of same tile
|
||||||
if ( usOldIndex >= 1 && usOldIndex <= 10 )
|
if ( usOldIndex >= 1 && usOldIndex <= 10 )
|
||||||
{
|
{
|
||||||
*piNewTile = NO_TILE;
|
*piNewTile = NO_TILE;
|
||||||
return;
|
return;
|
||||||
@@ -731,3 +731,4 @@ void SmoothWaterTerrain( int gridno, int origType, UINT16 *piNewTile, BOOLEAN fF
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -8,13 +8,13 @@
|
|||||||
#define ONELEVELTYPETWOROOF 2
|
#define ONELEVELTYPETWOROOF 2
|
||||||
|
|
||||||
|
|
||||||
// Area (pointer to SGP rect) +
|
// Area (pointer to SGP rect) +
|
||||||
// Location to check-+--| | |---- Check left and right edges -----| |---- Check top and bottom edges -----|
|
// Location to check-+--| | |---- Check left and right edges -----| |---- Check top and bottom edges -----|
|
||||||
#define IsLocationInArea( x, y, r ) ( ((x) >= r->iLeft) && ((x) <= r->iRight) && ((y) >= r->iTop) && ((y) <= r->iBottom) )
|
#define IsLocationInArea( x, y, r ) ( ((x) >= r->iLeft) && ((x) <= r->iRight) && ((y) >= r->iTop) && ((y) <= r->iBottom) )
|
||||||
|
|
||||||
|
|
||||||
void SmoothAllTerrainWorld( void );
|
void SmoothAllTerrainWorld( void );
|
||||||
void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSmooth );
|
void SmoothTerrain(int gridno, int origType, UINT16 *piNewTile, BOOLEAN fForceSmooth );
|
||||||
|
|
||||||
void SmoothTerrainRadius( UINT32 iMapIndex, UINT32 uiCheckType, UINT8 ubRadius, BOOLEAN fForceSmooth );
|
void SmoothTerrainRadius( UINT32 iMapIndex, UINT32 uiCheckType, UINT8 ubRadius, BOOLEAN fForceSmooth );
|
||||||
void SmoothTerrainWorld( UINT32 uiCheckType );
|
void SmoothTerrainWorld( UINT32 uiCheckType );
|
||||||
|
|||||||
+31
-31
@@ -14,7 +14,7 @@
|
|||||||
#include "gameloop.h"
|
#include "gameloop.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SQUARE_STEP 8
|
#define SQUARE_STEP 8
|
||||||
|
|
||||||
extern UINT32 guiExitScreen; // symbol already declared globally in laptop.cpp (jonathanl)
|
extern UINT32 guiExitScreen; // symbol already declared globally in laptop.cpp (jonathanl)
|
||||||
BOOLEAN gfFadeInitialized = FALSE;
|
BOOLEAN gfFadeInitialized = FALSE;
|
||||||
@@ -34,12 +34,12 @@ UINT32 uiOldMusicMode;
|
|||||||
|
|
||||||
FADE_FUNCTION gFadeFunction = NULL;
|
FADE_FUNCTION gFadeFunction = NULL;
|
||||||
|
|
||||||
FADE_HOOK gFadeInDoneCallback = NULL;
|
FADE_HOOK gFadeInDoneCallback = NULL;
|
||||||
FADE_HOOK gFadeOutDoneCallback = NULL;
|
FADE_HOOK gFadeOutDoneCallback = NULL;
|
||||||
|
|
||||||
|
|
||||||
void FadeFrameBufferSquare( );
|
void FadeFrameBufferSquare( );
|
||||||
void FadeFrameBufferVersionOne( );
|
void FadeFrameBufferVersionOne( );
|
||||||
void FadeFrameBufferVersionFaster( INT8 bFadeValue );
|
void FadeFrameBufferVersionFaster( INT8 bFadeValue );
|
||||||
void FadeFrameBufferSide( );
|
void FadeFrameBufferSide( );
|
||||||
void FadeFrameBufferRealFade( );
|
void FadeFrameBufferRealFade( );
|
||||||
@@ -49,14 +49,14 @@ void FadeInBackBufferSquare( );
|
|||||||
void FadeInFrameBufferRealFade( );
|
void FadeInFrameBufferRealFade( );
|
||||||
|
|
||||||
|
|
||||||
extern BOOLEAN ShadowVideoSurfaceRectUsingLowPercentTable( UINT32 uiDestVSurface, INT32 X1, INT32 Y1, INT32 X2, INT32 Y2);
|
extern BOOLEAN ShadowVideoSurfaceRectUsingLowPercentTable( UINT32 uiDestVSurface, INT32 X1, INT32 Y1, INT32 X2, INT32 Y2);
|
||||||
BOOLEAN UpdateSaveBufferWithBackbuffer( void );
|
BOOLEAN UpdateSaveBufferWithBackbuffer( void );
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN gfFadeIn = FALSE;
|
BOOLEAN gfFadeIn = FALSE;
|
||||||
BOOLEAN gfFadeOut = FALSE;
|
BOOLEAN gfFadeOut = FALSE;
|
||||||
BOOLEAN gfFadeOutDone = FALSE;
|
BOOLEAN gfFadeOutDone = FALSE;
|
||||||
BOOLEAN gfFadeInDone = FALSE;
|
BOOLEAN gfFadeInDone = FALSE;
|
||||||
|
|
||||||
|
|
||||||
void FadeInNextFrame( )
|
void FadeInNextFrame( )
|
||||||
@@ -165,7 +165,7 @@ void BeginFade( UINT32 uiExitScreen, INT8 bFadeValue, INT8 bType, UINT32 uiDelay
|
|||||||
gsFadeRealCount = -1;
|
gsFadeRealCount = -1;
|
||||||
gsFadeLimit = 8;
|
gsFadeLimit = 8;
|
||||||
gFadeFunction = (FADE_FUNCTION)FadeInFrameBufferRealFade;
|
gFadeFunction = (FADE_FUNCTION)FadeInFrameBufferRealFade;
|
||||||
gfFadeInVideo = FALSE;
|
gfFadeInVideo = FALSE;
|
||||||
|
|
||||||
// Copy backbuffer to savebuffer
|
// Copy backbuffer to savebuffer
|
||||||
UpdateSaveBufferWithBackbuffer( );
|
UpdateSaveBufferWithBackbuffer( );
|
||||||
@@ -179,7 +179,7 @@ void BeginFade( UINT32 uiExitScreen, INT8 bFadeValue, INT8 bType, UINT32 uiDelay
|
|||||||
gsFadeRealCount = -1;
|
gsFadeRealCount = -1;
|
||||||
gsFadeLimit = 10;
|
gsFadeLimit = 10;
|
||||||
gFadeFunction = (FADE_FUNCTION)FadeFrameBufferRealFade;
|
gFadeFunction = (FADE_FUNCTION)FadeFrameBufferRealFade;
|
||||||
gfFadeInVideo = FALSE;
|
gfFadeInVideo = FALSE;
|
||||||
|
|
||||||
// Clear framebuffer
|
// Clear framebuffer
|
||||||
//ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
//ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
@@ -324,7 +324,7 @@ UINT32 FadeScreenHandle( )
|
|||||||
return( FADE_SCREEN );
|
return( FADE_SCREEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT32 FadeScreenShutdown( )
|
UINT32 FadeScreenShutdown( )
|
||||||
{
|
{
|
||||||
|
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
@@ -491,7 +491,7 @@ void FadeFrameBufferVersionFaster( INT8 bFadeValue )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FadeFrameBufferSide( )
|
void FadeFrameBufferSide( )
|
||||||
{
|
{
|
||||||
INT32 iX1, iX2;
|
INT32 iX1, iX2;
|
||||||
INT16 sFadeMove;
|
INT16 sFadeMove;
|
||||||
@@ -510,7 +510,7 @@ void FadeFrameBufferSide( )
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FadeFrameBufferSquare( )
|
void FadeFrameBufferSquare( )
|
||||||
{
|
{
|
||||||
INT32 iX1, iX2, iY1, iY2;
|
INT32 iX1, iX2, iY1, iY2;
|
||||||
INT16 sFadeXMove, sFadeYMove;
|
INT16 sFadeXMove, sFadeYMove;
|
||||||
@@ -543,7 +543,7 @@ void FadeFrameBufferSquare( )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FadeInBackBufferSquare( )
|
void FadeInBackBufferSquare( )
|
||||||
{
|
{
|
||||||
INT32 iX1, iX2, iY1, iY2;
|
INT32 iX1, iX2, iY1, iY2;
|
||||||
INT16 sFadeXMove, sFadeYMove;
|
INT16 sFadeXMove, sFadeYMove;
|
||||||
@@ -563,15 +563,15 @@ void FadeInBackBufferSquare( )
|
|||||||
iY2 = giY2 + sFadeYMove;
|
iY2 = giY2 + sFadeYMove;
|
||||||
|
|
||||||
BltFx.SrcRect.iLeft = iX1;
|
BltFx.SrcRect.iLeft = iX1;
|
||||||
BltFx.SrcRect.iTop = iY1;
|
BltFx.SrcRect.iTop = iY1;
|
||||||
BltFx.SrcRect.iRight = iX2;
|
BltFx.SrcRect.iRight = iX2;
|
||||||
BltFx.SrcRect.iBottom = iY2;
|
BltFx.SrcRect.iBottom = iY2;
|
||||||
|
|
||||||
if ( BltFx.SrcRect.iRight != BltFx.SrcRect.iLeft )
|
if ( BltFx.SrcRect.iRight != BltFx.SrcRect.iLeft )
|
||||||
{
|
{
|
||||||
BltVideoSurface( BACKBUFFER, FRAME_BUFFER, 0,
|
BltVideoSurface( BACKBUFFER, FRAME_BUFFER, 0,
|
||||||
iX1, iY1,
|
iX1, iY1,
|
||||||
VS_BLT_SRCSUBRECT, &BltFx );
|
VS_BLT_SRCSUBRECT, &BltFx );
|
||||||
}
|
}
|
||||||
|
|
||||||
iX1 = giX2;
|
iX1 = giX2;
|
||||||
@@ -580,15 +580,15 @@ void FadeInBackBufferSquare( )
|
|||||||
iY2 = giY2 + sFadeYMove;
|
iY2 = giY2 + sFadeYMove;
|
||||||
|
|
||||||
BltFx.SrcRect.iLeft = iX1;
|
BltFx.SrcRect.iLeft = iX1;
|
||||||
BltFx.SrcRect.iTop = iY1;
|
BltFx.SrcRect.iTop = iY1;
|
||||||
BltFx.SrcRect.iRight = iX2;
|
BltFx.SrcRect.iRight = iX2;
|
||||||
BltFx.SrcRect.iBottom = iY2;
|
BltFx.SrcRect.iBottom = iY2;
|
||||||
|
|
||||||
if ( BltFx.SrcRect.iRight != BltFx.SrcRect.iLeft )
|
if ( BltFx.SrcRect.iRight != BltFx.SrcRect.iLeft )
|
||||||
{
|
{
|
||||||
BltVideoSurface( BACKBUFFER, FRAME_BUFFER, 0,
|
BltVideoSurface( BACKBUFFER, FRAME_BUFFER, 0,
|
||||||
iX1, iY1,
|
iX1, iY1,
|
||||||
VS_BLT_SRCSUBRECT, &BltFx );
|
VS_BLT_SRCSUBRECT, &BltFx );
|
||||||
}
|
}
|
||||||
|
|
||||||
iX1 = giX1;
|
iX1 = giX1;
|
||||||
@@ -597,15 +597,15 @@ void FadeInBackBufferSquare( )
|
|||||||
iY2 = giY1;
|
iY2 = giY1;
|
||||||
|
|
||||||
BltFx.SrcRect.iLeft = iX1;
|
BltFx.SrcRect.iLeft = iX1;
|
||||||
BltFx.SrcRect.iTop = iY1;
|
BltFx.SrcRect.iTop = iY1;
|
||||||
BltFx.SrcRect.iRight = iX2;
|
BltFx.SrcRect.iRight = iX2;
|
||||||
BltFx.SrcRect.iBottom = iY2;
|
BltFx.SrcRect.iBottom = iY2;
|
||||||
|
|
||||||
if ( BltFx.SrcRect.iBottom != BltFx.SrcRect.iTop )
|
if ( BltFx.SrcRect.iBottom != BltFx.SrcRect.iTop )
|
||||||
{
|
{
|
||||||
BltVideoSurface( BACKBUFFER, FRAME_BUFFER, 0,
|
BltVideoSurface( BACKBUFFER, FRAME_BUFFER, 0,
|
||||||
iX1, iY1,
|
iX1, iY1,
|
||||||
VS_BLT_SRCSUBRECT, &BltFx );
|
VS_BLT_SRCSUBRECT, &BltFx );
|
||||||
}
|
}
|
||||||
|
|
||||||
iX1 = giX1;
|
iX1 = giX1;
|
||||||
@@ -614,15 +614,15 @@ void FadeInBackBufferSquare( )
|
|||||||
iY2 = giY2 + sFadeYMove;
|
iY2 = giY2 + sFadeYMove;
|
||||||
|
|
||||||
BltFx.SrcRect.iLeft = iX1;
|
BltFx.SrcRect.iLeft = iX1;
|
||||||
BltFx.SrcRect.iTop = iY1;
|
BltFx.SrcRect.iTop = iY1;
|
||||||
BltFx.SrcRect.iRight = iX2;
|
BltFx.SrcRect.iRight = iX2;
|
||||||
BltFx.SrcRect.iBottom = iY2;
|
BltFx.SrcRect.iBottom = iY2;
|
||||||
|
|
||||||
if ( BltFx.SrcRect.iBottom != BltFx.SrcRect.iTop )
|
if ( BltFx.SrcRect.iBottom != BltFx.SrcRect.iTop )
|
||||||
{
|
{
|
||||||
BltVideoSurface( BACKBUFFER, FRAME_BUFFER, 0,
|
BltVideoSurface( BACKBUFFER, FRAME_BUFFER, 0,
|
||||||
iX1, iY1,
|
iX1, iY1,
|
||||||
VS_BLT_SRCSUBRECT, &BltFx );
|
VS_BLT_SRCSUBRECT, &BltFx );
|
||||||
}
|
}
|
||||||
|
|
||||||
giX1 -= sFadeXMove;
|
giX1 -= sFadeXMove;
|
||||||
@@ -672,9 +672,9 @@ void FadeInFrameBufferRealFade( )
|
|||||||
BOOLEAN UpdateSaveBufferWithBackbuffer(void)
|
BOOLEAN UpdateSaveBufferWithBackbuffer(void)
|
||||||
{
|
{
|
||||||
UINT32 uiDestPitchBYTES, uiSrcPitchBYTES;
|
UINT32 uiDestPitchBYTES, uiSrcPitchBYTES;
|
||||||
UINT8 *pDestBuf, *pSrcBuf;
|
UINT8 *pDestBuf, *pSrcBuf;
|
||||||
UINT16 usWidth, usHeight;
|
UINT16 usWidth, usHeight;
|
||||||
UINT8 ubBitDepth;
|
UINT8 ubBitDepth;
|
||||||
|
|
||||||
|
|
||||||
// Update saved buffer - do for the viewport size ony!
|
// Update saved buffer - do for the viewport size ony!
|
||||||
|
|||||||
+153
-18
@@ -79,6 +79,11 @@
|
|||||||
#define GIO_IRON_MAN_SETTING_Y iScreenHeightOffset + 355
|
#define GIO_IRON_MAN_SETTING_Y iScreenHeightOffset + 355
|
||||||
#define GIO_IRON_MAN_SETTING_WIDTH GIO_DIF_SETTINGS_WIDTH
|
#define GIO_IRON_MAN_SETTING_WIDTH GIO_DIF_SETTINGS_WIDTH
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
#define GIO_INV_SETTING_X iScreenWidthOffset + 340
|
||||||
|
#define GIO_INV_SETTING_Y GIO_IRON_MAN_SETTING_Y
|
||||||
|
#define GIO_INV_SETTING_WIDTH GIO_DIF_SETTINGS_WIDTH
|
||||||
|
|
||||||
//Difficulty settings
|
//Difficulty settings
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@@ -120,6 +125,15 @@ enum
|
|||||||
NUM_BR_OPTIONS,
|
NUM_BR_OPTIONS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// CHRISL: New inventory options
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
GIO_INV_OLD,
|
||||||
|
GIO_INV_NEW,
|
||||||
|
|
||||||
|
NUM_INV_OPTIONS,
|
||||||
|
};
|
||||||
|
|
||||||
// JA2Gold: no more timed turns setting
|
// JA2Gold: no more timed turns setting
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -181,6 +195,10 @@ INT32 giGioMessageBox = -1;
|
|||||||
//extern INT32 gp16PointArial;
|
//extern INT32 gp16PointArial;
|
||||||
|
|
||||||
|
|
||||||
|
// CHRISL: checkbox to toggle INV selection
|
||||||
|
UINT32 guiINVOptionToggles[ NUM_INV_OPTIONS ];
|
||||||
|
void BtnINVOptionTogglesCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
|
|
||||||
// Done Button
|
// Done Button
|
||||||
void BtnGIODoneCallback(GUI_BUTTON *btn,INT32 reason);
|
void BtnGIODoneCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
UINT32 guiGIODoneButton;
|
UINT32 guiGIODoneButton;
|
||||||
@@ -325,7 +343,7 @@ UINT32 GameInitOptionsScreenShutdown( void )
|
|||||||
|
|
||||||
BOOLEAN EnterGIOScreen()
|
BOOLEAN EnterGIOScreen()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
UINT16 cnt;
|
UINT16 cnt;
|
||||||
UINT16 usPosY;
|
UINT16 usPosY;
|
||||||
|
|
||||||
@@ -355,11 +373,11 @@ BOOLEAN EnterGIOScreen()
|
|||||||
//Ok button
|
//Ok button
|
||||||
giGIODoneBtnImage = LoadButtonImage("INTERFACE\\PreferencesButtons.sti", -1,0,-1,2,-1 );
|
giGIODoneBtnImage = LoadButtonImage("INTERFACE\\PreferencesButtons.sti", -1,0,-1,2,-1 );
|
||||||
guiGIODoneButton = CreateIconAndTextButton( giGIODoneBtnImage, gzGIOScreenText[GIO_OK_TEXT], OPT_BUTTON_FONT,
|
guiGIODoneButton = CreateIconAndTextButton( giGIODoneBtnImage, gzGIOScreenText[GIO_OK_TEXT], OPT_BUTTON_FONT,
|
||||||
OPT_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
OPT_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
||||||
OPT_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
OPT_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
GIO_BTN_OK_X, GIO_BTN_OK_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
GIO_BTN_OK_X, GIO_BTN_OK_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnGIODoneCallback);
|
DEFAULT_MOVE_CALLBACK, BtnGIODoneCallback);
|
||||||
|
|
||||||
SpecifyButtonSoundScheme( guiGIODoneButton, BUTTON_SOUND_SCHEME_BIGSWITCH3 );
|
SpecifyButtonSoundScheme( guiGIODoneButton, BUTTON_SOUND_SCHEME_BIGSWITCH3 );
|
||||||
SpecifyDisabledButtonStyle( guiGIODoneButton, DISABLED_STYLE_NONE );
|
SpecifyDisabledButtonStyle( guiGIODoneButton, DISABLED_STYLE_NONE );
|
||||||
@@ -367,11 +385,11 @@ BOOLEAN EnterGIOScreen()
|
|||||||
//Cancel button
|
//Cancel button
|
||||||
giGIOCancelBtnImage = UseLoadedButtonImage( giGIODoneBtnImage, -1,1,-1,3,-1 );
|
giGIOCancelBtnImage = UseLoadedButtonImage( giGIODoneBtnImage, -1,1,-1,3,-1 );
|
||||||
guiGIOCancelButton = CreateIconAndTextButton( giGIOCancelBtnImage, gzGIOScreenText[GIO_CANCEL_TEXT], OPT_BUTTON_FONT,
|
guiGIOCancelButton = CreateIconAndTextButton( giGIOCancelBtnImage, gzGIOScreenText[GIO_CANCEL_TEXT], OPT_BUTTON_FONT,
|
||||||
OPT_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
OPT_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
||||||
OPT_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
OPT_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
GIO_CANCEL_X, GIO_BTN_OK_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
GIO_CANCEL_X, GIO_BTN_OK_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnGIOCancelCallback );
|
DEFAULT_MOVE_CALLBACK, BtnGIOCancelCallback );
|
||||||
SpecifyButtonSoundScheme( guiGIOCancelButton, BUTTON_SOUND_SCHEME_BIGSWITCH3 );
|
SpecifyButtonSoundScheme( guiGIOCancelButton, BUTTON_SOUND_SCHEME_BIGSWITCH3 );
|
||||||
|
|
||||||
|
|
||||||
@@ -455,6 +473,29 @@ BOOLEAN EnterGIOScreen()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL: New inventory options
|
||||||
|
if(iResolution != 0){
|
||||||
|
usPosY = GIO_INV_SETTING_Y - GIO_OFFSET_TO_TOGGLE_BOX_Y;
|
||||||
|
for( cnt=0; cnt<NUM_INV_OPTIONS; cnt++)
|
||||||
|
{
|
||||||
|
guiINVOptionToggles[ cnt ] = CreateCheckBoxButton( GIO_INV_SETTING_X+GIO_OFFSET_TO_TOGGLE_BOX, usPosY,
|
||||||
|
"INTERFACE\\OptionsCheck.sti", MSYS_PRIORITY_HIGH+10,
|
||||||
|
BtnINVOptionTogglesCallback );
|
||||||
|
MSYS_SetBtnUserData( guiINVOptionToggles[ cnt ], 0, cnt );
|
||||||
|
|
||||||
|
usPosY += GIO_GAP_BN_SETTINGS-5;
|
||||||
|
}
|
||||||
|
switch( gGameOptions.ubInventorySystem )
|
||||||
|
{
|
||||||
|
case INVENTORY_OLD:
|
||||||
|
ButtonList[ guiINVOptionToggles[ GIO_INV_OLD ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
|
break;
|
||||||
|
case INVENTORY_NEW:
|
||||||
|
ButtonList[ guiINVOptionToggles[ GIO_INV_NEW ] ]->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// JA2Gold: iron man buttons
|
// JA2Gold: iron man buttons
|
||||||
usPosY = GIO_IRON_MAN_SETTING_Y - GIO_OFFSET_TO_TOGGLE_BOX_Y;
|
usPosY = GIO_IRON_MAN_SETTING_Y - GIO_OFFSET_TO_TOGGLE_BOX_Y;
|
||||||
for( cnt=0; cnt<NUM_SAVE_OPTIONS; cnt++)
|
for( cnt=0; cnt<NUM_SAVE_OPTIONS; cnt++)
|
||||||
@@ -570,6 +611,12 @@ BOOLEAN ExitGIOScreen()
|
|||||||
for( cnt=0; cnt<NUM_BR_OPTIONS; cnt++)
|
for( cnt=0; cnt<NUM_BR_OPTIONS; cnt++)
|
||||||
RemoveButton( guiBROptionToggles[ cnt ] );
|
RemoveButton( guiBROptionToggles[ cnt ] );
|
||||||
|
|
||||||
|
// CHRISL
|
||||||
|
if(iResolution != 0){
|
||||||
|
for( cnt=0; cnt<NUM_INV_OPTIONS; cnt++)
|
||||||
|
RemoveButton( guiINVOptionToggles[ cnt ] );
|
||||||
|
}
|
||||||
|
|
||||||
// JA2Gold: remove iron man buttons
|
// JA2Gold: remove iron man buttons
|
||||||
for( cnt=0; cnt<NUM_SAVE_OPTIONS; cnt++)
|
for( cnt=0; cnt<NUM_SAVE_OPTIONS; cnt++)
|
||||||
RemoveButton( guiGameSaveToggles[ cnt ] );
|
RemoveButton( guiGameSaveToggles[ cnt ] );
|
||||||
@@ -727,6 +774,17 @@ BOOLEAN RenderGIOScreen()
|
|||||||
|
|
||||||
DisplayWrappedString( (UINT16)(GIO_BR_SETTING_X+GIO_OFFSET_TO_TEXT), usPosY, GIO_DIF_SETTINGS_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_BR_AWESOME_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
DisplayWrappedString( (UINT16)(GIO_BR_SETTING_X+GIO_OFFSET_TO_TEXT), usPosY, GIO_DIF_SETTINGS_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_BR_AWESOME_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
|
// CHRISL
|
||||||
|
if(iResolution != 0){
|
||||||
|
DisplayWrappedString( GIO_INV_SETTING_X, (UINT16)(GIO_INV_SETTING_Y-GIO_GAP_BN_SETTINGS), GIO_DIF_SETTINGS_WIDTH + 20, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_INV_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
usPosY = GIO_INV_SETTING_Y+2;
|
||||||
|
|
||||||
|
DisplayWrappedString( (UINT16)(GIO_INV_SETTING_X+GIO_OFFSET_TO_TEXT), usPosY, GIO_DIF_SETTINGS_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_INV_OLD_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
usPosY += GIO_GAP_BN_SETTINGS-5;
|
||||||
|
|
||||||
|
DisplayWrappedString( (UINT16)(GIO_INV_SETTING_X+GIO_OFFSET_TO_TEXT), usPosY, GIO_DIF_SETTINGS_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_INV_NEW_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
}
|
||||||
|
|
||||||
// JA2Gold: Display the iron man Settings Title Text
|
// JA2Gold: Display the iron man Settings Title Text
|
||||||
|
|
||||||
DisplayWrappedString( GIO_IRON_MAN_SETTING_X, (UINT16)(GIO_IRON_MAN_SETTING_Y-GIO_GAP_BN_SETTINGS), GIO_DIF_SETTINGS_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_GAME_SAVE_STYLE_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
DisplayWrappedString( GIO_IRON_MAN_SETTING_X, (UINT16)(GIO_IRON_MAN_SETTING_Y-GIO_GAP_BN_SETTINGS), GIO_DIF_SETTINGS_WIDTH, 2, GIO_TOGGLE_TEXT_FONT, GIO_TOGGLE_TEXT_COLOR, gzGIOScreenText[ GIO_GAME_SAVE_STYLE_TEXT ], FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
@@ -748,7 +806,7 @@ BOOLEAN RenderGIOScreen()
|
|||||||
void GetGIOScreenUserInput()
|
void GetGIOScreenUserInput()
|
||||||
{
|
{
|
||||||
InputAtom Event;
|
InputAtom Event;
|
||||||
// POINT MousePos;
|
// POINT MousePos;
|
||||||
|
|
||||||
// GetCursorPos(&MousePos);
|
// GetCursorPos(&MousePos);
|
||||||
|
|
||||||
@@ -787,7 +845,7 @@ void BtnDifficultyTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
UINT8 ubButton = (UINT8)MSYS_GetBtnUserData( btn, 0 );
|
/*UINT8 ubButton = (UINT8)*/MSYS_GetBtnUserData( btn, 0 );
|
||||||
|
|
||||||
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||||
{
|
{
|
||||||
@@ -827,7 +885,7 @@ void BtnBROptionTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
UINT8 ubButton = (UINT8)MSYS_GetBtnUserData( btn, 0 );
|
/*UINT8 ubButton = (UINT8)*/MSYS_GetBtnUserData( btn, 0 );
|
||||||
|
|
||||||
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||||
{
|
{
|
||||||
@@ -861,11 +919,50 @@ void BtnBROptionTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
void BtnINVOptionTogglesCallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
|
{
|
||||||
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
|
{
|
||||||
|
/*UINT8 ubButton = (UINT8)*/MSYS_GetBtnUserData( btn, 0 );
|
||||||
|
|
||||||
|
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||||
|
{
|
||||||
|
UINT8 cnt;
|
||||||
|
|
||||||
|
for( cnt=0; cnt<NUM_INV_OPTIONS; cnt++)
|
||||||
|
{
|
||||||
|
ButtonList[ guiINVOptionToggles[ cnt ] ]->uiFlags &= ~BUTTON_CLICKED_ON;
|
||||||
|
}
|
||||||
|
|
||||||
|
//enable the current button
|
||||||
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UINT8 cnt;
|
||||||
|
BOOLEAN fAnyChecked=FALSE;
|
||||||
|
|
||||||
|
//if none of the other boxes are checked, do not uncheck this box
|
||||||
|
for( cnt=0; cnt<NUM_INV_OPTIONS; cnt++)
|
||||||
|
{
|
||||||
|
if( ButtonList[ guiINVOptionToggles[ cnt ] ]->uiFlags & BUTTON_CLICKED_ON )
|
||||||
|
{
|
||||||
|
fAnyChecked = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//if none are checked, re check this one
|
||||||
|
if( !fAnyChecked )
|
||||||
|
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void BtnGameStyleTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
void BtnGameStyleTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
UINT8 ubButton = (UINT8)MSYS_GetBtnUserData( btn, 0 );
|
/*UINT8 ubButton = (UINT8)*/MSYS_GetBtnUserData( btn, 0 );
|
||||||
|
|
||||||
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||||
{
|
{
|
||||||
@@ -941,7 +1038,7 @@ void BtnGunOptionsTogglesCallback( GUI_BUTTON *btn, INT32 reason )
|
|||||||
{
|
{
|
||||||
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if( reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
UINT8 ubButton = (UINT8)MSYS_GetBtnUserData( btn, 0 );
|
/*UINT8 ubButton = (UINT8)*/MSYS_GetBtnUserData( btn, 0 );
|
||||||
|
|
||||||
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
if( btn->uiFlags & BUTTON_CLICKED_ON )
|
||||||
{
|
{
|
||||||
@@ -1093,6 +1190,21 @@ UINT8 GetCurrentBROptionButtonSetting()
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
UINT8 GetCurrentINVOptionButtonSetting()
|
||||||
|
{
|
||||||
|
UINT8 cnt;
|
||||||
|
|
||||||
|
for( cnt=0; cnt<NUM_INV_OPTIONS; cnt++)
|
||||||
|
{
|
||||||
|
if( ButtonList[ guiINVOptionToggles[ cnt ] ]->uiFlags & BUTTON_CLICKED_ON )
|
||||||
|
{
|
||||||
|
return( cnt );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return( 0 );
|
||||||
|
}
|
||||||
|
|
||||||
UINT8 GetCurrentGameStyleButtonSetting()
|
UINT8 GetCurrentGameStyleButtonSetting()
|
||||||
{
|
{
|
||||||
UINT8 cnt;
|
UINT8 cnt;
|
||||||
@@ -1215,6 +1327,16 @@ void RestoreGIOButtonBackGrounds()
|
|||||||
RestoreExternBackgroundRect( GIO_BR_SETTING_X+GIO_OFFSET_TO_TOGGLE_BOX, usPosY, 34, 29 );
|
RestoreExternBackgroundRect( GIO_BR_SETTING_X+GIO_OFFSET_TO_TOGGLE_BOX, usPosY, 34, 29 );
|
||||||
usPosY += GIO_GAP_BN_SETTINGS-5;
|
usPosY += GIO_GAP_BN_SETTINGS-5;
|
||||||
}
|
}
|
||||||
|
// CHRISL
|
||||||
|
|
||||||
|
if(iResolution != 0){
|
||||||
|
usPosY = GIO_INV_SETTING_Y-GIO_OFFSET_TO_TOGGLE_BOX_Y;
|
||||||
|
for( cnt=0; cnt<NUM_INV_OPTIONS; cnt++)
|
||||||
|
{
|
||||||
|
RestoreExternBackgroundRect( GIO_INV_SETTING_X+GIO_OFFSET_TO_TOGGLE_BOX, usPosY, 34, 29 );
|
||||||
|
usPosY += GIO_GAP_BN_SETTINGS-5;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1246,6 +1368,19 @@ void DoneFadeOutForExitGameInitOptionScreen( void )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
if(iResolution != 0){
|
||||||
|
switch ( GetCurrentINVOptionButtonSetting() )
|
||||||
|
{
|
||||||
|
case GIO_INV_OLD:
|
||||||
|
gGameOptions.ubInventorySystem = INVENTORY_OLD;
|
||||||
|
break;
|
||||||
|
case GIO_INV_NEW:
|
||||||
|
gGameOptions.ubInventorySystem = INVENTORY_NEW;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// gubGIOExitScreen = INIT_SCREEN;
|
// gubGIOExitScreen = INIT_SCREEN;
|
||||||
gubGIOExitScreen = INTRO_SCREEN;
|
gubGIOExitScreen = INTRO_SCREEN;
|
||||||
|
|
||||||
@@ -1281,13 +1416,13 @@ void DoneFadeInForExitGameInitOptionScreen( void )
|
|||||||
|
|
||||||
BOOLEAN DoGioMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
BOOLEAN DoGioMessageBox( UINT8 ubStyle, const STR16 zString, UINT32 uiExitScreen, UINT16 usFlags, MSGBOX_CALLBACK ReturnCallback )
|
||||||
{
|
{
|
||||||
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1 };
|
SGPRect CenteringRect= {0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1 };
|
||||||
|
|
||||||
// reset exit mode
|
// reset exit mode
|
||||||
// gfExitGioDueToMessageBox = TRUE;
|
// gfExitGioDueToMessageBox = TRUE;
|
||||||
|
|
||||||
// do message box and return
|
// do message box and return
|
||||||
giGioMessageBox = DoMessageBox( ubStyle, zString, uiExitScreen, ( UINT16 ) ( usFlags| MSG_BOX_FLAG_USE_CENTERING_RECT ), ReturnCallback, &CenteringRect );
|
giGioMessageBox = DoMessageBox( ubStyle, zString, uiExitScreen, ( UINT16 ) ( usFlags| MSG_BOX_FLAG_USE_CENTERING_RECT ), ReturnCallback, &CenteringRect );
|
||||||
|
|
||||||
// send back return state
|
// send back return state
|
||||||
return( ( giGioMessageBox != -1 ) );
|
return( ( giGioMessageBox != -1 ) );
|
||||||
|
|||||||
+40
-26
@@ -67,7 +67,10 @@ void CDromEjectionErrorMessageBoxCallBack( UINT8 bExitValue );
|
|||||||
//Change this number when we want any who gets the new build to reset the options
|
//Change this number when we want any who gets the new build to reset the options
|
||||||
#define GAME_SETTING_CURRENT_VERSION 522
|
#define GAME_SETTING_CURRENT_VERSION 522
|
||||||
|
|
||||||
|
bool UsingNewInventorySystem()
|
||||||
|
{
|
||||||
|
return (gGameOptions.ubInventorySystem == INVENTORY_NEW);
|
||||||
|
}
|
||||||
|
|
||||||
BOOLEAN LoadGameSettings()
|
BOOLEAN LoadGameSettings()
|
||||||
{
|
{
|
||||||
@@ -296,6 +299,7 @@ void InitGameOptions()
|
|||||||
gGameOptions.fAirStrikes = FALSE;
|
gGameOptions.fAirStrikes = FALSE;
|
||||||
gGameOptions.ubGameStyle = STYLE_SCIFI;
|
gGameOptions.ubGameStyle = STYLE_SCIFI;
|
||||||
gGameOptions.ubDifficultyLevel = DIF_LEVEL_MEDIUM;
|
gGameOptions.ubDifficultyLevel = DIF_LEVEL_MEDIUM;
|
||||||
|
gGameOptions.ubInventorySystem = INVENTORY_NEW;
|
||||||
//gGameOptions.fTurnTimeLimit = FALSE;
|
//gGameOptions.fTurnTimeLimit = FALSE;
|
||||||
|
|
||||||
gGameOptions.fIronManMode = FALSE;
|
gGameOptions.fIronManMode = FALSE;
|
||||||
@@ -339,9 +343,9 @@ void LoadGameExternalOptions()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Note: put -1 between male/female slots and -1 at end. This allows everything to be
|
// Note: put -1 between male/female slots and -1 at end. This allows everything to be
|
||||||
// counted dynamically quite easily. Note that all the code assumes there is AT
|
// counted dynamically quite easily. Note that all the code assumes there is AT
|
||||||
// LEAST ONE slot for each sex. If that changes the code will have to be updated.
|
// LEAST ONE slot for each sex. If that changes the code will have to be updated.
|
||||||
//
|
//
|
||||||
// Because errors in these values can really goof things up we will try to fix up bad
|
// Because errors in these values can really goof things up we will try to fix up bad
|
||||||
// values and use the defaults instead.
|
// values and use the defaults instead.
|
||||||
@@ -397,11 +401,11 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.fAllMercsAvailable = iniReader.ReadBoolean("JA2 Laptop Settings","ALL_MERCS_AT_MERC",FALSE);
|
gGameExternalOptions.fAllMercsAvailable = iniReader.ReadBoolean("JA2 Laptop Settings","ALL_MERCS_AT_MERC",FALSE);
|
||||||
|
|
||||||
//Merc Death Settings:
|
//Merc Death Settings:
|
||||||
gGameExternalOptions.gfMercsDieOnAssignment = iniReader.ReadBoolean("JA2 Laptop Settings","MERCS_DIE_ON_ASSIGNMENT",TRUE);
|
gGameExternalOptions.gfMercsDieOnAssignment = iniReader.ReadBoolean("JA2 Laptop Settings","MERCS_DIE_ON_ASSIGNMENT",TRUE);
|
||||||
gGameExternalOptions.giEasyMercDeaths = iniReader.ReadInteger("JA2 Laptop Settings","EASY_MERC_DEATHS",1);
|
gGameExternalOptions.giEasyMercDeaths = iniReader.ReadInteger("JA2 Laptop Settings","EASY_MERC_DEATHS",1);
|
||||||
gGameExternalOptions.giExperiencedMercDeaths = iniReader.ReadInteger("JA2 Laptop Settings","EXPERIENCED_MERC_DEATHS",2);
|
gGameExternalOptions.giExperiencedMercDeaths = iniReader.ReadInteger("JA2 Laptop Settings","EXPERIENCED_MERC_DEATHS",2);
|
||||||
gGameExternalOptions.giExpertMercDeaths = iniReader.ReadInteger("JA2 Laptop Settings","EXPERT_MERC_DEATHS",3);
|
gGameExternalOptions.giExpertMercDeaths = iniReader.ReadInteger("JA2 Laptop Settings","EXPERT_MERC_DEATHS",3);
|
||||||
gGameExternalOptions.giInsaneMercDeaths = iniReader.ReadInteger("JA2 Laptop Settings","INSANE_MERC_DEATHS",4);
|
gGameExternalOptions.giInsaneMercDeaths = iniReader.ReadInteger("JA2 Laptop Settings","INSANE_MERC_DEATHS",4);
|
||||||
|
|
||||||
//################# System Settings #################
|
//################# System Settings #################
|
||||||
gGameExternalOptions.gubDeadLockDelay = (UINT8) iniReader.ReadInteger("JA2 System Settings","DEAD_LOCK_DELAY",15);
|
gGameExternalOptions.gubDeadLockDelay = (UINT8) iniReader.ReadInteger("JA2 System Settings","DEAD_LOCK_DELAY",15);
|
||||||
@@ -427,7 +431,7 @@ void LoadGameExternalOptions()
|
|||||||
|
|
||||||
//################# Tactical Settings #################
|
//################# Tactical Settings #################
|
||||||
|
|
||||||
gGameExternalOptions.gfRevealItems = iniReader.ReadBoolean("JA2 Tactical Settings","REVEAL_ITEMS_AFTER_COMBAT",TRUE);
|
gGameExternalOptions.gfRevealItems = iniReader.ReadBoolean("JA2 Tactical Settings","REVEAL_ITEMS_AFTER_COMBAT",TRUE);
|
||||||
|
|
||||||
// Militia Settings
|
// Militia Settings
|
||||||
gGameExternalOptions.fAllowTacticalMilitiaCommand = iniReader.ReadBoolean("JA2 Tactical Settings","ALLOW_TACTICAL_MILITIA_COMMAND",0);
|
gGameExternalOptions.fAllowTacticalMilitiaCommand = iniReader.ReadBoolean("JA2 Tactical Settings","ALLOW_TACTICAL_MILITIA_COMMAND",0);
|
||||||
@@ -473,6 +477,9 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.fEnableSoldierTooltipBigSlot2 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_2", TRUE);
|
gGameExternalOptions.fEnableSoldierTooltipBigSlot2 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_2", TRUE);
|
||||||
gGameExternalOptions.fEnableSoldierTooltipBigSlot3 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_3", TRUE);
|
gGameExternalOptions.fEnableSoldierTooltipBigSlot3 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_3", TRUE);
|
||||||
gGameExternalOptions.fEnableSoldierTooltipBigSlot4 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_4", TRUE);
|
gGameExternalOptions.fEnableSoldierTooltipBigSlot4 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_4", TRUE);
|
||||||
|
gGameExternalOptions.fEnableSoldierTooltipBigSlot5 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_5", TRUE);
|
||||||
|
gGameExternalOptions.fEnableSoldierTooltipBigSlot6 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_6", TRUE);
|
||||||
|
gGameExternalOptions.fEnableSoldierTooltipBigSlot7 = iniReader.ReadBoolean("JA2 Tactical Settings", "SOLDIER_TOOLTIP_DISPLAY_BIG_SLOT_7", TRUE);
|
||||||
// ShadoWarrior: Tooltip changes (end)
|
// ShadoWarrior: Tooltip changes (end)
|
||||||
|
|
||||||
// Unload weapons & remove attachments
|
// Unload weapons & remove attachments
|
||||||
@@ -515,6 +522,7 @@ void LoadGameExternalOptions()
|
|||||||
//Lalien: Game starting time
|
//Lalien: Game starting time
|
||||||
gGameExternalOptions.iGameStartingTime = iniReader.ReadInteger("JA2 Gameplay Settings", "GAME_STARTING_TIME", NUM_SEC_IN_HOUR);
|
gGameExternalOptions.iGameStartingTime = iniReader.ReadInteger("JA2 Gameplay Settings", "GAME_STARTING_TIME", NUM_SEC_IN_HOUR);
|
||||||
|
|
||||||
|
|
||||||
// WANNE: Check for invalid starting time
|
// WANNE: Check for invalid starting time
|
||||||
if (gGameExternalOptions.iGameStartingTime < 0 || gGameExternalOptions.iGameStartingTime >= NUM_SEC_IN_DAY)
|
if (gGameExternalOptions.iGameStartingTime < 0 || gGameExternalOptions.iGameStartingTime >= NUM_SEC_IN_DAY)
|
||||||
{
|
{
|
||||||
@@ -538,7 +546,7 @@ void LoadGameExternalOptions()
|
|||||||
gGameExternalOptions.fStealingDisabled = iniReader.ReadBoolean("JA2 Gameplay Settings","STEALING_FROM_SHIPMENTS_DISABLED",FALSE);
|
gGameExternalOptions.fStealingDisabled = iniReader.ReadBoolean("JA2 Gameplay Settings","STEALING_FROM_SHIPMENTS_DISABLED",FALSE);
|
||||||
|
|
||||||
// WDS: Game progress
|
// WDS: Game progress
|
||||||
gGameExternalOptions.ubGameProgressPortionKills = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_KILLS",25);
|
gGameExternalOptions.ubGameProgressPortionKills = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_KILLS",25);
|
||||||
gGameExternalOptions.ubGameProgressPortionControl = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_CONTROL",25);
|
gGameExternalOptions.ubGameProgressPortionControl = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_CONTROL",25);
|
||||||
gGameExternalOptions.ubGameProgressPortionIncome = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_INCOME",50);
|
gGameExternalOptions.ubGameProgressPortionIncome = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_INCOME",50);
|
||||||
gGameExternalOptions.ubGameProgressPortionVisited = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_VISITED",0);
|
gGameExternalOptions.ubGameProgressPortionVisited = iniReader.ReadInteger("JA2 Gameplay Settings","GAME_PROGRESS_VISITED",0);
|
||||||
@@ -546,7 +554,7 @@ void LoadGameExternalOptions()
|
|||||||
// Any way to warn on this?
|
// Any way to warn on this?
|
||||||
if (gGameExternalOptions.ubGameProgressPortionKills + gGameExternalOptions.ubGameProgressPortionControl + gGameExternalOptions.ubGameProgressPortionIncome + gGameExternalOptions.ubGameProgressPortionVisited != 100)
|
if (gGameExternalOptions.ubGameProgressPortionKills + gGameExternalOptions.ubGameProgressPortionControl + gGameExternalOptions.ubGameProgressPortionIncome + gGameExternalOptions.ubGameProgressPortionVisited != 100)
|
||||||
{
|
{
|
||||||
gGameExternalOptions.ubGameProgressPortionKills = 25;
|
gGameExternalOptions.ubGameProgressPortionKills = 25;
|
||||||
gGameExternalOptions.ubGameProgressPortionControl = 25;
|
gGameExternalOptions.ubGameProgressPortionControl = 25;
|
||||||
gGameExternalOptions.ubGameProgressPortionIncome = 50;
|
gGameExternalOptions.ubGameProgressPortionIncome = 50;
|
||||||
gGameExternalOptions.ubGameProgressPortionVisited = 0;
|
gGameExternalOptions.ubGameProgressPortionVisited = 0;
|
||||||
@@ -708,6 +716,14 @@ void LoadGameExternalOptions()
|
|||||||
// WANNE: Added INI file Option for enemy ambushes, so we also have the option to play vanilla ja2 ambush settings
|
// WANNE: Added INI file Option for enemy ambushes, so we also have the option to play vanilla ja2 ambush settings
|
||||||
gGameExternalOptions.fEnableChanceOfEnemyAmbushesOnInsaneDifficult = iniReader.ReadBoolean("JA2 Gameplay Settings", "ENABLE_CHANCE_OF_ENEMY_AMBUSHES_ON_INSANE_DIFFICULT", TRUE);
|
gGameExternalOptions.fEnableChanceOfEnemyAmbushesOnInsaneDifficult = iniReader.ReadBoolean("JA2 Gameplay Settings", "ENABLE_CHANCE_OF_ENEMY_AMBUSHES_ON_INSANE_DIFFICULT", TRUE);
|
||||||
|
|
||||||
|
// CHRISL: New setting to allow Slay to remain as a hired PC
|
||||||
|
gGameExternalOptions.fEnableSlayForever = iniReader.ReadBoolean("JA2 Gameplay Settings", "SLAY_FOREVER", FALSE);
|
||||||
|
|
||||||
|
// CHRISL: New setting to determine the AP cost to reload 1 loose round of ammo
|
||||||
|
gGameExternalOptions.ubAPCostPerRound = iniReader.ReadInteger("JA2 Gameplay Settings","AP_COST_PER_ROUND",2);
|
||||||
|
|
||||||
|
// CHRISL: New setting to determine AP multiplier when reloading with wrong sized clip
|
||||||
|
gGameExternalOptions.ubWrongMagMult = iniReader.ReadFloat("JA2 Gameplay Settings","WRONG_MAG_MULT",2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -720,7 +736,6 @@ BOOLEAN GetCDLocation( )
|
|||||||
{
|
{
|
||||||
UINT32 uiStrngLength = 0;
|
UINT32 uiStrngLength = 0;
|
||||||
CHAR8 zCdLocation[ SGPFILENAME_LEN ];
|
CHAR8 zCdLocation[ SGPFILENAME_LEN ];
|
||||||
//UINT32 uiDriveType=0;
|
|
||||||
UINT32 uiRetVal=0;
|
UINT32 uiRetVal=0;
|
||||||
|
|
||||||
//Do a crude check to make sure the Ja2.ini file is the right on
|
//Do a crude check to make sure the Ja2.ini file is the right on
|
||||||
@@ -751,9 +766,9 @@ BOOLEAN GetCDLocation( )
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Now create a new file
|
//Now create a new file
|
||||||
WritePrivateProfileString( "Ja2 Settings", "CD", zCdLocation, GAME_INI_FILE );
|
WritePrivateProfileString( "Ja2 Settings", "CD", zCdLocation, GAME_INI_FILE );
|
||||||
|
|
||||||
GetPrivateProfileString( "Ja2 Settings","CD", "", zCdLocation, SGPFILENAME_LEN, GAME_INI_FILE );
|
GetPrivateProfileString( "Ja2 Settings","CD", "", zCdLocation, SGPFILENAME_LEN, GAME_INI_FILE );
|
||||||
}
|
}
|
||||||
|
|
||||||
uiStrngLength = strlen( zCdLocation );
|
uiStrngLength = strlen( zCdLocation );
|
||||||
@@ -892,7 +907,6 @@ BOOLEAN CheckIfGameCdromIsInCDromDrive()
|
|||||||
CHAR8 zCdFile[ SGPFILENAME_LEN ];
|
CHAR8 zCdFile[ SGPFILENAME_LEN ];
|
||||||
|
|
||||||
CHAR8 zCdromRootDrive[512];
|
CHAR8 zCdromRootDrive[512];
|
||||||
//BOOLEAN fFailed = FALSE;
|
|
||||||
UINT32 uiVolumeReturnValue;
|
UINT32 uiVolumeReturnValue;
|
||||||
UINT32 uiLastError = ERROR_SUCCESS;
|
UINT32 uiLastError = ERROR_SUCCESS;
|
||||||
|
|
||||||
@@ -903,7 +917,7 @@ BOOLEAN CheckIfGameCdromIsInCDromDrive()
|
|||||||
|
|
||||||
if( !uiVolumeReturnValue )
|
if( !uiVolumeReturnValue )
|
||||||
{
|
{
|
||||||
uiLastError = GetLastError();
|
uiLastError = GetLastError();
|
||||||
}
|
}
|
||||||
|
|
||||||
// OK, build filename
|
// OK, build filename
|
||||||
@@ -917,7 +931,7 @@ BOOLEAN CheckIfGameCdromIsInCDromDrive()
|
|||||||
//if a game has been started, add the msg about saving the game to a different entry
|
//if a game has been started, add the msg about saving the game to a different entry
|
||||||
if( gTacticalStatus.fHasAGameBeenStarted )
|
if( gTacticalStatus.fHasAGameBeenStarted )
|
||||||
{
|
{
|
||||||
sprintf( sString, "%S %S", pMessageStrings[ MSG_INTEGRITY_WARNING ], pMessageStrings[ MSG_CDROM_SAVE_GAME ] );
|
sprintf( sString, "%S %S", pMessageStrings[ MSG_INTEGRITY_WARNING ], pMessageStrings[ MSG_CDROM_SAVE_GAME ] );
|
||||||
|
|
||||||
SaveGame( SAVE__ERROR_NUM, pMessageStrings[ MSG_CDROM_SAVE ] );
|
SaveGame( SAVE__ERROR_NUM, pMessageStrings[ MSG_CDROM_SAVE ] );
|
||||||
}
|
}
|
||||||
@@ -926,15 +940,15 @@ BOOLEAN CheckIfGameCdromIsInCDromDrive()
|
|||||||
sprintf( sString, "%S", pMessageStrings[ MSG_INTEGRITY_WARNING ] );
|
sprintf( sString, "%S", pMessageStrings[ MSG_INTEGRITY_WARNING ] );
|
||||||
}
|
}
|
||||||
|
|
||||||
// ATE: These are ness. due to reference counting
|
// ATE: These are ness. due to reference counting
|
||||||
// in showcursor(). I'm not about to go digging in low level stuff at this
|
// in showcursor(). I'm not about to go digging in low level stuff at this
|
||||||
// point in the game development, so keep these here, as this works...
|
// point in the game development, so keep these here, as this works...
|
||||||
// ShowCursor(TRUE);
|
// ShowCursor(TRUE);
|
||||||
// ShowCursor(TRUE);
|
// ShowCursor(TRUE);
|
||||||
ShutdownWithErrorBox( sString );
|
ShutdownWithErrorBox( sString );
|
||||||
|
|
||||||
//DoTester( );
|
//DoTester( );
|
||||||
//MessageBox(NULL, sString, "Error", MB_OK | MB_ICONERROR );
|
//MessageBox(NULL, sString, "Error", MB_OK | MB_ICONERROR );
|
||||||
|
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-3
@@ -93,6 +93,12 @@ typedef struct
|
|||||||
|
|
||||||
} GAME_SETTINGS;
|
} GAME_SETTINGS;
|
||||||
|
|
||||||
|
// CHRISL: New Enums to track inventory system
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
INVENTORY_OLD = 0,
|
||||||
|
INVENTORY_NEW = 1
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
//Enums for the difficulty levels
|
//Enums for the difficulty levels
|
||||||
@@ -131,10 +137,13 @@ typedef struct
|
|||||||
BOOLEAN fTurnTimeLimit;
|
BOOLEAN fTurnTimeLimit;
|
||||||
BOOLEAN fIronManMode;
|
BOOLEAN fIronManMode;
|
||||||
UINT8 ubBobbyRay;
|
UINT8 ubBobbyRay;
|
||||||
UINT8 ubFiller[7];
|
UINT8 ubInventorySystem;
|
||||||
|
UINT8 ubFiller[6];
|
||||||
|
|
||||||
} GAME_OPTIONS;
|
} GAME_OPTIONS;
|
||||||
|
|
||||||
|
bool UsingNewInventorySystem();
|
||||||
|
|
||||||
// Snap: Options read from an INI file in the default of custom Data directory
|
// Snap: Options read from an INI file in the default of custom Data directory
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -254,7 +263,7 @@ typedef struct
|
|||||||
|
|
||||||
|
|
||||||
//Sight range
|
//Sight range
|
||||||
UINT32 ubStraightSightRange;
|
UINT32 ubStraightSightRange;
|
||||||
UINT32 ubVisDistDecreasePerRainIntensity;
|
UINT32 ubVisDistDecreasePerRainIntensity;
|
||||||
BOOLEAN gfAllowLimitedVision;
|
BOOLEAN gfAllowLimitedVision;
|
||||||
|
|
||||||
@@ -413,6 +422,9 @@ typedef struct
|
|||||||
BOOLEAN fEnableSoldierTooltipBigSlot2;
|
BOOLEAN fEnableSoldierTooltipBigSlot2;
|
||||||
BOOLEAN fEnableSoldierTooltipBigSlot3;
|
BOOLEAN fEnableSoldierTooltipBigSlot3;
|
||||||
BOOLEAN fEnableSoldierTooltipBigSlot4;
|
BOOLEAN fEnableSoldierTooltipBigSlot4;
|
||||||
|
BOOLEAN fEnableSoldierTooltipBigSlot5;
|
||||||
|
BOOLEAN fEnableSoldierTooltipBigSlot6;
|
||||||
|
BOOLEAN fEnableSoldierTooltipBigSlot7;
|
||||||
// ShadoWarrior: Tooltip changes (end)
|
// ShadoWarrior: Tooltip changes (end)
|
||||||
|
|
||||||
//Kaiden MERC Deaths Externalized:
|
//Kaiden MERC Deaths Externalized:
|
||||||
@@ -425,9 +437,17 @@ typedef struct
|
|||||||
// Lesh: slow enemy items choice progress
|
// Lesh: slow enemy items choice progress
|
||||||
BOOLEAN fSlowProgressForEnemyItemsChoice;
|
BOOLEAN fSlowProgressForEnemyItemsChoice;
|
||||||
|
|
||||||
|
// CHRISL: option to allow Slay to remain as a hired PC
|
||||||
|
BOOLEAN fEnableSlayForever;
|
||||||
|
|
||||||
|
// CHRISL: New setting to determine the AP cost to reload 1 loose round of ammo
|
||||||
|
INT32 ubAPCostPerRound;
|
||||||
|
|
||||||
|
// CHRISL: New setting to determine AP multiplier when reloading with wrong sized clip
|
||||||
|
FLOAT ubWrongMagMult;
|
||||||
} GAME_EXTERNAL_OPTIONS;
|
} GAME_EXTERNAL_OPTIONS;
|
||||||
|
|
||||||
//This structure will contain general Ja2 settings NOT individual game settings.
|
//This structure will contain general Ja2 settings NOT individual game settings.
|
||||||
extern GAME_SETTINGS gGameSettings;
|
extern GAME_SETTINGS gGameSettings;
|
||||||
|
|
||||||
//This structure will contain the Game options set at the beginning of the game.
|
//This structure will contain the Game options set at the beginning of the game.
|
||||||
|
|||||||
+11
-12
@@ -10,10 +10,15 @@
|
|||||||
// Keeps track of the game version
|
// Keeps track of the game version
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2EDITOR
|
||||||
|
|
||||||
|
//MAP EDITOR BUILD VERSION
|
||||||
|
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.1855.NI.B11.1" };
|
||||||
|
|
||||||
|
#elif defined JA2BETAVERSION
|
||||||
|
|
||||||
//BETA/TEST BUILD VERSION
|
//BETA/TEST BUILD VERSION
|
||||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.1202" };
|
CHAR16 zVersionLabel[256] = { L"Debug v1.13.1855.NI.B11.1" };
|
||||||
|
|
||||||
#elif defined CRIPPLED_VERSION
|
#elif defined CRIPPLED_VERSION
|
||||||
|
|
||||||
@@ -23,19 +28,13 @@ CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
//RELEASE BUILD VERSION
|
//RELEASE BUILD VERSION
|
||||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.1797" };
|
CHAR16 zVersionLabel[256] = { L"Release v1.13.1855.NI.B11.1" };
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CHAR8 czVersionNumber[16] = { "Build 08.02.24" }; //YY.MM.DD
|
//CHAR8 czVersionNumber[16] = { "Build 08.02.24" }; //YY.MM.DD
|
||||||
|
CHAR8 czVersionNumber[16] = { "Beta 08.03.03" }; //YY.MM.DD
|
||||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||||
|
|
||||||
|
|
||||||
//
|
// SAVE_GAME_VERSION is defined in header, change it there
|
||||||
// Keeps track of the saved game version. Increment the saved game version whenever
|
|
||||||
// you will invalidate the saved game file
|
|
||||||
|
|
||||||
#define SAVE_GAME_VERSION 101 //100 // 99
|
|
||||||
|
|
||||||
const UINT32 guiSavedGameVersion = SAVE_GAME_VERSION;
|
|
||||||
|
|||||||
+12
-8
@@ -16,16 +16,20 @@ extern CHAR8 czVersionNumber[16];
|
|||||||
extern CHAR16 zTrackingNumber[16];
|
extern CHAR16 zTrackingNumber[16];
|
||||||
|
|
||||||
|
|
||||||
|
//ADB: I needed these here so I moved them, and why put them in *.cpp anyways?
|
||||||
|
//
|
||||||
|
// Keeps track of the saved game version. Increment the saved game version whenever
|
||||||
|
// you will invalidate the saved game file
|
||||||
|
#define SAVE_GAME_VERSION 103 //102 //101 //100 // 99
|
||||||
|
|
||||||
|
|
||||||
|
//these I don't so much need here
|
||||||
|
#define CURRENT_SAVEGAME_DATATYPE_VERSION 103
|
||||||
|
#define FIRST_SAVEGAME_DATATYPE_CHANGE 102
|
||||||
|
//#define SECOND_SAVEGAME_DATATYPE_CHANGE 999, #define CURRENT_SAVEGAME_DATATYPE_VERSION 999
|
||||||
|
|
||||||
|
|
||||||
//#define RUSSIANGOLD
|
//#define RUSSIANGOLD
|
||||||
|
|
||||||
//
|
|
||||||
// Keeps track of the saved game version. Increment the saved game version whenever
|
|
||||||
// you will invalidate the saved game file
|
|
||||||
//
|
|
||||||
|
|
||||||
const extern UINT32 guiSavedGameVersion;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0"?>
|
||||||
<VisualStudioPropertySheet
|
<VisualStudioPropertySheet
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8.00"
|
Version="8.00"
|
||||||
|
|||||||
+65
-65
@@ -300,31 +300,31 @@ BOOLEAN gfScrollBoxIsScrolling = FALSE;
|
|||||||
BOOLEAN gfHaveRenderedFirstFrameToSaveBuffer=FALSE;
|
BOOLEAN gfHaveRenderedFirstFrameToSaveBuffer=FALSE;
|
||||||
|
|
||||||
|
|
||||||
// must use this cause you have ur cursor over a button when entering the help screen, the button will burn though.
|
// must use this cause you have ur cursor over a button when entering the help screen, the button will burn though.
|
||||||
//It does this cause that region loses it focus so it draws the button again.
|
//It does this cause that region loses it focus so it draws the button again.
|
||||||
UINT8 gubRenderHelpScreenTwiceInaRow=0;
|
UINT8 gubRenderHelpScreenTwiceInaRow=0;
|
||||||
|
|
||||||
//mmm
|
//mmm
|
||||||
|
|
||||||
// region to mask the background
|
// region to mask the background
|
||||||
MOUSE_REGION gHelpScreenFullScreenMask;
|
MOUSE_REGION gHelpScreenFullScreenMask;
|
||||||
//void SelectHelpTextFullScreenMaskCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
//void SelectHelpTextFullScreenMaskCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
|
|
||||||
// region to mask the background
|
// region to mask the background
|
||||||
MOUSE_REGION gHelpScreenScrollArea;
|
MOUSE_REGION gHelpScreenScrollArea;
|
||||||
void SelectHelpScrollAreaMovementCallBack( MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectHelpScrollAreaMovementCallBack( MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
void SelectHelpScrollAreaCallBack( MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectHelpScrollAreaCallBack( MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
// region to mask the background
|
// region to mask the background
|
||||||
MOUSE_REGION gHelpScreenScrollAreaArrows;
|
MOUSE_REGION gHelpScreenScrollAreaArrows;
|
||||||
void SelectHelpScrollAreaArrowsCallBack( MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectHelpScrollAreaArrowsCallBack( MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
|
|
||||||
//checkbox to toggle show help again toggle
|
//checkbox to toggle show help again toggle
|
||||||
UINT32 gHelpScreenDontShowHelpAgainToggle;
|
UINT32 gHelpScreenDontShowHelpAgainToggle;
|
||||||
void BtnHelpScreenDontShowHelpAgainCallback(GUI_BUTTON *btn,INT32 reason);
|
void BtnHelpScreenDontShowHelpAgainCallback(GUI_BUTTON *btn,INT32 reason);
|
||||||
//MOUSE_REGION HelpScreenDontShowHelpAgainToggleTextRegion;
|
//MOUSE_REGION HelpScreenDontShowHelpAgainToggleTextRegion;
|
||||||
//void HelpScreenDontShowHelpAgainToggleTextRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
//void HelpScreenDontShowHelpAgainToggleTextRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
|
|
||||||
@@ -520,7 +520,7 @@ void HelpScreenHandler()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// render buttons marked dirty
|
// render buttons marked dirty
|
||||||
// MarkButtonsDirty( );
|
// MarkButtonsDirty( );
|
||||||
RenderButtons( );
|
RenderButtons( );
|
||||||
|
|
||||||
SaveBackgroundRects( );
|
SaveBackgroundRects( );
|
||||||
@@ -546,7 +546,7 @@ void HelpScreenHandler()
|
|||||||
|
|
||||||
BOOLEAN EnterHelpScreen()
|
BOOLEAN EnterHelpScreen()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
UINT16 usPosX, usPosY;//, usWidth, usHeight;
|
UINT16 usPosX, usPosY;//, usWidth, usHeight;
|
||||||
// INT32 iStartLoc;
|
// INT32 iStartLoc;
|
||||||
// CHAR16 zText[1024];
|
// CHAR16 zText[1024];
|
||||||
@@ -569,8 +569,8 @@ BOOLEAN EnterHelpScreen()
|
|||||||
|
|
||||||
//Create a mouse region 'mask' the entrire screen
|
//Create a mouse region 'mask' the entrire screen
|
||||||
MSYS_DefineRegion( &gHelpScreenFullScreenMask, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, MSYS_PRIORITY_HIGHEST,
|
MSYS_DefineRegion( &gHelpScreenFullScreenMask, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, MSYS_PRIORITY_HIGHEST,
|
||||||
gHelpScreen.usCursor, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
gHelpScreen.usCursor, MSYS_NO_CALLBACK, MSYS_NO_CALLBACK );
|
||||||
MSYS_AddRegion( &gHelpScreenFullScreenMask );
|
MSYS_AddRegion( &gHelpScreenFullScreenMask );
|
||||||
|
|
||||||
|
|
||||||
//Create the exit button
|
//Create the exit button
|
||||||
@@ -585,11 +585,11 @@ BOOLEAN EnterHelpScreen()
|
|||||||
giExitBtnImage = LoadButtonImage("INTERFACE\\HelpScreen.sti", -1,0,4,2,6 );
|
giExitBtnImage = LoadButtonImage("INTERFACE\\HelpScreen.sti", -1,0,4,2,6 );
|
||||||
|
|
||||||
guiHelpScreenExitBtn = CreateIconAndTextButton( giExitBtnImage, L"", HELP_SCREEN_BTN_FONT,
|
guiHelpScreenExitBtn = CreateIconAndTextButton( giExitBtnImage, L"", HELP_SCREEN_BTN_FONT,
|
||||||
HELP_SCREEN_BTN_FONT_ON_COLOR, DEFAULT_SHADOW,
|
HELP_SCREEN_BTN_FONT_ON_COLOR, DEFAULT_SHADOW,
|
||||||
HELP_SCREEN_BTN_FONT_OFF_COLOR, DEFAULT_SHADOW,
|
HELP_SCREEN_BTN_FONT_OFF_COLOR, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
|
usPosX, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnHelpScreenExitCallback );
|
DEFAULT_MOVE_CALLBACK, BtnHelpScreenExitCallback );
|
||||||
SetButtonFastHelpText( guiHelpScreenExitBtn, gzHelpScreenText[HLP_SCRN_TXT__EXIT_SCREEN] );
|
SetButtonFastHelpText( guiHelpScreenExitBtn, gzHelpScreenText[HLP_SCRN_TXT__EXIT_SCREEN] );
|
||||||
SetButtonCursor( guiHelpScreenExitBtn, gHelpScreen.usCursor);
|
SetButtonCursor( guiHelpScreenExitBtn, gHelpScreen.usCursor);
|
||||||
|
|
||||||
@@ -632,8 +632,8 @@ BOOLEAN EnterHelpScreen()
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
MSYS_DefineRegion( &HelpScreenDontShowHelpAgainToggleTextRegion, usPosX, usPosY, (UINT16)(usPosX+usWidth), (UINT16)(usPosY+usHeight), MSYS_PRIORITY_HIGHEST-1,
|
MSYS_DefineRegion( &HelpScreenDontShowHelpAgainToggleTextRegion, usPosX, usPosY, (UINT16)(usPosX+usWidth), (UINT16)(usPosY+usHeight), MSYS_PRIORITY_HIGHEST-1,
|
||||||
gHelpScreen.usCursor, MSYS_NO_CALLBACK, HelpScreenDontShowHelpAgainToggleTextRegionCallBack );
|
gHelpScreen.usCursor, MSYS_NO_CALLBACK, HelpScreenDontShowHelpAgainToggleTextRegionCallBack );
|
||||||
MSYS_AddRegion( &HelpScreenDontShowHelpAgainToggleTextRegion );
|
MSYS_AddRegion( &HelpScreenDontShowHelpAgainToggleTextRegion );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// load the help screen background graphic and add it
|
// load the help screen background graphic and add it
|
||||||
@@ -680,7 +680,7 @@ BOOLEAN EnterHelpScreen()
|
|||||||
|
|
||||||
void HandleHelpScreen()
|
void HandleHelpScreen()
|
||||||
{
|
{
|
||||||
//if any of the possible screens need to have a some code done every loop.. its done in here
|
//if any of the possible screens need to have a some code done every loop.. its done in here
|
||||||
SpecialHandlerCode();
|
SpecialHandlerCode();
|
||||||
|
|
||||||
if( gfScrollBoxIsScrolling )
|
if( gfScrollBoxIsScrolling )
|
||||||
@@ -825,7 +825,7 @@ void ExitHelpScreen()
|
|||||||
|
|
||||||
BOOLEAN DrawHelpScreenBackGround()
|
BOOLEAN DrawHelpScreenBackGround()
|
||||||
{
|
{
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
UINT16 usPosX;
|
UINT16 usPosX;
|
||||||
|
|
||||||
//Get and display the background image
|
//Get and display the background image
|
||||||
@@ -836,13 +836,13 @@ BOOLEAN DrawHelpScreenBackGround()
|
|||||||
//if there are buttons, blit the button border
|
//if there are buttons, blit the button border
|
||||||
if( gHelpScreen.bNumberOfButtons != 0 )
|
if( gHelpScreen.bNumberOfButtons != 0 )
|
||||||
{
|
{
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, HLP_SCRN_BUTTON_BORDER, usPosX, gHelpScreen.usScreenLocY, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, HLP_SCRN_BUTTON_BORDER, usPosX, gHelpScreen.usScreenLocY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
usPosX += HELP_SCREEN_BUTTON_BORDER_WIDTH;
|
usPosX += HELP_SCREEN_BUTTON_BORDER_WIDTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, HLP_SCRN_DEFAULT_TYPE, usPosX, gHelpScreen.usScreenLocY, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, HLP_SCRN_DEFAULT_TYPE, usPosX, gHelpScreen.usScreenLocY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
InvalidateRegion( gHelpScreen.usScreenLocX, gHelpScreen.usScreenLocY, gHelpScreen.usScreenLocX+gHelpScreen.usScreenWidth, gHelpScreen.usScreenLocY + gHelpScreen.usScreenHeight );
|
InvalidateRegion( gHelpScreen.usScreenLocX, gHelpScreen.usScreenLocY, gHelpScreen.usScreenLocX+gHelpScreen.usScreenWidth, gHelpScreen.usScreenLocY + gHelpScreen.usScreenHeight );
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
}
|
}
|
||||||
@@ -917,17 +917,17 @@ void SetSizeAndPropertiesOfHelpScreen()
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
AssertMsg( 0, "Error in help screen. DF 0" );
|
AssertMsg( 0, "Error in help screen. DF 0" );
|
||||||
#else
|
#else
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//if there are buttons
|
//if there are buttons
|
||||||
if( gHelpScreen.bNumberOfButtons != 0 )
|
if( gHelpScreen.bNumberOfButtons != 0 )
|
||||||
gHelpScreen.usLeftMarginPosX = gHelpScreen.usScreenLocX + HELP_SCREEN_TEXT_LEFT_MARGIN_WITH_BTN;
|
gHelpScreen.usLeftMarginPosX = gHelpScreen.usScreenLocX + HELP_SCREEN_TEXT_LEFT_MARGIN_WITH_BTN;
|
||||||
else
|
else
|
||||||
gHelpScreen.usLeftMarginPosX = gHelpScreen.usScreenLocX + HELP_SCREEN_TEXT_LEFT_MARGIN;
|
gHelpScreen.usLeftMarginPosX = gHelpScreen.usScreenLocX + HELP_SCREEN_TEXT_LEFT_MARGIN;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -961,11 +961,11 @@ void CreateHelpScreenButtons()
|
|||||||
giHelpScreenButtonsImage[i] = UseLoadedButtonImage( giExitBtnImage, -1,1,5,3,7 );
|
giHelpScreenButtonsImage[i] = UseLoadedButtonImage( giExitBtnImage, -1,1,5,3,7 );
|
||||||
|
|
||||||
guiHelpScreenBtns[i] = CreateIconAndTextButton( giHelpScreenButtonsImage[i], sText, HELP_SCREEN_BTN_FONT,
|
guiHelpScreenBtns[i] = CreateIconAndTextButton( giHelpScreenButtonsImage[i], sText, HELP_SCREEN_BTN_FONT,
|
||||||
HELP_SCREEN_BTN_FONT_ON_COLOR, DEFAULT_SHADOW,
|
HELP_SCREEN_BTN_FONT_ON_COLOR, DEFAULT_SHADOW,
|
||||||
HELP_SCREEN_BTN_FONT_OFF_COLOR, DEFAULT_SHADOW,
|
HELP_SCREEN_BTN_FONT_OFF_COLOR, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
|
usPosX, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnHelpScreenBtnsCallback);
|
DEFAULT_MOVE_CALLBACK, BtnHelpScreenBtnsCallback);
|
||||||
|
|
||||||
|
|
||||||
SetButtonCursor( guiHelpScreenBtns[i], gHelpScreen.usCursor);
|
SetButtonCursor( guiHelpScreenBtns[i], gHelpScreen.usCursor);
|
||||||
@@ -984,16 +984,16 @@ void CreateHelpScreenButtons()
|
|||||||
void GetHelpScreenUserInput()
|
void GetHelpScreenUserInput()
|
||||||
{
|
{
|
||||||
InputAtom Event;
|
InputAtom Event;
|
||||||
POINT MousePos;
|
POINT MousePos;
|
||||||
|
|
||||||
GetCursorPos(&MousePos);
|
GetCursorPos(&MousePos);
|
||||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||||
|
|
||||||
while( DequeueEvent( &Event ) )
|
while( DequeueEvent( &Event ) )
|
||||||
{
|
{
|
||||||
// HOOK INTO MOUSE HOOKS
|
// HOOK INTO MOUSE HOOKS
|
||||||
switch( Event.usEvent)
|
switch( Event.usEvent)
|
||||||
{
|
{
|
||||||
case LEFT_BUTTON_DOWN:
|
case LEFT_BUTTON_DOWN:
|
||||||
MouseSystemHook(LEFT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
MouseSystemHook(LEFT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
||||||
break;
|
break;
|
||||||
@@ -1079,7 +1079,7 @@ void GetHelpScreenUserInput()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
InvalidateRegion( gHelpScreen.usScreenLocX, gHelpScreen.usScreenLocY, gHelpScreen.usScreenLocX+gHelpScreen.usScreenWidth, gHelpScreen.usScreenLocY + gHelpScreen.usScreenHeight );
|
InvalidateRegion( gHelpScreen.usScreenLocX, gHelpScreen.usScreenLocY, gHelpScreen.usScreenLocX+gHelpScreen.usScreenWidth, gHelpScreen.usScreenLocY + gHelpScreen.usScreenHeight );
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -1149,9 +1149,9 @@ void HelpScreenSpecialExitCode()
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
AssertMsg( 0, "Error in help screen. DF 0" );
|
AssertMsg( 0, "Error in help screen. DF 0" );
|
||||||
#else
|
#else
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1192,9 +1192,9 @@ void SpecialHandlerCode()
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
AssertMsg( 0, "Error in help screen: SpecialHandlerCode(). DF 0" );
|
AssertMsg( 0, "Error in help screen: SpecialHandlerCode(). DF 0" );
|
||||||
#else
|
#else
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1207,9 +1207,9 @@ UINT16 RenderSpecificHelpScreen()
|
|||||||
|
|
||||||
//set the buffer for the text to go to
|
//set the buffer for the text to go to
|
||||||
// SetFontDestBuffer( guiHelpScreenTextBufferSurface, gHelpScreen.usLeftMarginPosX, gHelpScreen.usScreenLocY + HELP_SCREEN_TEXT_OFFSET_Y,
|
// SetFontDestBuffer( guiHelpScreenTextBufferSurface, gHelpScreen.usLeftMarginPosX, gHelpScreen.usScreenLocY + HELP_SCREEN_TEXT_OFFSET_Y,
|
||||||
// HLP_SCRN__WIDTH_OF_TEXT_BUFFER, HLP_SCRN__NUMBER_BYTES_IN_TEXT_BUFFER, FALSE );
|
// HLP_SCRN__WIDTH_OF_TEXT_BUFFER, HLP_SCRN__NUMBER_BYTES_IN_TEXT_BUFFER, FALSE );
|
||||||
SetFontDestBuffer( guiHelpScreenTextBufferSurface, 0, 0,
|
SetFontDestBuffer( guiHelpScreenTextBufferSurface, 0, 0,
|
||||||
HLP_SCRN__WIDTH_OF_TEXT_BUFFER, HLP_SCRN__HEIGHT_OF_TEXT_BUFFER, FALSE );
|
HLP_SCRN__WIDTH_OF_TEXT_BUFFER, HLP_SCRN__HEIGHT_OF_TEXT_BUFFER, FALSE );
|
||||||
|
|
||||||
|
|
||||||
//switch on the current screen
|
//switch on the current screen
|
||||||
@@ -1241,9 +1241,9 @@ UINT16 RenderSpecificHelpScreen()
|
|||||||
default:
|
default:
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
SetFontDestBuffer( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, FALSE );
|
||||||
AssertMsg( 0, "Error in help screen: RenderSpecificHelpScreen(). DF 0" );
|
AssertMsg( 0, "Error in help screen: RenderSpecificHelpScreen(). DF 0" );
|
||||||
#else
|
#else
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1306,9 +1306,9 @@ void DisplayCurrentScreenTitleAndFooter()
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
AssertMsg( 0, "Error in help screen: DisplayCurrentScreenTitleAndFooter(). DF 0" );
|
AssertMsg( 0, "Error in help screen: DisplayCurrentScreenTitleAndFooter(). DF 0" );
|
||||||
#else
|
#else
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1329,12 +1329,12 @@ void DisplayCurrentScreenTitleAndFooter()
|
|||||||
usPosX = gHelpScreen.usLeftMarginPosX;
|
usPosX = gHelpScreen.usLeftMarginPosX;
|
||||||
|
|
||||||
// DrawTextToScreen( zText, usPosX, (UINT16)(gHelpScreen.usScreenLocY+HELP_SCREEN_TITLE_OFFSET_Y), usWidth,
|
// DrawTextToScreen( zText, usPosX, (UINT16)(gHelpScreen.usScreenLocY+HELP_SCREEN_TITLE_OFFSET_Y), usWidth,
|
||||||
// HELP_SCREEN_TITLE_BODY_FONT, HELP_SCREEN_TITLE_BODY_COLOR, HELP_SCREEN_TEXT_BACKGROUND, FALSE, CENTER_JUSTIFIED );
|
// HELP_SCREEN_TITLE_BODY_FONT, HELP_SCREEN_TITLE_BODY_COLOR, HELP_SCREEN_TEXT_BACKGROUND, FALSE, CENTER_JUSTIFIED );
|
||||||
|
|
||||||
//Display the Title
|
//Display the Title
|
||||||
IanDisplayWrappedString( usPosX, (UINT16)(gHelpScreen.usScreenLocY+HELP_SCREEN_TITLE_OFFSET_Y), usWidth, HELP_SCREEN_GAP_BTN_LINES,
|
IanDisplayWrappedString( usPosX, (UINT16)(gHelpScreen.usScreenLocY+HELP_SCREEN_TITLE_OFFSET_Y), usWidth, HELP_SCREEN_GAP_BTN_LINES,
|
||||||
HELP_SCREEN_TITLE_BODY_FONT, HELP_SCREEN_TITLE_BODY_COLOR, zText,
|
HELP_SCREEN_TITLE_BODY_FONT, HELP_SCREEN_TITLE_BODY_COLOR, zText,
|
||||||
HELP_SCREEN_TEXT_BACKGROUND, FALSE, 0 );
|
HELP_SCREEN_TEXT_BACKGROUND, FALSE, 0 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1346,12 +1346,12 @@ void DisplayCurrentScreenTitleAndFooter()
|
|||||||
|
|
||||||
usPosY = gHelpScreen.usScreenLocY+HELP_SCREEN_HELP_REMINDER_Y;
|
usPosY = gHelpScreen.usScreenLocY+HELP_SCREEN_HELP_REMINDER_Y;
|
||||||
// DrawTextToScreen( zText, usPosX, usPosY, usWidth,
|
// DrawTextToScreen( zText, usPosX, usPosY, usWidth,
|
||||||
// HELP_SCREEN_TEXT_BODY_FONT, HELP_SCREEN_TITLE_BODY_COLOR, HELP_SCREEN_TEXT_BACKGROUND, FALSE, CENTER_JUSTIFIED );
|
// HELP_SCREEN_TEXT_BODY_FONT, HELP_SCREEN_TITLE_BODY_COLOR, HELP_SCREEN_TEXT_BACKGROUND, FALSE, CENTER_JUSTIFIED );
|
||||||
|
|
||||||
|
|
||||||
IanDisplayWrappedString( usPosX, usPosY, usWidth, HELP_SCREEN_GAP_BTN_LINES,
|
IanDisplayWrappedString( usPosX, usPosY, usWidth, HELP_SCREEN_GAP_BTN_LINES,
|
||||||
HELP_SCREEN_TITLE_BODY_FONT, HELP_SCREEN_TITLE_BODY_COLOR, zText,
|
HELP_SCREEN_TITLE_BODY_FONT, HELP_SCREEN_TITLE_BODY_COLOR, zText,
|
||||||
HELP_SCREEN_TEXT_BACKGROUND, FALSE, 0 );
|
HELP_SCREEN_TEXT_BACKGROUND, FALSE, 0 );
|
||||||
|
|
||||||
if( !gHelpScreen.fForceHelpScreenToComeUp )
|
if( !gHelpScreen.fForceHelpScreenToComeUp )
|
||||||
{
|
{
|
||||||
@@ -1366,8 +1366,8 @@ void DisplayCurrentScreenTitleAndFooter()
|
|||||||
|
|
||||||
//Display the ' [ x ] Dont display again...'
|
//Display the ' [ x ] Dont display again...'
|
||||||
IanDisplayWrappedString( usPosX, usPosY, usWidth, HELP_SCREEN_GAP_BTN_LINES,
|
IanDisplayWrappedString( usPosX, usPosY, usWidth, HELP_SCREEN_GAP_BTN_LINES,
|
||||||
HELP_SCREEN_TEXT_BODY_FONT, HELP_SCREEN_TITLE_BODY_COLOR, zText,
|
HELP_SCREEN_TEXT_BODY_FONT, HELP_SCREEN_TITLE_BODY_COLOR, zText,
|
||||||
HELP_SCREEN_TEXT_BACKGROUND, FALSE, 0 );
|
HELP_SCREEN_TEXT_BACKGROUND, FALSE, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
SetFontShadow( DEFAULT_SHADOW );
|
SetFontShadow( DEFAULT_SHADOW );
|
||||||
@@ -1481,8 +1481,8 @@ UINT16 GetAndDisplayHelpScreenText( UINT32 uiRecord, UINT16 usPosX, UINT16 usPos
|
|||||||
|
|
||||||
//Display the text
|
//Display the text
|
||||||
usNumVertPixels = IanDisplayWrappedString( usPosX, usPosY, usWidth, HELP_SCREEN_GAP_BTN_LINES,
|
usNumVertPixels = IanDisplayWrappedString( usPosX, usPosY, usWidth, HELP_SCREEN_GAP_BTN_LINES,
|
||||||
HELP_SCREEN_TEXT_BODY_FONT, HELP_SCREEN_TEXT_BODY_COLOR, zText,
|
HELP_SCREEN_TEXT_BODY_FONT, HELP_SCREEN_TEXT_BODY_COLOR, zText,
|
||||||
HELP_SCREEN_TEXT_BACKGROUND, FALSE, 0 );
|
HELP_SCREEN_TEXT_BACKGROUND, FALSE, 0 );
|
||||||
|
|
||||||
SetFontShadow( DEFAULT_SHADOW );
|
SetFontShadow( DEFAULT_SHADOW );
|
||||||
|
|
||||||
@@ -2189,8 +2189,8 @@ void ChangeHelpScreenSubPage()
|
|||||||
|
|
||||||
void ClearHelpScreenTextBuffer()
|
void ClearHelpScreenTextBuffer()
|
||||||
{
|
{
|
||||||
UINT32 uiDestPitchBYTES;
|
UINT32 uiDestPitchBYTES;
|
||||||
UINT8 *pDestBuf;
|
UINT8 *pDestBuf;
|
||||||
|
|
||||||
// CLEAR THE FRAME BUFFER
|
// CLEAR THE FRAME BUFFER
|
||||||
pDestBuf = LockVideoSurface( guiHelpScreenTextBufferSurface, &uiDestPitchBYTES );
|
pDestBuf = LockVideoSurface( guiHelpScreenTextBufferSurface, &uiDestPitchBYTES );
|
||||||
@@ -2259,8 +2259,8 @@ void DisplayHelpScreenTextBufferScrollBox()
|
|||||||
{
|
{
|
||||||
INT32 iSizeOfBox;
|
INT32 iSizeOfBox;
|
||||||
INT32 iTopPosScrollBox=0;
|
INT32 iTopPosScrollBox=0;
|
||||||
UINT8 *pDestBuf;
|
UINT8 *pDestBuf;
|
||||||
UINT32 uiDestPitchBYTES;
|
UINT32 uiDestPitchBYTES;
|
||||||
UINT16 usPosX;
|
UINT16 usPosX;
|
||||||
|
|
||||||
if( gHelpScreen.bNumberOfButtons != 0 )
|
if( gHelpScreen.bNumberOfButtons != 0 )
|
||||||
@@ -2326,8 +2326,8 @@ void CreateScrollAreaButtons()
|
|||||||
|
|
||||||
//Create a mouse region 'mask' the entrire screen
|
//Create a mouse region 'mask' the entrire screen
|
||||||
MSYS_DefineRegion( &gHelpScreenScrollArea, usPosX, (UINT16)iPosY, (UINT16)(usPosX+usWidth), (UINT16)(iPosY+HLP_SCRN__HEIGHT_OF_SCROLL_AREA), MSYS_PRIORITY_HIGHEST,
|
MSYS_DefineRegion( &gHelpScreenScrollArea, usPosX, (UINT16)iPosY, (UINT16)(usPosX+usWidth), (UINT16)(iPosY+HLP_SCRN__HEIGHT_OF_SCROLL_AREA), MSYS_PRIORITY_HIGHEST,
|
||||||
gHelpScreen.usCursor, SelectHelpScrollAreaMovementCallBack, SelectHelpScrollAreaCallBack );
|
gHelpScreen.usCursor, SelectHelpScrollAreaMovementCallBack, SelectHelpScrollAreaCallBack );
|
||||||
MSYS_AddRegion( &gHelpScreenScrollArea );
|
MSYS_AddRegion( &gHelpScreenScrollArea );
|
||||||
|
|
||||||
guiHelpScreenScrollArrowImage[ 0 ] = LoadButtonImage( "INTERFACE\\HelpScreen.sti", 14,10, 11, 12 ,13 );
|
guiHelpScreenScrollArrowImage[ 0 ] = LoadButtonImage( "INTERFACE\\HelpScreen.sti", 14,10, 11, 12 ,13 );
|
||||||
guiHelpScreenScrollArrowImage[ 1 ] = UseLoadedButtonImage( guiHelpScreenScrollArrowImage[ 0 ] ,19,15,16,17,18 );
|
guiHelpScreenScrollArrowImage[ 1 ] = UseLoadedButtonImage( guiHelpScreenScrollArrowImage[ 0 ] ,19,15,16,17,18 );
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ typedef struct
|
|||||||
|
|
||||||
INT32 iLastMouseClickY; //last position the mouse was clicked ( if != -1 )
|
INT32 iLastMouseClickY; //last position the mouse was clicked ( if != -1 )
|
||||||
|
|
||||||
INT8 bCurrentHelpScreenActiveSubPage; //used to keep track of the current page being displayed
|
INT8 bCurrentHelpScreenActiveSubPage; //used to keep track of the current page being displayed
|
||||||
|
|
||||||
INT8 bNumberOfButtons;
|
INT8 bNumberOfButtons;
|
||||||
|
|
||||||
|
|||||||
@@ -62,11 +62,18 @@
|
|||||||
#include "editscreen.h"
|
#include "editscreen.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "Sector Summary.h"
|
||||||
extern BOOLEAN GetCDromDriveLetter( STR8 pString );
|
extern BOOLEAN GetCDromDriveLetter( STR8 pString );
|
||||||
|
|
||||||
// The InitializeGame function is responsible for setting up all data and Gaming Engine
|
// The InitializeGame function is responsible for setting up all data and Gaming Engine
|
||||||
// tasks which will run the game
|
// tasks which will run the game
|
||||||
|
|
||||||
|
#ifdef JA2EDITOR
|
||||||
|
#define BUILD_AS_EDITOR_ONLY
|
||||||
|
#else
|
||||||
|
#undef BUILD_AS_EDITOR_ONLY
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
extern BOOLEAN gfUseConsecutiveQuickSaveSlots;
|
extern BOOLEAN gfUseConsecutiveQuickSaveSlots;
|
||||||
#endif
|
#endif
|
||||||
@@ -88,6 +95,7 @@ extern BOOLEAN gfUseConsecutiveQuickSaveSlots;
|
|||||||
|
|
||||||
extern HINSTANCE ghInstance;
|
extern HINSTANCE ghInstance;
|
||||||
|
|
||||||
|
extern OBJECTTYPE GLOCK_17_ForUseWithLOS;
|
||||||
|
|
||||||
// Prepends the language prefix to the file name in a proposed path.
|
// Prepends the language prefix to the file name in a proposed path.
|
||||||
static void AddLanguagePrefix(STR fileName, const STR language)
|
static void AddLanguagePrefix(STR fileName, const STR language)
|
||||||
@@ -184,13 +192,13 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
||||||
// Lesh: added this, begin
|
// Lesh: added this, begin
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
strcat(fileName, BURSTSOUNDSFILENAME);
|
strcat(fileName, BURSTSOUNDSFILENAME);
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
if(!ReadInBurstSoundArray(fileName))
|
if(!ReadInBurstSoundArray(fileName))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
// Lesh: end
|
// Lesh: end
|
||||||
|
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
strcat(fileName, ITEMSFILENAME);
|
strcat(fileName, ITEMSFILENAME);
|
||||||
@@ -202,7 +210,7 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
|
|||||||
// The idea here is that we can have a separate xml file that's named differently
|
// The idea here is that we can have a separate xml file that's named differently
|
||||||
// but only contains the relevant tags that need to be localized
|
// but only contains the relevant tags that need to be localized
|
||||||
// then when the file is read in using the same xml reader code, it will only overwrite
|
// then when the file is read in using the same xml reader code, it will only overwrite
|
||||||
// the tags that are contained in the localized file. This only works for items.xml
|
// the tags that are contained in the localized file. This only works for items.xml
|
||||||
// since I tweaked the xml_items.cpp to make it work :p
|
// since I tweaked the xml_items.cpp to make it work :p
|
||||||
// So for instance, the german file would be called German.Items.xml and would only contain
|
// So for instance, the german file would be called German.Items.xml and would only contain
|
||||||
// the uiIndex (for reference), szItemName, szLongItemName, szItemDesc, szBRName, and szBRDesc tags
|
// the uiIndex (for reference), szItemName, szLongItemName, szItemDesc, szBRName, and szBRDesc tags
|
||||||
@@ -286,6 +294,50 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
|
|||||||
if(!ReadInArmourStats(fileName))
|
if(!ReadInArmourStats(fileName))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
strcpy(fileName, directoryName);
|
||||||
|
strcat(fileName, LOADBEARINGEQUIPMENTFILENAME);
|
||||||
|
if(!ReadInlbeStats(fileName))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
strcpy(fileName, directoryName);
|
||||||
|
strcat(fileName, LBEPOCKETFILENAME);
|
||||||
|
if(!ReadInLBEPocketStats(fileName,FALSE))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
//CHRISL: Simple localization
|
||||||
|
// Same setup as what Madd used for items.xml
|
||||||
|
|
||||||
|
#ifdef GERMAN
|
||||||
|
strcpy(fileName, directoryName);
|
||||||
|
strcat(fileName, GERMAN_PREFIX);
|
||||||
|
strcat(fileName, LBEPOCKETFILENAME);
|
||||||
|
if ( FileExists(fileName) )
|
||||||
|
{
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
|
if(!ReadInLBEPocketStats(fileName,TRUE))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef RUSSIAN
|
||||||
|
strcpy(fileName, directoryName);
|
||||||
|
strcat(fileName, RUSSIAN_PREFIX);
|
||||||
|
strcat(fileName, LBEPOCKETFILENAME);
|
||||||
|
if ( FileExists(fileName) )
|
||||||
|
{
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
|
if(!ReadInLBEPocketStats(fileName,TRUE))
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
strcpy(fileName, directoryName);
|
||||||
|
strcat(fileName, MERCSTARTINGGEARFILENAME);
|
||||||
|
if(!ReadInMercStartingGearStats(fileName))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
strcat(fileName, WEAPONSFILENAME);
|
strcat(fileName, WEAPONSFILENAME);
|
||||||
if(!ReadInWeaponStats(fileName))
|
if(!ReadInWeaponStats(fileName))
|
||||||
@@ -405,8 +457,8 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Lesh: Strategic movement costs will be read in Strategic\Strategic Movement Costs.cpp,
|
// Lesh: Strategic movement costs will be read in Strategic\Strategic Movement Costs.cpp,
|
||||||
// function BOOLEAN InitStrategicMovementCosts();
|
// function BOOLEAN InitStrategicMovementCosts();
|
||||||
// It is called several times from various places and acts after clearing SectorInfo array
|
// It is called several times from various places and acts after clearing SectorInfo array
|
||||||
|
|
||||||
// Lesh: load altsectors list
|
// Lesh: load altsectors list
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
@@ -438,14 +490,14 @@ BOOLEAN LoadExternalGameplayData(STR directoryName)
|
|||||||
|
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
strcat(fileName, EXPLOSIONDATAFILENAME);
|
strcat(fileName, EXPLOSIONDATAFILENAME);
|
||||||
if(!ReadInExplosionDataStats(fileName))
|
if(!ReadInExplosionDataStats(fileName))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
// Kaiden: Read in Restricted Sectors for Mobile Militia
|
// Kaiden: Read in Restricted Sectors for Mobile Militia
|
||||||
strcpy(fileName, directoryName);
|
strcpy(fileName, directoryName);
|
||||||
strcat(fileName, ROAMINGMILITIAFILENAME);
|
strcat(fileName, ROAMINGMILITIAFILENAME);
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("LoadExternalGameplayData, fileName = %s", fileName));
|
||||||
if(!ReadInRoamingInfo(fileName))
|
if(!ReadInRoamingInfo(fileName))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -459,7 +511,7 @@ UINT32 InitializeJA2(void)
|
|||||||
HandleLaserLockResult( PrepareLaserLockSystem() );
|
HandleLaserLockResult( PrepareLaserLockSystem() );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
HandleJA2CDCheck( );
|
HandleJA2CDCheck( );
|
||||||
|
|
||||||
gfWorldLoaded = FALSE;
|
gfWorldLoaded = FALSE;
|
||||||
|
|
||||||
@@ -548,6 +600,11 @@ UINT32 InitializeJA2(void)
|
|||||||
return( ERROR_SCREEN );
|
return( ERROR_SCREEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//ADB When a merc calcs CTGT for a thrown item he uses a GLOCK temp item
|
||||||
|
//but we don't want to recreate it every single time CTGT is called, so init the GLOCK here
|
||||||
|
CreateItem(GLOCK_17, 100, &GLOCK_17_ForUseWithLOS);
|
||||||
|
|
||||||
|
|
||||||
#ifdef JA2BETAVERSION
|
#ifdef JA2BETAVERSION
|
||||||
#ifdef JA2EDITOR
|
#ifdef JA2EDITOR
|
||||||
|
|
||||||
@@ -595,7 +652,7 @@ UINT32 InitializeJA2(void)
|
|||||||
//also set the sector
|
//also set the sector
|
||||||
gWorldSectorX = 0;
|
gWorldSectorX = 0;
|
||||||
gWorldSectorY = 0;
|
gWorldSectorY = 0;
|
||||||
gfAutoLoadA9 = TRUE;
|
gfAutoLoadA9 = FALSE;
|
||||||
gfIntendOnEnteringEditor = TRUE;
|
gfIntendOnEnteringEditor = TRUE;
|
||||||
gGameOptions.fGunNut = TRUE;
|
gGameOptions.fGunNut = TRUE;
|
||||||
gGameOptions.fAirStrikes = FALSE;
|
gGameOptions.fAirStrikes = FALSE;
|
||||||
@@ -615,6 +672,23 @@ UINT32 InitializeJA2(void)
|
|||||||
gGameOptions.fAirStrikes = FALSE;
|
gGameOptions.fAirStrikes = FALSE;
|
||||||
return( GAME_SCREEN );
|
return( GAME_SCREEN );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BUILD_AS_EDITOR_ONLY
|
||||||
|
//ADB We are building with JA2EDITOR, why force a commandline arguement???
|
||||||
|
//build once, rename, change the define and build again
|
||||||
|
//no pesky shortcuts
|
||||||
|
OutputDebugString( "Beginning JA2EDITOR without using a commandline argument...\n" );
|
||||||
|
//For editor purposes, need to know the default map file.
|
||||||
|
sprintf( gubFilename, "none");
|
||||||
|
//also set the sector
|
||||||
|
gWorldSectorX = 0;
|
||||||
|
gWorldSectorY = 0;
|
||||||
|
gfAutoLoadA9 = TRUE;
|
||||||
|
gfIntendOnEnteringEditor = TRUE;
|
||||||
|
gGameOptions.fGunNut = TRUE;
|
||||||
|
gGameOptions.fAirStrikes = FALSE;
|
||||||
|
return( GAME_SCREEN );
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -624,7 +698,7 @@ UINT32 InitializeJA2(void)
|
|||||||
|
|
||||||
void ShutdownJA2(void)
|
void ShutdownJA2(void)
|
||||||
{
|
{
|
||||||
UINT32 uiIndex;
|
UINT32 uiIndex;
|
||||||
|
|
||||||
// Clear screen....
|
// Clear screen....
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
@@ -642,11 +716,11 @@ void ShutdownJA2(void)
|
|||||||
// Shutdown queue system
|
// Shutdown queue system
|
||||||
ShutdownDialogueControl();
|
ShutdownDialogueControl();
|
||||||
|
|
||||||
// Shutdown Screens
|
// Shutdown Screens
|
||||||
for (uiIndex = 0; uiIndex < MAX_SCREENS; uiIndex++)
|
for (uiIndex = 0; uiIndex < MAX_SCREENS; uiIndex++)
|
||||||
{
|
{
|
||||||
(*(GameScreens[uiIndex].ShutdownScreen))();
|
(*(GameScreens[uiIndex].ShutdownScreen))();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Shutdown animation system
|
// Shutdown animation system
|
||||||
@@ -742,8 +816,8 @@ void HandleLaserLockResult( BOOLEAN fSuccess )
|
|||||||
|
|
||||||
sprintf( zString, "%S", gzLateLocalizedString[56] );
|
sprintf( zString, "%S", gzLateLocalizedString[56] );
|
||||||
|
|
||||||
// ShowCursor(TRUE);
|
// ShowCursor(TRUE);
|
||||||
// ShowCursor(TRUE);
|
// ShowCursor(TRUE);
|
||||||
ShutdownWithErrorBox( zString );
|
ShutdownWithErrorBox( zString );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -279,17 +279,17 @@ void HandleIntroScreen()
|
|||||||
void GetIntroScreenUserInput()
|
void GetIntroScreenUserInput()
|
||||||
{
|
{
|
||||||
InputAtom Event;
|
InputAtom Event;
|
||||||
POINT MousePos;
|
POINT MousePos;
|
||||||
|
|
||||||
|
|
||||||
GetCursorPos(&MousePos);
|
GetCursorPos(&MousePos);
|
||||||
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
ScreenToClient(ghWindow, &MousePos); // In window coords!
|
||||||
|
|
||||||
while( DequeueEvent( &Event ) )
|
while( DequeueEvent( &Event ) )
|
||||||
{
|
{
|
||||||
// HOOK INTO MOUSE HOOKS
|
// HOOK INTO MOUSE HOOKS
|
||||||
switch( Event.usEvent)
|
switch( Event.usEvent)
|
||||||
{
|
{
|
||||||
case LEFT_BUTTON_DOWN:
|
case LEFT_BUTTON_DOWN:
|
||||||
MouseSystemHook(LEFT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
MouseSystemHook(LEFT_BUTTON_DOWN, (INT16)MousePos.x, (INT16)MousePos.y,_LeftButtonDown, _RightButtonDown);
|
||||||
break;
|
break;
|
||||||
@@ -499,12 +499,12 @@ void SetIntroType( INT8 bIntroType )
|
|||||||
|
|
||||||
void DisplaySirtechSplashScreen()
|
void DisplaySirtechSplashScreen()
|
||||||
{
|
{
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
UINT32 uiLogoID;
|
UINT32 uiLogoID;
|
||||||
|
|
||||||
UINT32 uiDestPitchBYTES;
|
UINT32 uiDestPitchBYTES;
|
||||||
UINT8 *pDestBuf;
|
UINT8 *pDestBuf;
|
||||||
|
|
||||||
|
|
||||||
// CLEAR THE FRAME BUFFER
|
// CLEAR THE FRAME BUFFER
|
||||||
@@ -520,22 +520,22 @@ void DisplaySirtechSplashScreen()
|
|||||||
// FilenameForBPP("INTERFACE\\TShold.sti", VObjectDesc.ImageFile);
|
// FilenameForBPP("INTERFACE\\TShold.sti", VObjectDesc.ImageFile);
|
||||||
if( !AddVideoObject(&VObjectDesc, &uiLogoID) )
|
if( !AddVideoObject(&VObjectDesc, &uiLogoID) )
|
||||||
{
|
{
|
||||||
FilenameForBPP("GERMAN\\SPLASH_GERMAN.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("GERMAN\\SPLASH_GERMAN.sti", VObjectDesc.ImageFile);
|
||||||
if( !AddVideoObject(&VObjectDesc, &uiLogoID) )
|
if( !AddVideoObject(&VObjectDesc, &uiLogoID) )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* This is the place, where most non english coders stranding.
|
* This is the place, where most non english coders stranding.
|
||||||
* Don't hesitate, don't give up!
|
* Don't hesitate, don't give up!
|
||||||
* I'll now tell You what You made wrong
|
* I'll now tell You what You made wrong
|
||||||
* (2006-10-10, Sergeant_Kolja)
|
* (2006-10-10, Sergeant_Kolja)
|
||||||
*/
|
*/
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
# if defined(ENGLISH)
|
# if defined(ENGLISH)
|
||||||
AssertMsg( 0, String( "Wheter English nor German works. May be You built English - but have only German or other foreign Disk?" ) );
|
AssertMsg( 0, String( "Wheter English nor German works. May be You built English - but have only German or other foreign Disk?" ) );
|
||||||
# elif defined(GERMAN)
|
# elif defined(GERMAN)
|
||||||
AssertMsg( 0, String( "Weder Englisch noch Deutsch geht. Deutsche Version kompiliert und mit englischer CDs gestartet? Das geht nicht!" ) );
|
AssertMsg( 0, String( "Weder Englisch noch Deutsch geht. Deutsche Version kompiliert und mit englischer CDs gestartet? Das geht nicht!" ) );
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
AssertMsg( 0, String( "Failed to load %s", VObjectDesc.ImageFile ) );
|
AssertMsg( 0, String( "Failed to load %s", VObjectDesc.ImageFile ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@ void InitJA2SplashScreen()
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
UINT32 uiLogoID = 0;
|
UINT32 uiLogoID = 0;
|
||||||
HVSURFACE hVSurface; // unused jonathanl // lalien reenabled for international versions
|
HVSURFACE hVSurface; // unused jonathanl // lalien reenabled for international versions
|
||||||
VSURFACE_DESC VSurfaceDesc; //unused jonathanl // lalien reenabled for international versions
|
VSURFACE_DESC VSurfaceDesc; //unused jonathanl // lalien reenabled for international versions
|
||||||
#ifdef JA2TESTVERSION
|
#ifdef JA2TESTVERSION
|
||||||
INT32 i = 0;
|
INT32 i = 0;
|
||||||
|
|||||||
+2
-5
@@ -43,7 +43,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="libexpatMT.lib mss32.lib winmm.lib smackw32.lib fmodvc.lib lua51.lib"
|
AdditionalDependencies="libexpatMT.lib mss32.lib winmm.lib smackw32.lib fmodvc.lib lua51.lib"
|
||||||
OutputFile="D:\Games\Jagged Alliance 2\ja2_debug_vs2003.exe"
|
OutputFile="C:\Games\Jagged Alliance 2\ja2_debug_1020_en.exe"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="TRUE"
|
||||||
IgnoreDefaultLibraryNames="libcmt;LIBCD"
|
IgnoreDefaultLibraryNames="libcmt;LIBCD"
|
||||||
@@ -545,7 +545,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="libexpatMT.lib winmm.lib smackw32.lib mss32.lib fmodvc.lib lua51.lib"
|
AdditionalDependencies="libexpatMT.lib winmm.lib smackw32.lib mss32.lib fmodvc.lib lua51.lib"
|
||||||
OutputFile="D:\games\Jagged Alliance 2 v1.13\JA2 v1.13.1796_EN.exe"
|
OutputFile="C:\games\Jagged Alliance 2\JA2_vs2003_release.exe"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
SuppressStartupBanner="TRUE"
|
SuppressStartupBanner="TRUE"
|
||||||
IgnoreDefaultLibraryNames=""
|
IgnoreDefaultLibraryNames=""
|
||||||
@@ -2246,9 +2246,6 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath="builddefines.h">
|
RelativePath="builddefines.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\Cheats.h">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="Credits.h">
|
RelativePath="Credits.h">
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
#include "Language Defines.h"
|
||||||
|
|
||||||
|
#if defined(ENGLISH)
|
||||||
|
# pragma message(" (Language set to ENGLISH, You'll need english CDs)")
|
||||||
|
#elif defined(GERMAN)
|
||||||
|
# pragma message(" (Language set to GERMAN, You'll need Topware/german CDs)")
|
||||||
|
#elif defined(RUSSIAN)
|
||||||
|
# pragma message(" (Language set to RUSSIAN, You'll need russian CDs)")
|
||||||
|
#elif defined(DUTCH)
|
||||||
|
# pragma message(" (Language set to DUTCH, You'll need dutch CDs)")
|
||||||
|
#elif defined(POLISH)
|
||||||
|
# pragma message(" (Language set to POLISH, You'll need polish CDs)")
|
||||||
|
#elif defined(FRENCH)
|
||||||
|
# pragma message(" (Language set to FRENCH, You'll need french CDs)")
|
||||||
|
#elif defined(ITALIAN)
|
||||||
|
# pragma message(" (Language set to ITALIAN, You'll need italian CDs)")
|
||||||
|
#elif defined(TAIWANESE)
|
||||||
|
# pragma message(" (Language set to TAIWANESE, You'll need taiwanese CDs)")
|
||||||
|
#else
|
||||||
|
# error "At least You have to specify a Language somewhere. See comments above."
|
||||||
|
#endif
|
||||||
+7
-16
@@ -15,16 +15,20 @@
|
|||||||
* using one of the two later methods will keep this SVN file unchanged for the
|
* using one of the two later methods will keep this SVN file unchanged for the
|
||||||
* future, only Your private project files (workspace/solution) will differ
|
* future, only Your private project files (workspace/solution) will differ
|
||||||
* from the SVN stuff.
|
* from the SVN stuff.
|
||||||
* (2006-10-10, Sergeant_Kolja)
|
* (2006-10-10, Sergeant_Kolja)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(ENGLISH) && !defined(GERMAN) && !defined(RUSSIAN) && !defined(DUTCH) && !defined(POLISH)
|
#if !defined(ENGLISH) && !defined(GERMAN) && !defined(RUSSIAN) && !defined(DUTCH) && !defined(POLISH) && !defined(FRENCH) && !defined(ITALIAN) && !defined(TAIWANESE)
|
||||||
/* please set one manually here (by uncommenting) if not willingly to set Workspace wide */
|
/* please set one manually here (by uncommenting) if not willingly to set Workspace wide */
|
||||||
#define ENGLISH
|
#define ENGLISH
|
||||||
//#define GERMAN
|
//#define GERMAN
|
||||||
//#define RUSSIAN
|
//#define RUSSIAN
|
||||||
//#define DUTCH
|
//#define DUTCH
|
||||||
//#define POLISH
|
//#define POLISH
|
||||||
|
//#define FRENCH
|
||||||
|
//#define ITALIAN
|
||||||
|
//#define TAIWANESE
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -33,26 +37,13 @@
|
|||||||
* Regardless of if we did it Workspace wide or by uncommenting above,
|
* Regardless of if we did it Workspace wide or by uncommenting above,
|
||||||
* HERE we must see, what language was selected. If one, we
|
* HERE we must see, what language was selected. If one, we
|
||||||
*/
|
*/
|
||||||
#if defined(ENGLISH)
|
#if !defined(ENGLISH) && !defined(GERMAN) && !defined(RUSSIAN) && !defined(DUTCH) && !defined(POLISH) && !defined(FRENCH) && !defined(ITALIAN) && !defined(TAIWANESE)
|
||||||
# pragma message(" (Language set to ENGLISH, You'll need english CDs)")
|
|
||||||
#elif defined(GERMAN)
|
|
||||||
# pragma message(" (Language set to GERMAN, You'll need Topware/german CDs)")
|
|
||||||
#elif defined(RUSSIAN)
|
|
||||||
# pragma message(" (Language set to RUSSIAN, You'll need russian CDs)")
|
|
||||||
#elif defined(DUTCH)
|
|
||||||
# pragma message(" (Language set to DUTCH, You'll need dutch CDs)")
|
|
||||||
#elif defined(POLISH)
|
|
||||||
# pragma message(" (Language set to POLISH, You'll need polish CDs)")
|
|
||||||
#else
|
|
||||||
# error "At least You have to specify a Language somewhere. See comments above."
|
# error "At least You have to specify a Language somewhere. See comments above."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define BLOOD_N_GORE_ENABLED
|
|
||||||
|
|
||||||
//if the language represents words as single chars
|
//if the language represents words as single chars
|
||||||
#ifdef TAIWAN
|
#ifdef TAIWAN
|
||||||
#define SINGLE_CHAR_WORDS
|
#define SINGLE_CHAR_WORDS
|
||||||
|
|||||||
+14
-15
@@ -160,7 +160,7 @@ void EnterInitAimArchives()
|
|||||||
|
|
||||||
BOOLEAN EnterAimArchives()
|
BOOLEAN EnterAimArchives()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
UINT16 usPosX, i;
|
UINT16 usPosX, i;
|
||||||
|
|
||||||
|
|
||||||
@@ -207,17 +207,17 @@ BOOLEAN EnterAimArchives()
|
|||||||
InitAlumniFaceRegions();
|
InitAlumniFaceRegions();
|
||||||
|
|
||||||
//Load graphic for buttons
|
//Load graphic for buttons
|
||||||
guiAlumniPageButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
guiAlumniPageButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
usPosX = AIM_ALUMNI_PAGE1_X;
|
usPosX = AIM_ALUMNI_PAGE1_X;
|
||||||
for(i=0; i<3; i++)
|
for(i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
guiAlumniPageButton[i] = CreateIconAndTextButton( guiAlumniPageButtonImage, AimAlumniText[i], AIM_ALUMNI_PAGE_FONT,
|
guiAlumniPageButton[i] = CreateIconAndTextButton( guiAlumniPageButtonImage, AimAlumniText[i], AIM_ALUMNI_PAGE_FONT,
|
||||||
AIM_ALUMNI_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
AIM_ALUMNI_PAGE_COLOR_UP, DEFAULT_SHADOW,
|
||||||
AIM_ALUMNI_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
AIM_ALUMNI_PAGE_COLOR_DOWN, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, AIM_ALUMNI_PAGE1_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, AIM_ALUMNI_PAGE1_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnAlumniPageButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnAlumniPageButtonCallback);
|
||||||
SetButtonCursor(guiAlumniPageButton[i], CURSOR_WWW);
|
SetButtonCursor(guiAlumniPageButton[i], CURSOR_WWW);
|
||||||
MSYS_SetBtnUserData( guiAlumniPageButton[i], 0, i);
|
MSYS_SetBtnUserData( guiAlumniPageButton[i], 0, i);
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ void RenderAimArchives()
|
|||||||
{
|
{
|
||||||
HVOBJECT hFrameHandle;
|
HVOBJECT hFrameHandle;
|
||||||
HVOBJECT hFaceHandle;
|
HVOBJECT hFaceHandle;
|
||||||
// HVOBJECT hBottomButtonHandle;
|
// HVOBJECT hBottomButtonHandle;
|
||||||
UINT16 usPosX, usPosY,x,y,i=0;
|
UINT16 usPosX, usPosY,x,y,i=0;
|
||||||
UINT8 ubNumRows=0;
|
UINT8 ubNumRows=0;
|
||||||
UINT32 uiStartLoc=0;
|
UINT32 uiStartLoc=0;
|
||||||
@@ -370,7 +370,7 @@ void RenderAimArchives()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
|
|
||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
|
|
||||||
@@ -484,8 +484,6 @@ void DisplayAlumniOldMercPopUp()
|
|||||||
HVOBJECT hDoneHandle;
|
HVOBJECT hDoneHandle;
|
||||||
HVOBJECT hFacePaneHandle;
|
HVOBJECT hFacePaneHandle;
|
||||||
HVOBJECT hFaceHandle;
|
HVOBJECT hFaceHandle;
|
||||||
// WRAPPED_STRING *pFirstWrappedString, *pTempWrappedString;
|
|
||||||
UINT16 usHeight = GetFontHeight(AIM_ALUMNI_POPUP_FONT);
|
|
||||||
CHAR16 sName[AIM_ALUMNI_NAME_SIZE];
|
CHAR16 sName[AIM_ALUMNI_NAME_SIZE];
|
||||||
CHAR16 sDesc[AIM_ALUMNI_DECRIPTION_SIZE];
|
CHAR16 sDesc[AIM_ALUMNI_DECRIPTION_SIZE];
|
||||||
UINT32 uiStartLoc;
|
UINT32 uiStartLoc;
|
||||||
@@ -577,7 +575,7 @@ void InitAlumniFaceRegions()
|
|||||||
{
|
{
|
||||||
|
|
||||||
MSYS_DefineRegion( &gMercAlumniFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_ALUMNI_ALUMNI_FACE_WIDTH), (INT16)(usPosY + AIM_ALUMNI_ALUMNI_FACE_HEIGHT), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gMercAlumniFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_ALUMNI_ALUMNI_FACE_WIDTH), (INT16)(usPosY + AIM_ALUMNI_ALUMNI_FACE_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectAlumniFaceRegionCallBack);
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectAlumniFaceRegionCallBack);
|
||||||
// Add region
|
// Add region
|
||||||
MSYS_AddRegion( &gMercAlumniFaceMouseRegions[ i ] );
|
MSYS_AddRegion( &gMercAlumniFaceMouseRegions[ i ] );
|
||||||
MSYS_SetRegionUserData( &gMercAlumniFaceMouseRegions[ i ], 0, i+(20*gubPageNum));
|
MSYS_SetRegionUserData( &gMercAlumniFaceMouseRegions[ i ], 0, i+(20*gubPageNum));
|
||||||
@@ -593,7 +591,7 @@ void InitAlumniFaceRegions()
|
|||||||
if( gubPageNum == 2 )
|
if( gubPageNum == 2 )
|
||||||
{
|
{
|
||||||
MSYS_DefineRegion( &gMercAlumniFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_ALUMNI_ALUMNI_FACE_WIDTH), (INT16)(usPosY + AIM_ALUMNI_ALUMNI_FACE_HEIGHT), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gMercAlumniFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_ALUMNI_ALUMNI_FACE_WIDTH), (INT16)(usPosY + AIM_ALUMNI_ALUMNI_FACE_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectAlumniFaceRegionCallBack);
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectAlumniFaceRegionCallBack);
|
||||||
// Add region
|
// Add region
|
||||||
MSYS_AddRegion( &gMercAlumniFaceMouseRegions[ i ] );
|
MSYS_AddRegion( &gMercAlumniFaceMouseRegions[ i ] );
|
||||||
MSYS_SetRegionUserData( &gMercAlumniFaceMouseRegions[ i ], 0, i+(20*gubPageNum));
|
MSYS_SetRegionUserData( &gMercAlumniFaceMouseRegions[ i ], 0, i+(20*gubPageNum));
|
||||||
@@ -629,7 +627,7 @@ void RemoveAimAlumniFaceRegion()
|
|||||||
|
|
||||||
for(i=0; i<usNumber; i++)
|
for(i=0; i<usNumber; i++)
|
||||||
{
|
{
|
||||||
MSYS_RemoveRegion( &gMercAlumniFaceMouseRegions[ i ]);
|
MSYS_RemoveRegion( &gMercAlumniFaceMouseRegions[ i ]);
|
||||||
}
|
}
|
||||||
gfFaceMouseRegionsActive = FALSE;
|
gfFaceMouseRegionsActive = FALSE;
|
||||||
}
|
}
|
||||||
@@ -645,7 +643,7 @@ void CreateDestroyDoneMouseRegion(UINT16 usPosY)
|
|||||||
{
|
{
|
||||||
usPosY -= AIM_ALUMNI_DONE_HEIGHT;
|
usPosY -= AIM_ALUMNI_DONE_HEIGHT;
|
||||||
MSYS_DefineRegion( &gDoneRegion, AIM_ALUMNI_DONE_X-2, usPosY, (AIM_ALUMNI_DONE_X-2 + AIM_ALUMNI_DONE_WIDTH), (INT16)(usPosY + AIM_ALUMNI_DONE_HEIGHT), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gDoneRegion, AIM_ALUMNI_DONE_X-2, usPosY, (AIM_ALUMNI_DONE_X-2 + AIM_ALUMNI_DONE_WIDTH), (INT16)(usPosY + AIM_ALUMNI_DONE_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectAlumniDoneRegionCallBack);
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectAlumniDoneRegionCallBack);
|
||||||
// Add region
|
// Add region
|
||||||
MSYS_AddRegion( &gDoneRegion );
|
MSYS_AddRegion( &gDoneRegion );
|
||||||
DoneRegionCreated = TRUE;
|
DoneRegionCreated = TRUE;
|
||||||
@@ -701,3 +699,4 @@ void ChangingAimArchiveSubPage( UINT8 ubSubPageNumber )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ void GameInitAimFacialIndex()
|
|||||||
|
|
||||||
BOOLEAN EnterAimFacialIndex()
|
BOOLEAN EnterAimFacialIndex()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
UINT16 usPosX, usPosY, x,y;
|
UINT16 usPosX, usPosY, x,y;
|
||||||
STR sFaceLoc = "FACES\\";
|
STR sFaceLoc = "FACES\\";
|
||||||
@@ -93,7 +93,7 @@ BOOLEAN EnterAimFacialIndex()
|
|||||||
{
|
{
|
||||||
|
|
||||||
MSYS_DefineRegion( &gMercFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_FI_PORTRAIT_WIDTH), (INT16)(usPosY + AIM_FI_PORTRAIT_HEIGHT), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gMercFaceMouseRegions[ i ], usPosX, usPosY, (INT16)(usPosX + AIM_FI_PORTRAIT_WIDTH), (INT16)(usPosY + AIM_FI_PORTRAIT_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, SelectMercFaceMoveRegionCallBack, SelectMercFaceRegionCallBack);
|
CURSOR_WWW, SelectMercFaceMoveRegionCallBack, SelectMercFaceRegionCallBack);
|
||||||
// Add region
|
// Add region
|
||||||
MSYS_AddRegion( &gMercFaceMouseRegions[ i ] );
|
MSYS_AddRegion( &gMercFaceMouseRegions[ i ] );
|
||||||
MSYS_SetRegionUserData( &gMercFaceMouseRegions[ i ], 0, i);
|
MSYS_SetRegionUserData( &gMercFaceMouseRegions[ i ], 0, i);
|
||||||
@@ -113,7 +113,7 @@ BOOLEAN EnterAimFacialIndex()
|
|||||||
}
|
}
|
||||||
|
|
||||||
MSYS_DefineRegion( &gScreenMouseRegions, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y, LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y, MSYS_PRIORITY_HIGH-1,
|
MSYS_DefineRegion( &gScreenMouseRegions, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y, LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y, MSYS_PRIORITY_HIGH-1,
|
||||||
CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, SelectScreenRegionCallBack);
|
CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, SelectScreenRegionCallBack);
|
||||||
// Add region
|
// Add region
|
||||||
MSYS_AddRegion( &gScreenMouseRegions );
|
MSYS_AddRegion( &gScreenMouseRegions );
|
||||||
|
|
||||||
@@ -138,11 +138,11 @@ void ExitAimFacialIndex()
|
|||||||
for(i=0; i<MAX_NUMBER_MERCS; i++)
|
for(i=0; i<MAX_NUMBER_MERCS; i++)
|
||||||
{
|
{
|
||||||
DeleteVideoObjectFromIndex( guiAimFiFace[i]);
|
DeleteVideoObjectFromIndex( guiAimFiFace[i]);
|
||||||
MSYS_RemoveRegion( &gMercFaceMouseRegions[ i ]);
|
MSYS_RemoveRegion( &gMercFaceMouseRegions[ i ]);
|
||||||
}
|
}
|
||||||
ExitAimMenuBar();
|
ExitAimMenuBar();
|
||||||
|
|
||||||
MSYS_RemoveRegion( &gScreenMouseRegions);
|
MSYS_RemoveRegion( &gScreenMouseRegions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleAimFacialIndex()
|
void HandleAimFacialIndex()
|
||||||
@@ -197,9 +197,9 @@ BOOLEAN RenderAimFacialIndex()
|
|||||||
DrawTextToScreen(AimFiText[AIM_FI_RIGHT_CLICK], AIM_FI_RIGHT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_TITLE_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
DrawTextToScreen(AimFiText[AIM_FI_RIGHT_CLICK], AIM_FI_RIGHT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_TITLE_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||||
DrawTextToScreen(AimFiText[AIM_FI_TO_ENTER_SORT_PAGE], AIM_FI_RIGHT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y+AIM_FI_CLICK_DESC_TEXT_Y_OFFSET, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
DrawTextToScreen(AimFiText[AIM_FI_TO_ENTER_SORT_PAGE], AIM_FI_RIGHT_CLICK_TEXT_X, AIM_FI_LEFT_CLICK_TEXT_Y+AIM_FI_CLICK_DESC_TEXT_Y_OFFSET, AIM_FI_CLICK_TEXT_WIDTH, AIM_FI_HELP_FONT, AIM_FONT_MCOLOR_WHITE, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||||
|
|
||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
|
|
||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
|
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
@@ -272,7 +272,7 @@ void SelectMercFaceMoveRegionCallBack(MOUSE_REGION * pRegion, INT32 reason )
|
|||||||
|
|
||||||
BOOLEAN DrawMercsFaceToScreen(UINT8 ubMercID, UINT16 usPosX, UINT16 usPosY, UINT8 ubImage)
|
BOOLEAN DrawMercsFaceToScreen(UINT8 ubMercID, UINT16 usPosX, UINT16 usPosY, UINT8 ubImage)
|
||||||
{
|
{
|
||||||
HVOBJECT hMugShotBorderHandle;
|
HVOBJECT hMugShotBorderHandle;
|
||||||
HVOBJECT hFaceHandle;
|
HVOBJECT hFaceHandle;
|
||||||
SOLDIERTYPE *pSoldier=NULL;
|
SOLDIERTYPE *pSoldier=NULL;
|
||||||
|
|
||||||
@@ -306,7 +306,7 @@ BOOLEAN DrawMercsFaceToScreen(UINT8 ubMercID, UINT16 usPosX, UINT16 usPosY, UINT
|
|||||||
}
|
}
|
||||||
|
|
||||||
//else if the merc is currently a POW or, the merc was fired as a pow
|
//else if the merc is currently a POW or, the merc was fired as a pow
|
||||||
else if( gMercProfiles[ AimMercArray[ubMercID] ].bMercStatus == MERC_FIRED_AS_A_POW || ( pSoldier && pSoldier->bAssignment == ASSIGNMENT_POW ) )
|
else if( gMercProfiles[ AimMercArray[ubMercID] ].bMercStatus == MERC_FIRED_AS_A_POW || ( pSoldier && pSoldier->bAssignment == ASSIGNMENT_POW ) )
|
||||||
{
|
{
|
||||||
ShadowVideoSurfaceRect( FRAME_BUFFER, usPosX+AIM_FI_FACE_OFFSET, usPosY+AIM_FI_FACE_OFFSET, usPosX + 48+AIM_FI_FACE_OFFSET, usPosY + 43+AIM_FI_FACE_OFFSET);
|
ShadowVideoSurfaceRect( FRAME_BUFFER, usPosX+AIM_FI_FACE_OFFSET, usPosY+AIM_FI_FACE_OFFSET, usPosX + 48+AIM_FI_FACE_OFFSET, usPosY + 43+AIM_FI_FACE_OFFSET);
|
||||||
DrawTextToScreen( pPOWStrings[0], (UINT16)(usPosX+AIM_FI_AWAY_TEXT_OFFSET_X), (UINT16)(usPosY+AIM_FI_AWAY_TEXT_OFFSET_Y), AIM_FI_AWAY_TEXT_OFFSET_WIDTH, FONT10ARIAL, 145, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
DrawTextToScreen( pPOWStrings[0], (UINT16)(usPosX+AIM_FI_AWAY_TEXT_OFFSET_X), (UINT16)(usPosY+AIM_FI_AWAY_TEXT_OFFSET_Y), AIM_FI_AWAY_TEXT_OFFSET_WIDTH, FONT10ARIAL, 145, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||||
@@ -338,3 +338,4 @@ BOOLEAN DrawMercsFaceToScreen(UINT8 ubMercID, UINT16 usPosX, UINT16 usPosY, UINT
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+21
-20
@@ -57,7 +57,7 @@ extern UINT32 guiBottomButton2; // symbol already declared globally in AimPolici
|
|||||||
extern UINT32 guiContentButton; // symbol already declared globally in AimPolicies.cpp (jonathanl)
|
extern UINT32 guiContentButton; // symbol already declared globally in AimPolicies.cpp (jonathanl)
|
||||||
|
|
||||||
extern UINT8 gubCurPageNum; // symbol already declared globally in AimPolicies.cpp (jonathanl)
|
extern UINT8 gubCurPageNum; // symbol already declared globally in AimPolicies.cpp (jonathanl)
|
||||||
extern BOOLEAN gfInToc = FALSE; // symbol already declared globally in AimPolicies.cpp (jonathanl)
|
extern BOOLEAN gfInToc = FALSE; // symbol already declared globally in AimPolicies.cpp (jonathanl)
|
||||||
extern UINT8 gubAimHistoryMenuButtonDown=255; // symbol already declared globally in AimPolicies.cpp (jonathanl)
|
extern UINT8 gubAimHistoryMenuButtonDown=255; // symbol already declared globally in AimPolicies.cpp (jonathanl)
|
||||||
|
|
||||||
BOOLEAN gfExitingAimHistory;
|
BOOLEAN gfExitingAimHistory;
|
||||||
@@ -69,7 +69,7 @@ void ResetAimHistoryButtons();
|
|||||||
void DisableAimHistoryButton();
|
void DisableAimHistoryButton();
|
||||||
|
|
||||||
|
|
||||||
MOUSE_REGION gSelectedHistoryTocMenuRegion[ NUM_AIM_HISTORY_PAGES ];
|
MOUSE_REGION gSelectedHistoryTocMenuRegion[ NUM_AIM_HISTORY_PAGES ];
|
||||||
void SelectHistoryTocMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectHistoryTocMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
//Bottom Menu Buttons
|
//Bottom Menu Buttons
|
||||||
@@ -128,7 +128,7 @@ void EnterInitAimHistory()
|
|||||||
|
|
||||||
BOOLEAN EnterAimHistory()
|
BOOLEAN EnterAimHistory()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
gfExitingAimHistory = FALSE;
|
gfExitingAimHistory = FALSE;
|
||||||
InitAimDefaults();
|
InitAimDefaults();
|
||||||
@@ -231,11 +231,11 @@ void RenderAimHistory()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
|
|
||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
|
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ void RenderAimHistory()
|
|||||||
|
|
||||||
BOOLEAN InitAimHistoryMenuBar(void)
|
BOOLEAN InitAimHistoryMenuBar(void)
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
UINT16 i, usPosX;
|
UINT16 i, usPosX;
|
||||||
|
|
||||||
// load the Bottom Buttons graphic and add it
|
// load the Bottom Buttons graphic and add it
|
||||||
@@ -255,7 +255,7 @@ BOOLEAN InitAimHistoryMenuBar(void)
|
|||||||
FilenameForBPP("LAPTOP\\BottomButton2.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("LAPTOP\\BottomButton2.sti", VObjectDesc.ImageFile);
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &guiBottomButton2));
|
CHECKF(AddVideoObject(&VObjectDesc, &guiBottomButton2));
|
||||||
|
|
||||||
guiHistoryMenuButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
guiHistoryMenuButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
||||||
usPosX = AIM_HISTORY_MENU_X;
|
usPosX = AIM_HISTORY_MENU_X;
|
||||||
for(i=0; i<AIM_HISTORY_MENU_BUTTON_AMOUNT; i++)
|
for(i=0; i<AIM_HISTORY_MENU_BUTTON_AMOUNT; i++)
|
||||||
{
|
{
|
||||||
@@ -266,11 +266,11 @@ BOOLEAN InitAimHistoryMenuBar(void)
|
|||||||
// MSYS_SetBtnUserData( guiHistoryMenuButton[i], 0, i+1);
|
// MSYS_SetBtnUserData( guiHistoryMenuButton[i], 0, i+1);
|
||||||
|
|
||||||
guiHistoryMenuButton[i] = CreateIconAndTextButton( guiHistoryMenuButtonImage, AimHistoryText[i+AIM_HISTORY_PREVIOUS], FONT10ARIAL,
|
guiHistoryMenuButton[i] = CreateIconAndTextButton( guiHistoryMenuButtonImage, AimHistoryText[i+AIM_HISTORY_PREVIOUS], FONT10ARIAL,
|
||||||
AIM_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
AIM_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
||||||
AIM_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
AIM_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, AIM_HISTORY_MENU_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, AIM_HISTORY_MENU_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnHistoryMenuButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnHistoryMenuButtonCallback);
|
||||||
SetButtonCursor(guiHistoryMenuButton[i], CURSOR_WWW);
|
SetButtonCursor(guiHistoryMenuButton[i], CURSOR_WWW);
|
||||||
MSYS_SetBtnUserData( guiHistoryMenuButton[i], 0, i+1);
|
MSYS_SetBtnUserData( guiHistoryMenuButton[i], 0, i+1);
|
||||||
|
|
||||||
@@ -411,12 +411,12 @@ BOOLEAN InitTocMenu()
|
|||||||
CHAR16 sText[400];
|
CHAR16 sText[400];
|
||||||
UINT8 ubLocInFile[]=
|
UINT8 ubLocInFile[]=
|
||||||
{IN_THE_BEGINNING,
|
{IN_THE_BEGINNING,
|
||||||
THE_ISLAND_METAVIRA,
|
THE_ISLAND_METAVIRA,
|
||||||
GUS_TARBALLS,
|
GUS_TARBALLS,
|
||||||
WORD_FROM_FOUNDER,
|
WORD_FROM_FOUNDER,
|
||||||
INCORPORATION};
|
INCORPORATION};
|
||||||
|
|
||||||
HVOBJECT hContentButtonHandle;
|
HVOBJECT hContentButtonHandle;
|
||||||
|
|
||||||
GetVideoObject(&hContentButtonHandle, guiContentButton);
|
GetVideoObject(&hContentButtonHandle, guiContentButton);
|
||||||
|
|
||||||
@@ -434,12 +434,12 @@ BOOLEAN InitTocMenu()
|
|||||||
{
|
{
|
||||||
//Mouse region for the history toc buttons
|
//Mouse region for the history toc buttons
|
||||||
MSYS_DefineRegion( &gSelectedHistoryTocMenuRegion[i], AIM_HISTORY_TOC_X, usPosY, (UINT16)(AIM_HISTORY_TOC_X + AIM_CONTENTBUTTON_WIDTH), (UINT16)(usPosY + AIM_CONTENTBUTTON_HEIGHT), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedHistoryTocMenuRegion[i], AIM_HISTORY_TOC_X, usPosY, (UINT16)(AIM_HISTORY_TOC_X + AIM_CONTENTBUTTON_WIDTH), (UINT16)(usPosY + AIM_CONTENTBUTTON_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectHistoryTocMenuRegionCallBack);
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectHistoryTocMenuRegionCallBack);
|
||||||
MSYS_AddRegion(&gSelectedHistoryTocMenuRegion[i]);
|
MSYS_AddRegion(&gSelectedHistoryTocMenuRegion[i]);
|
||||||
MSYS_SetRegionUserData( &gSelectedHistoryTocMenuRegion[i], 0, i+1);
|
MSYS_SetRegionUserData( &gSelectedHistoryTocMenuRegion[i], 0, i+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
BltVideoObject(FRAME_BUFFER, hContentButtonHandle, 0,AIM_HISTORY_TOC_X, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hContentButtonHandle, 0,AIM_HISTORY_TOC_X, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
DrawTextToScreen(sText, AIM_HISTORY_TOC_X, (UINT16)(usPosY + AIM_HISTORY_TOC_Y), AIM_CONTENTBUTTON_WIDTH, AIM_HISTORY_TOC_TEXT_FONT, AIM_HISTORY_TOC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
DrawTextToScreen(sText, AIM_HISTORY_TOC_X, (UINT16)(usPosY + AIM_HISTORY_TOC_Y), AIM_CONTENTBUTTON_WIDTH, AIM_HISTORY_TOC_TEXT_FONT, AIM_HISTORY_TOC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
|
|
||||||
|
|
||||||
@@ -591,7 +591,7 @@ void DisableAimHistoryButton()
|
|||||||
{
|
{
|
||||||
ButtonList[ guiHistoryMenuButton[ 0 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
ButtonList[ guiHistoryMenuButton[ 0 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||||
}
|
}
|
||||||
else if( ( gubCurPageNum == 5) )
|
else if( ( gubCurPageNum == 5) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiHistoryMenuButton[ AIM_HISTORY_MENU_BUTTON_AMOUNT-1 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
ButtonList[ guiHistoryMenuButton[ AIM_HISTORY_MENU_BUTTON_AMOUNT-1 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||||
}
|
}
|
||||||
@@ -624,3 +624,4 @@ void ChangingAimHistorySubPage( UINT8 ubSubPageNumber )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+12
-11
@@ -14,8 +14,8 @@
|
|||||||
#define AIM_LINK_TITLE_FONT FONT14ARIAL
|
#define AIM_LINK_TITLE_FONT FONT14ARIAL
|
||||||
#define AIM_LINK_TITLE_COLOR AIM_GREEN
|
#define AIM_LINK_TITLE_COLOR AIM_GREEN
|
||||||
|
|
||||||
#define AIM_LINK_FONT FONT12ARIAL
|
#define AIM_LINK_FONT FONT12ARIAL
|
||||||
#define AIM_LINK_COLOR AIM_FONT_GOLD
|
#define AIM_LINK_COLOR AIM_FONT_GOLD
|
||||||
|
|
||||||
#define AIM_LINK_NUM_LINKS 3
|
#define AIM_LINK_NUM_LINKS 3
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ UINT8 gubLinkPages[]={
|
|||||||
INSURANCE_BOOKMARK};
|
INSURANCE_BOOKMARK};
|
||||||
|
|
||||||
//Clicking on guys Face
|
//Clicking on guys Face
|
||||||
MOUSE_REGION gSelectedLinkRegion[ AIM_LINK_NUM_LINKS ] ;
|
MOUSE_REGION gSelectedLinkRegion[ AIM_LINK_NUM_LINKS ] ;
|
||||||
void SelectLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ void GameInitAimLinks()
|
|||||||
|
|
||||||
BOOLEAN EnterAimLinks()
|
BOOLEAN EnterAimLinks()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
UINT16 usPosY;
|
UINT16 usPosY;
|
||||||
INT16 i;
|
INT16 i;
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ BOOLEAN EnterAimLinks()
|
|||||||
for(i=0; i<AIM_LINK_NUM_LINKS; i++)
|
for(i=0; i<AIM_LINK_NUM_LINKS; i++)
|
||||||
{
|
{
|
||||||
MSYS_DefineRegion( &gSelectedLinkRegion[i], AIM_LINK_BOBBY_LINK_X, usPosY , AIM_LINK_BOBBY_LINK_X + AIM_LINK_LINK_WIDTH, (UINT16)(usPosY + AIM_LINK_LINK_HEIGHT), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedLinkRegion[i], AIM_LINK_BOBBY_LINK_X, usPosY , AIM_LINK_BOBBY_LINK_X + AIM_LINK_LINK_WIDTH, (UINT16)(usPosY + AIM_LINK_LINK_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectLinkRegionCallBack );
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectLinkRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedLinkRegion[i]);
|
MSYS_AddRegion(&gSelectedLinkRegion[i]);
|
||||||
MSYS_SetRegionUserData( &gSelectedLinkRegion[i], 0, gubLinkPages[i]);
|
MSYS_SetRegionUserData( &gSelectedLinkRegion[i], 0, gubLinkPages[i]);
|
||||||
usPosY += AIM_LINK_LINK_OFFSET_Y;
|
usPosY += AIM_LINK_LINK_OFFSET_Y;
|
||||||
@@ -127,28 +127,28 @@ void HandleAimLinks()
|
|||||||
|
|
||||||
void RenderAimLinks()
|
void RenderAimLinks()
|
||||||
{
|
{
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
|
|
||||||
DrawAimDefaults();
|
DrawAimDefaults();
|
||||||
DisableAimButton();
|
DisableAimButton();
|
||||||
|
|
||||||
GetVideoObject(&hPixHandle, guiBobbyLink);
|
GetVideoObject(&hPixHandle, guiBobbyLink);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, AIM_LINK_BOBBY_LINK_X, AIM_LINK_BOBBY_LINK_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, AIM_LINK_BOBBY_LINK_X, AIM_LINK_BOBBY_LINK_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
GetVideoObject(&hPixHandle, guiFuneralLink);
|
GetVideoObject(&hPixHandle, guiFuneralLink);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, AIM_LINK_FUNERAL_LINK_X, AIM_LINK_FUNERAL_LINK_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, AIM_LINK_FUNERAL_LINK_X, AIM_LINK_FUNERAL_LINK_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
// DrawTextToScreen(AimLinkText[AIM_LINK_FUNERAL], AIM_LINK_BOBBY_LINK_X, AIM_LINK_LINK_TEXT_2_Y, AIM_LINK_LINK_WIDTH, AIM_LINK_FONT, AIM_LINK_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
// DrawTextToScreen(AimLinkText[AIM_LINK_FUNERAL], AIM_LINK_BOBBY_LINK_X, AIM_LINK_LINK_TEXT_2_Y, AIM_LINK_LINK_WIDTH, AIM_LINK_FONT, AIM_LINK_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
|
|
||||||
GetVideoObject(&hPixHandle, guiInsuranceLink);
|
GetVideoObject(&hPixHandle, guiInsuranceLink);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, AIM_LINK_INSURANCE_LINK_X, AIM_LINK_INSURANCE_LINK_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, AIM_LINK_INSURANCE_LINK_X, AIM_LINK_INSURANCE_LINK_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
// DrawTextToScreen(AimLinkText[AIM_LINK_LISTENING], AIM_LINK_BOBBY_LINK_X, AIM_LINK_LINK_TEXT_3_Y, AIM_LINK_LINK_WIDTH, AIM_LINK_FONT, AIM_LINK_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
// DrawTextToScreen(AimLinkText[AIM_LINK_LISTENING], AIM_LINK_BOBBY_LINK_X, AIM_LINK_LINK_TEXT_3_Y, AIM_LINK_LINK_WIDTH, AIM_LINK_FONT, AIM_LINK_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
|
|
||||||
//Draw Link Title
|
//Draw Link Title
|
||||||
DrawTextToScreen(AimLinkText[AIM_LINK_TITLE], AIM_LINK_TITLE_X, AIM_LINK_TITLE_Y, AIM_LINK_TITLE_WIDTH, AIM_LINK_TITLE_FONT, AIM_LINK_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
DrawTextToScreen(AimLinkText[AIM_LINK_TITLE], AIM_LINK_TITLE_X, AIM_LINK_TITLE_Y, AIM_LINK_TITLE_WIDTH, AIM_LINK_TITLE_FONT, AIM_LINK_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
|
|
||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SelectLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
void SelectLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
||||||
@@ -179,3 +179,4 @@ void SelectLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+157
-156
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
//****** Defines ******
|
//****** Defines ******
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@@ -104,8 +104,8 @@
|
|||||||
|
|
||||||
#define PORTRAIT_X IMAGE_OFFSET_X + 8
|
#define PORTRAIT_X IMAGE_OFFSET_X + 8
|
||||||
#define PORTRAIT_Y STATS_Y
|
#define PORTRAIT_Y STATS_Y
|
||||||
#define PORTRAIT_WIDTH 110
|
#define PORTRAIT_WIDTH 110
|
||||||
#define PORTRAIT_HEIGHT 126
|
#define PORTRAIT_HEIGHT 126
|
||||||
|
|
||||||
#define FACE_X PORTRAIT_X + 2
|
#define FACE_X PORTRAIT_X + 2
|
||||||
#define FACE_Y PORTRAIT_Y + 2
|
#define FACE_Y PORTRAIT_Y + 2
|
||||||
@@ -179,9 +179,9 @@
|
|||||||
#define AIM_MERC_ADD_X AIM_MERC_ADD_INFO_X
|
#define AIM_MERC_ADD_X AIM_MERC_ADD_INFO_X
|
||||||
#define AIM_MERC_ADD_Y iScreenHeightOffset + 269 + LAPTOP_SCREEN_WEB_DELTA_Y
|
#define AIM_MERC_ADD_Y iScreenHeightOffset + 269 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||||
|
|
||||||
#define AIM_MERC_ADD_INFO_X AIM_MERC_INFO_X
|
#define AIM_MERC_ADD_INFO_X AIM_MERC_INFO_X
|
||||||
#define AIM_MERC_ADD_INFO_Y AIM_MERC_ADD_Y + 15
|
#define AIM_MERC_ADD_INFO_Y AIM_MERC_ADD_Y + 15
|
||||||
#define AIM_MERC_INFO_WIDTH 470
|
#define AIM_MERC_INFO_WIDTH 470
|
||||||
|
|
||||||
#define AIM_MEDICAL_DEPOSIT_X PRICE_X + 5
|
#define AIM_MEDICAL_DEPOSIT_X PRICE_X + 5
|
||||||
#define AIM_MEDICAL_DEPOSIT_Y LEADERSHIP_Y
|
#define AIM_MEDICAL_DEPOSIT_Y LEADERSHIP_Y
|
||||||
@@ -394,7 +394,7 @@ BOOLEAN gfFirstTimeInContactScreen;
|
|||||||
UINT8 gubCurrentCount;
|
UINT8 gubCurrentCount;
|
||||||
UINT8 gubCurrentStaticMode;
|
UINT8 gubCurrentStaticMode;
|
||||||
UINT32 guiMercAttitudeTime; //retains the amount of time the user is in a screen, if over a certain time, the merc gets miffed
|
UINT32 guiMercAttitudeTime; //retains the amount of time the user is in a screen, if over a certain time, the merc gets miffed
|
||||||
UINT8 gubMercAttitudeLevel; //retains the current level the merc is P.O.'ed at the caller.
|
UINT8 gubMercAttitudeLevel; //retains the current level the merc is P.O.'ed at the caller.
|
||||||
BOOLEAN gfHangUpMerc; // if we have to cancel the video conferencing after the merc is finsihed talking
|
BOOLEAN gfHangUpMerc; // if we have to cancel the video conferencing after the merc is finsihed talking
|
||||||
BOOLEAN gfIsShutUpMouseRegionActive;
|
BOOLEAN gfIsShutUpMouseRegionActive;
|
||||||
BOOLEAN gfIsAnsweringMachineActive;
|
BOOLEAN gfIsAnsweringMachineActive;
|
||||||
@@ -477,12 +477,12 @@ INT32 giXToCloseVideoConfButton;
|
|||||||
|
|
||||||
//Mouse Regions
|
//Mouse Regions
|
||||||
//Clicking on guys Face
|
//Clicking on guys Face
|
||||||
MOUSE_REGION gSelectedFaceRegion;
|
MOUSE_REGION gSelectedFaceRegion;
|
||||||
void SelectFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectFaceRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
void SelectFaceMovementRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectFaceMovementRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
//Clicking To shut merc up
|
//Clicking To shut merc up
|
||||||
MOUSE_REGION gSelectedShutUpMercRegion;
|
MOUSE_REGION gSelectedShutUpMercRegion;
|
||||||
void SelectShutUpMercRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectShutUpMercRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
|
|
||||||
@@ -582,7 +582,7 @@ void EnterInitAimMembers()
|
|||||||
|
|
||||||
BOOLEAN EnterAIMMembers()
|
BOOLEAN EnterAIMMembers()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
VSURFACE_DESC vs_desc;
|
VSURFACE_DESC vs_desc;
|
||||||
|
|
||||||
// Create a background video surface to blt the face onto
|
// Create a background video surface to blt the face onto
|
||||||
@@ -650,8 +650,8 @@ BOOLEAN EnterAIMMembers()
|
|||||||
|
|
||||||
//** Mouse Regions **
|
//** Mouse Regions **
|
||||||
MSYS_DefineRegion( &gSelectedFaceRegion, PORTRAIT_X, PORTRAIT_Y , PORTRAIT_X + PORTRAIT_WIDTH , PORTRAIT_Y + PORTRAIT_HEIGHT, MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedFaceRegion, PORTRAIT_X, PORTRAIT_Y , PORTRAIT_X + PORTRAIT_WIDTH , PORTRAIT_Y + PORTRAIT_HEIGHT, MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, SelectFaceMovementRegionCallBack, SelectFaceRegionCallBack );
|
CURSOR_WWW, SelectFaceMovementRegionCallBack, SelectFaceRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedFaceRegion);
|
MSYS_AddRegion(&gSelectedFaceRegion);
|
||||||
|
|
||||||
//Set the fast help for the mouse region
|
//Set the fast help for the mouse region
|
||||||
// SetRegionFastHelpText( &gSelectedFaceRegion, AimMemberText[ AIM_MEMBER_CLICK_INSTRUCTIONS ] );
|
// SetRegionFastHelpText( &gSelectedFaceRegion, AimMemberText[ AIM_MEMBER_CLICK_INSTRUCTIONS ] );
|
||||||
@@ -659,43 +659,43 @@ BOOLEAN EnterAIMMembers()
|
|||||||
|
|
||||||
// if user clicks in the area, the merc will shut up!
|
// if user clicks in the area, the merc will shut up!
|
||||||
MSYS_DefineRegion( &gSelectedShutUpMercRegion, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y ,LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y, MSYS_PRIORITY_HIGH-1,
|
MSYS_DefineRegion( &gSelectedShutUpMercRegion, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y ,LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y, MSYS_PRIORITY_HIGH-1,
|
||||||
CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, SelectShutUpMercRegionCallBack);
|
CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, SelectShutUpMercRegionCallBack);
|
||||||
MSYS_AddRegion(&gSelectedShutUpMercRegion);
|
MSYS_AddRegion(&gSelectedShutUpMercRegion);
|
||||||
//have it disbled at first
|
//have it disbled at first
|
||||||
MSYS_DisableRegion(&gSelectedShutUpMercRegion);
|
MSYS_DisableRegion(&gSelectedShutUpMercRegion);
|
||||||
|
|
||||||
|
|
||||||
//Button Regions
|
//Button Regions
|
||||||
giXToCloseVideoConfButtonImage = LoadButtonImage("LAPTOP\\x_button.sti", -1,0,-1,1,-1 );
|
giXToCloseVideoConfButtonImage = LoadButtonImage("LAPTOP\\x_button.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
|
|
||||||
guiPreviousContactNextButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
guiPreviousContactNextButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
giPreviousButton = CreateIconAndTextButton( guiPreviousContactNextButtonImage, CharacterInfo[AIM_MEMBER_PREVIOUS], AIM_M_FONT_PREV_NEXT_CONTACT,
|
giPreviousButton = CreateIconAndTextButton( guiPreviousContactNextButtonImage, CharacterInfo[AIM_MEMBER_PREVIOUS], AIM_M_FONT_PREV_NEXT_CONTACT,
|
||||||
AIM_M_FONT_PREV_NEXT_CONTACT_COLOR_UP, DEFAULT_SHADOW,
|
AIM_M_FONT_PREV_NEXT_CONTACT_COLOR_UP, DEFAULT_SHADOW,
|
||||||
AIM_M_FONT_PREV_NEXT_CONTACT_COLOR_DOWN, DEFAULT_SHADOW,
|
AIM_M_FONT_PREV_NEXT_CONTACT_COLOR_DOWN, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
PREVIOUS_X, PREVIOUS_BOX_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
PREVIOUS_X, PREVIOUS_BOX_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnPreviousButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnPreviousButtonCallback);
|
||||||
SetButtonCursor(giPreviousButton, CURSOR_WWW );
|
SetButtonCursor(giPreviousButton, CURSOR_WWW );
|
||||||
|
|
||||||
|
|
||||||
giContactButton = CreateIconAndTextButton( guiPreviousContactNextButtonImage, CharacterInfo[AIM_MEMBER_CONTACT], AIM_M_FONT_PREV_NEXT_CONTACT,
|
giContactButton = CreateIconAndTextButton( guiPreviousContactNextButtonImage, CharacterInfo[AIM_MEMBER_CONTACT], AIM_M_FONT_PREV_NEXT_CONTACT,
|
||||||
AIM_M_FONT_PREV_NEXT_CONTACT_COLOR_UP, DEFAULT_SHADOW,
|
AIM_M_FONT_PREV_NEXT_CONTACT_COLOR_UP, DEFAULT_SHADOW,
|
||||||
AIM_M_FONT_PREV_NEXT_CONTACT_COLOR_DOWN, DEFAULT_SHADOW,
|
AIM_M_FONT_PREV_NEXT_CONTACT_COLOR_DOWN, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
CONTACT_X, CONTACT_BOX_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
CONTACT_X, CONTACT_BOX_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnContactButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnContactButtonCallback);
|
||||||
SetButtonCursor(giContactButton, CURSOR_WWW );
|
SetButtonCursor(giContactButton, CURSOR_WWW );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
giNextButton = CreateIconAndTextButton( guiPreviousContactNextButtonImage, CharacterInfo[AIM_MEMBER_NEXT], AIM_M_FONT_PREV_NEXT_CONTACT,
|
giNextButton = CreateIconAndTextButton( guiPreviousContactNextButtonImage, CharacterInfo[AIM_MEMBER_NEXT], AIM_M_FONT_PREV_NEXT_CONTACT,
|
||||||
AIM_M_FONT_PREV_NEXT_CONTACT_COLOR_UP, DEFAULT_SHADOW,
|
AIM_M_FONT_PREV_NEXT_CONTACT_COLOR_UP, DEFAULT_SHADOW,
|
||||||
AIM_M_FONT_PREV_NEXT_CONTACT_COLOR_DOWN, DEFAULT_SHADOW,
|
AIM_M_FONT_PREV_NEXT_CONTACT_COLOR_DOWN, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
NEXT_X, NEXT_BOX_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
NEXT_X, NEXT_BOX_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnNextButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnNextButtonCallback);
|
||||||
SetButtonCursor(giNextButton, CURSOR_WWW );
|
SetButtonCursor(giNextButton, CURSOR_WWW );
|
||||||
|
|
||||||
|
|
||||||
@@ -711,7 +711,7 @@ BOOLEAN EnterAIMMembers()
|
|||||||
if( gubVideoConferencingMode != 0 )
|
if( gubVideoConferencingMode != 0 )
|
||||||
{
|
{
|
||||||
//if we need to re initialize the talking face
|
//if we need to re initialize the talking face
|
||||||
if( gubVideoConferencingMode != AIM_VIDEO_FIRST_CONTACT_MERC_MODE)
|
if( gubVideoConferencingMode != AIM_VIDEO_FIRST_CONTACT_MERC_MODE)
|
||||||
InitVideoFace(gbCurrentSoldier);
|
InitVideoFace(gbCurrentSoldier);
|
||||||
|
|
||||||
InitDeleteVideoConferencePopUp();
|
InitDeleteVideoConferencePopUp();
|
||||||
@@ -768,7 +768,7 @@ void ExitAIMMembers()
|
|||||||
RemoveButton( giContactButton );
|
RemoveButton( giContactButton );
|
||||||
RemoveButton( giNextButton );
|
RemoveButton( giNextButton );
|
||||||
|
|
||||||
MSYS_RemoveRegion( &gSelectedFaceRegion);
|
MSYS_RemoveRegion( &gSelectedFaceRegion);
|
||||||
MSYS_RemoveRegion( &gSelectedShutUpMercRegion);
|
MSYS_RemoveRegion( &gSelectedShutUpMercRegion);
|
||||||
|
|
||||||
ExitAimMenuBar();
|
ExitAimMenuBar();
|
||||||
@@ -869,7 +869,7 @@ void HandleAIMMembers()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN RenderAIMMembersTopLevel()
|
BOOLEAN RenderAIMMembersTopLevel()
|
||||||
@@ -881,9 +881,9 @@ BOOLEAN RenderAIMMembersTopLevel()
|
|||||||
|
|
||||||
BOOLEAN RenderAIMMembers()
|
BOOLEAN RenderAIMMembers()
|
||||||
{
|
{
|
||||||
HVOBJECT hStatsHandle;
|
HVOBJECT hStatsHandle;
|
||||||
HVOBJECT hPriceHandle;
|
HVOBJECT hPriceHandle;
|
||||||
HVOBJECT hWeaponBoxHandle;
|
HVOBJECT hWeaponBoxHandle;
|
||||||
UINT16 x, uiPosX;
|
UINT16 x, uiPosX;
|
||||||
CHAR16 wTemp[50];
|
CHAR16 wTemp[50];
|
||||||
|
|
||||||
@@ -891,11 +891,11 @@ BOOLEAN RenderAIMMembers()
|
|||||||
|
|
||||||
// Stats
|
// Stats
|
||||||
GetVideoObject(&hStatsHandle, guiStats);
|
GetVideoObject(&hStatsHandle, guiStats);
|
||||||
BltVideoObject(FRAME_BUFFER, hStatsHandle, 0,STATS_X, STATS_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hStatsHandle, 0,STATS_X, STATS_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// Price
|
// Price
|
||||||
GetVideoObject(&hPriceHandle, guiPrice);
|
GetVideoObject(&hPriceHandle, guiPrice);
|
||||||
BltVideoObject(FRAME_BUFFER, hPriceHandle, 0,PRICE_X, PRICE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPriceHandle, 0,PRICE_X, PRICE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// WeaponBox
|
// WeaponBox
|
||||||
GetVideoObject(&hWeaponBoxHandle, guiWeaponBox);
|
GetVideoObject(&hWeaponBoxHandle, guiWeaponBox);
|
||||||
@@ -907,7 +907,7 @@ BOOLEAN RenderAIMMembers()
|
|||||||
uiPosX += WEAPONBOX_SIZE_X;
|
uiPosX += WEAPONBOX_SIZE_X;
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateMercInfo();
|
UpdateMercInfo();
|
||||||
|
|
||||||
//Draw fee & contract
|
//Draw fee & contract
|
||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_FEE], FEE_X, FEE_Y, 0, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_FEE], FEE_X, FEE_Y, 0, AIM_M_FONT_PREV_NEXT_CONTACT, AIM_M_FEE_CONTRACT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
@@ -1049,8 +1049,8 @@ void SelectFaceMovementRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
BOOLEAN UpdateMercInfo(void)
|
BOOLEAN UpdateMercInfo(void)
|
||||||
{
|
{
|
||||||
//UINT16 PosY = 300;
|
//UINT16 PosY = 300;
|
||||||
CHAR16 MercInfoString[ SIZE_MERC_BIO_INFO ];
|
CHAR16 MercInfoString[ SIZE_MERC_BIO_INFO ];
|
||||||
CHAR16 AdditionalInfoString[ SIZE_MERC_BIO_INFO ];
|
CHAR16 AdditionalInfoString[ SIZE_MERC_BIO_INFO ];
|
||||||
|
|
||||||
//Display the salaries
|
//Display the salaries
|
||||||
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].sSalary, FEE_WIDTH, FEE_X, HEALTH_Y, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
DrawMoneyToScreen(gMercProfiles[gbCurrentSoldier].sSalary, FEE_WIDTH, FEE_X, HEALTH_Y, AIM_M_NUMBER_FONT, AIM_M_COLOR_DYNAMIC_TEXT );
|
||||||
@@ -1071,12 +1071,12 @@ BOOLEAN UpdateMercInfo(void)
|
|||||||
swprintf( sMedicalString, L"%s %s", zTemp, CharacterInfo[AIM_MEMBER_MEDICAL_DEPOSIT_REQ] );
|
swprintf( sMedicalString, L"%s %s", zTemp, CharacterInfo[AIM_MEMBER_MEDICAL_DEPOSIT_REQ] );
|
||||||
|
|
||||||
// If the string will be displayed in more then 2 lines, recenter the string
|
// If the string will be displayed in more then 2 lines, recenter the string
|
||||||
if( ( DisplayWrappedString( 0, 0, AIM_MEDICAL_DEPOSIT_WIDTH, 2, AIM_FONT12ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, sMedicalString, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED | DONT_DISPLAY_TEXT ) / GetFontHeight( AIM_FONT12ARIAL ) ) > 2 )
|
if( ( DisplayWrappedString( 0, 0, AIM_MEDICAL_DEPOSIT_WIDTH, 2, AIM_FONT12ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, sMedicalString, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED | DONT_DISPLAY_TEXT ) / GetFontHeight( AIM_FONT12ARIAL ) ) > 2 )
|
||||||
{
|
{
|
||||||
DisplayWrappedString( AIM_MEDICAL_DEPOSIT_X, (UINT16)(AIM_MEDICAL_DEPOSIT_Y - GetFontHeight( AIM_FONT12ARIAL ) ), AIM_MEDICAL_DEPOSIT_WIDTH, 2, AIM_FONT12ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, sMedicalString, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
DisplayWrappedString( AIM_MEDICAL_DEPOSIT_X, (UINT16)(AIM_MEDICAL_DEPOSIT_Y - GetFontHeight( AIM_FONT12ARIAL ) ), AIM_MEDICAL_DEPOSIT_WIDTH, 2, AIM_FONT12ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, sMedicalString, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DisplayWrappedString(AIM_MEDICAL_DEPOSIT_X, AIM_MEDICAL_DEPOSIT_Y, AIM_MEDICAL_DEPOSIT_WIDTH, 2, AIM_FONT12ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, sMedicalString, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
DisplayWrappedString(AIM_MEDICAL_DEPOSIT_X, AIM_MEDICAL_DEPOSIT_Y, AIM_MEDICAL_DEPOSIT_WIDTH, 2, AIM_FONT12ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, sMedicalString, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadMercBioInfo( gbCurrentSoldier, MercInfoString, AdditionalInfoString);
|
LoadMercBioInfo( gbCurrentSoldier, MercInfoString, AdditionalInfoString);
|
||||||
@@ -1213,7 +1213,7 @@ BOOLEAN DisplayMercsInventory(UINT8 ubMercID)
|
|||||||
INVTYPE *pItem;
|
INVTYPE *pItem;
|
||||||
HVOBJECT hVObject;
|
HVOBJECT hVObject;
|
||||||
UINT32 usHeight, usWidth;
|
UINT32 usHeight, usWidth;
|
||||||
ETRLEObject *pTrav;
|
ETRLEObject *pTrav;
|
||||||
CHAR16 gzItemName[ SIZE_ITEM_NAME ];
|
CHAR16 gzItemName[ SIZE_ITEM_NAME ];
|
||||||
UINT8 ubItemCount=0;
|
UINT8 ubItemCount=0;
|
||||||
// UINT16 gzTempItemName[ SIZE_ITEM_INFO ];
|
// UINT16 gzTempItemName[ SIZE_ITEM_INFO ];
|
||||||
@@ -1225,7 +1225,7 @@ BOOLEAN DisplayMercsInventory(UINT8 ubMercID)
|
|||||||
|
|
||||||
PosY = WEAPONBOX_Y;
|
PosY = WEAPONBOX_Y;
|
||||||
PosX = WEAPONBOX_X+3; // + 3 ( 1 to take care of the shadow, +2 to get past the weapon box border )
|
PosX = WEAPONBOX_X+3; // + 3 ( 1 to take care of the shadow, +2 to get past the weapon box border )
|
||||||
for(i=0; i<NUM_INV_SLOTS; i++)
|
for(i=0; i<gMercProfiles[ubMercID].inv.size(); i++)
|
||||||
{
|
{
|
||||||
usItem = gMercProfiles[ubMercID].inv[ i ];
|
usItem = gMercProfiles[ubMercID].inv[ i ];
|
||||||
|
|
||||||
@@ -1242,7 +1242,7 @@ BOOLEAN DisplayMercsInventory(UINT8 ubMercID)
|
|||||||
usHeight = (UINT32)pTrav->usHeight;
|
usHeight = (UINT32)pTrav->usHeight;
|
||||||
usWidth = (UINT32)pTrav->usWidth;
|
usWidth = (UINT32)pTrav->usWidth;
|
||||||
|
|
||||||
sCenX = PosX + ( abs( WEAPONBOX_SIZE_X - 3 - usWidth ) / 2 ) - pTrav->sOffsetX;
|
sCenX = PosX + ( abs( WEAPONBOX_SIZE_X - 3 - usWidth ) / 2 ) - pTrav->sOffsetX;
|
||||||
sCenY = PosY + ( abs( WEAPONBOX_SIZE_Y - usHeight ) / 2 ) - pTrav->sOffsetY;
|
sCenY = PosY + ( abs( WEAPONBOX_SIZE_Y - usHeight ) / 2 ) - pTrav->sOffsetY;
|
||||||
|
|
||||||
//blt the shadow of the item
|
//blt the shadow of the item
|
||||||
@@ -1268,10 +1268,10 @@ BOOLEAN DisplayMercsInventory(UINT8 ubMercID)
|
|||||||
wcscpy( gzItemName, ShortItemNames[ usItem ] );
|
wcscpy( gzItemName, ShortItemNames[ usItem ] );
|
||||||
|
|
||||||
//if this will only be a single line, center it in the box
|
//if this will only be a single line, center it in the box
|
||||||
if( ( DisplayWrappedString( (UINT16)(PosX-1), AIM_MEMBER_WEAPON_NAME_Y, AIM_MEMBER_WEAPON_NAME_WIDTH, 2, AIM_M_WEAPON_TEXT_FONT, AIM_M_WEAPON_TEXT_COLOR, gzItemName, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED | DONT_DISPLAY_TEXT ) / GetFontHeight( AIM_M_WEAPON_TEXT_FONT ) ) == 1 )
|
if( ( DisplayWrappedString( (UINT16)(PosX-1), AIM_MEMBER_WEAPON_NAME_Y, AIM_MEMBER_WEAPON_NAME_WIDTH, 2, AIM_M_WEAPON_TEXT_FONT, AIM_M_WEAPON_TEXT_COLOR, gzItemName, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED | DONT_DISPLAY_TEXT ) / GetFontHeight( AIM_M_WEAPON_TEXT_FONT ) ) == 1 )
|
||||||
DisplayWrappedString( (UINT16)(PosX-1), (UINT16)(AIM_MEMBER_WEAPON_NAME_Y+GetFontHeight( AIM_M_WEAPON_TEXT_FONT )/2), AIM_MEMBER_WEAPON_NAME_WIDTH, 2, AIM_M_WEAPON_TEXT_FONT, AIM_M_WEAPON_TEXT_COLOR, gzItemName, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
DisplayWrappedString( (UINT16)(PosX-1), (UINT16)(AIM_MEMBER_WEAPON_NAME_Y+GetFontHeight( AIM_M_WEAPON_TEXT_FONT )/2), AIM_MEMBER_WEAPON_NAME_WIDTH, 2, AIM_M_WEAPON_TEXT_FONT, AIM_M_WEAPON_TEXT_COLOR, gzItemName, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||||
else
|
else
|
||||||
DisplayWrappedString( (UINT16)(PosX-1), AIM_MEMBER_WEAPON_NAME_Y, AIM_MEMBER_WEAPON_NAME_WIDTH, 2, AIM_M_WEAPON_TEXT_FONT, AIM_M_WEAPON_TEXT_COLOR, gzItemName, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
DisplayWrappedString( (UINT16)(PosX-1), AIM_MEMBER_WEAPON_NAME_Y, AIM_MEMBER_WEAPON_NAME_WIDTH, 2, AIM_M_WEAPON_TEXT_FONT, AIM_M_WEAPON_TEXT_COLOR, gzItemName, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||||
|
|
||||||
PosX += WEAPONBOX_SIZE_X;
|
PosX += WEAPONBOX_SIZE_X;
|
||||||
}
|
}
|
||||||
@@ -1390,11 +1390,11 @@ void BtnNextButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
BOOLEAN DisplayMercsFace()
|
BOOLEAN DisplayMercsFace()
|
||||||
{
|
{
|
||||||
HVOBJECT hFaceHandle;
|
HVOBJECT hFaceHandle;
|
||||||
HVOBJECT hPortraitHandle;
|
HVOBJECT hPortraitHandle;
|
||||||
STR sFaceLoc = "FACES\\BIGFACES\\";
|
STR sFaceLoc = "FACES\\BIGFACES\\";
|
||||||
char sTemp[100];
|
char sTemp[100];
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
SOLDIERTYPE *pSoldier=NULL;
|
SOLDIERTYPE *pSoldier=NULL;
|
||||||
|
|
||||||
//See if the merc is currently hired
|
//See if the merc is currently hired
|
||||||
@@ -1402,17 +1402,17 @@ BOOLEAN DisplayMercsFace()
|
|||||||
|
|
||||||
// Portrait Frame
|
// Portrait Frame
|
||||||
GetVideoObject(&hPortraitHandle, guiPortrait);
|
GetVideoObject(&hPortraitHandle, guiPortrait);
|
||||||
BltVideoObject(FRAME_BUFFER, hPortraitHandle, 0,PORTRAIT_X, PORTRAIT_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPortraitHandle, 0,PORTRAIT_X, PORTRAIT_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// load the Face graphic and add it
|
// load the Face graphic and add it
|
||||||
sprintf(sTemp, "%s%02d.sti", sFaceLoc, gbCurrentSoldier);
|
sprintf(sTemp, "%s%02d.sti", sFaceLoc, gbCurrentSoldier);
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
FilenameForBPP(sTemp, VObjectDesc.ImageFile);
|
FilenameForBPP(sTemp, VObjectDesc.ImageFile);
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &guiFace));
|
CHECKF(AddVideoObject(&VObjectDesc, &guiFace));
|
||||||
|
|
||||||
//Blt face to screen
|
//Blt face to screen
|
||||||
GetVideoObject(&hFaceHandle, guiFace);
|
GetVideoObject(&hFaceHandle, guiFace);
|
||||||
BltVideoObject(FRAME_BUFFER, hFaceHandle, 0,FACE_X, FACE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hFaceHandle, 0,FACE_X, FACE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
//if the merc is dead
|
//if the merc is dead
|
||||||
if( IsMercDead( gbCurrentSoldier ) )
|
if( IsMercDead( gbCurrentSoldier ) )
|
||||||
@@ -1434,7 +1434,7 @@ BOOLEAN DisplayMercsFace()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//else if the merc is currently a POW or, the merc was fired as a pow
|
//else if the merc is currently a POW or, the merc was fired as a pow
|
||||||
else if( gMercProfiles[ gbCurrentSoldier ].bMercStatus == MERC_FIRED_AS_A_POW || ( pSoldier && pSoldier->bAssignment == ASSIGNMENT_POW ) )
|
else if( gMercProfiles[ gbCurrentSoldier ].bMercStatus == MERC_FIRED_AS_A_POW || ( pSoldier && pSoldier->bAssignment == ASSIGNMENT_POW ) )
|
||||||
{
|
{
|
||||||
ShadowVideoSurfaceRect( FRAME_BUFFER, FACE_X, FACE_Y, FACE_X + FACE_WIDTH, FACE_Y + FACE_HEIGHT);
|
ShadowVideoSurfaceRect( FRAME_BUFFER, FACE_X, FACE_Y, FACE_X + FACE_WIDTH, FACE_Y + FACE_HEIGHT);
|
||||||
DrawTextToScreen( pPOWStrings[0], FACE_X+1, FACE_Y+107, FACE_WIDTH, FONT14ARIAL, 145, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
DrawTextToScreen( pPOWStrings[0], FACE_X+1, FACE_Y+107, FACE_WIDTH, FONT14ARIAL, 145, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||||
@@ -1469,7 +1469,7 @@ void DisplayMercStats()
|
|||||||
// Display all the static text
|
// Display all the static text
|
||||||
//
|
//
|
||||||
|
|
||||||
//First column in stats box. Health, Agility, dexterity, strength, leadership, wisdom
|
//First column in stats box. Health, Agility, dexterity, strength, leadership, wisdom
|
||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_HEALTH], STATS_FIRST_COL, HEALTH_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_HEALTH], STATS_FIRST_COL, HEALTH_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
DisplayDots(STATS_FIRST_COL, HEALTH_Y, FIRST_COLUMN_DOT, CharacterInfo[AIM_MEMBER_HEALTH]);
|
DisplayDots(STATS_FIRST_COL, HEALTH_Y, FIRST_COLUMN_DOT, CharacterInfo[AIM_MEMBER_HEALTH]);
|
||||||
|
|
||||||
@@ -1489,7 +1489,7 @@ void DisplayMercStats()
|
|||||||
DisplayDots(STATS_FIRST_COL, WISDOM_Y, FIRST_COLUMN_DOT, CharacterInfo[AIM_MEMBER_WISDOM]);
|
DisplayDots(STATS_FIRST_COL, WISDOM_Y, FIRST_COLUMN_DOT, CharacterInfo[AIM_MEMBER_WISDOM]);
|
||||||
|
|
||||||
|
|
||||||
//Second column in stats box. Exp.Level, Markmanship, mechanical, explosive, medical
|
//Second column in stats box. Exp.Level, Markmanship, mechanical, explosive, medical
|
||||||
DrawTextToScreen(CharacterInfo[AIM_MEMBER_EXP_LEVEL], STATS_SECOND_COL, EXPLEVEL_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
DrawTextToScreen(CharacterInfo[AIM_MEMBER_EXP_LEVEL], STATS_SECOND_COL, EXPLEVEL_Y, 0, AIM_M_FONT_STATIC_TEXT, AIM_M_COLOR_STATIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
DisplayDots(STATS_SECOND_COL, EXPLEVEL_Y, SECOND_COLUMN_DOT, CharacterInfo[AIM_MEMBER_EXP_LEVEL]);
|
DisplayDots(STATS_SECOND_COL, EXPLEVEL_Y, SECOND_COLUMN_DOT, CharacterInfo[AIM_MEMBER_EXP_LEVEL]);
|
||||||
|
|
||||||
@@ -1513,7 +1513,7 @@ void DisplayMercStats()
|
|||||||
//Name
|
//Name
|
||||||
DrawTextToScreen(gMercProfiles[gbCurrentSoldier].zName, NAME_X, NAME_Y, 0, FONT14ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
DrawTextToScreen(gMercProfiles[gbCurrentSoldier].zName, NAME_X, NAME_Y, 0, FONT14ARIAL, AIM_M_COLOR_DYNAMIC_TEXT, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
|
||||||
// Numbers for above. Health, Agility, dexterity, strength, leadership, wisdom
|
// Numbers for above. Health, Agility, dexterity, strength, leadership, wisdom
|
||||||
|
|
||||||
ubColor = GetStatColor( gMercProfiles[gbCurrentSoldier].bLife );
|
ubColor = GetStatColor( gMercProfiles[gbCurrentSoldier].bLife );
|
||||||
DrawNumeralsToScreen( gMercProfiles[gbCurrentSoldier].bLife, 3, STATS_FIRST_NUM, HEALTH_Y, AIM_M_NUMBER_FONT, ubColor );
|
DrawNumeralsToScreen( gMercProfiles[gbCurrentSoldier].bLife, 3, STATS_FIRST_NUM, HEALTH_Y, AIM_M_NUMBER_FONT, ubColor );
|
||||||
@@ -1533,7 +1533,7 @@ void DisplayMercStats()
|
|||||||
ubColor = GetStatColor( gMercProfiles[gbCurrentSoldier].bWisdom );
|
ubColor = GetStatColor( gMercProfiles[gbCurrentSoldier].bWisdom );
|
||||||
DrawNumeralsToScreen(gMercProfiles[gbCurrentSoldier].bWisdom, 3, STATS_FIRST_NUM, WISDOM_Y, AIM_M_NUMBER_FONT, ubColor );
|
DrawNumeralsToScreen(gMercProfiles[gbCurrentSoldier].bWisdom, 3, STATS_FIRST_NUM, WISDOM_Y, AIM_M_NUMBER_FONT, ubColor );
|
||||||
|
|
||||||
//Second column in stats box. Exp.Level, Markmanship, mechanical, explosive, medical
|
//Second column in stats box. Exp.Level, Markmanship, mechanical, explosive, medical
|
||||||
|
|
||||||
// ubColor = GetStatColor( gMercProfiles[gbCurrentSoldier].bExpLevel );
|
// ubColor = GetStatColor( gMercProfiles[gbCurrentSoldier].bExpLevel );
|
||||||
DrawNumeralsToScreen(gMercProfiles[gbCurrentSoldier].bExpLevel, 3, STATS_SECOND_NUM, EXPLEVEL_Y, AIM_M_NUMBER_FONT, FONT_MCOLOR_WHITE );
|
DrawNumeralsToScreen(gMercProfiles[gbCurrentSoldier].bExpLevel, 3, STATS_SECOND_NUM, EXPLEVEL_Y, AIM_M_NUMBER_FONT, FONT_MCOLOR_WHITE );
|
||||||
@@ -1566,7 +1566,7 @@ void DisplayDots(UINT16 usNameX, UINT16 usNameY, UINT16 usStatX, STR16 pString)
|
|||||||
{
|
{
|
||||||
INT16 sNumberOfDots;
|
INT16 sNumberOfDots;
|
||||||
UINT16 usStringLength = StringPixLength(pString, AIM_M_FONT_STATIC_TEXT);
|
UINT16 usStringLength = StringPixLength(pString, AIM_M_FONT_STATIC_TEXT);
|
||||||
INT16 i;
|
INT16 i;
|
||||||
UINT16 usPosX;
|
UINT16 usPosX;
|
||||||
|
|
||||||
sNumberOfDots = (usStatX - usNameX - usStringLength) / 7;
|
sNumberOfDots = (usStatX - usNameX - usStringLength) / 7;
|
||||||
@@ -1674,7 +1674,7 @@ void BtnAuthorizeButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
{
|
{
|
||||||
StopMercTalking();
|
StopMercTalking();
|
||||||
|
|
||||||
//can the merc be hired? (does he like/not like people on the team
|
//can the merc be hired? (does he like/not like people on the team
|
||||||
// if( CanMercBeHired() )
|
// if( CanMercBeHired() )
|
||||||
{
|
{
|
||||||
//Was the merc hired
|
//Was the merc hired
|
||||||
@@ -1835,12 +1835,12 @@ BOOLEAN DisplayVideoConferencingDisplay()
|
|||||||
//Title & Name
|
//Title & Name
|
||||||
if( gubVideoConferencingMode == AIM_VIDEO_INIT_MODE)
|
if( gubVideoConferencingMode == AIM_VIDEO_INIT_MODE)
|
||||||
{
|
{
|
||||||
swprintf( sMercName, L"%s", VideoConfercingText[AIM_MEMBER_CONNECTING]);
|
swprintf( sMercName, L"%s", VideoConfercingText[AIM_MEMBER_CONNECTING]);
|
||||||
DrawTextToScreen(sMercName, AIM_MEMBER_VIDEO_NAME_X, AIM_MEMBER_VIDEO_NAME_Y, 0, FONT12ARIAL, AIM_M_VIDEO_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
DrawTextToScreen(sMercName, AIM_MEMBER_VIDEO_NAME_X, AIM_MEMBER_VIDEO_NAME_Y, 0, FONT12ARIAL, AIM_M_VIDEO_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
swprintf( sMercName, L"%s %s", VideoConfercingText[AIM_MEMBER_VIDEO_CONF_WITH], gMercProfiles[gbCurrentSoldier].zName);
|
swprintf( sMercName, L"%s %s", VideoConfercingText[AIM_MEMBER_VIDEO_CONF_WITH], gMercProfiles[gbCurrentSoldier].zName);
|
||||||
DrawTextToScreen(sMercName, AIM_MEMBER_VIDEO_NAME_X, AIM_MEMBER_VIDEO_NAME_Y, 0, FONT12ARIAL, AIM_M_VIDEO_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
DrawTextToScreen(sMercName, AIM_MEMBER_VIDEO_NAME_X, AIM_MEMBER_VIDEO_NAME_Y, 0, FONT12ARIAL, AIM_M_VIDEO_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1862,12 +1862,12 @@ BOOLEAN DisplayVideoConferencingDisplay()
|
|||||||
UINT16 usActualHeight;
|
UINT16 usActualHeight;
|
||||||
UINT16 usPosX;
|
UINT16 usPosX;
|
||||||
|
|
||||||
SET_USE_WINFONTS( TRUE );
|
SET_USE_WINFONTS( TRUE );
|
||||||
SET_WINFONT( giSubTitleWinFont );
|
SET_WINFONT( giSubTitleWinFont );
|
||||||
|
|
||||||
iAimMembersBoxId = PrepareMercPopupBox( iAimMembersBoxId ,BASIC_MERC_POPUP_BACKGROUND, BASIC_MERC_POPUP_BORDER, gsTalkingMercText, 300, 0, 0, 0, &usActualWidth, &usActualHeight);
|
iAimMembersBoxId = PrepareMercPopupBox( iAimMembersBoxId ,BASIC_MERC_POPUP_BACKGROUND, BASIC_MERC_POPUP_BORDER, gsTalkingMercText, 300, 0, 0, 0, &usActualWidth, &usActualHeight);
|
||||||
|
|
||||||
SET_USE_WINFONTS( FALSE );
|
SET_USE_WINFONTS( FALSE );
|
||||||
|
|
||||||
usPosX = iScreenWidthOffset + ( 613 - usActualWidth ) / 2 ;
|
usPosX = iScreenWidthOffset + ( 613 - usActualWidth ) / 2 ;
|
||||||
|
|
||||||
@@ -1879,20 +1879,20 @@ BOOLEAN DisplayVideoConferencingDisplay()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN DisplayMercsVideoFace()
|
BOOLEAN DisplayMercsVideoFace()
|
||||||
{
|
{
|
||||||
HVOBJECT hTerminalHandle;
|
HVOBJECT hTerminalHandle;
|
||||||
STR sFaceLoc = "FACES\\";
|
//STR sFaceLoc = "FACES\\";
|
||||||
|
|
||||||
// Get and Blt Terminal Frame
|
// Get and Blt Terminal Frame
|
||||||
GetVideoObject(&hTerminalHandle, guiVideoConfTerminal);
|
GetVideoObject(&hTerminalHandle, guiVideoConfTerminal);
|
||||||
ShadowVideoSurfaceImage( FRAME_BUFFER, hTerminalHandle, AIM_MEMBER_VIDEO_CONF_TERMINAL_X, AIM_MEMBER_VIDEO_CONF_TERMINAL_Y);
|
ShadowVideoSurfaceImage( FRAME_BUFFER, hTerminalHandle, AIM_MEMBER_VIDEO_CONF_TERMINAL_X, AIM_MEMBER_VIDEO_CONF_TERMINAL_Y);
|
||||||
BltVideoObject(FRAME_BUFFER, hTerminalHandle, 0,AIM_MEMBER_VIDEO_CONF_TERMINAL_X, AIM_MEMBER_VIDEO_CONF_TERMINAL_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hTerminalHandle, 0,AIM_MEMBER_VIDEO_CONF_TERMINAL_X, AIM_MEMBER_VIDEO_CONF_TERMINAL_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
|
||||||
//Display the Select light on the merc
|
//Display the Select light on the merc
|
||||||
@@ -1956,7 +1956,7 @@ void DisplaySelectLights(BOOLEAN fContractDown, BOOLEAN fBuyEquipDown)
|
|||||||
}
|
}
|
||||||
usPosY += AIM_MEMBER_BUY_EQUIPMENT_GAP;
|
usPosY += AIM_MEMBER_BUY_EQUIPMENT_GAP;
|
||||||
}
|
}
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1970,7 +1970,7 @@ UINT32 DisplayMercChargeAmount()
|
|||||||
if( gubVideoConferencingMode != AIM_VIDEO_HIRE_MERC_MODE )
|
if( gubVideoConferencingMode != AIM_VIDEO_HIRE_MERC_MODE )
|
||||||
return(0);
|
return(0);
|
||||||
|
|
||||||
// Display the 'black hole'for the contract charge in the video conference terminal
|
// Display the 'black hole'for the contract charge in the video conference terminal
|
||||||
GetVideoObject(&hImageHandle, guiVideoContractCharge);
|
GetVideoObject(&hImageHandle, guiVideoContractCharge);
|
||||||
BltVideoObject(FRAME_BUFFER, hImageHandle, 0,AIM_MEMBER_VIDEO_CONF_CONTRACT_IMAGE_X, AIM_MEMBER_VIDEO_CONF_CONTRACT_IMAGE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hImageHandle, 0,AIM_MEMBER_VIDEO_CONF_CONTRACT_IMAGE_X, AIM_MEMBER_VIDEO_CONF_CONTRACT_IMAGE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
@@ -2005,7 +2005,7 @@ UINT32 DisplayMercChargeAmount()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
swprintf( wDollarTemp, L"%d", giContractAmount);
|
swprintf( wDollarTemp, L"%d", giContractAmount);
|
||||||
InsertCommasForDollarFigure( wDollarTemp );
|
InsertCommasForDollarFigure( wDollarTemp );
|
||||||
InsertDollarSignInToString( wDollarTemp );
|
InsertDollarSignInToString( wDollarTemp );
|
||||||
|
|
||||||
@@ -2025,8 +2025,8 @@ UINT32 DisplayMercChargeAmount()
|
|||||||
|
|
||||||
BOOLEAN InitCreateDeleteAimPopUpBox(UINT8 ubFlag, STR16 sString1, STR16 sString2, UINT16 usPosX, UINT16 usPosY, UINT8 ubData)
|
BOOLEAN InitCreateDeleteAimPopUpBox(UINT8 ubFlag, STR16 sString1, STR16 sString2, UINT16 usPosX, UINT16 usPosY, UINT8 ubData)
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
HVOBJECT hPopupBoxHandle;
|
HVOBJECT hPopupBoxHandle;
|
||||||
static UINT16 usPopUpBoxPosX, usPopUpBoxPosY;
|
static UINT16 usPopUpBoxPosX, usPopUpBoxPosY;
|
||||||
static CHAR16 sPopUpString1[400], sPopUpString2[400];
|
static CHAR16 sPopUpString1[400], sPopUpString2[400];
|
||||||
static BOOLEAN fPopUpBoxActive = FALSE;;
|
static BOOLEAN fPopUpBoxActive = FALSE;;
|
||||||
@@ -2065,12 +2065,12 @@ BOOLEAN InitCreateDeleteAimPopUpBox(UINT8 ubFlag, STR16 sString1, STR16 sString2
|
|||||||
//Create the popup boxes button
|
//Create the popup boxes button
|
||||||
guiPopUpImage = LoadButtonImage("LAPTOP\\VideoConfButtons.sti", -1,2,-1,3,-1 );
|
guiPopUpImage = LoadButtonImage("LAPTOP\\VideoConfButtons.sti", -1,2,-1,3,-1 );
|
||||||
guiPopUpOkButton = CreateIconAndTextButton( guiPopUpImage, VideoConfercingText[AIM_MEMBER_OK],
|
guiPopUpOkButton = CreateIconAndTextButton( guiPopUpImage, VideoConfercingText[AIM_MEMBER_OK],
|
||||||
FONT14ARIAL,
|
FONT14ARIAL,
|
||||||
AIM_POPUP_BOX_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_POPUP_BOX_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
AIM_POPUP_BOX_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_POPUP_BOX_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
(UINT16)(usPosX+AIM_POPUP_BOX_BUTTON_OFFSET_X), (UINT16)(usPosY+AIM_POPUP_BOX_BUTTON_OFFSET_Y), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH+5,
|
(UINT16)(usPosX+AIM_POPUP_BOX_BUTTON_OFFSET_X), (UINT16)(usPosY+AIM_POPUP_BOX_BUTTON_OFFSET_Y), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH+5,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnPopUpOkButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnPopUpOkButtonCallback);
|
||||||
SetButtonCursor(guiPopUpOkButton, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiPopUpOkButton, CURSOR_LAPTOP_SCREEN);
|
||||||
MSYS_SetBtnUserData( guiPopUpOkButton, 0, ubData);
|
MSYS_SetBtnUserData( guiPopUpOkButton, 0, ubData);
|
||||||
|
|
||||||
@@ -2110,10 +2110,10 @@ BOOLEAN InitCreateDeleteAimPopUpBox(UINT8 ubFlag, STR16 sString1, STR16 sString2
|
|||||||
SetFontShadow(AIM_M_VIDEO_NAME_SHADOWCOLOR);
|
SetFontShadow(AIM_M_VIDEO_NAME_SHADOWCOLOR);
|
||||||
|
|
||||||
usTempPosY += AIM_POPUP_BOX_STRING1_Y;
|
usTempPosY += AIM_POPUP_BOX_STRING1_Y;
|
||||||
if( sPopUpString1[0] != L'\0')
|
if( sPopUpString1[0] != L'\0')
|
||||||
usTempPosY += DisplayWrappedString(usPopUpBoxPosX, usTempPosY, AIM_POPUP_BOX_WIDTH, 2, AIM_POPUP_BOX_FONT, AIM_POPUP_BOX_COLOR, sPopUpString1, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
usTempPosY += DisplayWrappedString(usPopUpBoxPosX, usTempPosY, AIM_POPUP_BOX_WIDTH, 2, AIM_POPUP_BOX_FONT, AIM_POPUP_BOX_COLOR, sPopUpString1, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
if( sPopUpString2[0] != L'\0')
|
if( sPopUpString2[0] != L'\0')
|
||||||
DisplayWrappedString(usPopUpBoxPosX, (UINT16)(usTempPosY+4), AIM_POPUP_BOX_WIDTH, 2, AIM_POPUP_BOX_FONT, AIM_POPUP_BOX_COLOR, sPopUpString2, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
DisplayWrappedString(usPopUpBoxPosX, (UINT16)(usTempPosY+4), AIM_POPUP_BOX_WIDTH, 2, AIM_POPUP_BOX_FONT, AIM_POPUP_BOX_COLOR, sPopUpString2, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
|
|
||||||
SetFontShadow(DEFAULT_SHADOW);
|
SetFontShadow(DEFAULT_SHADOW);
|
||||||
|
|
||||||
@@ -2198,7 +2198,7 @@ void BtnPopUpOkButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// we first contact merc. We either go to hire him or cancel the call
|
// we first contact merc. We either go to hire him or cancel the call
|
||||||
void BtnFirstContactButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
void BtnFirstContactButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
{
|
{
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
@@ -2315,7 +2315,7 @@ void BtnHangUpButtonCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// InitVideoFace() is called once to initialize things
|
// InitVideoFace() is called once to initialize things
|
||||||
BOOLEAN InitVideoFace(UINT8 ubMercID)
|
BOOLEAN InitVideoFace(UINT8 ubMercID)
|
||||||
{
|
{
|
||||||
//Create the facial index
|
//Create the facial index
|
||||||
giMercFaceIndex = InitFace( ubMercID, NOBODY, 0 );
|
giMercFaceIndex = InitFace( ubMercID, NOBODY, 0 );
|
||||||
@@ -2335,7 +2335,7 @@ BOOLEAN InitVideoFace(UINT8 ubMercID)
|
|||||||
|
|
||||||
|
|
||||||
// InitVideoFaceTalking() is called to start a merc speaking a particular message
|
// InitVideoFaceTalking() is called to start a merc speaking a particular message
|
||||||
BOOLEAN InitVideoFaceTalking(UINT8 ubMercID, UINT16 usQuoteNum)
|
BOOLEAN InitVideoFaceTalking(UINT8 ubMercID, UINT16 usQuoteNum)
|
||||||
{
|
{
|
||||||
|
|
||||||
//Starts the merc talking
|
//Starts the merc talking
|
||||||
@@ -2401,7 +2401,7 @@ BOOLEAN DisplayTalkingMercFaceForVideoPopUp(INT32 iFaceIndex)
|
|||||||
if( gfIsAnsweringMachineActive )
|
if( gfIsAnsweringMachineActive )
|
||||||
{
|
{
|
||||||
//display a message over the mercs face
|
//display a message over the mercs face
|
||||||
DisplayWrappedString( AIM_MEMBER_VIDEO_FACE_X, AIM_MEMBER_VIDEO_FACE_Y+20, AIM_MEMBER_VIDEO_FACE_WIDTH, 2, FONT14ARIAL, 145, AimPopUpText[ AIM_MEMBER_PRERECORDED_MESSAGE ], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
DisplayWrappedString( AIM_MEMBER_VIDEO_FACE_X, AIM_MEMBER_VIDEO_FACE_Y+20, AIM_MEMBER_VIDEO_FACE_WIDTH, 2, FONT14ARIAL, 145, AimPopUpText[ AIM_MEMBER_PRERECORDED_MESSAGE ], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2449,7 +2449,7 @@ void DisplayTextForMercFaceVideoPopUp(STR16 pString)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Set the minimum time for the dialogue text to be present
|
//Set the minimum time for the dialogue text to be present
|
||||||
usAimMercSpeechDuration = wcslen( gsTalkingMercText ) * AIM_TEXT_SPEECH_MODIFIER;
|
usAimMercSpeechDuration = wcslen( gsTalkingMercText ) * AIM_TEXT_SPEECH_MODIFIER;
|
||||||
|
|
||||||
if( usAimMercSpeechDuration < MINIMUM_TALKING_TIME_FOR_MERC )
|
if( usAimMercSpeechDuration < MINIMUM_TALKING_TIME_FOR_MERC )
|
||||||
usAimMercSpeechDuration = MINIMUM_TALKING_TIME_FOR_MERC;
|
usAimMercSpeechDuration = MINIMUM_TALKING_TIME_FOR_MERC;
|
||||||
@@ -2493,12 +2493,12 @@ UINT8 WillMercAcceptCall()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//if the merc is currently on contract, the answering machine will pick up.
|
//if the merc is currently on contract, the answering machine will pick up.
|
||||||
if( (gMercProfiles[ gbCurrentSoldier ].bMercStatus > 0 ) || (gMercProfiles[ gbCurrentSoldier ].bMercStatus == MERC_HAS_NO_TEXT_FILE ) || (gMercProfiles[ gbCurrentSoldier ].bMercStatus == MERC_HIRED_BUT_NOT_ARRIVED_YET ) )
|
if( (gMercProfiles[ gbCurrentSoldier ].bMercStatus > 0 ) || (gMercProfiles[ gbCurrentSoldier ].bMercStatus == MERC_HAS_NO_TEXT_FILE ) || (gMercProfiles[ gbCurrentSoldier ].bMercStatus == MERC_HIRED_BUT_NOT_ARRIVED_YET ) )
|
||||||
{
|
{
|
||||||
return(AIM_VIDEO_MERC_ANSWERING_MACHINE_MODE);
|
return(AIM_VIDEO_MERC_ANSWERING_MACHINE_MODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the merc is at home, or if the merc is only slightly annoyed at the player, he will greet the player
|
// if the merc is at home, or if the merc is only slightly annoyed at the player, he will greet the player
|
||||||
if( IsMercHireable( gbCurrentSoldier ) )
|
if( IsMercHireable( gbCurrentSoldier ) )
|
||||||
{
|
{
|
||||||
return(AIM_VIDEO_FIRST_CONTACT_MERC_MODE);
|
return(AIM_VIDEO_FIRST_CONTACT_MERC_MODE);
|
||||||
@@ -2523,7 +2523,7 @@ BOOLEAN CanMercBeHired()
|
|||||||
// if the merc recently came back with poor morale, and hasn't gotten over it yet
|
// if the merc recently came back with poor morale, and hasn't gotten over it yet
|
||||||
if (gMercProfiles[ gbCurrentSoldier ].ubDaysOfMoraleHangover > 0)
|
if (gMercProfiles[ gbCurrentSoldier ].ubDaysOfMoraleHangover > 0)
|
||||||
{
|
{
|
||||||
// then he refuses with a lame excuse. Buddy or no buddy.
|
// then he refuses with a lame excuse. Buddy or no buddy.
|
||||||
WaitForMercToFinishTalkingOrUserToClick();
|
WaitForMercToFinishTalkingOrUserToClick();
|
||||||
InitVideoFaceTalking( gbCurrentSoldier, QUOTE_LAME_REFUSAL );
|
InitVideoFaceTalking( gbCurrentSoldier, QUOTE_LAME_REFUSAL );
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
@@ -2650,7 +2650,7 @@ BOOLEAN CanMercBeHired()
|
|||||||
BOOLEAN DisplaySnowBackground()
|
BOOLEAN DisplaySnowBackground()
|
||||||
{
|
{
|
||||||
UINT32 uiCurrentTime = 0;
|
UINT32 uiCurrentTime = 0;
|
||||||
HVOBJECT hSnowHandle;
|
HVOBJECT hSnowHandle;
|
||||||
UINT8 ubCount;
|
UINT8 ubCount;
|
||||||
|
|
||||||
uiCurrentTime = GetJA2Clock();
|
uiCurrentTime = GetJA2Clock();
|
||||||
@@ -2685,7 +2685,7 @@ BOOLEAN DisplaySnowBackground()
|
|||||||
GetVideoObject(&hSnowHandle, guiBWSnow);
|
GetVideoObject(&hSnowHandle, guiBWSnow);
|
||||||
BltVideoObject(FRAME_BUFFER, hSnowHandle, ubCount,AIM_MEMBER_VIDEO_FACE_X, AIM_MEMBER_VIDEO_FACE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hSnowHandle, ubCount,AIM_MEMBER_VIDEO_FACE_X, AIM_MEMBER_VIDEO_FACE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
InvalidateRegion(AIM_MEMBER_VIDEO_FACE_X,AIM_MEMBER_VIDEO_FACE_Y, AIM_MEMBER_VIDEO_FACE_X+AIM_MEMBER_VIDEO_FACE_WIDTH,AIM_MEMBER_VIDEO_FACE_Y+AIM_MEMBER_VIDEO_FACE_HEIGHT);
|
InvalidateRegion(AIM_MEMBER_VIDEO_FACE_X,AIM_MEMBER_VIDEO_FACE_Y, AIM_MEMBER_VIDEO_FACE_X+AIM_MEMBER_VIDEO_FACE_WIDTH,AIM_MEMBER_VIDEO_FACE_Y+AIM_MEMBER_VIDEO_FACE_HEIGHT);
|
||||||
|
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
@@ -2716,7 +2716,7 @@ BOOLEAN DisplayBlackBackground(UINT8 ubMaxNumOfLoops)
|
|||||||
}
|
}
|
||||||
// Blit color to screen
|
// Blit color to screen
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, AIM_MEMBER_VIDEO_FACE_X, AIM_MEMBER_VIDEO_FACE_Y, AIM_MEMBER_VIDEO_FACE_X+AIM_MEMBER_VIDEO_FACE_WIDTH, AIM_MEMBER_VIDEO_FACE_Y+AIM_MEMBER_VIDEO_FACE_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, AIM_MEMBER_VIDEO_FACE_X, AIM_MEMBER_VIDEO_FACE_Y, AIM_MEMBER_VIDEO_FACE_X+AIM_MEMBER_VIDEO_FACE_WIDTH, AIM_MEMBER_VIDEO_FACE_Y+AIM_MEMBER_VIDEO_FACE_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
InvalidateRegion(AIM_MEMBER_VIDEO_FACE_X,AIM_MEMBER_VIDEO_FACE_Y, AIM_MEMBER_VIDEO_FACE_X+AIM_MEMBER_VIDEO_FACE_WIDTH,AIM_MEMBER_VIDEO_FACE_Y+AIM_MEMBER_VIDEO_FACE_HEIGHT);
|
InvalidateRegion(AIM_MEMBER_VIDEO_FACE_X,AIM_MEMBER_VIDEO_FACE_Y, AIM_MEMBER_VIDEO_FACE_X+AIM_MEMBER_VIDEO_FACE_WIDTH,AIM_MEMBER_VIDEO_FACE_Y+AIM_MEMBER_VIDEO_FACE_HEIGHT);
|
||||||
|
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
@@ -2855,7 +2855,7 @@ void HandleVideoDistortion()
|
|||||||
//returns true when done. else false
|
//returns true when done. else false
|
||||||
UINT8 DisplayTransparentSnow(UINT8 ubMode, UINT32 uiImageIdentifier, UINT8 ubMaxImages, BOOLEAN bForward)
|
UINT8 DisplayTransparentSnow(UINT8 ubMode, UINT32 uiImageIdentifier, UINT8 ubMaxImages, BOOLEAN bForward)
|
||||||
{
|
{
|
||||||
HVOBJECT hFuzzLineHandle;
|
HVOBJECT hFuzzLineHandle;
|
||||||
static INT8 bCount= 0;
|
static INT8 bCount= 0;
|
||||||
UINT32 uiCurrentTime = 0;
|
UINT32 uiCurrentTime = 0;
|
||||||
static UINT32 uiLastTime=0;
|
static UINT32 uiLastTime=0;
|
||||||
@@ -2915,7 +2915,7 @@ UINT8 DisplayTransparentSnow(UINT8 ubMode, UINT32 uiImageIdentifier, UINT8 ubMax
|
|||||||
//returns true when done. else false
|
//returns true when done. else false
|
||||||
UINT8 DisplayDistortionLine(UINT8 ubMode, UINT32 uiImageIdentifier, UINT8 ubMaxImages)
|
UINT8 DisplayDistortionLine(UINT8 ubMode, UINT32 uiImageIdentifier, UINT8 ubMaxImages)
|
||||||
{
|
{
|
||||||
HVOBJECT hFuzzLineHandle;
|
HVOBJECT hFuzzLineHandle;
|
||||||
static UINT8 ubCount=255;
|
static UINT8 ubCount=255;
|
||||||
UINT32 uiCurrentTime = 0;
|
UINT32 uiCurrentTime = 0;
|
||||||
static UINT32 uiLastTime=0;
|
static UINT32 uiLastTime=0;
|
||||||
@@ -2967,7 +2967,7 @@ UINT8 DisplayPixelatedImage(UINT8 ubMaxImages)
|
|||||||
uiLastTime = uiCurrentTime;
|
uiLastTime = uiCurrentTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PixelateVideoObjectRect( FRAME_BUFFER, AIM_MEMBER_VIDEO_FACE_X, AIM_MEMBER_VIDEO_FACE_Y, AIM_MEMBER_VIDEO_FACE_X+AIM_MEMBER_VIDEO_FACE_WIDTH-1, AIM_MEMBER_VIDEO_FACE_Y+AIM_MEMBER_VIDEO_FACE_HEIGHT-1);
|
// PixelateVideoObjectRect( FRAME_BUFFER, AIM_MEMBER_VIDEO_FACE_X, AIM_MEMBER_VIDEO_FACE_Y, AIM_MEMBER_VIDEO_FACE_X+AIM_MEMBER_VIDEO_FACE_WIDTH-1, AIM_MEMBER_VIDEO_FACE_Y+AIM_MEMBER_VIDEO_FACE_HEIGHT-1);
|
||||||
ShadowVideoSurfaceRect( FRAME_BUFFER, AIM_MEMBER_VIDEO_FACE_X, AIM_MEMBER_VIDEO_FACE_Y, AIM_MEMBER_VIDEO_FACE_X+AIM_MEMBER_VIDEO_FACE_WIDTH-1, AIM_MEMBER_VIDEO_FACE_Y+AIM_MEMBER_VIDEO_FACE_HEIGHT-1);
|
ShadowVideoSurfaceRect( FRAME_BUFFER, AIM_MEMBER_VIDEO_FACE_X, AIM_MEMBER_VIDEO_FACE_Y, AIM_MEMBER_VIDEO_FACE_X+AIM_MEMBER_VIDEO_FACE_WIDTH-1, AIM_MEMBER_VIDEO_FACE_Y+AIM_MEMBER_VIDEO_FACE_HEIGHT-1);
|
||||||
|
|
||||||
if( ubCount == ubMaxImages-1)
|
if( ubCount == ubMaxImages-1)
|
||||||
@@ -2985,8 +2985,8 @@ void HandleMercAttitude()
|
|||||||
|
|
||||||
uiCurrentTime = GetJA2Clock();
|
uiCurrentTime = GetJA2Clock();
|
||||||
|
|
||||||
if( ( gubMercAttitudeLevel <= 1 && ( ( uiCurrentTime - guiMercAttitudeTime ) > QUOTE_FIRST_ATTITUDE_TIME ) ) ||
|
if( ( gubMercAttitudeLevel <= 1 && ( ( uiCurrentTime - guiMercAttitudeTime ) > QUOTE_FIRST_ATTITUDE_TIME ) ) ||
|
||||||
( ( uiCurrentTime - guiMercAttitudeTime ) > QUOTE_ATTITUDE_TIME ) )
|
( ( uiCurrentTime - guiMercAttitudeTime ) > QUOTE_ATTITUDE_TIME ) )
|
||||||
{
|
{
|
||||||
|
|
||||||
if( gubMercAttitudeLevel == QUOTE_DELAY_SMALL_TALK)
|
if( gubMercAttitudeLevel == QUOTE_DELAY_SMALL_TALK)
|
||||||
@@ -3023,7 +3023,7 @@ void HandleMercAttitude()
|
|||||||
gMercProfiles[ gbCurrentSoldier ].bMercStatus = MERC_ANNOYED_WONT_CONTACT;
|
gMercProfiles[ gbCurrentSoldier ].bMercStatus = MERC_ANNOYED_WONT_CONTACT;
|
||||||
|
|
||||||
// add an event so we can reset the 'annoyance factor'
|
// add an event so we can reset the 'annoyance factor'
|
||||||
uiResetTime = ( Random( 600 ) );
|
uiResetTime = ( Random( 600 ) );
|
||||||
uiResetTime += GetWorldTotalMin() + MERC_ANNOYED_WONT_CONTACT_TIME_MINUTES;
|
uiResetTime += GetWorldTotalMin() + MERC_ANNOYED_WONT_CONTACT_TIME_MINUTES;
|
||||||
AddStrategicEvent( EVENT_AIM_RESET_MERC_ANNOYANCE, uiResetTime, gbCurrentSoldier );
|
AddStrategicEvent( EVENT_AIM_RESET_MERC_ANNOYANCE, uiResetTime, gbCurrentSoldier );
|
||||||
|
|
||||||
@@ -3046,7 +3046,7 @@ void StopMercTalking()
|
|||||||
{
|
{
|
||||||
if( gfIsShutUpMouseRegionActive )
|
if( gfIsShutUpMouseRegionActive )
|
||||||
{
|
{
|
||||||
MSYS_DisableRegion(&gSelectedShutUpMercRegion);
|
MSYS_DisableRegion(&gSelectedShutUpMercRegion);
|
||||||
|
|
||||||
ShutupaYoFace( giMercFaceIndex );
|
ShutupaYoFace( giMercFaceIndex );
|
||||||
gfMercIsTalking = FALSE;
|
gfMercIsTalking = FALSE;
|
||||||
@@ -3084,7 +3084,7 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
|||||||
static BOOLEAN fVideoConferenceCreated = FALSE;
|
static BOOLEAN fVideoConferenceCreated = FALSE;
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
UINT16 usPosX, usPosY;
|
UINT16 usPosX, usPosY;
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
VSURFACE_DESC vs_desc;
|
VSURFACE_DESC vs_desc;
|
||||||
|
|
||||||
//remove the face help text
|
//remove the face help text
|
||||||
@@ -3120,7 +3120,7 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
|||||||
|
|
||||||
|
|
||||||
// The video conference is not displayed
|
// The video conference is not displayed
|
||||||
if( gubVideoConferencingMode == AIM_VIDEO_NOT_DISPLAYED_MODE )
|
if( gubVideoConferencingMode == AIM_VIDEO_NOT_DISPLAYED_MODE )
|
||||||
{
|
{
|
||||||
gubVideoConferencingPreviousMode = gubVideoConferencingMode;
|
gubVideoConferencingPreviousMode = gubVideoConferencingMode;
|
||||||
gfRedrawScreen = TRUE;
|
gfRedrawScreen = TRUE;
|
||||||
@@ -3149,7 +3149,7 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
|||||||
MSYS_DisableRegion(&gSelectedShutUpMercRegion);
|
MSYS_DisableRegion(&gSelectedShutUpMercRegion);
|
||||||
|
|
||||||
//Enable the ability to click on the BIG face to go to different screen
|
//Enable the ability to click on the BIG face to go to different screen
|
||||||
MSYS_EnableRegion(&gSelectedFaceRegion);
|
MSYS_EnableRegion(&gSelectedFaceRegion);
|
||||||
|
|
||||||
// EnableDisableCurrentVideoConferenceButtons(FALSE);
|
// EnableDisableCurrentVideoConferenceButtons(FALSE);
|
||||||
if( gubVideoConferencingPreviousMode == AIM_VIDEO_HIRE_MERC_MODE )
|
if( gubVideoConferencingPreviousMode == AIM_VIDEO_HIRE_MERC_MODE )
|
||||||
@@ -3222,7 +3222,7 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The screen in which you first contact the merc, you have the option to hang up or goto hire merc screen
|
// The screen in which you first contact the merc, you have the option to hang up or goto hire merc screen
|
||||||
if( gubVideoConferencingMode == AIM_VIDEO_FIRST_CONTACT_MERC_MODE )
|
if( gubVideoConferencingMode == AIM_VIDEO_FIRST_CONTACT_MERC_MODE )
|
||||||
{
|
{
|
||||||
//if the last screen was the init screen, then we need to initialize the video face
|
//if the last screen was the init screen, then we need to initialize the video face
|
||||||
if( ( gubVideoConferencingPreviousMode == AIM_VIDEO_INIT_MODE) || ( gubVideoConferencingPreviousMode == AIM_VIDEO_NOT_DISPLAYED_MODE) )
|
if( ( gubVideoConferencingPreviousMode == AIM_VIDEO_INIT_MODE) || ( gubVideoConferencingPreviousMode == AIM_VIDEO_NOT_DISPLAYED_MODE) )
|
||||||
@@ -3242,12 +3242,12 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
|||||||
for(i=0; i<2; i++)
|
for(i=0; i<2; i++)
|
||||||
{
|
{
|
||||||
giAuthorizeButton[i] = CreateIconAndTextButton( guiVideoConferenceButtonImage[2], VideoConfercingText[i+AIM_MEMBER_HIRE],
|
giAuthorizeButton[i] = CreateIconAndTextButton( guiVideoConferenceButtonImage[2], VideoConfercingText[i+AIM_MEMBER_HIRE],
|
||||||
FONT12ARIAL,
|
FONT12ARIAL,
|
||||||
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, AIM_MEMBER_HANG_UP_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, AIM_MEMBER_HANG_UP_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnFirstContactButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnFirstContactButtonCallback);
|
||||||
|
|
||||||
MSYS_SetBtnUserData( giAuthorizeButton[i], 0, i);
|
MSYS_SetBtnUserData( giAuthorizeButton[i], 0, i);
|
||||||
SetButtonCursor(giAuthorizeButton[i], CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(giAuthorizeButton[i], CURSOR_LAPTOP_SCREEN);
|
||||||
@@ -3278,11 +3278,11 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
|||||||
for(i=0; i<3; i++)
|
for(i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
giContractLengthButton[i] = CreateIconAndTextButton( guiVideoConferenceButtonImage[0], VideoConfercingText[i+AIM_MEMBER_ONE_DAY], FONT12ARIAL,
|
giContractLengthButton[i] = CreateIconAndTextButton( guiVideoConferenceButtonImage[0], VideoConfercingText[i+AIM_MEMBER_ONE_DAY], FONT12ARIAL,
|
||||||
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
TEXT_LJUSTIFIED,
|
TEXT_LJUSTIFIED,
|
||||||
AIM_MEMBER_BUY_CONTRACT_LENGTH_X, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
AIM_MEMBER_BUY_CONTRACT_LENGTH_X, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnContractLengthButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnContractLengthButtonCallback);
|
||||||
|
|
||||||
SetButtonCursor(giContractLengthButton[i], CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(giContractLengthButton[i], CURSOR_LAPTOP_SCREEN);
|
||||||
MSYS_SetBtnUserData( giContractLengthButton[i], 0, i);
|
MSYS_SetBtnUserData( giContractLengthButton[i], 0, i);
|
||||||
@@ -3296,11 +3296,11 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
|||||||
{
|
{
|
||||||
giBuyEquipmentButton[i] = CreateIconAndTextButton( guiVideoConferenceButtonImage[0], VideoConfercingText[i+AIM_MEMBER_NO_EQUIPMENT],
|
giBuyEquipmentButton[i] = CreateIconAndTextButton( guiVideoConferenceButtonImage[0], VideoConfercingText[i+AIM_MEMBER_NO_EQUIPMENT],
|
||||||
FONT12ARIAL,
|
FONT12ARIAL,
|
||||||
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
TEXT_LJUSTIFIED,
|
TEXT_LJUSTIFIED,
|
||||||
AIM_MEMBER_BUY_EQUIPMENT_X, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
AIM_MEMBER_BUY_EQUIPMENT_X, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBuyEquipmentButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBuyEquipmentButtonCallback);
|
||||||
|
|
||||||
SetButtonCursor(giBuyEquipmentButton[i], CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(giBuyEquipmentButton[i], CURSOR_LAPTOP_SCREEN);
|
||||||
MSYS_SetBtnUserData( giBuyEquipmentButton[i], 0, i);
|
MSYS_SetBtnUserData( giBuyEquipmentButton[i], 0, i);
|
||||||
@@ -3317,12 +3317,12 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
|||||||
for(i=0; i<2; i++)
|
for(i=0; i<2; i++)
|
||||||
{
|
{
|
||||||
giAuthorizeButton[i] = CreateIconAndTextButton( guiVideoConferenceButtonImage[1], VideoConfercingText[i+AIM_MEMBER_TRANSFER_FUNDS],
|
giAuthorizeButton[i] = CreateIconAndTextButton( guiVideoConferenceButtonImage[1], VideoConfercingText[i+AIM_MEMBER_TRANSFER_FUNDS],
|
||||||
FONT12ARIAL,
|
FONT12ARIAL,
|
||||||
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, AIM_MEMBER_AUTHORIZE_PAY_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, AIM_MEMBER_AUTHORIZE_PAY_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnAuthorizeButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnAuthorizeButtonCallback);
|
||||||
|
|
||||||
SetButtonCursor(giAuthorizeButton[i], CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(giAuthorizeButton[i], CURSOR_LAPTOP_SCREEN);
|
||||||
MSYS_SetBtnUserData( giAuthorizeButton[i], 0, i);
|
MSYS_SetBtnUserData( giAuthorizeButton[i], 0, i);
|
||||||
@@ -3338,7 +3338,7 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
|||||||
|
|
||||||
|
|
||||||
// The merc is not home and the player gets the answering machine
|
// The merc is not home and the player gets the answering machine
|
||||||
if( gubVideoConferencingMode == AIM_VIDEO_MERC_ANSWERING_MACHINE_MODE )
|
if( gubVideoConferencingMode == AIM_VIDEO_MERC_ANSWERING_MACHINE_MODE )
|
||||||
{
|
{
|
||||||
gubVideoConferencingPreviousMode = gubVideoConferencingMode;
|
gubVideoConferencingPreviousMode = gubVideoConferencingMode;
|
||||||
|
|
||||||
@@ -3349,12 +3349,12 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
|||||||
guiVideoConferenceButtonImage[2] = LoadButtonImage("LAPTOP\\VideoConfButtons.sti", -1,2,-1,3,-1 );
|
guiVideoConferenceButtonImage[2] = LoadButtonImage("LAPTOP\\VideoConfButtons.sti", -1,2,-1,3,-1 );
|
||||||
|
|
||||||
giAnsweringMachineButton[0] = CreateIconAndTextButton( guiVideoConferenceButtonImage[2], VideoConfercingText[AIM_MEMBER_LEAVE_MESSAGE],
|
giAnsweringMachineButton[0] = CreateIconAndTextButton( guiVideoConferenceButtonImage[2], VideoConfercingText[AIM_MEMBER_LEAVE_MESSAGE],
|
||||||
FONT12ARIAL,
|
FONT12ARIAL,
|
||||||
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, AIM_MEMBER_HANG_UP_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, AIM_MEMBER_HANG_UP_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnAnsweringMachineButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnAnsweringMachineButtonCallback);
|
||||||
MSYS_SetBtnUserData( giAnsweringMachineButton[0], 0, 0);
|
MSYS_SetBtnUserData( giAnsweringMachineButton[0], 0, 0);
|
||||||
SetButtonCursor(giAnsweringMachineButton[0], CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(giAnsweringMachineButton[0], CURSOR_LAPTOP_SCREEN);
|
||||||
|
|
||||||
@@ -3365,17 +3365,17 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
|||||||
usPosX += AIM_MEMBER_AUTHORIZE_PAY_GAP;
|
usPosX += AIM_MEMBER_AUTHORIZE_PAY_GAP;
|
||||||
|
|
||||||
giAnsweringMachineButton[1] = CreateIconAndTextButton( guiVideoConferenceButtonImage[2], VideoConfercingText[AIM_MEMBER_HANG_UP],
|
giAnsweringMachineButton[1] = CreateIconAndTextButton( guiVideoConferenceButtonImage[2], VideoConfercingText[AIM_MEMBER_HANG_UP],
|
||||||
FONT12ARIAL,
|
FONT12ARIAL,
|
||||||
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, AIM_MEMBER_HANG_UP_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, AIM_MEMBER_HANG_UP_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnAnsweringMachineButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnAnsweringMachineButtonCallback);
|
||||||
|
|
||||||
MSYS_SetBtnUserData( giAnsweringMachineButton[1], 0, 1);
|
MSYS_SetBtnUserData( giAnsweringMachineButton[1], 0, 1);
|
||||||
SetButtonCursor(giAnsweringMachineButton[1], CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(giAnsweringMachineButton[1], CURSOR_LAPTOP_SCREEN);
|
||||||
|
|
||||||
//The face must be inited even though the face wont appear. It is so the voice is played
|
//The face must be inited even though the face wont appear. It is so the voice is played
|
||||||
InitVideoFace(gbCurrentSoldier);
|
InitVideoFace(gbCurrentSoldier);
|
||||||
|
|
||||||
//Make sure the merc doesnt ramble away to the player
|
//Make sure the merc doesnt ramble away to the player
|
||||||
@@ -3405,12 +3405,12 @@ BOOLEAN InitDeleteVideoConferencePopUp( )
|
|||||||
guiVideoConferenceButtonImage[2] = LoadButtonImage("LAPTOP\\VideoConfButtons.sti", -1,2,-1,3,-1 );
|
guiVideoConferenceButtonImage[2] = LoadButtonImage("LAPTOP\\VideoConfButtons.sti", -1,2,-1,3,-1 );
|
||||||
|
|
||||||
giHangUpButton = CreateIconAndTextButton( guiVideoConferenceButtonImage[2], VideoConfercingText[AIM_MEMBER_HANG_UP],
|
giHangUpButton = CreateIconAndTextButton( guiVideoConferenceButtonImage[2], VideoConfercingText[AIM_MEMBER_HANG_UP],
|
||||||
FONT12ARIAL,
|
FONT12ARIAL,
|
||||||
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
AIM_M_VIDEO_NAME_COLOR, AIM_M_VIDEO_NAME_SHADOWCOLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
AIM_MEMBER_HANG_UP_X, AIM_MEMBER_HANG_UP_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
AIM_MEMBER_HANG_UP_X, AIM_MEMBER_HANG_UP_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnHangUpButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnHangUpButtonCallback);
|
||||||
|
|
||||||
MSYS_SetBtnUserData( giHangUpButton, 0, 1);
|
MSYS_SetBtnUserData( giHangUpButton, 0, 1);
|
||||||
SetButtonCursor(giHangUpButton, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(giHangUpButton, CURSOR_LAPTOP_SCREEN);
|
||||||
@@ -3501,7 +3501,7 @@ BOOLEAN DeleteVideoConfPopUp()
|
|||||||
//Remove the video conf buttons images
|
//Remove the video conf buttons images
|
||||||
UnloadButtonImage(guiVideoConferenceButtonImage[2]);
|
UnloadButtonImage(guiVideoConferenceButtonImage[2]);
|
||||||
|
|
||||||
//Remove the Hangup buttons
|
//Remove the Hangup buttons
|
||||||
for(i=0; i<2; i++)
|
for(i=0; i<2; i++)
|
||||||
RemoveButton(giAuthorizeButton[i] );
|
RemoveButton(giAuthorizeButton[i] );
|
||||||
|
|
||||||
@@ -3764,10 +3764,10 @@ BOOLEAN HandleAnsweringMachineMessage()
|
|||||||
static BOOLEAN fDone;
|
static BOOLEAN fDone;
|
||||||
|
|
||||||
if( gfJustSwitchedVideoConferenceMode )
|
if( gfJustSwitchedVideoConferenceMode )
|
||||||
fDone = DisplayAnimatedAnsweringMachineMsg( TRUE, 12);
|
fDone = DisplayAnimatedAnsweringMachineMsg( TRUE, 12);
|
||||||
else if( !fDone )
|
else if( !fDone )
|
||||||
{
|
{
|
||||||
fDone = DisplayAnimatedAnsweringMachineMsg( FALSE, 12);
|
fDone = DisplayAnimatedAnsweringMachineMsg( FALSE, 12);
|
||||||
if( fDone )
|
if( fDone )
|
||||||
{
|
{
|
||||||
fDone = FALSE;
|
fDone = FALSE;
|
||||||
@@ -3780,7 +3780,7 @@ BOOLEAN HandleAnsweringMachineMessage()
|
|||||||
/*
|
/*
|
||||||
BOOLEAN DisplayAnimatedAnsweringMachineMsg( BOOLEAN fInit, UINT8 ubNumSubImages)
|
BOOLEAN DisplayAnimatedAnsweringMachineMsg( BOOLEAN fInit, UINT8 ubNumSubImages)
|
||||||
{
|
{
|
||||||
// HVOBJECT hImageHandle;
|
// HVOBJECT hImageHandle;
|
||||||
static UINT8 ubSubImage=0;
|
static UINT8 ubSubImage=0;
|
||||||
static UINT32 uiLastTime=0;
|
static UINT32 uiLastTime=0;
|
||||||
UINT32 uiCurTime = GetJA2Clock();
|
UINT32 uiCurTime = GetJA2Clock();
|
||||||
@@ -3821,7 +3821,7 @@ BOOLEAN DisplayAnimatedAnsweringMachineMsg( BOOLEAN fInit, UINT8 ubNumSubImages)
|
|||||||
|
|
||||||
//display the black background with text over it.
|
//display the black background with text over it.
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, AIM_MEMBER_VIDEO_FACE_X, AIM_MEMBER_VIDEO_FACE_Y, AIM_MEMBER_VIDEO_FACE_X+AIM_MEMBER_VIDEO_FACE_WIDTH, AIM_MEMBER_VIDEO_FACE_Y+AIM_MEMBER_VIDEO_FACE_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, AIM_MEMBER_VIDEO_FACE_X, AIM_MEMBER_VIDEO_FACE_Y, AIM_MEMBER_VIDEO_FACE_X+AIM_MEMBER_VIDEO_FACE_WIDTH, AIM_MEMBER_VIDEO_FACE_Y+AIM_MEMBER_VIDEO_FACE_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
DisplayWrappedString(AIM_MEMBER_VIDEO_FACE_X, AIM_MEMBER_VIDEO_FACE_Y+20, AIM_MEMBER_VIDEO_FACE_WIDTH, 2, FONT14ARIAL, 145, AimPopUpText[AIM_MEMBER_LEAVE_MSG], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
DisplayWrappedString(AIM_MEMBER_VIDEO_FACE_X, AIM_MEMBER_VIDEO_FACE_Y+20, AIM_MEMBER_VIDEO_FACE_WIDTH, 2, FONT14ARIAL, 145, AimPopUpText[AIM_MEMBER_LEAVE_MSG], FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||||
InvalidateRegion(AIM_MEMBER_VIDEO_FACE_X,AIM_MEMBER_VIDEO_FACE_Y, AIM_MEMBER_VIDEO_FACE_X+AIM_MEMBER_VIDEO_FACE_WIDTH,AIM_MEMBER_VIDEO_FACE_Y+AIM_MEMBER_VIDEO_FACE_HEIGHT);
|
InvalidateRegion(AIM_MEMBER_VIDEO_FACE_X,AIM_MEMBER_VIDEO_FACE_Y, AIM_MEMBER_VIDEO_FACE_X+AIM_MEMBER_VIDEO_FACE_WIDTH,AIM_MEMBER_VIDEO_FACE_Y+AIM_MEMBER_VIDEO_FACE_HEIGHT);
|
||||||
|
|
||||||
ubSubImage ++;
|
ubSubImage ++;
|
||||||
@@ -3846,7 +3846,7 @@ void ResetMercAnnoyanceAtPlayer( UINT8 ubMercID )
|
|||||||
{
|
{
|
||||||
//if merc is still annoyed, reset back to 0
|
//if merc is still annoyed, reset back to 0
|
||||||
|
|
||||||
if ( ubMercID == LARRY_NORMAL )
|
if ( ubMercID == LARRY_NORMAL )
|
||||||
{
|
{
|
||||||
if ( CheckFact( FACT_LARRY_CHANGED, 0 ) )
|
if ( CheckFact( FACT_LARRY_CHANGED, 0 ) )
|
||||||
{
|
{
|
||||||
@@ -4445,3 +4445,4 @@ void DisplayAimMemberClickOnFaceHelpText()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+29
-30
@@ -137,7 +137,7 @@ enum
|
|||||||
|
|
||||||
|
|
||||||
//Toc menu mouse regions
|
//Toc menu mouse regions
|
||||||
MOUSE_REGION gSelectedPolicyTocMenuRegion[ NUM_AIM_POLICY_TOC_BUTTONS ];
|
MOUSE_REGION gSelectedPolicyTocMenuRegion[ NUM_AIM_POLICY_TOC_BUTTONS ];
|
||||||
void SelectPolicyTocMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectPolicyTocMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
//Agree/Disagree menu Buttons regions
|
//Agree/Disagree menu Buttons regions
|
||||||
@@ -156,7 +156,7 @@ INT32 guiPoliciesMenuButtonImage;
|
|||||||
UINT32 guiBottomButton;
|
UINT32 guiBottomButton;
|
||||||
UINT32 guiBottomButton2;
|
UINT32 guiBottomButton2;
|
||||||
UINT8 gubCurPageNum;
|
UINT8 gubCurPageNum;
|
||||||
BOOLEAN gfInPolicyToc = FALSE;
|
BOOLEAN gfInPolicyToc = FALSE;
|
||||||
BOOLEAN gfInAgreementPage = FALSE;
|
BOOLEAN gfInAgreementPage = FALSE;
|
||||||
BOOLEAN gfAimPolicyMenuBarLoaded = FALSE;
|
BOOLEAN gfAimPolicyMenuBarLoaded = FALSE;
|
||||||
UINT32 guiContentButton;
|
UINT32 guiContentButton;
|
||||||
@@ -174,8 +174,8 @@ BOOLEAN ExitAimPolicyMenuBar(void);
|
|||||||
BOOLEAN InitAimPolicyTocMenu(void);
|
BOOLEAN InitAimPolicyTocMenu(void);
|
||||||
BOOLEAN ExitAimPolicyTocMenu(void);
|
BOOLEAN ExitAimPolicyTocMenu(void);
|
||||||
BOOLEAN DrawAimPolicyMenu();
|
BOOLEAN DrawAimPolicyMenu();
|
||||||
BOOLEAN DisplayAimPolicyStatement(void);
|
BOOLEAN DisplayAimPolicyStatement(void);
|
||||||
BOOLEAN DisplayAimPolicyTitleText(void);
|
BOOLEAN DisplayAimPolicyTitleText(void);
|
||||||
BOOLEAN InitAgreementRegion(void);
|
BOOLEAN InitAgreementRegion(void);
|
||||||
BOOLEAN ExitAgreementButton(void);
|
BOOLEAN ExitAgreementButton(void);
|
||||||
void DisableAimPolicyButton();
|
void DisableAimPolicyButton();
|
||||||
@@ -184,7 +184,7 @@ void ChangingAimPoliciesSubPage( UINT8 ubSubPageNumber );
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN DisplayAimPolicyTitle(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber);
|
BOOLEAN DisplayAimPolicyTitle(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber);
|
||||||
UINT16 DisplayAimPolicyParagraph(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber);
|
UINT16 DisplayAimPolicyParagraph(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber);
|
||||||
UINT16 DisplayAimPolicySubParagraph(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber);
|
UINT16 DisplayAimPolicySubParagraph(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber);
|
||||||
|
|
||||||
@@ -203,7 +203,7 @@ void EnterInitAimPolicies()
|
|||||||
|
|
||||||
BOOLEAN EnterAimPolicies()
|
BOOLEAN EnterAimPolicies()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
InitAimDefaults();
|
InitAimDefaults();
|
||||||
|
|
||||||
@@ -384,11 +384,11 @@ void RenderAimPolicies()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
|
|
||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
|
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -401,7 +401,7 @@ BOOLEAN InitAimPolicyMenuBar(void)
|
|||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
|
||||||
//Load graphic for buttons
|
//Load graphic for buttons
|
||||||
guiPoliciesMenuButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
guiPoliciesMenuButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
usPosX = AIM_POLICY_MENU_X;
|
usPosX = AIM_POLICY_MENU_X;
|
||||||
for(i=0; i<AIM_POLICY_MENU_BUTTON_AMOUNT; i++)
|
for(i=0; i<AIM_POLICY_MENU_BUTTON_AMOUNT; i++)
|
||||||
@@ -414,11 +414,11 @@ BOOLEAN InitAimPolicyMenuBar(void)
|
|||||||
// MSYS_SetBtnUserData( guiPoliciesMenuButton[i], 0, i);
|
// MSYS_SetBtnUserData( guiPoliciesMenuButton[i], 0, i);
|
||||||
|
|
||||||
guiPoliciesMenuButton[i] = CreateIconAndTextButton( guiPoliciesMenuButtonImage, AimPolicyText[i], FONT10ARIAL,
|
guiPoliciesMenuButton[i] = CreateIconAndTextButton( guiPoliciesMenuButtonImage, AimPolicyText[i], FONT10ARIAL,
|
||||||
AIM_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
AIM_BUTTON_ON_COLOR, DEFAULT_SHADOW,
|
||||||
AIM_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
AIM_BUTTON_OFF_COLOR, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, AIM_POLICY_MENU_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, AIM_POLICY_MENU_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnPoliciesMenuButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnPoliciesMenuButtonCallback);
|
||||||
SetButtonCursor(guiPoliciesMenuButton[i], CURSOR_WWW);
|
SetButtonCursor(guiPoliciesMenuButton[i], CURSOR_WWW);
|
||||||
MSYS_SetBtnUserData( guiPoliciesMenuButton[i], 0, i);
|
MSYS_SetBtnUserData( guiPoliciesMenuButton[i], 0, i);
|
||||||
|
|
||||||
@@ -460,7 +460,7 @@ BOOLEAN DrawAimPolicyMenu()
|
|||||||
UINT16 usHeight;
|
UINT16 usHeight;
|
||||||
UINT32 uiStartLoc=0;
|
UINT32 uiStartLoc=0;
|
||||||
CHAR16 sText[400];
|
CHAR16 sText[400];
|
||||||
HVOBJECT hContentButtonHandle;
|
HVOBJECT hContentButtonHandle;
|
||||||
UINT8 ubLocInFile[]=
|
UINT8 ubLocInFile[]=
|
||||||
{ DEFINITIONS,
|
{ DEFINITIONS,
|
||||||
LENGTH_OF_ENGAGEMENT,
|
LENGTH_OF_ENGAGEMENT,
|
||||||
@@ -478,7 +478,7 @@ BOOLEAN DrawAimPolicyMenu()
|
|||||||
usPosY = AIM_POLICY_TOC_Y;
|
usPosY = AIM_POLICY_TOC_Y;
|
||||||
for(i=0; i<NUM_AIM_POLICY_TOC_BUTTONS; i++)
|
for(i=0; i<NUM_AIM_POLICY_TOC_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
BltVideoObject(FRAME_BUFFER, hContentButtonHandle, 0,AIM_POLICY_TOC_X, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hContentButtonHandle, 0,AIM_POLICY_TOC_X, usPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
uiStartLoc = AIM_POLICY_LINE_SIZE * ubLocInFile[i];
|
uiStartLoc = AIM_POLICY_LINE_SIZE * ubLocInFile[i];
|
||||||
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
|
LoadEncryptedDataFromFile(AIMPOLICYFILE, sText, uiStartLoc, AIM_HISTORY_LINE_SIZE);
|
||||||
@@ -495,8 +495,6 @@ BOOLEAN InitAimPolicyTocMenu(void)
|
|||||||
{
|
{
|
||||||
UINT16 i, usPosY;
|
UINT16 i, usPosY;
|
||||||
UINT16 usHeight;
|
UINT16 usHeight;
|
||||||
UINT32 uiStartLoc=0;
|
|
||||||
|
|
||||||
if(gfInPolicyToc)
|
if(gfInPolicyToc)
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
|
|
||||||
@@ -506,7 +504,7 @@ BOOLEAN InitAimPolicyTocMenu(void)
|
|||||||
{
|
{
|
||||||
//Mouse region for the toc buttons
|
//Mouse region for the toc buttons
|
||||||
MSYS_DefineRegion( &gSelectedPolicyTocMenuRegion[i], AIM_POLICY_TOC_X, usPosY, (UINT16)(AIM_POLICY_TOC_X + AIM_CONTENTBUTTON_WIDTH), (UINT16)(usPosY + AIM_CONTENTBUTTON_HEIGHT), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedPolicyTocMenuRegion[i], AIM_POLICY_TOC_X, usPosY, (UINT16)(AIM_POLICY_TOC_X + AIM_CONTENTBUTTON_WIDTH), (UINT16)(usPosY + AIM_CONTENTBUTTON_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectPolicyTocMenuRegionCallBack);
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectPolicyTocMenuRegionCallBack);
|
||||||
MSYS_AddRegion(&gSelectedPolicyTocMenuRegion[i]);
|
MSYS_AddRegion(&gSelectedPolicyTocMenuRegion[i]);
|
||||||
MSYS_SetRegionUserData( &gSelectedPolicyTocMenuRegion[i], 0, i+2);
|
MSYS_SetRegionUserData( &gSelectedPolicyTocMenuRegion[i], 0, i+2);
|
||||||
|
|
||||||
@@ -556,7 +554,7 @@ void SelectPolicyTocMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN DisplayAimPolicyTitleText(void)
|
BOOLEAN DisplayAimPolicyTitleText(void)
|
||||||
{
|
{
|
||||||
CHAR16 sText[400];
|
CHAR16 sText[400];
|
||||||
UINT32 uiStartLoc = 0;
|
UINT32 uiStartLoc = 0;
|
||||||
@@ -574,7 +572,7 @@ BOOLEAN DisplayAimPolicyTitleText(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN DisplayAimPolicyStatement(void)
|
BOOLEAN DisplayAimPolicyStatement(void)
|
||||||
{
|
{
|
||||||
CHAR16 sText[400];
|
CHAR16 sText[400];
|
||||||
UINT32 uiStartLoc = 0;
|
UINT32 uiStartLoc = 0;
|
||||||
@@ -603,7 +601,7 @@ BOOLEAN InitAgreementRegion(void)
|
|||||||
gfExitingPolicesAgreeButton = FALSE;
|
gfExitingPolicesAgreeButton = FALSE;
|
||||||
|
|
||||||
//Load graphic for buttons
|
//Load graphic for buttons
|
||||||
guiPoliciesButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
guiPoliciesButtonImage = LoadButtonImage("LAPTOP\\BottomButtons2.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
usPosX = AIM_POLICY_AGREEMENT_X;
|
usPosX = AIM_POLICY_AGREEMENT_X;
|
||||||
for(i=0; i < 2; i++)
|
for(i=0; i < 2; i++)
|
||||||
@@ -615,11 +613,11 @@ BOOLEAN InitAgreementRegion(void)
|
|||||||
// MSYS_SetBtnUserData( guiPoliciesAgreeButton[i], 0, i);
|
// MSYS_SetBtnUserData( guiPoliciesAgreeButton[i], 0, i);
|
||||||
|
|
||||||
guiPoliciesAgreeButton[i] = CreateIconAndTextButton( guiPoliciesButtonImage, AimPolicyText[i+AIM_POLICIES_DISAGREE], AIM_POLICY_TOC_FONT,
|
guiPoliciesAgreeButton[i] = CreateIconAndTextButton( guiPoliciesButtonImage, AimPolicyText[i+AIM_POLICIES_DISAGREE], AIM_POLICY_TOC_FONT,
|
||||||
AIM_POLICY_AGREE_TOC_COLOR_ON, DEFAULT_SHADOW,
|
AIM_POLICY_AGREE_TOC_COLOR_ON, DEFAULT_SHADOW,
|
||||||
AIM_POLICY_AGREE_TOC_COLOR_OFF, DEFAULT_SHADOW,
|
AIM_POLICY_AGREE_TOC_COLOR_OFF, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, AIM_POLICY_AGREEMENT_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, AIM_POLICY_AGREEMENT_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnPoliciesAgreeButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnPoliciesAgreeButtonCallback);
|
||||||
SetButtonCursor(guiPoliciesAgreeButton[i], CURSOR_WWW);
|
SetButtonCursor(guiPoliciesAgreeButton[i], CURSOR_WWW);
|
||||||
MSYS_SetBtnUserData( guiPoliciesAgreeButton[i], 0, i);
|
MSYS_SetBtnUserData( guiPoliciesAgreeButton[i], 0, i);
|
||||||
|
|
||||||
@@ -640,7 +638,7 @@ BOOLEAN ExitAgreementButton(void)
|
|||||||
UnloadButtonImage( guiPoliciesButtonImage);
|
UnloadButtonImage( guiPoliciesButtonImage);
|
||||||
|
|
||||||
for(i=0; i<2; i++)
|
for(i=0; i<2; i++)
|
||||||
RemoveButton( guiPoliciesAgreeButton[ i ]);
|
RemoveButton( guiPoliciesAgreeButton[ i ]);
|
||||||
|
|
||||||
gfInAgreementPage = FALSE;
|
gfInAgreementPage = FALSE;
|
||||||
|
|
||||||
@@ -649,7 +647,7 @@ BOOLEAN ExitAgreementButton(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN DisplayAimPolicyTitle(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber)
|
BOOLEAN DisplayAimPolicyTitle(UINT16 usPosY, UINT8 ubPageNum, FLOAT fNumber)
|
||||||
{
|
{
|
||||||
CHAR16 sText[400];
|
CHAR16 sText[400];
|
||||||
UINT32 uiStartLoc = 0;
|
UINT32 uiStartLoc = 0;
|
||||||
@@ -857,7 +855,7 @@ void DisableAimPolicyButton()
|
|||||||
ButtonList[ guiPoliciesMenuButton[ 0 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
ButtonList[ guiPoliciesMenuButton[ 0 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||||
ButtonList[ guiPoliciesMenuButton[ 2 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
ButtonList[ guiPoliciesMenuButton[ 2 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||||
}
|
}
|
||||||
else if( ( gubCurPageNum == AIM_POLICY_LAST_PAGE ) )
|
else if( ( gubCurPageNum == AIM_POLICY_LAST_PAGE ) )
|
||||||
{
|
{
|
||||||
ButtonList[ guiPoliciesMenuButton[ 3 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
ButtonList[ guiPoliciesMenuButton[ 3 ] ]->uiFlags |= (BUTTON_CLICKED_ON );
|
||||||
}
|
}
|
||||||
@@ -889,3 +887,4 @@ void ChangingAimPoliciesSubPage( UINT8 ubSubPageNumber )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+67
-66
@@ -107,40 +107,40 @@ UINT8 gubOldListMode;
|
|||||||
|
|
||||||
// Mouse stuff
|
// Mouse stuff
|
||||||
//Clicking on To Mugshot
|
//Clicking on To Mugshot
|
||||||
MOUSE_REGION gSelectedToMugShotRegion;
|
MOUSE_REGION gSelectedToMugShotRegion;
|
||||||
void SelectToMugShotRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectToMugShotRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
//Clicking on ToStats
|
//Clicking on ToStats
|
||||||
MOUSE_REGION gSelectedToStatsRegion;
|
MOUSE_REGION gSelectedToStatsRegion;
|
||||||
void SelectToStatsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectToStatsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
//Clicking on ToStats
|
//Clicking on ToStats
|
||||||
MOUSE_REGION gSelectedToArchiveRegion;
|
MOUSE_REGION gSelectedToArchiveRegion;
|
||||||
void SelectToArchiveRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectToArchiveRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
//Clicking on Price Check Box
|
//Clicking on Price Check Box
|
||||||
MOUSE_REGION gSelectedPriceBoxRegion;
|
MOUSE_REGION gSelectedPriceBoxRegion;
|
||||||
void SelectPriceBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectPriceBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
//Clicking on Explosive Check Box
|
//Clicking on Explosive Check Box
|
||||||
MOUSE_REGION gSelectedExpBoxRegion;
|
MOUSE_REGION gSelectedExpBoxRegion;
|
||||||
void SelectExpBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectExpBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
//Clicking on Markmanship Check Box
|
//Clicking on Markmanship Check Box
|
||||||
MOUSE_REGION gSelectedMarkBoxRegion;
|
MOUSE_REGION gSelectedMarkBoxRegion;
|
||||||
void SelectMarkBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectMarkBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
//Clicking on Medical Check box
|
//Clicking on Medical Check box
|
||||||
MOUSE_REGION gSelectedMedicalBoxRegion;
|
MOUSE_REGION gSelectedMedicalBoxRegion;
|
||||||
void SelectMedicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectMedicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
//Clicking on Explosive Check Box
|
//Clicking on Explosive Check Box
|
||||||
MOUSE_REGION gSelectedExplosiveBoxRegion;
|
MOUSE_REGION gSelectedExplosiveBoxRegion;
|
||||||
void SelectExplosiveBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectExplosiveBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
//Clicking on Mechanical Check Box
|
//Clicking on Mechanical Check Box
|
||||||
MOUSE_REGION gSelectedMechanicalBoxRegion;
|
MOUSE_REGION gSelectedMechanicalBoxRegion;
|
||||||
void SelectMechanicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectMechanicalBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
//Clicking on Ascending Check Box
|
//Clicking on Ascending Check Box
|
||||||
MOUSE_REGION gSelectedAscendBoxRegion;
|
MOUSE_REGION gSelectedAscendBoxRegion;
|
||||||
void SelectAscendBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectAscendBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
//Clicking on Descending Check Box
|
//Clicking on Descending Check Box
|
||||||
MOUSE_REGION gSelectedDescendBoxRegion;
|
MOUSE_REGION gSelectedDescendBoxRegion;
|
||||||
void SelectDescendBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectDescendBoxRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ void GameInitAimSort()
|
|||||||
|
|
||||||
BOOLEAN EnterAimSort()
|
BOOLEAN EnterAimSort()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
UINT8 ubCurNumber=0;
|
UINT8 ubCurNumber=0;
|
||||||
UINT16 ubWidth;
|
UINT16 ubWidth;
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
@@ -231,18 +231,18 @@ BOOLEAN EnterAimSort()
|
|||||||
|
|
||||||
//Mouse region for the ToMugShotRegion
|
//Mouse region for the ToMugShotRegion
|
||||||
MSYS_DefineRegion( &gSelectedToMugShotRegion, AIM_SORT_TO_MUGSHOTS_X, AIM_SORT_TO_MUGSHOTS_Y, (AIM_SORT_TO_MUGSHOTS_X + AIM_SORT_TO_MUGSHOTS_SIZE), (AIM_SORT_TO_MUGSHOTS_Y + AIM_SORT_TO_MUGSHOTS_SIZE), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedToMugShotRegion, AIM_SORT_TO_MUGSHOTS_X, AIM_SORT_TO_MUGSHOTS_Y, (AIM_SORT_TO_MUGSHOTS_X + AIM_SORT_TO_MUGSHOTS_SIZE), (AIM_SORT_TO_MUGSHOTS_Y + AIM_SORT_TO_MUGSHOTS_SIZE), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectToMugShotRegionCallBack );
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectToMugShotRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedToMugShotRegion);
|
MSYS_AddRegion(&gSelectedToMugShotRegion);
|
||||||
|
|
||||||
//Mouse region for the ToStatsRegion
|
//Mouse region for the ToStatsRegion
|
||||||
MSYS_DefineRegion( &gSelectedToStatsRegion, AIM_SORT_TO_STATS_X, AIM_SORT_TO_STATS_Y, (AIM_SORT_TO_STATS_X + AIM_SORT_TO_STATS_SIZE), (AIM_SORT_TO_STATS_Y + AIM_SORT_TO_STATS_SIZE), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedToStatsRegion, AIM_SORT_TO_STATS_X, AIM_SORT_TO_STATS_Y, (AIM_SORT_TO_STATS_X + AIM_SORT_TO_STATS_SIZE), (AIM_SORT_TO_STATS_Y + AIM_SORT_TO_STATS_SIZE), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectToStatsRegionCallBack );
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectToStatsRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedToStatsRegion);
|
MSYS_AddRegion(&gSelectedToStatsRegion);
|
||||||
|
|
||||||
//Mouse region for the ToArhciveRegion
|
//Mouse region for the ToArhciveRegion
|
||||||
MSYS_DefineRegion( &gSelectedToArchiveRegion, AIM_SORT_TO_ALUMNI_X, AIM_SORT_TO_ALUMNI_Y, (AIM_SORT_TO_ALUMNI_X + AIM_SORT_TO_ALUMNI_SIZE), (AIM_SORT_TO_ALUMNI_Y + AIM_SORT_TO_ALUMNI_SIZE), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedToArchiveRegion, AIM_SORT_TO_ALUMNI_X, AIM_SORT_TO_ALUMNI_Y, (AIM_SORT_TO_ALUMNI_X + AIM_SORT_TO_ALUMNI_SIZE), (AIM_SORT_TO_ALUMNI_Y + AIM_SORT_TO_ALUMNI_SIZE), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectToArchiveRegionCallBack );
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectToArchiveRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedToArchiveRegion);
|
MSYS_AddRegion(&gSelectedToArchiveRegion);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -251,43 +251,43 @@ BOOLEAN EnterAimSort()
|
|||||||
//Mouse region for the Price Check Box
|
//Mouse region for the Price Check Box
|
||||||
ubWidth = StringPixLength( AimSortText[PRICE], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_PRICE_TEXT_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
ubWidth = StringPixLength( AimSortText[PRICE], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_PRICE_TEXT_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
||||||
MSYS_DefineRegion( &gSelectedPriceBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedPriceBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectPriceBoxRegionCallBack );
|
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectPriceBoxRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedPriceBoxRegion);
|
MSYS_AddRegion(&gSelectedPriceBoxRegion);
|
||||||
|
|
||||||
ubCurNumber+=2;
|
ubCurNumber+=2;
|
||||||
ubWidth = StringPixLength( AimSortText[EXPERIENCE], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_PRICE_TEXT_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
ubWidth = StringPixLength( AimSortText[EXPERIENCE], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_PRICE_TEXT_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
||||||
//Mouse region for the Experience Check Box
|
//Mouse region for the Experience Check Box
|
||||||
MSYS_DefineRegion( &gSelectedExpBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedExpBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectExpBoxRegionCallBack );
|
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectExpBoxRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedExpBoxRegion);
|
MSYS_AddRegion(&gSelectedExpBoxRegion);
|
||||||
|
|
||||||
ubCurNumber+=2;
|
ubCurNumber+=2;
|
||||||
ubWidth = StringPixLength( AimSortText[AIMMARKSMANSHIP], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_PRICE_TEXT_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
ubWidth = StringPixLength( AimSortText[AIMMARKSMANSHIP], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_PRICE_TEXT_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
||||||
//Mouse region for the Markmanship Check Box
|
//Mouse region for the Markmanship Check Box
|
||||||
MSYS_DefineRegion( &gSelectedMarkBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedMarkBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectMarkBoxRegionCallBack );
|
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectMarkBoxRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedMarkBoxRegion);
|
MSYS_AddRegion(&gSelectedMarkBoxRegion);
|
||||||
|
|
||||||
ubCurNumber+=2;
|
ubCurNumber+=2;
|
||||||
ubWidth = StringPixLength( AimSortText[AIMMEDICAL], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MEDICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
ubWidth = StringPixLength( AimSortText[AIMMEDICAL], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MEDICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
||||||
//Mouse region for the Medical Check Box
|
//Mouse region for the Medical Check Box
|
||||||
MSYS_DefineRegion( &gSelectedMedicalBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedMedicalBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectMedicalBoxRegionCallBack );
|
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectMedicalBoxRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedMedicalBoxRegion);
|
MSYS_AddRegion(&gSelectedMedicalBoxRegion);
|
||||||
|
|
||||||
ubCurNumber+=2;
|
ubCurNumber+=2;
|
||||||
ubWidth = StringPixLength( AimSortText[EXPLOSIVES], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MEDICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
ubWidth = StringPixLength( AimSortText[EXPLOSIVES], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MEDICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
||||||
//Mouse region for the Explosive Check Box
|
//Mouse region for the Explosive Check Box
|
||||||
MSYS_DefineRegion( &gSelectedExplosiveBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedExplosiveBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectExplosiveBoxRegionCallBack );
|
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectExplosiveBoxRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedExplosiveBoxRegion);
|
MSYS_AddRegion(&gSelectedExplosiveBoxRegion);
|
||||||
|
|
||||||
ubCurNumber+=2;
|
ubCurNumber+=2;
|
||||||
ubWidth = StringPixLength( AimSortText[AIMMECHANICAL], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MEDICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
ubWidth = StringPixLength( AimSortText[AIMMECHANICAL], AIM_SORT_FONT_SORT_TEXT) + AimSortCheckBoxLoc[ ubCurNumber ] + (AIM_SORT_MEDICAL_X - AimSortCheckBoxLoc[ ubCurNumber ]) - 3;
|
||||||
//Mouse region for the Mechanical Check Box
|
//Mouse region for the Mechanical Check Box
|
||||||
MSYS_DefineRegion( &gSelectedMechanicalBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedMechanicalBoxRegion, AimSortCheckBoxLoc[ ubCurNumber ] , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)ubWidth, (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectMechanicalBoxRegionCallBack );
|
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectMechanicalBoxRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedMechanicalBoxRegion);
|
MSYS_AddRegion(&gSelectedMechanicalBoxRegion);
|
||||||
|
|
||||||
|
|
||||||
ubCurNumber+=2;
|
ubCurNumber+=2;
|
||||||
@@ -295,16 +295,16 @@ BOOLEAN EnterAimSort()
|
|||||||
ubWidth = AimSortCheckBoxLoc[ ubCurNumber ] - StringPixLength( AimSortText[ASCENDING], AIM_SORT_FONT_SORT_TEXT) - 6;
|
ubWidth = AimSortCheckBoxLoc[ ubCurNumber ] - StringPixLength( AimSortText[ASCENDING], AIM_SORT_FONT_SORT_TEXT) - 6;
|
||||||
//Mouse region for the Ascend Check Box
|
//Mouse region for the Ascend Check Box
|
||||||
MSYS_DefineRegion( &gSelectedAscendBoxRegion, ubWidth , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)(AimSortCheckBoxLoc[ ubCurNumber ] + AIM_SORT_CHECKBOX_SIZE), (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedAscendBoxRegion, ubWidth , AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)(AimSortCheckBoxLoc[ ubCurNumber ] + AIM_SORT_CHECKBOX_SIZE), (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectAscendBoxRegionCallBack );
|
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectAscendBoxRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedAscendBoxRegion);
|
MSYS_AddRegion(&gSelectedAscendBoxRegion);
|
||||||
|
|
||||||
ubCurNumber+=2;
|
ubCurNumber+=2;
|
||||||
ubWidth = AimSortCheckBoxLoc[ ubCurNumber ] - StringPixLength( AimSortText[DESCENDING], AIM_SORT_FONT_SORT_TEXT) - 6;
|
ubWidth = AimSortCheckBoxLoc[ ubCurNumber ] - StringPixLength( AimSortText[DESCENDING], AIM_SORT_FONT_SORT_TEXT) - 6;
|
||||||
|
|
||||||
//Mouse region for the Descend Check Box
|
//Mouse region for the Descend Check Box
|
||||||
MSYS_DefineRegion( &gSelectedDescendBoxRegion, ubWidth, AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)(AimSortCheckBoxLoc[ ubCurNumber ] + AIM_SORT_CHECKBOX_SIZE), (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedDescendBoxRegion, ubWidth, AimSortCheckBoxLoc[ubCurNumber + 1] , (UINT16)(AimSortCheckBoxLoc[ ubCurNumber ] + AIM_SORT_CHECKBOX_SIZE), (UINT16)(AimSortCheckBoxLoc[ ubCurNumber + 1 ] + AIM_SORT_CHECKBOX_SIZE), MSYS_PRIORITY_HIGH,
|
||||||
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectDescendBoxRegionCallBack );
|
MSYS_NO_CURSOR, MSYS_NO_CALLBACK, SelectDescendBoxRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedDescendBoxRegion);
|
MSYS_AddRegion(&gSelectedDescendBoxRegion);
|
||||||
|
|
||||||
|
|
||||||
InitAimMenuBar();
|
InitAimMenuBar();
|
||||||
@@ -327,18 +327,18 @@ void ExitAimSort()
|
|||||||
DeleteVideoObjectFromIndex(guiToStats);
|
DeleteVideoObjectFromIndex(guiToStats);
|
||||||
DeleteVideoObjectFromIndex(guiSelectLight);
|
DeleteVideoObjectFromIndex(guiSelectLight);
|
||||||
|
|
||||||
MSYS_RemoveRegion( &gSelectedToMugShotRegion);
|
MSYS_RemoveRegion( &gSelectedToMugShotRegion);
|
||||||
MSYS_RemoveRegion( &gSelectedToStatsRegion);
|
MSYS_RemoveRegion( &gSelectedToStatsRegion);
|
||||||
MSYS_RemoveRegion( &gSelectedToArchiveRegion);
|
MSYS_RemoveRegion( &gSelectedToArchiveRegion);
|
||||||
|
|
||||||
MSYS_RemoveRegion( &gSelectedPriceBoxRegion);
|
MSYS_RemoveRegion( &gSelectedPriceBoxRegion);
|
||||||
MSYS_RemoveRegion( &gSelectedExpBoxRegion);
|
MSYS_RemoveRegion( &gSelectedExpBoxRegion);
|
||||||
MSYS_RemoveRegion( &gSelectedMarkBoxRegion);
|
MSYS_RemoveRegion( &gSelectedMarkBoxRegion);
|
||||||
MSYS_RemoveRegion( &gSelectedMedicalBoxRegion);
|
MSYS_RemoveRegion( &gSelectedMedicalBoxRegion);
|
||||||
MSYS_RemoveRegion( &gSelectedExplosiveBoxRegion);
|
MSYS_RemoveRegion( &gSelectedExplosiveBoxRegion);
|
||||||
MSYS_RemoveRegion( &gSelectedMechanicalBoxRegion);
|
MSYS_RemoveRegion( &gSelectedMechanicalBoxRegion);
|
||||||
MSYS_RemoveRegion( &gSelectedAscendBoxRegion);
|
MSYS_RemoveRegion( &gSelectedAscendBoxRegion);
|
||||||
MSYS_RemoveRegion( &gSelectedDescendBoxRegion);
|
MSYS_RemoveRegion( &gSelectedDescendBoxRegion);
|
||||||
ExitAimMenuBar();
|
ExitAimMenuBar();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -350,27 +350,27 @@ void HandleAimSort()
|
|||||||
|
|
||||||
void RenderAimSort()
|
void RenderAimSort()
|
||||||
{
|
{
|
||||||
HVOBJECT hSortByHandle;
|
HVOBJECT hSortByHandle;
|
||||||
HVOBJECT hToAlumniHandle;
|
HVOBJECT hToAlumniHandle;
|
||||||
HVOBJECT hToMugShotHandle;
|
HVOBJECT hToMugShotHandle;
|
||||||
HVOBJECT hToStatsHandle;
|
HVOBJECT hToStatsHandle;
|
||||||
|
|
||||||
DrawAimDefaults();
|
DrawAimDefaults();
|
||||||
// SortBy
|
// SortBy
|
||||||
GetVideoObject(&hSortByHandle, guiSortByBox);
|
GetVideoObject(&hSortByHandle, guiSortByBox);
|
||||||
BltVideoObject(FRAME_BUFFER, hSortByHandle, 0,AIM_SORT_SORT_BY_X, AIM_SORT_SORT_BY_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hSortByHandle, 0,AIM_SORT_SORT_BY_X, AIM_SORT_SORT_BY_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// To MugShots
|
// To MugShots
|
||||||
GetVideoObject(&hToMugShotHandle, guiToMugShots);
|
GetVideoObject(&hToMugShotHandle, guiToMugShots);
|
||||||
BltVideoObject(FRAME_BUFFER, hToMugShotHandle, 0,AIM_SORT_TO_MUGSHOTS_X, AIM_SORT_TO_MUGSHOTS_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hToMugShotHandle, 0,AIM_SORT_TO_MUGSHOTS_X, AIM_SORT_TO_MUGSHOTS_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// To stats
|
// To stats
|
||||||
GetVideoObject(&hToStatsHandle, guiToStats);
|
GetVideoObject(&hToStatsHandle, guiToStats);
|
||||||
BltVideoObject(FRAME_BUFFER, hToStatsHandle, 0,AIM_SORT_TO_STATS_X, AIM_SORT_TO_STATS_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hToStatsHandle, 0,AIM_SORT_TO_STATS_X, AIM_SORT_TO_STATS_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// To Alumni
|
// To Alumni
|
||||||
GetVideoObject(&hToAlumniHandle, guiToAlumni);
|
GetVideoObject(&hToAlumniHandle, guiToAlumni);
|
||||||
BltVideoObject(FRAME_BUFFER, hToAlumniHandle, 0,AIM_SORT_TO_ALUMNI_X, AIM_SORT_TO_ALUMNI_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hToAlumniHandle, 0,AIM_SORT_TO_ALUMNI_X, AIM_SORT_TO_ALUMNI_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
|
||||||
// Draw the aim slogan under the symbol
|
// Draw the aim slogan under the symbol
|
||||||
@@ -404,11 +404,11 @@ void RenderAimSort()
|
|||||||
|
|
||||||
DisableAimButton();
|
DisableAimButton();
|
||||||
|
|
||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
|
|
||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
|
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -654,11 +654,11 @@ void DrawSelectLight(UINT8 ubMode, UINT8 ubImage)
|
|||||||
ubMode *= 2;
|
ubMode *= 2;
|
||||||
|
|
||||||
GetVideoObject(&hSelectLightHandle, guiSelectLight);
|
GetVideoObject(&hSelectLightHandle, guiSelectLight);
|
||||||
BltVideoObject(FRAME_BUFFER, hSelectLightHandle, ubImage, (AimSortCheckBoxLoc[ubMode] ), ( AimSortCheckBoxLoc[ubMode + 1] ), VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hSelectLightHandle, ubImage, (AimSortCheckBoxLoc[ubMode] ), ( AimSortCheckBoxLoc[ubMode + 1] ), VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
// InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
|
|
||||||
InvalidateRegion(AimSortCheckBoxLoc[ubMode],AimSortCheckBoxLoc[ubMode+1], (AimSortCheckBoxLoc[ubMode] + AIM_SORT_CHECKBOX_SIZE), (AimSortCheckBoxLoc[ubMode+1] + AIM_SORT_CHECKBOX_SIZE) );
|
InvalidateRegion(AimSortCheckBoxLoc[ubMode],AimSortCheckBoxLoc[ubMode+1], (AimSortCheckBoxLoc[ubMode] + AIM_SORT_CHECKBOX_SIZE), (AimSortCheckBoxLoc[ubMode+1] + AIM_SORT_CHECKBOX_SIZE) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -684,27 +684,27 @@ INT32 QsortCompare( const void *pNum1, const void *pNum2)
|
|||||||
{
|
{
|
||||||
//Price INT16 uiWeeklySalary
|
//Price INT16 uiWeeklySalary
|
||||||
case 0:
|
case 0:
|
||||||
return( CompareValue((INT32)gMercProfiles[ Num1 ].uiWeeklySalary, (INT32)gMercProfiles[Num2].uiWeeklySalary ) );
|
return( CompareValue((INT32)gMercProfiles[ Num1 ].uiWeeklySalary, (INT32)gMercProfiles[Num2].uiWeeklySalary ) );
|
||||||
break;
|
break;
|
||||||
//Experience INT16 bExpLevel
|
//Experience INT16 bExpLevel
|
||||||
case 1:
|
case 1:
|
||||||
return( CompareValue((INT32)gMercProfiles[ Num1 ].bExpLevel, (INT32)gMercProfiles[Num2].bExpLevel) );
|
return( CompareValue((INT32)gMercProfiles[ Num1 ].bExpLevel, (INT32)gMercProfiles[Num2].bExpLevel) );
|
||||||
break;
|
break;
|
||||||
//Marksmanship INT16 bMarksmanship
|
//Marksmanship INT16 bMarksmanship
|
||||||
case 2:
|
case 2:
|
||||||
return( CompareValue((INT32)gMercProfiles[ Num1 ].bMarksmanship, (INT32)gMercProfiles[Num2].bMarksmanship ) );
|
return( CompareValue((INT32)gMercProfiles[ Num1 ].bMarksmanship, (INT32)gMercProfiles[Num2].bMarksmanship ) );
|
||||||
break;
|
break;
|
||||||
//Medical INT16 bMedical
|
//Medical INT16 bMedical
|
||||||
case 3:
|
case 3:
|
||||||
return( CompareValue((INT32)gMercProfiles[ Num1 ].bMedical, (INT32)gMercProfiles[Num2].bMedical ) );
|
return( CompareValue((INT32)gMercProfiles[ Num1 ].bMedical, (INT32)gMercProfiles[Num2].bMedical ) );
|
||||||
break;
|
break;
|
||||||
//Explosives INT16 bExplosive
|
//Explosives INT16 bExplosive
|
||||||
case 4:
|
case 4:
|
||||||
return( CompareValue((INT32)gMercProfiles[ Num1 ].bExplosive, (INT32)gMercProfiles[Num2].bExplosive ) );
|
return( CompareValue((INT32)gMercProfiles[ Num1 ].bExplosive, (INT32)gMercProfiles[Num2].bExplosive ) );
|
||||||
break;
|
break;
|
||||||
//Mechanical INT16 bMechanical
|
//Mechanical INT16 bMechanical
|
||||||
case 5:
|
case 5:
|
||||||
return( CompareValue((INT32)gMercProfiles[ Num1 ].bMechanical, (INT32)gMercProfiles[Num2].bMechanical ) );
|
return( CompareValue((INT32)gMercProfiles[ Num1 ].bMechanical, (INT32)gMercProfiles[Num2].bMechanical ) );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -749,3 +749,4 @@ INT32 CompareValue(const INT32 Num1, const INT32 Num2)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+32
-31
@@ -154,12 +154,12 @@ UINT16 gusFirstMiscIndex;
|
|||||||
UINT16 gusLastMiscIndex;
|
UINT16 gusLastMiscIndex;
|
||||||
UINT8 gubNumMiscPages;
|
UINT8 gubNumMiscPages;
|
||||||
|
|
||||||
UINT16 gusFirstArmourIndex;
|
UINT16 gusFirstArmourIndex;
|
||||||
UINT16 gusLastArmourIndex;
|
UINT16 gusLastArmourIndex;
|
||||||
UINT8 gubNumArmourPages;
|
UINT8 gubNumArmourPages;
|
||||||
|
|
||||||
UINT16 gusFirstUsedIndex;
|
UINT16 gusFirstUsedIndex;
|
||||||
UINT16 gusLastUsedIndex;
|
UINT16 gusLastUsedIndex;
|
||||||
UINT8 gubNumUsedPages;
|
UINT8 gubNumUsedPages;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -176,7 +176,7 @@ UINT8 gubBobbyRPages[]={
|
|||||||
|
|
||||||
|
|
||||||
//Bobby's Sign menu mouse regions
|
//Bobby's Sign menu mouse regions
|
||||||
MOUSE_REGION gSelectedBobbiesSignMenuRegion[ BOBBIES_NUMBER_SIGNS ];
|
MOUSE_REGION gSelectedBobbiesSignMenuRegion[ BOBBIES_NUMBER_SIGNS ];
|
||||||
void SelectBobbiesSignMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectBobbiesSignMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
BOOLEAN InitBobbiesMouseRegion(UINT8 ubNumerRegions, UINT16 *usMouseRegionPosArray, MOUSE_REGION *MouseRegion);
|
BOOLEAN InitBobbiesMouseRegion(UINT8 ubNumerRegions, UINT16 *usMouseRegionPosArray, MOUSE_REGION *MouseRegion);
|
||||||
@@ -194,15 +194,15 @@ void GameInitBobbyR()
|
|||||||
|
|
||||||
BOOLEAN EnterBobbyR()
|
BOOLEAN EnterBobbyR()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
|
|
||||||
// an array of mouse regions for the bobbies signs. Top Left corner, bottom right corner
|
// an array of mouse regions for the bobbies signs. Top Left corner, bottom right corner
|
||||||
UINT16 usMouseRegionPosArray[] = {BOBBIES_USED_SIGN_X, BOBBIES_USED_SIGN_Y, BOBBIES_USED_SIGN_X+BOBBIES_USED_SIGN_WIDTH, BOBBIES_USED_SIGN_Y+BOBBIES_USED_SIGN_HEIGHT,
|
UINT16 usMouseRegionPosArray[] = {BOBBIES_USED_SIGN_X, BOBBIES_USED_SIGN_Y, BOBBIES_USED_SIGN_X+BOBBIES_USED_SIGN_WIDTH, BOBBIES_USED_SIGN_Y+BOBBIES_USED_SIGN_HEIGHT,
|
||||||
BOBBIES_MISC_SIGN_X, BOBBIES_MISC_SIGN_Y, BOBBIES_MISC_SIGN_X+BOBBIES_MISC_SIGN_WIDTH, BOBBIES_MISC_SIGN_Y+BOBBIES_MISC_SIGN_HEIGHT,
|
BOBBIES_MISC_SIGN_X, BOBBIES_MISC_SIGN_Y, BOBBIES_MISC_SIGN_X+BOBBIES_MISC_SIGN_WIDTH, BOBBIES_MISC_SIGN_Y+BOBBIES_MISC_SIGN_HEIGHT,
|
||||||
BOBBIES_GUNS_SIGN_X, BOBBIES_GUNS_SIGN_Y, BOBBIES_GUNS_SIGN_X+BOBBIES_GUNS_SIGN_WIDTH, BOBBIES_GUNS_SIGN_Y+BOBBIES_GUNS_SIGN_HEIGHT,
|
BOBBIES_GUNS_SIGN_X, BOBBIES_GUNS_SIGN_Y, BOBBIES_GUNS_SIGN_X+BOBBIES_GUNS_SIGN_WIDTH, BOBBIES_GUNS_SIGN_Y+BOBBIES_GUNS_SIGN_HEIGHT,
|
||||||
BOBBIES_AMMO_SIGN_X, BOBBIES_AMMO_SIGN_Y, BOBBIES_AMMO_SIGN_X+BOBBIES_AMMO_SIGN_WIDTH, BOBBIES_AMMO_SIGN_Y+BOBBIES_AMMO_SIGN_HEIGHT,
|
BOBBIES_AMMO_SIGN_X, BOBBIES_AMMO_SIGN_Y, BOBBIES_AMMO_SIGN_X+BOBBIES_AMMO_SIGN_WIDTH, BOBBIES_AMMO_SIGN_Y+BOBBIES_AMMO_SIGN_HEIGHT,
|
||||||
BOBBIES_ARMOUR_SIGN_X, BOBBIES_ARMOUR_SIGN_Y, BOBBIES_ARMOUR_SIGN_X+BOBBIES_ARMOUR_SIGN_WIDTH, BOBBIES_ARMOUR_SIGN_Y+BOBBIES_ARMOUR_SIGN_HEIGHT};
|
BOBBIES_ARMOUR_SIGN_X, BOBBIES_ARMOUR_SIGN_Y, BOBBIES_ARMOUR_SIGN_X+BOBBIES_ARMOUR_SIGN_WIDTH, BOBBIES_ARMOUR_SIGN_Y+BOBBIES_ARMOUR_SIGN_HEIGHT};
|
||||||
|
|
||||||
InitBobbyRWoodBackground();
|
InitBobbyRWoodBackground();
|
||||||
|
|
||||||
@@ -294,34 +294,34 @@ void HandleBobbyR()
|
|||||||
|
|
||||||
void RenderBobbyR()
|
void RenderBobbyR()
|
||||||
{
|
{
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
HVOBJECT hStorePlaqueHandle;
|
HVOBJECT hStorePlaqueHandle;
|
||||||
|
|
||||||
DrawBobbyRWoodBackground();
|
DrawBobbyRWoodBackground();
|
||||||
|
|
||||||
// Bobby's Name
|
// Bobby's Name
|
||||||
GetVideoObject(&hPixHandle, guiBobbyName);
|
GetVideoObject(&hPixHandle, guiBobbyName);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBY_RAYS_NAME_X, BOBBY_RAYS_NAME_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBY_RAYS_NAME_X, BOBBY_RAYS_NAME_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// Plaque
|
// Plaque
|
||||||
GetVideoObject(&hPixHandle, guiPlaque);
|
GetVideoObject(&hPixHandle, guiPlaque);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBYS_PLAQUES_X, BOBBYS_PLAQUES_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBYS_PLAQUES_X, BOBBYS_PLAQUES_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// Top Hinge
|
// Top Hinge
|
||||||
GetVideoObject(&hPixHandle, guiTopHinge);
|
GetVideoObject(&hPixHandle, guiTopHinge);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBIES_TOPHINGE_X, BOBBIES_TOPHINGE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBIES_TOPHINGE_X, BOBBIES_TOPHINGE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// Bottom Hinge
|
// Bottom Hinge
|
||||||
GetVideoObject(&hPixHandle, guiBottomHinge);
|
GetVideoObject(&hPixHandle, guiBottomHinge);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBIES_BOTTOMHINGE_X, BOBBIES_BOTTOMHINGE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBIES_BOTTOMHINGE_X, BOBBIES_BOTTOMHINGE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// StorePlaque
|
// StorePlaque
|
||||||
GetVideoObject(&hStorePlaqueHandle, guiStorePlaque);
|
GetVideoObject(&hStorePlaqueHandle, guiStorePlaque);
|
||||||
BltVideoObject(FRAME_BUFFER, hStorePlaqueHandle, 0,BOBBIES_STORE_PLAQUE_X, BOBBIES_STORE_PLAQUE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hStorePlaqueHandle, 0,BOBBIES_STORE_PLAQUE_X, BOBBIES_STORE_PLAQUE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// Handle
|
// Handle
|
||||||
GetVideoObject(&hPixHandle, guiHandle);
|
GetVideoObject(&hPixHandle, guiHandle);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBIES_HANDLE_X, BOBBIES_HANDLE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0,BOBBIES_HANDLE_X, BOBBIES_HANDLE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if( !LaptopSaveInfo.fBobbyRSiteCanBeAccessed )
|
if( !LaptopSaveInfo.fBobbyRSiteCanBeAccessed )
|
||||||
@@ -377,7 +377,7 @@ void RenderBobbyR()
|
|||||||
}
|
}
|
||||||
|
|
||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -385,7 +385,7 @@ void RenderBobbyR()
|
|||||||
|
|
||||||
BOOLEAN InitBobbyRWoodBackground()
|
BOOLEAN InitBobbyRWoodBackground()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
// load the Wood bacground graphic and add it
|
// load the Wood bacground graphic and add it
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
@@ -404,7 +404,7 @@ BOOLEAN DeleteBobbyRWoodBackground()
|
|||||||
|
|
||||||
BOOLEAN DrawBobbyRWoodBackground()
|
BOOLEAN DrawBobbyRWoodBackground()
|
||||||
{
|
{
|
||||||
HVOBJECT hWoodBackGroundHandle;
|
HVOBJECT hWoodBackGroundHandle;
|
||||||
UINT16 x,y, uiPosX, uiPosY;
|
UINT16 x,y, uiPosX, uiPosY;
|
||||||
|
|
||||||
// Blt the Wood background
|
// Blt the Wood background
|
||||||
@@ -416,7 +416,7 @@ BOOLEAN DrawBobbyRWoodBackground()
|
|||||||
uiPosX = BOBBY_WOOD_BACKGROUND_X;
|
uiPosX = BOBBY_WOOD_BACKGROUND_X;
|
||||||
for(x=0; x<4; x++)
|
for(x=0; x<4; x++)
|
||||||
{
|
{
|
||||||
BltVideoObject(FRAME_BUFFER, hWoodBackGroundHandle, 0,uiPosX, uiPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hWoodBackGroundHandle, 0,uiPosX, uiPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
uiPosX += BOBBY_WOOD_BACKGROUND_WIDTH;
|
uiPosX += BOBBY_WOOD_BACKGROUND_WIDTH;
|
||||||
}
|
}
|
||||||
uiPosY += BOBBY_WOOD_BACKGROUND_HEIGHT;
|
uiPosY += BOBBY_WOOD_BACKGROUND_HEIGHT;
|
||||||
@@ -434,7 +434,7 @@ BOOLEAN InitBobbiesMouseRegion(UINT8 ubNumerRegions, UINT16 *usMouseRegionPosArr
|
|||||||
{
|
{
|
||||||
//Mouse region for the toc buttons
|
//Mouse region for the toc buttons
|
||||||
MSYS_DefineRegion( &MouseRegion[i], usMouseRegionPosArray[ubCount], usMouseRegionPosArray[ubCount+1], usMouseRegionPosArray[ubCount+2], usMouseRegionPosArray[ubCount+3], MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &MouseRegion[i], usMouseRegionPosArray[ubCount], usMouseRegionPosArray[ubCount+1], usMouseRegionPosArray[ubCount+2], usMouseRegionPosArray[ubCount+3], MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectBobbiesSignMenuRegionCallBack);
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectBobbiesSignMenuRegionCallBack);
|
||||||
MSYS_AddRegion(&MouseRegion[i]);
|
MSYS_AddRegion(&MouseRegion[i]);
|
||||||
MSYS_SetRegionUserData( &MouseRegion[i], 0, gubBobbyRPages[i]);
|
MSYS_SetRegionUserData( &MouseRegion[i], 0, gubBobbyRPages[i]);
|
||||||
|
|
||||||
@@ -481,7 +481,7 @@ void SelectBobbiesSignMenuRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason )
|
|||||||
/*
|
/*
|
||||||
BOOLEAN WebPageTileBackground(UINT8 ubNumX, UINT8 ubNumY, UINT16 usWidth, UINT16 usHeight, UINT32 uiBackground)
|
BOOLEAN WebPageTileBackground(UINT8 ubNumX, UINT8 ubNumY, UINT16 usWidth, UINT16 usHeight, UINT32 uiBackground)
|
||||||
{
|
{
|
||||||
HVOBJECT hBackGroundHandle;
|
HVOBJECT hBackGroundHandle;
|
||||||
UINT16 x,y, uiPosX, uiPosY;
|
UINT16 x,y, uiPosX, uiPosY;
|
||||||
|
|
||||||
// Blt the Wood background
|
// Blt the Wood background
|
||||||
@@ -493,7 +493,7 @@ BOOLEAN WebPageTileBackground(UINT8 ubNumX, UINT8 ubNumY, UINT16 usWidth, UINT16
|
|||||||
uiPosX = LAPTOP_SCREEN_UL_X;
|
uiPosX = LAPTOP_SCREEN_UL_X;
|
||||||
for(x=0; x<ubNumX; x++)
|
for(x=0; x<ubNumX; x++)
|
||||||
{
|
{
|
||||||
BltVideoObject(FRAME_BUFFER, hBackGroundHandle, 0,uiPosX, uiPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hBackGroundHandle, 0,uiPosX, uiPosY, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
uiPosX += usWidth;
|
uiPosX += usWidth;
|
||||||
}
|
}
|
||||||
uiPosY += usHeight;
|
uiPosY += usHeight;
|
||||||
@@ -505,7 +505,7 @@ BOOLEAN WebPageTileBackground(UINT8 ubNumX, UINT8 ubNumY, UINT16 usWidth, UINT16
|
|||||||
|
|
||||||
void HandleBobbyRUnderConstructionAni( BOOLEAN fReset )
|
void HandleBobbyRUnderConstructionAni( BOOLEAN fReset )
|
||||||
{
|
{
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
static UINT32 uiLastTime=1;
|
static UINT32 uiLastTime=1;
|
||||||
static UINT16 usCount=0;
|
static UINT16 usCount=0;
|
||||||
UINT32 uiCurTime=GetJA2Clock();
|
UINT32 uiCurTime=GetJA2Clock();
|
||||||
@@ -532,8 +532,8 @@ void HandleBobbyRUnderConstructionAni( BOOLEAN fReset )
|
|||||||
|
|
||||||
DrawTextToScreen( BobbyRaysFrontText[ BOBBYR_UNDER_CONSTRUCTION ], BOBBYR_UNDER_CONSTRUCTION_TEXT_X, BOBBYR_UNDER_CONSTRUCTION_TEXT_Y, BOBBYR_UNDER_CONSTRUCTION_TEXT_WIDTH, FONT16ARIAL, BOBBIES_SENTENCE_COLOR, BOBBIES_SIGN_BACKCOLOR, FALSE, CENTER_JUSTIFIED | INVALIDATE_TEXT );
|
DrawTextToScreen( BobbyRaysFrontText[ BOBBYR_UNDER_CONSTRUCTION ], BOBBYR_UNDER_CONSTRUCTION_TEXT_X, BOBBYR_UNDER_CONSTRUCTION_TEXT_Y, BOBBYR_UNDER_CONSTRUCTION_TEXT_WIDTH, FONT16ARIAL, BOBBIES_SENTENCE_COLOR, BOBBIES_SIGN_BACKCOLOR, FALSE, CENTER_JUSTIFIED | INVALIDATE_TEXT );
|
||||||
|
|
||||||
InvalidateRegion( BOBBYR_UNDERCONSTRUCTION_X, BOBBYR_UNDERCONSTRUCTION_Y, BOBBYR_UNDERCONSTRUCTION_X+BOBBYR_UNDERCONSTRUCTION_WIDTH, BOBBYR_UNDERCONSTRUCTION_Y+BOBBYR_UNDERCONSTRUCTION_HEIGHT );
|
InvalidateRegion( BOBBYR_UNDERCONSTRUCTION_X, BOBBYR_UNDERCONSTRUCTION_Y, BOBBYR_UNDERCONSTRUCTION_X+BOBBYR_UNDERCONSTRUCTION_WIDTH, BOBBYR_UNDERCONSTRUCTION_Y+BOBBYR_UNDERCONSTRUCTION_HEIGHT );
|
||||||
InvalidateRegion( BOBBYR_UNDERCONSTRUCTION_X, BOBBYR_UNDERCONSTRUCTION1_Y, BOBBYR_UNDERCONSTRUCTION_X+BOBBYR_UNDERCONSTRUCTION_WIDTH, BOBBYR_UNDERCONSTRUCTION1_Y+BOBBYR_UNDERCONSTRUCTION_HEIGHT );
|
InvalidateRegion( BOBBYR_UNDERCONSTRUCTION_X, BOBBYR_UNDERCONSTRUCTION1_Y, BOBBYR_UNDERCONSTRUCTION_X+BOBBYR_UNDERCONSTRUCTION_WIDTH, BOBBYR_UNDERCONSTRUCTION1_Y+BOBBYR_UNDERCONSTRUCTION_HEIGHT );
|
||||||
|
|
||||||
uiLastTime = GetJA2Clock();
|
uiLastTime = GetJA2Clock();
|
||||||
|
|
||||||
@@ -794,7 +794,7 @@ void OrderBobbyRItem(UINT16 usItemIndex)
|
|||||||
{
|
{
|
||||||
UINT32 uiArrivalTime;
|
UINT32 uiArrivalTime;
|
||||||
|
|
||||||
//add the new item to the queue. The new item will arrive in 'uiArrivalTime' minutes.
|
//add the new item to the queue. The new item will arrive in 'uiArrivalTime' minutes.
|
||||||
uiArrivalTime = BOBBY_R_NEW_PURCHASE_ARRIVAL_TIME + Random( BOBBY_R_NEW_PURCHASE_ARRIVAL_TIME / 2 );
|
uiArrivalTime = BOBBY_R_NEW_PURCHASE_ARRIVAL_TIME + Random( BOBBY_R_NEW_PURCHASE_ARRIVAL_TIME / 2 );
|
||||||
uiArrivalTime += GetWorldTotalMin();
|
uiArrivalTime += GetWorldTotalMin();
|
||||||
AddStrategicEvent( EVENT_UPDATE_BOBBY_RAY_INVENTORY, uiArrivalTime, usItemIndex);
|
AddStrategicEvent( EVENT_UPDATE_BOBBY_RAY_INVENTORY, uiArrivalTime, usItemIndex);
|
||||||
@@ -830,7 +830,7 @@ void AddFreshBobbyRayInventory( UINT16 usItemIndex )
|
|||||||
if (sInventorySlot == -1)
|
if (sInventorySlot == -1)
|
||||||
{
|
{
|
||||||
DebugMsg(TOPIC_JA2, DBG_LEVEL_3,String("AddFreshBobbyRayInventory: item not found! = %d", usItemIndex ));
|
DebugMsg(TOPIC_JA2, DBG_LEVEL_3,String("AddFreshBobbyRayInventory: item not found! = %d", usItemIndex ));
|
||||||
AssertMsg( FALSE, String( "AddFreshBobbyRayInventory(), Item %d not found. AM-0.", usItemIndex ) );
|
AssertMsg( FALSE, String( "AddFreshBobbyRayInventory(), Item %d not found. AM-0.", usItemIndex ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -918,3 +918,4 @@ void CancelAllPendingBRPurchaseOrders(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+10
-5
@@ -1,9 +1,14 @@
|
|||||||
#ifndef __BOBBYR_H
|
#ifndef __BOBBYR_H
|
||||||
#define __BOBBYR_H
|
#define __BOBBYR_H
|
||||||
|
|
||||||
#include "Item Types.h"
|
//#include "Item Types.h"
|
||||||
#include "Store Inventory.h"
|
#include "Store Inventory.h"
|
||||||
|
|
||||||
|
//forward declarations of common classes to eliminate includes
|
||||||
|
class OBJECTTYPE;
|
||||||
|
class SOLDIERTYPE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void GameInitBobbyR();
|
void GameInitBobbyR();
|
||||||
BOOLEAN EnterBobbyR();
|
BOOLEAN EnterBobbyR();
|
||||||
@@ -34,12 +39,12 @@ extern UINT16 gusFirstMiscIndex;
|
|||||||
extern UINT16 gusLastMiscIndex;
|
extern UINT16 gusLastMiscIndex;
|
||||||
extern UINT8 gubNumMiscPages;
|
extern UINT8 gubNumMiscPages;
|
||||||
|
|
||||||
extern UINT16 gusFirstArmourIndex;
|
extern UINT16 gusFirstArmourIndex;
|
||||||
extern UINT16 gusLastArmourIndex;
|
extern UINT16 gusLastArmourIndex;
|
||||||
extern UINT8 gubNumArmourPages;
|
extern UINT8 gubNumArmourPages;
|
||||||
|
|
||||||
extern UINT16 gusFirstUsedIndex;
|
extern UINT16 gusFirstUsedIndex;
|
||||||
extern UINT16 gusLastUsedIndex;
|
extern UINT16 gusLastUsedIndex;
|
||||||
extern UINT8 gubNumUsedPages;
|
extern UINT8 gubNumUsedPages;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ void GameInitBobbyRAmmo()
|
|||||||
|
|
||||||
BOOLEAN EnterBobbyRAmmo()
|
BOOLEAN EnterBobbyRAmmo()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
//gfBigImageMouseRegionCreated = FALSE;
|
//gfBigImageMouseRegionCreated = FALSE;
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ void RenderBobbyRAmmo()
|
|||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
fReDrawScreenFlag = TRUE;
|
fReDrawScreenFlag = TRUE;
|
||||||
fPausedReDrawScreenFlag = TRUE;
|
fPausedReDrawScreenFlag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,3 +107,4 @@ void RenderBobbyRAmmo()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ void GameInitBobbyRArmour()
|
|||||||
|
|
||||||
BOOLEAN EnterBobbyRArmour()
|
BOOLEAN EnterBobbyRArmour()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
// load the background graphic and add it
|
// load the background graphic and add it
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
@@ -76,7 +76,7 @@ void HandleBobbyRArmour()
|
|||||||
void RenderBobbyRArmour()
|
void RenderBobbyRArmour()
|
||||||
{
|
{
|
||||||
|
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
|
|
||||||
WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiArmourBackground);
|
WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiArmourBackground);
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ void RenderBobbyRArmour()
|
|||||||
|
|
||||||
// GunForm
|
// GunForm
|
||||||
GetVideoObject(&hPixHandle, guiArmourGrid);
|
GetVideoObject(&hPixHandle, guiArmourGrid);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
DisplayItemInfo(IC_ARMOUR, guiCurrentArmourFilterMode);
|
DisplayItemInfo(IC_ARMOUR, guiCurrentArmourFilterMode);
|
||||||
|
|
||||||
@@ -94,10 +94,10 @@ void RenderBobbyRArmour()
|
|||||||
|
|
||||||
UpdateArmourFilterButtons(guiCurrentArmourFilterMode, guiPrevArmourFilterMode);
|
UpdateArmourFilterButtons(guiCurrentArmourFilterMode, guiPrevArmourFilterMode);
|
||||||
|
|
||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
fReDrawScreenFlag = TRUE;
|
fReDrawScreenFlag = TRUE;
|
||||||
fPausedReDrawScreenFlag = TRUE;
|
fPausedReDrawScreenFlag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,3 +110,4 @@ void RenderBobbyRArmour()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+190
-102
@@ -38,10 +38,10 @@
|
|||||||
#define BOBBYR_ORDER_TEXT_COLOR 75
|
#define BOBBYR_ORDER_TEXT_COLOR 75
|
||||||
|
|
||||||
#define BOBBYR_STATIC_TEXT_COLOR 75
|
#define BOBBYR_STATIC_TEXT_COLOR 75
|
||||||
#define BOBBYR_ITEM_DESC_TEXT_FONT FONT10ARIAL
|
#define BOBBYR_ITEM_DESC_TEXT_FONT FONT10ARIAL
|
||||||
#define BOBBYR_ITEM_DESC_TEXT_COLOR FONT_MCOLOR_WHITE
|
#define BOBBYR_ITEM_DESC_TEXT_COLOR FONT_MCOLOR_WHITE
|
||||||
#define BOBBYR_ITEM_NAME_TEXT_FONT FONT10ARIAL
|
#define BOBBYR_ITEM_NAME_TEXT_FONT FONT10ARIAL
|
||||||
#define BOBBYR_ITEM_NAME_TEXT_COLOR FONT_MCOLOR_WHITE
|
#define BOBBYR_ITEM_NAME_TEXT_COLOR FONT_MCOLOR_WHITE
|
||||||
|
|
||||||
#define NUM_BOBBYRPAGE_MENU 6
|
#define NUM_BOBBYRPAGE_MENU 6
|
||||||
#define NUM_CATALOGUE_BUTTONS 5
|
#define NUM_CATALOGUE_BUTTONS 5
|
||||||
@@ -70,8 +70,8 @@
|
|||||||
#define BOBBYR_CATALOGUE_BUTTON_Y LAPTOP_SCREEN_WEB_UL_Y + 300
|
#define BOBBYR_CATALOGUE_BUTTON_Y LAPTOP_SCREEN_WEB_UL_Y + 300
|
||||||
#define BOBBYR_CATALOGUE_BUTTON_WIDTH 56//75
|
#define BOBBYR_CATALOGUE_BUTTON_WIDTH 56//75
|
||||||
|
|
||||||
#define BOBBYR_HOME_BUTTON_X iScreenWidthOffset + 120
|
#define BOBBYR_HOME_BUTTON_X iScreenWidthOffset + 120
|
||||||
#define BOBBYR_HOME_BUTTON_Y iScreenHeightOffset + 400 + LAPTOP_SCREEN_WEB_DELTA_Y
|
#define BOBBYR_HOME_BUTTON_Y iScreenHeightOffset + 400 + LAPTOP_SCREEN_WEB_DELTA_Y
|
||||||
|
|
||||||
#define BOBBYR_CATALOGUE_BUTTON_TEXT_Y BOBBYR_CATALOGUE_BUTTON_Y + 5
|
#define BOBBYR_CATALOGUE_BUTTON_TEXT_Y BOBBYR_CATALOGUE_BUTTON_Y + 5
|
||||||
|
|
||||||
@@ -147,8 +147,8 @@ BobbyRayPurchaseStruct BobbyRayPurchases[ MAX_PURCHASE_AMOUNT ];
|
|||||||
#define NUMBER_GUNS_FILTER_BUTTONS 9
|
#define NUMBER_GUNS_FILTER_BUTTONS 9
|
||||||
#define NUMBER_AMMO_FILTER_BUTTONS 8
|
#define NUMBER_AMMO_FILTER_BUTTONS 8
|
||||||
#define NUMBER_ARMOUR_FILTER_BUTTONS 4
|
#define NUMBER_ARMOUR_FILTER_BUTTONS 4
|
||||||
#define NUMBER_MISC_FILTER_BUTTONS 9
|
#define NUMBER_MISC_FILTER_BUTTONS 10
|
||||||
#define NUMBER_USED_FILTER_BUTTONS 3
|
#define NUMBER_USED_FILTER_BUTTONS 4
|
||||||
|
|
||||||
#define BOBBYR_GUNS_FILTER_BUTTON_GAP BOBBYR_CATALOGUE_BUTTON_GAP - 1
|
#define BOBBYR_GUNS_FILTER_BUTTON_GAP BOBBYR_CATALOGUE_BUTTON_GAP - 1
|
||||||
#define BOBBYR_AMMO_FILTER_BUTTON_GAP BOBBYR_CATALOGUE_BUTTON_GAP - 1
|
#define BOBBYR_AMMO_FILTER_BUTTON_GAP BOBBYR_CATALOGUE_BUTTON_GAP - 1
|
||||||
@@ -196,6 +196,7 @@ INT8 ubFilterAmmoButtonValues[] = {
|
|||||||
INT8 ubFilterUsedButtonValues[] = {
|
INT8 ubFilterUsedButtonValues[] = {
|
||||||
BOBBYR_FILTER_USED_GUNS,
|
BOBBYR_FILTER_USED_GUNS,
|
||||||
BOBBYR_FILTER_USED_ARMOR,
|
BOBBYR_FILTER_USED_ARMOR,
|
||||||
|
BOBBYR_FILTER_USED_LBEGEAR,
|
||||||
BOBBYR_FILTER_USED_MISC};
|
BOBBYR_FILTER_USED_MISC};
|
||||||
|
|
||||||
INT8 ubFilterArmourButtonValues[] = {
|
INT8 ubFilterArmourButtonValues[] = {
|
||||||
@@ -213,6 +214,7 @@ INT8 ubFilterMiscButtonValues[] = {
|
|||||||
BOBBYR_FILTER_MISC_MEDKIT,
|
BOBBYR_FILTER_MISC_MEDKIT,
|
||||||
BOBBYR_FILTER_MISC_KIT,
|
BOBBYR_FILTER_MISC_KIT,
|
||||||
BOBBYR_FILTER_MISC_FACE,
|
BOBBYR_FILTER_MISC_FACE,
|
||||||
|
BOBBYR_FILTER_MISC_LBEGEAR,
|
||||||
BOBBYR_FILTER_MISC_MISC};
|
BOBBYR_FILTER_MISC_MISC};
|
||||||
|
|
||||||
|
|
||||||
@@ -259,7 +261,7 @@ INT32 guiBobbyRNextPageImage;
|
|||||||
|
|
||||||
|
|
||||||
// Big Image Mouse region
|
// Big Image Mouse region
|
||||||
MOUSE_REGION gSelectedBigImageRegion[ BOBBYR_NUM_WEAPONS_ON_PAGE ];
|
MOUSE_REGION gSelectedBigImageRegion[ BOBBYR_NUM_WEAPONS_ON_PAGE ];
|
||||||
void SelectBigImageRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectBigImageRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
// The order form button
|
// The order form button
|
||||||
@@ -274,7 +276,7 @@ extern INT32 guiBobbyRHomeImage; // symbol already defined in BobbyRMailOrder.cp
|
|||||||
|
|
||||||
|
|
||||||
// Link from the title
|
// Link from the title
|
||||||
MOUSE_REGION gSelectedTitleImageLinkRegion;
|
MOUSE_REGION gSelectedTitleImageLinkRegion;
|
||||||
void SelectTitleImageLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectTitleImageLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
|
|
||||||
@@ -295,6 +297,8 @@ UINT16 DisplayDamage(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
|||||||
UINT16 DisplayRange(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
UINT16 DisplayRange(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
||||||
UINT16 DisplayMagazine(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
UINT16 DisplayMagazine(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
||||||
void DisplayItemNameAndInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usBobbyIndex, BOOLEAN fUsed);
|
void DisplayItemNameAndInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usBobbyIndex, BOOLEAN fUsed);
|
||||||
|
// CHRISL: New display function for LBE Gear
|
||||||
|
UINT16 DisplayLBEInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
||||||
UINT16 DisplayWeight(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
UINT16 DisplayWeight(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
||||||
UINT16 DisplayCaliber(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
UINT16 DisplayCaliber(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight);
|
||||||
void CreateMouseRegionForBigImage(UINT16 usPosY, UINT8 ubCount, INT16 *pItemNumbers );
|
void CreateMouseRegionForBigImage(UINT16 usPosY, UINT8 ubCount, INT16 *pItemNumbers );
|
||||||
@@ -343,7 +347,7 @@ void EnterInitBobbyRGuns()
|
|||||||
|
|
||||||
BOOLEAN EnterBobbyRGuns()
|
BOOLEAN EnterBobbyRGuns()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
gfBigImageMouseRegionCreated = FALSE;
|
gfBigImageMouseRegionCreated = FALSE;
|
||||||
|
|
||||||
@@ -396,7 +400,7 @@ void HandleBobbyRGuns()
|
|||||||
|
|
||||||
void RenderBobbyRGuns()
|
void RenderBobbyRGuns()
|
||||||
{
|
{
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
|
|
||||||
WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiGunBackground);
|
WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiGunBackground);
|
||||||
|
|
||||||
@@ -416,7 +420,7 @@ void RenderBobbyRGuns()
|
|||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
//InvalidateRegion(0,0,SCREEN_WIDTH, SCREEN_HEIGHT);
|
//InvalidateRegion(0,0,SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
fReDrawScreenFlag = TRUE;
|
fReDrawScreenFlag = TRUE;
|
||||||
fPausedReDrawScreenFlag = TRUE;
|
fPausedReDrawScreenFlag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,11 +428,11 @@ void RenderBobbyRGuns()
|
|||||||
|
|
||||||
BOOLEAN DisplayBobbyRBrTitle()
|
BOOLEAN DisplayBobbyRBrTitle()
|
||||||
{
|
{
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
|
|
||||||
// BR title
|
// BR title
|
||||||
GetVideoObject(&hPixHandle, guiBrTitle);
|
GetVideoObject(&hPixHandle, guiBrTitle);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_BRTITLE_X, BOBBYR_BRTITLE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_BRTITLE_X, BOBBYR_BRTITLE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// To Order Text
|
// To Order Text
|
||||||
DrawTextToScreen(BobbyRText[BOBBYR_GUNS_TO_ORDER], BOBBYR_TO_ORDER_TITLE_X, BOBBYR_TO_ORDER_TITLE_Y, 0, BOBBYR_ORDER_TITLE_FONT, BOBBYR_ORDER_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
DrawTextToScreen(BobbyRText[BOBBYR_GUNS_TO_ORDER], BOBBYR_TO_ORDER_TITLE_X, BOBBYR_TO_ORDER_TITLE_Y, 0, BOBBYR_ORDER_TITLE_FONT, BOBBYR_ORDER_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
@@ -445,7 +449,7 @@ BOOLEAN DisplayBobbyRBrTitle()
|
|||||||
|
|
||||||
BOOLEAN InitBobbyBrTitle()
|
BOOLEAN InitBobbyBrTitle()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
// load the br title graphic and add it
|
// load the br title graphic and add it
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
@@ -454,7 +458,7 @@ BOOLEAN InitBobbyBrTitle()
|
|||||||
|
|
||||||
//initialize the link to the homepage by clicking on the title
|
//initialize the link to the homepage by clicking on the title
|
||||||
MSYS_DefineRegion( &gSelectedTitleImageLinkRegion, BOBBYR_BRTITLE_X, BOBBYR_BRTITLE_Y, (BOBBYR_BRTITLE_X + BOBBYR_BRTITLE_WIDTH), (UINT16)(BOBBYR_BRTITLE_Y + BOBBYR_BRTITLE_HEIGHT), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedTitleImageLinkRegion, BOBBYR_BRTITLE_X, BOBBYR_BRTITLE_Y, (BOBBYR_BRTITLE_X + BOBBYR_BRTITLE_WIDTH), (UINT16)(BOBBYR_BRTITLE_Y + BOBBYR_BRTITLE_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectTitleImageLinkRegionCallBack);
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectTitleImageLinkRegionCallBack);
|
||||||
MSYS_AddRegion( &gSelectedTitleImageLinkRegion );
|
MSYS_AddRegion( &gSelectedTitleImageLinkRegion );
|
||||||
|
|
||||||
|
|
||||||
@@ -496,7 +500,7 @@ BOOLEAN InitBobbyRGunsFilterBar()
|
|||||||
bCurMode = 0;
|
bCurMode = 0;
|
||||||
usPosX = FILTER_BUTTONS_GUN_START_X;
|
usPosX = FILTER_BUTTONS_GUN_START_X;
|
||||||
|
|
||||||
guiBobbyRFilterImage = LoadButtonImage("LAPTOP\\CatalogueButton1.sti", -1,0,-1,1,-1 );
|
guiBobbyRFilterImage = LoadButtonImage("LAPTOP\\CatalogueButton1.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
// Loop through the filter buttons
|
// Loop through the filter buttons
|
||||||
for(i=0; i<NUMBER_GUNS_FILTER_BUTTONS; i++)
|
for(i=0; i<NUMBER_GUNS_FILTER_BUTTONS; i++)
|
||||||
@@ -539,7 +543,7 @@ BOOLEAN InitBobbyRAmmoFilterBar()
|
|||||||
bCurMode = 0;
|
bCurMode = 0;
|
||||||
usPosX = FILTER_BUTTONS_AMMO_START_X;
|
usPosX = FILTER_BUTTONS_AMMO_START_X;
|
||||||
|
|
||||||
guiBobbyRFilterImage = LoadButtonImage("LAPTOP\\CatalogueButton1.sti", -1,0,-1,1,-1 );
|
guiBobbyRFilterImage = LoadButtonImage("LAPTOP\\CatalogueButton1.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
// Loop through the filter buttons
|
// Loop through the filter buttons
|
||||||
for(i=0; i<NUMBER_AMMO_FILTER_BUTTONS; i++)
|
for(i=0; i<NUMBER_AMMO_FILTER_BUTTONS; i++)
|
||||||
@@ -581,7 +585,7 @@ BOOLEAN InitBobbyRArmourFilterBar()
|
|||||||
bCurMode = 0;
|
bCurMode = 0;
|
||||||
usPosX = FILTER_BUTTONS_GUN_START_X;
|
usPosX = FILTER_BUTTONS_GUN_START_X;
|
||||||
|
|
||||||
guiBobbyRFilterImage = LoadButtonImage("LAPTOP\\CatalogueButton1.sti", -1,0,-1,1,-1 );
|
guiBobbyRFilterImage = LoadButtonImage("LAPTOP\\CatalogueButton1.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
// Loop through the filter buttons
|
// Loop through the filter buttons
|
||||||
for(i=0; i<NUMBER_ARMOUR_FILTER_BUTTONS; i++)
|
for(i=0; i<NUMBER_ARMOUR_FILTER_BUTTONS; i++)
|
||||||
@@ -618,17 +622,20 @@ BOOLEAN InitBobbyRUsedFilterBar()
|
|||||||
{
|
{
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
UINT16 usPosX;
|
UINT16 usPosX;
|
||||||
UINT8 bCurMode;
|
|
||||||
|
|
||||||
|
|
||||||
bCurMode = 0;
|
|
||||||
usPosX = FILTER_BUTTONS_USED_START_X;
|
usPosX = FILTER_BUTTONS_USED_START_X;
|
||||||
|
|
||||||
guiBobbyRFilterImage = LoadButtonImage("LAPTOP\\CatalogueButton1.sti", -1,0,-1,1,-1 );
|
guiBobbyRFilterImage = LoadButtonImage("LAPTOP\\CatalogueButton1.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
// Loop through the filter buttons
|
// Loop through the filter buttons
|
||||||
for(i=0; i<NUMBER_USED_FILTER_BUTTONS; i++)
|
for(i=0; i<NUMBER_USED_FILTER_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
|
//CHRISL: Don't display the LBEGEAR button if we're using the old inventory system
|
||||||
|
if((UsingNewInventorySystem() == false) && ubFilterUsedButtonValues[i] == BOBBYR_FILTER_USED_LBEGEAR)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Filter buttons
|
// Filter buttons
|
||||||
guiBobbyRFilterUsed[i] = CreateIconAndTextButton( guiBobbyRFilterImage, BobbyRFilter[BOBBYR_FILTER_USED_GUNS+i], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyRFilterUsed[i] = CreateIconAndTextButton( guiBobbyRFilterImage, BobbyRFilter[BOBBYR_FILTER_USED_GUNS+i], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
@@ -639,10 +646,9 @@ BOOLEAN InitBobbyRUsedFilterBar()
|
|||||||
|
|
||||||
SetButtonCursor(guiBobbyRFilterUsed[i], CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiBobbyRFilterUsed[i], CURSOR_LAPTOP_SCREEN);
|
||||||
|
|
||||||
MSYS_SetBtnUserData( guiBobbyRFilterUsed[i], 0, ubFilterUsedButtonValues[bCurMode]);
|
MSYS_SetBtnUserData( guiBobbyRFilterUsed[i], 0, ubFilterUsedButtonValues[i]);
|
||||||
|
|
||||||
usPosX += BOBBYR_USED_FILTER_BUTTON_GAP;
|
usPosX += BOBBYR_USED_FILTER_BUTTON_GAP;
|
||||||
bCurMode++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -652,38 +658,39 @@ BOOLEAN InitBobbyRUsedFilterBar()
|
|||||||
BOOLEAN InitBobbyRMiscFilterBar()
|
BOOLEAN InitBobbyRMiscFilterBar()
|
||||||
{
|
{
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
UINT16 usPosX;
|
UINT16 usPosX = 0, usPosY = 0;
|
||||||
UINT8 bCurMode;
|
UINT8 bCurMode;
|
||||||
UINT16 usYOffset = 0;
|
UINT16 usYOffset = 25, sItemWidth = 8;
|
||||||
|
UINT16 usXOffset = BOBBYR_MISC_FILTER_BUTTON_GAP;
|
||||||
|
|
||||||
bCurMode = 0;
|
bCurMode = 0;
|
||||||
usPosX = FILTER_BUTTONS_MISC_START_X;
|
usPosX = FILTER_BUTTONS_MISC_START_X;
|
||||||
|
|
||||||
guiBobbyRFilterImage = LoadButtonImage("LAPTOP\\CatalogueButton1.sti", -1,0,-1,1,-1 );
|
guiBobbyRFilterImage = LoadButtonImage("LAPTOP\\CatalogueButton1.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
// Loop through the filter buttons
|
// Loop through the filter buttons
|
||||||
for(i=0; i<NUMBER_MISC_FILTER_BUTTONS; i++)
|
for(i=0; i<NUMBER_MISC_FILTER_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
// Next row
|
//CHRISL: Don't display the LBEGEAR button if we're using the old inventory system
|
||||||
if (i > 7)
|
if((UsingNewInventorySystem() == false) && ubFilterMiscButtonValues[i] == BOBBYR_FILTER_MISC_LBEGEAR)
|
||||||
{
|
{
|
||||||
usPosX = FILTER_BUTTONS_MISC_START_X;
|
continue;
|
||||||
usYOffset = 25;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
usPosX = FILTER_BUTTONS_MISC_START_X + ( (bCurMode % sItemWidth) * usXOffset);
|
||||||
|
usPosY = FILTER_BUTTONS_Y + ( (bCurMode / sItemWidth) * usYOffset);
|
||||||
|
|
||||||
// Filter buttons
|
// Filter buttons
|
||||||
guiBobbyRFilterMisc[i] = CreateIconAndTextButton( guiBobbyRFilterImage, BobbyRFilter[BOBBYR_FILTER_MISC_BLADE+i], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyRFilterMisc[i] = CreateIconAndTextButton( guiBobbyRFilterImage, BobbyRFilter[BOBBYR_FILTER_MISC_BLADE+i], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, FILTER_BUTTONS_Y + usYOffset, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, usPosY, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRFilterMiscCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBobbyRFilterMiscCallback);
|
||||||
|
|
||||||
SetButtonCursor(guiBobbyRFilterMisc[i], CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiBobbyRFilterMisc[i], CURSOR_LAPTOP_SCREEN);
|
||||||
|
|
||||||
MSYS_SetBtnUserData( guiBobbyRFilterMisc[i], 0, ubFilterMiscButtonValues[bCurMode]);
|
MSYS_SetBtnUserData( guiBobbyRFilterMisc[i], 0, ubFilterMiscButtonValues[i]);
|
||||||
|
|
||||||
usPosX += BOBBYR_MISC_FILTER_BUTTON_GAP;
|
|
||||||
bCurMode++;
|
bCurMode++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -691,8 +698,7 @@ BOOLEAN InitBobbyRMiscFilterBar()
|
|||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOLEAN InitBobbyMenuBar( )
|
||||||
BOOLEAN InitBobbyMenuBar( )
|
|
||||||
{
|
{
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
UINT16 usPosX;
|
UINT16 usPosX;
|
||||||
@@ -701,26 +707,26 @@ BOOLEAN InitBobbyMenuBar( )
|
|||||||
// Previous button
|
// Previous button
|
||||||
guiBobbyRPreviousPageImage = LoadButtonImage("LAPTOP\\PreviousButton.sti", -1,0,-1,1,-1 );
|
guiBobbyRPreviousPageImage = LoadButtonImage("LAPTOP\\PreviousButton.sti", -1,0,-1,1,-1 );
|
||||||
guiBobbyRPreviousPage = CreateIconAndTextButton( guiBobbyRPreviousPageImage, BobbyRText[BOBBYR_GUNS_PREVIOUS_ITEMS], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyRPreviousPage = CreateIconAndTextButton( guiBobbyRPreviousPageImage, BobbyRText[BOBBYR_GUNS_PREVIOUS_ITEMS], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
BOBBYR_PREVIOUS_BUTTON_X, BOBBYR_PREVIOUS_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
BOBBYR_PREVIOUS_BUTTON_X, BOBBYR_PREVIOUS_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRNextPreviousPageCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBobbyRNextPreviousPageCallback);
|
||||||
SetButtonCursor(guiBobbyRPreviousPage, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiBobbyRPreviousPage, CURSOR_LAPTOP_SCREEN);
|
||||||
MSYS_SetBtnUserData( guiBobbyRPreviousPage, 0, BOBBYR_PREVIOUS_PAGE);
|
MSYS_SetBtnUserData( guiBobbyRPreviousPage, 0, BOBBYR_PREVIOUS_PAGE);
|
||||||
SpecifyDisabledButtonStyle( guiBobbyRPreviousPage, DISABLED_STYLE_SHADED );
|
SpecifyDisabledButtonStyle( guiBobbyRPreviousPage, DISABLED_STYLE_SHADED );
|
||||||
|
|
||||||
|
|
||||||
guiBobbyRPageMenuImage = LoadButtonImage("LAPTOP\\CatalogueButton1.sti", -1,0,-1,1,-1 );
|
guiBobbyRPageMenuImage = LoadButtonImage("LAPTOP\\CatalogueButton1.sti", -1,0,-1,1,-1 );
|
||||||
|
|
||||||
// Next button
|
// Next button
|
||||||
guiBobbyRNextPageImage = LoadButtonImage("LAPTOP\\NextButton.sti", -1,0,-1,1,-1 );
|
guiBobbyRNextPageImage = LoadButtonImage("LAPTOP\\NextButton.sti", -1,0,-1,1,-1 );
|
||||||
guiBobbyRNextPage = CreateIconAndTextButton( guiBobbyRNextPageImage, BobbyRText[BOBBYR_GUNS_MORE_ITEMS], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyRNextPage = CreateIconAndTextButton( guiBobbyRNextPageImage, BobbyRText[BOBBYR_GUNS_MORE_ITEMS], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
BOBBYR_NEXT_BUTTON_X, BOBBYR_NEXT_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
BOBBYR_NEXT_BUTTON_X, BOBBYR_NEXT_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRNextPreviousPageCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBobbyRNextPreviousPageCallback);
|
||||||
SetButtonCursor(guiBobbyRNextPage, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiBobbyRNextPage, CURSOR_LAPTOP_SCREEN);
|
||||||
MSYS_SetBtnUserData( guiBobbyRNextPage, 0, BOBBYR_NEXT_PAGE);
|
MSYS_SetBtnUserData( guiBobbyRNextPage, 0, BOBBYR_NEXT_PAGE);
|
||||||
SpecifyDisabledButtonStyle( guiBobbyRNextPage, DISABLED_STYLE_SHADED );
|
SpecifyDisabledButtonStyle( guiBobbyRNextPage, DISABLED_STYLE_SHADED );
|
||||||
@@ -732,11 +738,11 @@ BOOLEAN InitBobbyMenuBar( )
|
|||||||
{
|
{
|
||||||
// Catalogue Buttons button
|
// Catalogue Buttons button
|
||||||
guiBobbyRPageMenu[i] = CreateIconAndTextButton( guiBobbyRPageMenuImage, BobbyRText[BOBBYR_GUNS_GUNS+i], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyRPageMenu[i] = CreateIconAndTextButton( guiBobbyRPageMenuImage, BobbyRText[BOBBYR_GUNS_GUNS+i], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
usPosX, BOBBYR_CATALOGUE_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
usPosX, BOBBYR_CATALOGUE_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRPageMenuCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBobbyRPageMenuCallback);
|
||||||
|
|
||||||
SetButtonCursor(guiBobbyRPageMenu[i], CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiBobbyRPageMenu[i], CURSOR_LAPTOP_SCREEN);
|
||||||
|
|
||||||
@@ -747,26 +753,26 @@ BOOLEAN InitBobbyMenuBar( )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Order Form button
|
// Order Form button
|
||||||
guiBobbyROrderFormImage = LoadButtonImage("LAPTOP\\OrderFormButton.sti", -1,0,-1,1,-1 );
|
guiBobbyROrderFormImage = LoadButtonImage("LAPTOP\\OrderFormButton.sti", -1,0,-1,1,-1 );
|
||||||
guiBobbyROrderForm = CreateIconAndTextButton( guiBobbyROrderFormImage, BobbyRText[BOBBYR_GUNS_ORDER_FORM], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyROrderForm = CreateIconAndTextButton( guiBobbyROrderFormImage, BobbyRText[BOBBYR_GUNS_ORDER_FORM], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
BOBBYR_ORDER_FORM_X, BOBBYR_ORDER_FORM_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
BOBBYR_ORDER_FORM_X, BOBBYR_ORDER_FORM_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyROrderFormCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBobbyROrderFormCallback);
|
||||||
|
|
||||||
SetButtonCursor(guiBobbyROrderForm, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiBobbyROrderForm, CURSOR_LAPTOP_SCREEN);
|
||||||
|
|
||||||
|
|
||||||
// Home button
|
// Home button
|
||||||
|
|
||||||
guiBobbyRHomeImage = LoadButtonImage("LAPTOP\\CatalogueButton.sti", -1,0,-1,1,-1 );
|
guiBobbyRHomeImage = LoadButtonImage("LAPTOP\\CatalogueButton.sti", -1,0,-1,1,-1 );
|
||||||
guiBobbyRHome = CreateIconAndTextButton( guiBobbyRHomeImage, BobbyRText[BOBBYR_GUNS_HOME], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyRHome = CreateIconAndTextButton( guiBobbyRHomeImage, BobbyRText[BOBBYR_GUNS_HOME], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
BOBBYR_HOME_BUTTON_X, BOBBYR_HOME_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
BOBBYR_HOME_BUTTON_X, BOBBYR_HOME_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRHomeButtonCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBobbyRHomeButtonCallback);
|
||||||
SetButtonCursor(guiBobbyRHome, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiBobbyRHome, CURSOR_LAPTOP_SCREEN);
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
@@ -780,7 +786,8 @@ BOOLEAN DeleteBobbyRGunsFilter()
|
|||||||
|
|
||||||
for (i=0; i<NUMBER_GUNS_FILTER_BUTTONS; i++)
|
for (i=0; i<NUMBER_GUNS_FILTER_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
RemoveButton (guiBobbyRFilterGuns[i]);
|
if(guiBobbyRFilterGuns[i])
|
||||||
|
RemoveButton (guiBobbyRFilterGuns[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
@@ -794,7 +801,8 @@ BOOLEAN DeleteBobbyRAmmoFilter()
|
|||||||
|
|
||||||
for (i=0; i<NUMBER_AMMO_FILTER_BUTTONS; i++)
|
for (i=0; i<NUMBER_AMMO_FILTER_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
RemoveButton (guiBobbyRFilterAmmo[i]);
|
if(guiBobbyRFilterAmmo[i])
|
||||||
|
RemoveButton (guiBobbyRFilterAmmo[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
@@ -808,7 +816,8 @@ BOOLEAN DeleteBobbyRUsedFilter()
|
|||||||
|
|
||||||
for (i=0; i<NUMBER_USED_FILTER_BUTTONS; i++)
|
for (i=0; i<NUMBER_USED_FILTER_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
RemoveButton (guiBobbyRFilterUsed[i]);
|
if(guiBobbyRFilterUsed[i])
|
||||||
|
RemoveButton (guiBobbyRFilterUsed[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
@@ -822,7 +831,8 @@ BOOLEAN DeleteBobbyRArmourFilter()
|
|||||||
|
|
||||||
for (i=0; i<NUMBER_ARMOUR_FILTER_BUTTONS; i++)
|
for (i=0; i<NUMBER_ARMOUR_FILTER_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
RemoveButton (guiBobbyRFilterArmor[i]);
|
if(guiBobbyRFilterArmor[i])
|
||||||
|
RemoveButton (guiBobbyRFilterArmor[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
@@ -836,7 +846,8 @@ BOOLEAN DeleteBobbyRMiscFilter()
|
|||||||
|
|
||||||
for (i=0; i<NUMBER_MISC_FILTER_BUTTONS; i++)
|
for (i=0; i<NUMBER_MISC_FILTER_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
RemoveButton (guiBobbyRFilterMisc[i]);
|
if(guiBobbyRFilterMisc[i])
|
||||||
|
RemoveButton (guiBobbyRFilterMisc[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
@@ -860,7 +871,8 @@ BOOLEAN DeleteBobbyMenuBar()
|
|||||||
|
|
||||||
for(i=0; i<NUM_CATALOGUE_BUTTONS; i++)
|
for(i=0; i<NUM_CATALOGUE_BUTTONS; i++)
|
||||||
{
|
{
|
||||||
RemoveButton( guiBobbyRPageMenu[i] );
|
if(guiBobbyRPageMenu[i])
|
||||||
|
RemoveButton( guiBobbyRPageMenu[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
@@ -1106,6 +1118,9 @@ void BtnBobbyRFilterUsedCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
case BOBBYR_FILTER_USED_ARMOR:
|
case BOBBYR_FILTER_USED_ARMOR:
|
||||||
guiCurrentUsedFilterMode = IC_ARMOUR;
|
guiCurrentUsedFilterMode = IC_ARMOUR;
|
||||||
break;
|
break;
|
||||||
|
case BOBBYR_FILTER_USED_LBEGEAR:
|
||||||
|
guiCurrentUsedFilterMode = IC_LBEGEAR;
|
||||||
|
break;
|
||||||
case BOBBYR_FILTER_USED_MISC:
|
case BOBBYR_FILTER_USED_MISC:
|
||||||
guiCurrentUsedFilterMode = IC_BOBBY_MISC;
|
guiCurrentUsedFilterMode = IC_BOBBY_MISC;
|
||||||
break;
|
break;
|
||||||
@@ -1223,6 +1238,9 @@ void BtnBobbyRFilterMiscCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
case BOBBYR_FILTER_MISC_FACE:
|
case BOBBYR_FILTER_MISC_FACE:
|
||||||
guiCurrentMiscFilterMode = IC_FACE;
|
guiCurrentMiscFilterMode = IC_FACE;
|
||||||
break;
|
break;
|
||||||
|
case BOBBYR_FILTER_MISC_LBEGEAR:
|
||||||
|
guiCurrentMiscFilterMode = IC_LBEGEAR;
|
||||||
|
break;
|
||||||
case BOBBYR_FILTER_MISC_MISC:
|
case BOBBYR_FILTER_MISC_MISC:
|
||||||
guiCurrentMiscFilterMode = IC_MISC;
|
guiCurrentMiscFilterMode = IC_MISC;
|
||||||
break;
|
break;
|
||||||
@@ -1292,7 +1310,6 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter)
|
|||||||
UINT16 i;
|
UINT16 i;
|
||||||
UINT8 ubCount=0;
|
UINT8 ubCount=0;
|
||||||
UINT16 PosY, usTextPosY;
|
UINT16 PosY, usTextPosY;
|
||||||
UINT16 ubFirstIndex=0;
|
|
||||||
UINT16 usItemIndex;
|
UINT16 usItemIndex;
|
||||||
CHAR16 sDollarTemp[60];
|
CHAR16 sDollarTemp[60];
|
||||||
CHAR16 sTemp[60];
|
CHAR16 sTemp[60];
|
||||||
@@ -1365,7 +1382,7 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// No Filter -> Take all
|
// No Filter->Take all
|
||||||
if (iFilter == -1)
|
if (iFilter == -1)
|
||||||
{
|
{
|
||||||
bAddItem = TRUE;
|
bAddItem = TRUE;
|
||||||
@@ -1551,6 +1568,7 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter)
|
|||||||
case IC_MEDKIT:
|
case IC_MEDKIT:
|
||||||
case IC_KIT:
|
case IC_KIT:
|
||||||
case IC_FACE:
|
case IC_FACE:
|
||||||
|
case IC_LBEGEAR:
|
||||||
// USED
|
// USED
|
||||||
if (uiItemClass == BOBBYR_USED_ITEMS)
|
if (uiItemClass == BOBBYR_USED_ITEMS)
|
||||||
{
|
{
|
||||||
@@ -1561,6 +1579,7 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter)
|
|||||||
Item[usItemIndex].usItemClass == IC_MISC ||
|
Item[usItemIndex].usItemClass == IC_MISC ||
|
||||||
Item[usItemIndex].usItemClass == IC_MEDKIT ||
|
Item[usItemIndex].usItemClass == IC_MEDKIT ||
|
||||||
Item[usItemIndex].usItemClass == IC_KIT ||
|
Item[usItemIndex].usItemClass == IC_KIT ||
|
||||||
|
Item[usItemIndex].usItemClass == IC_LBEGEAR ||
|
||||||
Item[usItemIndex].usItemClass == IC_FACE)
|
Item[usItemIndex].usItemClass == IC_FACE)
|
||||||
{
|
{
|
||||||
bAddItem = TRUE;
|
bAddItem = TRUE;
|
||||||
@@ -1625,7 +1644,6 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter)
|
|||||||
BOOLEAN DisplayGunInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
BOOLEAN DisplayGunInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
||||||
{
|
{
|
||||||
UINT16 usHeight;
|
UINT16 usHeight;
|
||||||
UINT32 uiStartLoc=0;
|
|
||||||
UINT16 usFontHeight;
|
UINT16 usFontHeight;
|
||||||
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
||||||
|
|
||||||
@@ -1662,7 +1680,6 @@ BOOLEAN DisplayGunInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16
|
|||||||
BOOLEAN DisplayNonGunWeaponInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
BOOLEAN DisplayNonGunWeaponInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
||||||
{
|
{
|
||||||
UINT16 usHeight;
|
UINT16 usHeight;
|
||||||
UINT32 uiStartLoc=0;
|
|
||||||
UINT16 usFontHeight;
|
UINT16 usFontHeight;
|
||||||
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
||||||
|
|
||||||
@@ -1689,7 +1706,6 @@ BOOLEAN DisplayNonGunWeaponInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed
|
|||||||
BOOLEAN DisplayAmmoInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
BOOLEAN DisplayAmmoInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
||||||
{
|
{
|
||||||
UINT16 usHeight;
|
UINT16 usHeight;
|
||||||
UINT32 uiStartLoc=0;
|
|
||||||
UINT16 usFontHeight;
|
UINT16 usFontHeight;
|
||||||
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
||||||
|
|
||||||
@@ -1716,10 +1732,10 @@ BOOLEAN DisplayBigItemImage(UINT16 usIndex, UINT16 PosY)
|
|||||||
{
|
{
|
||||||
INT16 PosX, sCenX, sCenY;
|
INT16 PosX, sCenX, sCenY;
|
||||||
UINT32 usHeight, usWidth;
|
UINT32 usHeight, usWidth;
|
||||||
ETRLEObject *pTrav;
|
ETRLEObject *pTrav;
|
||||||
INVTYPE *pItem;
|
INVTYPE *pItem;
|
||||||
UINT32 uiImage;
|
UINT32 uiImage;
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
|
|
||||||
PosX = BOBBYR_GRID_PIC_X;
|
PosX = BOBBYR_GRID_PIC_X;
|
||||||
|
|
||||||
@@ -1751,7 +1767,6 @@ BOOLEAN DisplayBigItemImage(UINT16 usIndex, UINT16 PosY)
|
|||||||
BOOLEAN DisplayArmourInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
BOOLEAN DisplayArmourInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
||||||
{
|
{
|
||||||
UINT16 usHeight;
|
UINT16 usHeight;
|
||||||
UINT32 uiStartLoc=0;
|
|
||||||
UINT16 usFontHeight;
|
UINT16 usFontHeight;
|
||||||
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
||||||
|
|
||||||
@@ -1774,10 +1789,15 @@ BOOLEAN DisplayArmourInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT
|
|||||||
BOOLEAN DisplayMiscInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
BOOLEAN DisplayMiscInfo(UINT16 usIndex, UINT16 usTextPosY, BOOLEAN fUsed, UINT16 usBobbyIndex)
|
||||||
{
|
{
|
||||||
UINT16 usHeight;
|
UINT16 usHeight;
|
||||||
UINT32 uiStartLoc=0;
|
|
||||||
UINT16 usFontHeight;
|
UINT16 usFontHeight;
|
||||||
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
||||||
|
|
||||||
|
//CHRISL: Display extra information for LBE Items when using new inventory system
|
||||||
|
if((UsingNewInventorySystem() == true) && Item[usIndex].usItemClass == IC_LBEGEAR)
|
||||||
|
{
|
||||||
|
usHeight = DisplayLBEInfo(usTextPosY, usIndex, usFontHeight);
|
||||||
|
}
|
||||||
|
|
||||||
//Display Items Name
|
//Display Items Name
|
||||||
// DisplayItemNameAndInfo(usTextPosY, usIndex, fUsed);
|
// DisplayItemNameAndInfo(usTextPosY, usIndex, fUsed);
|
||||||
|
|
||||||
@@ -1942,6 +1962,56 @@ UINT16 DisplayCaliber(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
|||||||
return(usPosY);
|
return(usPosY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL: New display function for LBE Gear
|
||||||
|
UINT16 DisplayLBEInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
||||||
|
{
|
||||||
|
CHAR16 sTemp[20];
|
||||||
|
CHAR16 pName[80];
|
||||||
|
int lnCnt=0, count, size;
|
||||||
|
UINT16 lbeIndex;
|
||||||
|
UINT8 pIndex=0;
|
||||||
|
std::vector<int> pocketNum;
|
||||||
|
|
||||||
|
size = LBEPocketType.size();
|
||||||
|
pocketNum.reserve(size);
|
||||||
|
lbeIndex = Item[usIndex].ubClassIndex;
|
||||||
|
// Determine number of each pocket definition
|
||||||
|
for(count = 0; count<size; count++)
|
||||||
|
{
|
||||||
|
pocketNum.push_back(0);
|
||||||
|
}
|
||||||
|
// Populate "Number" for each type of pocket this LBE item has
|
||||||
|
for(count = 0; count<12; count++)
|
||||||
|
{
|
||||||
|
pIndex = LoadBearingEquipment[lbeIndex].lbePocketIndex[count];
|
||||||
|
pocketNum[pIndex]++;
|
||||||
|
}
|
||||||
|
// Go through and display the pocket type and number
|
||||||
|
for(count = 1; count<size; count++)
|
||||||
|
{
|
||||||
|
if(pocketNum[count]>0)
|
||||||
|
{
|
||||||
|
if(lnCnt>4)
|
||||||
|
{
|
||||||
|
swprintf(sTemp, L"More..." );
|
||||||
|
DrawTextToScreen(sTemp, BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, BOBBYR_ITEM_WEIGHT_NUM_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
usPosY += usFontHeight + 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mbstowcs(pName,LBEPocketType[count].pName,80);
|
||||||
|
pName[14] = '\0';
|
||||||
|
swprintf(sTemp, L"%s(x%d)", pName, pocketNum[count] );
|
||||||
|
DrawTextToScreen(sTemp, BOBBYR_ITEM_WEIGHT_TEXT_X, (UINT16)usPosY, BOBBYR_ITEM_WEIGHT_NUM_WIDTH, BOBBYR_ITEM_DESC_TEXT_FONT, BOBBYR_ITEM_DESC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED);
|
||||||
|
usPosY += usFontHeight + 2;
|
||||||
|
lnCnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(usPosY);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
UINT16 DisplayWeight(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
UINT16 DisplayWeight(UINT16 usPosY, UINT16 usIndex, UINT16 usFontHeight)
|
||||||
{
|
{
|
||||||
@@ -1961,10 +2031,8 @@ void DisplayItemNameAndInfo(UINT16 usPosY, UINT16 usIndex, UINT16 usBobbyIndex,
|
|||||||
{
|
{
|
||||||
CHAR16 sText[400];
|
CHAR16 sText[400];
|
||||||
CHAR16 sTemp[20];
|
CHAR16 sTemp[20];
|
||||||
UINT32 uiStartLoc=0;
|
|
||||||
|
|
||||||
UINT8 ubPurchaseNumber;
|
UINT8 ubPurchaseNumber;
|
||||||
UINT16 usFontHeight = GetFontHeight(BOBBYR_ITEM_DESC_TEXT_FONT);
|
|
||||||
|
|
||||||
//Display Items Name
|
//Display Items Name
|
||||||
//uiStartLoc = BOBBYR_ITEM_DESC_FILE_SIZE * usIndex;
|
//uiStartLoc = BOBBYR_ITEM_DESC_FILE_SIZE * usIndex;
|
||||||
@@ -2069,7 +2137,6 @@ void SetFirstLastPagesForNew( UINT32 uiClassMask, INT32 iFilter )
|
|||||||
UINT16 i;
|
UINT16 i;
|
||||||
INT16 sFirst = -1;
|
INT16 sFirst = -1;
|
||||||
INT16 sLast = -1;
|
INT16 sLast = -1;
|
||||||
UINT16 ubPages=0;
|
|
||||||
UINT16 ubNumItems=0;
|
UINT16 ubNumItems=0;
|
||||||
UINT16 usItemIndex = 0;
|
UINT16 usItemIndex = 0;
|
||||||
|
|
||||||
@@ -2085,7 +2152,7 @@ void SetFirstLastPagesForNew( UINT32 uiClassMask, INT32 iFilter )
|
|||||||
{
|
{
|
||||||
if( Item[ LaptopSaveInfo.BobbyRayInventory[ i ].usItemIndex ].usItemClass & uiClassMask )
|
if( Item[ LaptopSaveInfo.BobbyRayInventory[ i ].usItemIndex ].usItemClass & uiClassMask )
|
||||||
{
|
{
|
||||||
// No Filter -> Take all
|
// No Filter->Take all
|
||||||
if (iFilter == -1)
|
if (iFilter == -1)
|
||||||
{
|
{
|
||||||
bCntNumItems = TRUE;
|
bCntNumItems = TRUE;
|
||||||
@@ -2165,10 +2232,8 @@ void SetFirstLastPagesForUsed(INT32 iFilter)
|
|||||||
UINT16 i;
|
UINT16 i;
|
||||||
INT16 sFirst = -1;
|
INT16 sFirst = -1;
|
||||||
INT16 sLast = -1;
|
INT16 sLast = -1;
|
||||||
UINT16 ubPages=0;
|
|
||||||
UINT16 ubNumItems=0;
|
UINT16 ubNumItems=0;
|
||||||
UINT16 usItemIndex;
|
UINT16 usItemIndex;
|
||||||
INT32 iFilterLauncher = IC_LAUNCHER;
|
|
||||||
|
|
||||||
gubCurPage = 0;
|
gubCurPage = 0;
|
||||||
BOOLEAN bCntNumItems = FALSE;
|
BOOLEAN bCntNumItems = FALSE;
|
||||||
@@ -2180,7 +2245,7 @@ void SetFirstLastPagesForUsed(INT32 iFilter)
|
|||||||
//If we have some of the inventory on hand
|
//If we have some of the inventory on hand
|
||||||
if( LaptopSaveInfo.BobbyRayUsedInventory[ i ].ubQtyOnHand != 0 )
|
if( LaptopSaveInfo.BobbyRayUsedInventory[ i ].ubQtyOnHand != 0 )
|
||||||
{
|
{
|
||||||
// No Filter -> Take all
|
// No Filter->Take all
|
||||||
if (iFilter == -1)
|
if (iFilter == -1)
|
||||||
{
|
{
|
||||||
bCntNumItems = TRUE;
|
bCntNumItems = TRUE;
|
||||||
@@ -2188,7 +2253,6 @@ void SetFirstLastPagesForUsed(INT32 iFilter)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
bCntNumItems = FALSE;
|
bCntNumItems = FALSE;
|
||||||
|
|
||||||
// Get the weapon from the item
|
// Get the weapon from the item
|
||||||
usItemIndex = LaptopSaveInfo.BobbyRayUsedInventory[ i ].usItemIndex;
|
usItemIndex = LaptopSaveInfo.BobbyRayUsedInventory[ i ].usItemIndex;
|
||||||
|
|
||||||
@@ -2213,6 +2277,12 @@ void SetFirstLastPagesForUsed(INT32 iFilter)
|
|||||||
bCntNumItems = TRUE;
|
bCntNumItems = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case IC_LBEGEAR:
|
||||||
|
if (Item[usItemIndex].usItemClass == IC_LBEGEAR)
|
||||||
|
{
|
||||||
|
bCntNumItems = TRUE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case IC_BOBBY_MISC:
|
case IC_BOBBY_MISC:
|
||||||
if (Item[usItemIndex].usItemClass == IC_BLADE ||
|
if (Item[usItemIndex].usItemClass == IC_BLADE ||
|
||||||
Item[usItemIndex].usItemClass == IC_THROWING_KNIFE ||
|
Item[usItemIndex].usItemClass == IC_THROWING_KNIFE ||
|
||||||
@@ -2437,7 +2507,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
|||||||
// AmmoTypes[Magazine[ Item[usItem].ubClassIndex ].ubAmmoType].ammoName, //Ammo type
|
// AmmoTypes[Magazine[ Item[usItem].ubClassIndex ].ubAmmoType].ammoName, //Ammo type
|
||||||
// MagNames[Magazine[ Item[usItem].ubClassIndex ].ubMagType], //Magazine type
|
// MagNames[Magazine[ Item[usItem].ubClassIndex ].ubMagType], //Magazine type
|
||||||
// Magazine[ Item[usItem].ubClassIndex ].ubMagSize, //Magazine capacity
|
// Magazine[ Item[usItem].ubClassIndex ].ubMagSize, //Magazine capacity
|
||||||
// pObject->ubShotsLeft[0], //Shots left
|
// (*pObject)[0]->data.ubShotsLeft, //Shots left
|
||||||
// gWeaponStatsDesc[ 12 ], //Weight String
|
// gWeaponStatsDesc[ 12 ], //Weight String
|
||||||
// fWeight, //Weight
|
// fWeight, //Weight
|
||||||
// GetWeightUnitString() //Weight units
|
// GetWeightUnitString() //Weight units
|
||||||
@@ -2449,7 +2519,7 @@ void CreateMouseRegionForBigImage( UINT16 usPosY, UINT8 ubCount, INT16 *pItemNum
|
|||||||
if( ubItemCount != 0 )
|
if( ubItemCount != 0 )
|
||||||
{
|
{
|
||||||
swprintf( zItemName, L"\n%s %d %s",BobbyRText[BOBBYR_GUNS_NUM_GUNS_THAT_USE_AMMO_1], ubItemCount, BobbyRText[BOBBYR_GUNS_NUM_GUNS_THAT_USE_AMMO_2] );
|
swprintf( zItemName, L"\n%s %d %s",BobbyRText[BOBBYR_GUNS_NUM_GUNS_THAT_USE_AMMO_1], ubItemCount, BobbyRText[BOBBYR_GUNS_NUM_GUNS_THAT_USE_AMMO_2] );
|
||||||
wcscat( pStr, zItemName );
|
wcscat( pStr, zItemName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -2634,7 +2704,7 @@ void PurchaseBobbyRayItem(UINT16 usItemNumber)
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Else If the item is already purchased increment purchase amount. Only if ordering less then the max amount!
|
// Else If the item is already purchased increment purchase amount. Only if ordering less then the max amount!
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased <= BOBBY_RAY_MAX_AMOUNT_OF_ITEMS_TO_PURCHASE)
|
if( BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased <= BOBBY_RAY_MAX_AMOUNT_OF_ITEMS_TO_PURCHASE)
|
||||||
@@ -2675,7 +2745,7 @@ void PurchaseBobbyRayItem(UINT16 usItemNumber)
|
|||||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, BobbyRText[ BOBBYR_MORE_THEN_10_PURCHASES ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, BobbyRText[ BOBBYR_MORE_THEN_10_PURCHASES ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Else If the item is already purchased increment purchase amount. Only if ordering less then the max amount!
|
// Else If the item is already purchased increment purchase amount. Only if ordering less then the max amount!
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased <= BOBBY_RAY_MAX_AMOUNT_OF_ITEMS_TO_PURCHASE)
|
if( BobbyRayPurchases[ ubPurchaseNumber ].ubNumberPurchased <= BOBBY_RAY_MAX_AMOUNT_OF_ITEMS_TO_PURCHASE)
|
||||||
@@ -2884,7 +2954,9 @@ void UpdateUsedFilterButtons()
|
|||||||
{
|
{
|
||||||
EnableButton(guiBobbyRFilterUsed[0]);
|
EnableButton(guiBobbyRFilterUsed[0]);
|
||||||
EnableButton(guiBobbyRFilterUsed[1]);
|
EnableButton(guiBobbyRFilterUsed[1]);
|
||||||
EnableButton(guiBobbyRFilterUsed[2]);
|
if(guiBobbyRFilterUsed[2])
|
||||||
|
EnableButton(guiBobbyRFilterUsed[2]);
|
||||||
|
EnableButton(guiBobbyRFilterUsed[3]);
|
||||||
|
|
||||||
switch (guiCurrentUsedFilterMode)
|
switch (guiCurrentUsedFilterMode)
|
||||||
{
|
{
|
||||||
@@ -2894,9 +2966,12 @@ void UpdateUsedFilterButtons()
|
|||||||
case IC_ARMOUR:
|
case IC_ARMOUR:
|
||||||
DisableButton(guiBobbyRFilterUsed[1]);
|
DisableButton(guiBobbyRFilterUsed[1]);
|
||||||
break;
|
break;
|
||||||
case IC_BOBBY_MISC:
|
case IC_LBEGEAR:
|
||||||
DisableButton(guiBobbyRFilterUsed[2]);
|
DisableButton(guiBobbyRFilterUsed[2]);
|
||||||
break;
|
break;
|
||||||
|
case IC_BOBBY_MISC:
|
||||||
|
DisableButton(guiBobbyRFilterUsed[3]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2928,7 +3003,9 @@ void UpdateMiscFilterButtons()
|
|||||||
EnableButton(guiBobbyRFilterMisc[5]);
|
EnableButton(guiBobbyRFilterMisc[5]);
|
||||||
EnableButton(guiBobbyRFilterMisc[6]);
|
EnableButton(guiBobbyRFilterMisc[6]);
|
||||||
EnableButton(guiBobbyRFilterMisc[7]);
|
EnableButton(guiBobbyRFilterMisc[7]);
|
||||||
EnableButton(guiBobbyRFilterMisc[8]);
|
if(guiBobbyRFilterMisc[8])
|
||||||
|
EnableButton(guiBobbyRFilterMisc[8]);
|
||||||
|
EnableButton(guiBobbyRFilterMisc[9]);
|
||||||
|
|
||||||
switch (guiCurrentMiscFilterMode)
|
switch (guiCurrentMiscFilterMode)
|
||||||
{
|
{
|
||||||
@@ -2956,9 +3033,12 @@ void UpdateMiscFilterButtons()
|
|||||||
case IC_FACE:
|
case IC_FACE:
|
||||||
DisableButton(guiBobbyRFilterMisc[7]);
|
DisableButton(guiBobbyRFilterMisc[7]);
|
||||||
break;
|
break;
|
||||||
case IC_MISC:
|
case IC_LBEGEAR:
|
||||||
DisableButton(guiBobbyRFilterMisc[8]);
|
DisableButton(guiBobbyRFilterMisc[8]);
|
||||||
break;
|
break;
|
||||||
|
case IC_MISC:
|
||||||
|
DisableButton(guiBobbyRFilterMisc[9]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (iNewButton != iOldButton)
|
//if (iNewButton != iOldButton)
|
||||||
@@ -3089,6 +3169,12 @@ void CalcFirstIndexForPage( STORE_INVENTORY *pInv, UINT32 uiItemClass )
|
|||||||
bCntItem = TRUE;
|
bCntItem = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case IC_LBEGEAR:
|
||||||
|
if (Item[usItemIndex].usItemClass == IC_LBEGEAR)
|
||||||
|
{
|
||||||
|
bCntItem = TRUE;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case IC_BOBBY_MISC:
|
case IC_BOBBY_MISC:
|
||||||
if (Item[usItemIndex].usItemClass == IC_BLADE ||
|
if (Item[usItemIndex].usItemClass == IC_BLADE ||
|
||||||
Item[usItemIndex].usItemClass == IC_THROWING_KNIFE ||
|
Item[usItemIndex].usItemClass == IC_THROWING_KNIFE ||
|
||||||
@@ -3255,9 +3341,9 @@ BOOLEAN IsAmmoMatchinWeaponType(UINT16 usItemIndex, UINT8 ubWeaponType)
|
|||||||
void OutOfStockMessageBoxCallBack( UINT8 bExitValue )
|
void OutOfStockMessageBoxCallBack( UINT8 bExitValue )
|
||||||
{
|
{
|
||||||
// yes, load the game
|
// yes, load the game
|
||||||
if( bExitValue == MSG_BOX_RETURN_OK )
|
if( bExitValue == MSG_BOX_RETURN_OK )
|
||||||
{
|
{
|
||||||
// guiCurrentLaptopMode = LAPTOP_MODE_BOBBY_R;
|
// guiCurrentLaptopMode = LAPTOP_MODE_BOBBY_R;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3279,7 +3365,7 @@ UINT8 CheckPlayersInventoryForGunMatchingGivenAmmoID( INT16 sItemID )
|
|||||||
if( Menptr[ ubMercCount ].bActive )
|
if( Menptr[ ubMercCount ].bActive )
|
||||||
{
|
{
|
||||||
//loop through all the pockets on the merc
|
//loop through all the pockets on the merc
|
||||||
for( ubPocketCount=0; ubPocketCount<NUM_INV_SLOTS; ubPocketCount++)
|
for( ubPocketCount=0; ubPocketCount<Menptr[ ubMercCount ].inv.size(); ubPocketCount++)
|
||||||
{
|
{
|
||||||
//if there is a weapon here
|
//if there is a weapon here
|
||||||
if( Item[ Menptr[ ubMercCount ].inv[ ubPocketCount ].usItem ].usItemClass == IC_GUN )
|
if( Item[ Menptr[ ubMercCount ].inv[ ubPocketCount ].usItem ].usItemClass == IC_GUN )
|
||||||
@@ -3321,3 +3407,5 @@ void ReportBobbyROrderError( UINT16 usItemNumber, UINT8 ubPurchaseNum, UINT8 ubQ
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
#ifndef __BOBBYRGUNS_H
|
#ifndef __BOBBYRGUNS_H
|
||||||
#define __BOBBYRGUNS_H
|
#define __BOBBYRGUNS_H
|
||||||
|
|
||||||
//#include "LaptopSave.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define BOBBYRDESCFILE "BINARYDATA\\BrayDesc.edt"
|
#define BOBBYRDESCFILE "BINARYDATA\\BrayDesc.edt"
|
||||||
|
|
||||||
#define BOBBYR_ITEM_DESC_NAME_SIZE 160
|
#define BOBBYR_ITEM_DESC_NAME_SIZE 160
|
||||||
|
|||||||
+116
-117
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
STR16 *psCityLoc;
|
STR16 *psCityLoc;
|
||||||
UINT16 usOverNightExpress;
|
UINT16 usOverNightExpress;
|
||||||
UINT16 us2DaysService;
|
UINT16 us2DaysService;
|
||||||
UINT16 usStandardService;
|
UINT16 usStandardService;
|
||||||
@@ -38,22 +38,22 @@ typedef struct
|
|||||||
BobbyROrderLocationStruct BobbyROrderLocations[]=
|
BobbyROrderLocationStruct BobbyROrderLocations[]=
|
||||||
{
|
{
|
||||||
{ &pDeliveryLocationStrings[0], 20, 15, 10 },
|
{ &pDeliveryLocationStrings[0], 20, 15, 10 },
|
||||||
{ &pDeliveryLocationStrings[1], 295, 150, 85 },
|
{ &pDeliveryLocationStrings[1], 295, 150, 85 },
|
||||||
{ &pDeliveryLocationStrings[2], 200, 100, 50 }, // the only one that really matters
|
{ &pDeliveryLocationStrings[2], 200, 100, 50 }, // the only one that really matters
|
||||||
{ &pDeliveryLocationStrings[3], 100, 55, 30 },
|
{ &pDeliveryLocationStrings[3], 100, 55, 30 },
|
||||||
{ &pDeliveryLocationStrings[4], 95, 65, 40 },
|
{ &pDeliveryLocationStrings[4], 95, 65, 40 },
|
||||||
{ &pDeliveryLocationStrings[5], 55, 40, 25 },
|
{ &pDeliveryLocationStrings[5], 55, 40, 25 },
|
||||||
{ &pDeliveryLocationStrings[6], 35, 25, 15 },
|
{ &pDeliveryLocationStrings[6], 35, 25, 15 },
|
||||||
{ &pDeliveryLocationStrings[7], 200, 100, 50 },
|
{ &pDeliveryLocationStrings[7], 200, 100, 50 },
|
||||||
{ &pDeliveryLocationStrings[8], 190, 90, 45 },
|
{ &pDeliveryLocationStrings[8], 190, 90, 45 },
|
||||||
{ &pDeliveryLocationStrings[9], 35, 25, 15 },
|
{ &pDeliveryLocationStrings[9], 35, 25, 15 },
|
||||||
{ &pDeliveryLocationStrings[10], 100, 55, 30 },
|
{ &pDeliveryLocationStrings[10], 100, 55, 30 },
|
||||||
{ &pDeliveryLocationStrings[11], 35, 25, 15 },
|
{ &pDeliveryLocationStrings[11], 35, 25, 15 },
|
||||||
{ &pDeliveryLocationStrings[12], 45, 30, 20 },
|
{ &pDeliveryLocationStrings[12], 45, 30, 20 },
|
||||||
{ &pDeliveryLocationStrings[13], 55, 40, 25 },
|
{ &pDeliveryLocationStrings[13], 55, 40, 25 },
|
||||||
{ &pDeliveryLocationStrings[14], 100, 55, 30 },
|
{ &pDeliveryLocationStrings[14], 100, 55, 30 },
|
||||||
{ &pDeliveryLocationStrings[15], 100, 55, 30 },
|
{ &pDeliveryLocationStrings[15], 100, 55, 30 },
|
||||||
{ &pDeliveryLocationStrings[16], 45, 30, 20 },
|
{ &pDeliveryLocationStrings[16], 45, 30, 20 },
|
||||||
};
|
};
|
||||||
|
|
||||||
//drop down menu
|
//drop down menu
|
||||||
@@ -134,12 +134,12 @@ enum
|
|||||||
#define BOBBYR_GRID_FIFTH_COLUMN_Y BOBBYR_GRID_FIRST_COLUMN_Y
|
#define BOBBYR_GRID_FIFTH_COLUMN_Y BOBBYR_GRID_FIRST_COLUMN_Y
|
||||||
#define BOBBYR_GRID_FIFTH_COLUMN_WIDTH 42
|
#define BOBBYR_GRID_FIFTH_COLUMN_WIDTH 42
|
||||||
|
|
||||||
#define BOBBYR_SUBTOTAL_WIDTH 212
|
#define BOBBYR_SUBTOTAL_WIDTH 212
|
||||||
#define BOBBYR_SUBTOTAL_X BOBBYR_GRID_FIRST_COLUMN_X
|
#define BOBBYR_SUBTOTAL_X BOBBYR_GRID_FIRST_COLUMN_X
|
||||||
#define BOBBYR_SUBTOTAL_Y BOBBYR_GRID_FIRST_COLUMN_Y + BOBBYR_GRID_ROW_OFFSET * 10 + 3
|
#define BOBBYR_SUBTOTAL_Y BOBBYR_GRID_FIRST_COLUMN_Y + BOBBYR_GRID_ROW_OFFSET * 10 + 3
|
||||||
|
|
||||||
#define BOBBYR_SHIPPING_N_HANDLE_Y BOBBYR_SUBTOTAL_Y + 17
|
#define BOBBYR_SHIPPING_N_HANDLE_Y BOBBYR_SUBTOTAL_Y + 17
|
||||||
#define BOBBYR_GRAND_TOTAL_Y BOBBYR_SHIPPING_N_HANDLE_Y + 20
|
#define BOBBYR_GRAND_TOTAL_Y BOBBYR_SHIPPING_N_HANDLE_Y + 20
|
||||||
|
|
||||||
#define BOBBYR_SHIPPING_LOCATION_TEXT_X BOBBYR_LOCATION_BOX_X + 8
|
#define BOBBYR_SHIPPING_LOCATION_TEXT_X BOBBYR_LOCATION_BOX_X + 8
|
||||||
#define BOBBYR_SHIPPING_LOCATION_TEXT_Y BOBBYR_LOCATION_BOX_Y + 8
|
#define BOBBYR_SHIPPING_LOCATION_TEXT_Y BOBBYR_LOCATION_BOX_Y + 8
|
||||||
@@ -286,38 +286,38 @@ INT32 giBobbyRGotoShipmentPageImage;
|
|||||||
|
|
||||||
|
|
||||||
//mouse region for the shipping speed selection area
|
//mouse region for the shipping speed selection area
|
||||||
MOUSE_REGION gSelectedShippingSpeedRegion[3];
|
MOUSE_REGION gSelectedShippingSpeedRegion[3];
|
||||||
void SelectShippingSpeedRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectShippingSpeedRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
//mouse region for the confirm area
|
//mouse region for the confirm area
|
||||||
MOUSE_REGION gSelectedConfirmOrderRegion;
|
MOUSE_REGION gSelectedConfirmOrderRegion;
|
||||||
void SelectConfirmOrderRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectConfirmOrderRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
//mouse region for the drop down city location area
|
//mouse region for the drop down city location area
|
||||||
MOUSE_REGION gSelectedDropDownRegion[ BOBBYR_ORDER_NUM_SHIPPING_CITIES ];
|
MOUSE_REGION gSelectedDropDownRegion[ BOBBYR_ORDER_NUM_SHIPPING_CITIES ];
|
||||||
void SelectDropDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectDropDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
void SelectDropDownMovementCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectDropDownMovementCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
//mouse region for scroll area for the drop down city location area
|
//mouse region for scroll area for the drop down city location area
|
||||||
MOUSE_REGION gSelectedScrollAreaDropDownRegion[BOBBYR_ORDER_NUM_SHIPPING_CITIES];
|
MOUSE_REGION gSelectedScrollAreaDropDownRegion[BOBBYR_ORDER_NUM_SHIPPING_CITIES];
|
||||||
void SelectScrollAreaDropDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectScrollAreaDropDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
void SelectScrollAreaDropDownMovementCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectScrollAreaDropDownMovementCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
|
|
||||||
//mouse region to activate the shipping location drop down
|
//mouse region to activate the shipping location drop down
|
||||||
MOUSE_REGION gSelectedActivateCityDroDownRegion;
|
MOUSE_REGION gSelectedActivateCityDroDownRegion;
|
||||||
void SelectActivateCityDroDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectActivateCityDroDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
//mouse region to close the drop down menu
|
//mouse region to close the drop down menu
|
||||||
MOUSE_REGION gSelectedCloseDropDownRegion;
|
MOUSE_REGION gSelectedCloseDropDownRegion;
|
||||||
void SelectCloseDroDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectCloseDroDownRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
//mouse region to click on the title to go to the home page
|
//mouse region to click on the title to go to the home page
|
||||||
MOUSE_REGION gSelectedTitleLinkRegion;
|
MOUSE_REGION gSelectedTitleLinkRegion;
|
||||||
void SelectTitleLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectTitleLinkRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
//mouse region to click on the up or down arrow on the scroll area
|
//mouse region to click on the up or down arrow on the scroll area
|
||||||
MOUSE_REGION gSelectedUpDownArrowOnScrollAreaRegion[2];
|
MOUSE_REGION gSelectedUpDownArrowOnScrollAreaRegion[2];
|
||||||
void SelectUpDownArrowOnScrollAreaRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectUpDownArrowOnScrollAreaRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@ void GameInitBobbyRMailOrder()
|
|||||||
|
|
||||||
BOOLEAN EnterBobbyRMailOrder()
|
BOOLEAN EnterBobbyRMailOrder()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
UINT16 i;
|
UINT16 i;
|
||||||
|
|
||||||
gfReDrawBobbyOrder = FALSE;
|
gfReDrawBobbyOrder = FALSE;
|
||||||
@@ -390,20 +390,20 @@ BOOLEAN EnterBobbyRMailOrder()
|
|||||||
FilenameForBPP("LAPTOP\\TotalSaveArea.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("LAPTOP\\TotalSaveArea.sti", VObjectDesc.ImageFile);
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &guiTotalSaveArea));
|
CHECKF(AddVideoObject(&VObjectDesc, &guiTotalSaveArea));
|
||||||
|
|
||||||
// border
|
// border
|
||||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
FilenameForBPP( "INTERFACE\\TactPopUp.sti", VObjectDesc.ImageFile );
|
FilenameForBPP( "INTERFACE\\TactPopUp.sti", VObjectDesc.ImageFile );
|
||||||
CHECKF( AddVideoObject( &VObjectDesc, &guiDropDownBorder ) );
|
CHECKF( AddVideoObject( &VObjectDesc, &guiDropDownBorder ) );
|
||||||
|
|
||||||
// Gold Arrow for the scroll area
|
// Gold Arrow for the scroll area
|
||||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
FilenameForBPP( "LAPTOP\\GoldArrows.sti", VObjectDesc.ImageFile );
|
FilenameForBPP( "LAPTOP\\GoldArrows.sti", VObjectDesc.ImageFile );
|
||||||
CHECKF( AddVideoObject( &VObjectDesc, &guiGoldArrowImages ) );
|
CHECKF( AddVideoObject( &VObjectDesc, &guiGoldArrowImages ) );
|
||||||
|
|
||||||
// Package Weight Graphic
|
// Package Weight Graphic
|
||||||
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags = VOBJECT_CREATE_FROMFILE;
|
||||||
FilenameForBPP( "LAPTOP\\PackageWeight.sti", VObjectDesc.ImageFile );
|
FilenameForBPP( "LAPTOP\\PackageWeight.sti", VObjectDesc.ImageFile );
|
||||||
CHECKF( AddVideoObject( &VObjectDesc, &guiPackageWeightImage ) );
|
CHECKF( AddVideoObject( &VObjectDesc, &guiPackageWeightImage ) );
|
||||||
|
|
||||||
|
|
||||||
InitBobbyRWoodBackground();
|
InitBobbyRWoodBackground();
|
||||||
@@ -415,11 +415,11 @@ BOOLEAN EnterBobbyRMailOrder()
|
|||||||
// Clear Order button
|
// Clear Order button
|
||||||
guiBobbyRClearOrderImage = LoadButtonImage("LAPTOP\\EraseOrderButton.sti", -1,0,-1,1,-1 );
|
guiBobbyRClearOrderImage = LoadButtonImage("LAPTOP\\EraseOrderButton.sti", -1,0,-1,1,-1 );
|
||||||
guiBobbyRClearOrder = CreateIconAndTextButton( guiBobbyRClearOrderImage, BobbyROrderFormText[BOBBYR_CLEAR_ORDER], BOBBYR_ORDER_TITLE_TEXT_FONT,
|
guiBobbyRClearOrder = CreateIconAndTextButton( guiBobbyRClearOrderImage, BobbyROrderFormText[BOBBYR_CLEAR_ORDER], BOBBYR_ORDER_TITLE_TEXT_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
BOBBYR_CLEAR_ORDER_X, BOBBYR_CLEAR_ORDER_Y+4, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
BOBBYR_CLEAR_ORDER_X, BOBBYR_CLEAR_ORDER_Y+4, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRClearOrderCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBobbyRClearOrderCallback);
|
||||||
SetButtonCursor(guiBobbyRClearOrder, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiBobbyRClearOrder, CURSOR_LAPTOP_SCREEN);
|
||||||
SpecifyDisabledButtonStyle( guiBobbyRClearOrder, DISABLED_STYLE_NONE );
|
SpecifyDisabledButtonStyle( guiBobbyRClearOrder, DISABLED_STYLE_NONE );
|
||||||
SpecifyButtonTextOffsets( guiBobbyRClearOrder, 39, 10, TRUE );
|
SpecifyButtonTextOffsets( guiBobbyRClearOrder, 39, 10, TRUE );
|
||||||
@@ -428,11 +428,11 @@ BOOLEAN EnterBobbyRMailOrder()
|
|||||||
// Accept Order button
|
// Accept Order button
|
||||||
guiBobbyRAcceptOrderImage = LoadButtonImage("LAPTOP\\AcceptOrderButton.sti", 2,0,-1,1,-1 );
|
guiBobbyRAcceptOrderImage = LoadButtonImage("LAPTOP\\AcceptOrderButton.sti", 2,0,-1,1,-1 );
|
||||||
guiBobbyRAcceptOrder = CreateIconAndTextButton( guiBobbyRAcceptOrderImage, BobbyROrderFormText[BOBBYR_ACCEPT_ORDER], BOBBYR_ORDER_TITLE_TEXT_FONT,
|
guiBobbyRAcceptOrder = CreateIconAndTextButton( guiBobbyRAcceptOrderImage, BobbyROrderFormText[BOBBYR_ACCEPT_ORDER], BOBBYR_ORDER_TITLE_TEXT_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
BOBBYR_ACCEPT_ORDER_X, BOBBYR_ACCEPT_ORDER_Y+4, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
BOBBYR_ACCEPT_ORDER_X, BOBBYR_ACCEPT_ORDER_Y+4, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRAcceptOrderCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBobbyRAcceptOrderCallback);
|
||||||
SetButtonCursor( guiBobbyRAcceptOrder, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor( guiBobbyRAcceptOrder, CURSOR_LAPTOP_SCREEN);
|
||||||
SpecifyButtonTextOffsets( guiBobbyRAcceptOrder, 43, 24, TRUE );
|
SpecifyButtonTextOffsets( guiBobbyRAcceptOrder, 43, 24, TRUE );
|
||||||
|
|
||||||
@@ -448,32 +448,32 @@ BOOLEAN EnterBobbyRMailOrder()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
guiBobbyRBackImage = LoadButtonImage("LAPTOP\\CatalogueButton.sti", -1,0,-1,1,-1 );
|
guiBobbyRBackImage = LoadButtonImage("LAPTOP\\CatalogueButton.sti", -1,0,-1,1,-1 );
|
||||||
guiBobbyRBack = CreateIconAndTextButton( guiBobbyRBackImage, BobbyROrderFormText[BOBBYR_BACK], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyRBack = CreateIconAndTextButton( guiBobbyRBackImage, BobbyROrderFormText[BOBBYR_BACK], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
BOBBYR_BACK_BUTTON_X, BOBBYR_BACK_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
BOBBYR_BACK_BUTTON_X, BOBBYR_BACK_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRBackCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBobbyRBackCallback);
|
||||||
SetButtonCursor(guiBobbyRBack, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiBobbyRBack, CURSOR_LAPTOP_SCREEN);
|
||||||
|
|
||||||
guiBobbyRHomeImage = UseLoadedButtonImage( guiBobbyRBackImage, -1,0,-1,1,-1 );
|
guiBobbyRHomeImage = UseLoadedButtonImage( guiBobbyRBackImage, -1,0,-1,1,-1 );
|
||||||
guiBobbyRHome = CreateIconAndTextButton( guiBobbyRHomeImage, BobbyROrderFormText[BOBBYR_HOME], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyRHome = CreateIconAndTextButton( guiBobbyRHomeImage, BobbyROrderFormText[BOBBYR_HOME], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
BOBBYR_HOME_BUTTON_X, BOBBYR_HOME_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
BOBBYR_HOME_BUTTON_X, BOBBYR_HOME_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRHomeCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBobbyRHomeCallback);
|
||||||
SetButtonCursor(guiBobbyRHome, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiBobbyRHome, CURSOR_LAPTOP_SCREEN);
|
||||||
|
|
||||||
|
|
||||||
giBobbyRGotoShipmentPageImage = UseLoadedButtonImage( guiBobbyRBackImage, -1,0,-1,1,-1 );
|
giBobbyRGotoShipmentPageImage = UseLoadedButtonImage( guiBobbyRBackImage, -1,0,-1,1,-1 );
|
||||||
guiBobbyRGotoShipmentPage = CreateIconAndTextButton( giBobbyRGotoShipmentPageImage, BobbyROrderFormText[BOBBYR_GOTOSHIPMENT_PAGE], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyRGotoShipmentPage = CreateIconAndTextButton( giBobbyRGotoShipmentPageImage, BobbyROrderFormText[BOBBYR_GOTOSHIPMENT_PAGE], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
BOBBYR_SHIPMENT_BUTTON_X, BOBBYR_SHIPMENT_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
BOBBYR_SHIPMENT_BUTTON_X, BOBBYR_SHIPMENT_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRGotoShipmentPageCallback );
|
DEFAULT_MOVE_CALLBACK, BtnBobbyRGotoShipmentPageCallback );
|
||||||
SetButtonCursor(guiBobbyRGotoShipmentPage, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor(guiBobbyRGotoShipmentPage, CURSOR_LAPTOP_SCREEN);
|
||||||
|
|
||||||
|
|
||||||
@@ -481,30 +481,30 @@ BOOLEAN EnterBobbyRMailOrder()
|
|||||||
{
|
{
|
||||||
|
|
||||||
MSYS_DefineRegion( &gSelectedShippingSpeedRegion[i], gShippingSpeedAreas[i*2], gShippingSpeedAreas[i*2+1] , (UINT16)(gShippingSpeedAreas[i*2]+SHIPPING_SPEED_LIGHT_WIDTH), (UINT16)(gShippingSpeedAreas[i*2+1]+SHIPPING_SPEED_LIGHT_HEIGHT), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedShippingSpeedRegion[i], gShippingSpeedAreas[i*2], gShippingSpeedAreas[i*2+1] , (UINT16)(gShippingSpeedAreas[i*2]+SHIPPING_SPEED_LIGHT_WIDTH), (UINT16)(gShippingSpeedAreas[i*2+1]+SHIPPING_SPEED_LIGHT_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectShippingSpeedRegionCallBack );
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectShippingSpeedRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedShippingSpeedRegion[i]);
|
MSYS_AddRegion(&gSelectedShippingSpeedRegion[i]);
|
||||||
MSYS_SetRegionUserData( &gSelectedShippingSpeedRegion[ i ], 0, i);
|
MSYS_SetRegionUserData( &gSelectedShippingSpeedRegion[ i ], 0, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
//confirmorder mouse region, occupies the entrie screen and is present only when the confirm order graphic
|
//confirmorder mouse region, occupies the entrie screen and is present only when the confirm order graphic
|
||||||
//s on screen. When user clicks anywhere the graphic disappears
|
//s on screen. When user clicks anywhere the graphic disappears
|
||||||
MSYS_DefineRegion( &gSelectedConfirmOrderRegion, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y , LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y, MSYS_PRIORITY_HIGH+1,
|
MSYS_DefineRegion( &gSelectedConfirmOrderRegion, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y , LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y, MSYS_PRIORITY_HIGH+1,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectConfirmOrderRegionCallBack);
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectConfirmOrderRegionCallBack);
|
||||||
MSYS_AddRegion(&gSelectedConfirmOrderRegion);
|
MSYS_AddRegion(&gSelectedConfirmOrderRegion);
|
||||||
MSYS_DisableRegion(&gSelectedConfirmOrderRegion);
|
MSYS_DisableRegion(&gSelectedConfirmOrderRegion);
|
||||||
|
|
||||||
|
|
||||||
//click on the shipping location to activate the drop down menu
|
//click on the shipping location to activate the drop down menu
|
||||||
MSYS_DefineRegion( &gSelectedActivateCityDroDownRegion, BOBBYR_SHIPPING_LOC_AREA_L_X, BOBBYR_SHIPPING_LOC_AREA_T_Y, BOBBYR_SHIPPING_LOC_AREA_R_X, BOBBYR_SHIPPING_LOC_AREA_B_Y, MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedActivateCityDroDownRegion, BOBBYR_SHIPPING_LOC_AREA_L_X, BOBBYR_SHIPPING_LOC_AREA_T_Y, BOBBYR_SHIPPING_LOC_AREA_R_X, BOBBYR_SHIPPING_LOC_AREA_B_Y, MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectActivateCityDroDownRegionCallBack);
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectActivateCityDroDownRegionCallBack);
|
||||||
MSYS_AddRegion(&gSelectedActivateCityDroDownRegion);
|
MSYS_AddRegion(&gSelectedActivateCityDroDownRegion);
|
||||||
|
|
||||||
|
|
||||||
//click anywhere on the screen to close the window( only when the drop down window is active)
|
//click anywhere on the screen to close the window( only when the drop down window is active)
|
||||||
MSYS_DefineRegion( &gSelectedCloseDropDownRegion, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y , LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y, MSYS_PRIORITY_HIGH-1,
|
MSYS_DefineRegion( &gSelectedCloseDropDownRegion, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y , LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y, MSYS_PRIORITY_HIGH-1,
|
||||||
CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, SelectCloseDroDownRegionCallBack);
|
CURSOR_LAPTOP_SCREEN, MSYS_NO_CALLBACK, SelectCloseDroDownRegionCallBack);
|
||||||
MSYS_AddRegion(&gSelectedCloseDropDownRegion);
|
MSYS_AddRegion(&gSelectedCloseDropDownRegion);
|
||||||
MSYS_DisableRegion(&gSelectedCloseDropDownRegion);
|
MSYS_DisableRegion(&gSelectedCloseDropDownRegion);
|
||||||
|
|
||||||
|
|
||||||
CreateBobbyRayOrderTitle();
|
CreateBobbyRayOrderTitle();
|
||||||
@@ -560,12 +560,12 @@ void ExitBobbyRMailOrder()
|
|||||||
|
|
||||||
for(i=0; i<3; i++)
|
for(i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
MSYS_RemoveRegion( &gSelectedShippingSpeedRegion[i]);
|
MSYS_RemoveRegion( &gSelectedShippingSpeedRegion[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
MSYS_RemoveRegion( &gSelectedConfirmOrderRegion);
|
MSYS_RemoveRegion( &gSelectedConfirmOrderRegion);
|
||||||
MSYS_RemoveRegion( &gSelectedActivateCityDroDownRegion);
|
MSYS_RemoveRegion( &gSelectedActivateCityDroDownRegion);
|
||||||
MSYS_RemoveRegion( &gSelectedCloseDropDownRegion);
|
MSYS_RemoveRegion( &gSelectedCloseDropDownRegion);
|
||||||
|
|
||||||
|
|
||||||
//if the drop down box is active, destroy it
|
//if the drop down box is active, destroy it
|
||||||
@@ -591,7 +591,7 @@ void HandleBobbyRMailOrder()
|
|||||||
BltVideoObjectOutlineShadowFromIndex( FRAME_BUFFER, guiConfirmGraphic, 0, BOBBYR_CONFIRM_ORDER_X+3, BOBBYR_CONFIRM_ORDER_Y+3);
|
BltVideoObjectOutlineShadowFromIndex( FRAME_BUFFER, guiConfirmGraphic, 0, BOBBYR_CONFIRM_ORDER_X+3, BOBBYR_CONFIRM_ORDER_Y+3);
|
||||||
|
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_CONFIRM_ORDER_X, BOBBYR_CONFIRM_ORDER_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_CONFIRM_ORDER_X, BOBBYR_CONFIRM_ORDER_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
|
|
||||||
gfDrawConfirmOrderGrpahic = FALSE;
|
gfDrawConfirmOrderGrpahic = FALSE;
|
||||||
}
|
}
|
||||||
@@ -600,7 +600,7 @@ void HandleBobbyRMailOrder()
|
|||||||
{
|
{
|
||||||
gfDestroyConfirmGrphiArea = FALSE;
|
gfDestroyConfirmGrphiArea = FALSE;
|
||||||
gfReDrawBobbyOrder = TRUE;
|
gfReDrawBobbyOrder = TRUE;
|
||||||
MSYS_DisableRegion(&gSelectedConfirmOrderRegion);
|
MSYS_DisableRegion(&gSelectedConfirmOrderRegion);
|
||||||
gfCanAcceptOrder = TRUE;
|
gfCanAcceptOrder = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -619,7 +619,7 @@ void HandleBobbyRMailOrder()
|
|||||||
void RenderBobbyRMailOrder()
|
void RenderBobbyRMailOrder()
|
||||||
{
|
{
|
||||||
UINT16 usPosY;
|
UINT16 usPosY;
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
UINT16 usHeight;//usWidth,
|
UINT16 usHeight;//usWidth,
|
||||||
CHAR16 sTemp[ 128 ];
|
CHAR16 sTemp[ 128 ];
|
||||||
|
|
||||||
@@ -629,19 +629,19 @@ void RenderBobbyRMailOrder()
|
|||||||
|
|
||||||
// Order Grid
|
// Order Grid
|
||||||
GetVideoObject(&hPixHandle, guiBobbyROrderGrid);
|
GetVideoObject(&hPixHandle, guiBobbyROrderGrid);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_ORDERGRID_X, BOBBYR_ORDERGRID_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_ORDERGRID_X, BOBBYR_ORDERGRID_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// Location graphic
|
// Location graphic
|
||||||
GetVideoObject(&hPixHandle, guiBobbyRLocationGraphic);
|
GetVideoObject(&hPixHandle, guiBobbyRLocationGraphic);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_LOCATION_BOX_X, BOBBYR_LOCATION_BOX_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_LOCATION_BOX_X, BOBBYR_LOCATION_BOX_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// DeliverySpeedGraphic
|
// DeliverySpeedGraphic
|
||||||
GetVideoObject(&hPixHandle, guiDeliverySpeedGraphic);
|
GetVideoObject(&hPixHandle, guiDeliverySpeedGraphic);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_DELIVERYSPEED_X, BOBBYR_DELIVERYSPEED_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_DELIVERYSPEED_X, BOBBYR_DELIVERYSPEED_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
//Package Weight
|
//Package Weight
|
||||||
GetVideoObject(&hPixHandle, guiPackageWeightImage);
|
GetVideoObject(&hPixHandle, guiPackageWeightImage);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_PACKAXGE_WEIGHT_X, BOBBYR_PACKAXGE_WEIGHT_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_PACKAXGE_WEIGHT_X, BOBBYR_PACKAXGE_WEIGHT_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -715,9 +715,9 @@ void RenderBobbyRMailOrder()
|
|||||||
//Calculate and display the total package weight
|
//Calculate and display the total package weight
|
||||||
DisplayPackageWeight( );
|
DisplayPackageWeight( );
|
||||||
|
|
||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -786,7 +786,7 @@ void BtnBobbyRAcceptOrderCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//else pop up a confirmation box
|
//else pop up a confirmation box
|
||||||
swprintf( zTemp, BobbyROrderFormText[BOBBYR_CONFIRM_DEST], *BobbyROrderLocations[gbSelectedCity].psCityLoc );
|
swprintf( zTemp, BobbyROrderFormText[BOBBYR_CONFIRM_DEST], *BobbyROrderLocations[gbSelectedCity].psCityLoc );
|
||||||
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, zTemp, LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmBobbyRPurchaseMessageBoxCallBack );
|
DoLapTopMessageBox( MSG_BOX_LAPTOP_DEFAULT, zTemp, LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, ConfirmBobbyRPurchaseMessageBoxCallBack );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -831,7 +831,7 @@ void BtnBobbyRAcceptOrderCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
||||||
{
|
{
|
||||||
//copy the purchases into the struct that will be added to the queue
|
//copy the purchases into the struct that will be added to the queue
|
||||||
memcpy(&LaptopSaveInfo.BobbyRayOrdersOnDeliveryArray[ cnt ].BobbyRayPurchase[ ubCount ] , &BobbyRayPurchases[i], sizeof(BobbyRayPurchaseStruct));
|
memcpy(&LaptopSaveInfo.BobbyRayOrdersOnDeliveryArray[ cnt ].BobbyRayPurchase[ ubCount ] , &BobbyRayPurchases[i], sizeof(BobbyRayPurchaseStruct));
|
||||||
ubCount ++;
|
ubCount ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1105,7 +1105,7 @@ void DisplayShippingCosts( BOOLEAN fCalledFromOrderPage, INT32 iSubTotal, UINT16
|
|||||||
if( fCalledFromOrderPage )
|
if( fCalledFromOrderPage )
|
||||||
{
|
{
|
||||||
GetVideoObject(&hPixHandle, guiTotalSaveArea);
|
GetVideoObject(&hPixHandle, guiTotalSaveArea);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_TOTAL_SAVED_AREA_X, BOBBYR_TOTAL_SAVED_AREA_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_TOTAL_SAVED_AREA_X, BOBBYR_TOTAL_SAVED_AREA_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1136,7 +1136,7 @@ void DisplayShippingCosts( BOOLEAN fCalledFromOrderPage, INT32 iSubTotal, UINT16
|
|||||||
DrawTextToScreen(sTemp, (UINT16)(usGridX + BOBBYR_GRID_FIFTH_COLUMN_X-2), (UINT16)(usGridY + BOBBYR_GRAND_TOTAL_Y), BOBBYR_GRID_FIFTH_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
DrawTextToScreen(sTemp, (UINT16)(usGridX + BOBBYR_GRID_FIFTH_COLUMN_X-2), (UINT16)(usGridY + BOBBYR_GRAND_TOTAL_Y), BOBBYR_GRID_FIFTH_COLUMN_WIDTH, BOBBYR_ORDER_DYNAMIC_TEXT_FONT, BOBBYR_ORDER_DYNAMIC_TEXT_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED);
|
||||||
}
|
}
|
||||||
|
|
||||||
InvalidateRegion(iScreenWidthOffset + 333,iScreenHeightOffset + 326,iScreenWidthOffset + 374,iScreenHeightOffset + 400);
|
InvalidateRegion(iScreenWidthOffset + 333,iScreenHeightOffset + 326,iScreenWidthOffset + 374,iScreenHeightOffset + 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1173,7 +1173,7 @@ void BtnBobbyRHomeCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
guiCurrentLaptopMode = LAPTOP_MODE_BOBBY_R;
|
guiCurrentLaptopMode = LAPTOP_MODE_BOBBY_R;
|
||||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
}
|
}
|
||||||
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||||
@@ -1287,7 +1287,7 @@ BOOLEAN CreateDestroyBobbyRDropDown( UINT8 ubDropDownAction )
|
|||||||
for( i=0; i< BOBBYR_NUM_DISPLAYED_CITIES; i++)
|
for( i=0; i< BOBBYR_NUM_DISPLAYED_CITIES; i++)
|
||||||
{
|
{
|
||||||
MSYS_DefineRegion( &gSelectedDropDownRegion[i], usPosX, (UINT16)(usPosY+4), (UINT16)(usPosX+BOBBYR_DROP_DOWN_WIDTH-6), (UINT16)(usPosY+usFontHeight+7), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedDropDownRegion[i], usPosX, (UINT16)(usPosY+4), (UINT16)(usPosX+BOBBYR_DROP_DOWN_WIDTH-6), (UINT16)(usPosY+usFontHeight+7), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, SelectDropDownMovementCallBack, SelectDropDownRegionCallBack);
|
CURSOR_WWW, SelectDropDownMovementCallBack, SelectDropDownRegionCallBack);
|
||||||
MSYS_AddRegion(&gSelectedDropDownRegion[i]);
|
MSYS_AddRegion(&gSelectedDropDownRegion[i]);
|
||||||
MSYS_SetRegionUserData( &gSelectedDropDownRegion[ i ], 0, i);
|
MSYS_SetRegionUserData( &gSelectedDropDownRegion[ i ], 0, i);
|
||||||
|
|
||||||
@@ -1304,7 +1304,7 @@ BOOLEAN CreateDestroyBobbyRDropDown( UINT8 ubDropDownAction )
|
|||||||
for(i=0; i<2; i++)
|
for(i=0; i<2; i++)
|
||||||
{
|
{
|
||||||
MSYS_DefineRegion( &gSelectedUpDownArrowOnScrollAreaRegion[i], usPosX, usPosY, (UINT16)(usPosX+BOBBYR_SCROLL_ARROW_WIDTH), (UINT16)(usPosY+BOBBYR_SCROLL_ARROW_HEIGHT), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedUpDownArrowOnScrollAreaRegion[i], usPosX, usPosY, (UINT16)(usPosX+BOBBYR_SCROLL_ARROW_WIDTH), (UINT16)(usPosY+BOBBYR_SCROLL_ARROW_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectUpDownArrowOnScrollAreaRegionCallBack);
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectUpDownArrowOnScrollAreaRegionCallBack);
|
||||||
MSYS_AddRegion(&gSelectedUpDownArrowOnScrollAreaRegion[i]);
|
MSYS_AddRegion(&gSelectedUpDownArrowOnScrollAreaRegion[i]);
|
||||||
MSYS_SetRegionUserData( &gSelectedUpDownArrowOnScrollAreaRegion[ i ], 0, i);
|
MSYS_SetRegionUserData( &gSelectedUpDownArrowOnScrollAreaRegion[ i ], 0, i);
|
||||||
usPosX = BOBBYR_SCROLL_DOWN_ARROW_X;
|
usPosX = BOBBYR_SCROLL_DOWN_ARROW_X;
|
||||||
@@ -1318,22 +1318,22 @@ BOOLEAN CreateDestroyBobbyRDropDown( UINT8 ubDropDownAction )
|
|||||||
for(i=0; i<BOBBYR_ORDER_NUM_SHIPPING_CITIES-1; i++)
|
for(i=0; i<BOBBYR_ORDER_NUM_SHIPPING_CITIES-1; i++)
|
||||||
{
|
{
|
||||||
MSYS_DefineRegion( &gSelectedScrollAreaDropDownRegion[i], usPosX, usPosY, (UINT16)(usPosX+BOBBYR_SCROLL_ARROW_WIDTH), (UINT16)(usPosY+usHeight), MSYS_PRIORITY_HIGH+1,
|
MSYS_DefineRegion( &gSelectedScrollAreaDropDownRegion[i], usPosX, usPosY, (UINT16)(usPosX+BOBBYR_SCROLL_ARROW_WIDTH), (UINT16)(usPosY+usHeight), MSYS_PRIORITY_HIGH+1,
|
||||||
CURSOR_LAPTOP_SCREEN, SelectScrollAreaDropDownMovementCallBack, SelectScrollAreaDropDownRegionCallBack);
|
CURSOR_LAPTOP_SCREEN, SelectScrollAreaDropDownMovementCallBack, SelectScrollAreaDropDownRegionCallBack);
|
||||||
MSYS_AddRegion(&gSelectedScrollAreaDropDownRegion[i]);
|
MSYS_AddRegion(&gSelectedScrollAreaDropDownRegion[i]);
|
||||||
MSYS_SetRegionUserData( &gSelectedScrollAreaDropDownRegion[ i ], 0, i);
|
MSYS_SetRegionUserData( &gSelectedScrollAreaDropDownRegion[ i ], 0, i);
|
||||||
usPosY += usHeight;
|
usPosY += usHeight;
|
||||||
}
|
}
|
||||||
//put the last one down to cover the remaining area
|
//put the last one down to cover the remaining area
|
||||||
MSYS_DefineRegion( &gSelectedScrollAreaDropDownRegion[i], usPosX, usPosY, (UINT16)(usPosX+BOBBYR_SCROLL_ARROW_WIDTH), BOBBYR_SCROLL_DOWN_ARROW_Y, MSYS_PRIORITY_HIGH+1,
|
MSYS_DefineRegion( &gSelectedScrollAreaDropDownRegion[i], usPosX, usPosY, (UINT16)(usPosX+BOBBYR_SCROLL_ARROW_WIDTH), BOBBYR_SCROLL_DOWN_ARROW_Y, MSYS_PRIORITY_HIGH+1,
|
||||||
CURSOR_LAPTOP_SCREEN, SelectScrollAreaDropDownMovementCallBack, SelectScrollAreaDropDownRegionCallBack);
|
CURSOR_LAPTOP_SCREEN, SelectScrollAreaDropDownMovementCallBack, SelectScrollAreaDropDownRegionCallBack);
|
||||||
MSYS_AddRegion(&gSelectedScrollAreaDropDownRegion[i]);
|
MSYS_AddRegion(&gSelectedScrollAreaDropDownRegion[i]);
|
||||||
MSYS_SetRegionUserData( &gSelectedScrollAreaDropDownRegion[ i ], 0, i);
|
MSYS_SetRegionUserData( &gSelectedScrollAreaDropDownRegion[ i ], 0, i);
|
||||||
|
|
||||||
|
|
||||||
MSYS_EnableRegion(&gSelectedCloseDropDownRegion);
|
MSYS_EnableRegion(&gSelectedCloseDropDownRegion);
|
||||||
|
|
||||||
//disable the clear order and accept order buttons, (their rendering interferes with the drop down graphics)
|
//disable the clear order and accept order buttons, (their rendering interferes with the drop down graphics)
|
||||||
DisableButton(guiBobbyRClearOrder);
|
DisableButton(guiBobbyRClearOrder);
|
||||||
|
|
||||||
//FERAL
|
//FERAL
|
||||||
// if( IsAnythingPurchasedFromBobbyRayPage() )
|
// if( IsAnythingPurchasedFromBobbyRayPage() )
|
||||||
@@ -1352,16 +1352,16 @@ BOOLEAN CreateDestroyBobbyRDropDown( UINT8 ubDropDownAction )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
for( i=0; i< BOBBYR_NUM_DISPLAYED_CITIES; i++)
|
for( i=0; i< BOBBYR_NUM_DISPLAYED_CITIES; i++)
|
||||||
MSYS_RemoveRegion( &gSelectedDropDownRegion[i]);
|
MSYS_RemoveRegion( &gSelectedDropDownRegion[i]);
|
||||||
|
|
||||||
|
|
||||||
//destroy the scroll bars arrow regions
|
//destroy the scroll bars arrow regions
|
||||||
for( i=0; i< 2; i++)
|
for( i=0; i< 2; i++)
|
||||||
MSYS_RemoveRegion( &gSelectedUpDownArrowOnScrollAreaRegion[i]);
|
MSYS_RemoveRegion( &gSelectedUpDownArrowOnScrollAreaRegion[i]);
|
||||||
|
|
||||||
//destroy the scroll bars regions
|
//destroy the scroll bars regions
|
||||||
for( i=0; i<BOBBYR_ORDER_NUM_SHIPPING_CITIES; i++)
|
for( i=0; i<BOBBYR_ORDER_NUM_SHIPPING_CITIES; i++)
|
||||||
MSYS_RemoveRegion( &gSelectedScrollAreaDropDownRegion[i]);
|
MSYS_RemoveRegion( &gSelectedScrollAreaDropDownRegion[i]);
|
||||||
|
|
||||||
//display the name on the title bar
|
//display the name on the title bar
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, BOBBYR_SHIPPING_LOC_AREA_L_X, BOBBYR_SHIPPING_LOC_AREA_T_Y, BOBBYR_SHIPPING_LOC_AREA_L_X+175, BOBBYR_SHIPPING_LOC_AREA_T_Y+BOBBYR_DROP_DOWN_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, BOBBYR_SHIPPING_LOC_AREA_L_X, BOBBYR_SHIPPING_LOC_AREA_T_Y, BOBBYR_SHIPPING_LOC_AREA_L_X+175, BOBBYR_SHIPPING_LOC_AREA_T_Y+BOBBYR_DROP_DOWN_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
@@ -1372,7 +1372,7 @@ BOOLEAN CreateDestroyBobbyRDropDown( UINT8 ubDropDownAction )
|
|||||||
DrawTextToScreen( *(BobbyROrderLocations[gbSelectedCity].psCityLoc), BOBBYR_CITY_START_LOCATION_X+BOBBYR_CITY_NAME_OFFSET, BOBBYR_SHIPPING_LOC_AREA_T_Y+3, 0, BOBBYR_DROPDOWN_FONT, BOBBYR_ORDER_DROP_DOWN_SELEC_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
DrawTextToScreen( *(BobbyROrderLocations[gbSelectedCity].psCityLoc), BOBBYR_CITY_START_LOCATION_X+BOBBYR_CITY_NAME_OFFSET, BOBBYR_SHIPPING_LOC_AREA_T_Y+3, 0, BOBBYR_DROPDOWN_FONT, BOBBYR_ORDER_DROP_DOWN_SELEC_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED );
|
||||||
|
|
||||||
//disable the r\close regiuon
|
//disable the r\close regiuon
|
||||||
MSYS_DisableRegion(&gSelectedCloseDropDownRegion);
|
MSYS_DisableRegion(&gSelectedCloseDropDownRegion);
|
||||||
|
|
||||||
//enable the clear order and accept order buttons, (because their rendering interferes with the drop down graphics)
|
//enable the clear order and accept order buttons, (because their rendering interferes with the drop down graphics)
|
||||||
EnableButton(guiBobbyRClearOrder);
|
EnableButton(guiBobbyRClearOrder);
|
||||||
@@ -1380,11 +1380,11 @@ BOOLEAN CreateDestroyBobbyRDropDown( UINT8 ubDropDownAction )
|
|||||||
// if( IsAnythingPurchasedFromBobbyRayPage() )
|
// if( IsAnythingPurchasedFromBobbyRayPage() )
|
||||||
// {
|
// {
|
||||||
// SpecifyDisabledButtonStyle( guiBobbyRAcceptOrder, DISABLED_STYLE_SHADED );
|
// SpecifyDisabledButtonStyle( guiBobbyRAcceptOrder, DISABLED_STYLE_SHADED );
|
||||||
// EnableButton(guiBobbyRAcceptOrder);
|
// EnableButton(guiBobbyRAcceptOrder);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
gfReDrawBobbyOrder = TRUE;
|
gfReDrawBobbyOrder = TRUE;
|
||||||
fMouseRegionsCreated = FALSE;
|
fMouseRegionsCreated = FALSE;
|
||||||
gubDropDownAction = BR_DROP_DOWN_NO_ACTION;
|
gubDropDownAction = BR_DROP_DOWN_NO_ACTION;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1393,9 +1393,8 @@ BOOLEAN CreateDestroyBobbyRDropDown( UINT8 ubDropDownAction )
|
|||||||
{
|
{
|
||||||
UINT8 i;
|
UINT8 i;
|
||||||
UINT16 usPosY, usPosX;
|
UINT16 usPosY, usPosX;
|
||||||
UINT16 usFontHeight = GetFontHeight( BOBBYR_DROPDOWN_FONT );
|
HVOBJECT hImageHandle;
|
||||||
HVOBJECT hImageHandle;
|
HVOBJECT hArrowHandle;
|
||||||
HVOBJECT hArrowHandle;
|
|
||||||
|
|
||||||
//Display the background for the drop down window
|
//Display the background for the drop down window
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, BOBBYR_CITY_START_LOCATION_X, BOBBYR_CITY_START_LOCATION_Y, BOBBYR_CITY_START_LOCATION_X+BOBBYR_DROP_DOWN_WIDTH, BOBBYR_CITY_START_LOCATION_Y+BOBBYR_SCROLL_AREA_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, BOBBYR_CITY_START_LOCATION_X, BOBBYR_CITY_START_LOCATION_Y, BOBBYR_CITY_START_LOCATION_X+BOBBYR_DROP_DOWN_WIDTH, BOBBYR_CITY_START_LOCATION_Y+BOBBYR_SCROLL_AREA_HEIGHT, Get16BPPColor( FROMRGB( 0, 0, 0 ) ) );
|
||||||
@@ -1479,7 +1478,7 @@ BOOLEAN CreateDestroyBobbyRDropDown( UINT8 ubDropDownAction )
|
|||||||
DrawGoldRectangle( gbSelectedCity );
|
DrawGoldRectangle( gbSelectedCity );
|
||||||
|
|
||||||
|
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1611,7 +1610,7 @@ void DisplayShippingLocationCity()
|
|||||||
|
|
||||||
if( gbSelectedCity != -1 )
|
if( gbSelectedCity != -1 )
|
||||||
{
|
{
|
||||||
swprintf( sTemp, L"%d", ( INT32 )(BobbyROrderLocations[gbSelectedCity].usOverNightExpress/GetWeightBasedOnMetricOption( 1 ) ) );
|
swprintf( sTemp, L"%d", ( INT32 )(BobbyROrderLocations[gbSelectedCity].usOverNightExpress/GetWeightBasedOnMetricOption( 1 ) ) );
|
||||||
InsertCommasForDollarFigure( sTemp );
|
InsertCommasForDollarFigure( sTemp );
|
||||||
InsertDollarSignInToString( sTemp );
|
InsertDollarSignInToString( sTemp );
|
||||||
}
|
}
|
||||||
@@ -1842,8 +1841,8 @@ void SelectUpDownArrowOnScrollAreaRegionCallBack(MOUSE_REGION * pRegion, INT32 i
|
|||||||
|
|
||||||
void DrawGoldRectangle( INT8 bCityNum )
|
void DrawGoldRectangle( INT8 bCityNum )
|
||||||
{
|
{
|
||||||
UINT32 uiDestPitchBYTES;
|
UINT32 uiDestPitchBYTES;
|
||||||
UINT8 *pDestBuf;
|
UINT8 *pDestBuf;
|
||||||
UINT16 usWidth, usTempHeight, usTempPosY, usHeight;
|
UINT16 usWidth, usTempHeight, usTempPosY, usHeight;
|
||||||
UINT16 usPosX, usPosY;
|
UINT16 usPosX, usPosY;
|
||||||
|
|
||||||
@@ -1860,7 +1859,7 @@ void DrawGoldRectangle( INT8 bCityNum )
|
|||||||
|
|
||||||
usHeight = usTempHeight / (BOBBYR_ORDER_NUM_SHIPPING_CITIES+1);
|
usHeight = usTempHeight / (BOBBYR_ORDER_NUM_SHIPPING_CITIES+1);
|
||||||
|
|
||||||
usPosY = usTempPosY + (UINT16)( ( ( BOBBYR_SCROLL_AREA_HEIGHT - 2 * BOBBYR_SCROLL_ARROW_HEIGHT ) / (FLOAT)(BOBBYR_ORDER_NUM_SHIPPING_CITIES +1) ) * bCityNum );
|
usPosY = usTempPosY + (UINT16)( ( ( BOBBYR_SCROLL_AREA_HEIGHT - 2 * BOBBYR_SCROLL_ARROW_HEIGHT ) / (FLOAT)(BOBBYR_ORDER_NUM_SHIPPING_CITIES +1) ) * bCityNum );
|
||||||
|
|
||||||
temp = BOBBYR_SCROLL_AREA_Y + BOBBYR_SCROLL_AREA_HEIGHT - BOBBYR_SCROLL_ARROW_HEIGHT - usHeight - 1;
|
temp = BOBBYR_SCROLL_AREA_Y + BOBBYR_SCROLL_AREA_HEIGHT - BOBBYR_SCROLL_ARROW_HEIGHT - usHeight - 1;
|
||||||
|
|
||||||
@@ -1873,11 +1872,11 @@ void DrawGoldRectangle( INT8 bCityNum )
|
|||||||
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
pDestBuf = LockVideoSurface( FRAME_BUFFER, &uiDestPitchBYTES );
|
||||||
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
SetClippingRegionAndImageWidth( uiDestPitchBYTES, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
|
|
||||||
// draw the gold highlite line on the top and left
|
// draw the gold highlite line on the top and left
|
||||||
LineDraw(FALSE, usPosX, usPosY, usPosX+usWidth, usPosY, Get16BPPColor( FROMRGB( 235, 222, 171 ) ), pDestBuf);
|
LineDraw(FALSE, usPosX, usPosY, usPosX+usWidth, usPosY, Get16BPPColor( FROMRGB( 235, 222, 171 ) ), pDestBuf);
|
||||||
LineDraw(FALSE, usPosX, usPosY, usPosX, usPosY+usHeight, Get16BPPColor( FROMRGB( 235, 222, 171 ) ), pDestBuf);
|
LineDraw(FALSE, usPosX, usPosY, usPosX, usPosY+usHeight, Get16BPPColor( FROMRGB( 235, 222, 171 ) ), pDestBuf);
|
||||||
|
|
||||||
// draw the shadow line on the bottom and right
|
// draw the shadow line on the bottom and right
|
||||||
LineDraw(FALSE, usPosX, usPosY+usHeight, usPosX+usWidth, usPosY+usHeight, Get16BPPColor( FROMRGB( 65, 49, 6 ) ), pDestBuf);
|
LineDraw(FALSE, usPosX, usPosY+usHeight, usPosX+usWidth, usPosY+usHeight, Get16BPPColor( FROMRGB( 65, 49, 6 ) ), pDestBuf);
|
||||||
LineDraw(FALSE, usPosX+usWidth, usPosY, usPosX+usWidth, usPosY+usHeight, Get16BPPColor( FROMRGB( 65, 49, 6 ) ), pDestBuf);
|
LineDraw(FALSE, usPosX+usWidth, usPosY, usPosX+usWidth, usPosY+usHeight, Get16BPPColor( FROMRGB( 65, 49, 6 ) ), pDestBuf);
|
||||||
|
|
||||||
@@ -2046,7 +2045,7 @@ void PurchaseBobbyOrder()
|
|||||||
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
if( BobbyRayPurchases[ i ].ubNumberPurchased )
|
||||||
{
|
{
|
||||||
//copy the purchases into the struct that will be added to the queue
|
//copy the purchases into the struct that will be added to the queue
|
||||||
memcpy(&LaptopSaveInfo.BobbyRayOrdersOnDeliveryArray[ cnt ].BobbyRayPurchase[ ubCount ] , &BobbyRayPurchases[i], sizeof(BobbyRayPurchaseStruct));
|
memcpy(&LaptopSaveInfo.BobbyRayOrdersOnDeliveryArray[ cnt ].BobbyRayPurchase[ ubCount ] , &BobbyRayPurchases[i], sizeof(BobbyRayPurchaseStruct));
|
||||||
ubCount ++;
|
ubCount ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2150,7 +2149,7 @@ void AddJohnsGunShipment()
|
|||||||
void ConfirmBobbyRPurchaseMessageBoxCallBack( UINT8 bExitValue )
|
void ConfirmBobbyRPurchaseMessageBoxCallBack( UINT8 bExitValue )
|
||||||
{
|
{
|
||||||
// yes, load the game
|
// yes, load the game
|
||||||
if( bExitValue == MSG_BOX_RETURN_YES )
|
if( bExitValue == MSG_BOX_RETURN_YES )
|
||||||
{
|
{
|
||||||
PurchaseBobbyOrder();
|
PurchaseBobbyOrder();
|
||||||
}
|
}
|
||||||
@@ -2195,7 +2194,7 @@ UINT32 CalcPackageTotalWeight()
|
|||||||
void DisplayPackageWeight( )
|
void DisplayPackageWeight( )
|
||||||
{
|
{
|
||||||
CHAR16 zTemp[32];
|
CHAR16 zTemp[32];
|
||||||
UINT32 uiTotalWeight = CalcPackageTotalWeight();
|
UINT32 uiTotalWeight = CalcPackageTotalWeight();
|
||||||
// FLOAT fWeight = (FLOAT)(uiTotalWeight / 10.0);
|
// FLOAT fWeight = (FLOAT)(uiTotalWeight / 10.0);
|
||||||
|
|
||||||
//Display the 'Package Weight' text
|
//Display the 'Package Weight' text
|
||||||
@@ -2219,7 +2218,7 @@ void BtnBobbyRGotoShipmentPageCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
guiCurrentLaptopMode = LAPTOP_MODE_BOBBYR_SHIPMENTS;
|
guiCurrentLaptopMode = LAPTOP_MODE_BOBBYR_SHIPMENTS;
|
||||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
}
|
}
|
||||||
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
if(reason & MSYS_CALLBACK_REASON_LOST_MOUSE)
|
||||||
@@ -2232,7 +2231,7 @@ void BtnBobbyRGotoShipmentPageCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
BOOLEAN CreateBobbyRayOrderTitle()
|
BOOLEAN CreateBobbyRayOrderTitle()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
// load BobbyRayTitle graphic and add it
|
// load BobbyRayTitle graphic and add it
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
@@ -2241,7 +2240,7 @@ BOOLEAN CreateBobbyRayOrderTitle()
|
|||||||
|
|
||||||
//the link to home page from the title
|
//the link to home page from the title
|
||||||
MSYS_DefineRegion( &gSelectedTitleLinkRegion, BOBBYR_BOBBY_RAY_TITLE_X, BOBBYR_BOBBY_RAY_TITLE_Y, (BOBBYR_BOBBY_RAY_TITLE_X + BOBBYR_BOBBY_RAY_TITLE_WIDTH), (UINT16)(BOBBYR_BOBBY_RAY_TITLE_Y + BOBBYR_BOBBY_RAY_TITLE_HEIGHT), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedTitleLinkRegion, BOBBYR_BOBBY_RAY_TITLE_X, BOBBYR_BOBBY_RAY_TITLE_Y, (BOBBYR_BOBBY_RAY_TITLE_X + BOBBYR_BOBBY_RAY_TITLE_WIDTH), (UINT16)(BOBBYR_BOBBY_RAY_TITLE_Y + BOBBYR_BOBBY_RAY_TITLE_HEIGHT), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectTitleLinkRegionCallBack);
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectTitleLinkRegionCallBack);
|
||||||
MSYS_AddRegion( &gSelectedTitleLinkRegion );
|
MSYS_AddRegion( &gSelectedTitleLinkRegion );
|
||||||
|
|
||||||
return( TRUE );
|
return( TRUE );
|
||||||
@@ -2255,11 +2254,11 @@ void DestroyBobbyROrderTitle()
|
|||||||
|
|
||||||
void DrawBobbyROrderTitle()
|
void DrawBobbyROrderTitle()
|
||||||
{
|
{
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
|
|
||||||
// Bobbyray title
|
// Bobbyray title
|
||||||
GetVideoObject(&hPixHandle, guiBobbyRayTitle);
|
GetVideoObject(&hPixHandle, guiBobbyRayTitle);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_BOBBY_RAY_TITLE_X, BOBBYR_BOBBY_RAY_TITLE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_BOBBY_RAY_TITLE_X, BOBBYR_BOBBY_RAY_TITLE_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2308,7 +2307,7 @@ BOOLEAN AddNewBobbyRShipment( BobbyRayPurchaseStruct *pPurchaseStruct, UINT8 ubD
|
|||||||
gpNewBobbyrShipments[ iFoundSpot ].fDisplayedInShipmentPage = FALSE;
|
gpNewBobbyrShipments[ iFoundSpot ].fDisplayedInShipmentPage = FALSE;
|
||||||
|
|
||||||
//get the package weight, if the weight is "below" the minimum, use the minimum
|
//get the package weight, if the weight is "below" the minimum, use the minimum
|
||||||
if( uiPackageWeight < MIN_SHIPPING_WEIGHT )
|
if( uiPackageWeight < MIN_SHIPPING_WEIGHT )
|
||||||
{
|
{
|
||||||
gpNewBobbyrShipments[ iFoundSpot ].uiPackageWeight = MIN_SHIPPING_WEIGHT;
|
gpNewBobbyrShipments[ iFoundSpot ].uiPackageWeight = MIN_SHIPPING_WEIGHT;
|
||||||
}
|
}
|
||||||
@@ -2330,7 +2329,7 @@ BOOLEAN AddNewBobbyRShipment( BobbyRayPurchaseStruct *pPurchaseStruct, UINT8 ubD
|
|||||||
memcpy( &gpNewBobbyrShipments[ iFoundSpot ].BobbyRayPurchase[ ubItemCount ], &pPurchaseStruct[i], sizeof( BobbyRayPurchaseStruct ) );
|
memcpy( &gpNewBobbyrShipments[ iFoundSpot ].BobbyRayPurchase[ ubItemCount ], &pPurchaseStruct[i], sizeof( BobbyRayPurchaseStruct ) );
|
||||||
|
|
||||||
//copy the purchases into the struct that will be added to the queue
|
//copy the purchases into the struct that will be added to the queue
|
||||||
// memcpy(&LaptopSaveInfo.BobbyRayOrdersOnDeliveryArray[ cnt ].BobbyRayPurchase[ ubCount ] , &BobbyRayPurchases[i], sizeof(BobbyRayPurchaseStruct));
|
// memcpy(&LaptopSaveInfo.BobbyRayOrdersOnDeliveryArray[ cnt ].BobbyRayPurchase[ ubCount ] , &BobbyRayPurchases[i], sizeof(BobbyRayPurchaseStruct));
|
||||||
ubItemCount++;
|
ubItemCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ void GameInitBobbyRMisc()
|
|||||||
|
|
||||||
BOOLEAN EnterBobbyRMisc()
|
BOOLEAN EnterBobbyRMisc()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
// load the background graphic and add it
|
// load the background graphic and add it
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
@@ -77,7 +77,7 @@ void HandleBobbyRMisc()
|
|||||||
|
|
||||||
void RenderBobbyRMisc()
|
void RenderBobbyRMisc()
|
||||||
{
|
{
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
|
|
||||||
WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiMiscBackground);
|
WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiMiscBackground);
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ void RenderBobbyRMisc()
|
|||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
fReDrawScreenFlag = TRUE;
|
fReDrawScreenFlag = TRUE;
|
||||||
fPausedReDrawScreenFlag = TRUE;
|
fPausedReDrawScreenFlag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,3 +108,4 @@ void RenderBobbyRMisc()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+24
-23
@@ -88,7 +88,7 @@ INT32 giBobbyRShipmentHomeImage;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
MOUSE_REGION gSelectedPreviousShipmentsRegion[BOBBYR_SHIPMENT_NUM_PREVIOUS_SHIPMENTS];
|
MOUSE_REGION gSelectedPreviousShipmentsRegion[BOBBYR_SHIPMENT_NUM_PREVIOUS_SHIPMENTS];
|
||||||
void SelectPreviousShipmentsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
void SelectPreviousShipmentsRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
|
||||||
|
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ void GameInitBobbyRShipments()
|
|||||||
|
|
||||||
BOOLEAN EnterBobbyRShipments()
|
BOOLEAN EnterBobbyRShipments()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
InitBobbyRWoodBackground();
|
InitBobbyRWoodBackground();
|
||||||
|
|
||||||
@@ -127,23 +127,23 @@ BOOLEAN EnterBobbyRShipments()
|
|||||||
CHECKF(AddVideoObject(&VObjectDesc, &guiBobbyRShipmentGrid));
|
CHECKF(AddVideoObject(&VObjectDesc, &guiBobbyRShipmentGrid));
|
||||||
|
|
||||||
|
|
||||||
guiBobbyRShipmentBackImage = LoadButtonImage("LAPTOP\\CatalogueButton.sti", -1,0,-1,1,-1 );
|
guiBobbyRShipmentBackImage = LoadButtonImage("LAPTOP\\CatalogueButton.sti", -1,0,-1,1,-1 );
|
||||||
guiBobbyRShipmetBack = CreateIconAndTextButton( guiBobbyRShipmentBackImage, BobbyROrderFormText[BOBBYR_BACK], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyRShipmetBack = CreateIconAndTextButton( guiBobbyRShipmentBackImage, BobbyROrderFormText[BOBBYR_BACK], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
BOBBYR_SHIPMENT_BACK_BUTTON_X, BOBBYR_SHIPMENT_BACK_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
BOBBYR_SHIPMENT_BACK_BUTTON_X, BOBBYR_SHIPMENT_BACK_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRShipmentBackCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBobbyRShipmentBackCallback);
|
||||||
SetButtonCursor( guiBobbyRShipmetBack, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor( guiBobbyRShipmetBack, CURSOR_LAPTOP_SCREEN);
|
||||||
|
|
||||||
|
|
||||||
giBobbyRShipmentHomeImage = UseLoadedButtonImage( guiBobbyRShipmentBackImage, -1,0,-1,1,-1 );
|
giBobbyRShipmentHomeImage = UseLoadedButtonImage( guiBobbyRShipmentBackImage, -1,0,-1,1,-1 );
|
||||||
guiBobbyRShipmentHome = CreateIconAndTextButton( giBobbyRShipmentHomeImage, BobbyROrderFormText[BOBBYR_HOME], BOBBYR_GUNS_BUTTON_FONT,
|
guiBobbyRShipmentHome = CreateIconAndTextButton( giBobbyRShipmentHomeImage, BobbyROrderFormText[BOBBYR_HOME], BOBBYR_GUNS_BUTTON_FONT,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_ON, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
BOBBYR_GUNS_TEXT_COLOR_OFF, BOBBYR_GUNS_SHADOW_COLOR,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
BOBBYR_SHIPMENT_HOME_BUTTON_X, BOBBYR_SHIPMENT_HOME_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
BOBBYR_SHIPMENT_HOME_BUTTON_X, BOBBYR_SHIPMENT_HOME_BUTTON_Y, BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
DEFAULT_MOVE_CALLBACK, BtnBobbyRShipmentHomeCallback);
|
DEFAULT_MOVE_CALLBACK, BtnBobbyRShipmentHomeCallback);
|
||||||
SetButtonCursor( guiBobbyRShipmentHome, CURSOR_LAPTOP_SCREEN);
|
SetButtonCursor( guiBobbyRShipmentHome, CURSOR_LAPTOP_SCREEN);
|
||||||
|
|
||||||
CreateBobbyRayOrderTitle();
|
CreateBobbyRayOrderTitle();
|
||||||
@@ -195,7 +195,7 @@ void HandleBobbyRShipments()
|
|||||||
|
|
||||||
void RenderBobbyRShipments()
|
void RenderBobbyRShipments()
|
||||||
{
|
{
|
||||||
// HVOBJECT hPixHandle;
|
// HVOBJECT hPixHandle;
|
||||||
|
|
||||||
DrawBobbyRWoodBackground();
|
DrawBobbyRWoodBackground();
|
||||||
|
|
||||||
@@ -222,9 +222,9 @@ void RenderBobbyRShipments()
|
|||||||
DisplayShipmentTitles();
|
DisplayShipmentTitles();
|
||||||
DisplayPreviousShipments();
|
DisplayPreviousShipments();
|
||||||
|
|
||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BtnBobbyRShipmentBackCallback(GUI_BUTTON *btn,INT32 reason)
|
void BtnBobbyRShipmentBackCallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
@@ -261,7 +261,7 @@ void BtnBobbyRShipmentHomeCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
{
|
{
|
||||||
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
btn->uiFlags &= (~BUTTON_CLICKED_ON );
|
||||||
|
|
||||||
guiCurrentLaptopMode = LAPTOP_MODE_BOBBY_R;
|
guiCurrentLaptopMode = LAPTOP_MODE_BOBBY_R;
|
||||||
|
|
||||||
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
InvalidateRegion(btn->Area.RegionTopLeftX, btn->Area.RegionTopLeftY, btn->Area.RegionBottomRightX, btn->Area.RegionBottomRightY);
|
||||||
}
|
}
|
||||||
@@ -275,15 +275,15 @@ void BtnBobbyRShipmentHomeCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
void DisplayShipmentGrid()
|
void DisplayShipmentGrid()
|
||||||
{
|
{
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
|
|
||||||
GetVideoObject(&hPixHandle, guiBobbyRShipmentGrid);
|
GetVideoObject(&hPixHandle, guiBobbyRShipmentGrid);
|
||||||
|
|
||||||
// Shipment Order Grid
|
// Shipment Order Grid
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_SHIPMENT_DELIVERY_GRID_X, BOBBYR_SHIPMENT_DELIVERY_GRID_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_SHIPMENT_DELIVERY_GRID_X, BOBBYR_SHIPMENT_DELIVERY_GRID_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
// Order Grid
|
// Order Grid
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 1, BOBBYR_SHIPMENT_ORDER_GRID_X, BOBBYR_SHIPMENT_ORDER_GRID_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 1, BOBBYR_SHIPMENT_ORDER_GRID_X, BOBBYR_SHIPMENT_ORDER_GRID_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -355,7 +355,7 @@ void CreatePreviousShipmentsMouseRegions()
|
|||||||
for( uiCnt=0; uiCnt<uiNumItems; uiCnt++ )
|
for( uiCnt=0; uiCnt<uiNumItems; uiCnt++ )
|
||||||
{
|
{
|
||||||
MSYS_DefineRegion( &gSelectedPreviousShipmentsRegion[uiCnt], BOBBYR_SHIPMENT_ORDER_NUM_X, usPosY, (UINT16)(BOBBYR_SHIPMENT_ORDER_NUM_X+usWidth), (UINT16)(usPosY+usHeight), MSYS_PRIORITY_HIGH,
|
MSYS_DefineRegion( &gSelectedPreviousShipmentsRegion[uiCnt], BOBBYR_SHIPMENT_ORDER_NUM_X, usPosY, (UINT16)(BOBBYR_SHIPMENT_ORDER_NUM_X+usWidth), (UINT16)(usPosY+usHeight), MSYS_PRIORITY_HIGH,
|
||||||
CURSOR_WWW, MSYS_NO_CALLBACK, SelectPreviousShipmentsRegionCallBack );
|
CURSOR_WWW, MSYS_NO_CALLBACK, SelectPreviousShipmentsRegionCallBack );
|
||||||
MSYS_AddRegion(&gSelectedPreviousShipmentsRegion[uiCnt]);
|
MSYS_AddRegion(&gSelectedPreviousShipmentsRegion[uiCnt]);
|
||||||
MSYS_SetRegionUserData( &gSelectedPreviousShipmentsRegion[uiCnt], 0, uiCnt);
|
MSYS_SetRegionUserData( &gSelectedPreviousShipmentsRegion[uiCnt], 0, uiCnt);
|
||||||
|
|
||||||
@@ -371,7 +371,7 @@ void RemovePreviousShipmentsMouseRegions()
|
|||||||
|
|
||||||
for( uiCnt=0; uiCnt<uiNumItems; uiCnt++ )
|
for( uiCnt=0; uiCnt<uiNumItems; uiCnt++ )
|
||||||
{
|
{
|
||||||
MSYS_RemoveRegion( &gSelectedPreviousShipmentsRegion[uiCnt] );
|
MSYS_RemoveRegion( &gSelectedPreviousShipmentsRegion[uiCnt] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -425,3 +425,4 @@ INT32 CountNumberValidShipmentForTheShipmentsPage()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ void GameInitBobbyRUsed()
|
|||||||
|
|
||||||
BOOLEAN EnterBobbyRUsed()
|
BOOLEAN EnterBobbyRUsed()
|
||||||
{
|
{
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
//gfBigImageMouseRegionCreated = FALSE;
|
//gfBigImageMouseRegionCreated = FALSE;
|
||||||
|
|
||||||
// load the background graphic and add it
|
// load the background graphic and add it
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
@@ -75,7 +75,7 @@ void HandleBobbyRUsed()
|
|||||||
|
|
||||||
void RenderBobbyRUsed()
|
void RenderBobbyRUsed()
|
||||||
{
|
{
|
||||||
HVOBJECT hPixHandle;
|
HVOBJECT hPixHandle;
|
||||||
|
|
||||||
WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiUsedBackground);
|
WebPageTileBackground(BOBBYR_NUM_HORIZONTAL_TILES, BOBBYR_NUM_VERTICAL_TILES, BOBBYR_BACKGROUND_WIDTH, BOBBYR_BACKGROUND_HEIGHT, guiUsedBackground);
|
||||||
|
|
||||||
@@ -84,17 +84,17 @@ void RenderBobbyRUsed()
|
|||||||
|
|
||||||
// GunForm
|
// GunForm
|
||||||
GetVideoObject(&hPixHandle, guiUsedGrid);
|
GetVideoObject(&hPixHandle, guiUsedGrid);
|
||||||
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hPixHandle, 0, BOBBYR_GRIDLOC_X, BOBBYR_GRIDLOC_Y, VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
DisplayItemInfo(BOBBYR_USED_ITEMS, guiCurrentUsedFilterMode);
|
DisplayItemInfo(BOBBYR_USED_ITEMS, guiCurrentUsedFilterMode);
|
||||||
|
|
||||||
UpdateButtonText(guiCurrentLaptopMode);
|
UpdateButtonText(guiCurrentLaptopMode);
|
||||||
UpdateUsedFilterButtons();
|
UpdateUsedFilterButtons();
|
||||||
|
|
||||||
MarkButtonsDirty( );
|
MarkButtonsDirty( );
|
||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
InvalidateRegion(LAPTOP_SCREEN_UL_X,LAPTOP_SCREEN_WEB_UL_Y,LAPTOP_SCREEN_LR_X,LAPTOP_SCREEN_WEB_LR_Y);
|
||||||
fReDrawScreenFlag = TRUE;
|
fReDrawScreenFlag = TRUE;
|
||||||
fPausedReDrawScreenFlag = TRUE;
|
fPausedReDrawScreenFlag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,3 +106,4 @@ void RenderBobbyRUsed()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ void RenderBrokenLink()
|
|||||||
|
|
||||||
void DrawBrokenLinkWhiteBackground()
|
void DrawBrokenLinkWhiteBackground()
|
||||||
{
|
{
|
||||||
ColorFillVideoSurfaceArea( FRAME_BUFFER, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y, LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y, Get16BPPColor( FROMRGB( 255, 255, 255) ) );
|
ColorFillVideoSurfaceArea( FRAME_BUFFER, LAPTOP_SCREEN_UL_X, LAPTOP_SCREEN_WEB_UL_Y, LAPTOP_SCREEN_LR_X, LAPTOP_SCREEN_WEB_LR_Y, Get16BPPColor( FROMRGB( 255, 255, 255) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -70,3 +70,4 @@ void DrawBrokenLinkWhiteBackground()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+280
-279
@@ -119,7 +119,7 @@ void GameInitCharProfile()
|
|||||||
void EnterCharProfile()
|
void EnterCharProfile()
|
||||||
{
|
{
|
||||||
// reset previous page
|
// reset previous page
|
||||||
iPreviousImpPage = -1;
|
iPreviousImpPage = -1;
|
||||||
|
|
||||||
// grab the graphics
|
// grab the graphics
|
||||||
LoadImpGraphics( );
|
LoadImpGraphics( );
|
||||||
@@ -127,7 +127,7 @@ void EnterCharProfile()
|
|||||||
|
|
||||||
void ExitCharProfile()
|
void ExitCharProfile()
|
||||||
{
|
{
|
||||||
// get rid of graphics
|
// get rid of graphics
|
||||||
RemoveImpGraphics( );
|
RemoveImpGraphics( );
|
||||||
|
|
||||||
// clean up past mode
|
// clean up past mode
|
||||||
@@ -137,9 +137,9 @@ void ExitCharProfile()
|
|||||||
void HandleCharProfile()
|
void HandleCharProfile()
|
||||||
{
|
{
|
||||||
if( fReDrawCharProfile )
|
if( fReDrawCharProfile )
|
||||||
{
|
{
|
||||||
// re draw
|
// re draw
|
||||||
RenderCharProfile( );
|
RenderCharProfile( );
|
||||||
fReDrawCharProfile = FALSE;
|
fReDrawCharProfile = FALSE;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -181,76 +181,76 @@ void HandleCharProfile()
|
|||||||
|
|
||||||
if( fButtonPendingFlag == TRUE )
|
if( fButtonPendingFlag == TRUE )
|
||||||
{
|
{
|
||||||
// render screen
|
// render screen
|
||||||
RenderCharProfile( );
|
RenderCharProfile( );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// exity old mode
|
// exity old mode
|
||||||
ExitOldIMPMode( );
|
ExitOldIMPMode( );
|
||||||
|
|
||||||
// set previous page
|
// set previous page
|
||||||
iPreviousImpPage = iCurrentImpPage;
|
iPreviousImpPage = iCurrentImpPage;
|
||||||
|
|
||||||
// enter new
|
// enter new
|
||||||
EnterNewIMPMode( );
|
EnterNewIMPMode( );
|
||||||
|
|
||||||
|
|
||||||
// render screen
|
// render screen
|
||||||
RenderCharProfile( );
|
RenderCharProfile( );
|
||||||
|
|
||||||
// render title bar
|
// render title bar
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle
|
// handle
|
||||||
switch( iCurrentImpPage )
|
switch( iCurrentImpPage )
|
||||||
{
|
{
|
||||||
case( IMP_HOME_PAGE ):
|
case( IMP_HOME_PAGE ):
|
||||||
HandleImpHomePage( );
|
HandleImpHomePage( );
|
||||||
break;
|
break;
|
||||||
case( IMP_BEGIN ):
|
case( IMP_BEGIN ):
|
||||||
HandleIMPBeginScreen( );
|
HandleIMPBeginScreen( );
|
||||||
break;
|
break;
|
||||||
case( IMP_PERSONALITY ):
|
case( IMP_PERSONALITY ):
|
||||||
HandleIMPPersonalityEntrance( );
|
HandleIMPPersonalityEntrance( );
|
||||||
break;
|
break;
|
||||||
case( IMP_PERSONALITY_QUIZ ):
|
case( IMP_PERSONALITY_QUIZ ):
|
||||||
HandleIMPSkillTrait( );
|
HandleIMPSkillTrait( );
|
||||||
break;
|
break;
|
||||||
case( IMP_PERSONALITY_FINISH ):
|
case( IMP_PERSONALITY_FINISH ):
|
||||||
HandleIMPPersonalityFinish( );
|
HandleIMPPersonalityFinish( );
|
||||||
break;
|
break;
|
||||||
case( IMP_ATTRIBUTE_ENTRANCE ):
|
case( IMP_ATTRIBUTE_ENTRANCE ):
|
||||||
HandleIMPAttributeEntrance( );
|
HandleIMPAttributeEntrance( );
|
||||||
break;
|
break;
|
||||||
case( IMP_ATTRIBUTE_PAGE ):
|
case( IMP_ATTRIBUTE_PAGE ):
|
||||||
HandleIMPAttributeSelection( );
|
HandleIMPAttributeSelection( );
|
||||||
break;
|
break;
|
||||||
case( IMP_ATTRIBUTE_FINISH ):
|
case( IMP_ATTRIBUTE_FINISH ):
|
||||||
HandleIMPAttributeFinish( );
|
HandleIMPAttributeFinish( );
|
||||||
break;
|
break;
|
||||||
case( IMP_PORTRAIT ):
|
case( IMP_PORTRAIT ):
|
||||||
HandleIMPPortraits( );
|
HandleIMPPortraits( );
|
||||||
break;
|
break;
|
||||||
case( IMP_VOICE ):
|
case( IMP_VOICE ):
|
||||||
HandleIMPVoices( );
|
HandleIMPVoices( );
|
||||||
break;
|
break;
|
||||||
case( IMP_FINISH ):
|
case( IMP_FINISH ):
|
||||||
HandleIMPFinish( );
|
HandleIMPFinish( );
|
||||||
break;
|
break;
|
||||||
case( IMP_ABOUT_US ):
|
case( IMP_ABOUT_US ):
|
||||||
HandleIMPAboutUs( );
|
HandleIMPAboutUs( );
|
||||||
break;
|
break;
|
||||||
case( IMP_MAIN_PAGE ):
|
case( IMP_MAIN_PAGE ):
|
||||||
HandleIMPMainPage( );
|
HandleIMPMainPage( );
|
||||||
break;
|
break;
|
||||||
case( IMP_CONFIRM ):
|
case( IMP_CONFIRM ):
|
||||||
HandleIMPConfirm( );
|
HandleIMPConfirm( );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -259,142 +259,142 @@ void RenderCharProfile()
|
|||||||
{
|
{
|
||||||
// button is waiting to go up?...do nothing,
|
// button is waiting to go up?...do nothing,
|
||||||
|
|
||||||
if( fButtonPendingFlag )
|
if( fButtonPendingFlag )
|
||||||
{
|
{
|
||||||
fPausedReDrawScreenFlag = TRUE;
|
fPausedReDrawScreenFlag = TRUE;
|
||||||
fButtonPendingFlag = FALSE;
|
fButtonPendingFlag = FALSE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( iCurrentImpPage )
|
switch( iCurrentImpPage )
|
||||||
{
|
{
|
||||||
case( IMP_HOME_PAGE ):
|
case( IMP_HOME_PAGE ):
|
||||||
RenderImpHomePage( );
|
RenderImpHomePage( );
|
||||||
break;
|
|
||||||
case( IMP_BEGIN ):
|
|
||||||
RenderIMPBeginScreen( );
|
|
||||||
break;
|
|
||||||
case( IMP_PERSONALITY ):
|
|
||||||
RenderIMPPersonalityEntrance( );
|
|
||||||
break;
|
|
||||||
case( IMP_PERSONALITY_QUIZ ):
|
|
||||||
RenderIMPSkillTrait( );
|
|
||||||
break;
|
break;
|
||||||
case( IMP_PERSONALITY_FINISH ):
|
case( IMP_BEGIN ):
|
||||||
RenderIMPPersonalityFinish( );
|
RenderIMPBeginScreen( );
|
||||||
break;
|
break;
|
||||||
case( IMP_ATTRIBUTE_ENTRANCE ):
|
case( IMP_PERSONALITY ):
|
||||||
RenderIMPAttributeEntrance( );
|
RenderIMPPersonalityEntrance( );
|
||||||
break;
|
break;
|
||||||
case( IMP_ATTRIBUTE_PAGE ):
|
case( IMP_PERSONALITY_QUIZ ):
|
||||||
RenderIMPAttributeSelection( );
|
RenderIMPSkillTrait( );
|
||||||
break;
|
break;
|
||||||
case( IMP_ATTRIBUTE_FINISH ):
|
case( IMP_PERSONALITY_FINISH ):
|
||||||
RenderIMPAttributeFinish( );
|
RenderIMPPersonalityFinish( );
|
||||||
break;
|
break;
|
||||||
case( IMP_PORTRAIT ):
|
case( IMP_ATTRIBUTE_ENTRANCE ):
|
||||||
RenderIMPPortraits( );
|
RenderIMPAttributeEntrance( );
|
||||||
break;
|
break;
|
||||||
case( IMP_VOICE ):
|
case( IMP_ATTRIBUTE_PAGE ):
|
||||||
RenderIMPVoices( );
|
RenderIMPAttributeSelection( );
|
||||||
break;
|
break;
|
||||||
case( IMP_FINISH ):
|
case( IMP_ATTRIBUTE_FINISH ):
|
||||||
RenderIMPFinish( );
|
RenderIMPAttributeFinish( );
|
||||||
break;
|
break;
|
||||||
case( IMP_ABOUT_US ):
|
case( IMP_PORTRAIT ):
|
||||||
RenderIMPAboutUs( );
|
RenderIMPPortraits( );
|
||||||
break;
|
break;
|
||||||
case( IMP_MAIN_PAGE ):
|
case( IMP_VOICE ):
|
||||||
RenderIMPMainPage( );
|
RenderIMPVoices( );
|
||||||
break;
|
break;
|
||||||
case( IMP_CONFIRM ):
|
case( IMP_FINISH ):
|
||||||
RenderIMPConfirm( );
|
RenderIMPFinish( );
|
||||||
break;
|
break;
|
||||||
}
|
case( IMP_ABOUT_US ):
|
||||||
|
RenderIMPAboutUs( );
|
||||||
|
break;
|
||||||
|
case( IMP_MAIN_PAGE ):
|
||||||
|
RenderIMPMainPage( );
|
||||||
|
break;
|
||||||
|
case( IMP_CONFIRM ):
|
||||||
|
RenderIMPConfirm( );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// render title bar
|
// render title bar
|
||||||
//RenderWWWProgramTitleBar( );
|
//RenderWWWProgramTitleBar( );
|
||||||
|
|
||||||
// render the text
|
// render the text
|
||||||
PrintImpText( );
|
PrintImpText( );
|
||||||
|
|
||||||
RenderWWWProgramTitleBar( );
|
RenderWWWProgramTitleBar( );
|
||||||
|
|
||||||
DisplayProgramBoundingBox( TRUE );
|
DisplayProgramBoundingBox( TRUE );
|
||||||
|
|
||||||
//InvalidateRegion( 0, 0, 640, 480 );
|
//InvalidateRegion( 0, 0, 640, 480 );
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ExitOldIMPMode( void )
|
void ExitOldIMPMode( void )
|
||||||
{
|
{
|
||||||
// exit old mode
|
// exit old mode
|
||||||
|
|
||||||
if( iPreviousImpPage == -1 )
|
if( iPreviousImpPage == -1 )
|
||||||
{
|
{
|
||||||
// don't both, leave
|
// don't both, leave
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
// remove old mode
|
// remove old mode
|
||||||
switch( iPreviousImpPage )
|
switch( iPreviousImpPage )
|
||||||
{
|
{
|
||||||
case( IMP_HOME_PAGE ):
|
case( IMP_HOME_PAGE ):
|
||||||
ExitImpHomePage( );
|
ExitImpHomePage( );
|
||||||
break;
|
break;
|
||||||
case( IMP_BEGIN ):
|
case( IMP_BEGIN ):
|
||||||
DestroyIMPButtons( );
|
|
||||||
ExitIMPBeginScreen( );
|
|
||||||
break;
|
|
||||||
case( IMP_FINISH ):
|
|
||||||
DestroyIMPButtons( );
|
|
||||||
ExitIMPFinish( );
|
|
||||||
break;
|
|
||||||
case( IMP_PERSONALITY ):
|
|
||||||
DestroyIMPButtons( );
|
DestroyIMPButtons( );
|
||||||
ExitIMPPersonalityEntrance( );
|
ExitIMPBeginScreen( );
|
||||||
break;
|
break;
|
||||||
case( IMP_PERSONALITY_QUIZ ):
|
case( IMP_FINISH ):
|
||||||
DestroyIMPButtons( );
|
DestroyIMPButtons( );
|
||||||
// ExitIMPPersonalityQuiz( );
|
ExitIMPFinish( );
|
||||||
ExitIMPSkillTrait( );
|
break;
|
||||||
break;
|
case( IMP_PERSONALITY ):
|
||||||
case( IMP_PERSONALITY_FINISH ):
|
DestroyIMPButtons( );
|
||||||
DestroyIMPButtons( );
|
ExitIMPPersonalityEntrance( );
|
||||||
ExitIMPPersonalityFinish( );
|
break;
|
||||||
break;
|
case( IMP_PERSONALITY_QUIZ ):
|
||||||
case( IMP_ATTRIBUTE_ENTRANCE ):
|
DestroyIMPButtons( );
|
||||||
DestroyIMPButtons( );
|
// ExitIMPPersonalityQuiz( );
|
||||||
ExitIMPAttributeEntrance( );
|
ExitIMPSkillTrait( );
|
||||||
break;
|
break;
|
||||||
case( IMP_ATTRIBUTE_PAGE ):
|
case( IMP_PERSONALITY_FINISH ):
|
||||||
DestroyIMPButtons( );
|
DestroyIMPButtons( );
|
||||||
ExitIMPAttributeSelection( );
|
ExitIMPPersonalityFinish( );
|
||||||
break;
|
break;
|
||||||
case( IMP_ATTRIBUTE_FINISH ):
|
case( IMP_ATTRIBUTE_ENTRANCE ):
|
||||||
DestroyIMPButtons( );
|
DestroyIMPButtons( );
|
||||||
ExitIMPAttributeFinish( );
|
ExitIMPAttributeEntrance( );
|
||||||
break;
|
break;
|
||||||
case( IMP_PORTRAIT ):
|
case( IMP_ATTRIBUTE_PAGE ):
|
||||||
DestroyIMPButtons( );
|
DestroyIMPButtons( );
|
||||||
ExitIMPPortraits( );
|
ExitIMPAttributeSelection( );
|
||||||
break;
|
break;
|
||||||
case( IMP_VOICE ):
|
case( IMP_ATTRIBUTE_FINISH ):
|
||||||
DestroyIMPButtons( );
|
DestroyIMPButtons( );
|
||||||
ExitIMPVoices( );
|
ExitIMPAttributeFinish( );
|
||||||
break;
|
break;
|
||||||
case( IMP_ABOUT_US ):
|
case( IMP_PORTRAIT ):
|
||||||
ExitIMPAboutUs( );
|
DestroyIMPButtons( );
|
||||||
break;
|
ExitIMPPortraits( );
|
||||||
case( IMP_MAIN_PAGE ):
|
break;
|
||||||
ExitIMPMainPage( );
|
case( IMP_VOICE ):
|
||||||
break;
|
DestroyIMPButtons( );
|
||||||
case( IMP_CONFIRM ):
|
ExitIMPVoices( );
|
||||||
ExitIMPConfirm( );
|
break;
|
||||||
break;
|
case( IMP_ABOUT_US ):
|
||||||
}
|
ExitIMPAboutUs( );
|
||||||
|
break;
|
||||||
|
case( IMP_MAIN_PAGE ):
|
||||||
|
ExitIMPMainPage( );
|
||||||
|
break;
|
||||||
|
case( IMP_CONFIRM ):
|
||||||
|
ExitIMPConfirm( );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -403,64 +403,64 @@ void ExitOldIMPMode( void )
|
|||||||
|
|
||||||
void EnterNewIMPMode( void )
|
void EnterNewIMPMode( void )
|
||||||
{
|
{
|
||||||
// enter new mode
|
// enter new mode
|
||||||
|
|
||||||
switch( iCurrentImpPage )
|
switch( iCurrentImpPage )
|
||||||
{
|
{
|
||||||
case( IMP_HOME_PAGE ):
|
case( IMP_HOME_PAGE ):
|
||||||
EnterImpHomePage( );
|
EnterImpHomePage( );
|
||||||
break;
|
break;
|
||||||
case( IMP_BEGIN ):
|
case( IMP_BEGIN ):
|
||||||
|
CreateIMPButtons( );
|
||||||
|
EnterIMPBeginScreen( );
|
||||||
|
break;
|
||||||
|
case( IMP_FINISH ):
|
||||||
|
CreateIMPButtons( );
|
||||||
|
EnterIMPFinish( );
|
||||||
|
break;
|
||||||
|
case( IMP_PERSONALITY ):
|
||||||
|
CreateIMPButtons( );
|
||||||
|
EnterIMPPersonalityEntrance( );
|
||||||
|
break;
|
||||||
|
case( IMP_PERSONALITY_QUIZ ):
|
||||||
|
CreateIMPButtons( );
|
||||||
|
// EnterIMPPersonalityQuiz( );
|
||||||
|
EnterIMPSkillTrait( );
|
||||||
|
break;
|
||||||
|
case( IMP_PERSONALITY_FINISH ):
|
||||||
|
CreateIMPButtons( );
|
||||||
|
EnterIMPPersonalityFinish( );
|
||||||
|
break;
|
||||||
|
case( IMP_ATTRIBUTE_ENTRANCE ):
|
||||||
|
CreateIMPButtons( );
|
||||||
|
EnterIMPAttributeEntrance( );
|
||||||
|
break;
|
||||||
|
case( IMP_ATTRIBUTE_PAGE ):
|
||||||
CreateIMPButtons( );
|
CreateIMPButtons( );
|
||||||
EnterIMPBeginScreen( );
|
EnterIMPAttributeSelection( );
|
||||||
break;
|
break;
|
||||||
case( IMP_FINISH ):
|
case( IMP_ATTRIBUTE_FINISH ):
|
||||||
CreateIMPButtons( );
|
CreateIMPButtons( );
|
||||||
EnterIMPFinish( );
|
EnterIMPAttributeFinish( );
|
||||||
break;
|
break;
|
||||||
case( IMP_PERSONALITY ):
|
case( IMP_PORTRAIT ):
|
||||||
CreateIMPButtons( );
|
CreateIMPButtons( );
|
||||||
EnterIMPPersonalityEntrance( );
|
EnterIMPPortraits( );
|
||||||
break;
|
break;
|
||||||
case( IMP_PERSONALITY_QUIZ ):
|
case( IMP_VOICE ):
|
||||||
CreateIMPButtons( );
|
CreateIMPButtons( );
|
||||||
// EnterIMPPersonalityQuiz( );
|
EnterIMPVoices( );
|
||||||
EnterIMPSkillTrait( );
|
break;
|
||||||
break;
|
case( IMP_ABOUT_US ):
|
||||||
case( IMP_PERSONALITY_FINISH ):
|
EnterIMPAboutUs( );
|
||||||
CreateIMPButtons( );
|
break;
|
||||||
EnterIMPPersonalityFinish( );
|
case( IMP_MAIN_PAGE ):
|
||||||
break;
|
EnterIMPMainPage( );
|
||||||
case( IMP_ATTRIBUTE_ENTRANCE ):
|
break;
|
||||||
CreateIMPButtons( );
|
case( IMP_CONFIRM ):
|
||||||
EnterIMPAttributeEntrance( );
|
EnterIMPConfirm( );
|
||||||
break;
|
break;
|
||||||
case( IMP_ATTRIBUTE_PAGE ):
|
}
|
||||||
CreateIMPButtons( );
|
|
||||||
EnterIMPAttributeSelection( );
|
|
||||||
break;
|
|
||||||
case( IMP_ATTRIBUTE_FINISH ):
|
|
||||||
CreateIMPButtons( );
|
|
||||||
EnterIMPAttributeFinish( );
|
|
||||||
break;
|
|
||||||
case( IMP_PORTRAIT ):
|
|
||||||
CreateIMPButtons( );
|
|
||||||
EnterIMPPortraits( );
|
|
||||||
break;
|
|
||||||
case( IMP_VOICE ):
|
|
||||||
CreateIMPButtons( );
|
|
||||||
EnterIMPVoices( );
|
|
||||||
break;
|
|
||||||
case( IMP_ABOUT_US ):
|
|
||||||
EnterIMPAboutUs( );
|
|
||||||
break;
|
|
||||||
case( IMP_MAIN_PAGE ):
|
|
||||||
EnterIMPMainPage( );
|
|
||||||
break;
|
|
||||||
case( IMP_CONFIRM ):
|
|
||||||
EnterIMPConfirm( );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -470,29 +470,29 @@ void EnterNewIMPMode( void )
|
|||||||
|
|
||||||
void ResetCharacterStats( void )
|
void ResetCharacterStats( void )
|
||||||
{
|
{
|
||||||
// attributes
|
// attributes
|
||||||
iStrength = 55;
|
iStrength = 55;
|
||||||
iDexterity = 55;
|
iDexterity = 55;
|
||||||
iAgility = 55;
|
iAgility = 55;
|
||||||
iWisdom = 55;
|
iWisdom = 55;
|
||||||
iLeadership =55;
|
iLeadership =55;
|
||||||
iHealth = 55;
|
iHealth = 55;
|
||||||
|
|
||||||
// skills
|
|
||||||
iMarksmanship = 55;
|
|
||||||
iMedical = 55;
|
|
||||||
iExplosives = 55;
|
|
||||||
iMechanical = 55;
|
|
||||||
|
|
||||||
// skills
|
// skills
|
||||||
iSkillA = 0;
|
iMarksmanship = 55;
|
||||||
iSkillB = 0;
|
iMedical = 55;
|
||||||
|
iExplosives = 55;
|
||||||
|
iMechanical = 55;
|
||||||
|
|
||||||
// personality
|
// skills
|
||||||
iPersonality = 0;
|
iSkillA = 0;
|
||||||
|
iSkillB = 0;
|
||||||
|
|
||||||
// attitude
|
// personality
|
||||||
iAttitude = 0;
|
iPersonality = 0;
|
||||||
|
|
||||||
|
// attitude
|
||||||
|
iAttitude = 0;
|
||||||
|
|
||||||
// names
|
// names
|
||||||
memset( &pFullName, 0 , sizeof( pFullName) );
|
memset( &pFullName, 0 , sizeof( pFullName) );
|
||||||
@@ -517,7 +517,7 @@ void LoadImpGraphics( void )
|
|||||||
LoadAttributeGraphBar( );
|
LoadAttributeGraphBar( );
|
||||||
|
|
||||||
LoadFullNameIndent( );
|
LoadFullNameIndent( );
|
||||||
LoadNameIndent( );
|
LoadNameIndent( );
|
||||||
LoadGenderIndent( );
|
LoadGenderIndent( );
|
||||||
LoadNickNameIndent( );
|
LoadNickNameIndent( );
|
||||||
|
|
||||||
@@ -531,7 +531,7 @@ void LoadImpGraphics( void )
|
|||||||
|
|
||||||
LoadButton2Image( );
|
LoadButton2Image( );
|
||||||
LoadButton4Image( );
|
LoadButton4Image( );
|
||||||
LoadButton1Image( );
|
LoadButton1Image( );
|
||||||
|
|
||||||
LoadPortraitFrame( );
|
LoadPortraitFrame( );
|
||||||
LoadMainIndentFrame( );
|
LoadMainIndentFrame( );
|
||||||
@@ -540,13 +540,13 @@ void LoadImpGraphics( void )
|
|||||||
LoadQtnShortIndentFrame( );
|
LoadQtnShortIndentFrame( );
|
||||||
LoadQtnLongIndentHighFrame( );
|
LoadQtnLongIndentHighFrame( );
|
||||||
LoadQtnShortIndentHighFrame( );
|
LoadQtnShortIndentHighFrame( );
|
||||||
LoadQtnShort2IndentFrame( );
|
LoadQtnShort2IndentFrame( );
|
||||||
LoadQtnShort2IndentHighFrame( );
|
LoadQtnShort2IndentHighFrame( );
|
||||||
|
|
||||||
LoadQtnIndentFrame( );
|
LoadQtnIndentFrame( );
|
||||||
LoadAttrib1IndentFrame( );
|
LoadAttrib1IndentFrame( );
|
||||||
LoadAttrib2IndentFrame( );
|
LoadAttrib2IndentFrame( );
|
||||||
LoadAvgMercIndentFrame( );
|
LoadAvgMercIndentFrame( );
|
||||||
LoadAboutUsIndentFrame( );
|
LoadAboutUsIndentFrame( );
|
||||||
|
|
||||||
|
|
||||||
@@ -558,7 +558,7 @@ void RemoveImpGraphics( void )
|
|||||||
{
|
{
|
||||||
// remove all graphics needed for IMP
|
// remove all graphics needed for IMP
|
||||||
|
|
||||||
RemoveProfileBackGround( );
|
RemoveProfileBackGround( );
|
||||||
DeleteIMPSymbol( );
|
DeleteIMPSymbol( );
|
||||||
DeleteBeginIndent( );
|
DeleteBeginIndent( );
|
||||||
DeleteActivationIndent( );
|
DeleteActivationIndent( );
|
||||||
@@ -568,7 +568,7 @@ void RemoveImpGraphics( void )
|
|||||||
DeleteAttributeBarGraph( );
|
DeleteAttributeBarGraph( );
|
||||||
|
|
||||||
DeleteFullNameIndent( );
|
DeleteFullNameIndent( );
|
||||||
DeleteNameIndent( );
|
DeleteNameIndent( );
|
||||||
DeleteGenderIndent( );
|
DeleteGenderIndent( );
|
||||||
DeleteNickNameIndent( );
|
DeleteNickNameIndent( );
|
||||||
|
|
||||||
@@ -582,7 +582,7 @@ void RemoveImpGraphics( void )
|
|||||||
|
|
||||||
DeleteButton2Image( );
|
DeleteButton2Image( );
|
||||||
DeleteButton4Image( );
|
DeleteButton4Image( );
|
||||||
DeleteButton1Image( );
|
DeleteButton1Image( );
|
||||||
|
|
||||||
DeletePortraitFrame( );
|
DeletePortraitFrame( );
|
||||||
DeleteMainIndentFrame( );
|
DeleteMainIndentFrame( );
|
||||||
@@ -591,31 +591,31 @@ void RemoveImpGraphics( void )
|
|||||||
DeleteQtnShortIndentFrame( );
|
DeleteQtnShortIndentFrame( );
|
||||||
DeleteQtnLongIndentHighFrame( );
|
DeleteQtnLongIndentHighFrame( );
|
||||||
DeleteQtnShortIndentHighFrame( );
|
DeleteQtnShortIndentHighFrame( );
|
||||||
DeleteQtnShort2IndentFrame( );
|
DeleteQtnShort2IndentFrame( );
|
||||||
DeleteQtnShort2IndentHighFrame( );
|
DeleteQtnShort2IndentHighFrame( );
|
||||||
|
|
||||||
DeleteQtnIndentFrame( );
|
DeleteQtnIndentFrame( );
|
||||||
DeleteAttrib1IndentFrame( );
|
DeleteAttrib1IndentFrame( );
|
||||||
DeleteAttrib2IndentFrame( );
|
DeleteAttrib2IndentFrame( );
|
||||||
DeleteAvgMercIndentFrame( );
|
DeleteAvgMercIndentFrame( );
|
||||||
DeleteAboutUsIndentFrame( );
|
DeleteAboutUsIndentFrame( );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateIMPButtons( void )
|
void CreateIMPButtons( void )
|
||||||
{
|
{
|
||||||
// create all the buttons global to the IMP system
|
// create all the buttons global to the IMP system
|
||||||
|
|
||||||
giIMPButtonImage[ 0 ] = LoadButtonImage( "LAPTOP\\button_3.sti" ,-1,0,-1,1,-1 );
|
giIMPButtonImage[ 0 ] = LoadButtonImage( "LAPTOP\\button_3.sti" ,-1,0,-1,1,-1 );
|
||||||
|
|
||||||
|
|
||||||
// cancel
|
// cancel
|
||||||
giIMPButton[0] = CreateIconAndTextButton( giIMPButtonImage[0], pImpButtonText[ 19 ], FONT12ARIAL,
|
giIMPButton[0] = CreateIconAndTextButton( giIMPButtonImage[0], pImpButtonText[ 19 ], FONT12ARIAL,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
LAPTOP_SCREEN_UL_X + 15, LAPTOP_SCREEN_WEB_UL_Y + ( 360 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
LAPTOP_SCREEN_UL_X + 15, LAPTOP_SCREEN_WEB_UL_Y + ( 360 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPCancelCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPCancelCallback);
|
||||||
|
|
||||||
SpecifyButtonTextSubOffsets( giIMPButton[0], 0, -1, FALSE );
|
SpecifyButtonTextSubOffsets( giIMPButton[0], 0, -1, FALSE );
|
||||||
|
|
||||||
@@ -627,22 +627,22 @@ void CreateIMPButtons( void )
|
|||||||
|
|
||||||
void DestroyIMPButtons( void )
|
void DestroyIMPButtons( void )
|
||||||
{
|
{
|
||||||
// destroy the buttons we created
|
// destroy the buttons we created
|
||||||
RemoveButton(giIMPButton[0] );
|
RemoveButton(giIMPButton[0] );
|
||||||
UnloadButtonImage(giIMPButtonImage[0] );
|
UnloadButtonImage(giIMPButtonImage[0] );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BtnIMPCancelCallback(GUI_BUTTON *btn,INT32 reason)
|
void BtnIMPCancelCallback(GUI_BUTTON *btn,INT32 reason)
|
||||||
{
|
{
|
||||||
// btn callback for IMP cancel button
|
// btn callback for IMP cancel button
|
||||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
@@ -655,28 +655,28 @@ void BtnIMPCancelCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
// back to the main page, otherwise, back to home page
|
// back to the main page, otherwise, back to home page
|
||||||
if( iCurrentImpPage == IMP_MAIN_PAGE )
|
if( iCurrentImpPage == IMP_MAIN_PAGE )
|
||||||
{
|
{
|
||||||
iCurrentImpPage = IMP_HOME_PAGE;
|
iCurrentImpPage = IMP_HOME_PAGE;
|
||||||
fButtonPendingFlag = TRUE;
|
fButtonPendingFlag = TRUE;
|
||||||
iCurrentProfileMode = 0;
|
iCurrentProfileMode = 0;
|
||||||
fFinishedCharGeneration = FALSE;
|
fFinishedCharGeneration = FALSE;
|
||||||
ResetCharacterStats( );
|
ResetCharacterStats( );
|
||||||
}
|
}
|
||||||
else if( iCurrentImpPage == IMP_FINISH )
|
else if( iCurrentImpPage == IMP_FINISH )
|
||||||
{
|
{
|
||||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||||
iCurrentProfileMode = 4;
|
iCurrentProfileMode = 4;
|
||||||
fFinishedCharGeneration = FALSE;
|
fFinishedCharGeneration = FALSE;
|
||||||
fButtonPendingFlag = TRUE;
|
fButtonPendingFlag = TRUE;
|
||||||
//iCurrentProfileMode = 0;
|
//iCurrentProfileMode = 0;
|
||||||
//fFinishedCharGeneration = FALSE;
|
//fFinishedCharGeneration = FALSE;
|
||||||
//ResetCharacterStats( );
|
//ResetCharacterStats( );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if( iCurrentImpPage == IMP_PERSONALITY_QUIZ || iCurrentImpPage == IMP_PERSONALITY_FINISH)
|
else if( iCurrentImpPage == IMP_PERSONALITY_QUIZ || iCurrentImpPage == IMP_PERSONALITY_FINISH)
|
||||||
{
|
{
|
||||||
giMaxPersonalityQuizQuestion = 0;
|
giMaxPersonalityQuizQuestion = 0;
|
||||||
fStartOverFlag = TRUE;
|
fStartOverFlag = TRUE;
|
||||||
iCurrentAnswer = -1;
|
iCurrentAnswer = -1;
|
||||||
iCurrentImpPage = IMP_PERSONALITY;
|
iCurrentImpPage = IMP_PERSONALITY;
|
||||||
fButtonPendingFlag = TRUE;
|
fButtonPendingFlag = TRUE;
|
||||||
@@ -689,10 +689,10 @@ void BtnIMPCancelCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
SetAttributes( );
|
SetAttributes( );
|
||||||
fFirstIMPAttribTime = TRUE;
|
fFirstIMPAttribTime = TRUE;
|
||||||
}
|
}
|
||||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||||
iCurrentAnswer = -1;
|
iCurrentAnswer = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -728,3 +728,4 @@ BOOLEAN HasTheCurrentIMPPageBeenVisited( void )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ extern STR16 pImpPopUpStrings[];
|
|||||||
enum{
|
enum{
|
||||||
IMP_HOME_PAGE,
|
IMP_HOME_PAGE,
|
||||||
IMP_BEGIN,
|
IMP_BEGIN,
|
||||||
IMP_FINISH,
|
IMP_FINISH,
|
||||||
IMP_MAIN_PAGE,
|
IMP_MAIN_PAGE,
|
||||||
IMP_PERSONALITY,
|
IMP_PERSONALITY,
|
||||||
IMP_PERSONALITY_QUIZ,
|
IMP_PERSONALITY_QUIZ,
|
||||||
|
|||||||
+23
-23
@@ -40,7 +40,7 @@ void EnterIMPAboutUs( void )
|
|||||||
|
|
||||||
void ExitIMPAboutUs( void )
|
void ExitIMPAboutUs( void )
|
||||||
{
|
{
|
||||||
// exit from IMP About us page
|
// exit from IMP About us page
|
||||||
|
|
||||||
// delete Buttons
|
// delete Buttons
|
||||||
DeleteIMPAboutUsButtons( );
|
DeleteIMPAboutUsButtons( );
|
||||||
@@ -51,7 +51,7 @@ void ExitIMPAboutUs( void )
|
|||||||
|
|
||||||
void RenderIMPAboutUs( void )
|
void RenderIMPAboutUs( void )
|
||||||
{
|
{
|
||||||
// rneders the IMP about us page
|
// rneders the IMP about us page
|
||||||
|
|
||||||
// the background
|
// the background
|
||||||
RenderProfileBackGround( );
|
RenderProfileBackGround( );
|
||||||
@@ -61,7 +61,7 @@ void RenderIMPAboutUs( void )
|
|||||||
|
|
||||||
// about us indent
|
// about us indent
|
||||||
RenderAboutUsIndentFrame( 8, 130 );
|
RenderAboutUsIndentFrame( 8, 130 );
|
||||||
// about us indent
|
// about us indent
|
||||||
RenderAboutUsIndentFrame( 258, 130 );
|
RenderAboutUsIndentFrame( 258, 130 );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -70,7 +70,7 @@ void RenderIMPAboutUs( void )
|
|||||||
|
|
||||||
void HandleIMPAboutUs( void )
|
void HandleIMPAboutUs( void )
|
||||||
{
|
{
|
||||||
// handles the IMP about us page
|
// handles the IMP about us page
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -79,33 +79,33 @@ void HandleIMPAboutUs( void )
|
|||||||
void CreateIMPAboutUsButtons( void )
|
void CreateIMPAboutUsButtons( void )
|
||||||
{
|
{
|
||||||
|
|
||||||
// this function will create the buttons needed for th IMP about us page
|
// this function will create the buttons needed for th IMP about us page
|
||||||
// the back button button
|
// the back button button
|
||||||
giIMPAboutUsButtonImage[0]= LoadButtonImage( "LAPTOP\\button_3.sti" ,-1,0,-1,1,-1 );
|
giIMPAboutUsButtonImage[0]= LoadButtonImage( "LAPTOP\\button_3.sti" ,-1,0,-1,1,-1 );
|
||||||
/*giIMPAboutUsButton[0] = QuickCreateButton( giIMPAboutUsButtonImage[0], LAPTOP_SCREEN_UL_X + 426 , LAPTOP_SCREEN_WEB_UL_Y + ( 360 ),
|
/*giIMPAboutUsButton[0] = QuickCreateButton( giIMPAboutUsButtonImage[0], LAPTOP_SCREEN_UL_X + 426 , LAPTOP_SCREEN_WEB_UL_Y + ( 360 ),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPBackCallback); */
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPBackCallback); */
|
||||||
|
|
||||||
giIMPAboutUsButton[0] = CreateIconAndTextButton( giIMPAboutUsButtonImage[0], pImpButtonText[6], FONT12ARIAL,
|
giIMPAboutUsButton[0] = CreateIconAndTextButton( giIMPAboutUsButtonImage[0], pImpButtonText[6], FONT12ARIAL,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
LAPTOP_SCREEN_UL_X + 216, LAPTOP_SCREEN_WEB_UL_Y + ( 360 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
LAPTOP_SCREEN_UL_X + 216, LAPTOP_SCREEN_WEB_UL_Y + ( 360 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPBackCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPBackCallback);
|
||||||
|
|
||||||
SetButtonCursor(giIMPAboutUsButton[0], CURSOR_WWW);
|
SetButtonCursor(giIMPAboutUsButton[0], CURSOR_WWW);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DeleteIMPAboutUsButtons( void )
|
void DeleteIMPAboutUsButtons( void )
|
||||||
{
|
{
|
||||||
// this function destroys the buttons needed for the IMP about Us Page
|
// this function destroys the buttons needed for the IMP about Us Page
|
||||||
|
|
||||||
// the about back button
|
// the about back button
|
||||||
RemoveButton(giIMPAboutUsButton[0] );
|
RemoveButton(giIMPAboutUsButton[0] );
|
||||||
UnloadButtonImage(giIMPAboutUsButtonImage[0] );
|
UnloadButtonImage(giIMPAboutUsButtonImage[0] );
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -120,14 +120,14 @@ void BtnIMPBackCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
}
|
}
|
||||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||||
{
|
{
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
iCurrentImpPage = IMP_HOME_PAGE;
|
iCurrentImpPage = IMP_HOME_PAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,7 +41,7 @@ void EnterIMPAttributeEntrance( void )
|
|||||||
|
|
||||||
void RenderIMPAttributeEntrance( void )
|
void RenderIMPAttributeEntrance( void )
|
||||||
{
|
{
|
||||||
// the background
|
// the background
|
||||||
RenderProfileBackGround( );
|
RenderProfileBackGround( );
|
||||||
|
|
||||||
// avg merc indent
|
// avg merc indent
|
||||||
@@ -52,7 +52,7 @@ void RenderIMPAttributeEntrance( void )
|
|||||||
|
|
||||||
void ExitIMPAttributeEntrance( void )
|
void ExitIMPAttributeEntrance( void )
|
||||||
{
|
{
|
||||||
// destroy the finish buttons
|
// destroy the finish buttons
|
||||||
DestroyIMPAttributeEntranceButtons( );
|
DestroyIMPAttributeEntranceButtons( );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -64,7 +64,7 @@ void HandleIMPAttributeEntrance( void )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -72,18 +72,18 @@ void CreateIMPAttributeEntranceButtons( void )
|
|||||||
{
|
{
|
||||||
|
|
||||||
// the begin button
|
// the begin button
|
||||||
giIMPAttributeEntranceButtonImage[0]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
giIMPAttributeEntranceButtonImage[0]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||||
/*
|
/*
|
||||||
giIMPAttributeEntranceButton[0] = QuickCreateButton( giIMPAttributeEntranceButtonImage[0], LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 314 ),
|
giIMPAttributeEntranceButton[0] = QuickCreateButton( giIMPAttributeEntranceButtonImage[0], LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 314 ),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeBeginCallback ); */
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeBeginCallback ); */
|
||||||
|
|
||||||
giIMPAttributeEntranceButton[0] = CreateIconAndTextButton( giIMPAttributeEntranceButtonImage[ 0 ], pImpButtonText[ 13 ], FONT12ARIAL,
|
giIMPAttributeEntranceButton[0] = CreateIconAndTextButton( giIMPAttributeEntranceButtonImage[ 0 ], pImpButtonText[ 13 ], FONT12ARIAL,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 314 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 314 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeBeginCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeBeginCallback);
|
||||||
|
|
||||||
SetButtonCursor(giIMPAttributeEntranceButton[0], CURSOR_WWW);
|
SetButtonCursor(giIMPAttributeEntranceButton[0], CURSOR_WWW);
|
||||||
return;
|
return;
|
||||||
@@ -94,9 +94,9 @@ void DestroyIMPAttributeEntranceButtons( void )
|
|||||||
{
|
{
|
||||||
// this function will destroy the buttons needed for the IMP attrib enter page
|
// this function will destroy the buttons needed for the IMP attrib enter page
|
||||||
|
|
||||||
// the begin button
|
// the begin button
|
||||||
RemoveButton(giIMPAttributeEntranceButton[ 0 ] );
|
RemoveButton(giIMPAttributeEntranceButton[ 0 ] );
|
||||||
UnloadButtonImage(giIMPAttributeEntranceButtonImage[ 0 ] );
|
UnloadButtonImage(giIMPAttributeEntranceButtonImage[ 0 ] );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -113,14 +113,14 @@ void BtnIMPAttributeBeginCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
}
|
}
|
||||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||||
{
|
{
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
iCurrentImpPage = IMP_ATTRIBUTE_PAGE;
|
iCurrentImpPage = IMP_ATTRIBUTE_PAGE;
|
||||||
fButtonPendingFlag = TRUE;
|
fButtonPendingFlag = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,11 +38,11 @@ void BtnIMPAttributeFinishNoCallback(GUI_BUTTON *btn,INT32 reason);
|
|||||||
|
|
||||||
void EnterIMPAttributeFinish( void )
|
void EnterIMPAttributeFinish( void )
|
||||||
{
|
{
|
||||||
// create the needed buttons
|
// create the needed buttons
|
||||||
CreateAttributeFinishButtons( );
|
CreateAttributeFinishButtons( );
|
||||||
|
|
||||||
// render screen
|
// render screen
|
||||||
RenderIMPAttributeFinish( );
|
RenderIMPAttributeFinish( );
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -51,11 +51,11 @@ void EnterIMPAttributeFinish( void )
|
|||||||
|
|
||||||
void RenderIMPAttributeFinish( void )
|
void RenderIMPAttributeFinish( void )
|
||||||
{
|
{
|
||||||
// render background
|
// render background
|
||||||
RenderProfileBackGround( );
|
RenderProfileBackGround( );
|
||||||
|
|
||||||
// indent for text
|
// indent for text
|
||||||
RenderBeginIndent( 110, 93 );
|
RenderBeginIndent( 110, 93 );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -63,7 +63,7 @@ void RenderIMPAttributeFinish( void )
|
|||||||
|
|
||||||
void ExitIMPAttributeFinish( void )
|
void ExitIMPAttributeFinish( void )
|
||||||
{
|
{
|
||||||
// destroy the buttons for this screen
|
// destroy the buttons for this screen
|
||||||
DestroyAttributeFinishButtons( );
|
DestroyAttributeFinishButtons( );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -83,38 +83,38 @@ void CreateAttributeFinishButtons( void )
|
|||||||
// this procedure will create the buttons needed for the attribute finish screen
|
// this procedure will create the buttons needed for the attribute finish screen
|
||||||
|
|
||||||
// the yes button
|
// the yes button
|
||||||
giIMPAttributeFinishButtonImage[0]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
giIMPAttributeFinishButtonImage[0]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||||
/* giIMPAttributeFinishButton[0] = QuickCreateButton( giIMPAttributeFinishButtonImage[0], LAPTOP_SCREEN_UL_X + ( 90 ), LAPTOP_SCREEN_WEB_UL_Y + ( 224 ),
|
/* giIMPAttributeFinishButton[0] = QuickCreateButton( giIMPAttributeFinishButtonImage[0], LAPTOP_SCREEN_UL_X + ( 90 ), LAPTOP_SCREEN_WEB_UL_Y + ( 224 ),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeFinishYesCallback );
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeFinishYesCallback );
|
||||||
|
|
||||||
*/
|
*/
|
||||||
giIMPAttributeFinishButton[0] = CreateIconAndTextButton( giIMPAttributeFinishButtonImage[0], pImpButtonText[ 20 ], FONT12ARIAL,
|
giIMPAttributeFinishButton[0] = CreateIconAndTextButton( giIMPAttributeFinishButtonImage[0], pImpButtonText[ 20 ], FONT12ARIAL,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
LAPTOP_SCREEN_UL_X + ( 130 ), LAPTOP_SCREEN_WEB_UL_Y + ( 180 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
LAPTOP_SCREEN_UL_X + ( 130 ), LAPTOP_SCREEN_WEB_UL_Y + ( 180 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeFinishYesCallback );
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeFinishYesCallback );
|
||||||
|
|
||||||
// the no button
|
// the no button
|
||||||
giIMPAttributeFinishButtonImage[1]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
giIMPAttributeFinishButtonImage[1]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||||
/* giIMPAttributeFinishButton[1] = QuickCreateButton( giIMPAttributeFinishButtonImage[1], LAPTOP_SCREEN_UL_X + ( 276 ), LAPTOP_SCREEN_WEB_UL_Y + ( 224 ),
|
/* giIMPAttributeFinishButton[1] = QuickCreateButton( giIMPAttributeFinishButtonImage[1], LAPTOP_SCREEN_UL_X + ( 276 ), LAPTOP_SCREEN_WEB_UL_Y + ( 224 ),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeFinishNoCallback );
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeFinishNoCallback );
|
||||||
*/
|
*/
|
||||||
giIMPAttributeFinishButton[1] = CreateIconAndTextButton( giIMPAttributeFinishButtonImage[1], pImpButtonText[ 21 ], FONT12ARIAL,
|
giIMPAttributeFinishButton[1] = CreateIconAndTextButton( giIMPAttributeFinishButtonImage[1], pImpButtonText[ 21 ], FONT12ARIAL,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
LAPTOP_SCREEN_UL_X + ( 130 ), LAPTOP_SCREEN_WEB_UL_Y + ( 264 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
LAPTOP_SCREEN_UL_X + ( 130 ), LAPTOP_SCREEN_WEB_UL_Y + ( 264 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeFinishNoCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPAttributeFinishNoCallback);
|
||||||
|
|
||||||
SetButtonCursor(giIMPAttributeFinishButton[0], CURSOR_WWW);
|
SetButtonCursor(giIMPAttributeFinishButton[0], CURSOR_WWW);
|
||||||
SetButtonCursor(giIMPAttributeFinishButton[1], CURSOR_WWW);
|
SetButtonCursor(giIMPAttributeFinishButton[1], CURSOR_WWW);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,13 +124,13 @@ void DestroyAttributeFinishButtons( void )
|
|||||||
|
|
||||||
// this procedure will destroy the buttons for the attribute finish screen
|
// this procedure will destroy the buttons for the attribute finish screen
|
||||||
|
|
||||||
// the yes button
|
// the yes button
|
||||||
RemoveButton(giIMPAttributeFinishButton[ 0 ] );
|
RemoveButton(giIMPAttributeFinishButton[ 0 ] );
|
||||||
UnloadButtonImage(giIMPAttributeFinishButtonImage[ 0 ] );
|
UnloadButtonImage(giIMPAttributeFinishButtonImage[ 0 ] );
|
||||||
|
|
||||||
// the no button
|
// the no button
|
||||||
RemoveButton(giIMPAttributeFinishButton[ 1 ] );
|
RemoveButton(giIMPAttributeFinishButton[ 1 ] );
|
||||||
UnloadButtonImage(giIMPAttributeFinishButtonImage[ 1 ] );
|
UnloadButtonImage(giIMPAttributeFinishButtonImage[ 1 ] );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -143,26 +143,26 @@ void BtnIMPAttributeFinishYesCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
}
|
}
|
||||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||||
{
|
{
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
// gone far enough
|
// gone far enough
|
||||||
iCurrentImpPage = IMP_MAIN_PAGE;
|
iCurrentImpPage = IMP_MAIN_PAGE;
|
||||||
// if( iCurrentProfileMode < IMP__PORTRAIT )
|
// if( iCurrentProfileMode < IMP__PORTRAIT )
|
||||||
if( !CameBackToAttributesPageButNotFinished() )
|
if( !CameBackToAttributesPageButNotFinished() )
|
||||||
{
|
{
|
||||||
iCurrentProfileMode = IMP__FINISH;//IMP__PORTRAIT;
|
iCurrentProfileMode = IMP__FINISH;//IMP__PORTRAIT;
|
||||||
}
|
}
|
||||||
// if we are already done, leave
|
// if we are already done, leave
|
||||||
if( iCurrentProfileMode == IMP__FINISH)
|
if( iCurrentProfileMode == IMP__FINISH)
|
||||||
{
|
{
|
||||||
iCurrentImpPage = IMP_FINISH;
|
iCurrentImpPage = IMP_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SET ATTRIBUTES NOW
|
// SET ATTRIBUTES NOW
|
||||||
@@ -195,13 +195,13 @@ void BtnIMPAttributeFinishNoCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
}
|
}
|
||||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||||
{
|
{
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
// if no, return to attribute
|
// if no, return to attribute
|
||||||
iCurrentImpPage = IMP_ATTRIBUTE_PAGE;
|
iCurrentImpPage = IMP_ATTRIBUTE_PAGE;
|
||||||
fReturnStatus = TRUE;
|
fReturnStatus = TRUE;
|
||||||
|
|||||||
+308
-312
File diff suppressed because it is too large
Load Diff
+334
-336
File diff suppressed because it is too large
Load Diff
@@ -55,15 +55,15 @@ extern BOOLEAN fLoadingCharacterForPreviousImpProfile;
|
|||||||
// positions of the face x and y for eyes and mouth for the 10 portraits
|
// positions of the face x and y for eyes and mouth for the 10 portraits
|
||||||
INT16 sFacePositions[ NUMBER_OF_PLAYER_PORTRAITS ][ 4 ]=
|
INT16 sFacePositions[ NUMBER_OF_PLAYER_PORTRAITS ][ 4 ]=
|
||||||
{
|
{
|
||||||
{0,0,0,0},
|
|
||||||
{0,0,0,0},
|
|
||||||
{0,0,0,0},
|
{0,0,0,0},
|
||||||
{0,0,0,0},
|
{0,0,0,0},
|
||||||
{0,0,0,0},
|
{0,0,0,0},
|
||||||
{0,0,0,0},
|
{0,0,0,0},
|
||||||
{0,0,0,0},
|
{0,0,0,0},
|
||||||
{0,0,0,0},
|
{0,0,0,0},
|
||||||
{0,0,0,0},
|
{0,0,0,0},
|
||||||
|
{0,0,0,0},
|
||||||
|
{0,0,0,0},
|
||||||
{0,0,0,0},
|
{0,0,0,0},
|
||||||
{0,0,0,0},
|
{0,0,0,0},
|
||||||
{0,0,0,0},
|
{0,0,0,0},
|
||||||
@@ -134,7 +134,7 @@ void CreateACharacterFromPlayerEnteredStats( void )
|
|||||||
|
|
||||||
|
|
||||||
// copy over full name
|
// copy over full name
|
||||||
wcscpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].zName, pFullName );
|
wcscpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].zName, pFullName );
|
||||||
|
|
||||||
// the nickname
|
// the nickname
|
||||||
wcscpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].zNickname, pNickName );
|
wcscpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].zNickname, pNickName );
|
||||||
@@ -142,38 +142,38 @@ void CreateACharacterFromPlayerEnteredStats( void )
|
|||||||
// gender
|
// gender
|
||||||
if ( fCharacterIsMale == TRUE )
|
if ( fCharacterIsMale == TRUE )
|
||||||
{
|
{
|
||||||
// male
|
// male
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSex = MALE;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSex = MALE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// female
|
// female
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSex = FEMALE;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSex = FEMALE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// attributes
|
// attributes
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bLifeMax = ( INT8 )iHealth;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bLifeMax = ( INT8 )iHealth;
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bLife = ( INT8 )iHealth;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bLife = ( INT8 )iHealth;
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bAgility = ( INT8 )iAgility;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bAgility = ( INT8 )iAgility;
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bStrength = ( INT8 )iStrength;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bStrength = ( INT8 )iStrength;
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bDexterity = ( INT8 )iDexterity;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bDexterity = ( INT8 )iDexterity;
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bWisdom = ( INT8 )iWisdom;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bWisdom = ( INT8 )iWisdom;
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bLeadership = ( INT8 )iLeadership;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bLeadership = ( INT8 )iLeadership;
|
||||||
|
|
||||||
|
|
||||||
// skills
|
// skills
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bMarksmanship = ( INT8 )iMarksmanship;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bMarksmanship = ( INT8 )iMarksmanship;
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bMedical = ( INT8 )iMedical;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bMedical = ( INT8 )iMedical;
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bMechanical = ( INT8 )iMechanical;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bMechanical = ( INT8 )iMechanical;
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bExplosive = ( INT8 )iExplosives;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bExplosive = ( INT8 )iExplosives;
|
||||||
|
|
||||||
|
|
||||||
// personality
|
// personality
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bPersonalityTrait = ( INT8 )iPersonality;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bPersonalityTrait = ( INT8 )iPersonality;
|
||||||
|
|
||||||
// attitude
|
// attitude
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bAttitude = ( INT8 )iAttitude;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bAttitude = ( INT8 )iAttitude;
|
||||||
|
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bExpLevel = 1;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bExpLevel = 1;
|
||||||
|
|
||||||
@@ -183,9 +183,9 @@ void CreateACharacterFromPlayerEnteredStats( void )
|
|||||||
|
|
||||||
|
|
||||||
// face
|
// face
|
||||||
SelectMercFace( );
|
SelectMercFace( );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,10 +213,10 @@ BOOLEAN DoesCharacterHaveAPersoanlity( void )
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if( iPersonality != NO_PERSONALITYTRAIT )
|
if( iPersonality != NO_PERSONALITYTRAIT )
|
||||||
{
|
{
|
||||||
// yep
|
// yep
|
||||||
return ( TRUE );
|
return ( TRUE );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -233,10 +233,10 @@ BOOLEAN DoesCharacterHaveAPersoanlity( void )
|
|||||||
return( FALSE );
|
return( FALSE );
|
||||||
|
|
||||||
// simply checks if caracter has a personality other than normal
|
// simply checks if caracter has a personality other than normal
|
||||||
if( iPersonality != NO_PERSONALITYTRAIT )
|
if( iPersonality != NO_PERSONALITYTRAIT )
|
||||||
{
|
{
|
||||||
// yep
|
// yep
|
||||||
return ( TRUE );
|
return ( TRUE );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -254,8 +254,8 @@ void CreatePlayerAttitude( void )
|
|||||||
if(gGameSettings.fOptions[TOPTION_USE_RANDOM_PERSONALITY] == TRUE)
|
if(gGameSettings.fOptions[TOPTION_USE_RANDOM_PERSONALITY] == TRUE)
|
||||||
{
|
{
|
||||||
AddAnAttitudeToAttitudeList( ATT_OPTIMIST );
|
AddAnAttitudeToAttitudeList( ATT_OPTIMIST );
|
||||||
AddAnAttitudeToAttitudeList( ATT_LONER );
|
AddAnAttitudeToAttitudeList( ATT_LONER );
|
||||||
AddAnAttitudeToAttitudeList( ATT_FRIENDLY );
|
AddAnAttitudeToAttitudeList( ATT_FRIENDLY );
|
||||||
AddAnAttitudeToAttitudeList( ATT_ARROGANT );
|
AddAnAttitudeToAttitudeList( ATT_ARROGANT );
|
||||||
AddAnAttitudeToAttitudeList( ATT_NORMAL );
|
AddAnAttitudeToAttitudeList( ATT_NORMAL );
|
||||||
AddAnAttitudeToAttitudeList( ATT_ASSHOLE );
|
AddAnAttitudeToAttitudeList( ATT_ASSHOLE );
|
||||||
@@ -350,9 +350,9 @@ void AddAnAttitudeToAttitudeList( INT8 bAttitude )
|
|||||||
|
|
||||||
void AddSkillToSkillList( INT8 bSkill )
|
void AddSkillToSkillList( INT8 bSkill )
|
||||||
{
|
{
|
||||||
// adds a skill to skills list
|
// adds a skill to skills list
|
||||||
|
|
||||||
if( iLastElementInSkillsList < ATTITUDE_LIST_SIZE)
|
if( iLastElementInSkillsList < ATTITUDE_LIST_SIZE)
|
||||||
{
|
{
|
||||||
// add element
|
// add element
|
||||||
SkillsList[ iLastElementInSkillsList ] = ( INT32 )bSkill;
|
SkillsList[ iLastElementInSkillsList ] = ( INT32 )bSkill;
|
||||||
@@ -440,7 +440,7 @@ void ValidateSkillsList( void )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Kaiden using UB's code, lockpicking can't be removed from the list "yet".
|
// Kaiden using UB's code, lockpicking can't be removed from the list "yet".
|
||||||
// special check for lockpicking
|
// special check for lockpicking
|
||||||
//iValue = pProfile->bMechanical;
|
//iValue = pProfile->bMechanical;
|
||||||
//iValue = ( iValue * pProfile->bWisdom ) / 100;
|
//iValue = ( iValue * pProfile->bWisdom ) / 100;
|
||||||
@@ -483,9 +483,8 @@ void ValidateSkillsList( void )
|
|||||||
void CreatePlayerSkills( void )
|
void CreatePlayerSkills( void )
|
||||||
{
|
{
|
||||||
|
|
||||||
// this function will 'roll a die' and decide if any attitude does exists
|
// this function will 'roll a die' and decide if any attitude does exists
|
||||||
INT32 iDiceValue = 0;
|
INT32 iDiceValue = 0;
|
||||||
INT32 iCounter = 0;
|
|
||||||
|
|
||||||
ValidateSkillsList();
|
ValidateSkillsList();
|
||||||
/* Kaiden - Commented out in UB to skip the whole random skill thing
|
/* Kaiden - Commented out in UB to skip the whole random skill thing
|
||||||
@@ -501,7 +500,7 @@ void CreatePlayerSkills( void )
|
|||||||
iSkillB = SkillsList[ iDiceValue ];
|
iSkillB = SkillsList[ iDiceValue ];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Kaiden: This section was added in it's place:
|
// Kaiden: This section was added in it's place:
|
||||||
if( iLastElementInSkillsList > 0 )
|
if( iLastElementInSkillsList > 0 )
|
||||||
{
|
{
|
||||||
// set attitude
|
// set attitude
|
||||||
@@ -540,7 +539,7 @@ void CreatePlayerSkills( void )
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
// are the same,
|
// are the same,
|
||||||
// reroll until different, or until ATTITUDE_LIST_SIZE times
|
// reroll until different, or until ATTITUDE_LIST_SIZE times
|
||||||
iSkillB = Random( iLastElementInSkillsList + 1 );
|
iSkillB = Random( iLastElementInSkillsList + 1 );
|
||||||
|
|
||||||
while( (iSkillA == iSkillB ) && ( iCounter < HOW_MANY_ROLLS_FOR_SAME_SKILL_CHECK ) )
|
while( (iSkillA == iSkillB ) && ( iCounter < HOW_MANY_ROLLS_FOR_SAME_SKILL_CHECK ) )
|
||||||
@@ -549,12 +548,12 @@ void CreatePlayerSkills( void )
|
|||||||
iCounter++;
|
iCounter++;
|
||||||
|
|
||||||
// next random
|
// next random
|
||||||
iSkillB = Random( iLastElementInSkillsList + 1 );
|
iSkillB = Random( iLastElementInSkillsList + 1 );
|
||||||
|
|
||||||
}
|
}
|
||||||
if( iCounter == ATTITUDE_LIST_SIZE )
|
if( iCounter == ATTITUDE_LIST_SIZE )
|
||||||
{
|
{
|
||||||
iSkillB = NO_SKILLTRAIT;
|
iSkillB = NO_SKILLTRAIT;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -578,8 +577,8 @@ void AddAPersonalityToPersonalityList( INT8 bPersonlity )
|
|||||||
// return;
|
// return;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// will add a persoanlity to persoanlity list
|
// will add a persoanlity to persoanlity list
|
||||||
if( iLastElementInPersonalityList < ATTITUDE_LIST_SIZE)
|
if( iLastElementInPersonalityList < ATTITUDE_LIST_SIZE)
|
||||||
{
|
{
|
||||||
// add element
|
// add element
|
||||||
PersonalityList[ iLastElementInPersonalityList ] = ( INT32 )bPersonlity;
|
PersonalityList[ iLastElementInPersonalityList ] = ( INT32 )bPersonlity;
|
||||||
@@ -635,12 +634,12 @@ void CreatePlayerPersonality( void )
|
|||||||
|
|
||||||
// Kaiden two chances to avoid a normal personality. As IMP
|
// Kaiden two chances to avoid a normal personality. As IMP
|
||||||
// says, They check it twice just to make sure :p
|
// says, They check it twice just to make sure :p
|
||||||
for( iCounter = 0; iCounter < iLastElementInPersonalityList; iCounter++ )
|
for( iCounter = 0; iCounter < iLastElementInPersonalityList; iCounter++ )
|
||||||
{
|
{
|
||||||
|
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("iDiceValue = %d",iDiceValue));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("iDiceValue = %d",iDiceValue));
|
||||||
|
|
||||||
if( PersonalityList[ iDiceValue ] == NO_PERSONALITYTRAIT )
|
if( PersonalityList[ iDiceValue ] == NO_PERSONALITYTRAIT )
|
||||||
{
|
{
|
||||||
//Kaiden: Roll one more time for good measure:
|
//Kaiden: Roll one more time for good measure:
|
||||||
iDiceValue = Random( iLastElementInPersonalityList + 1 );
|
iDiceValue = Random( iLastElementInPersonalityList + 1 );
|
||||||
@@ -670,7 +669,7 @@ void CreatePlayersPersonalitySkillsAndAttitude( void )
|
|||||||
CreatePlayerPersonality( );
|
CreatePlayerPersonality( );
|
||||||
|
|
||||||
// skills are now created later after stats have been chosen
|
// skills are now created later after stats have been chosen
|
||||||
//CreatePlayerSkills( );
|
//CreatePlayerSkills( );
|
||||||
|
|
||||||
// attitude
|
// attitude
|
||||||
CreatePlayerAttitude( );
|
CreatePlayerAttitude( );
|
||||||
@@ -705,7 +704,7 @@ void ResetIncrementCharacterAttributes( void )
|
|||||||
iAddHealth = 0;
|
iAddHealth = 0;
|
||||||
iAddLeadership = 0;
|
iAddLeadership = 0;
|
||||||
|
|
||||||
// skills
|
// skills
|
||||||
iAddMarksmanship = 0;
|
iAddMarksmanship = 0;
|
||||||
iAddExplosives = 0;
|
iAddExplosives = 0;
|
||||||
iAddMedical = 0;
|
iAddMedical = 0;
|
||||||
@@ -718,10 +717,10 @@ void SelectMercFace( void )
|
|||||||
// this procedure will select the approriate face for the merc and save offsets
|
// this procedure will select the approriate face for the merc and save offsets
|
||||||
|
|
||||||
// grab face filename
|
// grab face filename
|
||||||
// strcpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubUnusedFaceFileName , pPlayerSelectedFaceFileNames[ iPortraitNumber ]);
|
// strcpy( gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubUnusedFaceFileName , pPlayerSelectedFaceFileNames[ iPortraitNumber ]);
|
||||||
|
|
||||||
// now the offsets
|
// now the offsets
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubFaceIndex = 200 + ( UINT8 )iPortraitNumber;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubFaceIndex = 200 + ( UINT8 )iPortraitNumber;
|
||||||
|
|
||||||
// eyes
|
// eyes
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usEyesX = sFacePositions[ iPortraitNumber ][ 0 ];
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].usEyesX = sFacePositions[ iPortraitNumber ][ 0 ];
|
||||||
@@ -740,8 +739,8 @@ void SetMercSkinAndHairColors( void )
|
|||||||
{
|
{
|
||||||
enum{ PINKSKIN, TANSKIN, DARKSKIN, BLACKSKIN, NUMSKINS };
|
enum{ PINKSKIN, TANSKIN, DARKSKIN, BLACKSKIN, NUMSKINS };
|
||||||
enum{ BROWNHEAD, BLACKHEAD, //black skin (only this line )
|
enum{ BROWNHEAD, BLACKHEAD, //black skin (only this line )
|
||||||
WHITEHEAD, //dark skin (this line plus all above)
|
WHITEHEAD, //dark skin (this line plus all above)
|
||||||
BLONDHEAD, REDHEAD, //pink/tan skin (this line plus all above )
|
BLONDHEAD, REDHEAD, //pink/tan skin (this line plus all above )
|
||||||
NUMHEADS
|
NUMHEADS
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -941,9 +940,9 @@ void HandleMercStatsForChangesInFace( )
|
|||||||
CreatePlayerSkills();
|
CreatePlayerSkills();
|
||||||
|
|
||||||
// body type
|
// body type
|
||||||
if ( fCharacterIsMale )
|
if ( fCharacterIsMale )
|
||||||
{
|
{
|
||||||
// male
|
// male
|
||||||
// big or regular
|
// big or regular
|
||||||
// Madd - don't override the skills - override the body type instead
|
// Madd - don't override the skills - override the body type instead
|
||||||
if( ShouldThisMercHaveABigBody() && iSkillA != MARTIALARTS && iSkillB != MARTIALARTS )
|
if( ShouldThisMercHaveABigBody() && iSkillA != MARTIALARTS && iSkillB != MARTIALARTS )
|
||||||
@@ -961,13 +960,13 @@ void HandleMercStatsForChangesInFace( )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubBodyType = REGMALE;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubBodyType = REGMALE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// female
|
// female
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubBodyType = REGFEMALE;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].ubBodyType = REGFEMALE;
|
||||||
|
|
||||||
if( iSkillA == MARTIALARTS )
|
if( iSkillA == MARTIALARTS )
|
||||||
{
|
{
|
||||||
@@ -981,8 +980,8 @@ void HandleMercStatsForChangesInFace( )
|
|||||||
|
|
||||||
|
|
||||||
// skill trait
|
// skill trait
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSkillTrait = ( INT8 )iSkillA;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSkillTrait = ( INT8 )iSkillA;
|
||||||
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSkillTrait2 = ( INT8 )iSkillB;
|
gMercProfiles[ LaptopSaveInfo.iIMPIndex ].bSkillTrait2 = ( INT8 )iSkillB;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+596
-73
@@ -33,9 +33,24 @@
|
|||||||
#include "strategic.h"
|
#include "strategic.h"
|
||||||
#include "weapons.h"
|
#include "weapons.h"
|
||||||
#include "Random.h"
|
#include "Random.h"
|
||||||
|
#include "GameVersion.h"
|
||||||
|
#include "GameSettings.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define IMP_FILENAME_SUFFIX ".dat"
|
// Changed by ADB (rev 1513) to resolve IMPs created prior to structural changes
|
||||||
|
//#define IMP_FILENAME_SUFFIX ".dat"
|
||||||
|
#define OLD_IMP_FILENAME_SUFFIX ".dat"
|
||||||
|
#define NEW_IMP_FILENAME_SUFFIX ".dat2"
|
||||||
|
|
||||||
|
//CHRISL: structure needed to store temporary inventory information during IMP creation
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
UINT16 inv;
|
||||||
|
UINT8 iSize;
|
||||||
|
UINT32 iClass;
|
||||||
|
UINT8 iStatus;
|
||||||
|
UINT8 iNumber;
|
||||||
|
} INVNODE;
|
||||||
|
|
||||||
IMP_ITEM_CHOICE_TYPE gIMPItemChoices[MAX_IMP_ITEM_TYPES];
|
IMP_ITEM_CHOICE_TYPE gIMPItemChoices[MAX_IMP_ITEM_TYPES];
|
||||||
|
|
||||||
@@ -132,6 +147,14 @@ void MakeProfileInvItemAnySlot(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8
|
|||||||
void MakeProfileInvItemThisSlot(MERCPROFILESTRUCT *pProfile, UINT32 uiPos, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany);
|
void MakeProfileInvItemThisSlot(MERCPROFILESTRUCT *pProfile, UINT32 uiPos, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany);
|
||||||
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany);
|
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany);
|
||||||
|
|
||||||
|
// CHRISL:
|
||||||
|
void RedistributeStartingItems(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 sPocket);
|
||||||
|
void DistributeInitialGear(MERCPROFILESTRUCT *pProfile);
|
||||||
|
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, INVNODE *tInv);
|
||||||
|
INT32 AnyFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, INVNODE *tInv);
|
||||||
|
INT32 SpecificFreePocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany, UINT32 usClass);
|
||||||
|
INT32 PickPocket(MERCPROFILESTRUCT *pProfile, UINT8 ppStart, UINT8 ppStop, UINT16 usItem, UINT8 iNumber, UINT8 * cap);
|
||||||
|
|
||||||
// callbacks
|
// callbacks
|
||||||
void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason );
|
void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason );
|
||||||
void BtnIMPConfirmYes( GUI_BUTTON *btn,INT32 reason );
|
void BtnIMPConfirmYes( GUI_BUTTON *btn,INT32 reason );
|
||||||
@@ -147,14 +170,14 @@ void EnterIMPConfirm( void )
|
|||||||
void RenderIMPConfirm( void )
|
void RenderIMPConfirm( void )
|
||||||
{
|
{
|
||||||
|
|
||||||
// the background
|
// the background
|
||||||
RenderProfileBackGround( );
|
RenderProfileBackGround( );
|
||||||
|
|
||||||
// indent
|
// indent
|
||||||
RenderAvgMercIndentFrame(90, 40 );
|
RenderAvgMercIndentFrame(90, 40 );
|
||||||
|
|
||||||
// highlight answer
|
// highlight answer
|
||||||
PrintImpText( );
|
PrintImpText( );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -163,7 +186,7 @@ void ExitIMPConfirm( void )
|
|||||||
{
|
{
|
||||||
|
|
||||||
// destroy buttons
|
// destroy buttons
|
||||||
DestroyConfirmButtons( );
|
DestroyConfirmButtons( );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,21 +199,21 @@ void CreateConfirmButtons( void )
|
|||||||
{
|
{
|
||||||
// create buttons for confirm screen
|
// create buttons for confirm screen
|
||||||
|
|
||||||
giIMPConfirmButtonImage[0]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
giIMPConfirmButtonImage[0]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||||
giIMPConfirmButton[0] = CreateIconAndTextButton( giIMPConfirmButtonImage[0], pImpButtonText[ 16 ], FONT12ARIAL,
|
giIMPConfirmButton[0] = CreateIconAndTextButton( giIMPConfirmButtonImage[0], pImpButtonText[ 16 ], FONT12ARIAL,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 254 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 254 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPConfirmYes);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPConfirmYes);
|
||||||
|
|
||||||
giIMPConfirmButtonImage[1]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
giIMPConfirmButtonImage[1]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||||
giIMPConfirmButton[1] = CreateIconAndTextButton( giIMPConfirmButtonImage[ 1 ], pImpButtonText[ 17 ], FONT12ARIAL,
|
giIMPConfirmButton[1] = CreateIconAndTextButton( giIMPConfirmButtonImage[ 1 ], pImpButtonText[ 17 ], FONT12ARIAL,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 314 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
LAPTOP_SCREEN_UL_X + ( 136 ), LAPTOP_SCREEN_WEB_UL_Y + ( 314 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPConfirmNo);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPConfirmNo);
|
||||||
|
|
||||||
SetButtonCursor(giIMPConfirmButton[ 0 ], CURSOR_WWW);
|
SetButtonCursor(giIMPConfirmButton[ 0 ], CURSOR_WWW);
|
||||||
SetButtonCursor(giIMPConfirmButton[ 1 ], CURSOR_WWW);
|
SetButtonCursor(giIMPConfirmButton[ 1 ], CURSOR_WWW);
|
||||||
@@ -201,14 +224,14 @@ void CreateConfirmButtons( void )
|
|||||||
|
|
||||||
void DestroyConfirmButtons( void )
|
void DestroyConfirmButtons( void )
|
||||||
{
|
{
|
||||||
// destroy buttons for confirm screen
|
// destroy buttons for confirm screen
|
||||||
|
|
||||||
RemoveButton(giIMPConfirmButton[ 0 ] );
|
RemoveButton(giIMPConfirmButton[ 0 ] );
|
||||||
UnloadButtonImage(giIMPConfirmButtonImage[ 0 ] );
|
UnloadButtonImage(giIMPConfirmButtonImage[ 0 ] );
|
||||||
|
|
||||||
|
|
||||||
RemoveButton(giIMPConfirmButton[ 1 ] );
|
RemoveButton(giIMPConfirmButton[ 1 ] );
|
||||||
UnloadButtonImage(giIMPConfirmButtonImage[ 1 ] );
|
UnloadButtonImage(giIMPConfirmButtonImage[ 1 ] );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,8 +259,8 @@ BOOLEAN AddCharacterToPlayersTeam( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HireMercStruct.sSectorX = gsMercArriveSectorX;
|
HireMercStruct.sSectorX = gsMercArriveSectorX;
|
||||||
HireMercStruct.sSectorY = gsMercArriveSectorY;
|
HireMercStruct.sSectorY = gsMercArriveSectorY;
|
||||||
HireMercStruct.fUseLandingZoneForArrival = TRUE;
|
HireMercStruct.fUseLandingZoneForArrival = TRUE;
|
||||||
|
|
||||||
HireMercStruct.fCopyProfileItemsOver = TRUE;
|
HireMercStruct.fCopyProfileItemsOver = TRUE;
|
||||||
@@ -262,7 +285,7 @@ BOOLEAN AddCharacterToPlayersTeam( void )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BtnIMPConfirmYes(GUI_BUTTON *btn,INT32 reason)
|
void BtnIMPConfirmYes(GUI_BUTTON *btn,INT32 reason)
|
||||||
{
|
{
|
||||||
|
|
||||||
// btn callback for IMP Homepage About US button
|
// btn callback for IMP Homepage About US button
|
||||||
@@ -271,7 +294,7 @@ void BtnIMPConfirmYes(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
}
|
}
|
||||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
@@ -290,7 +313,7 @@ void BtnIMPConfirmYes(GUI_BUTTON *btn,INT32 reason)
|
|||||||
if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
|
if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
|
||||||
{
|
{
|
||||||
// not enough
|
// not enough
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// line moved by CJC Nov 28 2002 to AFTER the check for money
|
// line moved by CJC Nov 28 2002 to AFTER the check for money
|
||||||
@@ -298,7 +321,7 @@ void BtnIMPConfirmYes(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
// charge the player
|
// charge the player
|
||||||
AddTransactionToPlayersBook(IMP_PROFILE, (UINT8)(LaptopSaveInfo.iIMPIndex), GetWorldTotalMin( ), - ( COST_OF_PROFILE ) );
|
AddTransactionToPlayersBook(IMP_PROFILE, (UINT8)(LaptopSaveInfo.iIMPIndex), GetWorldTotalMin( ), - ( COST_OF_PROFILE ) );
|
||||||
AddHistoryToPlayersLog( HISTORY_CHARACTER_GENERATED, 0,GetWorldTotalMin( ), -1, -1 );
|
AddHistoryToPlayersLog( HISTORY_CHARACTER_GENERATED, 0,GetWorldTotalMin( ), -1, -1 );
|
||||||
AddCharacterToPlayersTeam( );
|
AddCharacterToPlayersTeam( );
|
||||||
|
|
||||||
// write the created imp merc
|
// write the created imp merc
|
||||||
@@ -335,13 +358,13 @@ void BtnIMPConfirmYes(GUI_BUTTON *btn,INT32 reason)
|
|||||||
// fixed? by CJC Nov 28 2002
|
// fixed? by CJC Nov 28 2002
|
||||||
void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason )
|
void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason )
|
||||||
{
|
{
|
||||||
// btn callback for IMP Homepage About US button
|
// btn callback for IMP Homepage About US button
|
||||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
}
|
}
|
||||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
@@ -365,9 +388,9 @@ void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason )
|
|||||||
fButtonPendingFlag = TRUE;
|
fButtonPendingFlag = TRUE;
|
||||||
iCurrentImpPage = IMP_HOME_PAGE;
|
iCurrentImpPage = IMP_HOME_PAGE;
|
||||||
}
|
}
|
||||||
fNoAlreadySelected = TRUE;
|
fNoAlreadySelected = TRUE;
|
||||||
*/
|
*/
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -377,13 +400,13 @@ void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason )
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
// btn callback for IMP Homepage About US button
|
// btn callback for IMP Homepage About US button
|
||||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
}
|
}
|
||||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
@@ -396,8 +419,8 @@ void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason )
|
|||||||
fButtonPendingFlag = TRUE;
|
fButtonPendingFlag = TRUE;
|
||||||
iCurrentImpPage = IMP_HOME_PAGE;
|
iCurrentImpPage = IMP_HOME_PAGE;
|
||||||
}
|
}
|
||||||
fNoAlreadySelected = TRUE;
|
fNoAlreadySelected = TRUE;
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -406,13 +429,144 @@ void BtnIMPConfirmNo( GUI_BUTTON *btn,INT32 reason )
|
|||||||
|
|
||||||
#define PROFILE_HAS_SKILL_TRAIT( p, t ) ((p->bSkillTrait == t) || (p->bSkillTrait2 == t))
|
#define PROFILE_HAS_SKILL_TRAIT( p, t ) ((p->bSkillTrait == t) || (p->bSkillTrait2 == t))
|
||||||
|
|
||||||
|
//CHRISL: New function to handle proper distribution of starting gear
|
||||||
|
void DistributeInitialGear(MERCPROFILESTRUCT *pProfile)
|
||||||
|
{
|
||||||
|
INVNODE tInv[NUM_INV_SLOTS];
|
||||||
|
int i, j, number;
|
||||||
|
UINT8 count = 0, length;
|
||||||
|
int iOrder[NUM_INV_SLOTS];
|
||||||
|
INT32 iSlot;
|
||||||
|
BOOLEAN iSet = FALSE;
|
||||||
|
|
||||||
|
// First move profile information to temporary storage
|
||||||
|
for(i=INV_START_POS; i<NUM_INV_SLOTS; i++)
|
||||||
|
{
|
||||||
|
if(pProfile->inv[i] != NOTHING)
|
||||||
|
{
|
||||||
|
if((UsingNewInventorySystem() == true))
|
||||||
|
{
|
||||||
|
if(Item[pProfile->inv[i]].ItemSize != 99)
|
||||||
|
{
|
||||||
|
tInv[count].inv = pProfile->inv[i];
|
||||||
|
tInv[count].iSize = Item[pProfile->inv[i]].ItemSize;
|
||||||
|
tInv[count].iClass = Item[pProfile->inv[i]].usItemClass;
|
||||||
|
tInv[count].iStatus = (pProfile->bInvStatus[i] > 0) ? pProfile->bInvStatus[i] : 100;
|
||||||
|
tInv[count].iNumber = (pProfile->bInvNumber[i] == 0) ? 1 :pProfile->bInvNumber[i];
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
pProfile->inv[i] = 0;
|
||||||
|
pProfile->bInvStatus[i] = 0;
|
||||||
|
pProfile->bInvNumber[i] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(Item[pProfile->inv[i]].usItemClass == IC_LBEGEAR)
|
||||||
|
{
|
||||||
|
pProfile->inv[i] = 0;
|
||||||
|
pProfile->bInvStatus[i] = 0;
|
||||||
|
pProfile->bInvNumber[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Now that we've weeded out illegal items, skip the rest if we're in OldInv
|
||||||
|
if((UsingNewInventorySystem() == false))
|
||||||
|
return;
|
||||||
|
|
||||||
|
length = count;
|
||||||
|
count = 0;
|
||||||
|
// Next sort list by size
|
||||||
|
for(j=34; j>=0; j--)
|
||||||
|
{
|
||||||
|
for(i=0; i<length; i++)
|
||||||
|
{
|
||||||
|
if(tInv[i].iSize == j)
|
||||||
|
{
|
||||||
|
//ADB this is a mem leak!!!
|
||||||
|
//int *filler = new int;
|
||||||
|
//iOrder.push_back(*filler);
|
||||||
|
iOrder[count] = i;
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Last, go through the temp data and put items into appropriate pockets
|
||||||
|
// Start by putting items into specific pockets
|
||||||
|
for(i=0; i<count; i++)
|
||||||
|
{
|
||||||
|
iSlot = SpecificFreePocket(pProfile, tInv[iOrder[i]].inv, tInv[iOrder[i]].iNumber, tInv[iOrder[i]].iClass);
|
||||||
|
if(iSlot != -1)
|
||||||
|
{
|
||||||
|
MakeProfileInvItemThisSlot(pProfile, iSlot, tInv[iOrder[i]].inv, tInv[iOrder[i]].iStatus, tInv[iOrder[i]].iNumber);
|
||||||
|
iOrder[i]=-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Next, put anything that isn't an attachment into a pocket
|
||||||
|
for(i=0; i<count; i++)
|
||||||
|
{
|
||||||
|
if(iOrder[i]!=-1)
|
||||||
|
{
|
||||||
|
// skip if this item is an attachment
|
||||||
|
if(Item[tInv[iOrder[i]].inv].attachment)
|
||||||
|
continue;
|
||||||
|
iSet = FALSE;
|
||||||
|
number = tInv[iOrder[i]].iNumber;
|
||||||
|
while(number > 0)
|
||||||
|
{
|
||||||
|
iSlot = FirstFreeBigEnoughPocket (pProfile, &tInv[iOrder[i]]);
|
||||||
|
if(iSlot != -1)
|
||||||
|
{
|
||||||
|
MakeProfileInvItemThisSlot(pProfile, iSlot, tInv[iOrder[i]].inv, tInv[iOrder[i]].iStatus, tInv[iOrder[i]].iNumber);
|
||||||
|
iSet = TRUE;
|
||||||
|
number -= tInv[iOrder[i]].iNumber;
|
||||||
|
tInv[iOrder[i]].iNumber = number;
|
||||||
|
}
|
||||||
|
else if(tInv[iOrder[i]].iNumber>1){
|
||||||
|
tInv[iOrder[i]].iNumber --;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
iSet = FALSE;
|
||||||
|
tInv[iOrder[i]].iNumber = number;
|
||||||
|
number = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(iSet)
|
||||||
|
iOrder[i]=-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// finish by putting anything that's left into any pocket, including inactive pockets
|
||||||
|
for(i=0; i<count; i++)
|
||||||
|
{
|
||||||
|
if(iOrder[i]!=-1)
|
||||||
|
{
|
||||||
|
iSet = FALSE;
|
||||||
|
number = tInv[iOrder[i]].iNumber;
|
||||||
|
tInv[iOrder[i]].iNumber = 1;
|
||||||
|
for(int j=0; j<number; j++)
|
||||||
|
{
|
||||||
|
iSlot = AnyFreeBigEnoughPocket (pProfile, &tInv[iOrder[i]]);
|
||||||
|
if(iSlot != -1)
|
||||||
|
{
|
||||||
|
MakeProfileInvItemThisSlot(pProfile, iSlot, tInv[iOrder[i]].inv, tInv[iOrder[i]].iStatus, tInv[iOrder[i]].iNumber);
|
||||||
|
iSet = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(iSet)
|
||||||
|
iOrder[i] = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void GiveItemsToPC( UINT8 ubProfileId )
|
void GiveItemsToPC( UINT8 ubProfileId )
|
||||||
{
|
{
|
||||||
MERCPROFILESTRUCT *pProfile;
|
MERCPROFILESTRUCT *pProfile;
|
||||||
|
|
||||||
|
|
||||||
// gives starting items to merc
|
// gives starting items to merc
|
||||||
// NOTE: Any guns should probably be from those available in regular gun set
|
// NOTE: Any guns should probably be from those available in regular gun set
|
||||||
|
|
||||||
pProfile = &(gMercProfiles[ubProfileId]);
|
pProfile = &(gMercProfiles[ubProfileId]);
|
||||||
@@ -567,9 +721,9 @@ void GiveItemsToPC( UINT8 ubProfileId )
|
|||||||
GiveIMPRandomItems(pProfile,IMP_MARTIALARTS);
|
GiveIMPRandomItems(pProfile,IMP_MARTIALARTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, ONROOF))
|
if (PROFILE_HAS_SKILL_TRAIT(pProfile, PROF_SNIPER))
|
||||||
{
|
{
|
||||||
GiveIMPRandomItems(pProfile,IMP_ROOFTOPS);
|
GiveIMPRandomItems(pProfile,IMP_PROF_SNIPER);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PROFILE_HAS_SKILL_TRAIT(pProfile, TEACHING))
|
if (PROFILE_HAS_SKILL_TRAIT(pProfile, TEACHING))
|
||||||
@@ -591,14 +745,30 @@ void GiveItemsToPC( UINT8 ubProfileId )
|
|||||||
{
|
{
|
||||||
GiveIMPRandomItems(pProfile,IMP_THIEF);
|
GiveIMPRandomItems(pProfile,IMP_THIEF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL: Now that all items have been issued, distribute them into appropriate pockets, starting with the largest items
|
||||||
|
DistributeInitialGear(pProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MakeProfileInvItemAnySlot(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany)
|
void MakeProfileInvItemAnySlot(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany)
|
||||||
{
|
{
|
||||||
INT32 iSlot;
|
INT32 iSlot = -1;
|
||||||
|
|
||||||
iSlot = FirstFreeBigEnoughPocket(pProfile, usItem, ubHowMany);
|
if((UsingNewInventorySystem() == false))
|
||||||
|
iSlot = FirstFreeBigEnoughPocket(pProfile, usItem, ubHowMany);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// CHRISL: Alter the placement of initial equipment to come last. At this stage, just add items, one pocket at a time
|
||||||
|
for(int i=INV_START_POS; i<NUM_INV_SLOTS; i++)
|
||||||
|
{
|
||||||
|
if(pProfile->inv[i] == NOTHING)
|
||||||
|
{
|
||||||
|
iSlot = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (iSlot == -1)
|
if (iSlot == -1)
|
||||||
{
|
{
|
||||||
@@ -610,14 +780,255 @@ void MakeProfileInvItemAnySlot(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8
|
|||||||
MakeProfileInvItemThisSlot(pProfile, iSlot, usItem, ubStatus, ubHowMany);
|
MakeProfileInvItemThisSlot(pProfile, iSlot, usItem, ubStatus, ubHowMany);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL: New function to move initial gear into LBE pockets when LBE items are given during creation
|
||||||
|
void RedistributeStartingItems(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 sPocket)
|
||||||
|
{
|
||||||
|
UINT16 lbeIndex;
|
||||||
|
UINT8 lbeClass, iSize;
|
||||||
|
UINT16 inv[NUM_INV_SLOTS], istatus[NUM_INV_SLOTS], inumber[NUM_INV_SLOTS];
|
||||||
|
|
||||||
|
lbeIndex = Item[usItem].ubClassIndex;
|
||||||
|
lbeClass = LoadBearingEquipment[lbeIndex].lbeClass;
|
||||||
|
|
||||||
|
// Move non-worn items into temporary storage
|
||||||
|
for(int i=INV_START_POS; i<NUM_INV_SLOTS; i++)
|
||||||
|
{
|
||||||
|
if(i>=BODYPOSFINAL)
|
||||||
|
{
|
||||||
|
inv[i] = pProfile->inv[i];
|
||||||
|
istatus[i] = pProfile->bInvStatus[i];
|
||||||
|
inumber[i] = pProfile->bInvNumber[i];
|
||||||
|
pProfile->inv[i] = 0;
|
||||||
|
pProfile->bInvStatus[i] = 0;
|
||||||
|
pProfile->bInvNumber[i] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case HANDPOS:
|
||||||
|
case SECONDHANDPOS:
|
||||||
|
inv[i] = pProfile->inv[i];
|
||||||
|
istatus[i] = pProfile->bInvStatus[i];
|
||||||
|
inumber[i] = pProfile->bInvNumber[i];
|
||||||
|
pProfile->inv[i] = 0;
|
||||||
|
pProfile->bInvStatus[i] = 0;
|
||||||
|
pProfile->bInvNumber[i] = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
inv[i] = 0;
|
||||||
|
istatus[i] = 0;
|
||||||
|
inumber[i] = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Redistribute stored items with the assumption of the new LBE item
|
||||||
|
for(int i=INV_START_POS; i<NUM_INV_SLOTS; i++)
|
||||||
|
{
|
||||||
|
if(inv[i] != NONE)
|
||||||
|
{
|
||||||
|
iSize = Item[inv[i]].ItemSize;
|
||||||
|
for(int j=INV_START_POS; j<NUM_INV_SLOTS; j++)
|
||||||
|
{
|
||||||
|
if(icLBE[j] == sPocket && pProfile->inv[j] == NONE && LBEPocketType[LoadBearingEquipment[lbeIndex].lbePocketIndex[icPocket[j]]].ItemCapacityPerSize[iSize] != NONE)
|
||||||
|
{
|
||||||
|
pProfile->inv[j] = inv[i];
|
||||||
|
pProfile->bInvStatus[j] = istatus[i];
|
||||||
|
pProfile->bInvNumber[j] = inumber[i];
|
||||||
|
inv[i] = istatus[i] = inumber[i] = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pProfile->inv[i] = inv[i];
|
||||||
|
pProfile->bInvStatus[i] = istatus[i];
|
||||||
|
pProfile->bInvNumber[i] = inumber[i];
|
||||||
|
inv[i] = istatus[i] = inumber[i] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// CHRISL: New function to work with LBE pockets
|
||||||
|
INT32 SpecificFreePocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany, UINT32 usClass)
|
||||||
|
{
|
||||||
|
UINT8 lbePocket;
|
||||||
|
|
||||||
|
if (ubHowMany == 1)
|
||||||
|
{
|
||||||
|
switch (usClass)
|
||||||
|
{
|
||||||
|
case IC_LBEGEAR:
|
||||||
|
if(pProfile->inv[VESTPOCKPOS]==NONE && LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass==VEST_PACK)
|
||||||
|
return VESTPOCKPOS;
|
||||||
|
if(pProfile->inv[LTHIGHPOCKPOS]==NONE && LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass==THIGH_PACK)
|
||||||
|
return LTHIGHPOCKPOS;
|
||||||
|
if(pProfile->inv[RTHIGHPOCKPOS]==NONE && LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass==THIGH_PACK)
|
||||||
|
return RTHIGHPOCKPOS;
|
||||||
|
if(LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass==COMBAT_PACK)
|
||||||
|
{
|
||||||
|
if(pProfile->inv[CPACKPOCKPOS]==NONE)
|
||||||
|
{
|
||||||
|
if(LoadBearingEquipment[Item[usItem].ubClassIndex].lbeCombo!=0)
|
||||||
|
{
|
||||||
|
if((pProfile->inv[BPACKPOCKPOS]!=NONE && LoadBearingEquipment[Item[pProfile->inv[BPACKPOCKPOS]].ubClassIndex].lbeCombo==LoadBearingEquipment[Item[usItem].ubClassIndex].lbeCombo) || pProfile->inv[BPACKPOCKPOS]==NONE)
|
||||||
|
return CPACKPOCKPOS;
|
||||||
|
}
|
||||||
|
else if(pProfile->inv[BPACKPOCKPOS]==NONE)
|
||||||
|
return CPACKPOCKPOS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass==BACKPACK)
|
||||||
|
{
|
||||||
|
if(pProfile->inv[BPACKPOCKPOS]==NONE)
|
||||||
|
{
|
||||||
|
if(LoadBearingEquipment[Item[usItem].ubClassIndex].lbeCombo!=0)
|
||||||
|
{
|
||||||
|
if((pProfile->inv[CPACKPOCKPOS]!=NONE && LoadBearingEquipment[Item[pProfile->inv[CPACKPOCKPOS]].ubClassIndex].lbeCombo==LoadBearingEquipment[Item[usItem].ubClassIndex].lbeCombo) || pProfile->inv[CPACKPOCKPOS]==NONE)
|
||||||
|
return BPACKPOCKPOS;
|
||||||
|
}
|
||||||
|
else if(pProfile->inv[CPACKPOCKPOS]==NONE)
|
||||||
|
return BPACKPOCKPOS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case IC_ARMOUR:
|
||||||
|
if ( pProfile->inv[HELMETPOS] == NONE && Armour[Item[usItem].ubClassIndex].ubArmourClass == ARMOURCLASS_HELMET )
|
||||||
|
return HELMETPOS;
|
||||||
|
if ( pProfile->inv[VESTPOS] == NONE && Armour[Item[usItem].ubClassIndex].ubArmourClass == ARMOURCLASS_VEST )
|
||||||
|
return VESTPOS;
|
||||||
|
if ( pProfile->inv[LEGPOS] == NONE && Armour[Item[usItem].ubClassIndex].ubArmourClass == ARMOURCLASS_LEGGINGS && !(Item[usItem].attachment))
|
||||||
|
return LEGPOS;
|
||||||
|
break;
|
||||||
|
case IC_BLADE:
|
||||||
|
if ( pProfile->inv[KNIFEPOCKPOS] == NONE)
|
||||||
|
return KNIFEPOCKPOS;
|
||||||
|
break;
|
||||||
|
/* CHRISL: This won't work without hard coding pocket definitions since there is no way to
|
||||||
|
guarantee that the pocket definitions won't change. */
|
||||||
|
// case IC_BOMB:
|
||||||
|
// for(int i=BIGPOCKSTART; i<NUM_INV_SLOTS; i++)
|
||||||
|
// {
|
||||||
|
// if(LoadBearingEquipment[Item[pProfile->inv[icLBE[i]]].ubClassIndex].lbePocketIndex[icPocket[i]]==7) // TNT Pocket
|
||||||
|
// if(pProfile->inv[i] == NONE)
|
||||||
|
// return i;
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
// case IC_GRENADE:
|
||||||
|
// for(int i=BIGPOCKSTART; i<NUM_INV_SLOTS; i++)
|
||||||
|
// {
|
||||||
|
// if(pProfile->inv[i]==NONE && Item[usItem].ItemSize==16 && LoadBearingEquipment[Item[pProfile->inv[icLBE[i]]].ubClassIndex].lbePocketIndex[icPocket[i]]==12) // Rifle Grenade
|
||||||
|
// return i;
|
||||||
|
// else if(pProfile->inv[i]==NONE && LoadBearingEquipment[Item[pProfile->inv[icLBE[i]]].ubClassIndex].lbePocketIndex[icPocket[i]]==13) // Grenade
|
||||||
|
// return i;
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
|
case IC_GUN:
|
||||||
|
if ( pProfile->inv[HANDPOS] == NONE )
|
||||||
|
return HANDPOS;
|
||||||
|
if ( pProfile->inv[SECONDHANDPOS] == NONE && !(Item[pProfile->inv[HANDPOS]].twohanded))
|
||||||
|
return SECONDHANDPOS;
|
||||||
|
if((UsingNewInventorySystem() == true))
|
||||||
|
if ( pProfile->inv[GUNSLINGPOCKPOS] == NONE && pProfile->inv[BPACKPOCKPOS] == NONE && LBEPocketType[1].ItemCapacityPerSize[Item[usItem].ItemSize]!=0)
|
||||||
|
return GUNSLINGPOCKPOS;
|
||||||
|
for(int i=BIGPOCKSTART; i<NUM_INV_SLOTS; i++)
|
||||||
|
{
|
||||||
|
lbePocket = LoadBearingEquipment[Item[pProfile->inv[icLBE[i]]].ubClassIndex].lbePocketIndex[icPocket[i]];
|
||||||
|
if(pProfile->inv[i]==NONE && (lbePocket==6 || lbePocket==10) && LBEPocketType[lbePocket].ItemCapacityPerSize[Item[usItem].ItemSize]!=0)
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case IC_FACE:
|
||||||
|
if ( pProfile->inv[HEAD1POS] == NONE && CompatibleFaceItem(usItem,pProfile->inv[HEAD2POS]) )
|
||||||
|
return HEAD1POS;
|
||||||
|
if ( pProfile->inv[HEAD2POS] == NONE && CompatibleFaceItem(usItem,pProfile->inv[HEAD1POS]) )
|
||||||
|
return HEAD2POS;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MakeProfileInvItemThisSlot(MERCPROFILESTRUCT *pProfile, UINT32 uiPos, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany)
|
void MakeProfileInvItemThisSlot(MERCPROFILESTRUCT *pProfile, UINT32 uiPos, UINT16 usItem, UINT8 ubStatus, UINT8 ubHowMany)
|
||||||
{
|
{
|
||||||
pProfile->inv[uiPos] = usItem;
|
pProfile->inv[uiPos] = usItem;
|
||||||
pProfile->bInvStatus[uiPos] = ubStatus;
|
pProfile->bInvStatus[uiPos] = ubStatus;
|
||||||
pProfile->bInvNumber[uiPos] = ubHowMany;
|
pProfile->bInvNumber[uiPos] = ubHowMany;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany, UINT32 usClass)
|
||||||
|
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, INVNODE *tInv)
|
||||||
|
{
|
||||||
|
INT32 sPocket=-1, mPocket=-1, lPocket=-1;
|
||||||
|
UINT8 sCapacity=0;
|
||||||
|
UINT8 mCapacity=0;
|
||||||
|
UINT8 lCapacity=0;
|
||||||
|
UINT8 capacity=0;
|
||||||
|
|
||||||
|
/*CHRISL: Make the assumption that by the time we get to this function, we've already activated
|
||||||
|
all the pockets we're going to activate. LBE Items were all placed in SpecificFreePocket function
|
||||||
|
which should activate everything. */
|
||||||
|
//Start with active big pockets
|
||||||
|
sPocket=PickPocket(pProfile, SMALLPOCKSTART, SMALLPOCKFINAL, tInv->inv, tInv->iNumber, &sCapacity);
|
||||||
|
//Next search active medium pockets
|
||||||
|
mPocket=PickPocket(pProfile, MEDPOCKSTART, MEDPOCKFINAL, tInv->inv, tInv->iNumber, &mCapacity);
|
||||||
|
//Lastly search active small pockets
|
||||||
|
lPocket=PickPocket(pProfile, BIGPOCKSTART, BIGPOCKFINAL, tInv->inv, tInv->iNumber, &lCapacity);
|
||||||
|
//Finally, compare the three pockets we've found and return the pocket that is most logical to use
|
||||||
|
capacity = min(sCapacity, mCapacity);
|
||||||
|
capacity = min(lCapacity, capacity);
|
||||||
|
if(capacity == 254) { //no pocket found
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
else if(capacity == sCapacity) {
|
||||||
|
return sPocket;
|
||||||
|
}
|
||||||
|
else if(capacity == mCapacity) {
|
||||||
|
return mPocket;
|
||||||
|
}
|
||||||
|
else if(capacity == lCapacity) {
|
||||||
|
return lPocket;
|
||||||
|
}
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// CHRISL: Use to find best pocket to store item in. Could probably be merged with FitsInSmallPocket
|
||||||
|
INT32 PickPocket(MERCPROFILESTRUCT *pProfile, UINT8 ppStart, UINT8 ppStop, UINT16 usItem, UINT8 iNumber, UINT8 * cap)
|
||||||
|
{
|
||||||
|
UINT16 pIndex=0;
|
||||||
|
INT32 pocket=0;
|
||||||
|
UINT8 capacity=254;
|
||||||
|
|
||||||
|
for(UINT32 uiPos=ppStart; uiPos<ppStop; uiPos++){
|
||||||
|
if(pProfile->inv[icLBE[uiPos]]==0){
|
||||||
|
pIndex=LoadBearingEquipment[Item[icDefault[uiPos]].ubClassIndex].lbePocketIndex[icPocket[uiPos]];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pIndex=LoadBearingEquipment[Item[pProfile->inv[icLBE[uiPos]]].ubClassIndex].lbePocketIndex[icPocket[uiPos]];
|
||||||
|
}
|
||||||
|
// Here's were we get complicated. We should look for the smallest pocket all items can fit in
|
||||||
|
if(LBEPocketType[pIndex].ItemCapacityPerSize[Item[usItem].ItemSize] >= iNumber &&
|
||||||
|
LBEPocketType[pIndex].ItemCapacityPerSize[Item[usItem].ItemSize] < capacity &&
|
||||||
|
pProfile->inv[uiPos] == 0) {
|
||||||
|
if((LBEPocketType[pIndex].pRestriction != 0 && LBEPocketType[pIndex].pRestriction == Item[usItem].usItemClass) ||
|
||||||
|
LBEPocketType[pIndex].pRestriction == 0) {
|
||||||
|
capacity = LBEPocketType[pIndex].ItemCapacityPerSize[Item[usItem].ItemSize];
|
||||||
|
pocket = uiPos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(pocket!=0){
|
||||||
|
*cap=capacity;
|
||||||
|
return pocket;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
*cap=254;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany)
|
INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHowMany)
|
||||||
{
|
{
|
||||||
@@ -667,13 +1078,54 @@ INT32 FirstFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8
|
|||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CHRISL: This function will place objects anywhere it can. It tries to use active pockets but will use any pocket as a last resort
|
||||||
|
INT32 AnyFreeBigEnoughPocket(MERCPROFILESTRUCT *pProfile, INVNODE *tInv)
|
||||||
|
{
|
||||||
|
INT32 iSlot;
|
||||||
|
INT32 iPos;
|
||||||
|
UINT16 iSize, lbeCap, usItem;
|
||||||
|
|
||||||
|
iSlot = FirstFreeBigEnoughPocket (pProfile, tInv);
|
||||||
|
if(iSlot != -1)
|
||||||
|
return(iSlot);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* CHRISL: FAILSAFE: We can't find any active pockets to put this item. Rather then losing the item,
|
||||||
|
put it in any pocket using old inventory method. Player can then manually resort items later. */
|
||||||
|
usItem = tInv->inv;
|
||||||
|
iSize = Item[usItem].ubPerPocket;
|
||||||
|
lbeCap = max(1, (iSize/2));
|
||||||
|
for(iPos = BIGPOCKSTART; iPos < NUM_INV_SLOTS; iPos ++)
|
||||||
|
{
|
||||||
|
if(iPos >= MEDPOCKFINAL && iSize > 0)
|
||||||
|
return(-1);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(pProfile->inv[iPos] == NONE)
|
||||||
|
return(iPos);
|
||||||
|
else if(pProfile->inv[iPos] == usItem)
|
||||||
|
{
|
||||||
|
if((iPos < BIGPOCKFINAL && iSize >= (tInv->iNumber+1)) || (iPos >= BIGPOCKFINAL && lbeCap >= (tInv->iNumber+1)))
|
||||||
|
{
|
||||||
|
tInv->iNumber++;
|
||||||
|
return(iPos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void WriteOutCurrentImpCharacter( INT32 iProfileId )
|
void WriteOutCurrentImpCharacter( INT32 iProfileId )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: IMP.dat"));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: IMP.dat"));
|
||||||
char zImpFileName[13];
|
char zImpFileName[13];
|
||||||
strcpy(zImpFileName,IMP_MERC_FILENAME);
|
strcpy(zImpFileName,IMP_MERC_FILENAME);
|
||||||
strcat(zImpFileName,IMP_FILENAME_SUFFIX);
|
// Changed by ADB, rev 1513, to resolve IMPs created prior to structural changes
|
||||||
|
//strcat(zImpFileName,IMP_FILENAME_SUFFIX);
|
||||||
|
strcat(zImpFileName,NEW_IMP_FILENAME_SUFFIX);
|
||||||
WriteOutCurrentImpCharacter ( iProfileId, zImpFileName);
|
WriteOutCurrentImpCharacter ( iProfileId, zImpFileName);
|
||||||
|
|
||||||
|
|
||||||
@@ -688,7 +1140,9 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId )
|
|||||||
zFileName[i] = temp;
|
zFileName[i] = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcat(zFileName,IMP_FILENAME_SUFFIX);
|
// Changed by ADB, rev 1513
|
||||||
|
//strcat(zFileName,IMP_FILENAME_SUFFIX);
|
||||||
|
strcat(zFileName,NEW_IMP_FILENAME_SUFFIX);
|
||||||
|
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: %s", zFileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: %s", zFileName));
|
||||||
WriteOutCurrentImpCharacter ( iProfileId, zFileName);
|
WriteOutCurrentImpCharacter ( iProfileId, zFileName);
|
||||||
@@ -704,6 +1158,23 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId, STR fileName )
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: %s", fileName));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: %s", fileName));
|
||||||
hFile = FileOpen(fileName, FILE_ACCESS_WRITE | FILE_CREATE_ALWAYS, FALSE);
|
hFile = FileOpen(fileName, FILE_ACCESS_WRITE | FILE_CREATE_ALWAYS, FALSE);
|
||||||
|
|
||||||
|
// ADB we need to indicate that we have saved under the new format
|
||||||
|
int nine = 9999;
|
||||||
|
if (!FileWrite(hFile, &nine, sizeof( INT32 ), &uiBytesWritten))
|
||||||
|
{
|
||||||
|
if (hFile)
|
||||||
|
FileClose(hFile);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int version = SAVE_GAME_VERSION;
|
||||||
|
if (!FileWrite(hFile, &version, sizeof( INT32 ), &uiBytesWritten))
|
||||||
|
{
|
||||||
|
if (hFile)
|
||||||
|
FileClose(hFile);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// write out the profile id
|
// write out the profile id
|
||||||
if (!FileWrite(hFile, &iProfileId, sizeof( INT32 ), &uiBytesWritten))
|
if (!FileWrite(hFile, &iProfileId, sizeof( INT32 ), &uiBytesWritten))
|
||||||
{
|
{
|
||||||
@@ -721,9 +1192,7 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId, STR fileName )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// write out the profile itself
|
// write out the profile itself
|
||||||
// WDS - Clean up inventory handling
|
if ( !gMercProfiles[ iProfileId ].Save(hFile) )
|
||||||
gMercProfiles[ iProfileId ].CopyNewInventoryToOld();
|
|
||||||
if (!FileWrite(hFile, &gMercProfiles[ iProfileId ], SIZEOF_MERCPROFILESTRUCT_POD, &uiBytesWritten))
|
|
||||||
{
|
{
|
||||||
if (hFile)
|
if (hFile)
|
||||||
FileClose(hFile);
|
FileClose(hFile);
|
||||||
@@ -739,15 +1208,28 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId, STR fileName )
|
|||||||
|
|
||||||
BOOLEAN ImpExists ( STR nickName )
|
BOOLEAN ImpExists ( STR nickName )
|
||||||
{
|
{
|
||||||
|
// Changed by ADB, rev 1513, to resolve IMPs created prior to structural changes
|
||||||
char zFileName[13];
|
char zFileName[13];
|
||||||
|
|
||||||
strcpy(zFileName,nickName);
|
strcpy(zFileName,nickName);
|
||||||
strcat(zFileName,IMP_FILENAME_SUFFIX);
|
//strcat(zFileName,IMP_FILENAME_SUFFIX);
|
||||||
|
strcat(zFileName,OLD_IMP_FILENAME_SUFFIX);
|
||||||
|
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("ImpExists: %s", zFileName));
|
//DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("ImpExists: %s", zFileName));
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("ImpExists: %d", FileExistsNoDB(zFileName) ));
|
//DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("ImpExists: %d", FileExistsNoDB(zFileName) ));
|
||||||
|
BOOLEAN oldExists = FileExistsNoDB(zFileName);
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("OLD ImpExists: %s", zFileName));
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("OLD ImpExists: %d", oldExists ));
|
||||||
|
|
||||||
return FileExistsNoDB(zFileName);
|
//return FileExistsNoDB(zFileName);
|
||||||
|
strcpy(zFileName,nickName);
|
||||||
|
strcat(zFileName,NEW_IMP_FILENAME_SUFFIX);
|
||||||
|
|
||||||
|
BOOLEAN newExists = FileExistsNoDB(zFileName);
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("NEW ImpExists: %s", zFileName));
|
||||||
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("NEW ImpExists: %d", newExists ));
|
||||||
|
|
||||||
|
return (oldExists || newExists);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN LoadImpCharacter( STR nickName )
|
BOOLEAN LoadImpCharacter( STR nickName )
|
||||||
@@ -758,25 +1240,61 @@ BOOLEAN LoadImpCharacter( STR nickName )
|
|||||||
|
|
||||||
char zFileName[13];
|
char zFileName[13];
|
||||||
|
|
||||||
|
//ADB first try to load the new kind
|
||||||
strcpy(zFileName,nickName);
|
strcpy(zFileName,nickName);
|
||||||
strcat(zFileName,IMP_FILENAME_SUFFIX);
|
//strcat(zFileName,IMP_FILENAME_SUFFIX);
|
||||||
|
strcat(zFileName,NEW_IMP_FILENAME_SUFFIX);
|
||||||
|
|
||||||
// open the file for writing
|
// open the file for reading
|
||||||
hFile = FileOpen(zFileName, FILE_ACCESS_READ, FALSE);
|
hFile = FileOpen(zFileName, FILE_ACCESS_READ, FALSE);
|
||||||
|
|
||||||
// valid file?
|
// valid file?
|
||||||
if( hFile == -1 )
|
if( !hFile )
|
||||||
|
{
|
||||||
|
//DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
|
//return FALSE;
|
||||||
|
//if the new kind doesn't exist, load the old kind
|
||||||
|
strcpy(zFileName,nickName);
|
||||||
|
strcat(zFileName,OLD_IMP_FILENAME_SUFFIX);
|
||||||
|
|
||||||
|
// open the file for reading
|
||||||
|
hFile = FileOpen(zFileName, FILE_ACCESS_READ, FALSE);
|
||||||
|
|
||||||
|
// valid file?
|
||||||
|
if( !hFile )
|
||||||
|
{
|
||||||
|
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// read in the profile
|
||||||
|
if (!FileRead(hFile, &iProfileId, sizeof( INT32 ), &uiBytesRead))
|
||||||
{
|
{
|
||||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// read in the profile
|
int version = SAVE_GAME_VERSION;
|
||||||
|
bool isOldVersion = true;
|
||||||
|
if (iProfileId == 9999) {
|
||||||
|
//ADB if we saved under the original version, then iProfileId is some low number
|
||||||
|
//if we saved under the new version, then it's 9999, and we need to know what version it was saved under
|
||||||
|
isOldVersion = false;
|
||||||
|
|
||||||
if (!FileRead(hFile, &iProfileId, sizeof( INT32 ), &uiBytesRead))
|
//load the version, atm not used
|
||||||
{
|
if (!FileRead(hFile, &version, sizeof( INT32 ), &uiBytesRead))
|
||||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
{
|
||||||
return FALSE;
|
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
//load the REAL iProfileId
|
||||||
|
if (!FileRead(hFile, &iProfileId, sizeof( INT32 ), &uiBytesRead))
|
||||||
|
{
|
||||||
|
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// read in the portrait
|
// read in the portrait
|
||||||
@@ -795,17 +1313,19 @@ BOOLEAN LoadImpCharacter( STR nickName )
|
|||||||
LaptopSaveInfo.iIMPIndex = iProfileId;
|
LaptopSaveInfo.iIMPIndex = iProfileId;
|
||||||
|
|
||||||
// read in the profile
|
// read in the profile
|
||||||
// WDS - Clean up inventory handling
|
//if ( !gMercProfiles[ iProfileId ].Load(hFile, false) )
|
||||||
if (!FileRead(hFile, &gMercProfiles[ iProfileId ] , SIZEOF_MERCPROFILESTRUCT_POD, &uiBytesRead))
|
if ( !gMercProfiles[ iProfileId ].Load(hFile, isOldVersion, false, false) )
|
||||||
{
|
{
|
||||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
gMercProfiles[ iProfileId ].CopyOldInventoryToNew();
|
|
||||||
|
|
||||||
// close file
|
// close file
|
||||||
FileClose(hFile);
|
FileClose(hFile);
|
||||||
|
|
||||||
|
//CHRISL: At this point, we need to resort profile inventory so that NewInv items don't accidentally appear in OldInv
|
||||||
|
DistributeInitialGear(&gMercProfiles[iProfileId]);
|
||||||
|
|
||||||
if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
|
if( LaptopSaveInfo.iCurrentBalance < COST_OF_PROFILE )
|
||||||
{
|
{
|
||||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 3 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 3 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
@@ -837,7 +1357,7 @@ BOOLEAN LoadImpCharacter( STR nickName )
|
|||||||
FileClose(hFile);
|
FileClose(hFile);
|
||||||
|
|
||||||
// WDS: Allow flexible numbers of IMPs of each sex
|
// WDS: Allow flexible numbers of IMPs of each sex
|
||||||
// note: check this
|
// note: check this
|
||||||
|
|
||||||
// You cannot have more than 3 I.M.P characters with the same gender on your team.
|
// You cannot have more than 3 I.M.P characters with the same gender on your team.
|
||||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 9 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 9 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||||
@@ -849,18 +1369,18 @@ BOOLEAN LoadImpCharacter( STR nickName )
|
|||||||
|
|
||||||
void ResetIMPCharactersEyesAndMouthOffsets( UINT8 ubMercProfileID )
|
void ResetIMPCharactersEyesAndMouthOffsets( UINT8 ubMercProfileID )
|
||||||
{
|
{
|
||||||
// ATE: Check boundary conditions!
|
// ATE: Check boundary conditions!
|
||||||
if( ( ( gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ) > 16 ) || ( ubMercProfileID >= PROF_HUMMER ) )
|
if( ( ( gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ) > 16 ) || ( ubMercProfileID >= PROF_HUMMER ) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gMercProfiles[ ubMercProfileID ].usEyesX = uiEyeXPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
|
gMercProfiles[ ubMercProfileID ].usEyesX = uiEyeXPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
|
||||||
gMercProfiles[ ubMercProfileID ].usEyesY = uiEyeYPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
|
gMercProfiles[ ubMercProfileID ].usEyesY = uiEyeYPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
|
||||||
|
|
||||||
|
|
||||||
gMercProfiles[ ubMercProfileID ].usMouthX = uiMouthXPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
|
gMercProfiles[ ubMercProfileID ].usMouthX = uiMouthXPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
|
||||||
gMercProfiles[ ubMercProfileID ].usMouthY = uiMouthYPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
|
gMercProfiles[ ubMercProfileID ].usMouthY = uiMouthYPositions[ gMercProfiles[ ubMercProfileID ].ubFaceIndex - 200 ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -927,7 +1447,9 @@ void GiveIMPItems( MERCPROFILESTRUCT *pProfile, INT8 abilityValue, UINT8 typeInd
|
|||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: 2 iChoice = %d",iChoice));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: 2 iChoice = %d",iChoice));
|
||||||
usItem = gIMPItemChoices[ typeIndex ].bItemNo[ iChoice ];
|
usItem = gIMPItemChoices[ typeIndex ].bItemNo[ iChoice ];
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: typeIndex = %d, usItem = %d, iChoice = %d, abilityValue = %d",typeIndex, usItem,iChoice, abilityValue ));
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: typeIndex = %d, usItem = %d, iChoice = %d, abilityValue = %d",typeIndex, usItem,iChoice, abilityValue ));
|
||||||
if ( usItem > 0 && ItemIsLegal(usItem))
|
//CHRISL: Let "illegal" guns be allowed so we don't have to worry about an IMP failing to start with a weapon simply
|
||||||
|
// because Tons of Guns was not selected.
|
||||||
|
if ( usItem > 0 && (ItemIsLegal(usItem) || Item[usItem].usItemClass == IC_GUN))
|
||||||
{
|
{
|
||||||
MakeProfileInvItemAnySlot(pProfile,usItem,100,1);
|
MakeProfileInvItemAnySlot(pProfile,usItem,100,1);
|
||||||
|
|
||||||
@@ -956,3 +1478,4 @@ void GiveIMPItems( MERCPROFILESTRUCT *pProfile, INT8 abilityValue, UINT8 typeInd
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+188
-188
@@ -33,7 +33,7 @@
|
|||||||
#define MAIN_PAGE__FIRST_BUTTON_POS_X ( LAPTOP_SCREEN_UL_X + 15 )
|
#define MAIN_PAGE__FIRST_BUTTON_POS_X ( LAPTOP_SCREEN_UL_X + 15 )
|
||||||
#define MAIN_PAGE__SECOND_BUTTON_POS_X ( MAIN_PAGE__FIRST_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
|
#define MAIN_PAGE__SECOND_BUTTON_POS_X ( MAIN_PAGE__FIRST_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
|
||||||
#define MAIN_PAGE__THIRD_BUTTON_POS_X ( MAIN_PAGE__SECOND_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
|
#define MAIN_PAGE__THIRD_BUTTON_POS_X ( MAIN_PAGE__SECOND_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
|
||||||
#define MAIN_PAGE__FOURTH_BUTTON_POS_X (MAIN_PAGE__THIRD_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
|
#define MAIN_PAGE__FOURTH_BUTTON_POS_X (MAIN_PAGE__THIRD_BUTTON_POS_X + MAIN_PAGE_SPACE_BTN_BUTTONS )
|
||||||
|
|
||||||
// buttons
|
// buttons
|
||||||
INT32 giIMPFinishButton[ 6 ];
|
INT32 giIMPFinishButton[ 6 ];
|
||||||
@@ -85,7 +85,7 @@ void EnterIMPFinish( void )
|
|||||||
LoadCharacterPortrait( );
|
LoadCharacterPortrait( );
|
||||||
|
|
||||||
// CREATE buttons for IMP finish screen
|
// CREATE buttons for IMP finish screen
|
||||||
CreateIMPFinishButtons( );
|
CreateIMPFinishButtons( );
|
||||||
|
|
||||||
// set review mode
|
// set review mode
|
||||||
fReviewStats = TRUE;
|
fReviewStats = TRUE;
|
||||||
@@ -100,14 +100,14 @@ void EnterIMPFinish( void )
|
|||||||
|
|
||||||
void RenderIMPFinish( void )
|
void RenderIMPFinish( void )
|
||||||
{
|
{
|
||||||
// the background
|
// the background
|
||||||
RenderProfileBackGround( );
|
RenderProfileBackGround( );
|
||||||
|
|
||||||
// render merc fullname
|
// render merc fullname
|
||||||
RenderCharFullName( );
|
RenderCharFullName( );
|
||||||
|
|
||||||
// indent for text
|
// indent for text
|
||||||
RenderBeginIndent( 110, 50 );
|
RenderBeginIndent( 110, 50 );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ void ExitIMPFinish( void )
|
|||||||
{
|
{
|
||||||
|
|
||||||
// remove buttons for IMP finish screen
|
// remove buttons for IMP finish screen
|
||||||
DeleteIMPFinishButtons( );
|
DeleteIMPFinishButtons( );
|
||||||
|
|
||||||
// get rid of graphic for portrait
|
// get rid of graphic for portrait
|
||||||
DestroyCharacterPortrait( );
|
DestroyCharacterPortrait( );
|
||||||
@@ -129,7 +129,7 @@ void HandleIMPFinish( void )
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -138,103 +138,103 @@ void CreateIMPFinishButtons( void )
|
|||||||
{
|
{
|
||||||
CHAR16 sString[ 128 ];
|
CHAR16 sString[ 128 ];
|
||||||
|
|
||||||
// this function will create the buttons needed for th IMP about us page
|
// this function will create the buttons needed for th IMP about us page
|
||||||
// the start over button button
|
// the start over button button
|
||||||
giIMPFinishButtonImage[0]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
giIMPFinishButtonImage[0]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||||
/*giIMPFinishButton[0] = QuickCreateButton( giIMPFinishButtonImage[0], LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 114 ),
|
/*giIMPFinishButton[0] = QuickCreateButton( giIMPFinishButtonImage[0], LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 114 ),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishStartOverCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishStartOverCallback);
|
||||||
*/
|
*/
|
||||||
giIMPFinishButton[ 0 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 0 ], pImpButtonText[ 7 ], FONT12ARIAL,
|
giIMPFinishButton[ 0 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 0 ], pImpButtonText[ 7 ], FONT12ARIAL,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 174 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 174 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishStartOverCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishStartOverCallback);
|
||||||
|
|
||||||
// the done button
|
// the done button
|
||||||
giIMPFinishButtonImage[1]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
giIMPFinishButtonImage[1]= LoadButtonImage( "LAPTOP\\button_2.sti" ,-1,0,-1,1,-1 );
|
||||||
/* giIMPFinishButton[1] = QuickCreateButton( giIMPFinishButtonImage[1], LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 174 ),
|
/* giIMPFinishButton[1] = QuickCreateButton( giIMPFinishButtonImage[1], LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 174 ),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishDoneCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishDoneCallback);
|
||||||
*/
|
*/
|
||||||
giIMPFinishButton[ 1 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 1 ], pImpButtonText[ 6 ], FONT12ARIAL,
|
giIMPFinishButton[ 1 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 1 ], pImpButtonText[ 6 ], FONT12ARIAL,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 114 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
LAPTOP_SCREEN_UL_X + 136 , LAPTOP_SCREEN_WEB_UL_Y + ( 114 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishDoneCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishDoneCallback);
|
||||||
|
|
||||||
// the personality button
|
// the personality button
|
||||||
giIMPFinishButtonImage[2]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
giIMPFinishButtonImage[2]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
||||||
|
|
||||||
/* giIMPFinishButton[2] = QuickCreateButton( giIMPFinishButtonImage[2], LAPTOP_SCREEN_UL_X + 13 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
/* giIMPFinishButton[2] = QuickCreateButton( giIMPFinishButtonImage[2], LAPTOP_SCREEN_UL_X + 13 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishPersonalityCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishPersonalityCallback);
|
||||||
|
|
||||||
*/ giIMPFinishButton[ 2 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 2 ], pImpButtonText[ 2 ], FONT12ARIAL,
|
*/ giIMPFinishButton[ 2 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 2 ], pImpButtonText[ 2 ], FONT12ARIAL,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
MAIN_PAGE__THIRD_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
MAIN_PAGE__THIRD_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishPersonalityCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishPersonalityCallback);
|
||||||
|
|
||||||
SpecifyButtonIcon( giIMPFinishButton[2] , guiANALYSE, 0, 33, 23, FALSE );
|
SpecifyButtonIcon( giIMPFinishButton[2] , guiANALYSE, 0, 33, 23, FALSE );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// the attribs button
|
// the attribs button
|
||||||
giIMPFinishButtonImage[3]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
giIMPFinishButtonImage[3]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
||||||
/* giIMPFinishButton[3] = QuickCreateButton( giIMPFinishButtonImage[3], LAPTOP_SCREEN_UL_X + 133 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
/* giIMPFinishButton[3] = QuickCreateButton( giIMPFinishButtonImage[3], LAPTOP_SCREEN_UL_X + 133 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishAttributesCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishAttributesCallback);
|
||||||
*/
|
*/
|
||||||
giIMPFinishButton[ 3 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 3 ], pImpButtonText[ 3 ], FONT12ARIAL,
|
giIMPFinishButton[ 3 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 3 ], pImpButtonText[ 3 ], FONT12ARIAL,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
MAIN_PAGE__FOURTH_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
MAIN_PAGE__FOURTH_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishAttributesCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishAttributesCallback);
|
||||||
|
|
||||||
SpecifyButtonIcon( giIMPFinishButton[ 3 ], guiATTRIBUTEGRAPH, 0,
|
SpecifyButtonIcon( giIMPFinishButton[ 3 ], guiATTRIBUTEGRAPH, 0,
|
||||||
25, 25, FALSE );
|
25, 25, FALSE );
|
||||||
|
|
||||||
// the portrait button
|
// the portrait button
|
||||||
giIMPFinishButtonImage[4]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
giIMPFinishButtonImage[4]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
||||||
/* giIMPFinishButton[4] = QuickCreateButton( giIMPFinishButtonImage[4], LAPTOP_SCREEN_UL_X + 253 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
/* giIMPFinishButton[4] = QuickCreateButton( giIMPFinishButtonImage[4], LAPTOP_SCREEN_UL_X + 253 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishPortraitCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishPortraitCallback);
|
||||||
*/
|
*/
|
||||||
giIMPFinishButton[ 4 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 4 ], pImpButtonText[ 4 ], FONT12ARIAL,
|
giIMPFinishButton[ 4 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 4 ], pImpButtonText[ 4 ], FONT12ARIAL,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
MAIN_PAGE__FIRST_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
MAIN_PAGE__FIRST_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPagePortraitCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPagePortraitCallback);
|
||||||
|
|
||||||
SpecifyButtonIcon( giIMPFinishButton[ 4 ], guiCHARACTERPORTRAIT, 0,
|
SpecifyButtonIcon( giIMPFinishButton[ 4 ], guiCHARACTERPORTRAIT, 0,
|
||||||
33, 23, FALSE );
|
33, 23, FALSE );
|
||||||
|
|
||||||
swprintf( sString, pImpButtonText[ 5 ], GetVoiceCountFromVoiceSlot(iCurrentVoice));
|
swprintf( sString, pImpButtonText[ 5 ], GetVoiceCountFromVoiceSlot(iCurrentVoice));
|
||||||
|
|
||||||
// the voice button
|
// the voice button
|
||||||
giIMPFinishButtonImage[5]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
giIMPFinishButtonImage[5]= LoadButtonImage( "LAPTOP\\button_8.sti" ,-1,0,-1,1,-1 );
|
||||||
/* giIMPFinishButton[5] = QuickCreateButton( giIMPFinishButtonImage[5], LAPTOP_SCREEN_UL_X + 373 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
/* giIMPFinishButton[5] = QuickCreateButton( giIMPFinishButtonImage[5], LAPTOP_SCREEN_UL_X + 373 , LAPTOP_SCREEN_WEB_UL_Y + ( 245 ),
|
||||||
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
BUTTON_TOGGLE, MSYS_PRIORITY_HIGHEST - 1,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishVoiceCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPFinishVoiceCallback);
|
||||||
*/
|
*/
|
||||||
giIMPFinishButton[ 5 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 5 ], sString, FONT12ARIAL,
|
giIMPFinishButton[ 5 ] = CreateIconAndTextButton( giIMPFinishButtonImage[ 5 ], sString, FONT12ARIAL,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
FONT_WHITE, DEFAULT_SHADOW,
|
FONT_WHITE, DEFAULT_SHADOW,
|
||||||
TEXT_CJUSTIFIED,
|
TEXT_CJUSTIFIED,
|
||||||
MAIN_PAGE__SECOND_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
MAIN_PAGE__SECOND_BUTTON_POS_X, LAPTOP_SCREEN_WEB_UL_Y + ( 245 ), BUTTON_TOGGLE, MSYS_PRIORITY_HIGH,
|
||||||
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageVoiceCallback);
|
BtnGenericMouseMoveButtonCallback, (GUI_CALLBACK)BtnIMPMainPageVoiceCallback);
|
||||||
|
|
||||||
SpecifyButtonIcon( giIMPFinishButton[ 5 ], guiSMALLSILHOUETTE, 0,
|
SpecifyButtonIcon( giIMPFinishButton[ 5 ], guiSMALLSILHOUETTE, 0,
|
||||||
33, 23, FALSE );
|
33, 23, FALSE );
|
||||||
|
|
||||||
|
|
||||||
SetButtonCursor(giIMPFinishButton[0], CURSOR_WWW);
|
SetButtonCursor(giIMPFinishButton[0], CURSOR_WWW);
|
||||||
SetButtonCursor(giIMPFinishButton[1], CURSOR_WWW);
|
SetButtonCursor(giIMPFinishButton[1], CURSOR_WWW);
|
||||||
SetButtonCursor(giIMPFinishButton[2], CURSOR_WWW);
|
SetButtonCursor(giIMPFinishButton[2], CURSOR_WWW);
|
||||||
SetButtonCursor(giIMPFinishButton[3], CURSOR_WWW);
|
SetButtonCursor(giIMPFinishButton[3], CURSOR_WWW);
|
||||||
@@ -251,31 +251,31 @@ void CreateIMPFinishButtons( void )
|
|||||||
|
|
||||||
void DeleteIMPFinishButtons( void )
|
void DeleteIMPFinishButtons( void )
|
||||||
{
|
{
|
||||||
// this function destroys the buttons needed for the IMP about Us Page
|
// this function destroys the buttons needed for the IMP about Us Page
|
||||||
|
|
||||||
// the back button
|
// the back button
|
||||||
RemoveButton(giIMPFinishButton[0] );
|
RemoveButton(giIMPFinishButton[0] );
|
||||||
UnloadButtonImage(giIMPFinishButtonImage[0] );
|
UnloadButtonImage(giIMPFinishButtonImage[0] );
|
||||||
|
|
||||||
// begin profiling button
|
// begin profiling button
|
||||||
RemoveButton(giIMPFinishButton[1] );
|
RemoveButton(giIMPFinishButton[1] );
|
||||||
UnloadButtonImage(giIMPFinishButtonImage[1] );
|
UnloadButtonImage(giIMPFinishButtonImage[1] );
|
||||||
|
|
||||||
// begin personna button
|
// begin personna button
|
||||||
RemoveButton(giIMPFinishButton[2] );
|
RemoveButton(giIMPFinishButton[2] );
|
||||||
UnloadButtonImage(giIMPFinishButtonImage[2] );
|
UnloadButtonImage(giIMPFinishButtonImage[2] );
|
||||||
|
|
||||||
// begin attribs button
|
// begin attribs button
|
||||||
RemoveButton(giIMPFinishButton[3] );
|
RemoveButton(giIMPFinishButton[3] );
|
||||||
UnloadButtonImage(giIMPFinishButtonImage[3] );
|
UnloadButtonImage(giIMPFinishButtonImage[3] );
|
||||||
|
|
||||||
// begin portrait button
|
// begin portrait button
|
||||||
RemoveButton(giIMPFinishButton[4] );
|
RemoveButton(giIMPFinishButton[4] );
|
||||||
UnloadButtonImage(giIMPFinishButtonImage[4] );
|
UnloadButtonImage(giIMPFinishButtonImage[4] );
|
||||||
|
|
||||||
// begin voice button
|
// begin voice button
|
||||||
RemoveButton(giIMPFinishButton[5] );
|
RemoveButton(giIMPFinishButton[5] );
|
||||||
UnloadButtonImage(giIMPFinishButtonImage[5] );
|
UnloadButtonImage(giIMPFinishButtonImage[5] );
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -291,13 +291,13 @@ void BtnIMPFinishStartOverCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
}
|
}
|
||||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||||
{
|
{
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 1 ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, FinishMessageBoxCallBack);
|
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 1 ], LAPTOP_SCREEN, MSG_BOX_FLAG_YESNO, FinishMessageBoxCallBack);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -314,14 +314,14 @@ void BtnIMPFinishDoneCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
}
|
}
|
||||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||||
{
|
{
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
iCurrentImpPage = IMP_CONFIRM;
|
iCurrentImpPage = IMP_CONFIRM;
|
||||||
CreateACharacterFromPlayerEnteredStats( );
|
CreateACharacterFromPlayerEnteredStats( );
|
||||||
fButtonPendingFlag = TRUE;
|
fButtonPendingFlag = TRUE;
|
||||||
iCurrentProfileMode = IMP__REGISTRY;
|
iCurrentProfileMode = IMP__REGISTRY;
|
||||||
@@ -336,52 +336,52 @@ void BtnIMPFinishPersonalityCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
{
|
{
|
||||||
|
|
||||||
// btn callback for Main Page Begin Profiling
|
// btn callback for Main Page Begin Profiling
|
||||||
static BOOLEAN fAnimateFlag = FALSE;
|
static BOOLEAN fAnimateFlag = FALSE;
|
||||||
static UINT32 uiBaseTime = 0;
|
static UINT32 uiBaseTime = 0;
|
||||||
static BOOLEAN fState = 0;
|
static BOOLEAN fState = 0;
|
||||||
INT32 iDifference = 0;
|
INT32 iDifference = 0;
|
||||||
|
|
||||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
uiBaseTime = GetJA2Clock();
|
uiBaseTime = GetJA2Clock();
|
||||||
SpecifyButtonText( giIMPFinishButton[2], pImpButtonText[ 23 ] );
|
SpecifyButtonText( giIMPFinishButton[2], pImpButtonText[ 23 ] );
|
||||||
fAnimateFlag = TRUE;
|
fAnimateFlag = TRUE;
|
||||||
}
|
}
|
||||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||||
{
|
{
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
fButtonPendingFlag = TRUE;
|
fButtonPendingFlag = TRUE;
|
||||||
uiBaseTime = 0;
|
uiBaseTime = 0;
|
||||||
fAnimateFlag = FALSE;
|
fAnimateFlag = FALSE;
|
||||||
iCurrentImpPage = IMP_PERSONALITY_QUIZ;
|
iCurrentImpPage = IMP_PERSONALITY_QUIZ;
|
||||||
SpecifyButtonText( giIMPFinishButton[2], pImpButtonText[ 2 ] );
|
SpecifyButtonText( giIMPFinishButton[2], pImpButtonText[ 2 ] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// get amount of time between callbacks
|
// get amount of time between callbacks
|
||||||
iDifference = GetJA2Clock() - uiBaseTime;
|
iDifference = GetJA2Clock() - uiBaseTime;
|
||||||
|
|
||||||
if( fAnimateFlag )
|
if( fAnimateFlag )
|
||||||
{
|
{
|
||||||
if( iDifference > ANIMATE_MIN_TIME )
|
if( iDifference > ANIMATE_MIN_TIME )
|
||||||
{
|
{
|
||||||
|
|
||||||
uiBaseTime = GetJA2Clock();
|
uiBaseTime = GetJA2Clock();
|
||||||
if( fState )
|
if( fState )
|
||||||
{
|
{
|
||||||
SpecifyButtonIcon( giIMPFinishButton[2] , guiANALYSE, 1, 33, 23, FALSE );
|
SpecifyButtonIcon( giIMPFinishButton[2] , guiANALYSE, 1, 33, 23, FALSE );
|
||||||
|
|
||||||
fState = FALSE;
|
fState = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SpecifyButtonIcon( giIMPFinishButton[2] , guiANALYSE, 0, 33, 23, FALSE );
|
SpecifyButtonIcon( giIMPFinishButton[2] , guiANALYSE, 0, 33, 23, FALSE );
|
||||||
|
|
||||||
fState = TRUE;
|
fState = TRUE;
|
||||||
}
|
}
|
||||||
@@ -399,7 +399,7 @@ void BtnIMPFinishAttributesCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||||
return;
|
return;
|
||||||
// if not this far in char generation, don't alot ANY action
|
// if not this far in char generation, don't alot ANY action
|
||||||
if( iCurrentProfileMode < IMP__ATTRIBUTES )
|
if( iCurrentProfileMode < IMP__ATTRIBUTES )
|
||||||
{
|
{
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
@@ -409,14 +409,14 @@ void BtnIMPFinishAttributesCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
}
|
}
|
||||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||||
{
|
{
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
iCurrentImpPage = IMP_ATTRIBUTE_PAGE;
|
iCurrentImpPage = IMP_ATTRIBUTE_PAGE;
|
||||||
fButtonPendingFlag = TRUE;
|
fButtonPendingFlag = TRUE;
|
||||||
SpecifyButtonText( giIMPFinishButton[2], pImpButtonText[ 2 ] );
|
SpecifyButtonText( giIMPFinishButton[2], pImpButtonText[ 2 ] );
|
||||||
}
|
}
|
||||||
@@ -430,7 +430,7 @@ void BtnIMPFinishPortraitCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||||
return;
|
return;
|
||||||
// if not this far in char generation, don't alot ANY action
|
// if not this far in char generation, don't alot ANY action
|
||||||
if( iCurrentProfileMode < IMP__PORTRAIT )
|
if( iCurrentProfileMode < IMP__PORTRAIT )
|
||||||
{
|
{
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
@@ -441,16 +441,16 @@ void BtnIMPFinishPortraitCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
sFaceX = 253;
|
sFaceX = 253;
|
||||||
sFaceY = 247;
|
sFaceY = 247;
|
||||||
}
|
}
|
||||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||||
{
|
{
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
sFaceX = 253;
|
sFaceX = 253;
|
||||||
sFaceY = 245;
|
sFaceY = 245;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -464,7 +464,7 @@ void BtnIMPFinishVoiceCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
if (!(btn->uiFlags & BUTTON_ENABLED))
|
if (!(btn->uiFlags & BUTTON_ENABLED))
|
||||||
return;
|
return;
|
||||||
// if not this far in char generation, don't alot ANY action
|
// if not this far in char generation, don't alot ANY action
|
||||||
if( iCurrentProfileMode < IMP__PORTRAIT )
|
if( iCurrentProfileMode < IMP__PORTRAIT )
|
||||||
{
|
{
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
@@ -475,17 +475,17 @@ void BtnIMPFinishVoiceCallback(GUI_BUTTON *btn,INT32 reason)
|
|||||||
|
|
||||||
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
if(reason & MSYS_CALLBACK_REASON_LBUTTON_DWN )
|
||||||
{
|
{
|
||||||
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
btn->uiFlags|=(BUTTON_CLICKED_ON);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
else if(reason & MSYS_CALLBACK_REASON_LBUTTON_UP )
|
||||||
{
|
{
|
||||||
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
if (btn->uiFlags & BUTTON_CLICKED_ON)
|
||||||
{
|
{
|
||||||
// play voice
|
// play voice
|
||||||
if( ! SoundIsPlaying( uiVoiceSound ) )
|
if( ! SoundIsPlaying( uiVoiceSound ) )
|
||||||
{
|
{
|
||||||
uiVoiceSound = PlayVoice( );
|
uiVoiceSound = PlayVoice( );
|
||||||
}
|
}
|
||||||
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
btn->uiFlags&=~(BUTTON_CLICKED_ON);
|
||||||
fButtonPendingFlag = TRUE;
|
fButtonPendingFlag = TRUE;
|
||||||
@@ -498,131 +498,131 @@ WDS - Unused?
|
|||||||
BOOLEAN RenderCharProfileFinishFace( void )
|
BOOLEAN RenderCharProfileFinishFace( void )
|
||||||
{
|
{
|
||||||
// render the portrait of the current picture
|
// render the portrait of the current picture
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
HVOBJECT hHandle;
|
HVOBJECT hHandle;
|
||||||
UINT32 uiGraphicHandle;
|
UINT32 uiGraphicHandle;
|
||||||
|
|
||||||
if( fCharacterIsMale == TRUE )
|
if( fCharacterIsMale == TRUE )
|
||||||
{
|
{
|
||||||
switch( LaptopSaveInfo.iCurrentVoice )
|
switch( LaptopSaveInfo.iCurrentVoice )
|
||||||
{
|
{
|
||||||
case( 0 ):
|
case( 0 ):
|
||||||
// first portrait
|
// first portrait
|
||||||
|
|
||||||
// load it
|
// load it
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
FilenameForBPP("Faces\\SmallFaces\\00.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("Faces\\SmallFaces\\00.sti", VObjectDesc.ImageFile);
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
||||||
|
|
||||||
// show it
|
// show it
|
||||||
GetVideoObject(&hHandle, uiGraphicHandle);
|
GetVideoObject(&hHandle, uiGraphicHandle);
|
||||||
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
|
||||||
// and kick it's sorry ..umm never mind, outta here
|
// and kick it's sorry ..umm never mind, outta here
|
||||||
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case( 1 ):
|
case( 1 ):
|
||||||
// first portrait
|
// first portrait
|
||||||
|
|
||||||
// load it
|
// load it
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
FilenameForBPP("Faces\\SmallFaces\\01.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("Faces\\SmallFaces\\01.sti", VObjectDesc.ImageFile);
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
||||||
|
|
||||||
// show it
|
// show it
|
||||||
GetVideoObject(&hHandle, uiGraphicHandle);
|
GetVideoObject(&hHandle, uiGraphicHandle);
|
||||||
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
|
||||||
// and kick it's sorry ..umm never mind, outta here
|
// and kick it's sorry ..umm never mind, outta here
|
||||||
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case( 2 ):
|
case( 2 ):
|
||||||
// first portrait
|
// first portrait
|
||||||
|
|
||||||
// load it
|
// load it
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
FilenameForBPP("Faces\\SmallFaces\\02.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("Faces\\SmallFaces\\02.sti", VObjectDesc.ImageFile);
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
||||||
|
|
||||||
// show it
|
// show it
|
||||||
GetVideoObject(&hHandle, uiGraphicHandle);
|
GetVideoObject(&hHandle, uiGraphicHandle);
|
||||||
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
|
||||||
// and kick it's sorry ..umm never mind, outta here
|
// and kick it's sorry ..umm never mind, outta here
|
||||||
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch( LaptopSaveInfo.iCurrentVoice )
|
switch( LaptopSaveInfo.iCurrentVoice )
|
||||||
{
|
{
|
||||||
case( 0 ):
|
case( 0 ):
|
||||||
// first portrait
|
// first portrait
|
||||||
|
|
||||||
// load it
|
// load it
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
FilenameForBPP("Faces\\SmallFaces\\03.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("Faces\\SmallFaces\\03.sti", VObjectDesc.ImageFile);
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
||||||
|
|
||||||
// show it
|
// show it
|
||||||
GetVideoObject(&hHandle, uiGraphicHandle);
|
GetVideoObject(&hHandle, uiGraphicHandle);
|
||||||
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
|
||||||
// and kick it's sorry ..umm never mind, outta here
|
// and kick it's sorry ..umm never mind, outta here
|
||||||
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case( 1 ):
|
case( 1 ):
|
||||||
// first portrait
|
// first portrait
|
||||||
|
|
||||||
// load it
|
// load it
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
FilenameForBPP("Faces\\SmallFaces\\04.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("Faces\\SmallFaces\\04.sti", VObjectDesc.ImageFile);
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
||||||
|
|
||||||
// show it
|
// show it
|
||||||
GetVideoObject(&hHandle, uiGraphicHandle);
|
GetVideoObject(&hHandle, uiGraphicHandle);
|
||||||
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
|
||||||
// and kick it's sorry ..umm never mind, outta here
|
// and kick it's sorry ..umm never mind, outta here
|
||||||
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case( 2 ):
|
case( 2 ):
|
||||||
// first portrait
|
// first portrait
|
||||||
|
|
||||||
// load it
|
// load it
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
FilenameForBPP("Faces\\SmallFaces\\05.sti", VObjectDesc.ImageFile);
|
FilenameForBPP("Faces\\SmallFaces\\05.sti", VObjectDesc.ImageFile);
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
CHECKF(AddVideoObject(&VObjectDesc, &uiGraphicHandle));
|
||||||
|
|
||||||
// show it
|
// show it
|
||||||
GetVideoObject(&hHandle, uiGraphicHandle);
|
GetVideoObject(&hHandle, uiGraphicHandle);
|
||||||
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
BltVideoObject(FRAME_BUFFER, hHandle, 0, LAPTOP_SCREEN_UL_X + sFaceX, LAPTOP_SCREEN_WEB_UL_Y + sFaceY , VO_BLT_SRCTRANSPARENCY,NULL);
|
||||||
|
|
||||||
|
|
||||||
// and kick it's sorry ..umm never mind, outta here
|
// and kick it's sorry ..umm never mind, outta here
|
||||||
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
DeleteVideoObjectFromIndex( uiGraphicHandle );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// render the nickname
|
// render the nickname
|
||||||
SetFontForeground( FONT_WHITE );
|
SetFontForeground( FONT_WHITE );
|
||||||
SetFontBackground( FONT_BLACK );
|
SetFontBackground( FONT_BLACK );
|
||||||
SetFont( FONT12ARIAL );
|
SetFont( FONT12ARIAL );
|
||||||
|
|
||||||
mprintf( 253, 350, pNickName );
|
mprintf( 253, 350, pNickName );
|
||||||
|
|
||||||
@@ -637,26 +637,26 @@ void RenderCharFullName( void )
|
|||||||
INT16 sX, sY;
|
INT16 sX, sY;
|
||||||
|
|
||||||
// render the characters full name
|
// render the characters full name
|
||||||
SetFont( FONT14ARIAL );
|
SetFont( FONT14ARIAL );
|
||||||
SetFontForeground( FONT_WHITE );
|
SetFontForeground( FONT_WHITE );
|
||||||
SetFontBackground( FONT_BLACK );
|
SetFontBackground( FONT_BLACK );
|
||||||
|
|
||||||
swprintf( sString, pIMPFinishStrings[ 0 ], pFullName );
|
swprintf( sString, pIMPFinishStrings[ 0 ], pFullName );
|
||||||
|
|
||||||
|
|
||||||
FindFontCenterCoordinates(LAPTOP_SCREEN_UL_X - 111, 0, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 0 , sString , FONT14ARIAL, &sX, &sY);
|
FindFontCenterCoordinates(LAPTOP_SCREEN_UL_X - 111, 0, LAPTOP_SCREEN_LR_X - LAPTOP_SCREEN_UL_X, 0 , sString , FONT14ARIAL, &sX, &sY);
|
||||||
mprintf( sX, iScreenHeightOffset + LAPTOP_SCREEN_WEB_DELTA_Y + 33, sString );
|
mprintf( sX, iScreenHeightOffset + LAPTOP_SCREEN_WEB_DELTA_Y + 33, sString );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN LoadCharacterPortrait( void )
|
BOOLEAN LoadCharacterPortrait( void )
|
||||||
{
|
{
|
||||||
// this function will load the character's portrait, to be used on portrait button
|
// this function will load the character's portrait, to be used on portrait button
|
||||||
VOBJECT_DESC VObjectDesc;
|
VOBJECT_DESC VObjectDesc;
|
||||||
|
|
||||||
// load it
|
// load it
|
||||||
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
VObjectDesc.fCreateFlags=VOBJECT_CREATE_FROMFILE;
|
||||||
FilenameForBPP( pPlayerSelectedFaceFileNames[ iPortraitNumber ] , VObjectDesc.ImageFile);
|
FilenameForBPP( pPlayerSelectedFaceFileNames[ iPortraitNumber ] , VObjectDesc.ImageFile);
|
||||||
CHECKF(AddVideoObject(&VObjectDesc, &guiCHARACTERPORTRAIT));
|
CHECKF(AddVideoObject(&VObjectDesc, &guiCHARACTERPORTRAIT));
|
||||||
|
|
||||||
@@ -677,7 +677,7 @@ void DestroyCharacterPortrait( void )
|
|||||||
void FinishMessageBoxCallBack( UINT8 bExitValue )
|
void FinishMessageBoxCallBack( UINT8 bExitValue )
|
||||||
{
|
{
|
||||||
// yes, so start over, else stay here and do nothing for now
|
// yes, so start over, else stay here and do nothing for now
|
||||||
if( bExitValue == MSG_BOX_RETURN_YES )
|
if( bExitValue == MSG_BOX_RETURN_YES )
|
||||||
{
|
{
|
||||||
iCurrentImpPage = IMP_HOME_PAGE;
|
iCurrentImpPage = IMP_HOME_PAGE;
|
||||||
fButtonPendingFlag = TRUE;
|
fButtonPendingFlag = TRUE;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user