World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Файл MapInfo.cpp

См. исходные тексты.

Функции

void TeleportToStartingPoint (MapStartPoint point)
 

Переменные

const char * location_type []
 

Функции

◆ TeleportToStartingPoint()

void TeleportToStartingPoint ( MapStartPoint  point)

См. определение в файле MapInfo.cpp строка 308

308  {
309  const char *model_name; // [sp-4h] [bp-84h]@6
310  char pName[128]; // [sp+8h] [bp-78h]@11
311 
312  switch (point) {
313  case MapStartPoint_Party:
314  model_name = "Party Start";
315  break;
316  case MapStartPoint_North:
317  model_name = "North Start";
318  break;
319  case MapStartPoint_South:
320  model_name = "South Start";
321  break;
322  case MapStartPoint_East:
323  model_name = "East Start";
324  break;
325  case MapStartPoint_West:
326  model_name = "West Start";
327  break;
328  default:
329  Error("Invalid enum value: %u", point);
330  }
331 
332  strcpy(pName, model_name);
333  if (pDecorationList->GetDecorIdByName(pName)) {
334  if (uNumLevelDecorations > 0) {
335  for (size_t i = 0; i < uNumLevelDecorations; ++i) {
336  if (pLevelDecorations[i].uDecorationDescID == pDecorationList->GetDecorIdByName(pName)) {
337  pParty->vPosition.x = pLevelDecorations[i].vPosition.x;
338  pParty->vPosition.y = pLevelDecorations[i].vPosition.y;
339  pParty->vPosition.z = pLevelDecorations[i].vPosition.z;
342  pLevelDecorations[i].field_1A) /
343  90;
344  if (pLevelDecorations[i].field_10_y_rot)
345  pParty->sRotationY =
346  pLevelDecorations[i].field_10_y_rot;
347  pParty->sRotationX = 0;
348  pParty->uFallSpeed = 0;
349  }
350  }
351  }
357  if (Party_Teleport_Z_Pos) {
360  }
361  if (Party_Teleport_Cam_Yaw != -1)
366  }
374  }
375 }

Перекрестные ссылки DecorationList::GetDecorIdByName(), MapStartPoint_East, MapStartPoint_North, MapStartPoint_Party, MapStartPoint_South, MapStartPoint_West, Party_Teleport_Cam_Pitch, Party_Teleport_Cam_Yaw, Party_Teleport_X_Pos, Party_Teleport_Y_Pos, Party_Teleport_Z_Pos, Party_Teleport_Z_Speed, pDecorationList, pLevelDecorations, pParty, Party::sRotationX, Party::sRotationY, Start_Party_Teleport_Flag, stru_5C6E00, Party::uFallSpeed, Party::uFallStartY, stru193_math::uIntegerHalfPi, uNumLevelDecorations и Party::vPosition.

Используется в Application::Game::EventLoop(), PrepareToLoadBLV() и PrepareToLoadODM().

+ Граф вызовов:
+ Граф вызова функции:

Переменные

◆ location_type

const char* location_type[]
Инициализатор
= {
"GENERIC",
"PADDEDCELL",
"ROOM",
"BATHROOM",
"LIVINGROOM",
"STONEROOM",
"AUDITORIUM",
"CONCERTHALL",
"CAVE",
"ARENA",
"HANGAR",
"CARPETEDHALLWAY",
"HALLWAY",
"STONECORRIDOR",
"ALLEY",
"FOREST",
"CITY",
"MOUNTAIN",
"QUARRY",
"PLAINS",
"PARKINGLOT",
"SEWERPIPE",
"UNDERWATER",
"DRUGGED",
"DIZZY",
"PSYCHOTIC"
}

См. определение в файле MapInfo.cpp строка 18

Используется в MapStats::Initialize().

Party::vPosition
Vec3_int_ vPosition
Definition: Party.h:250
pLevelDecorations
std::array< LevelDecoration, 3000 > pLevelDecorations
Definition: Decoration.cpp:8
Party::uFallSpeed
int uFallSpeed
Definition: Party.h:259
Start_Party_Teleport_Flag
int Start_Party_Teleport_Flag
Definition: mm7_data.cpp:628
Party_Teleport_Y_Pos
int Party_Teleport_Y_Pos
Definition: mm7_data.cpp:623
Party::sRotationX
int sRotationX
Definition: Party.h:252
stru193_math::uIntegerHalfPi
static const unsigned int uIntegerHalfPi
Definition: OurMath.h:89
DecorationList::GetDecorIdByName
uint16_t GetDecorIdByName(const char *pName)
Definition: DecorationList.cpp:60
MapStartPoint_North
@ MapStartPoint_North
Definition: MapInfo.h:29
Party::uFallStartY
int uFallStartY
Definition: Party.h:265
MapStartPoint_East
@ MapStartPoint_East
Definition: MapInfo.h:31
pParty
Party * pParty
Definition: Party.cpp:30
Party_Teleport_Cam_Pitch
int Party_Teleport_Cam_Pitch
Definition: mm7_data.cpp:626
Party_Teleport_X_Pos
int Party_Teleport_X_Pos
Definition: mm7_data.cpp:622
Party_Teleport_Cam_Yaw
int Party_Teleport_Cam_Yaw
Definition: mm7_data.cpp:625
MapStartPoint_South
@ MapStartPoint_South
Definition: MapInfo.h:30
uNumLevelDecorations
size_t uNumLevelDecorations
Definition: Decoration.cpp:9
MapStartPoint_West
@ MapStartPoint_West
Definition: MapInfo.h:32
Party_Teleport_Z_Speed
int Party_Teleport_Z_Speed
Definition: mm7_data.cpp:627
stru_5C6E00
struct stru193_math * stru_5C6E00
Definition: mm7_data.cpp:19
Party_Teleport_Z_Pos
int Party_Teleport_Z_Pos
Definition: mm7_data.cpp:624
Party::sRotationY
int sRotationY
Definition: Party.h:251
MapStartPoint_Party
@ MapStartPoint_Party
Definition: MapInfo.h:28
pDecorationList
struct DecorationList * pDecorationList
Definition: DecorationList.cpp:11