comparison Actor.cpp @ 141:cca78efb377e

Constants -> enums
author Nomad
date Tue, 12 Feb 2013 03:02:13 +0200
parents 81e93310f73c
children 49728858c35e
comparison
equal deleted inserted replaced
140:f4d7a9a8c363 141:cca78efb377e
2141 { 2141 {
2142 result = Actor::_403EB6(uActorID, edx0, 0, arg0); 2142 result = Actor::_403EB6(uActorID, edx0, 0, arg0);
2143 } 2143 }
2144 else 2144 else
2145 { 2145 {
2146 if ( (edx0 & 7) == 3 ) 2146 if ( (edx0 & 7) == OBJECT_Actor)
2147 { 2147 {
2148 v8 = edx0 >> 3; 2148 v8 = edx0 >> 3;
2149 v6 = (AIDirection *)pActors[v8].vPosition.x; 2149 v6 = (AIDirection *)pActors[v8].vPosition.x;
2150 v7 = (AIDirection *)pActors[v8].vPosition.y; 2150 v7 = (AIDirection *)pActors[v8].vPosition.y;
2151 v23 = (signed __int64)((double)pActors[v8].uActorHeight * 0.75 + (double)pActors[v8].vPosition.z); 2151 v23 = (signed __int64)((double)pActors[v8].uActorHeight * 0.75 + (double)pActors[v8].vPosition.z);
2152 } 2152 }
2153 else 2153 else
2154 { 2154 {
2155 if ( (edx0 & 7) == 4 ) 2155 if ( (edx0 & 7) == OBJECT_Player)
2156 { 2156 {
2157 v6 = (AIDirection *)pParty->vPosition.x; 2157 v6 = (AIDirection *)pParty->vPosition.x;
2158 v7 = (AIDirection *)pParty->vPosition.y; 2158 v7 = (AIDirection *)pParty->vPosition.y;
2159 v23 = pParty->vPosition.z + pParty->sEyelevel; 2159 v23 = pParty->vPosition.z + pParty->sEyelevel;
2160 } 2160 }
2174 { 2174 {
2175 v12 = arg0; 2175 v12 = arg0;
2176 v13 = 0; 2176 v13 = 0;
2177 if ( !arg0 ) 2177 if ( !arg0 )
2178 { 2178 {
2179 v14 = Actor::GetDirectionInfo(8 * v24 | 3, a2, &a3, 0); 2179 v14 = Actor::GetDirectionInfo(8 * v24 | OBJECT_Actor, a2, &a3, 0);
2180 v12 = &v20; 2180 v12 = &v20;
2181 memcpy(&v20, v14, sizeof(v20)); 2181 memcpy(&v20, v14, sizeof(v20));
2182 v13 = 0; 2182 v13 = 0;
2183 } 2183 }
2184 v15 = pSpriteFrameTable->pSpriteSFrames; 2184 v15 = pSpriteFrameTable->pSpriteSFrames;
2540 unsigned int pDira; // [sp+5Ch] [bp+8h]@10 2540 unsigned int pDira; // [sp+5Ch] [bp+8h]@10
2541 2541
2542 v22 = uActorID; 2542 v22 = uActorID;
2543 v3 = &pActors[uActorID]; 2543 v3 = &pActors[uActorID];
2544 a2 = edx0; 2544 a2 = edx0;
2545 if ( (edx0 & 7) == 3 ) 2545 if ( (edx0 & 7) == OBJECT_Actor)
2546 { 2546 {
2547 v6 = edx0 >> 3; 2547 v6 = edx0 >> 3;
2548 v4 = (AIDirection *)pActors[v6].vPosition.x; 2548 v4 = (AIDirection *)pActors[v6].vPosition.x;
2549 v5 = (AIDirection *)pActors[v6].vPosition.y; 2549 v5 = (AIDirection *)pActors[v6].vPosition.y;
2550 v21 = (signed __int64)((double)pActors[v6].uActorHeight * 0.75 + (double)pActors[v6].vPosition.z); 2550 v21 = (signed __int64)((double)pActors[v6].uActorHeight * 0.75 + (double)pActors[v6].vPosition.z);
2551 } 2551 }
2552 else 2552 else
2553 { 2553 {
2554 if ( (edx0 & 7) == 4 ) 2554 if ( (edx0 & 7) == OBJECT_Player)
2555 { 2555 {
2556 v4 = (AIDirection *)pParty->vPosition.x; 2556 v4 = (AIDirection *)pParty->vPosition.x;
2557 v5 = (AIDirection *)pParty->vPosition.y; 2557 v5 = (AIDirection *)pParty->vPosition.y;
2558 v21 = pParty->vPosition.z + pParty->sEyelevel; 2558 v21 = pParty->vPosition.z + pParty->sEyelevel;
2559 } 2559 }
2571 { 2571 {
2572 v9 = pDir; 2572 v9 = pDir;
2573 v10 = 0; 2573 v10 = 0;
2574 if ( !pDir ) 2574 if ( !pDir )
2575 { 2575 {
2576 v11 = Actor::GetDirectionInfo(8 * v22 | 3, a2, &a3, 0); 2576 v11 = Actor::GetDirectionInfo(8 * v22 | OBJECT_Actor, a2, &a3, 0);
2577 v9 = &v18; 2577 v9 = &v18;
2578 memcpy(&v18, v11, sizeof(v18)); 2578 memcpy(&v18, v11, sizeof(v18));
2579 v10 = 0; 2579 v10 = 0;
2580 } 2580 }
2581 v12 = pSpriteFrameTable->pSpriteSFrames; 2581 v12 = pSpriteFrameTable->pSpriteSFrames;
2652 unsigned int pDira; // [sp+5Ch] [bp+8h]@10 2652 unsigned int pDira; // [sp+5Ch] [bp+8h]@10
2653 2653
2654 v22 = uActorID; 2654 v22 = uActorID;
2655 v3 = &pActors[uActorID]; 2655 v3 = &pActors[uActorID];
2656 a2 = edx0; 2656 a2 = edx0;
2657 if ( (edx0 & 7) == 3 ) 2657 if ( (edx0 & 7) == OBJECT_Actor)
2658 { 2658 {
2659 v6 = edx0 >> 3; 2659 v6 = edx0 >> 3;
2660 v4 = (AIDirection *)pActors[v6].vPosition.x; 2660 v4 = (AIDirection *)pActors[v6].vPosition.x;
2661 v5 = (AIDirection *)pActors[v6].vPosition.y; 2661 v5 = (AIDirection *)pActors[v6].vPosition.y;
2662 v21 = (signed __int64)((double)pActors[v6].uActorHeight * 0.75 + (double)pActors[v6].vPosition.z); 2662 v21 = (signed __int64)((double)pActors[v6].uActorHeight * 0.75 + (double)pActors[v6].vPosition.z);
2663 } 2663 }
2664 else 2664 else
2665 { 2665 {
2666 if ( (edx0 & 7) == 4 ) 2666 if ( (edx0 & 7) == OBJECT_Player)
2667 { 2667 {
2668 v4 = (AIDirection *)pParty->vPosition.x; 2668 v4 = (AIDirection *)pParty->vPosition.x;
2669 v5 = (AIDirection *)pParty->vPosition.y; 2669 v5 = (AIDirection *)pParty->vPosition.y;
2670 v21 = pParty->vPosition.z + pParty->sEyelevel; 2670 v21 = pParty->vPosition.z + pParty->sEyelevel;
2671 } 2671 }
2683 { 2683 {
2684 v9 = pDir; 2684 v9 = pDir;
2685 v10 = 0; 2685 v10 = 0;
2686 if ( !pDir ) 2686 if ( !pDir )
2687 { 2687 {
2688 v11 = Actor::GetDirectionInfo(8 * v22 | 3, a2, &a3, 0); 2688 v11 = Actor::GetDirectionInfo(8 * v22 | OBJECT_Actor, a2, &a3, 0);
2689 v9 = &v18; 2689 v9 = &v18;
2690 memcpy(&v18, v11, sizeof(v18)); 2690 memcpy(&v18, v11, sizeof(v18));
2691 v10 = 0; 2691 v10 = 0;
2692 } 2692 }
2693 v12 = pSpriteFrameTable->pSpriteSFrames; 2693 v12 = pSpriteFrameTable->pSpriteSFrames;
2763 unsigned int pDira; // [sp+5Ch] [bp+8h]@10 2763 unsigned int pDira; // [sp+5Ch] [bp+8h]@10
2764 2764
2765 v21 = uActorID; 2765 v21 = uActorID;
2766 v3 = &pActors[uActorID]; 2766 v3 = &pActors[uActorID];
2767 a2 = edx0; 2767 a2 = edx0;
2768 if ( (edx0 & 7) == 3 ) 2768 if ( (edx0 & 7) == OBJECT_Actor)
2769 { 2769 {
2770 v6 = edx0 >> 3; 2770 v6 = edx0 >> 3;
2771 v4 = (AIDirection *)pActors[v6].vPosition.x; 2771 v4 = (AIDirection *)pActors[v6].vPosition.x;
2772 v5 = (AIDirection *)pActors[v6].vPosition.y; 2772 v5 = (AIDirection *)pActors[v6].vPosition.y;
2773 v20 = (signed __int64)((double)pActors[v6].uActorHeight * 0.75 + (double)pActors[v6].vPosition.z); 2773 v20 = (signed __int64)((double)pActors[v6].uActorHeight * 0.75 + (double)pActors[v6].vPosition.z);
2774 } 2774 }
2775 else 2775 else
2776 { 2776 {
2777 if ( (edx0 & 7) == 4 ) 2777 if ( (edx0 & 7) == OBJECT_Player)
2778 { 2778 {
2779 v4 = (AIDirection *)pParty->vPosition.x; 2779 v4 = (AIDirection *)pParty->vPosition.x;
2780 v5 = (AIDirection *)pParty->vPosition.y; 2780 v5 = (AIDirection *)pParty->vPosition.y;
2781 v20 = pParty->vPosition.z + pParty->sEyelevel; 2781 v20 = pParty->vPosition.z + pParty->sEyelevel;
2782 } 2782 }
2794 { 2794 {
2795 v9 = pDir; 2795 v9 = pDir;
2796 v10 = 0; 2796 v10 = 0;
2797 if ( !pDir ) 2797 if ( !pDir )
2798 { 2798 {
2799 v11 = Actor::GetDirectionInfo(8 * v21 | 3, a2, &a3, 0); 2799 v11 = Actor::GetDirectionInfo(8 * v21 | OBJECT_Actor, a2, &a3, 0);
2800 v9 = &v17; 2800 v9 = &v17;
2801 memcpy(&v17, v11, sizeof(v17)); 2801 memcpy(&v17, v11, sizeof(v17));
2802 v10 = 0; 2802 v10 = 0;
2803 } 2803 }
2804 v12 = pSpriteFrameTable->pSpriteSFrames; 2804 v12 = pSpriteFrameTable->pSpriteSFrames;
2859 unsigned int pDira; // [sp+5Ch] [bp+8h]@11 2859 unsigned int pDira; // [sp+5Ch] [bp+8h]@11
2860 2860
2861 v21 = uActorID; 2861 v21 = uActorID;
2862 v3 = &pActors[uActorID]; 2862 v3 = &pActors[uActorID];
2863 a2 = edx0; 2863 a2 = edx0;
2864 if ( (edx0 & 7) == 3 ) 2864 if ( (edx0 & 7) == OBJECT_Actor)
2865 { 2865 {
2866 v6 = edx0 >> 3; 2866 v6 = edx0 >> 3;
2867 v4 = pActors[v6].vPosition.x; 2867 v4 = pActors[v6].vPosition.x;
2868 v5 = pActors[v6].vPosition.y; 2868 v5 = pActors[v6].vPosition.y;
2869 v22 = (signed __int64)((double)pActors[v6].uActorHeight * 0.75 + (double)pActors[v6].vPosition.z); 2869 v22 = (signed __int64)((double)pActors[v6].uActorHeight * 0.75 + (double)pActors[v6].vPosition.z);
2870 } 2870 }
2871 else 2871 else
2872 { 2872 {
2873 if ( (edx0 & 7) == 4 ) 2873 if ( (edx0 & 7) == OBJECT_Player)
2874 { 2874 {
2875 v4 = pParty->vPosition.x; 2875 v4 = pParty->vPosition.x;
2876 v5 = pParty->vPosition.y; 2876 v5 = pParty->vPosition.y;
2877 v22 = pParty->vPosition.z + pParty->sEyelevel; 2877 v22 = pParty->vPosition.z + pParty->sEyelevel;
2878 } 2878 }
2898 { 2898 {
2899 v10 = pDir; 2899 v10 = pDir;
2900 v11 = 0; 2900 v11 = 0;
2901 if ( !pDir ) 2901 if ( !pDir )
2902 { 2902 {
2903 v12 = Actor::GetDirectionInfo(8 * v21 | 3, a2, &a3, 0); 2903 v12 = Actor::GetDirectionInfo(8 * v21 | OBJECT_Actor, a2, &a3, 0);
2904 v10 = &v18; 2904 v10 = &v18;
2905 memcpy(&v18, v12, sizeof(v18)); 2905 memcpy(&v18, v12, sizeof(v18));
2906 v11 = 0; 2906 v11 = 0;
2907 } 2907 }
2908 v13 = pSpriteFrameTable->pSpriteSFrames; 2908 v13 = pSpriteFrameTable->pSpriteSFrames;
3481 v7 = a1; 3481 v7 = a1;
3482 } 3482 }
3483 memcpy(&a3, Actor::GetDirectionInfo(v7, 4u, &v10, 0), sizeof(a3)); 3483 memcpy(&a3, Actor::GetDirectionInfo(v7, 4u, &v10, 0), sizeof(a3));
3484 memcpy(&v13, &a3, sizeof(v13)); 3484 memcpy(&v13, &a3, sizeof(v13));
3485 if ( MonsterStats::BelongsToSupertype(v5->pMonsterInfo.uID, MONSTER_SUPERTYPE_TREANT) 3485 if ( MonsterStats::BelongsToSupertype(v5->pMonsterInfo.uID, MONSTER_SUPERTYPE_TREANT)
3486 || (a2 & 7) == 3 && (double)(signed int)v13.uDistance < 307.2 ) 3486 || (a2 & 7) == OBJECT_Actor && (double)(signed int)v13.uDistance < 307.2 )
3487 { 3487 {
3488 if ( !uActionLength ) 3488 if ( !uActionLength )
3489 uActionLength = 256; 3489 uActionLength = 256;
3490 result = Actor::_403F58(v15, 4, uActionLength, &v13); 3490 result = Actor::_403F58(v15, 4, uActionLength, &v13);
3491 } 3491 }