comparison SpriteObject.cpp @ 2464:104fdbea0386

cleaning project part 2
author zipi
date Sun, 17 Aug 2014 17:49:34 +0100
parents 0f17a30149ec
children b054ea5daf45
comparison
equal deleted inserted replaced
2463:0f17a30149ec 2464:104fdbea0386
19 #include "LOD.h" 19 #include "LOD.h"
20 #include "Actor.h" 20 #include "Actor.h"
21 #include "Events.h" 21 #include "Events.h"
22 #include "AudioPlayer.h" 22 #include "AudioPlayer.h"
23 #include "Level/Decoration.h" 23 #include "Level/Decoration.h"
24 #include "mm7_unsorted_subs.h" 24
25 25
26 #include "mm7_data.h" 26 #include "mm7_data.h"
27 #include "MM7.h" 27 #include "MM7.h"
28 28
29 #include "stru298.h" 29 #include "stru298.h"
2018 return 0; 2018 return 0;
2019 } 2019 }
2020 2020
2021 } 2021 }
2022 2022
2023 //----- (0043A97E) --------------------------------------------------------
2024 void __fastcall sub_43A97E(unsigned int uLayingItemID, signed int a2)
2025 {
2026 if (PID_TYPE(a2) == OBJECT_Player)
2027 {
2028 layingitem_vel_50FDFC.x = pSpriteObjects[uLayingItemID].vVelocity.x;
2029 layingitem_vel_50FDFC.y = pSpriteObjects[uLayingItemID].vVelocity.y;
2030 layingitem_vel_50FDFC.z = pSpriteObjects[uLayingItemID].vVelocity.z;
2031
2032 Vec3_int_::Normalize(&layingitem_vel_50FDFC.x, &layingitem_vel_50FDFC.y, &layingitem_vel_50FDFC.z);
2033 DamagePlayerFromMonster(PID(OBJECT_Item, uLayingItemID), pSpriteObjects[uLayingItemID].field_61, &layingitem_vel_50FDFC, -1);
2034 }
2035 else if (PID_TYPE(a2) == OBJECT_Actor)
2036 {
2037 layingitem_vel_50FDFC.x = pSpriteObjects[uLayingItemID].vVelocity.x;
2038 layingitem_vel_50FDFC.y = pSpriteObjects[uLayingItemID].vVelocity.y;
2039 layingitem_vel_50FDFC.z = pSpriteObjects[uLayingItemID].vVelocity.z;
2040
2041 Vec3_int_::Normalize(&layingitem_vel_50FDFC.x, &layingitem_vel_50FDFC.y, &layingitem_vel_50FDFC.z);
2042 switch (PID_TYPE(pSpriteObjects[uLayingItemID].spell_caster_pid))
2043 {
2044 case OBJECT_Actor:
2045 Actor::ActorDamageFromMonster(PID(OBJECT_Item, uLayingItemID), PID_ID(a2), &layingitem_vel_50FDFC, pSpriteObjects[uLayingItemID].field_61);
2046 break;
2047 case OBJECT_Player:
2048 Actor::DamageMonsterFromParty(PID(OBJECT_Item, uLayingItemID), PID_ID(a2), &layingitem_vel_50FDFC);
2049 break;
2050 case OBJECT_Item:
2051 ItemDamageFromActor(PID(OBJECT_Item, uLayingItemID), PID_ID(a2), &layingitem_vel_50FDFC);
2052 break;
2053 }
2054 }
2055 }