World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Sprites.cpp
См. документацию.
2 
3 #include <cstdlib>
4 #include <cstring>
5 #include <algorithm>
6 
7 #include "Engine/Engine.h"
8 #include "Engine/LOD.h"
9 #include "Engine/OurMath.h"
10 
11 #include "Engine/Objects/Actor.h"
12 
14 
16 
21 
23 
24 //----- (0044D4D8) --------------------------------------------------------
26  free(this->pSpriteSFrames);
27  this->pSpriteSFrames = nullptr;
28  this->uNumSpriteFrames = 0;
29 }
30 
31 //----- (0044D4F6) --------------------------------------------------------
33  int v1; // esi@1
34  signed int i; // edx@1
35  char *v3; // eax@2
36 
37  v1 = 0;
38  for (i = 0; i < (signed int)this->uNumSpriteFrames; ++i) {
39  v3 = (char *)&this->pSpriteSFrames[v1].uFlags;
40  ++v1;
41  *v3 &= 0x7Fu;
42  }
43 }
44 
45 //----- (0044D513) --------------------------------------------------------
46 void SpriteFrameTable::InitializeSprite(signed int uSpriteID) {
47  // SpriteFrameTable *v2; // esi@1
48  unsigned int v3; // ebx@3
49  // char *v4; // edx@3
50  // int v5; // eax@3
51  // SpriteFrame *v6; // ecx@5
52  // int v7; // eax@5
53  // __int16 v8; // ax@6
54  // signed int v9; // edx@6
55  // int v10; // ecx@6
56  // signed int v11; // edi@10
57  // __int16 v12; // ax@16
58  // int v13; // ecx@16
59  // size_t v14; // eax@19
60  // signed int v15; // edi@19
61  // __int16 v16; // ax@27
62  // int v17; // ecx@27
63  // signed int v18; // edi@29
64  // SpriteFrame *v19; // eax@30
65  // __int16 v20; // ax@45
66  // int v21; // ecx@45
67 
68  char Str[32]; // [sp+Ch] [bp-3Ch]@19
69  char sprite_name[20]; // [sp+2Ch] [bp-1Ch]@15
70  char Source[4]; // [sp+40h] [bp-8h]@19
71 
72  // v2 = this;
73  if (uSpriteID <= this->uNumSpriteFrames) {
74  if (uSpriteID >= 0) {
75  v3 = uSpriteID;
76 
77  int uFlags = pSpriteSFrames[v3].uFlags;
78  if (!(uFlags & 0x0080)) { // not loaded
79  pSpriteSFrames[v3].uFlags |= 0x80; // set loaded
80  while (1) {
83  pSpriteSFrames[v3].uPaletteID);
84  if (uFlags & 0x10) { // single frame per frame sequence
85  auto v8 = pSprites_LOD->LoadSprite(
86  pSpriteSFrames[v3].texture_name.c_str(),
88 
89  if (v8 == -1) { // should we set hw_sprites as nullptr in these cases??
90  // __debugbreak();
91  logger->Warning(L"Sprite %S not loaded!", pSpriteSFrames[v3].texture_name.c_str());
92  }
93 
94  for (uint i = 0; i < 8; ++i) {
95  // pSpriteSFrames[v3].pHwSpriteIDs[i] = v8;
98  }
99 
100  } else if (uFlags & 0x10000) {
101  for (uint i = 0; i < 8; ++i) {
102  switch (i) {
103  case 3:
104  case 4:
105  case 5:
106  sprintf(sprite_name, "%s4",
108  .texture_name.c_str());
109  break;
110  case 2:
111  case 6:
112  sprintf(sprite_name, "%s2",
114  .texture_name.c_str());
115  break;
116  case 0:
117  case 1:
118  case 7:
119  sprintf(sprite_name, "%s0",
121  .texture_name.c_str());
122  break;
123  }
124  auto v12 = pSprites_LOD->LoadSprite(
125  sprite_name, pSpriteSFrames[v3].uPaletteID);
126  // pSpriteSFrames[v3].pHwSpriteIDs[i]=v12;
127  if (v12 == -1) __debugbreak();
130  }
131 
132  } else if (uFlags & 0x40) { // part of monster fidgeting seq
133  strcpy(Source, "stA");
134  strcpy(Str, pSpriteSFrames[v3].texture_name.c_str());
135  auto v14 = strlen(Str);
136  strcpy(&Str[v14 - 3], Source);
137  for (uint i = 0; i < 8; ++i) {
138  switch (i) {
139  case 0:
140  sprintf(sprite_name, "%s0",
142  .texture_name.c_str());
143  break;
144  case 4:
145  sprintf(sprite_name, "%s4", Str);
146  break;
147  case 3:
148  case 5:
149  sprintf(sprite_name, "%s3", Str);
150  break;
151  case 2:
152  case 6:
153  sprintf(sprite_name, "%s2",
155  .texture_name.c_str());
156  break;
157  case 1:
158  case 7:
159  sprintf(sprite_name, "%s1",
161  .texture_name.c_str());
162  break;
163  }
164  auto v12 = pSprites_LOD->LoadSprite(
165  sprite_name, pSpriteSFrames[v3].uPaletteID);
166  // pSpriteSFrames[v3].pHwSpriteIDs[i]=v12;
167  if (v12 == -1) __debugbreak();
168 
171  }
172  } else {
173  for (uint i = 0; i < 8; ++i) {
174  if (((0x0100 << i) &
175  pSpriteSFrames[v3].uFlags)) { // mirrors
176  switch (i) {
177  case 1:
178  sprintf(sprite_name, "%s7",
180  .texture_name.c_str());
181  break;
182  case 2:
183  sprintf(sprite_name, "%s6",
185  .texture_name.c_str());
186  break;
187  case 3:
188  sprintf(sprite_name, "%s5",
190  .texture_name.c_str());
191  break;
192  case 4:
193  sprintf(sprite_name, "%s4",
195  .texture_name.c_str());
196  break;
197  case 5:
198  sprintf(sprite_name, "%s3",
200  .texture_name.c_str());
201  break;
202  case 6:
203  sprintf(sprite_name, "%s2",
205  .texture_name.c_str());
206  break;
207  case 7:
208  sprintf(sprite_name, "%s1",
210  .texture_name.c_str());
211  break;
212  }
213  } else {
214  // some names already passed through with codes attached
215  if (strlen(pSpriteSFrames[v3].texture_name.c_str()) < 7) {
216  sprintf(sprite_name, "%s%i", pSpriteSFrames[v3].texture_name.c_str(), i);
217  } else {
218  sprintf(sprite_name, "%s", pSpriteSFrames[v3].texture_name.c_str());
219  // __debugbreak();
220  }
221  }
222 
223  auto v12 = pSprites_LOD->LoadSprite(
224  sprite_name, pSpriteSFrames[v3].uPaletteID);
225  // pSpriteSFrames[v3].pHwSpriteIDs[i]=v12;
226 
227  if (v12 == -1) __debugbreak();
228 
231  }
232  }
233 
234  if (!(pSpriteSFrames[v3].uFlags & 1)) return;
235  ++v3;
236  }
237  }
238  }
239  }
240 }
241 
242 //----- (0044D813) --------------------------------------------------------
243 int SpriteFrameTable::FastFindSprite(const char *pSpriteName) {
244  signed int result; // eax@2
245 
246  int searchResult = BinarySearch(pSpriteName);
247  if (searchResult < 0)
248  result = 0;
249  else
250  result = this->pSpriteEFrames[searchResult];
251  return result;
252 }
253 
254 //----- (0044D83A) --------------------------------------------------------
255 int SpriteFrameTable::BinarySearch(const char *pSpriteName) {
256  int startPos = 0;
257  int endPos = uNumEFrames;
258  while (1) {
259  int searchRange = endPos - startPos;
260  int middleFrameIndex = startPos + (endPos - startPos) / 2;
261  int comparisonResult = _stricmp(pSpriteName, this->pSpritePFrames[middleFrameIndex]->icon_name.c_str());
262  if (!comparisonResult) {
263  return middleFrameIndex;
264  }
265  if (startPos == endPos) {
266  return -1;
267  }
268  if (comparisonResult >= 0) {
269  startPos += std::max(((endPos - startPos) / 2), 1);
270  } else {
271  endPos = std::max(((endPos - startPos) / 2), 1) + startPos;
272  }
273  }
274 }
275 
276 //----- (0044D8D0) --------------------------------------------------------
277 SpriteFrame *SpriteFrameTable::GetFrame(unsigned int uSpriteID,
278  unsigned int uTime) {
279  SpriteFrame *v4; // ecx@1
280 
281  v4 = &pSpriteSFrames[uSpriteID];
282  if (~v4->uFlags & 1 || !v4->uAnimLength) return pSpriteSFrames + uSpriteID;
283 
284  for (uint t = (uTime / 8) % v4->uAnimLength; t > v4->uAnimTime; ++v4)
285  t -= v4->uAnimTime;
286  return v4;
287 
288  /*for (v4; v4->uAnimTime <= t; ++v4)
289 
290  v6 = (uTime / 8) % v4->uAnimLength;
291  //v7 = uSpriteID;
292  for ( i = (char *)&v4->uAnimTime; ; i += 60 )
293  {
294  v9 = *(short *)i;
295  if ( v6 <= v9 )
296  break;
297  v6 -= v9;
298  ++v7;
299  }
300  return &pSpriteSFrames[v7];*/
301 }
302 
303 //----- (0044D91F) --------------------------------------------------------
305  signed int a3) {
306  SpriteFrame *v3; // edi@1
307  SpriteFrame *v4; // esi@1
308  __int16 v5; // ax@2
309  int v6; // ecx@3
310  int v7; // edx@3
311  unsigned int v8; // eax@3
312  int v9; // ecx@3
313  char *i; // edx@3
314  int v11; // esi@5
315  SpriteFrame *result; // eax@6
316 
317  v3 = this->pSpriteSFrames;
318  v4 = &v3[uSpriteID];
319  if (v4->uFlags & 1 && (v5 = v4->uAnimLength) != 0) {
320  v6 = v5;
321  v7 = a3 % v5;
322  v8 = uSpriteID;
323  v9 = v6 - v7;
324  for (i = (char *)&v4->uAnimTime;; i += 60) {
325  v11 = *(short *)i;
326  if (v9 <= v11) break;
327  v9 -= v11;
328  ++v8;
329  }
330  result = &v3[v8];
331  } else {
332  result = &v3[uSpriteID];
333  }
334  return result;
335 }
336 
338  FILE *file = fopen("data\\dsft.bin", "wb");
339  if (file == nullptr) {
340  Error("Unable to save dsft.bin!");
341  }
342  fwrite(&uNumSpriteFrames, 4, 1, file);
343  fwrite(&uNumEFrames, 4, 1, file);
344  fwrite(pSpriteSFrames, 0x3C, uNumSpriteFrames, file);
345  fwrite(pSpriteEFrames, 2, uNumEFrames, file);
346  fclose(file);
347 }
348 
350  if (data) {
351  this->icon_name = data->pIconName;
352  std::transform(this->icon_name.begin(), this->icon_name.end(),
353  this->icon_name.begin(), ::tolower);
354 
355  this->texture_name = data->pTextureName;
356  std::transform(this->texture_name.begin(), this->texture_name.end(),
357  this->texture_name.begin(), ::tolower);
358 
359  for (unsigned int i = 0; i < 8; ++i) {
360  this->hw_sprites[i] = nullptr;
361  }
362 
363  this->scale = fixed(data->scale);
364  this->uFlags = data->uFlags;
365 
366  this->uGlowRadius = data->uGlowRadius;
367  this->uPaletteID = data->uPaletteID;
368  this->uPaletteIndex = data->uPaletteIndex;
369  this->uAnimTime = data->uAnimTime;
370  this->uAnimLength = data->uAnimLength;
371 
372  return true;
373  }
374  return false;
375 }
376 
377 //----- (0044D9D7) --------------------------------------------------------
378 void SpriteFrameTable::FromFile(void *data_mm6, void *data_mm7,
379  void *data_mm8) {
380  uint num_mm6_frames = 0;
381  uint num_mm6_eframes = 0;
382  if (data_mm6) {
383  num_mm6_frames = *(int *)data_mm6;
384  num_mm6_eframes = *((int *)data_mm6 + 1);
385  }
386 
387  uint num_mm7_frames = 0;
388  uint num_mm7_eframes = 0;
389  if (data_mm7) {
390  num_mm7_frames = *(int *)data_mm7;
391  num_mm7_eframes = *((int *)data_mm7 + 1);
392  }
393 
394  uint num_mm8_frames = 0;
395  uint num_mm8_eframes = 0;
396  if (data_mm8) {
397  num_mm8_frames = *(int *)data_mm8;
398  num_mm8_eframes = *((int *)data_mm8 + 1);
399  }
400 
401  this->uNumSpriteFrames =
402  num_mm7_frames /*+ num_mm6_frames + num_mm8_frames*/;
403 
404  this->pSpriteSFrames = new SpriteFrame[this->uNumSpriteFrames];
405  for (unsigned int i = 0; i < this->uNumSpriteFrames; ++i) {
406  auto res = this->pSpriteSFrames[i].Deserialize(
407  (SpriteFrame_MM7 *)((char *)data_mm7 + 8) + i);
408 
409  if (!res) {
410  logger->Warning(L"MM7 Sprite %u deserialization failed", i);
411  }
412  }
413 
414  this->uNumEFrames = num_mm7_eframes /*+ num_mm6_eframes + num_mm8_eframes*/;
415  this->pSpriteEFrames = (__int16 *)malloc(uNumSpriteFrames * sizeof(short));
416 
417  uint mm7_frames_size = num_mm7_frames * sizeof(SpriteFrame_MM7);
418  memcpy(pSpriteEFrames, (char *)data_mm7 + 8 + mm7_frames_size,
419  2 * num_mm7_eframes);
420 
421  pSpritePFrames = (SpriteFrame **)malloc(sizeof(void *) * uNumSpriteFrames);
422 
423  /*uint mm6_frames_size = num_mm6_frames * sizeof(SpriteFrame_mm6);
424  for (uint i = 0; i < num_mm6_frames; ++i)
425  {
426  memcpy(pSpriteSFrames + num_mm7_frames + i, (char *)data_mm6 + 8 + i *
427  sizeof(SpriteFrame_mm6), sizeof(SpriteFrame_mm6));
428  pSpriteSFrames[num_mm7_frames + i].uAnimLength = 0;
429  }
430  memcpy(pSpriteEFrames + num_mm7_frames, (char *)data_mm6 + 8 +
431  mm6_frames_size, 2 * num_mm6_eframes);*/
432 
433  /*uint mm8_frames_size = num_mm8_frames * sizeof(SpriteFrame);
434  memcpy(pSpriteSFrames + num_mm6_frames + num_mm7_frames, (char *)data_mm8 +
435  8, mm8_frames_size); memcpy(pSpriteEFrames + num_mm6_frames +
436  num_mm7_frames, (char *)data_mm8 + 8 + mm8_frames_size, 2 *
437  num_mm8_eframes);*/
438 
439  // the original was using num_mmx_frames, but never accessed any element
440  // beyond num_mmx_eframes, but boing beyong eframes caused invalid memory
441  // accesses
442  for (uint i = 0;
443  i < num_mm7_eframes /*+ num_mm6_eframes + num_mm8_eframes*/; ++i)
445 }
446 
447 void _46E26D_collide_against_sprites(int a1, int a2) {
448  int v2; // edx@5
449  unsigned __int16 *v3; // eax@5
450  unsigned __int16 v4; // ax@6
451  LevelDecoration *v5; // edi@7
452  DecorationDesc *v6; // esi@8
453  int v7; // edx@9
454  int v8; // eax@9
455  int v9; // ecx@11
456  int v10; // ebx@13
457  int v11; // esi@13
458  int v12; // ebp@15
459  int v13; // ebx@15
460  int v14; // esi@16
461  int v15; // edi@17
462  int v16; // eax@17
463  int v17; // esi@19
464  char v18; // zf@23
465  int v19; // [sp+0h] [bp-10h]@15
466  unsigned __int16 *v20; // [sp+4h] [bp-Ch]@5
467  int v21; // [sp+8h] [bp-8h]@15
468  int v22; // [sp+Ch] [bp-4h]@13
469 
470  if (a1 >= 0) {
471  if (a1 <= 127) {
472  if (a2 >= 0) {
473  if (a2 <= 127) {
474  v2 = a1 + (a2 << 7);
476  v20 = &pOutdoor->pFaceIDLIST[pOutdoor->pOMAP[v2]];
477  if (v3) {
478  do {
479  v4 = *v3;
480  if (PID_TYPE(v4) == OBJECT_Decoration) {
481  v5 =
482  &pLevelDecorations[(signed __int16)v4 >> 3];
483  if (!(v5->uFlags &
486  if (!v6->CanMoveThrough()) {
487  v7 = v6->uRadius;
488  v8 = v5->vPosition.x;
489  if (stru_721530.sMaxX <= v8 + v7) {
490  if (stru_721530.sMinX >= v8 - v7) {
491  v9 = v5->vPosition.y;
492  if (stru_721530.sMaxY <=
493  v9 + v7) {
494  if (stru_721530.sMinY >=
495  v9 - v7) {
496  v10 =
497  v6->uDecorationHeight;
498  v11 = v5->vPosition.z;
499  v22 = v10;
500  if (stru_721530.sMaxZ <=
501  v11 + v10) {
502  if (stru_721530
503  .sMinZ >=
504  v11) {
505  v12 =
506  v8 -
508  .normal
509  .x;
510  v19 =
511  v9 -
513  .normal
514  .y;
515  v13 =
517  .prolly_normal_d +
518  v7;
519  v21 =
520  ((v8 -
522  .normal
523  .x) *
525  .direction
526  .y -
527  (v9 -
529  .normal
530  .y) *
532  .direction
533  .x) >>
534  16;
535  if (abs(v21) <=
537  .prolly_normal_d +
538  v7) {
539  v14 =
540  (v12 *
542  .direction
543  .x +
544  v19 *
546  .direction
547  .y) >>
548  16;
549  if (v14 >
550  0) {
551  v15 =
552  v5->vPosition
553  .z;
554  v16 =
556  .normal
557  .z +
558  fixpoint_mul(
560  .direction
561  .z,
562  v14);
563  if (v16 >=
564  v15) {
565  if (v16 <=
566  v22 +
567  v15) {
568  v17 =
569  v14 -
570  integer_sqrt(
571  v13 *
572  v13 -
573  v21 *
574  v21);
575  if (v17 <
576  0)
577  v17 =
578  0;
579  if (v17 <
581  .field_7C) {
583  .field_7C =
584  v17;
586  .pid =
587  (signed __int16)*v20;
588  }
589  }
590  }
591  }
592  }
593  }
594  }
595  }
596  }
597  }
598  }
599  }
600  }
601  }
602  v3 = v20 + 1;
603  v18 = *v20 == 0;
604  ++v20;
605  } while (!v18);
606  }
607  }
608  }
609  }
610  }
611 }
612 
613 
615  switch (month/*pParty->uCurrentMonth*/) {
616  // case 531 (tree60), 536 (tree65), 537 (tree66) have no autumn/winter
617  // sprites
618  case 11:
619  case 0:
620  case 1: // winter
621  {
622  switch (desc->uSpriteID) {
623  // case 468: //bush02 grows on swamps, which are
624  // evergreeen actually
625  case 548: // flower10
626  case 547: // flower09
627  case 541: // flower03
628  case 539: // flower01
629  return nullptr;
630 
631  case 483: // tree01
632  case 486: // tree04
633  case 492: // tree10
634  {
636  return pSpriteFrameTable->GetFrame(desc->uSpriteID + 2, t);
637  }
638 
639  default:
640  return pSpriteFrameTable->GetFrame(desc->uSpriteID, t);
641  }
642  }
643 
644  case 2:
645  case 3:
646  case 4: // spring
647  {
648  // switch (desc->uSpriteID) {}
649  return pSpriteFrameTable->GetFrame(desc->uSpriteID, t);
650  }
651 
652  case 8:
653  case 9:
654  case 10: // autumn
655  {
656  switch (desc->uSpriteID) {
657  // case 468: //bush02 grows on swamps, which are evergreeen
658  // actually
659  case 548: // flower10
660  case 547: // flower09
661  case 541: // flower03
662  case 539: // flower01
663  return nullptr;
664 
665  case 483: // tree01
666  case 486: // tree04
667  case 492: // tree10
668  {
670  return pSpriteFrameTable->GetFrame(desc->uSpriteID + 1, t);
671  }
672 
673  default:
674  return pSpriteFrameTable->GetFrame(desc->uSpriteID, t);
675  }
676  } break;
677 
678  case 5:
679  case 6:
680  case 7: // summer
681  // all green by default
682  {
683  return pSpriteFrameTable->GetFrame(desc->uSpriteID, t);
684  }
685 
686  default:
687  assert(/*pParty->uCurrentMonth*/month >= 0 && /*pParty->uCurrentMonth*/month < 12);
688  }
689 }
SpriteFrameTable::GetFrameBy_x
SpriteFrame * GetFrameBy_x(unsigned int uSpriteID, signed int a3)
Definition: Sprites.cpp:304
SpriteFrame_MM7
Definition: LegacyImages.h:29
LevelDecorationChangeSeason
SpriteFrame * LevelDecorationChangeSeason(DecorationDesc *desc, int t, int month)
Definition: Sprites.cpp:614
SpriteFrame::hw_sprites
Sprite * hw_sprites[8]
Definition: Sprites.h:46
pLevelDecorations
std::array< LevelDecoration, 3000 > pLevelDecorations
Definition: Decoration.cpp:8
OutdoorLocation::pOMAP
unsigned int * pOMAP
Definition: Outdoor.h:122
LOD.h
DecorationList::GetDecoration
DecorationDesc * GetDecoration(unsigned int index)
Definition: DecorationList.h:65
scale
GLenum GLenum GLenum GLenum GLenum scale
Definition: SDL_opengl_glext.h:9378
SpriteFrame::uGlowRadius
int uGlowRadius
Definition: Sprites.h:49
SpriteFrame_MM6::uFlags
int uFlags
Definition: LegacyImages.h:22
DecorationList.h
SpriteFrame::icon_name
String icon_name
Definition: Sprites.h:43
pSpriteFrameTable
struct SpriteFrameTable * pSpriteFrameTable
Definition: Sprites.cpp:22
pSprites_LOD
LODFile_Sprites * pSprites_LOD
Definition: LOD.cpp:20
stru141_actor_collision_object::sMaxZ
int sMaxZ
Definition: Indoor.h:180
SpriteFrame::uPaletteID
int uPaletteID
Definition: Sprites.h:50
LegacyImages.h
z
GLdouble GLdouble z
Definition: SDL_opengl_glext.h:407
SpriteFrame::texture_name
String texture_name
Definition: Sprites.h:44
SpriteFrameTable
Definition: Sprites.h:57
PaletteManager.h
PaletteManager::LoadPalette
int LoadPalette(unsigned int uPaletteID)
Definition: PaletteManager.cpp:648
stru141_actor_collision_object::normal
Vec3_int_ normal
Definition: Indoor.h:159
SpriteFrame::uPaletteIndex
int uPaletteIndex
Definition: Sprites.h:51
OBJECT_Decoration
@ OBJECT_Decoration
Definition: Actor.h:69
SpriteFrameTable::uNumSpriteFrames
int uNumSpriteFrames
Definition: Sprites.h:74
DecorationDesc_mm6::uRadius
int16_t uRadius
Definition: DecorationList.h:41
SpriteFrame_MM6::uAnimTime
int16_t uAnimTime
Definition: LegacyImages.h:26
Engine.h
result
GLuint64EXT * result
Definition: SDL_opengl_glext.h:9435
LODFile_Sprites::LoadSprite
int LoadSprite(const char *pContainerName, unsigned int uPaletteID)
Definition: LOD.cpp:149
SpriteFrameTable::BinarySearch
int BinarySearch(const char *pSpriteName)
Definition: Sprites.cpp:255
Actor.h
SpriteFrame_MM6::pIconName
char pIconName[12]
Definition: LegacyImages.h:18
SpriteFrameTable::ReleaseSFrames
void ReleaseSFrames()
Definition: Sprites.cpp:25
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
LevelDecoration::vPosition
Vec3_int_ vPosition
Definition: Decoration.h:28
OutdoorLocation::pFaceIDLIST
uint16_t * pFaceIDLIST
Definition: Outdoor.h:121
SpriteFrameTable::uNumEFrames
unsigned int uNumEFrames
Definition: Sprites.h:75
SpriteFrameTable::FromFile
void FromFile(void *data_mm6, void *data_mm7, void *data_mm8)
Definition: Sprites.cpp:378
SpriteFrame::uAnimTime
int uAnimTime
Definition: Sprites.h:52
stru141_actor_collision_object::sMinY
int sMinY
Definition: Indoor.h:179
LEVEL_DECORATION_INVISIBLE
@ LEVEL_DECORATION_INVISIBLE
Definition: Decoration.h:14
SpriteFrame_MM6::uPaletteID
int16_t uPaletteID
Definition: LegacyImages.h:24
stru141_actor_collision_object::field_7C
int field_7C
Definition: Indoor.h:172
SpriteFrameTable::GetFrame
SpriteFrame * GetFrame(unsigned int uSpriteID, unsigned int uTime)
Definition: Sprites.cpp:277
DecorationDesc_mm6::CanMoveThrough
bool CanMoveThrough()
Definition: DecorationList.h:26
SpriteFrameTable::ResetSomeSpriteFlags
void ResetSomeSpriteFlags()
Definition: Sprites.cpp:32
v1
GLfloat GLfloat v1
Definition: SDL_opengl_glext.h:694
Log::Warning
void Warning(const wchar_t *pFormat,...)
Definition: Log.cpp:28
SpriteFrame_MM7::uAnimLength
int16_t uAnimLength
Definition: LegacyImages.h:32
LevelDecoration::uFlags
uint16_t uFlags
Definition: Decoration.h:27
fixpoint_mul
__int64 fixpoint_mul(int a1, int a2)
Definition: OurMath.cpp:138
SpriteFrameTable::pSpriteSFrames
SpriteFrame * pSpriteSFrames
Definition: Sprites.h:77
_46E26D_collide_against_sprites
void _46E26D_collide_against_sprites(int a1, int a2)
Definition: Sprites.cpp:447
LevelDecoration
Definition: Decoration.h:20
pPaletteManager
PaletteManager * pPaletteManager
Definition: PaletteManager.cpp:7
stru141_actor_collision_object::sMaxX
int sMaxX
Definition: Indoor.h:176
stru141_actor_collision_object::sMinX
int sMinX
Definition: Indoor.h:177
SpriteFrame_MM6::uPaletteIndex
int16_t uPaletteIndex
Definition: LegacyImages.h:25
stru141_actor_collision_object::sMaxY
int sMaxY
Definition: Indoor.h:178
SpriteFrameTable::InitializeSprite
void InitializeSprite(signed int uSpriteID)
Definition: Sprites.cpp:46
t
GLdouble GLdouble t
Definition: SDL_opengl.h:2071
Outdoor.h
LevelDecoration::uDecorationDescID
uint16_t uDecorationDescID
Definition: Decoration.h:26
transform
GLuint GLenum GLenum transform
Definition: SDL_opengl_glext.h:9999
SpriteFrameTable::FastFindSprite
int FastFindSprite(const char *pSpriteName)
Definition: Sprites.cpp:243
FrameTableInc.h
SpriteFrame::uAnimLength
int uAnimLength
Definition: Sprites.h:53
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
stru141_actor_collision_object::prolly_normal_d
int prolly_normal_d
Definition: Indoor.h:152
SpriteFrameTable::ToFile
void ToFile()
Definition: Sprites.cpp:337
DecorationDesc_mm6::uSpriteID
uint16_t uSpriteID
Definition: DecorationList.h:43
v2
GLfloat GLfloat GLfloat v2
Definition: SDL_opengl_glext.h:695
SpriteFrame
Definition: Sprites.h:39
integer_sqrt
int integer_sqrt(int val)
Definition: OurMath.cpp:164
uint
unsigned int uint
Definition: MM7.h:4
v3
GLfloat GLfloat GLfloat GLfloat v3
Definition: SDL_opengl_glext.h:696
__debugbreak
void __cdecl __debugbreak(void)
DecorationDesc_mm6::uDecorationHeight
uint16_t uDecorationHeight
Definition: DecorationList.h:40
stru141_actor_collision_object::direction
Vec3_int_ direction
Definition: Indoor.h:165
Decoration.h
SpriteFrameTable::pSpritePFrames
SpriteFrame ** pSpritePFrames
Definition: Sprites.h:78
DecorationDesc
Definition: DecorationList.h:49
OurMath.h
LODFile_Sprites::pHardwareSprites
Sprite * pHardwareSprites
Definition: LOD.h:233
stru_721530
stru141_actor_collision_object stru_721530
Definition: Indoor.cpp:58
fixed
Definition: OurMath.h:21
logger
Log * logger
Definition: IocContainer.cpp:47
res
GLuint res
Definition: SDL_opengl_glext.h:7940
pOutdoor
OutdoorLocation * pOutdoor
Definition: Outdoor.cpp:48
SpriteFrame_MM6::uGlowRadius
int16_t uGlowRadius
Definition: LegacyImages.h:23
Sprites.h
SpriteFrame_MM6::pTextureName
char pTextureName[12]
Definition: LegacyImages.h:19
SpriteFrame::uFlags
int uFlags
Definition: Sprites.h:48
SpriteFrame::Deserialize
bool Deserialize(const struct SpriteFrame_MM7 *)
Definition: Sprites.cpp:349
SpriteFrameTable::pSpriteEFrames
int16_t * pSpriteEFrames
Definition: Sprites.h:79
pDecorationList
struct DecorationList * pDecorationList
Definition: DecorationList.cpp:11
stru141_actor_collision_object::pid
unsigned int pid
Definition: Indoor.h:171