World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Viewport.cpp
См. документацию.
2 
3 #include "Engine/Engine.h"
4 #include "Engine/Localization.h"
5 
6 #include "DecorationList.h"
7 #include "Engine/Events.h"
8 #include "Engine/LOD.h"
9 #include "Engine/Objects/Actor.h"
12 #include "Engine/OurMath.h"
13 #include "Engine/Party.h"
15 #include "Engine/stru123.h"
16 #include "GUI/GUIWindow.h"
17 #include "IO/Mouse.h"
18 #include "Level/Decoration.h"
19 #include "Outdoor.h"
20 #include "Vis.h"
21 
22 #include "GUI/UI/UIDialogue.h"
23 #include "GUI/UI/UIStatusBar.h"
24 
25 //----- (004C0262) --------------------------------------------------------
26 void Viewport::SetScreen(signed int sTL_X, signed int sTL_Y, signed int sBR_X,
27  signed int sBR_Y) {
28  unsigned int tl_x; // edx@1
29  unsigned int br_x; // esi@1
30  unsigned int tl_y; // edi@3
31  unsigned int br_y; // eax@3
32 
33  tl_x = sTL_X;
34  br_x = sBR_X;
35  if (sTL_X > sBR_X) {
36  br_x = sTL_X; // swap x's
37  tl_x = sBR_X;
38  }
39  tl_y = sTL_Y;
40  br_y = sBR_Y;
41  if (sTL_Y > sBR_Y) {
42  br_y = sTL_Y; // swap y's
43  tl_y = sBR_Y;
44  }
45  this->uScreen_TL_X = tl_x;
46  this->uScreen_TL_Y = tl_y;
47  this->uScreen_BR_X = br_x;
48  this->uScreen_BR_Y = br_y;
49  this->uScreenWidth = br_x - tl_x + 1;
50  this->uScreenHeight = br_y - tl_y + 1;
51  this->uScreenCenterX = (signed int)(br_x + tl_x) / 2;
52  // if ( render->pRenderD3D == 0 )
53  // this->uScreenCenterY = this->uScreen_BR_Y - fixpoint_mul(field_30,
54  // uScreenHeight);
55  // else
56  this->uScreenCenterY = (br_y + tl_y) / 2;
58  this->uScreen_BR_Y);
59 }
60 
61 //----- (004C02F8) --------------------------------------------------------
62 void Viewport::SetFOV(float field_of_view) {
63  this->field_of_view = field_of_view * 65536.0f;
65 }
66 
67 bool Viewport::Contains(unsigned int x, unsigned int y) {
68  return ((int)x >= uViewportTL_X && (int)x <= uViewportBR_X &&
69  (int)y >= uViewportTL_Y && (int)y <= uViewportBR_Y);
70 }
71 
72 void Viewport::SetViewport(int sTL_X, int sTL_Y, int sBR_X, int sBR_Y) {
73  int tl_x;
74  int tl_y;
75  int br_x;
76  int br_y;
77 
78  tl_x = sTL_X;
79  if (sTL_X < this->uScreen_TL_X) tl_x = this->uScreen_TL_X;
80  tl_y = sTL_Y;
81  if (sTL_Y < this->uScreen_TL_Y) tl_y = this->uScreen_TL_Y;
82  br_x = sBR_X;
83  if (sBR_X > this->uScreen_BR_X) br_x = this->uScreen_BR_X;
84  br_y = sBR_Y;
85  if (sBR_Y > this->uScreen_BR_Y) br_y = this->uScreen_BR_Y;
86  this->uViewportTL_Y = tl_y;
87  this->uViewportTL_X = tl_x;
88  this->uViewportBR_X = br_x;
89  this->uViewportBR_Y = br_y;
90 }
91 
92 //----- (00443219) --------------------------------------------------------
94  this->sViewCenterY += 512;
96 }
97 
98 //----- (00443225) --------------------------------------------------------
100  this->sViewCenterX -= 512;
101  AdjustPosition();
102 }
103 
104 //----- (00443231) --------------------------------------------------------
106  this->sViewCenterY -= 512;
107  AdjustPosition();
108 }
109 
110 //----- (0044323D) --------------------------------------------------------
112  this->sViewCenterX += 512;
113  AdjustPosition();
114 }
115 
116 //----- (00443249) --------------------------------------------------------
118  this->uMapBookMapZoom /= 2;
119  if (this->uMapBookMapZoom < 384) this->uMapBookMapZoom = 384;
120 
121  this->sViewCenterX = pParty->vPosition.x;
122  this->sViewCenterY = pParty->vPosition.y;
123  AdjustPosition();
124 }
125 
126 //----- (00443291) --------------------------------------------------------
128  int MaxZoom;
129 
131  MaxZoom = 1536;
133  MaxZoom = 3072;
134  else
135  assert(false);
136 
137  this->uMapBookMapZoom *= 2;
138  if (this->uMapBookMapZoom > MaxZoom) this->uMapBookMapZoom = MaxZoom;
139 
140  this->sViewCenterX = pParty->vPosition.x;
141  this->sViewCenterY = pParty->vPosition.y;
142  AdjustPosition();
143 }
144 
145 //----- (004432E7) --------------------------------------------------------
147  ViewingParams *v1; // esi@1
148  int v2; // ebx@1
149  signed int v3; // edx@1
150  int v4; // ecx@1
151  int v5; // edi@3
152  int v6; // eax@3
153  int v7; // eax@5
154 
155  v1 = this;
156  v2 = this->indoor_center_y;
157  v3 = 88 >> (this->uMapBookMapZoom / 384);
158  v4 = (44 - v3) << 9;
159  if (v1->sViewCenterY > v2 + v4) v1->sViewCenterY = v2 + v4;
160 
161  v5 = v1->indoor_center_x;
162  v6 = (v3 - 44) << 9;
163  if (v1->sViewCenterX < v5 + v6) v1->sViewCenterX = v5 + v6;
164 
165  v7 = v2 + v6;
166  if (v1->sViewCenterY < v7) v1->sViewCenterY = v7;
167 
168  if (v1->sViewCenterX > v5 + v4) v1->sViewCenterX = v5 + v4;
169 }
170 
171 //----- (00443343) --------------------------------------------------------
173  for (unsigned short i = 0; i < 256; ++i) pPalette[i] = Color16(i, i, i);
174 }
175 
176 //----- (00443365) --------------------------------------------------------
178  Vec3_short_ *v3; // eax@4
179  Vec3_short_ *v6; // eax@12
180  int minimum_y; // [sp+10h] [bp-10h]@2
181  int maximum_y; // [sp+14h] [bp-Ch]@2
182  int minimum_x; // [sp+18h] [bp-8h]@2
183  int maximum_x; // [sp+1Ch] [bp-4h]@2
184 
185  InitGrayPalette();
187  minimum_x = 0x40000000;
188  minimum_y = 0x40000000;
189 
190  maximum_x = -0x40000000;
191  maximum_y = -0x40000000;
192  for (int i = 0; i < pIndoor->pMapOutlines->uNumOutlines; ++i) {
193  v3 = &pIndoor
195 
196  if (v3->x < minimum_x) minimum_x = v3->x;
197  if (v3->x > maximum_x) maximum_x = v3->x;
198  if (v3->y < minimum_y) minimum_y = v3->x;
199  if (v3->y > maximum_y) maximum_y = v3->x;
200 
201  v6 = &pIndoor
203 
204  if (v6->x < minimum_x) minimum_x = v3->x;
205  if (v6->x > maximum_x) maximum_x = v3->x;
206 
207  if (v6->y < minimum_y) minimum_y = v3->y;
208  if (v6->y > maximum_y) maximum_y = v3->y;
209  }
210 
211  uMinimapZoom = 1024;
212  indoor_center_x = (signed int)(minimum_x + maximum_x) / 2;
213  field_28 = 10;
214  indoor_center_y = (signed int)(minimum_y + maximum_y) / 2;
215  } else {
216  indoor_center_x = 0;
217  indoor_center_y = 0;
220  }
221  uMapBookMapZoom = 384;
222 }
223 
224 void ItemInteraction(unsigned int item_id) {
225  if (pItemsTable->pItems[pSpriteObjects[item_id].containing_item.uItemID]
226  .uEquipType == EQUIP_GOLD) {
228  pSpriteObjects[item_id].containing_item.special_enchantment, 0);
230  } else {
231  if (pParty->pPickedItem.uItemID) return;
232 
234  471,
235  pItemsTable->pItems[pSpriteObjects[item_id].containing_item.uItemID]
236  .pUnidentifiedName)); // You found an item (%s)!
237 
238  if (pSpriteObjects[item_id].containing_item.uItemID ==
241  if (pSpriteObjects[item_id].containing_item.uItemID ==
244  if (!pParty->AddItemToParty(&pSpriteObjects[item_id].containing_item))
245  pParty->SetHoldingItem(&pSpriteObjects[item_id].containing_item);
246  }
248 }
249 
250 bool ActorInteraction(unsigned int id) {
251  if (!pActors[id].GetActorsRelation(0) && pActors[id].ActorFriend() &&
252  pActors[id].CanAct()) {
253  Actor::AI_FaceObject(id, 4, 0, 0);
254  if (pActors[id].sNPC_ID) {
255  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_StartNPCDialogue, id, 0);
256  } else {
257  if (pNPCStats->pGroups_copy[pActors[id].uGroup]) {
259  [pNPCStats->pGroups_copy[pActors[id].uGroup]]) {
260  pParty->uFlags |= 2;
262  sub_4451A8_press_any_key(0, 0, 0);
263  }
264  }
265  }
266  return true;
267  }
268  return false;
269 }
270 
271 void DecorationInteraction(unsigned int id, unsigned int pid) {
272  if (pLevelDecorations[id].uEventID) {
273  EventProcessor(pLevelDecorations[id].uEventID, pid, 1);
275  } else {
276  if (pLevelDecorations[id].IsInteractive()) {
280  ._decor_events[pLevelDecorations[id]._idx_in_stru123 -
281  75] +
282  380,
283  0, 1);
284  activeLevelDecoration = nullptr;
285  }
286  }
287 }
288 
290  if (!pParty->pPickedItem.uItemID) return;
291 
292  SpriteObject a1;
295  a1.vPosition.y = pParty->vPosition.y;
297  a1.vPosition.x = pParty->vPosition.x;
299  a1.uSoundID = 0;
300  a1.uFacing = 0;
301  a1.uAttributes = 8;
304  a1.uSpriteFrameID = 0;
305  memcpy(&a1.containing_item, &pParty->pPickedItem, 0x24u);
306 
307  // extern int UnprojectX(int);
308  // v9 = UnprojectX(v1->x);
309  a1.Create(pParty->sRotationY, 184, 200, 0); //+ UnprojectX(v1->x), 184, 200, 0);
310 
312 }
313 
314 //----- (0042213C) --------------------------------------------------------
316  int pEventID; // ecx@21
317  SpriteObject a1; // [sp+Ch] [bp-80h]@1
318 
319  int clickable_distance = 512;
320 
321  // bug fix - stops you entering shops while dialog still open.
323  return;
324 
326  int distance = HEXRAYS_HIWORD(v0);
327  bool in_range = distance < clickable_distance;
328  // else
329  // v0 = render->pActiveZBuffer[v1->x + pSRZBufferLineOffsets[v1->y]];
330 
331  if (PID_TYPE(v0) == OBJECT_Item) {
332  int item_id = PID_ID(v0);
333  // v21 = (signed int)(unsigned __int16)v0 >> 3;
334  if (pSpriteObjects[item_id].IsUnpickable() ||
335  item_id >= 1000 || !pSpriteObjects[item_id].uObjectDescID || !in_range) {
336  if (pParty->pPickedItem.uItemID) {
337  DropHeldItem();
338  }
339  } else {
340  ItemInteraction(item_id);
341  }
342  } else if (PID_TYPE(v0) == OBJECT_Actor) {
343  int mon_id = PID_ID(v0);
344  // a2.y = v16;
345  if (pActors[mon_id].uAIState == Dead) {
346  if (in_range)
347  pActors[mon_id].LootActor();
348  else if (pParty->pPickedItem.uItemID)
349  DropHeldItem();
350  } else if (!OS_IfShiftPressed()) {
351  if (!in_range) {
353  } else if (!ActorInteraction(mon_id)) {
356  } else {
357  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_Attack, 0, 0);
358  }
359  }
362  } else if (uActiveCharacter &&
364  pPlayers[uActiveCharacter]->uQuickSpell)) {
365  pMessageQueue_50CBD0->AddGUIMessage(UIMSG_CastQuickSpell, 0, 0);
366  }
367  } else if (PID_TYPE(v0) == OBJECT_Decoration) {
368  int id = PID_ID(v0);
369  if (distance - pDecorationList->GetDecoration(pLevelDecorations[id].uDecorationDescID)->uRadius >= clickable_distance) {
370  if (pParty->pPickedItem.uItemID) {
371  DropHeldItem();
372  }
373  } else {
375  }
376  } else if (PID_TYPE(v0) == OBJECT_BModel && in_range) {
378  if (!pIndoor->pFaces[PID_ID(v0)].Clickable()) {
379  if (!pParty->pPickedItem.uItemID) {
381  if (!pParty->pPickedItem.uItemID)
382  return;
383  } else {
384  DropHeldItem();
385  }
386  } else {
387  pEventID = pIndoor->pFaceExtras[pIndoor->pFaces[PID_ID(v0)].uFaceExtraID].uEventID;
388  EventProcessor(pEventID, (unsigned __int16)v0, 1);
389  }
391  if (!pOutdoor->pBModels[(signed int)(v0 & 0xFFFF) >> 9].pFaces[PID_ID(v0) & 0x3F].Clickable()) {
392  if (!pParty->pPickedItem.uItemID) {
394  if (!pParty->pPickedItem.uItemID)
395  return;
396  } else {
397  DropHeldItem();
398  }
399  } else {
400  pEventID = pOutdoor->pBModels[(signed int)(v0 & 0xFFFF) >> 9]
401  .pFaces[PID_ID(v0) & 0x3F]
402  .sCogTriggeredID;
403  EventProcessor(pEventID, (unsigned __int16)v0, 1);
404  }
405  }
406  } else if (pParty->pPickedItem.uItemID) {
407  DropHeldItem();
408  }
409 }
Party::pPickedItem
ItemGen pPickedItem
Definition: Party.h:312
SpriteObject
Definition: SpriteObject.h:189
PARTY_FLAGS_1_FALLING
@ PARTY_FLAGS_1_FALLING
Definition: Party.h:58
TE_MOVEMENT
@ TE_MOVEMENT
Definition: TurnEngine.h:22
Viewport::uScreenWidth
int uScreenWidth
Definition: Viewport.h:26
Party::vPosition
Vec3_int_ vPosition
Definition: Party.h:250
UIDialogue.h
pLevelDecorations
std::array< LevelDecoration, 3000 > pLevelDecorations
Definition: Decoration.cpp:8
Viewport.h
SpriteObject::uFacing
unsigned __int16 uFacing
Definition: SpriteObject.h:220
LOD.h
DecorationList::GetDecoration
DecorationDesc * GetDecoration(unsigned int index)
Definition: DecorationList.h:65
DecorationList.h
OutdoorLocation::pBModels
BSPModelList pBModels
Definition: Outdoor.h:119
pSpriteObjects
std::array< SpriteObject, MAX_SPRITE_OBJECTS > pSpriteObjects
Definition: SpriteObject.cpp:34
Viewport::uViewportTL_Y
int uViewportTL_Y
Definition: Viewport.h:23
OBJECT_Item
@ OBJECT_Item
Definition: Actor.h:66
sub_4451A8_press_any_key
void sub_4451A8_press_any_key(int a1, int a2, int a4)
Definition: UIDialogue.cpp:615
GameUI_StatusBar_NothingHere
void GameUI_StatusBar_NothingHere()
Definition: UIStatusBar.cpp:57
ViewingParams::field_28
int field_28
Definition: Viewport.h:66
Party::sEyelevel
int sEyelevel
Definition: Party.h:239
SpriteObject::uSectorID
__int16 uSectorID
Definition: SpriteObject.h:223
BLVMapOutlines::uNumOutlines
int uNumOutlines
Definition: Indoor.h:569
SpriteObject.h
IndoorLocation::pFaceExtras
struct BLVFaceExtra * pFaceExtras
Definition: Indoor.h:632
DecorationInteraction
void DecorationInteraction(unsigned int id, unsigned int pid)
Definition: Viewport.cpp:271
Viewport::Contains
bool Contains(unsigned int x, unsigned int y)
Definition: Viewport.cpp:67
ViewingParams::indoor_center_x
int16_t indoor_center_x
Definition: Viewport.h:70
NPCStats::pGroups_copy
uint16_t pGroups_copy[51]
Definition: NPC.h:177
BLVFaceExtra::uEventID
uint16_t uEventID
Definition: Indoor.h:512
Actor::AI_FaceObject
static void AI_FaceObject(unsigned int uActorID, unsigned int uObjID, int UNUSED, struct AIDirection *Dir_In)
Definition: Actor.cpp:1072
UIMSG_StartNPCDialogue
@ UIMSG_StartNPCDialogue
Definition: GUIWindow.h:128
Party::_quest_bits
unsigned __int8 _quest_bits[64]
Definition: Party.h:291
localization
Localization * localization
Definition: Localization.cpp:11
Viewport::uScreen_TL_X
int uScreen_TL_X
Definition: Viewport.h:18
ObjectList::ObjectIDByItemID
unsigned int ObjectIDByItemID(unsigned int uItemID)
Definition: ObjectList.cpp:7
EQUIP_GOLD
@ EQUIP_GOLD
Definition: Items.h:246
SpriteObject::uType
SPRITE_OBJECT_TYPE uType
Definition: SpriteObject.h:215
_576E2C_current_minimap_zoom
int _576E2C_current_minimap_zoom
Definition: mm7_data.cpp:600
OBJECT_Decoration
@ OBJECT_Decoration
Definition: Actor.h:69
DecorationDesc_mm6::uRadius
int16_t uRadius
Definition: DecorationList.h:41
pPlayers
NZIArray< struct Player *, 5 > pPlayers
Definition: Player.cpp:46
TurnEngine.h
ViewingParams::MapViewDown
void MapViewDown()
Definition: Viewport.cpp:105
SpriteObject::uSpriteFrameID
unsigned __int16 uSpriteFrameID
Definition: SpriteObject.h:224
Vis::get_picked_object_zbuf_val
int get_picked_object_zbuf_val()
Definition: Vis.cpp:517
pIndoor
IndoorLocation * pIndoor
Definition: Indoor.cpp:49
Engine.h
current_screen_type
enum CURRENT_SCREEN current_screen_type
Definition: GUIWindow.cpp:83
pTurnEngine
struct stru262_TurnBased * pTurnEngine
Definition: TurnEngine.cpp:21
Dead
@ Dead
Definition: Actor.h:80
Viewport::SetViewport
void SetViewport(int uX, int uY, int uZ, int uW)
Definition: Viewport.cpp:72
SpriteObject::uObjectDescID
unsigned __int16 uObjectDescID
Definition: SpriteObject.h:217
OBJECT_Actor
@ OBJECT_Actor
Definition: Actor.h:67
Events.h
Actor.h
Party::AddItemToParty
bool AddItemToParty(ItemGen *pItem)
Definition: Party.cpp:1096
pItemsTable
struct ItemsTable * pItemsTable
Definition: Items.cpp:37
Party::PartyFindsGold
void PartyFindsGold(unsigned int uNumGold, int _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal)
Definition: Party.cpp:976
Viewport::uScreen_TL_Y
int uScreen_TL_Y
Definition: Viewport.h:19
TE_FLAG_8
@ TE_FLAG_8
Definition: TurnEngine.h:7
LEVEL_DECORATION_VISIBLE_ON_MAP
@ LEVEL_DECORATION_VISIBLE_ON_MAP
Definition: Decoration.h:12
Localization.h
UIMSG_CastQuickSpell
@ UIMSG_CastQuickSpell
Definition: GUIWindow.h:29
NPCStats::pCatchPhrases
char * pCatchPhrases[52]
Definition: NPC.h:169
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
Viewport::uScreen_BR_Y
int uScreen_BR_Y
Definition: Viewport.h:21
SpriteObject::vPosition
struct Vec3_int_ vPosition
Definition: SpriteObject.h:218
activeLevelDecoration
LevelDecoration * activeLevelDecoration
Definition: Decoration.cpp:10
pParty
Party * pParty
Definition: Party.cpp:30
ViewingParams::MapViewRight
void MapViewRight()
Definition: Viewport.cpp:111
Engine::mouse
Mouse * mouse
Definition: Engine.h:469
ViewingParams::uMinimapZoom
unsigned int uMinimapZoom
Definition: Viewport.h:65
OBJECT_BModel
@ OBJECT_BModel
Definition: Actor.h:70
ViewingParams::indoor_center_y
int16_t indoor_center_y
Definition: Viewport.h:71
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
Viewport::uScreenHeight
int uScreenHeight
Definition: Viewport.h:27
ViewingParams::AdjustPosition
void AdjustPosition()
Definition: Viewport.cpp:146
viewparams
struct ViewingParams * viewparams
Definition: mm7_data.cpp:22
ViewingParams
Definition: Viewport.h:38
BLVMapOutline::uFace2ID
uint16_t uFace2ID
Definition: Indoor.h:416
Viewport::SetFOV
void SetFOV(float fov)
Definition: Viewport.cpp:62
BLVMapOutline::uFace1ID
uint16_t uFace1ID
Definition: Indoor.h:415
stru123.h
Viewport::uScreen_BR_X
int uScreen_BR_X
Definition: Viewport.h:20
ItemGen::uItemID
int uItemID
Definition: Items.h:326
v1
GLfloat GLfloat v1
Definition: SDL_opengl_glext.h:694
IndoorLocation::pMapOutlines
BLVMapOutlines * pMapOutlines
Definition: Indoor.h:641
pActors
std::array< Actor, 500 > pActors
Definition: Actor.cpp:38
Party.h
Viewport::uViewportBR_X
int uViewportBR_X
Definition: Viewport.h:24
Party::uFlags
unsigned int uFlags
Definition: Party.h:313
branchless_dialogue_str
String branchless_dialogue_str
Definition: mm7_data.cpp:619
OS_IfShiftPressed
bool OS_IfShiftPressed()
Definition: Lin.cpp:18
Engine::vis
Vis * vis
Definition: Engine.h:472
LEVEL_Outdoor
@ LEVEL_Outdoor
Definition: Indoor.h:287
Viewport::uScreenCenterY
int uScreenCenterY
Definition: Viewport.h:29
ViewingParams::InitGrayPalette
void InitGrayPalette()
Definition: Viewport.cpp:172
ViewingParams::_443365
void _443365()
Definition: Viewport.cpp:177
Viewport::uViewportBR_Y
int uViewportBR_Y
Definition: Viewport.h:25
Engine::DropHeldItem
void DropHeldItem()
Definition: Viewport.cpp:289
Outdoor.h
id
GLuint id
Definition: SDL_opengl_glext.h:531
LEVEL_Indoor
@ LEVEL_Indoor
Definition: Indoor.h:286
Viewport::field_of_view
int field_of_view
Definition: Viewport.h:30
SpriteObject::Create
int Create(int yaw, int pitch, int a4, int a5)
Definition: SpriteObject.cpp:56
SpriteObject::containing_item
struct ItemGen containing_item
Definition: SpriteObject.h:227
dword_576E28
int dword_576E28
Definition: mm7_data.cpp:599
SPRITE_OBJECT_TYPE
SPRITE_OBJECT_TYPE
Definition: SpriteObject.h:5
distance
GLsizei GLsizei GLfloat distance
Definition: SDL_opengl_glext.h:9203
OBJECT_Player
@ OBJECT_Player
Definition: Actor.h:68
Party::bTurnBasedModeOn
bool bTurnBasedModeOn
Definition: Party.h:305
SpriteObject::uSoundID
unsigned __int16 uSoundID
Definition: SpriteObject.h:221
ViewingParams::CenterOnPartyZoomOut
void CenterOnPartyZoomOut()
Definition: Viewport.cpp:117
CURRENT_SCREEN::SCREEN_NPC_DIALOGUE
@ SCREEN_NPC_DIALOGUE
ViewingParams::pPalette
uint16_t pPalette[256]
Definition: Viewport.h:84
BLVMapOutlines::pOutlines
BLVMapOutline pOutlines[7000]
Definition: Indoor.h:570
Viewport::uScreenCenterX
int uScreenCenterX
Definition: Viewport.h:28
UIStatusBar.h
v2
GLfloat GLfloat GLfloat v2
Definition: SDL_opengl_glext.h:695
uActiveCharacter
unsigned int uActiveCharacter
Definition: mm7_data.cpp:555
v3
GLfloat GLfloat GLfloat GLfloat v3
Definition: SDL_opengl_glext.h:696
Localization::FormatString
String FormatString(unsigned int index,...) const
Definition: Localization.cpp:17
_449B7E_toggle_bit
void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle)
Definition: Party.cpp:1190
pNPCStats
struct NPCStats * pNPCStats
Definition: NPC.cpp:29
GameUI_StatusBar_OnEvent
void GameUI_StatusBar_OnEvent(const String &str, unsigned int num_seconds)
Definition: UIStatusBar.cpp:33
Party::SetHoldingItem
void SetHoldingItem(ItemGen *pItem)
Definition: Party.cpp:150
Decoration.h
Viewport::SetScreen
void SetScreen(int uX, int uY, int uZ, int uW)
Definition: Viewport.cpp:26
ViewingParams::bRedrawGameUI
int bRedrawGameUI
Definition: Viewport.h:74
UIMSG_Attack
@ UIMSG_Attack
Definition: GUIWindow.h:27
ActorInteraction
bool ActorInteraction(unsigned int id)
Definition: Viewport.cpp:250
IndoorLocation::pVertices
struct Vec3_short_ * pVertices
Definition: Indoor.h:628
Engine::OnGameViewportClick
void OnGameViewportClick()
Definition: Viewport.cpp:315
OurMath.h
ViewingParams::CenterOnPartyZoomIn
void CenterOnPartyZoomIn()
Definition: Viewport.cpp:127
EventProcessor
void EventProcessor(int uEventID, int targetObj, int canShowMessages, int entry_line)
Definition: Events.cpp:260
ViewingParams::sViewCenterY
int sViewCenterY
Definition: Viewport.h:69
uCurrentlyLoadedLevelType
LEVEL_TYPE uCurrentlyLoadedLevelType
Definition: Indoor.cpp:52
ViewingParams::MapViewUp
void MapViewUp()
Definition: Viewport.cpp:93
IndoorLocation::GetSector
int GetSector(int sX, int sY, int sZ)
Definition: Indoor.cpp:1279
IndoorLocation::pFaces
struct BLVFace * pFaces
Definition: Indoor.h:630
ITEM_ARTIFACT_SPLITTER
@ ITEM_ARTIFACT_SPLITTER
Definition: Items.h:159
ViewingParams::sViewCenterX
int sViewCenterX
Definition: Viewport.h:68
v0
GLfloat v0
Definition: SDL_opengl_glext.h:693
SpriteObject::OnInteraction
static void OnInteraction(unsigned int uLayingItemID)
Definition: SpriteObject.cpp:872
GUIWindow.h
ObjectList.h
pMessageQueue_50CBD0
struct GUIMessageQueue * pMessageQueue_50CBD0
Definition: GUIWindow.cpp:86
stru_5E4C90_MapPersistVars
stru123 stru_5E4C90_MapPersistVars
Definition: mm7_data.cpp:23
Color16
uint16_t Color16(uint32_t r, uint32_t g, uint32_t b)
Definition: Engine.cpp:148
pOutdoor
OutdoorLocation * pOutdoor
Definition: Outdoor.cpp:48
ViewingParams::uMapBookMapZoom
unsigned int uMapBookMapZoom
Definition: Viewport.h:67
SpriteObject::uAttributes
unsigned __int16 uAttributes
Definition: SpriteObject.h:222
ITEM_SPELLBOOK_MIND_REMOVE_FEAR
@ ITEM_SPELLBOOK_MIND_REMOVE_FEAR
Definition: Items.h:145
Viewport::uViewportTL_X
int uViewportTL_X
Definition: Viewport.h:22
ItemInteraction
void ItemInteraction(unsigned int item_id)
Definition: Viewport.cpp:224
stru262_TurnBased::field_18
int field_18
Definition: TurnEngine.h:80
Party::sRotationY
int sRotationY
Definition: Party.h:251
stru262_TurnBased::turn_stage
int turn_stage
Definition: TurnEngine.h:75
sub_427769_isSpellQuickCastableOnShiftClick
bool sub_427769_isSpellQuickCastableOnShiftClick(unsigned int uSpellID)
Definition: Spells.cpp:741
Mouse::RemoveHoldingItem
void RemoveHoldingItem()
Definition: Mouse.cpp:25
pObjectList
struct ObjectList * pObjectList
Definition: ObjectList.cpp:5
ViewingParams::MapViewLeft
void MapViewLeft()
Definition: Viewport.cpp:99
ItemsTable::pItems
NZIArray< ItemDesc, 800 > pItems
Definition: Items.h:460
Mouse.h
pDecorationList
struct DecorationList * pDecorationList
Definition: DecorationList.cpp:11
SpriteObject::spell_caster_pid
int spell_caster_pid
Definition: SpriteObject.h:232
BLVFace::uFaceExtraID
uint16_t uFaceExtraID
Definition: Indoor.h:482
Vis.h