Mercurial > mm7
changeset 2108:16f5a7ca289a
Merge
author | Grumpy7 |
---|---|
date | Fri, 20 Dec 2013 01:28:39 +0100 |
parents | 85e9766d6124 (diff) b52c09e01e7e (current diff) |
children | 4fae5a167a05 |
files | Spells.cpp mm7_data.h |
diffstat | 4 files changed, 13 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/Spells.cpp Fri Dec 20 00:37:39 2013 +0600 +++ b/Spells.cpp Fri Dec 20 01:28:39 2013 +0100 @@ -412,17 +412,17 @@ test= tolower(test_string[j]); switch (test) { - case 109: - pSpellDatas[i].field_12|=1; + case 'm': + pSpellDatas[i].stats|=1; break; - case 101: - pSpellDatas[i].field_12|=2; + case 'e': + pSpellDatas[i].stats|=2; break; - case 99: - pSpellDatas[i].field_12|=4; + case 'c': + pSpellDatas[i].stats|=4; break; - case 120: - pSpellDatas[i].field_12|=8; + case 'x': + pSpellDatas[i].stats|=8; break; } } @@ -1163,16 +1163,9 @@ pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[uSpellID], 0, 0, fromx, fromy, 0, 0, 0); } //----- (00427769) -------------------------------------------------------- -bool __fastcall sub_427769_spell(unsigned int uSpellID) +bool sub_427769_isSpellQuickCastableOnShiftClick(unsigned int uSpellID) { - bool result; // eax@2 - - __debugbreak(); // wut is dat? - if ( pSpellDatas[uSpellID].field_12 & 0xC ) - result = 1; - else - result = 0; - return result; + return ( pSpellDatas[uSpellID].stats & 0xC ); } //----- (0043AFE3) -------------------------------------------------------- int __fastcall _43AFE3_calc_spell_damage(int a1, int a2, signed int a3, int a4)
--- a/Spells.h Fri Dec 20 00:37:39 2013 +0600 +++ b/Spells.h Fri Dec 20 01:28:39 2013 +0100 @@ -242,7 +242,7 @@ }; }; __int16 field_10; - __int16 field_12; + __int16 stats; // char field_12; // char field_13; // __int16 field_14;
--- a/Viewport.cpp Fri Dec 20 00:37:39 2013 +0600 +++ b/Viewport.cpp Fri Dec 20 01:28:39 2013 +0100 @@ -487,7 +487,7 @@ pParty->uFlags |= PARTY_FLAGS_1_FALLING; return; } - if ( uActiveCharacter && sub_427769_spell(pPlayers[uActiveCharacter]->uQuickSpell)) + if ( uActiveCharacter && sub_427769_isSpellQuickCastableOnShiftClick(pPlayers[uActiveCharacter]->uQuickSpell)) pMessageQueue_50CBD0->AddMessage(UIMSG_CastQuickSpell, 0, 0); } return;
--- a/mm7_data.h Fri Dec 20 00:37:39 2013 +0600 +++ b/mm7_data.h Fri Dec 20 01:28:39 2013 +0100 @@ -1108,7 +1108,7 @@ bool PortalFrustrum(int pNumVertices, struct BspRenderer_PortalViewportData *a2, struct BspRenderer_PortalViewportData *near_portal, int uFaceID); int ODM_NearClip(unsigned int uVertexID); // idb int ODM_FarClip(unsigned int uNumVertices); -bool __fastcall sub_427769_spell(unsigned int uSpellID); +bool sub_427769_isSpellQuickCastableOnShiftClick(unsigned int uSpellID); void _42777D_CastSpell_UseWand_ShootArrow(int a1, unsigned int uPlayerID, unsigned int a4, __int16 a5, int a6); void _42ECB5_PlayerAttacksActor(); void InitializeTurnBasedAnimations(void *);