0
|
1 #pragma once
|
|
2 #include "Render.h"
|
|
3
|
|
4
|
|
5
|
194
|
6 enum VisObjectType: unsigned __int32
|
|
7 {
|
|
8 VisObjectType_Any = 0,
|
|
9 VisObjectType_Sprite = 1,
|
|
10 VisObjectType_Face = 2
|
|
11 };
|
|
12
|
|
13 /* 150 */
|
|
14 #pragma pack(push, 1)
|
|
15 struct Vis_SelectionFilter //stru157
|
|
16 {
|
|
17 VisObjectType object_type;
|
|
18 int object_id; // OBJECT_Actor, OBJECT_Player etc
|
|
19 int field_8;
|
|
20 int field_C;
|
|
21 int field_10;
|
|
22 };
|
|
23 #pragma pack(pop)
|
|
24 extern Vis_SelectionFilter vis_sprite_filter_1; // 00F93E1C
|
|
25 extern Vis_SelectionFilter vis_sprite_filter_2; // 00F93E30
|
|
26 extern Vis_SelectionFilter vis_face_filter; // 00F93E44
|
|
27 extern Vis_SelectionFilter vis_door_filter; // 00F93E58
|
|
28 extern Vis_SelectionFilter vis_sprite_filter_3; // 00F93E6C
|
|
29 extern Vis_SelectionFilter vis_sprite_filter_4; // static to sub_44EEA7
|
0
|
30
|
|
31
|
|
32
|
|
33 #pragma pack(push, 1)
|
194
|
34 struct Vis_ObjectInfo
|
0
|
35 {
|
194
|
36 void *object;
|
|
37 union
|
|
38 {
|
|
39 int sZValue;
|
|
40 struct
|
|
41 {
|
|
42 unsigned __int16 object_pid;
|
|
43 signed __int16 actual_z;
|
|
44 };
|
|
45 };
|
|
46 VisObjectType object_type;
|
0
|
47 };
|
|
48 #pragma pack(pop)
|
|
49
|
194
|
50
|
0
|
51 #pragma pack(push, 1)
|
194
|
52 struct Vis_SelectionList
|
0
|
53 {
|
194
|
54 enum PointerCreationType
|
|
55 {
|
|
56 All = 0,
|
|
57 Unique = 1
|
|
58 };
|
|
59
|
|
60 Vis_SelectionList();
|
0
|
61 //----- (004C0585) --------------------------------------------------------
|
194
|
62 ~Vis_SelectionList() {}
|
|
63 Vis_ObjectInfo *sub_4C2551(int a2, int a3);
|
|
64 void create_object_pointers(PointerCreationType type = All);
|
0
|
65
|
194
|
66 inline void AddObject(void *object, VisObjectType type, int packed_zval)
|
|
67 {
|
|
68 object_pool[uNumPointers].object = object;
|
|
69 object_pool[uNumPointers].object_type = type;
|
|
70 object_pool[uNumPointers++].sZValue = packed_zval;
|
|
71 }
|
|
72
|
|
73 void (__thiscall ***vdestructor_ptr)(Vis_SelectionList *, bool);
|
|
74 Vis_ObjectInfo object_pool[512];
|
|
75 Vis_ObjectInfo *object_pointers[512];
|
|
76 unsigned int uNumPointers;
|
0
|
77 };
|
|
78 #pragma pack(pop)
|
|
79
|
|
80
|
|
81
|
|
82 /* 116 */
|
|
83 #pragma pack(push, 1)
|
|
84 struct Vis
|
|
85 {
|
|
86 Vis();
|
|
87 //----- (004C05A2) --------------------------------------------------------
|
|
88 //virtual ~Vis() {}
|
|
89 //----- (004C05BE) --------------------------------------------------------
|
|
90 ~Vis() {}
|
194
|
91 bool PickKeyboard(Vis_SelectionList *list, Vis_SelectionFilter *sprite_filter, Vis_SelectionFilter *face_filter);
|
|
92 bool PickMouse(float fDepth, float fMouseX, float fMouseY, Vis_SelectionFilter *sprite_filter, Vis_SelectionFilter *face_filter);
|
|
93 void PickBillboards_Mouse(float fPickDepth, float fX, float fY, Vis_SelectionList *list, Vis_SelectionFilter *filter);
|
|
94 void PickBillboards_All(float pick_depth, Vis_SelectionList *list, Vis_SelectionFilter *filter);
|
|
95 bool is_part_of_selection(void *uD3DBillboardIdx_or_pBLVFace_or_pODMFace, Vis_SelectionFilter *filter);
|
0
|
96 bool DoesRayIntersectBillboard(float fDepth, unsigned int uD3DBillboardIdx);
|
194
|
97 int _4C0D32_KeyboardPickFaces_BLV(float pick_depth, Vis_SelectionList *list, Vis_SelectionFilter *filter);
|
|
98 void _4C0DEA_KeyboardPickFaces_ODM(float pick_depth, Vis_SelectionList *list, Vis_SelectionFilter *filter);
|
|
99 Vis_ObjectInfo *_4C1026(struct BLVFace *a2, unsigned int a3, float a4);
|
0
|
100 char _4C12C3_FindSomeBillboard(struct RenderVertexSoft *a1, int a2, float a3, float a4);
|
|
101 void GetPolygonCenter(struct RenderVertexD3D3 *pVertices, unsigned int uNumVertices, float *pCenterX, float *pCenterY);
|
|
102 float *_4C1495(struct RenderVertexSoft *Src, int a2, float *a3, float *a4);
|
|
103 bool IsPointInsideD3DBillboard(struct RenderBillboardD3D *a1, float x, float y);
|
194
|
104 void PickIndoor(float fDepth, struct RenderVertexSoft *pRay, Vis_SelectionList *list, Vis_SelectionFilter *filter);
|
|
105 void PickOutdoor(float fDepth, struct RenderVertexSoft *pRay, Vis_SelectionList *list, Vis_SelectionFilter *filter, char a6);
|
|
106 int _4C1944(int object_id, unsigned int a3, int a4, int a5, int a6);
|
0
|
107 void _4C1A02();
|
|
108 bool SortVectors_x(RenderVertexSoft *a2, int a3, int a4);
|
194
|
109 int get_object_zbuf_val(Vis_ObjectInfo *info);
|
0
|
110 int get_picked_object_zbuf_val();
|
|
111 bool Intersect_Ray_Face(struct RenderVertexSoft *pRayStart, struct RenderVertexSoft *pRayEnd, float *pDepth, RenderVertexSoft *a4, BLVFace *a5, unsigned int a6);
|
|
112 int _4C1D2B(BLVFace *pFace, Vec3_short_ a2, unsigned int uModelID);
|
|
113 bool _4C1EE5_BLV_IntersectBModel_2(int *a1, int *a2, __int16 *a3, __int16 *a4, Vec3_short_ *a5, BLVFace *pFace);
|
|
114 bool _4C2186_BLV_IntersectBModel(int *a1, int *a2, __int16 *a3, __int16 *a4, Vec3_short_ *a5, BLVFace *a6, unsigned int uModelID);
|
|
115 void CastPickRay(RenderVertexSoft *pRay, float fMouseX, float fMouseY, float fPickDepth);
|
194
|
116 void sort_object_pointers(Vis_ObjectInfo **pPointers, int left, int right);
|
0
|
117 bool SortVerticesByX(struct RenderVertexD3D3 *a2, unsigned int uStart, unsigned int uEnd);
|
|
118 bool SortVerticesByY(struct RenderVertexD3D3 *a2, unsigned int uStart, unsigned int uEnd);
|
|
119 bool sort_objects_2(struct RenderVertexSoft *pArray, int sLeft, int sRight);
|
|
120 bool sort_objects_3(struct RenderVertexSoft *pArray, int sLeft, int sRight);
|
|
121
|
|
122 void (__thiscall ***vdestructor_ptr)(Vis *, bool);
|
194
|
123 Vis_SelectionList default_list;
|
|
124 RenderVertexSoft stru_200C;
|
|
125 RenderVertexSoft stru_203C;
|
|
126 RenderVertexSoft stru_206C;
|
|
127 RenderVertexSoft stru_209C;
|
0
|
128 int field_20CC;
|
|
129 };
|
|
130 #pragma pack(pop)
|