annotate SpriteObject.h @ 2463:0f17a30149ec

cleaning project part 1
author zipi
date Sun, 17 Aug 2014 15:13:18 +0100
parents 5d263539bbec
children 104fdbea0386
rev   line source
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
1 #pragma once
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
2 #include "Items.h"
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
3
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
4 enum
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
5 {
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1406
diff changeset
6 OBJECT_40 = 0x40
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1406
diff changeset
7 , OBJECT_ATTACHED_TO_ACTOR = 0x80
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
8 };
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
9
810
f5156b8c61ad savegame refactoring
Gloval
parents: 515
diff changeset
10 #define MAX_SPRITE_OBJECTS 1000
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
11 /* 72 */
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
12 #pragma pack(push, 1)
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
13 struct SpriteObject
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
14 {
1113
39eaa6b00141 something to bool cast (performance warning) mostly fixed
Grumpy7
parents: 823
diff changeset
15 inline bool AttachedToActor() const {return (uAttributes & OBJECT_ATTACHED_TO_ACTOR) != 0;}
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
16
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
17 SpriteObject();
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
18 int Create(int yaw, int pitch, int a4, int a5);
1119
aa706cde7fda * dark spells working
zipi
parents: 1113
diff changeset
19 void _46BEF1_apply_spells_aoe();
1406
d071e0e9ba75 Explosion Traps fix
Ritor1
parents: 1254
diff changeset
20 void ExplosionTraps();
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
21
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
22 static void UpdateObject_fn0_BLV(unsigned int uLayingItemID);
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
23 static void UpdateObject_fn0_ODM(unsigned int uLayingItemID);
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
24 static void OnInteraction(unsigned int uLayingItemID);
2331
9551756f46c4 Moving functions out of mm7_6.cpp into appropriate classes as static methods or free functions
Grumpy7
parents: 1545
diff changeset
25 static bool sub_42F7EB_DropItemAt(unsigned int uSpriteID, int x, int y, int z, int a4, int count, int a7, unsigned __int16 attributes, ItemGen *a9);
9551756f46c4 Moving functions out of mm7_6.cpp into appropriate classes as static methods or free functions
Grumpy7
parents: 1545
diff changeset
26 static void sub_42F960_create_object(int x, int y, int z);
2338
1e865e8690ba Moving some function declarations from unsorted subs to Actor.h and SpriteObject.h
Grumpy7
parents: 2331
diff changeset
27 static void InitializeSpriteObjects();
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
28
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
29
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
30 unsigned __int16 uType;
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
31 unsigned __int16 uObjectDescID;
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
32 struct Vec3_int_ vPosition;
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
33 struct Vec3_short_ vVelocity;
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
34 unsigned __int16 uFacing;
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
35 unsigned __int16 uSoundID;
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
36 unsigned __int16 uAttributes;
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
37 __int16 uSectorID;
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
38 unsigned __int16 uSpriteFrameID;
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
39 __int16 field_20;
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
40 __int16 field_22_glow_radius_multiplier;
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
41 struct ItemGen stru_24;
822
c232f160e6f3 Named SpriteObject spell-related fields.
Nomad
parents: 810
diff changeset
42 int spell_id;
c232f160e6f3 Named SpriteObject spell-related fields.
Nomad
parents: 810
diff changeset
43 int spell_level;
c232f160e6f3 Named SpriteObject spell-related fields.
Nomad
parents: 810
diff changeset
44 int spell_skill;
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
45 int field_54;
822
c232f160e6f3 Named SpriteObject spell-related fields.
Nomad
parents: 810
diff changeset
46 int spell_caster_pid;
823
c1da83d8223f More spell renames
Nomad
parents: 822
diff changeset
47 int spell_target_pid;
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
48 char field_60_distance_related_prolly_lod;
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
49 char field_61;
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
50 char field_62[2];
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
51 Vec3_int_ field_64;
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
52 };
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
53 #pragma pack(pop)
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
54
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
55
2343
5d263539bbec Moving functions from unsorted_subs.h pt5
Grumpy7
parents: 2338
diff changeset
56 void CompactLayingItemsList();
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
57
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents:
diff changeset
58 extern size_t uNumSpriteObjects;
2463
0f17a30149ec cleaning project part 1
zipi
parents: 2343
diff changeset
59 extern std::array<SpriteObject, MAX_SPRITE_OBJECTS> pSpriteObjects;
0f17a30149ec cleaning project part 1
zipi
parents: 2343
diff changeset
60
0f17a30149ec cleaning project part 1
zipi
parents: 2343
diff changeset
61 bool __fastcall _46BFFA_check_object_intercept(unsigned int uLayingItemID, signed int a2);