comparison SpriteObject.cpp @ 781:d170f23f70d1

tidy, code moving
author zipi
date Sun, 24 Mar 2013 01:27:34 +0000
parents 256211e8243a
children f5156b8c61ad
comparison
equal deleted inserted replaced
780:93c6b78abf35 781:d170f23f70d1
12 #include "Time.h" 12 #include "Time.h"
13 #include "Game.h" 13 #include "Game.h"
14 #include "LOD.h" 14 #include "LOD.h"
15 #include "Actor.h" 15 #include "Actor.h"
16 #include "Events.h" 16 #include "Events.h"
17
18 #include "mm7_data.h" 17 #include "mm7_data.h"
19
20
21
22 18
23 size_t uNumSpriteObjects; 19 size_t uNumSpriteObjects;
24 SpriteObject pSpriteObjects[1000]; 20 SpriteObject pSpriteObjects[1000];
25 21
26 22 //----- (00404828) --------------------------------------------------------
27 23 SpriteObject::SpriteObject()
24 {
25 field_22_glow_radius_multiplier = 1;
26 uSoundID = 0;
27 uFacing = 0;
28 vVelocity.z = 0;
29 vVelocity.y = 0;
30 vVelocity.x = 0;
31 uType = 0;
32 uObjectDescID = 0;
33 field_61 = 0;
34 field_60_distance_related_prolly_lod = 0;
35 field_20 = 0;
36 uSpriteFrameID = 0;
37 field_50 = 0;
38 field_4C = 0;
39 field_48 = 0;
40 field_54 = 0;
41 }
28 42
29 //----- (0042F5ED) -------------------------------------------------------- 43 //----- (0042F5ED) --------------------------------------------------------
30 int SpriteObject::Create(int yaw, int pitch, int a4, int a5) 44 int SpriteObject::Create(int yaw, int pitch, int a4, int a5)
31 { 45 {
32 //SpriteObject *v5; // eax@1 46 //SpriteObject *v5; // eax@1
162 176
163 if ( v6 >= (signed int)uNumSpriteObjects ) 177 if ( v6 >= (signed int)uNumSpriteObjects )
164 uNumSpriteObjects = v6 + 1; 178 uNumSpriteObjects = v6 + 1;
165 return v6; 179 return v6;
166 } 180 }
167
168
169 181
170 //----- (00471C03) -------------------------------------------------------- 182 //----- (00471C03) --------------------------------------------------------
171 void SpriteObject::UpdateObject_fn0_ODM(unsigned int uLayingItemID) 183 void SpriteObject::UpdateObject_fn0_ODM(unsigned int uLayingItemID)
172 { 184 {
173 SpriteObject *v1; // esi@1 185 SpriteObject *v1; // esi@1
587 v1->vVelocity.y = v35; 599 v1->vVelocity.y = v35;
588 goto LABEL_74; 600 goto LABEL_74;
589 } 601 }
590 } 602 }
591 603
592
593
594 //----- (0047136C) -------------------------------------------------------- 604 //----- (0047136C) --------------------------------------------------------
595 void SpriteObject::UpdateObject_fn0_BLV(unsigned int uLayingItemID) 605 void SpriteObject::UpdateObject_fn0_BLV(unsigned int uLayingItemID)
596 { 606 {
597 SpriteObject *pSpriteObject; // esi@1 607 SpriteObject *pSpriteObject; // esi@1
598 ObjectDesc *pObject; // edi@1 608 ObjectDesc *pObject; // edi@1
973 goto LABEL_25; 983 goto LABEL_25;
974 } 984 }
975 } 985 }
976 // 46DF1A: using guessed type int __fastcall 46DF1A_collide_against_actor(int, int); 986 // 46DF1A: using guessed type int __fastcall 46DF1A_collide_against_actor(int, int);
977 987
978
979
980
981 //----- (00438E35) -------------------------------------------------------- 988 //----- (00438E35) --------------------------------------------------------
982 void SpriteObject::_438E35() 989 void SpriteObject::_438E35()
983 { 990 {
984 SpriteObject *v1; // edi@1 991 SpriteObject *v1; // edi@1
985 MapInfo *pMapInfo; // esi@1 992 MapInfo *pMapInfo; // esi@1
1068 } 1075 }
1069 while ( (signed int)v12 <= (signed int)&pPlayers[4] ); 1076 while ( (signed int)v12 <= (signed int)&pPlayers[4] );
1070 } 1077 }
1071 } 1078 }
1072 1079
1073
1074
1075 //----- (0042F933) -------------------------------------------------------- 1080 //----- (0042F933) --------------------------------------------------------
1076 void SpriteObject::OnInteraction(unsigned int uLayingItemID) 1081 void SpriteObject::OnInteraction(unsigned int uLayingItemID)
1077 { 1082 {
1078 unsigned int v1; // ecx@1 1083 unsigned int v1; // ecx@1
1079 unsigned __int16 *pAttributes; // ecx@2 1084 unsigned __int16 *pAttributes; // ecx@2