From 1b4fce27042b1021886ff78b9fd1aede335dd7b8 Mon Sep 17 00:00:00 2001 From: Wanne Date: Thu, 3 Jan 2013 10:17:21 +0000 Subject: [PATCH] - Laptop features & Fixes (by Buggler) 0 Fixed AIM starting gear 1-5 hotkey upon buying equipment 0 Standardized Hotkey 'Shift' + ArrowKeys/Buttons to jump 10 pages for AIM Members, BR Shopping Screen & MERC 0 Added Hotkey 'Ctrl' + ArrowKeys/Buttons go to first/last index for AIM Members, BR Shopping Screen & MERC 0 Added Hotkey 'Enter' for the most commonly-used button in AIM pages 0 Added Stat Color in MERCS git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5758 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Laptop/AimFacialIndex.cpp | 3 + Laptop/AimMembers.cpp | 162 +++++++++++++++++++++++++++++++------- Laptop/AimSort.cpp | 1 + Laptop/BobbyRGuns.cpp | 48 +++++------ Laptop/aim.cpp | 1 + Laptop/mercs Files.cpp | Bin 122174 -> 127420 bytes 6 files changed, 166 insertions(+), 49 deletions(-) diff --git a/Laptop/AimFacialIndex.cpp b/Laptop/AimFacialIndex.cpp index 228cba9f..6b5fd5da 100644 --- a/Laptop/AimFacialIndex.cpp +++ b/Laptop/AimFacialIndex.cpp @@ -515,6 +515,9 @@ void HandleAimFacialIndexKeyBoardInput() // back to AIM sorting screen guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_SORTED_FILES; break; + case ENTER: + guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS; + break; case LEFTARROW: // previous page for(i=0; i 0) - gbCurrentIndex--; + { + if (_KeyDown( 17 ) ) // CTRL + gbCurrentIndex = 0; + else if (_KeyDown( 16 ) ) // SHIFT + gbCurrentIndex = __max(gbCurrentIndex - 10, 0); + else + gbCurrentIndex--; + } else gbCurrentIndex = MAX_NUMBER_MERCS - 1; @@ -1996,8 +2003,15 @@ BOOLEAN Stop = FALSE; btn->uiFlags &= (~BUTTON_CLICKED_ON ); InitCreateDeleteAimPopUpBox(AIM_POPUP_DELETE, NULL, NULL, 0, 0, 0); - if( gbCurrentIndex < MAX_NUMBER_MERCS -1 ) - gbCurrentIndex++; + if( gbCurrentIndex < MAX_NUMBER_MERCS - 1 ) + { + if (_KeyDown( 17 ) ) // CTRL + gbCurrentIndex = MAX_NUMBER_MERCS - 1; + else if (_KeyDown( 16 ) ) // SHIFT + gbCurrentIndex = __min(MAX_NUMBER_MERCS - 1, gbCurrentIndex + 10); + else + gbCurrentIndex++; + } else gbCurrentIndex = 0; @@ -2558,7 +2572,7 @@ INT8 AimMemberHireMerc() HireMercStruct.ubInsertionCode = INSERTION_CODE_ARRIVING_GAME; HireMercStruct.fCopyProfileItemsOver = gfBuyEquipment; - //if the players is buyibng the equipment + //if the players is buying the equipment if( gfBuyEquipment ) { gMercProfiles[ ubCurrentSoldier ].usOptionalGearCost = 0; @@ -5039,7 +5053,12 @@ void HandleAimMemberKeyBoardInput() InitCreateDeleteAimPopUpBox(AIM_POPUP_DELETE, NULL, NULL, 0, 0, 0); if( gbCurrentIndex > 0) - gbCurrentIndex--; + { + if (_KeyDown( 17 ) ) // CTRL + gbCurrentIndex = 0; + else + gbCurrentIndex--; + } else gbCurrentIndex = MAX_NUMBER_MERCS - 1; @@ -5054,8 +5073,55 @@ void HandleAimMemberKeyBoardInput() // next button InitCreateDeleteAimPopUpBox(AIM_POPUP_DELETE, NULL, NULL, 0, 0, 0); - if( gbCurrentIndex < MAX_NUMBER_MERCS -1 ) - gbCurrentIndex++; + if( gbCurrentIndex < MAX_NUMBER_MERCS - 1 ) + { + if (_KeyDown( 17 ) ) // CTRL + gbCurrentIndex = MAX_NUMBER_MERCS - 1; + else + gbCurrentIndex++; + } + else + gbCurrentIndex = 0; + + //gbCurrentSoldier = AimMercArray[gbCurrentIndex]; + gbCurrentSoldier = gAimAvailability[AimMercArray[gbCurrentIndex]].ProfilId; + gbCurrentSoldierBio = gAimAvailability[AimMercArray[gbCurrentIndex]].AimBio; + gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; + + gfRedrawScreen = TRUE; + break; + case SHIFT_LEFTARROW: + // previous button + InitCreateDeleteAimPopUpBox(AIM_POPUP_DELETE, NULL, NULL, 0, 0, 0); + + if( gbCurrentIndex > 0) + { + if (_KeyDown( 17 ) ) // CTRL + gbCurrentIndex = 0; + else + gbCurrentIndex = __max(gbCurrentIndex - 10, 0); + } + else + gbCurrentIndex = MAX_NUMBER_MERCS - 1; + + //gbCurrentSoldier = AimMercArray[gbCurrentIndex]; + gbCurrentSoldier = gAimAvailability[AimMercArray[gbCurrentIndex]].ProfilId; + gbCurrentSoldierBio = gAimAvailability[AimMercArray[gbCurrentIndex]].AimBio; + gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; + + gfRedrawScreen = TRUE; + break; + case SHIFT_RIGHTARROW: + // next button + InitCreateDeleteAimPopUpBox(AIM_POPUP_DELETE, NULL, NULL, 0, 0, 0); + + if( gbCurrentIndex < MAX_NUMBER_MERCS - 1 ) + { + if (_KeyDown( 17 ) ) // CTRL + gbCurrentIndex = MAX_NUMBER_MERCS - 1; + else + gbCurrentIndex = __min(MAX_NUMBER_MERCS - 1, gbCurrentIndex + 10); + } else gbCurrentIndex = 0; @@ -5113,10 +5179,12 @@ void HandleAimMemberKeyBoardInput() // kit 1 //gbCurrentSoldier = AimMercArray[gbCurrentIndex]; gbCurrentSoldier = gAimAvailability[AimMercArray[gbCurrentIndex]].ProfilId; - gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; - //tais: handle selected kit - WeaponKitSelectionUpdate(0); - + if (!(gMercProfiles[gbCurrentSoldier].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS)) + { + gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; + //tais: handle selected kit + WeaponKitSelectionUpdate(0); + } gfRedrawScreen = TRUE; } break; @@ -5126,10 +5194,12 @@ void HandleAimMemberKeyBoardInput() // kit 2 //gbCurrentSoldier = AimMercArray[gbCurrentIndex]; gbCurrentSoldier = gAimAvailability[AimMercArray[gbCurrentIndex]].ProfilId; - gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; - //tais: handle selected kit - WeaponKitSelectionUpdate(1); - + if (!(gMercProfiles[gbCurrentSoldier].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS)) + { + gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; + //tais: handle selected kit + WeaponKitSelectionUpdate(1); + } gfRedrawScreen = TRUE; } break; @@ -5139,10 +5209,12 @@ void HandleAimMemberKeyBoardInput() // kit 3 //gbCurrentSoldier = AimMercArray[gbCurrentIndex]; gbCurrentSoldier = gAimAvailability[AimMercArray[gbCurrentIndex]].ProfilId; - gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; - //tais: handle selected kit - WeaponKitSelectionUpdate(2); - + if (!(gMercProfiles[gbCurrentSoldier].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS)) + { + gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; + //tais: handle selected kit + WeaponKitSelectionUpdate(2); + } gfRedrawScreen = TRUE; } break; @@ -5152,10 +5224,12 @@ void HandleAimMemberKeyBoardInput() // kit 4 //gbCurrentSoldier = AimMercArray[gbCurrentIndex]; gbCurrentSoldier = gAimAvailability[AimMercArray[gbCurrentIndex]].ProfilId; - gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; - //tais: handle selected kit - WeaponKitSelectionUpdate(3); - + if (!(gMercProfiles[gbCurrentSoldier].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS)) + { + gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; + //tais: handle selected kit + WeaponKitSelectionUpdate(3); + } gfRedrawScreen = TRUE; } break; @@ -5165,10 +5239,12 @@ void HandleAimMemberKeyBoardInput() // kit 5 //gbCurrentSoldier = AimMercArray[gbCurrentIndex]; gbCurrentSoldier = gAimAvailability[AimMercArray[gbCurrentIndex]].ProfilId; - gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; - //tais: handle selected kit - WeaponKitSelectionUpdate(4); - + if (!(gMercProfiles[gbCurrentSoldier].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS)) + { + gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; + //tais: handle selected kit + WeaponKitSelectionUpdate(4); + } gfRedrawScreen = TRUE; } break; @@ -5211,6 +5287,38 @@ void HandleAimMemberKeyBoardInput() gbCurrentSoldierBio = gAimAvailability[AimMercArray[gbCurrentIndex]].AimBio; gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; + gfRedrawScreen = TRUE; + break; + case SHIFT_LEFTARROW: + // previous button + InitCreateDeleteAimPopUpBox(AIM_POPUP_DELETE, NULL, NULL, 0, 0, 0); + + if( gbCurrentIndex > 0) + gbCurrentIndex = __max(gbCurrentIndex - 10, 0); + else + gbCurrentIndex = MAX_NUMBER_MERCS - 1; + + //gbCurrentSoldier = AimMercArray[gbCurrentIndex]; + gbCurrentSoldier = gAimAvailability[AimMercArray[gbCurrentIndex]].ProfilId; + gbCurrentSoldierBio = gAimAvailability[AimMercArray[gbCurrentIndex]].AimBio; + gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; + + gfRedrawScreen = TRUE; + break; + case SHIFT_RIGHTARROW: + // next button + InitCreateDeleteAimPopUpBox(AIM_POPUP_DELETE, NULL, NULL, 0, 0, 0); + + if( gbCurrentIndex < MAX_NUMBER_MERCS - 1 ) + gbCurrentIndex = __min(MAX_NUMBER_MERCS - 1, gbCurrentIndex + 10); + else + gbCurrentIndex = 0; + + //gbCurrentSoldier = AimMercArray[gbCurrentIndex]; + gbCurrentSoldier = gAimAvailability[AimMercArray[gbCurrentIndex]].ProfilId; + gbCurrentSoldierBio = gAimAvailability[AimMercArray[gbCurrentIndex]].AimBio; + gubVideoConferencingMode = AIM_VIDEO_NOT_DISPLAYED_MODE; + gfRedrawScreen = TRUE; break; } diff --git a/Laptop/AimSort.cpp b/Laptop/AimSort.cpp index b2020504..207c05b0 100644 --- a/Laptop/AimSort.cpp +++ b/Laptop/AimSort.cpp @@ -1103,6 +1103,7 @@ void HandleAimSortKeyBoardInput() case 'f': guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS; break; + case ENTER: case 'm': guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_FACIAL_INDEX; break; diff --git a/Laptop/BobbyRGuns.cpp b/Laptop/BobbyRGuns.cpp index 5f2fa632..52bb33c3 100644 --- a/Laptop/BobbyRGuns.cpp +++ b/Laptop/BobbyRGuns.cpp @@ -1349,14 +1349,12 @@ void BtnBobbyRNextPreviousPageCallback(GUI_BUTTON *btn,INT32 reason) { if( gubCurPage > 0 ) { - if (_KeyDown( 16 ) ) // SHIFT - { - gubCurPage = __max(gubCurPage - 5, 0); - } + if (_KeyDown( 17 ) ) // CTRL + gubCurPage = 0; + else if (_KeyDown( 16 ) ) // SHIFT + gubCurPage = __max(gubCurPage - 10, 0); else - { gubCurPage--; - } } } //else next screen @@ -1364,14 +1362,12 @@ void BtnBobbyRNextPreviousPageCallback(GUI_BUTTON *btn,INT32 reason) { if( gubCurPage < gubNumPages - 1 ) { - if (_KeyDown( 16 ) ) // SHIFT - { - gubCurPage = __min(gubNumPages - 1, gubCurPage + 5); - } + if (_KeyDown( 17 ) ) // CTRL + gubCurPage = gubNumPages - 1; + else if (_KeyDown( 16 ) ) // SHIFT + gubCurPage = __min(gubNumPages - 1, gubCurPage + 10); else - { gubCurPage++; - } } } @@ -3911,18 +3907,26 @@ void HandleBobbyRGunsKeyBoardInput() fPausedReDrawScreenFlag = TRUE; break; case SHIFT_LEFTARROW: - // jump to 5 pages back + // jump to 10 pages back if( gubCurPage > 0 ) - gubCurPage = __max(gubCurPage - 5, 0); - + { + if( fCtrl ) + gubCurPage = 0; + else + gubCurPage = __max(gubCurPage - 10, 0); + } fReDrawScreenFlag = TRUE; fPausedReDrawScreenFlag = TRUE; break; case SHIFT_RIGHTARROW: - // jump to 5 pages forward + // jump to 10 pages forward if( gubCurPage < gubNumPages - 1 ) - gubCurPage = __min(gubNumPages - 1, gubCurPage + 5); - + { + if( fCtrl ) + gubCurPage = gubNumPages - 1; + else + gubCurPage = __min(gubNumPages - 1, gubCurPage + 10); + } fReDrawScreenFlag = TRUE; fPausedReDrawScreenFlag = TRUE; break; @@ -4042,17 +4046,17 @@ void HandleBobbyRGunsKeyBoardInput() fPausedReDrawScreenFlag = TRUE; break; case SHIFT_LEFTARROW: - // jump to 5 pages back + // jump to 10 pages back if( gubCurPage > 0 ) - gubCurPage = __max(gubCurPage - 5, 0); + gubCurPage = __max(gubCurPage - 10, 0); fReDrawScreenFlag = TRUE; fPausedReDrawScreenFlag = TRUE; break; case SHIFT_RIGHTARROW: - // jump to 5 pages forward + // jump to 10 pages forward if( gubCurPage < gubNumPages - 1 ) - gubCurPage = __min(gubNumPages - 1, gubCurPage + 5); + gubCurPage = __min(gubNumPages - 1, gubCurPage + 10); fReDrawScreenFlag = TRUE; fPausedReDrawScreenFlag = TRUE; diff --git a/Laptop/aim.cpp b/Laptop/aim.cpp index 0094b744..f4fa36df 100644 --- a/Laptop/aim.cpp +++ b/Laptop/aim.cpp @@ -1327,6 +1327,7 @@ void HandleAimKeyBoardInput() case 'l': guiCurrentLaptopMode = LAPTOP_MODE_AIM_LINKS; break; + case ENTER: case 'm': if(!fFirstTimeIn) guiCurrentLaptopMode = LAPTOP_MODE_AIM_MEMBERS_SORTED_FILES; diff --git a/Laptop/mercs Files.cpp b/Laptop/mercs Files.cpp index 51e38ea8865219793f6c2ff4e496c45607d7dbf4..a7945a63e22f783a9b5a839a8668b87b400461c9 100644 GIT binary patch delta 1981 zcmbtVOGuPa6h4P3$N9&m8J!wuwEQ(KAE{FbifJ`zrle+?OobUUkmaLHQ?uGgNJUsw z7dpKb(>5ZaS^OfURuDn-a?wI1iZ&50gbburXU0aRzsbe#;=twJbHDGr?stcW^iRI( zAH^C)k;`l_Ksi*vPAC^0Qkuw-BvBK+I&dO<`Y0?7?rw`-BAik*pO|%}uuEjSlJo|s zgx%m)pBwm`(Q3gZuElKlN{0@bXIk?d>s^;(BJRhP_Y#2KGG+T~Np7 zVLJ&W&<<^EosbUlyq^r-kdL40F0?Ky;p?>=f(!>CLv*~z5(T3*qUW7S^p98jt4H=G zL~!Yyum)WG{o{>!^!+ZHmUT1kJR`lyMH}^5aS0{*&_sn6G%MES*ooPH`7voR+kYdc zdsUcBzBqIkDxn#gI768}B;YanX2y#uPFEJzD>D{s(n^w!LGV@@ioc1$<*U%EDU<2dxHeQYDGB>j;IDJhuAZ}*Bpkp^xsc0~rD57m zWTI@Wod$24OMU404#T+n4e-Y!;qhcKf`L&R^RYc1D3NmvO~IY_BZ=b7L~Jkt zWm`8M&>6#c=~ge+EkG6uUVJ;b=8+J^ID;vnC~{2g^|0eIe1{ MDKsg49vnXV8~!=-K>z>% delta 458 zcmdn9RgT3>xGtNZw@=yB0V|mpuu#j zTt=(Od57gT-@3cQc=`<$MyKuH1R0YUr|;2aOqhN^n2}?;jR<4YbUjH%uIULjjB4A@ zh%oMgO1~3hFjj%3lcxJ=F^WysQe;$^zCoQa49Nzd!V_RMuMmO|Z*u4}7C;SuV8AFe zy}*#M3`q@8W5jkJBgPc4nw04>CcrRUV1l9s99$KqjAuBu@33dIQQq#?$tc9J{a+d5 GzA6CS&5{uS